[llvm-branch-commits] [libcxx] 4fe8bd0 - RENAME ALL THE THINGS

Michael Schellenberger Costa via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Oct 10 02:55:32 PDT 2022


Author: Michael Schellenberger Costa
Date: 2022-09-08T11:55:50+02:00
New Revision: 4fe8bd01fa5e626023749e132ee534a0ab23e1fd

URL: https://github.com/llvm/llvm-project/commit/4fe8bd01fa5e626023749e132ee534a0ab23e1fd
DIFF: https://github.com/llvm/llvm-project/commit/4fe8bd01fa5e626023749e132ee534a0ab23e1fd.diff

LOG: RENAME ALL THE THINGS

Added: 
    

Modified: 
    libcxx/.clang-format
    libcxx/CMakeLists.txt
    libcxx/benchmarks/std_format_spec_string_unicode.bench.cpp
    libcxx/cmake/Modules/HandleLibCXXABI.cmake
    libcxx/docs/BuildingLibcxx.rst
    libcxx/docs/Contributing.rst
    libcxx/docs/DesignDocs/ABIVersioning.rst
    libcxx/docs/DesignDocs/DebugMode.rst
    libcxx/docs/DesignDocs/ExperimentalFeatures.rst
    libcxx/docs/DesignDocs/ThreadingSupportAPI.rst
    libcxx/docs/DesignDocs/UnspecifiedBehaviorRandomization.rst
    libcxx/docs/DesignDocs/VisibilityMacros.rst
    libcxx/docs/ReleaseNotes.rst
    libcxx/docs/UsingLibcxx.rst
    libcxx/include/__algorithm/adjacent_find.h
    libcxx/include/__algorithm/all_of.h
    libcxx/include/__algorithm/any_of.h
    libcxx/include/__algorithm/binary_search.h
    libcxx/include/__algorithm/clamp.h
    libcxx/include/__algorithm/comp.h
    libcxx/include/__algorithm/comp_ref_type.h
    libcxx/include/__algorithm/copy.h
    libcxx/include/__algorithm/copy_backward.h
    libcxx/include/__algorithm/copy_if.h
    libcxx/include/__algorithm/copy_n.h
    libcxx/include/__algorithm/count.h
    libcxx/include/__algorithm/count_if.h
    libcxx/include/__algorithm/equal.h
    libcxx/include/__algorithm/equal_range.h
    libcxx/include/__algorithm/fill.h
    libcxx/include/__algorithm/fill_n.h
    libcxx/include/__algorithm/find.h
    libcxx/include/__algorithm/find_end.h
    libcxx/include/__algorithm/find_first_of.h
    libcxx/include/__algorithm/find_if.h
    libcxx/include/__algorithm/find_if_not.h
    libcxx/include/__algorithm/for_each.h
    libcxx/include/__algorithm/for_each_n.h
    libcxx/include/__algorithm/generate.h
    libcxx/include/__algorithm/generate_n.h
    libcxx/include/__algorithm/half_positive.h
    libcxx/include/__algorithm/in_found_result.h
    libcxx/include/__algorithm/in_fun_result.h
    libcxx/include/__algorithm/in_in_out_result.h
    libcxx/include/__algorithm/in_in_result.h
    libcxx/include/__algorithm/in_out_out_result.h
    libcxx/include/__algorithm/in_out_result.h
    libcxx/include/__algorithm/includes.h
    libcxx/include/__algorithm/inplace_merge.h
    libcxx/include/__algorithm/is_heap.h
    libcxx/include/__algorithm/is_heap_until.h
    libcxx/include/__algorithm/is_partitioned.h
    libcxx/include/__algorithm/is_permutation.h
    libcxx/include/__algorithm/is_sorted.h
    libcxx/include/__algorithm/is_sorted_until.h
    libcxx/include/__algorithm/iter_swap.h
    libcxx/include/__algorithm/iterator_operations.h
    libcxx/include/__algorithm/lexicographical_compare.h
    libcxx/include/__algorithm/lower_bound.h
    libcxx/include/__algorithm/make_heap.h
    libcxx/include/__algorithm/make_projected.h
    libcxx/include/__algorithm/max.h
    libcxx/include/__algorithm/max_element.h
    libcxx/include/__algorithm/merge.h
    libcxx/include/__algorithm/min.h
    libcxx/include/__algorithm/min_element.h
    libcxx/include/__algorithm/min_max_result.h
    libcxx/include/__algorithm/minmax.h
    libcxx/include/__algorithm/minmax_element.h
    libcxx/include/__algorithm/mismatch.h
    libcxx/include/__algorithm/move.h
    libcxx/include/__algorithm/move_backward.h
    libcxx/include/__algorithm/next_permutation.h
    libcxx/include/__algorithm/none_of.h
    libcxx/include/__algorithm/nth_element.h
    libcxx/include/__algorithm/partial_sort.h
    libcxx/include/__algorithm/partial_sort_copy.h
    libcxx/include/__algorithm/partition.h
    libcxx/include/__algorithm/partition_copy.h
    libcxx/include/__algorithm/partition_point.h
    libcxx/include/__algorithm/pop_heap.h
    libcxx/include/__algorithm/prev_permutation.h
    libcxx/include/__algorithm/push_heap.h
    libcxx/include/__algorithm/ranges_adjacent_find.h
    libcxx/include/__algorithm/ranges_all_of.h
    libcxx/include/__algorithm/ranges_any_of.h
    libcxx/include/__algorithm/ranges_binary_search.h
    libcxx/include/__algorithm/ranges_clamp.h
    libcxx/include/__algorithm/ranges_copy.h
    libcxx/include/__algorithm/ranges_copy_backward.h
    libcxx/include/__algorithm/ranges_copy_if.h
    libcxx/include/__algorithm/ranges_copy_n.h
    libcxx/include/__algorithm/ranges_count.h
    libcxx/include/__algorithm/ranges_count_if.h
    libcxx/include/__algorithm/ranges_equal.h
    libcxx/include/__algorithm/ranges_equal_range.h
    libcxx/include/__algorithm/ranges_fill.h
    libcxx/include/__algorithm/ranges_fill_n.h
    libcxx/include/__algorithm/ranges_find.h
    libcxx/include/__algorithm/ranges_find_end.h
    libcxx/include/__algorithm/ranges_find_first_of.h
    libcxx/include/__algorithm/ranges_find_if.h
    libcxx/include/__algorithm/ranges_find_if_not.h
    libcxx/include/__algorithm/ranges_for_each.h
    libcxx/include/__algorithm/ranges_for_each_n.h
    libcxx/include/__algorithm/ranges_generate.h
    libcxx/include/__algorithm/ranges_generate_n.h
    libcxx/include/__algorithm/ranges_includes.h
    libcxx/include/__algorithm/ranges_inplace_merge.h
    libcxx/include/__algorithm/ranges_is_heap.h
    libcxx/include/__algorithm/ranges_is_heap_until.h
    libcxx/include/__algorithm/ranges_is_partitioned.h
    libcxx/include/__algorithm/ranges_is_permutation.h
    libcxx/include/__algorithm/ranges_is_sorted.h
    libcxx/include/__algorithm/ranges_is_sorted_until.h
    libcxx/include/__algorithm/ranges_iterator_concept.h
    libcxx/include/__algorithm/ranges_lexicographical_compare.h
    libcxx/include/__algorithm/ranges_lower_bound.h
    libcxx/include/__algorithm/ranges_make_heap.h
    libcxx/include/__algorithm/ranges_max.h
    libcxx/include/__algorithm/ranges_max_element.h
    libcxx/include/__algorithm/ranges_merge.h
    libcxx/include/__algorithm/ranges_min.h
    libcxx/include/__algorithm/ranges_min_element.h
    libcxx/include/__algorithm/ranges_minmax.h
    libcxx/include/__algorithm/ranges_minmax_element.h
    libcxx/include/__algorithm/ranges_mismatch.h
    libcxx/include/__algorithm/ranges_move.h
    libcxx/include/__algorithm/ranges_move_backward.h
    libcxx/include/__algorithm/ranges_next_permutation.h
    libcxx/include/__algorithm/ranges_none_of.h
    libcxx/include/__algorithm/ranges_nth_element.h
    libcxx/include/__algorithm/ranges_partial_sort.h
    libcxx/include/__algorithm/ranges_partial_sort_copy.h
    libcxx/include/__algorithm/ranges_partition.h
    libcxx/include/__algorithm/ranges_partition_copy.h
    libcxx/include/__algorithm/ranges_partition_point.h
    libcxx/include/__algorithm/ranges_pop_heap.h
    libcxx/include/__algorithm/ranges_prev_permutation.h
    libcxx/include/__algorithm/ranges_push_heap.h
    libcxx/include/__algorithm/ranges_remove.h
    libcxx/include/__algorithm/ranges_remove_copy.h
    libcxx/include/__algorithm/ranges_remove_copy_if.h
    libcxx/include/__algorithm/ranges_remove_if.h
    libcxx/include/__algorithm/ranges_replace.h
    libcxx/include/__algorithm/ranges_replace_copy.h
    libcxx/include/__algorithm/ranges_replace_copy_if.h
    libcxx/include/__algorithm/ranges_replace_if.h
    libcxx/include/__algorithm/ranges_reverse.h
    libcxx/include/__algorithm/ranges_reverse_copy.h
    libcxx/include/__algorithm/ranges_rotate.h
    libcxx/include/__algorithm/ranges_rotate_copy.h
    libcxx/include/__algorithm/ranges_sample.h
    libcxx/include/__algorithm/ranges_search.h
    libcxx/include/__algorithm/ranges_search_n.h
    libcxx/include/__algorithm/ranges_set_difference.h
    libcxx/include/__algorithm/ranges_set_intersection.h
    libcxx/include/__algorithm/ranges_set_symmetric_difference.h
    libcxx/include/__algorithm/ranges_set_union.h
    libcxx/include/__algorithm/ranges_shuffle.h
    libcxx/include/__algorithm/ranges_sort.h
    libcxx/include/__algorithm/ranges_sort_heap.h
    libcxx/include/__algorithm/ranges_stable_partition.h
    libcxx/include/__algorithm/ranges_stable_sort.h
    libcxx/include/__algorithm/ranges_swap_ranges.h
    libcxx/include/__algorithm/ranges_transform.h
    libcxx/include/__algorithm/ranges_unique.h
    libcxx/include/__algorithm/ranges_unique_copy.h
    libcxx/include/__algorithm/ranges_upper_bound.h
    libcxx/include/__algorithm/remove.h
    libcxx/include/__algorithm/remove_copy.h
    libcxx/include/__algorithm/remove_copy_if.h
    libcxx/include/__algorithm/remove_if.h
    libcxx/include/__algorithm/replace.h
    libcxx/include/__algorithm/replace_copy.h
    libcxx/include/__algorithm/replace_copy_if.h
    libcxx/include/__algorithm/replace_if.h
    libcxx/include/__algorithm/reverse.h
    libcxx/include/__algorithm/reverse_copy.h
    libcxx/include/__algorithm/rotate.h
    libcxx/include/__algorithm/rotate_copy.h
    libcxx/include/__algorithm/sample.h
    libcxx/include/__algorithm/search.h
    libcxx/include/__algorithm/search_n.h
    libcxx/include/__algorithm/set_difference.h
    libcxx/include/__algorithm/set_intersection.h
    libcxx/include/__algorithm/set_symmetric_difference.h
    libcxx/include/__algorithm/set_union.h
    libcxx/include/__algorithm/shift_left.h
    libcxx/include/__algorithm/shift_right.h
    libcxx/include/__algorithm/shuffle.h
    libcxx/include/__algorithm/sift_down.h
    libcxx/include/__algorithm/sort.h
    libcxx/include/__algorithm/sort_heap.h
    libcxx/include/__algorithm/stable_partition.h
    libcxx/include/__algorithm/stable_sort.h
    libcxx/include/__algorithm/swap_ranges.h
    libcxx/include/__algorithm/transform.h
    libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h
    libcxx/include/__algorithm/unique.h
    libcxx/include/__algorithm/unique_copy.h
    libcxx/include/__algorithm/unwrap_iter.h
    libcxx/include/__algorithm/unwrap_range.h
    libcxx/include/__algorithm/upper_bound.h
    libcxx/include/__assert
    libcxx/include/__availability
    libcxx/include/__bit/bit_cast.h
    libcxx/include/__bit/byteswap.h
    libcxx/include/__bit_reference
    libcxx/include/__bits
    libcxx/include/__bsd_locale_defaults.h
    libcxx/include/__bsd_locale_fallbacks.h
    libcxx/include/__charconv/chars_format.h
    libcxx/include/__charconv/from_chars_result.h
    libcxx/include/__charconv/tables.h
    libcxx/include/__charconv/to_chars_base_10.h
    libcxx/include/__charconv/to_chars_result.h
    libcxx/include/__chrono/calendar.h
    libcxx/include/__chrono/convert_to_timespec.h
    libcxx/include/__chrono/day.h
    libcxx/include/__chrono/duration.h
    libcxx/include/__chrono/file_clock.h
    libcxx/include/__chrono/hh_mm_ss.h
    libcxx/include/__chrono/high_resolution_clock.h
    libcxx/include/__chrono/literals.h
    libcxx/include/__chrono/month.h
    libcxx/include/__chrono/month_weekday.h
    libcxx/include/__chrono/monthday.h
    libcxx/include/__chrono/steady_clock.h
    libcxx/include/__chrono/system_clock.h
    libcxx/include/__chrono/time_point.h
    libcxx/include/__chrono/weekday.h
    libcxx/include/__chrono/year.h
    libcxx/include/__chrono/year_month.h
    libcxx/include/__chrono/year_month_day.h
    libcxx/include/__chrono/year_month_weekday.h
    libcxx/include/__compare/common_comparison_category.h
    libcxx/include/__compare/compare_partial_order_fallback.h
    libcxx/include/__compare/compare_strong_order_fallback.h
    libcxx/include/__compare/compare_three_way.h
    libcxx/include/__compare/compare_three_way_result.h
    libcxx/include/__compare/compare_weak_order_fallback.h
    libcxx/include/__compare/is_eq.h
    libcxx/include/__compare/ordering.h
    libcxx/include/__compare/partial_order.h
    libcxx/include/__compare/strong_order.h
    libcxx/include/__compare/synth_three_way.h
    libcxx/include/__compare/three_way_comparable.h
    libcxx/include/__compare/weak_order.h
    libcxx/include/__concepts/arithmetic.h
    libcxx/include/__concepts/assignable.h
    libcxx/include/__concepts/boolean_testable.h
    libcxx/include/__concepts/class_or_enum.h
    libcxx/include/__concepts/common_reference_with.h
    libcxx/include/__concepts/common_with.h
    libcxx/include/__concepts/constructible.h
    libcxx/include/__concepts/convertible_to.h
    libcxx/include/__concepts/copyable.h
    libcxx/include/__concepts/derived_from.h
    libcxx/include/__concepts/destructible.h
    libcxx/include/__concepts/different_from.h
    libcxx/include/__concepts/equality_comparable.h
    libcxx/include/__concepts/invocable.h
    libcxx/include/__concepts/movable.h
    libcxx/include/__concepts/predicate.h
    libcxx/include/__concepts/regular.h
    libcxx/include/__concepts/relation.h
    libcxx/include/__concepts/same_as.h
    libcxx/include/__concepts/semiregular.h
    libcxx/include/__concepts/swappable.h
    libcxx/include/__concepts/totally_ordered.h
    libcxx/include/__config
    libcxx/include/__config_site.in
    libcxx/include/__coroutine/coroutine_handle.h
    libcxx/include/__coroutine/coroutine_traits.h
    libcxx/include/__coroutine/noop_coroutine_handle.h
    libcxx/include/__coroutine/trivial_awaitables.h
    libcxx/include/__debug
    libcxx/include/__debug_utils/randomize_range.h
    libcxx/include/__errc
    libcxx/include/__filesystem/copy_options.h
    libcxx/include/__filesystem/directory_entry.h
    libcxx/include/__filesystem/directory_iterator.h
    libcxx/include/__filesystem/directory_options.h
    libcxx/include/__filesystem/file_status.h
    libcxx/include/__filesystem/file_time_type.h
    libcxx/include/__filesystem/file_type.h
    libcxx/include/__filesystem/filesystem_error.h
    libcxx/include/__filesystem/operations.h
    libcxx/include/__filesystem/path.h
    libcxx/include/__filesystem/path_iterator.h
    libcxx/include/__filesystem/perm_options.h
    libcxx/include/__filesystem/perms.h
    libcxx/include/__filesystem/recursive_directory_iterator.h
    libcxx/include/__filesystem/space_info.h
    libcxx/include/__filesystem/u8path.h
    libcxx/include/__format/buffer.h
    libcxx/include/__format/concepts.h
    libcxx/include/__format/enable_insertable.h
    libcxx/include/__format/extended_grapheme_cluster_table.h
    libcxx/include/__format/format_arg.h
    libcxx/include/__format/format_arg_store.h
    libcxx/include/__format/format_args.h
    libcxx/include/__format/format_context.h
    libcxx/include/__format/format_error.h
    libcxx/include/__format/format_fwd.h
    libcxx/include/__format/format_parse_context.h
    libcxx/include/__format/format_string.h
    libcxx/include/__format/format_to_n_result.h
    libcxx/include/__format/formatter.h
    libcxx/include/__format/formatter_bool.h
    libcxx/include/__format/formatter_char.h
    libcxx/include/__format/formatter_floating_point.h
    libcxx/include/__format/formatter_integer.h
    libcxx/include/__format/formatter_integral.h
    libcxx/include/__format/formatter_output.h
    libcxx/include/__format/formatter_pointer.h
    libcxx/include/__format/formatter_string.h
    libcxx/include/__format/parser_std_format_spec.h
    libcxx/include/__format/unicode.h
    libcxx/include/__functional/binary_function.h
    libcxx/include/__functional/binary_negate.h
    libcxx/include/__functional/bind.h
    libcxx/include/__functional/bind_back.h
    libcxx/include/__functional/bind_front.h
    libcxx/include/__functional/binder1st.h
    libcxx/include/__functional/binder2nd.h
    libcxx/include/__functional/boyer_moore_searcher.h
    libcxx/include/__functional/compose.h
    libcxx/include/__functional/default_searcher.h
    libcxx/include/__functional/function.h
    libcxx/include/__functional/hash.h
    libcxx/include/__functional/identity.h
    libcxx/include/__functional/invoke.h
    libcxx/include/__functional/is_transparent.h
    libcxx/include/__functional/mem_fn.h
    libcxx/include/__functional/mem_fun_ref.h
    libcxx/include/__functional/not_fn.h
    libcxx/include/__functional/operations.h
    libcxx/include/__functional/perfect_forward.h
    libcxx/include/__functional/pointer_to_binary_function.h
    libcxx/include/__functional/pointer_to_unary_function.h
    libcxx/include/__functional/ranges_operations.h
    libcxx/include/__functional/reference_wrapper.h
    libcxx/include/__functional/unary_function.h
    libcxx/include/__functional/unary_negate.h
    libcxx/include/__functional/unwrap_ref.h
    libcxx/include/__functional/weak_result_type.h
    libcxx/include/__fwd/span.h
    libcxx/include/__fwd/string_view.h
    libcxx/include/__hash_table
    libcxx/include/__ios/fpos.h
    libcxx/include/__iterator/access.h
    libcxx/include/__iterator/advance.h
    libcxx/include/__iterator/back_insert_iterator.h
    libcxx/include/__iterator/bounded_iter.h
    libcxx/include/__iterator/common_iterator.h
    libcxx/include/__iterator/concepts.h
    libcxx/include/__iterator/counted_iterator.h
    libcxx/include/__iterator/data.h
    libcxx/include/__iterator/default_sentinel.h
    libcxx/include/__iterator/distance.h
    libcxx/include/__iterator/empty.h
    libcxx/include/__iterator/erase_if_container.h
    libcxx/include/__iterator/front_insert_iterator.h
    libcxx/include/__iterator/incrementable_traits.h
    libcxx/include/__iterator/indirectly_comparable.h
    libcxx/include/__iterator/insert_iterator.h
    libcxx/include/__iterator/istream_iterator.h
    libcxx/include/__iterator/istreambuf_iterator.h
    libcxx/include/__iterator/iter_move.h
    libcxx/include/__iterator/iter_swap.h
    libcxx/include/__iterator/iterator.h
    libcxx/include/__iterator/iterator_traits.h
    libcxx/include/__iterator/mergeable.h
    libcxx/include/__iterator/move_iterator.h
    libcxx/include/__iterator/move_sentinel.h
    libcxx/include/__iterator/next.h
    libcxx/include/__iterator/ostream_iterator.h
    libcxx/include/__iterator/ostreambuf_iterator.h
    libcxx/include/__iterator/permutable.h
    libcxx/include/__iterator/prev.h
    libcxx/include/__iterator/projected.h
    libcxx/include/__iterator/readable_traits.h
    libcxx/include/__iterator/reverse_access.h
    libcxx/include/__iterator/reverse_iterator.h
    libcxx/include/__iterator/size.h
    libcxx/include/__iterator/sortable.h
    libcxx/include/__iterator/unreachable_sentinel.h
    libcxx/include/__iterator/wrap_iter.h
    libcxx/include/__locale
    libcxx/include/__mbstate_t.h
    libcxx/include/__memory/addressof.h
    libcxx/include/__memory/allocate_at_least.h
    libcxx/include/__memory/allocation_guard.h
    libcxx/include/__memory/allocator.h
    libcxx/include/__memory/allocator_arg_t.h
    libcxx/include/__memory/allocator_traits.h
    libcxx/include/__memory/assume_aligned.h
    libcxx/include/__memory/auto_ptr.h
    libcxx/include/__memory/compressed_pair.h
    libcxx/include/__memory/concepts.h
    libcxx/include/__memory/construct_at.h
    libcxx/include/__memory/pointer_traits.h
    libcxx/include/__memory/ranges_construct_at.h
    libcxx/include/__memory/ranges_uninitialized_algorithms.h
    libcxx/include/__memory/raw_storage_iterator.h
    libcxx/include/__memory/shared_ptr.h
    libcxx/include/__memory/swap_allocator.h
    libcxx/include/__memory/temporary_buffer.h
    libcxx/include/__memory/uninitialized_algorithms.h
    libcxx/include/__memory/unique_ptr.h
    libcxx/include/__memory/uses_allocator.h
    libcxx/include/__memory/voidify.h
    libcxx/include/__mutex_base
    libcxx/include/__node_handle
    libcxx/include/__numeric/accumulate.h
    libcxx/include/__numeric/adjacent_difference.h
    libcxx/include/__numeric/exclusive_scan.h
    libcxx/include/__numeric/gcd_lcm.h
    libcxx/include/__numeric/inclusive_scan.h
    libcxx/include/__numeric/inner_product.h
    libcxx/include/__numeric/iota.h
    libcxx/include/__numeric/midpoint.h
    libcxx/include/__numeric/partial_sum.h
    libcxx/include/__numeric/reduce.h
    libcxx/include/__numeric/transform_exclusive_scan.h
    libcxx/include/__numeric/transform_inclusive_scan.h
    libcxx/include/__numeric/transform_reduce.h
    libcxx/include/__random/bernoulli_distribution.h
    libcxx/include/__random/binomial_distribution.h
    libcxx/include/__random/cauchy_distribution.h
    libcxx/include/__random/chi_squared_distribution.h
    libcxx/include/__random/clamp_to_integral.h
    libcxx/include/__random/default_random_engine.h
    libcxx/include/__random/discard_block_engine.h
    libcxx/include/__random/discrete_distribution.h
    libcxx/include/__random/exponential_distribution.h
    libcxx/include/__random/extreme_value_distribution.h
    libcxx/include/__random/fisher_f_distribution.h
    libcxx/include/__random/gamma_distribution.h
    libcxx/include/__random/generate_canonical.h
    libcxx/include/__random/geometric_distribution.h
    libcxx/include/__random/independent_bits_engine.h
    libcxx/include/__random/is_seed_sequence.h
    libcxx/include/__random/is_valid.h
    libcxx/include/__random/knuth_b.h
    libcxx/include/__random/linear_congruential_engine.h
    libcxx/include/__random/log2.h
    libcxx/include/__random/lognormal_distribution.h
    libcxx/include/__random/mersenne_twister_engine.h
    libcxx/include/__random/negative_binomial_distribution.h
    libcxx/include/__random/normal_distribution.h
    libcxx/include/__random/piecewise_constant_distribution.h
    libcxx/include/__random/piecewise_linear_distribution.h
    libcxx/include/__random/poisson_distribution.h
    libcxx/include/__random/random_device.h
    libcxx/include/__random/ranlux.h
    libcxx/include/__random/seed_seq.h
    libcxx/include/__random/shuffle_order_engine.h
    libcxx/include/__random/student_t_distribution.h
    libcxx/include/__random/subtract_with_carry_engine.h
    libcxx/include/__random/uniform_int_distribution.h
    libcxx/include/__random/uniform_random_bit_generator.h
    libcxx/include/__random/uniform_real_distribution.h
    libcxx/include/__random/weibull_distribution.h
    libcxx/include/__ranges/access.h
    libcxx/include/__ranges/all.h
    libcxx/include/__ranges/common_view.h
    libcxx/include/__ranges/concepts.h
    libcxx/include/__ranges/copyable_box.h
    libcxx/include/__ranges/counted.h
    libcxx/include/__ranges/dangling.h
    libcxx/include/__ranges/data.h
    libcxx/include/__ranges/drop_view.h
    libcxx/include/__ranges/empty.h
    libcxx/include/__ranges/empty_view.h
    libcxx/include/__ranges/enable_borrowed_range.h
    libcxx/include/__ranges/enable_view.h
    libcxx/include/__ranges/filter_view.h
    libcxx/include/__ranges/iota_view.h
    libcxx/include/__ranges/join_view.h
    libcxx/include/__ranges/lazy_split_view.h
    libcxx/include/__ranges/non_propagating_cache.h
    libcxx/include/__ranges/owning_view.h
    libcxx/include/__ranges/range_adaptor.h
    libcxx/include/__ranges/rbegin.h
    libcxx/include/__ranges/ref_view.h
    libcxx/include/__ranges/rend.h
    libcxx/include/__ranges/reverse_view.h
    libcxx/include/__ranges/single_view.h
    libcxx/include/__ranges/size.h
    libcxx/include/__ranges/subrange.h
    libcxx/include/__ranges/take_view.h
    libcxx/include/__ranges/transform_view.h
    libcxx/include/__ranges/view_interface.h
    libcxx/include/__ranges/views.h
    libcxx/include/__ranges/zip_view.h
    libcxx/include/__split_buffer
    libcxx/include/__std_stream
    libcxx/include/__string/char_traits.h
    libcxx/include/__string/extern_template_lists.h
    libcxx/include/__support/android/locale_bionic.h
    libcxx/include/__support/fuchsia/xlocale.h
    libcxx/include/__support/ibm/gettod_zos.h
    libcxx/include/__support/ibm/locale_mgmt_zos.h
    libcxx/include/__support/ibm/nanosleep.h
    libcxx/include/__support/ibm/xlocale.h
    libcxx/include/__support/musl/xlocale.h
    libcxx/include/__support/newlib/xlocale.h
    libcxx/include/__support/openbsd/xlocale.h
    libcxx/include/__support/solaris/xlocale.h
    libcxx/include/__support/win32/limits_msvc_win32.h
    libcxx/include/__support/win32/locale_win32.h
    libcxx/include/__support/xlocale/__nop_locale_mgmt.h
    libcxx/include/__support/xlocale/__posix_l_fallback.h
    libcxx/include/__support/xlocale/__strtonum_fallback.h
    libcxx/include/__thread/poll_with_backoff.h
    libcxx/include/__thread/timed_backoff_policy.h
    libcxx/include/__threading_support
    libcxx/include/__tree
    libcxx/include/__tuple
    libcxx/include/__type_traits/add_const.h
    libcxx/include/__type_traits/add_cv.h
    libcxx/include/__type_traits/add_lvalue_reference.h
    libcxx/include/__type_traits/add_pointer.h
    libcxx/include/__type_traits/add_rvalue_reference.h
    libcxx/include/__type_traits/add_volatile.h
    libcxx/include/__type_traits/aligned_storage.h
    libcxx/include/__type_traits/aligned_union.h
    libcxx/include/__type_traits/alignment_of.h
    libcxx/include/__type_traits/apply_cv.h
    libcxx/include/__type_traits/common_reference.h
    libcxx/include/__type_traits/common_type.h
    libcxx/include/__type_traits/conditional.h
    libcxx/include/__type_traits/conjunction.h
    libcxx/include/__type_traits/copy_cv.h
    libcxx/include/__type_traits/copy_cvref.h
    libcxx/include/__type_traits/decay.h
    libcxx/include/__type_traits/disjunction.h
    libcxx/include/__type_traits/enable_if.h
    libcxx/include/__type_traits/extent.h
    libcxx/include/__type_traits/has_unique_object_representation.h
    libcxx/include/__type_traits/has_virtual_destructor.h
    libcxx/include/__type_traits/integral_constant.h
    libcxx/include/__type_traits/is_abstract.h
    libcxx/include/__type_traits/is_aggregate.h
    libcxx/include/__type_traits/is_arithmetic.h
    libcxx/include/__type_traits/is_array.h
    libcxx/include/__type_traits/is_assignable.h
    libcxx/include/__type_traits/is_base_of.h
    libcxx/include/__type_traits/is_bounded_array.h
    libcxx/include/__type_traits/is_callable.h
    libcxx/include/__type_traits/is_class.h
    libcxx/include/__type_traits/is_compound.h
    libcxx/include/__type_traits/is_const.h
    libcxx/include/__type_traits/is_constant_evaluated.h
    libcxx/include/__type_traits/is_constructible.h
    libcxx/include/__type_traits/is_convertible.h
    libcxx/include/__type_traits/is_copy_assignable.h
    libcxx/include/__type_traits/is_copy_constructible.h
    libcxx/include/__type_traits/is_core_convertible.h
    libcxx/include/__type_traits/is_default_constructible.h
    libcxx/include/__type_traits/is_destructible.h
    libcxx/include/__type_traits/is_empty.h
    libcxx/include/__type_traits/is_enum.h
    libcxx/include/__type_traits/is_final.h
    libcxx/include/__type_traits/is_floating_point.h
    libcxx/include/__type_traits/is_function.h
    libcxx/include/__type_traits/is_fundamental.h
    libcxx/include/__type_traits/is_integral.h
    libcxx/include/__type_traits/is_literal_type.h
    libcxx/include/__type_traits/is_member_function_pointer.h
    libcxx/include/__type_traits/is_member_object_pointer.h
    libcxx/include/__type_traits/is_member_pointer.h
    libcxx/include/__type_traits/is_move_assignable.h
    libcxx/include/__type_traits/is_move_constructible.h
    libcxx/include/__type_traits/is_nothrow_assignable.h
    libcxx/include/__type_traits/is_nothrow_constructible.h
    libcxx/include/__type_traits/is_nothrow_convertible.h
    libcxx/include/__type_traits/is_nothrow_copy_assignable.h
    libcxx/include/__type_traits/is_nothrow_copy_constructible.h
    libcxx/include/__type_traits/is_nothrow_default_constructible.h
    libcxx/include/__type_traits/is_nothrow_destructible.h
    libcxx/include/__type_traits/is_nothrow_move_assignable.h
    libcxx/include/__type_traits/is_nothrow_move_constructible.h
    libcxx/include/__type_traits/is_null_pointer.h
    libcxx/include/__type_traits/is_object.h
    libcxx/include/__type_traits/is_pod.h
    libcxx/include/__type_traits/is_pointer.h
    libcxx/include/__type_traits/is_polymorphic.h
    libcxx/include/__type_traits/is_primary_template.h
    libcxx/include/__type_traits/is_reference.h
    libcxx/include/__type_traits/is_reference_wrapper.h
    libcxx/include/__type_traits/is_referenceable.h
    libcxx/include/__type_traits/is_same.h
    libcxx/include/__type_traits/is_scalar.h
    libcxx/include/__type_traits/is_scoped_enum.h
    libcxx/include/__type_traits/is_signed.h
    libcxx/include/__type_traits/is_signed_integer.h
    libcxx/include/__type_traits/is_standard_layout.h
    libcxx/include/__type_traits/is_trivial.h
    libcxx/include/__type_traits/is_trivially_assignable.h
    libcxx/include/__type_traits/is_trivially_constructible.h
    libcxx/include/__type_traits/is_trivially_copy_assignable.h
    libcxx/include/__type_traits/is_trivially_copy_constructible.h
    libcxx/include/__type_traits/is_trivially_copyable.h
    libcxx/include/__type_traits/is_trivially_default_constructible.h
    libcxx/include/__type_traits/is_trivially_destructible.h
    libcxx/include/__type_traits/is_trivially_move_assignable.h
    libcxx/include/__type_traits/is_trivially_move_constructible.h
    libcxx/include/__type_traits/is_unbounded_array.h
    libcxx/include/__type_traits/is_union.h
    libcxx/include/__type_traits/is_unsigned.h
    libcxx/include/__type_traits/is_unsigned_integer.h
    libcxx/include/__type_traits/is_valid_expansion.h
    libcxx/include/__type_traits/is_void.h
    libcxx/include/__type_traits/is_volatile.h
    libcxx/include/__type_traits/lazy.h
    libcxx/include/__type_traits/make_32_64_or_128_bit.h
    libcxx/include/__type_traits/make_signed.h
    libcxx/include/__type_traits/make_unsigned.h
    libcxx/include/__type_traits/nat.h
    libcxx/include/__type_traits/negation.h
    libcxx/include/__type_traits/promote.h
    libcxx/include/__type_traits/rank.h
    libcxx/include/__type_traits/remove_all_extents.h
    libcxx/include/__type_traits/remove_const.h
    libcxx/include/__type_traits/remove_cv.h
    libcxx/include/__type_traits/remove_cvref.h
    libcxx/include/__type_traits/remove_extent.h
    libcxx/include/__type_traits/remove_pointer.h
    libcxx/include/__type_traits/remove_reference.h
    libcxx/include/__type_traits/remove_volatile.h
    libcxx/include/__type_traits/type_identity.h
    libcxx/include/__type_traits/type_list.h
    libcxx/include/__type_traits/underlying_type.h
    libcxx/include/__type_traits/void_t.h
    libcxx/include/__utility/as_const.h
    libcxx/include/__utility/auto_cast.h
    libcxx/include/__utility/cmp.h
    libcxx/include/__utility/declval.h
    libcxx/include/__utility/exchange.h
    libcxx/include/__utility/forward.h
    libcxx/include/__utility/in_place.h
    libcxx/include/__utility/integer_sequence.h
    libcxx/include/__utility/move.h
    libcxx/include/__utility/pair.h
    libcxx/include/__utility/piecewise_construct.h
    libcxx/include/__utility/priority_tag.h
    libcxx/include/__utility/rel_ops.h
    libcxx/include/__utility/swap.h
    libcxx/include/__utility/to_underlying.h
    libcxx/include/__utility/transaction.h
    libcxx/include/__utility/unreachable.h
    libcxx/include/__variant/monostate.h
    libcxx/include/__verbose_abort
    libcxx/include/algorithm
    libcxx/include/any
    libcxx/include/array
    libcxx/include/atomic
    libcxx/include/barrier
    libcxx/include/bit
    libcxx/include/bitset
    libcxx/include/cassert
    libcxx/include/ccomplex
    libcxx/include/cctype
    libcxx/include/cerrno
    libcxx/include/cfenv
    libcxx/include/cfloat
    libcxx/include/charconv
    libcxx/include/chrono
    libcxx/include/cinttypes
    libcxx/include/ciso646
    libcxx/include/climits
    libcxx/include/clocale
    libcxx/include/cmath
    libcxx/include/codecvt
    libcxx/include/compare
    libcxx/include/complex
    libcxx/include/complex.h
    libcxx/include/concepts
    libcxx/include/condition_variable
    libcxx/include/coroutine
    libcxx/include/csetjmp
    libcxx/include/csignal
    libcxx/include/cstdarg
    libcxx/include/cstdbool
    libcxx/include/cstddef
    libcxx/include/cstdint
    libcxx/include/cstdio
    libcxx/include/cstdlib
    libcxx/include/cstring
    libcxx/include/ctgmath
    libcxx/include/ctime
    libcxx/include/ctype.h
    libcxx/include/cuchar
    libcxx/include/cwchar
    libcxx/include/cwctype
    libcxx/include/deque
    libcxx/include/errno.h
    libcxx/include/exception
    libcxx/include/execution
    libcxx/include/experimental/__config
    libcxx/include/experimental/__memory
    libcxx/include/experimental/algorithm
    libcxx/include/experimental/coroutine
    libcxx/include/experimental/deque
    libcxx/include/experimental/forward_list
    libcxx/include/experimental/functional
    libcxx/include/experimental/iterator
    libcxx/include/experimental/list
    libcxx/include/experimental/map
    libcxx/include/experimental/memory_resource
    libcxx/include/experimental/propagate_const
    libcxx/include/experimental/regex
    libcxx/include/experimental/set
    libcxx/include/experimental/simd
    libcxx/include/experimental/string
    libcxx/include/experimental/type_traits
    libcxx/include/experimental/unordered_map
    libcxx/include/experimental/unordered_set
    libcxx/include/experimental/utility
    libcxx/include/experimental/vector
    libcxx/include/ext/__hash
    libcxx/include/ext/hash_map
    libcxx/include/ext/hash_set
    libcxx/include/fenv.h
    libcxx/include/filesystem
    libcxx/include/float.h
    libcxx/include/format
    libcxx/include/forward_list
    libcxx/include/fstream
    libcxx/include/functional
    libcxx/include/future
    libcxx/include/initializer_list
    libcxx/include/inttypes.h
    libcxx/include/iomanip
    libcxx/include/ios
    libcxx/include/iosfwd
    libcxx/include/iostream
    libcxx/include/istream
    libcxx/include/iterator
    libcxx/include/latch
    libcxx/include/limits
    libcxx/include/limits.h
    libcxx/include/list
    libcxx/include/locale
    libcxx/include/locale.h
    libcxx/include/map
    libcxx/include/math.h
    libcxx/include/memory
    libcxx/include/mutex
    libcxx/include/new
    libcxx/include/numbers
    libcxx/include/numeric
    libcxx/include/optional
    libcxx/include/ostream
    libcxx/include/queue
    libcxx/include/random
    libcxx/include/ranges
    libcxx/include/ratio
    libcxx/include/regex
    libcxx/include/scoped_allocator
    libcxx/include/semaphore
    libcxx/include/set
    libcxx/include/setjmp.h
    libcxx/include/shared_mutex
    libcxx/include/span
    libcxx/include/sstream
    libcxx/include/stack
    libcxx/include/stdatomic.h
    libcxx/include/stdbool.h
    libcxx/include/stddef.h
    libcxx/include/stdexcept
    libcxx/include/stdint.h
    libcxx/include/stdio.h
    libcxx/include/stdlib.h
    libcxx/include/streambuf
    libcxx/include/string
    libcxx/include/string.h
    libcxx/include/string_view
    libcxx/include/strstream
    libcxx/include/system_error
    libcxx/include/tgmath.h
    libcxx/include/thread
    libcxx/include/tuple
    libcxx/include/type_traits
    libcxx/include/typeindex
    libcxx/include/typeinfo
    libcxx/include/uchar.h
    libcxx/include/unordered_map
    libcxx/include/unordered_set
    libcxx/include/utility
    libcxx/include/valarray
    libcxx/include/variant
    libcxx/include/vector
    libcxx/include/version
    libcxx/include/wchar.h
    libcxx/include/wctype.h
    libcxx/lib/abi/CHANGELOG.TXT
    libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
    libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
    libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
    libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
    libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist
    libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist
    libcxx/src/CMakeLists.txt
    libcxx/src/algorithm.cpp
    libcxx/src/any.cpp
    libcxx/src/atomic.cpp
    libcxx/src/barrier.cpp
    libcxx/src/bind.cpp
    libcxx/src/charconv.cpp
    libcxx/src/chrono.cpp
    libcxx/src/chrono_system_time_init.h
    libcxx/src/condition_variable.cpp
    libcxx/src/condition_variable_destructor.cpp
    libcxx/src/debug.cpp
    libcxx/src/exception.cpp
    libcxx/src/experimental/memory_resource.cpp
    libcxx/src/experimental/memory_resource_init_helper.h
    libcxx/src/filesystem/directory_iterator.cpp
    libcxx/src/filesystem/filesystem_common.h
    libcxx/src/filesystem/int128_builtins.cpp
    libcxx/src/filesystem/operations.cpp
    libcxx/src/filesystem/posix_compat.h
    libcxx/src/format.cpp
    libcxx/src/functional.cpp
    libcxx/src/future.cpp
    libcxx/src/hash.cpp
    libcxx/src/include/apple_availability.h
    libcxx/src/include/atomic_support.h
    libcxx/src/include/config_elast.h
    libcxx/src/include/refstring.h
    libcxx/src/include/ryu/common.h
    libcxx/src/include/ryu/d2fixed.h
    libcxx/src/include/ryu/d2fixed_full_table.h
    libcxx/src/include/ryu/d2s.h
    libcxx/src/include/ryu/d2s_full_table.h
    libcxx/src/include/ryu/d2s_intrinsics.h
    libcxx/src/include/ryu/digit_table.h
    libcxx/src/include/ryu/f2s.h
    libcxx/src/include/ryu/ryu.h
    libcxx/src/include/sso_allocator.h
    libcxx/src/include/to_chars_floating_point.h
    libcxx/src/ios.cpp
    libcxx/src/ios.instantiations.cpp
    libcxx/src/iostream.cpp
    libcxx/src/iostream_init.h
    libcxx/src/legacy_debug_handler.cpp
    libcxx/src/legacy_pointer_safety.cpp
    libcxx/src/locale.cpp
    libcxx/src/memory.cpp
    libcxx/src/mutex.cpp
    libcxx/src/mutex_destructor.cpp
    libcxx/src/new.cpp
    libcxx/src/optional.cpp
    libcxx/src/random.cpp
    libcxx/src/random_shuffle.cpp
    libcxx/src/regex.cpp
    libcxx/src/ryu/d2fixed.cpp
    libcxx/src/ryu/d2s.cpp
    libcxx/src/ryu/f2s.cpp
    libcxx/src/shared_mutex.cpp
    libcxx/src/stdexcept.cpp
    libcxx/src/string.cpp
    libcxx/src/strstream.cpp
    libcxx/src/support/ibm/mbsnrtowcs.cpp
    libcxx/src/support/ibm/wcsnrtombs.cpp
    libcxx/src/support/ibm/xlocale_zos.cpp
    libcxx/src/support/runtime/exception_fallback.ipp
    libcxx/src/support/runtime/exception_libcxxabi.ipp
    libcxx/src/support/runtime/exception_msvc.ipp
    libcxx/src/support/runtime/exception_pointer_cxxabi.ipp
    libcxx/src/support/runtime/exception_pointer_glibcxx.ipp
    libcxx/src/support/runtime/exception_pointer_msvc.ipp
    libcxx/src/support/runtime/exception_pointer_unimplemented.ipp
    libcxx/src/support/runtime/new_handler_fallback.ipp
    libcxx/src/support/runtime/stdexcept_default.ipp
    libcxx/src/support/runtime/stdexcept_vcruntime.ipp
    libcxx/src/support/win32/locale_win32.cpp
    libcxx/src/support/win32/support.cpp
    libcxx/src/support/win32/thread_win32.cpp
    libcxx/src/system_error.cpp
    libcxx/src/thread.cpp
    libcxx/src/typeinfo.cpp
    libcxx/src/utility.cpp
    libcxx/src/valarray.cpp
    libcxx/src/vector.cpp
    libcxx/src/verbose_abort.cpp
    libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp
    libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.verify.cpp
    libcxx/test/libcxx/algorithms/alg.modifying.operations/copy.pass.cpp
    libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/make.heap/complexity.pass.cpp
    libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp
    libcxx/test/libcxx/algorithms/alg.sorting/assert.min.max.pass.cpp
    libcxx/test/libcxx/algorithms/debug_less.inconsistent.pass.cpp
    libcxx/test/libcxx/algorithms/debug_less.pass.cpp
    libcxx/test/libcxx/algorithms/nth_element_stability.pass.cpp
    libcxx/test/libcxx/algorithms/partial_sort_stability.pass.cpp
    libcxx/test/libcxx/algorithms/ranges_robust_against_copying_comparators.pass.cpp
    libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp
    libcxx/test/libcxx/algorithms/sort_stability.pass.cpp
    libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_iterator.compile.pass.cpp
    libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp
    libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_iterator.compile.pass.cpp
    libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_range.compile.pass.cpp
    libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_sentinel_for.compile.pass.cpp
    libcxx/test/libcxx/algorithms/version.pass.cpp
    libcxx/test/libcxx/assertions/assertions_disabled.pass.cpp
    libcxx/test/libcxx/assertions/customize_verbose_abort.backdeployment.pass.cpp
    libcxx/test/libcxx/assertions/customize_verbose_abort.pass.cpp
    libcxx/test/libcxx/assertions/debug_mode_compatibility.pass.cpp
    libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp
    libcxx/test/libcxx/assertions/headers_declare_verbose_abort.sh.cpp
    libcxx/test/libcxx/assertions/single_expression.sh.cpp
    libcxx/test/libcxx/atomics/version.pass.cpp
    libcxx/test/libcxx/clang_tidy.sh.cpp
    libcxx/test/libcxx/containers/associative/map/version.pass.cpp
    libcxx/test/libcxx/containers/associative/set/version.pass.cpp
    libcxx/test/libcxx/containers/container.adaptors/queue/version.pass.cpp
    libcxx/test/libcxx/containers/container.adaptors/stack/version.pass.cpp
    libcxx/test/libcxx/containers/sequences/array/array.zero/assert.back.pass.cpp
    libcxx/test/libcxx/containers/sequences/array/array.zero/assert.front.pass.cpp
    libcxx/test/libcxx/containers/sequences/array/array.zero/assert.subscript.pass.cpp
    libcxx/test/libcxx/containers/sequences/array/version.pass.cpp
    libcxx/test/libcxx/containers/sequences/deque/assert.pop_back.empty.pass.cpp
    libcxx/test/libcxx/containers/sequences/deque/incomplete.pass.cpp
    libcxx/test/libcxx/containers/sequences/deque/version.pass.cpp
    libcxx/test/libcxx/containers/sequences/forwardlist/version.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.cons/debug.copy.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.erase_iter.end.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.pop_back.empty.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.emplace.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.erase.iter.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.erase.iter_iter.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_iter_iter.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_rvalue.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_size_value.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_value.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list_iter.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list_iter_iter.pass.cpp
    libcxx/test/libcxx/containers/sequences/list/version.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/assert.back.empty.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/assert.cback.empty.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/assert.cfront.empty.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/assert.cindex.oob.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/assert.front.empty.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/assert.index.oob.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/assert.pop_back.empty.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/debug.iterator.add.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/debug.iterator.compare.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/debug.iterator.decrement.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/debug.iterator.dereference.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/debug.iterator.increment.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/debug.iterator.index.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/debug.iterator.subtract.pass.cpp
    libcxx/test/libcxx/containers/sequences/vector/version.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/assert.bucket.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/assert.bucket_size.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/assert.max_load_factor.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/debug.insert.hint_const_lvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/debug.insert.hint_rvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.dereference.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.increment.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.dereference.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.increment.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/debug.swap.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/debug.erase.iter.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/debug.erase.iter_iter.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.map/version.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket_size.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/assert.max_load_factor.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/debug.insert.hint_const_lvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/debug.insert.hint_rvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.dereference.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.increment.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.dereference.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.increment.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/debug.swap.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/debug.erase.iter.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/debug.erase.iter_iter.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket_size.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/assert.max_load_factor.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/debug.erase.iter.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/debug.erase.iter_iter.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/debug.insert.hint_const_lvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.dereference.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.increment.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.dereference.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.increment.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.multiset/debug.swap.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/assert.bucket.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/assert.bucket_size.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/assert.max_load_factor.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/debug.erase.iter.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/debug.erase.iter_iter.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/debug.insert.hint_const_lvalue.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.dereference.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.increment.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.dereference.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.increment.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/debug.swap.pass.cpp
    libcxx/test/libcxx/containers/unord/unord.set/version.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/debug.iterator-indexing.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_sent.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_size.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.cons/assert.other_span.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.cons/assert.range.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.cons/range.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.cons/range.verify.cpp
    libcxx/test/libcxx/containers/views/views.span/span.elem/assert.back.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.elem/assert.front.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.elem/assert.op_idx.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.sub/assert.first.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.sub/assert.last.pass.cpp
    libcxx/test/libcxx/containers/views/views.span/span.sub/assert.subspan.pass.cpp
    libcxx/test/libcxx/debug/containers.multithread.pass.cpp
    libcxx/test/libcxx/debug/containers/associative_containers.pass.cpp
    libcxx/test/libcxx/debug/containers/sequence_container_iterators.pass.cpp
    libcxx/test/libcxx/debug/containers/string.pass.cpp
    libcxx/test/libcxx/debug/containers/unord_containers.pass.cpp
    libcxx/test/libcxx/debug/debug.assertions-enabled.compile.pass.cpp
    libcxx/test/libcxx/debug/debug.catch-legacy-macro.verify.cpp
    libcxx/test/libcxx/debug/extern-templates.sh.cpp
    libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp
    libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.verify.cpp
    libcxx/test/libcxx/depr/depr.c.headers/ciso646.pass.cpp
    libcxx/test/libcxx/depr/depr.c.headers/complex.h.pass.cpp
    libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp
    libcxx/test/libcxx/depr/depr.c.headers/fenv.pass.cpp
    libcxx/test/libcxx/depr/depr.c.headers/locale_h.pass.cpp
    libcxx/test/libcxx/depr/depr.c.headers/no_fgetpos_fsetpos.verify.cpp
    libcxx/test/libcxx/depr/depr.c.headers/tgmath_h.pass.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.cxx2a.pass.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.verify.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.pass.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.verify.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.verify.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/construct.cxx2a.pass.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/max_size.cxx2a.pass.cpp
    libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.cxx2a.pass.cpp
    libcxx/test/libcxx/depr/depr.func.adaptor.typedefs/typedefs.depr_in_cxx17.verify.cpp
    libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.verify.cpp
    libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
    libcxx/test/libcxx/depr/depr.str.strstreams/version.pass.cpp
    libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp
    libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp
    libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp
    libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp
    libcxx/test/libcxx/diagnostics/assertions/version_cassert.pass.cpp
    libcxx/test/libcxx/diagnostics/enable_nodiscard.verify.cpp
    libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.verify.cpp
    libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.verify.cpp
    libcxx/test/libcxx/diagnostics/errno/version_cerrno.pass.cpp
    libcxx/test/libcxx/diagnostics/nodiscard.pass.cpp
    libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp
    libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
    libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
    libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp
    libcxx/test/libcxx/diagnostics/std.exceptions/version.pass.cpp
    libcxx/test/libcxx/diagnostics/syserr/version.pass.cpp
    libcxx/test/libcxx/double_include.sh.cpp
    libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp
    libcxx/test/libcxx/experimental/algorithms/version.pass.cpp
    libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp
    libcxx/test/libcxx/experimental/language.support/support.coroutines/version.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/assert.deallocate.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/assert.deallocate.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_deque_libcpp_version.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_forward_list_libcpp_version.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_list_libcpp_version.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_map_libcpp_version.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_regex_libcpp_version.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_set_libcpp_version.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_string_libcpp_version.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_map_libcpp_version.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_set_libcpp_version.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_vector_libcpp_version.pass.cpp
    libcxx/test/libcxx/experimental/memory/memory.resource.synop/version.pass.cpp
    libcxx/test/libcxx/fuzzing/fuzz.h
    libcxx/test/libcxx/include_as_c.sh.cpp
    libcxx/test/libcxx/inclusions/algorithm.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/array.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/bitset.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/chrono.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/cinttypes.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/complex.h.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/coroutine.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/deque.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/filesystem.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/forward_list.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/ios.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/iostream.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/iterator.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/list.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/map.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/memory.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/optional.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/queue.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/random.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/ranges.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/regex.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/set.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/stack.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/string.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/string_view.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/system_error.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/tgmath.h.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/thread.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/tuple.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/typeindex.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/unordered_map.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/unordered_set.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/utility.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/valarray.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/variant.inclusions.compile.pass.cpp
    libcxx/test/libcxx/inclusions/vector.inclusions.compile.pass.cpp
    libcxx/test/libcxx/input.output/file.streams/c.files/version_ccstdio.pass.cpp
    libcxx/test/libcxx/input.output/file.streams/c.files/version_cinttypes.pass.cpp
    libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp
    libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp
    libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp
    libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp
    libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
    libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp
    libcxx/test/libcxx/input.output/file.streams/fstreams/version.pass.cpp
    libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp
    libcxx/test/libcxx/input.output/filesystems/version.pass.cpp
    libcxx/test/libcxx/input.output/iostream.format/input.streams/version.pass.cpp
    libcxx/test/libcxx/input.output/iostream.format/output.streams/version.pass.cpp
    libcxx/test/libcxx/input.output/iostream.format/std.manip/version.pass.cpp
    libcxx/test/libcxx/input.output/iostream.forward/version.pass.cpp
    libcxx/test/libcxx/input.output/iostream.objects/version.pass.cpp
    libcxx/test/libcxx/input.output/iostreams.base/version.pass.cpp
    libcxx/test/libcxx/input.output/stream.buffers/version.pass.cpp
    libcxx/test/libcxx/input.output/string.streams/version.pass.cpp
    libcxx/test/libcxx/iterators/assert.advance.pass.cpp
    libcxx/test/libcxx/iterators/assert.next.pass.cpp
    libcxx/test/libcxx/iterators/assert.prev.pass.cpp
    libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp
    libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_bidirectional_iterator.compile.pass.cpp
    libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_forward_iterator.compile.pass.cpp
    libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_input_iterator.compile.pass.cpp
    libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_iterator.compile.pass.cpp
    libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_random_access_iterator.compile.pass.cpp
    libcxx/test/libcxx/iterators/unwrap_iter.pass.cpp
    libcxx/test/libcxx/iterators/version.pass.cpp
    libcxx/test/libcxx/language.support/cmp/version.pass.cpp
    libcxx/test/libcxx/language.support/cstdint/version.pass.cpp
    libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
    libcxx/test/libcxx/language.support/support.dynamic/version.pass.cpp
    libcxx/test/libcxx/language.support/support.exception/version.pass.cpp
    libcxx/test/libcxx/language.support/support.initlist/version.pass.cpp
    libcxx/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp
    libcxx/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp
    libcxx/test/libcxx/language.support/support.limits/limits/version.pass.cpp
    libcxx/test/libcxx/language.support/support.limits/version.pass.cpp
    libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.apple.compile.pass.cpp
    libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
    libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp
    libcxx/test/libcxx/language.support/support.rtti/version.pass.cpp
    libcxx/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp
    libcxx/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp
    libcxx/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp
    libcxx/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp
    libcxx/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp
    libcxx/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp
    libcxx/test/libcxx/language.support/support.types/version.pass.cpp
    libcxx/test/libcxx/libcpp_alignof.pass.cpp
    libcxx/test/libcxx/libcpp_freestanding.sh.cpp
    libcxx/test/libcxx/localization/c.locales/version.pass.cpp
    libcxx/test/libcxx/localization/locale.stdcvt/version.pass.cpp
    libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
    libcxx/test/libcxx/localization/version.pass.cpp
    libcxx/test/libcxx/memory/aligned_allocation_macro.compile.pass.cpp
    libcxx/test/libcxx/memory/trivial_abi/shared_ptr_arg.pass.cpp
    libcxx/test/libcxx/memory/trivial_abi/unique_ptr_arg.pass.cpp
    libcxx/test/libcxx/memory/trivial_abi/unique_ptr_array.pass.cpp
    libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp
    libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp
    libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
    libcxx/test/libcxx/min_max_macros.compile.pass.cpp
    libcxx/test/libcxx/modules_include.sh.cpp
    libcxx/test/libcxx/nasty_macros.compile.pass.cpp
    libcxx/test/libcxx/no_assert_include.compile.pass.cpp
    libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp
    libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp
    libcxx/test/libcxx/numerics/c.math/tgmath_h.pass.cpp
    libcxx/test/libcxx/numerics/c.math/version_cmath.pass.cpp
    libcxx/test/libcxx/numerics/cfenv/version.pass.cpp
    libcxx/test/libcxx/numerics/complex.number/ccmplx/ccomplex.pass.cpp
    libcxx/test/libcxx/numerics/complex.number/version.pass.cpp
    libcxx/test/libcxx/numerics/numarray/version.pass.cpp
    libcxx/test/libcxx/numerics/numeric.ops/version.pass.cpp
    libcxx/test/libcxx/numerics/rand/rand.synopsis/version.pass.cpp
    libcxx/test/libcxx/ranges/has-no-incomplete-ranges.compile.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.all/all.nodiscard.verify.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.common.view/adaptor.nodiscard.verify.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/arrow.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.copy.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.move.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.default.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.in_place.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/deref.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/has_value.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/no_unique_address.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/properties.compile.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.counted/adaptor.nodiscard.verify.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/assert.equal.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/assert.equal.pass.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/types.h
    libcxx/test/libcxx/ranges/range.adaptors/range.reverse/adaptor.nodiscard.verify.cpp
    libcxx/test/libcxx/ranges/range.adaptors/range.transform/adaptor.nodiscard.verify.cpp
    libcxx/test/libcxx/ranges/range.nonprop.cache/assign.copy.pass.cpp
    libcxx/test/libcxx/ranges/range.nonprop.cache/assign.move.pass.cpp
    libcxx/test/libcxx/ranges/range.nonprop.cache/constraints.compile.pass.cpp
    libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.copy.pass.cpp
    libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.default.pass.cpp
    libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.move.pass.cpp
    libcxx/test/libcxx/ranges/range.nonprop.cache/deref.pass.cpp
    libcxx/test/libcxx/ranges/range.nonprop.cache/emplace.pass.cpp
    libcxx/test/libcxx/ranges/range.nonprop.cache/emplace_from.pass.cpp
    libcxx/test/libcxx/ranges/range.nonprop.cache/has_value.pass.cpp
    libcxx/test/libcxx/ranges/range.utility.helpers/simple_view.compile.pass.cpp
    libcxx/test/libcxx/ranges/version.compile.pass.cpp
    libcxx/test/libcxx/selftest/test_macros.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/assert.back.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/assert.cback.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/assert.cfront.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/assert.cindex.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/assert.front.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.access/assert.index.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.add.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.compare.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.decrement.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.dereference.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.increment.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.index.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.subtract.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.erase_iter.null.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.pop_back.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter_iter.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_char.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_iter_iter.pass.cpp
    libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_size_char.pass.cpp
    libcxx/test/libcxx/strings/c.strings/version_cctype.pass.cpp
    libcxx/test/libcxx/strings/c.strings/version_cstring.pass.cpp
    libcxx/test/libcxx/strings/c.strings/version_cuchar.pass.cpp
    libcxx/test/libcxx/strings/c.strings/version_cwchar.pass.cpp
    libcxx/test/libcxx/strings/c.strings/version_cwctype.pass.cpp
    libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp
    libcxx/test/libcxx/strings/version.pass.cpp
    libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception.pass.cpp
    libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception_at_thread_exit.pass.cpp
    libcxx/test/libcxx/thread/futures/version.pass.cpp
    libcxx/test/libcxx/thread/thread.barrier/version.compile.pass.cpp
    libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
    libcxx/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp
    libcxx/test/libcxx/thread/thread.condition/version.pass.cpp
    libcxx/test/libcxx/thread/thread.latch/version.compile.pass.cpp
    libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp
    libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp
    libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp
    libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
    libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
    libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
    libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
    libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
    libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp
    libcxx/test/libcxx/thread/thread.semaphore/version.compile.pass.cpp
    libcxx/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp
    libcxx/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp
    libcxx/test/libcxx/thread/thread.threads/version.pass.cpp
    libcxx/test/libcxx/time/version.pass.cpp
    libcxx/test/libcxx/transitive_includes.sh.cpp
    libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp
    libcxx/test/libcxx/utilities/any/version.pass.cpp
    libcxx/test/libcxx/utilities/format/enable_insertable.compile.pass.cpp
    libcxx/test/libcxx/utilities/format/format.arguments/format.arg/arg_t.compile.pass.cpp
    libcxx/test/libcxx/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp
    libcxx/test/libcxx/utilities/format/format.arguments/format.args/get.pass.cpp
    libcxx/test/libcxx/utilities/format/format.formatter/format.context/types.compile.pass.cpp
    libcxx/test/libcxx/utilities/format/format.formatter/format.formatter.spec/formattable.compile.pass.cpp
    libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.pass.cpp
    libcxx/test/libcxx/utilities/format/format.string/format.string.std/test_exception.h
    libcxx/test/libcxx/utilities/format/version.compile.pass.cpp
    libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.verify.cpp
    libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp
    libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp
    libcxx/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp
    libcxx/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp
    libcxx/test/libcxx/utilities/function.objects/version.pass.cpp
    libcxx/test/libcxx/utilities/memory/default.allocator/allocator_types.void.cxx20_allocator_void_no_members.verify.cpp
    libcxx/test/libcxx/utilities/memory/default.allocator/allocator_types.void.cxx20_with_removed_members.compile.pass.cpp
    libcxx/test/libcxx/utilities/memory/version.pass.cpp
    libcxx/test/libcxx/utilities/meta/version.pass.cpp
    libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.dereference.pass.cpp
    libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.op_arrow.pass.cpp
    libcxx/test/libcxx/utilities/optional/version.pass.cpp
    libcxx/test/libcxx/utilities/ratio/version.pass.cpp
    libcxx/test/libcxx/utilities/template.bitset/includes.pass.cpp
    libcxx/test/libcxx/utilities/template.bitset/version.pass.cpp
    libcxx/test/libcxx/utilities/tuple/version.pass.cpp
    libcxx/test/libcxx/utilities/type.index/version.pass.cpp
    libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp
    libcxx/test/libcxx/utilities/utility/version.pass.cpp
    libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp
    libcxx/test/libcxx/utilities/variant/version.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_if.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill_n.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate_n.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move_backward.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_point.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_stable_partition.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/ranges_shuffle.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove_if.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy_if.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges.replace.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges.replace_if.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges_replace_copy.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges_replace_copy_if.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse_copy.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges.rotate_copy.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges_rotate.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/ranges.swap_ranges.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique.pass.cpp
    libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique_copy.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/ranges.adjacent_find.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.all_of/ranges.all_of.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/ranges.any_of.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count_if.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/ranges.find_end.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/ranges.find_first_of.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find_if.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find_if_not.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each_n.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/ranges.is_permutation.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.none_of/ranges.none_of.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.search/ranges.search.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/alg.search/ranges.search_n.pass.cpp
    libcxx/test/std/algorithms/alg.nonmodifying/mismatch/ranges_mismatch.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/ranges.binary_search.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/ranges_equal_range.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/ranges.lower_bound.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/ranges.upper_bound.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.clamp/assert.ranges_clamp.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.clamp/ranges.clamp.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap_until.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.pop_heap.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.ranges_pop_heap.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/ranges.lexicographical_compare.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_inplace_merge.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_merge.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max_element.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.min.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.min_element.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.minmax.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.minmax_element.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.partitions/ranges.is_partitioned.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.next_permutation.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.prev_permutation.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/ranges_includes.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.difference/ranges_set_difference.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/ranges_set_intersection.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/ranges_set_symmetric_difference.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/ranges.is_sorted.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/ranges.is_sorted_until.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/ranges_partial_sort_copy.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/ranges_partial_sort.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp
    libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/ranges.stable.sort.pass.cpp
    libcxx/test/std/algorithms/algorithms.results/in_found_result.pass.cpp
    libcxx/test/std/algorithms/algorithms.results/in_fun_result.pass.cpp
    libcxx/test/std/algorithms/algorithms.results/in_in_out_result.pass.cpp
    libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
    libcxx/test/std/algorithms/algorithms.results/in_out_out_result.pass.cpp
    libcxx/test/std/algorithms/algorithms.results/in_out_result.pass.cpp
    libcxx/test/std/algorithms/algorithms.results/min_max_result.pass.cpp
    libcxx/test/std/algorithms/algorithms.results/no_unique_address.compile.pass.cpp
    libcxx/test/std/algorithms/ranges_result_alias_declarations.compile.pass.cpp
    libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp
    libcxx/test/std/algorithms/ranges_robust_against_differing_projections.pass.cpp
    libcxx/test/std/algorithms/ranges_robust_against_nonbool_predicates.pass.cpp
    libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp
    libcxx/test/std/algorithms/ranges_robust_against_proxy_iterators.pass.cpp
    libcxx/test/std/atomics/atomics.flag/atomic_flag_test_explicit.pass.cpp
    libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
    libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp
    libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp
    libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
    libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp
    libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp
    libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp
    libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
    libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
    libcxx/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
    libcxx/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp
    libcxx/test/std/containers/associative/map/map.cons/move_assign.pass.cpp
    libcxx/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
    libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp
    libcxx/test/std/containers/associative/map/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/associative/multimap/max_size.pass.cpp
    libcxx/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp
    libcxx/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp
    libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp
    libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp
    libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp
    libcxx/test/std/containers/associative/multimap/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/associative/multiset/max_size.pass.cpp
    libcxx/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp
    libcxx/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp
    libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp
    libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp
    libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp
    libcxx/test/std/containers/associative/multiset/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/associative/set/max_size.pass.cpp
    libcxx/test/std/containers/associative/set/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp
    libcxx/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp
    libcxx/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp
    libcxx/test/std/containers/associative/set/set.cons/move_assign.pass.cpp
    libcxx/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp
    libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
    libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
    libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp
    libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp
    libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp
    libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp
    libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp
    libcxx/test/std/containers/container.requirements/container.requirements.general/allocator_move.pass.cpp
    libcxx/test/std/containers/sequences/array/front_back.pass.cpp
    libcxx/test/std/containers/sequences/array/front_back_const.pass.cpp
    libcxx/test/std/containers/sequences/array/indexing.pass.cpp
    libcxx/test/std/containers/sequences/array/indexing_const.pass.cpp
    libcxx/test/std/containers/sequences/array/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/sequences/array/types.pass.cpp
    libcxx/test/std/containers/sequences/deque/deque.capacity/access.pass.cpp
    libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp
    libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp
    libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp
    libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp
    libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/deque/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/sequences/deque/types.pass.cpp
    libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp
    libcxx/test/std/containers/sequences/forwardlist/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp
    libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/list/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/sequences/list/types.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/assign_move.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/const_reference.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/iterators.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/reference/triviality.compile.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/vector.bool/types.pass.cpp
    libcxx/test/std/containers/sequences/vector/constant_initialization.pass.cpp
    libcxx/test/std/containers/sequences/vector/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/sequences/vector/types.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp
    libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.compile.pass.cpp
    libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp
    libcxx/test/std/containers/unord/unord.map/bucket_count.pass.cpp
    libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp
    libcxx/test/std/containers/unord/unord.map/iterator_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp
    libcxx/test/std/containers/unord/unord.map/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp
    libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp
    libcxx/test/std/containers/unord/unord.map/swap_member.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_copy.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy_alloc.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/default.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/default_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size.compile.fail.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/iterators.compile.fail.cpp
    libcxx/test/std/containers/unord/unord.multimap/local_iterators.compile.fail.cpp
    libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/swap_member.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy_alloc.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.compile.fail.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/iterator_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/iterators.compile.fail.cpp
    libcxx/test/std/containers/unord/unord.multiset/local_iterators.compile.fail.cpp
    libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/swap_member.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.compile.fail.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
    libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp
    libcxx/test/std/containers/unord/unord.set/bucket_count.pass.cpp
    libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp
    libcxx/test/std/containers/unord/unord.set/iterator_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp
    libcxx/test/std/containers/unord/unord.set/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp
    libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp
    libcxx/test/std/containers/unord/unord.set/swap_member.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy_alloc.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size.compile.fail.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal_allocator.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp
    libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
    libcxx/test/std/containers/views/views.span/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp
    libcxx/test/std/containers/views/views.span/span.elem/back.pass.cpp
    libcxx/test/std/containers/views/views.span/span.elem/front.pass.cpp
    libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp
    libcxx/test/std/containers/views/views.span/span.iterators/iterator_concept_conformance.compile.pass.cpp
    libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp
    libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp
    libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
    libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.compile.fail.cpp
    libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp
    libcxx/test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.verify.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.verify.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.verify.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.verify.cpp
    libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
    libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp
    libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
    libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
    libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
    libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp
    libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp
    libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp
    libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp
    libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp
    libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp
    libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp
    libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp
    libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp
    libcxx/test/std/experimental/simd/simd.abi/vector_extension.pass.cpp
    libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp
    libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp
    libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp
    libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/path.pass.cpp
    libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/assign.pass.cpp
    libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp
    libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/replace_filename.pass.cpp
    libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
    libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
    libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
    libcxx/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp
    libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
    libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp
    libcxx/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp
    libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
    libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp
    libcxx/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.enum/enum.copy_options.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.enum/enum.file_type.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
    libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
    libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp
    libcxx/test/std/iterators/iterator.container/size.pass.cpp
    libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/constraints.verify.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_sentinel.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/iterator_sentinel.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/lwg3664.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/range.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/constraints.compile.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_count.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_count_sentinel.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_sentinel.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/constraints.compile.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator_count.pass.cpp
    libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator_count_sentinel.pass.cpp
    libcxx/test/std/iterators/iterator.requirements/iterator.concepts/incrementable.h
    libcxx/test/std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_move.nodiscard.verify.cpp
    libcxx/test/std/iterators/iterator.requirements/iterator.cust/unqualified_lookup_wrapper.h
    libcxx/test/std/iterators/predef.iterators/counted.iterator/compare.pass.cpp
    libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/cxx20_iter_member.pass.cpp
    libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_spaceship.pass.cpp
    libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/default.pass.cpp
    libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.ref/op_arrow.pass.cpp
    libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/iterator_concept_conformance.compile.pass.cpp
    libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp
    libcxx/test/std/language.support/cmp/cmp.alg/compare_strong_order_fallback.pass.cpp
    libcxx/test/std/language.support/cmp/cmp.alg/compare_weak_order_fallback.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp
    libcxx/test/std/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp
    libcxx/test/std/language.support/support.coroutines/end.to.end/await_result.pass.cpp
    libcxx/test/std/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp
    libcxx/test/std/language.support/support.coroutines/end.to.end/expected.pass.cpp
    libcxx/test/std/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp
    libcxx/test/std/language.support/support.coroutines/end.to.end/generator.pass.cpp
    libcxx/test/std/language.support/support.coroutines/end.to.end/go.pass.cpp
    libcxx/test/std/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp
    libcxx/test/std/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp
    libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp
    libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
    libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/barrier.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/charconv.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/cstdlib.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/latch.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/list.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/map.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/semaphore.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/set.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/string.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/typeinfo.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.compile.pass.cpp
    libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
    libcxx/test/std/library/description/conventions/customization.point.object/cpo.compile.pass.cpp
    libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp
    libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp
    libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp
    libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp
    libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.cons/assign.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.cons/copy.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.cons/default.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.cons/string.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.members/combine.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.statics/classic.pass.cpp
    libcxx/test/std/localization/locales/locale/locale.statics/global.pass.cpp
    libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp
    libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp
    libcxx/test/std/numerics/c.math/lerp.pass.cpp
    libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/valarray_helper.h
    libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp
    libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp
    libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp
    libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp
    libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
    libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp
    libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
    libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp
    libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
    libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval_param.PR52906.pass.cpp
    libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp
    libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp
    libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
    libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp
    libcxx/test/std/ranges/range.access/begin.pass.cpp
    libcxx/test/std/ranges/range.access/begin.verify.cpp
    libcxx/test/std/ranges/range.access/data.verify.cpp
    libcxx/test/std/ranges/range.access/empty.pass.cpp
    libcxx/test/std/ranges/range.access/empty.verify.cpp
    libcxx/test/std/ranges/range.access/end.verify.cpp
    libcxx/test/std/ranges/range.access/rbegin.pass.cpp
    libcxx/test/std/ranges/range.access/rbegin.verify.cpp
    libcxx/test/std/ranges/range.access/rend.pass.cpp
    libcxx/test/std/ranges/range.access/rend.verify.cpp
    libcxx/test/std/ranges/range.access/size.verify.cpp
    libcxx/test/std/ranges/range.access/ssize.pass.cpp
    libcxx/test/std/ranges/range.access/ssize.verify.cpp
    libcxx/test/std/ranges/range.adaptors/range.all/all.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.all/all_t.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/borrowing.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/constructor.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/data.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/empty.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/size.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.all/range.ref.view/borrowing.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.all/range.ref.view/range.ref.view.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.common.view/adaptor.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.common.view/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.common.view/begin.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.common.view/borrowing.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.common.view/ctad.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.view.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.common.view/end.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.common.view/size.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.drop/adaptor.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.drop/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.drop/begin.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.drop/ctad.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.drop/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.drop/ctor.view.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.drop/end.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.drop/general.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.drop/size.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.empty/borrowing.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.empty/empty_view.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.empty/views.empty.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/adaptor.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/begin.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/constraints.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/ctad.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/ctor.view_pred.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/end.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/iterator/arrow.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/iterator/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/iterator/compare.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.parent_iter.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/iterator/decrement.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/iterator/deref.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/iterator/increment.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_move.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_swap.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/iterator/types.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/pred.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/compare.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.parent.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/adaptor.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/begin.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.verify.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/ctor.view.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/end.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/general.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/arrow.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.other.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.parent.outer.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/decrement.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/eq.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/increment.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/iter.move.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/iter.swap.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/member_types.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/star.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.parent.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/eq.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.join.view/types.h
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/adaptor.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/begin.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctad.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.copy_move.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.range.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.view.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/end.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.outer_iterator.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/deref.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/equal.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/increment.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_move.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_swap.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/types.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/begin.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.iter.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/end.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/view_interface.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.copy.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent_base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/deref.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/equal.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/increment.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/types.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h
    libcxx/test/std/ranges/range.adaptors/range.lazy.split/view_interface.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.reverse/adaptor.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.reverse/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.reverse/borrowing.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.reverse/ctad.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.reverse/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.reverse/ctor.view.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.reverse/end.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.reverse/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.reverse/size.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/adaptor.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/begin.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/borrowing.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/ctad.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/ctor.view_count.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/end.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/sentinel/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/sentinel/ctor.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/sentinel/eq.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.take/size.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/adaptor.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/begin.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/ctad.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/ctor.view_function.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/end.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/general.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/iterator/arithmetic.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/iterator/base.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/iterator/compare.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/iterator/ctor.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/iterator/deref.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/iterator/iter_move.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/iterator/plus_minus.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/iterator/requirements.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/iterator/sentinel.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/iterator/subscript.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/iterator/types.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.transform/size.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/begin.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/borrowing.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/cpo.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/ctad.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/ctor.views.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/end.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/general.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/arithmetic.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.other.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/decrement.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/deref.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/increment.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/member_types.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/singular.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/iterator/subscript.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/range.concept.compile.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/ctor.other.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/eq.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/size.pass.cpp
    libcxx/test/std/ranges/range.adaptors/range.zip/types.h
    libcxx/test/std/ranges/range.factories/range.iota.view/begin.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/borrowing.compile.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/ctad.compile.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/ctor.first.last.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/compare.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.value.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/decrement.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/increment.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/member_typedefs.compile.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/minus.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/minus_eq.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/plus.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/plus_eq.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/iterator/subscript.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.value.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/eq.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/minus.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/type.compile.pass.cpp
    libcxx/test/std/ranges/range.factories/range.iota.view/views_iota.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/assign.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/begin.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/borrowing.compile.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/cpo.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/ctad.compile.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/ctor.in_place.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/ctor.value.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/data.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/end.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/ranges/range.factories/range.single.view/size.pass.cpp
    libcxx/test/std/ranges/range.req/range.range/helper_aliases.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.range/iterator_t.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.range/range.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.range/range_size_t.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.range/sentinel_t.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.refinements/bidirectional_range.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.refinements/contiguous_range.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.refinements/forward_range.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.refinements/input_range.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.refinements/output_range.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.refinements/random_access_range.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.refinements/viewable_range.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.sized/sized_range.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.sized/subsumption.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.view/view.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.view/view.subsumption.compile.pass.cpp
    libcxx/test/std/ranges/range.req/range.view/view_base.compile.pass.cpp
    libcxx/test/std/ranges/range.utility/range.dangling/borrowed_iterator.compile.pass.cpp
    libcxx/test/std/ranges/range.utility/range.dangling/borrowed_subrange.compile.pass.cpp
    libcxx/test/std/ranges/range.utility/range.dangling/dangling.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/advance.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/borrowing.compile.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/ctad.compile.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end_size.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/ctor.default.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/ctor.pair_like_conv.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/ctor.range.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/ctor.range_size.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/general.compile.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/get.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/lwg3470.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/primitives.pass.cpp
    libcxx/test/std/ranges/range.utility/range.subrange/structured_bindings.pass.cpp
    libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp
    libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp
    libcxx/test/std/re/re.alg/re.alg.replace/exponential.pass.cpp
    libcxx/test/std/re/re.alg/re.alg.search/exponential.pass.cpp
    libcxx/test/std/re/re.badexp/regex_error.pass.cpp
    libcxx/test/std/re/re.const/re.err/error_type.pass.cpp
    libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
    libcxx/test/std/re/re.grammar/excessive_brace_min_max.pass.cpp
    libcxx/test/std/re/re.results/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/re/re.traits/lookup_classname.pass.cpp
    libcxx/test/std/strings/basic.string/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/strings/basic.string/string.access/back.pass.cpp
    libcxx/test/std/strings/basic.string/string.access/front.pass.cpp
    libcxx/test/std/strings/basic.string/string.access/index.pass.cpp
    libcxx/test/std/strings/basic.string/string.capacity/reserve.pass.cpp
    libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.capacity/resize_and_overwrite.pass.cpp
    libcxx/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp
    libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/copy.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/default.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/dtor.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/move.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/string_view.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/string_view_assignment.pass.cpp
    libcxx/test/std/strings/basic.string/string.cons/substr.pass.cpp
    libcxx/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_view.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_view.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string_view.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp
    libcxx/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp
    libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp
    libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp
    libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
    libcxx/test/std/strings/basic.string/string.starts_with/starts_with.ptr.pass.cpp
    libcxx/test/std/strings/string.view/range_concept_conformance.compile.pass.cpp
    libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp
    libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp
    libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp
    libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp
    libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp
    libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp
    libcxx/test/std/strings/string.view/string.view.cons/from_range.pass.cpp
    libcxx/test/std/strings/string.view/string.view.deduct/range.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp
    libcxx/test/std/strings/string.view/string.view.iterators/iterator_concept_conformance.compile.pass.cpp
    libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp
    libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp
    libcxx/test/std/strings/strings.erasure/erase.pass.cpp
    libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp
    libcxx/test/std/thread/futures/futures.async/async.pass.cpp
    libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp
    libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp
    libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
    libcxx/test/std/time/time.duration/time.duration.special/max.pass.cpp
    libcxx/test/std/time/time.duration/time.duration.special/min.pass.cpp
    libcxx/test/std/time/time.duration/time.duration.special/zero.pass.cpp
    libcxx/test/std/time/time.point/time.point.special/max.pass.cpp
    libcxx/test/std/time/time.point/time.point.special/min.pass.cpp
    libcxx/test/std/time/time.traits/time.traits.duration_values/max.pass.cpp
    libcxx/test/std/time/time.traits/time.traits.duration_values/min.pass.cpp
    libcxx/test/std/time/time.traits/time.traits.duration_values/zero.pass.cpp
    libcxx/test/std/utilities/any/any.class/any.assign/move.pass.cpp
    libcxx/test/std/utilities/any/any.class/any.assign/value.pass.cpp
    libcxx/test/std/utilities/any/any.class/any.cons/move.pass.cpp
    libcxx/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
    libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.pass.cpp
    libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.sh.cpp
    libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_wformat_args.pass.cpp
    libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp
    libcxx/test/std/utilities/format/format.arguments/format.arg/operator_bool.pass.cpp
    libcxx/test/std/utilities/format/format.arguments/format.args/ctor.pass.cpp
    libcxx/test/std/utilities/format/format.arguments/format.args/types.compile.pass.cpp
    libcxx/test/std/utilities/format/format.error/format.error.pass.cpp
    libcxx/test/std/utilities/format/format.fmt.string/ctor.verify.cpp
    libcxx/test/std/utilities/format/format.fmt.string/get.pass.cpp
    libcxx/test/std/utilities/format/format.fmt.string/types.compile.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.bool.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.c_string.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.const_char_array.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.string.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.unsigned_integral.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/types.compile.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.verify.cpp
    libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp
    libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp
    libcxx/test/std/utilities/format/format.functions/P2418.pass.cpp
    libcxx/test/std/utilities/format/format.functions/ascii.pass.cpp
    libcxx/test/std/utilities/format/format.functions/format.locale.pass.cpp
    libcxx/test/std/utilities/format/format.functions/format.locale.verify.cpp
    libcxx/test/std/utilities/format/format.functions/format.pass.cpp
    libcxx/test/std/utilities/format/format.functions/format.verify.cpp
    libcxx/test/std/utilities/format/format.functions/format_tests.h
    libcxx/test/std/utilities/format/format.functions/format_to.locale.pass.cpp
    libcxx/test/std/utilities/format/format.functions/format_to.locale.verify.cpp
    libcxx/test/std/utilities/format/format.functions/format_to.pass.cpp
    libcxx/test/std/utilities/format/format.functions/format_to.verify.cpp
    libcxx/test/std/utilities/format/format.functions/format_to_n.locale.pass.cpp
    libcxx/test/std/utilities/format/format.functions/format_to_n.locale.verify.cpp
    libcxx/test/std/utilities/format/format.functions/format_to_n.pass.cpp
    libcxx/test/std/utilities/format/format.functions/format_to_n.verify.cpp
    libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp
    libcxx/test/std/utilities/format/format.functions/formatted_size.locale.verify.cpp
    libcxx/test/std/utilities/format/format.functions/formatted_size.pass.cpp
    libcxx/test/std/utilities/format/format.functions/formatted_size.verify.cpp
    libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp
    libcxx/test/std/utilities/format/format.functions/unicode.pass.cpp
    libcxx/test/std/utilities/format/format.functions/vformat.locale.pass.cpp
    libcxx/test/std/utilities/format/format.functions/vformat.pass.cpp
    libcxx/test/std/utilities/format/format.functions/vformat_to.locale.pass.cpp
    libcxx/test/std/utilities/format/format.functions/vformat_to.pass.cpp
    libcxx/test/std/utilities/format/format.syn/format_to_n_result.pass.cpp
    libcxx/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp
    libcxx/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp
    libcxx/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp
    libcxx/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp
    libcxx/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp
    libcxx/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp
    libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp
    libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp
    libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isplace/is_placeholder.pass.cpp
    libcxx/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp
    libcxx/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp
    libcxx/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp
    libcxx/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp
    libcxx/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp
    libcxx/test/std/utilities/function.objects/comparisons/greater.pass.cpp
    libcxx/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp
    libcxx/test/std/utilities/function.objects/comparisons/less.pass.cpp
    libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp
    libcxx/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp
    libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp
    libcxx/test/std/utilities/function.objects/func.invoke/invoke_constexpr.pass.cpp
    libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
    libcxx/test/std/utilities/function.objects/func.require/binary_function.pass.cpp
    libcxx/test/std/utilities/function.objects/func.require/unary_function.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/addressof.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.alg/swap.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.cap/operator_bool.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/default.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/swap.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_==.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target_type.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type.pass.cpp
    libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp
    libcxx/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp
    libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp
    libcxx/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp
    libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp
    libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp
    libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp
    libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp
    libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp
    libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp
    libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp
    libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp
    libcxx/test/std/utilities/function.objects/refwrap/binder_typedefs.compile.pass.cpp
    libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp
    libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
    libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp
    libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
    libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp
    libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp
    libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.compile.fail.cpp
    libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.pass.cpp
    libcxx/test/std/utilities/memory/default.allocator/allocator.dtor.pass.cpp
    libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.constexpr.size.verify.cpp
    libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
    libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
    libcxx/test/std/utilities/memory/default.allocator/allocator_types.void.compile.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/buffer.h
    libcxx/test/std/utilities/memory/specialized.algorithms/counted.h
    libcxx/test/std/utilities/memory/specialized.algorithms/specialized.construct/ranges_construct_at.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_at.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_n.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct_n.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/ranges_uninitialized_value_construct.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/ranges_uninitialized_value_construct_n.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy_n.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/ranges_uninitialized_fill_n.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill/ranges_uninitialized_fill.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move.pass.cpp
    libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move_n.pass.cpp
    libcxx/test/std/utilities/memory/storage.iterator/deprecated.verify.cpp
    libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp
    libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp
    libcxx/test/std/utilities/memory/storage.iterator/types.compile.pass.cpp
    libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
    libcxx/test/std/utilities/memory/temporary.buffer/temporary_buffer.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
    libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
    libcxx/test/std/utilities/meta/meta.rel/is_convertible_fallback.pass.cpp
    libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.deprecated.verify.cpp
    libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.pass.cpp
    libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
    libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.deprecated.verify.cpp
    libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp
    libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp
    libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp
    libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp
    libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp
    libcxx/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
    libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp
    libcxx/test/std/utilities/template.bitset/bitset_test_cases.h
    libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp
    libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp
    libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
    libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp
    libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp
    libcxx/test/std/utilities/utility/forward/forward.pass.cpp
    libcxx/test/std/utilities/utility/forward/move.pass.cpp
    libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp
    libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp
    libcxx/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp
    libcxx/test/support/any_helpers.h
    libcxx/test/support/asan_testing.h
    libcxx/test/support/check_assertion.h
    libcxx/test/support/container_debug_tests.h
    libcxx/test/support/container_test_types.h
    libcxx/test/support/count_new.h
    libcxx/test/support/deduction_guides_sfinae_checks.h
    libcxx/test/support/experimental_any_helpers.h
    libcxx/test/support/external_threads.cpp
    libcxx/test/support/filesystem_include.h
    libcxx/test/support/filesystem_test_helper.h
    libcxx/test/support/msvc_stdlib_force_include.h
    libcxx/test/support/nasty_containers.h
    libcxx/test/support/parse_integer.h
    libcxx/test/support/platform_support.h
    libcxx/test/support/poisoned_hash_helper.h
    libcxx/test/support/read_write.h
    libcxx/test/support/test.support/make_string_header.pass.cpp
    libcxx/test/support/test.support/test_check_assertion.pass.cpp
    libcxx/test/support/test.support/test_proxy.pass.cpp
    libcxx/test/support/test_format_context.h
    libcxx/test/support/test_iterators.h
    libcxx/test/support/test_macros.h
    libcxx/test/support/variant_test_helpers.h
    libcxx/utils/ci/oss-fuzz.sh
    libcxx/utils/ci/run-buildbot
    libcxx/utils/gdb/libcxx/printers.py
    libcxx/utils/generate_extended_grapheme_cluster_table.py
    libcxx/utils/generate_feature_test_macro_components.py
    libcxx/utils/generate_header_inclusion_tests.py
    libcxx/utils/generate_header_tests.py
    libcxx/utils/libcxx/test/dsl.py
    libcxx/utils/libcxx/test/features.py
    libcxx/utils/libcxx/test/params.py
    libcxxabi/CMakeLists.txt
    libcxxabi/include/cxxabi.h
    libcxxabi/src/CMakeLists.txt
    libcxxabi/src/cxa_default_handlers.cpp
    libcxxabi/src/cxa_exception.cpp
    libcxxabi/src/cxa_exception_storage.cpp
    libcxxabi/src/cxa_guard.cpp
    libcxxabi/src/cxa_guard_impl.h
    libcxxabi/src/cxa_handlers.cpp
    libcxxabi/src/cxa_thread_atexit.cpp
    libcxxabi/src/fallback_malloc.cpp
    libcxxabi/src/stdlib_new_delete.cpp
    libcxxabi/src/stdlib_stdexcept.cpp
    libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in
    libcxxabi/test/configs/apple-libc++abi-shared.cfg.in
    libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in
    libcxxabi/test/configs/llvm-libc++abi-merged.cfg.in
    libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in
    libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in
    libcxxabi/test/configs/llvm-libc++abi-shared-gcc.cfg.in
    libcxxabi/test/configs/llvm-libc++abi-shared.cfg.in
    libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in
    libcxxabi/test/configs/llvm-libc++abi-static.cfg.in
    libcxxabi/test/guard_test_basic.pass.cpp
    libcxxabi/test/guard_threaded_test.pass.cpp
    libcxxabi/test/libcxxabi/test/config.py
    libcxxabi/test/test_exception_storage.pass.cpp

Removed: 
    


################################################################################
diff  --git a/libcxx/.clang-format b/libcxx/.clang-format
index acc6773c16de..0252600de999 100644
--- a/libcxx/.clang-format
+++ b/libcxx/.clang-format
@@ -10,49 +10,49 @@ AllowAllArgumentsOnNextLine: true
 AllowAllParametersOfDeclarationOnNextLine: true
 AllowShortFunctionsOnASingleLine: true
 AllowShortLambdasOnASingleLine: All
-AttributeMacros: ['_LIBCPP_HIDE_FROM_ABI',
-                  '_LIBCPP_CONSTEXPR',
-                  '_LIBCPP_CONSTEXPR_AFTER_CXX11',
-                  '_LIBCPP_CONSTEXPR_AFTER_CXX14',
-                  '_LIBCPP_CONSTEXPR_AFTER_CXX17',
-                  '_LIBCPP_CONSTEXPR_AFTER_CXX20',
-                  '_LIBCPP_ALIGNOF',
+AttributeMacros: ['_LIBCUDACXX_HIDE_FROM_ABI',
+                  '_LIBCUDACXX_CONSTEXPR',
+                  '_LIBCUDACXX_CONSTEXPR_AFTER_CXX11',
+                  '_LIBCUDACXX_CONSTEXPR_AFTER_CXX14',
+                  '_LIBCUDACXX_CONSTEXPR_AFTER_CXX17',
+                  '_LIBCUDACXX_CONSTEXPR_AFTER_CXX20',
+                  '_LIBCUDACXX_ALIGNOF',
                   '_ALIGNAS_TYPE',
                   '_ALIGNAS',
-                  '_LIBCPP_NORETURN',
-                  '_LIBCPP_ALWAYS_INLINE',
-                  '_LIBCPP_DISABLE_EXTENTSION_WARNING',
-                  '_LIBCPP_HIDDEN',
-                  '_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS',
-                  '_LIBCPP_FUNC_VIS',
-                  '_LIBCPP_TYPE_VIS',
-                  '_LIBCPP_TEMPLATE_VIS',
-                  '_LIBCPP_TEMPLATE_DATA_VIS',
-                  '_LIBCPP_EXPORTED_FROM_ABI',
-                  '_LIBCPP_OVERRIDABLE_FUNC_VIS',
-                  '_LIBCPP_EXCEPTION_ABI',
-                  '_LIBCPP_ENUM_VIS',
-                  '_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS',
-                  '_LIBCPP_INTERNAL_LINKAGE',
-                  '_LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION',
-                  '_LIBCPP_HIDE_FROM_ABI_AFTER_V1',
-                  '_LIBCPP_INLINE_VISIBILITY',
-                  '_LIBCPP_CONSTEVAL',
-                  '_LIBCPP_NOALIAS',
-                  '_LIBCPP_USING_IF_EXISTS',
-                  '_LIBCPP_DEPRECATED',
-                  '_LIBCPP_DEPRECATED_IN_CXX11',
-                  '_LIBCPP_DEPRECATED_IN_CXX14',
-                  '_LIBCPP_DEPRECATED_IN_CXX17',
-                  '_LIBCPP_DEPRECATED_IN_CXX20',
-                  '_LIBCPP_NODISCARD',
-                  '_LIBCPP_NODISCARD_EXT',
-                  '_LIBCPP_NO_DESTROY',
-                  '_LIBCPP_WEAK',
-                  '_LIBCPP_CONSTINIT',
-                  '_LIBCPP_FALLTHROUGH',
-                  '_LIBCPP_STANDALONE_DEBUG',
-                  '_LIBCPP_NO_UNIQUE_ADDRESS',
+                  '_LIBCUDACXX_NORETURN',
+                  '_LIBCUDACXX_ALWAYS_INLINE',
+                  '_LIBCUDACXX_DISABLE_EXTENTSION_WARNING',
+                  '_LIBCUDACXX_HIDDEN',
+                  '_LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS',
+                  '_LIBCUDACXX_FUNC_VIS',
+                  '_LIBCUDACXX_TYPE_VIS',
+                  '_LIBCUDACXX_TEMPLATE_VIS',
+                  '_LIBCUDACXX_TEMPLATE_DATA_VIS',
+                  '_LIBCUDACXX_EXPORTED_FROM_ABI',
+                  '_LIBCUDACXX_OVERRIDABLE_FUNC_VIS',
+                  '_LIBCUDACXX_EXCEPTION_ABI',
+                  '_LIBCUDACXX_ENUM_VIS',
+                  '_LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS',
+                  '_LIBCUDACXX_INTERNAL_LINKAGE',
+                  '_LIBCUDACXX_EXCLUDE_FROM_EXPLICIT_INSTANTIATION',
+                  '_LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1',
+                  '_LIBCUDACXX_INLINE_VISIBILITY',
+                  '_LIBCUDACXX_CONSTEVAL',
+                  '_LIBCUDACXX_NOALIAS',
+                  '_LIBCUDACXX_USING_IF_EXISTS',
+                  '_LIBCUDACXX_DEPRECATED',
+                  '_LIBCUDACXX_DEPRECATED_IN_CXX11',
+                  '_LIBCUDACXX_DEPRECATED_IN_CXX14',
+                  '_LIBCUDACXX_DEPRECATED_IN_CXX17',
+                  '_LIBCUDACXX_DEPRECATED_IN_CXX20',
+                  '_LIBCUDACXX_NODISCARD',
+                  '_LIBCUDACXX_NODISCARD_EXT',
+                  '_LIBCUDACXX_NO_DESTROY',
+                  '_LIBCUDACXX_WEAK',
+                  '_LIBCUDACXX_CONSTINIT',
+                  '_LIBCUDACXX_FALLTHROUGH',
+                  '_LIBCUDACXX_STANDALONE_DEBUG',
+                  '_LIBCUDACXX_NO_UNIQUE_ADDRESS',
                  ]
 BinPackArguments: false
 BinPackParameters: false

diff  --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 74eff2002fc9..281f1d570d75 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -557,25 +557,25 @@ function(cxx_add_basic_build_flags target)
 
   # Let the library headers know they are currently being used to build the
   # library.
-  target_compile_definitions(${target} PRIVATE -D_LIBCPP_BUILDING_LIBRARY)
+  target_compile_definitions(${target} PRIVATE -D_LIBCUDACXX_BUILDING_LIBRARY)
 
   if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
-    target_compile_definitions(${target} PRIVATE -D_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS)
+    target_compile_definitions(${target} PRIVATE -D_LIBCUDACXX_DISABLE_NEW_DELETE_DEFINITIONS)
   endif()
 
   if (C_SUPPORTS_COMMENT_LIB_PRAGMA)
     if (LIBCXX_HAS_PTHREAD_LIB)
-      target_compile_definitions(${target} PRIVATE -D_LIBCPP_LINK_PTHREAD_LIB)
+      target_compile_definitions(${target} PRIVATE -D_LIBCUDACXX_LINK_PTHREAD_LIB)
     endif()
     if (LIBCXX_HAS_RT_LIB)
-      target_compile_definitions(${target} PRIVATE -D_LIBCPP_LINK_RT_LIB)
+      target_compile_definitions(${target} PRIVATE -D_LIBCUDACXX_LINK_RT_LIB)
     endif()
   endif()
 endfunction()
 
 # Warning flags ===============================================================
 function(cxx_add_warning_flags target)
-  target_compile_definitions(${target} PUBLIC -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+  target_compile_definitions(${target} PUBLIC -D_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
   if (MSVC)
     # -W4 is the cl.exe/clang-cl equivalent of -Wall. (In cl.exe and clang-cl,
     # -Wall is equivalent to -Weverything in GCC style compiler drivers.)
@@ -833,45 +833,45 @@ function(cxx_add_windows_flags target)
 endfunction()
 
 # Configuration file flags =====================================================
-config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION)
-config_define(${LIBCXX_ABI_NAMESPACE} _LIBCPP_ABI_NAMESPACE)
-config_define_if(LIBCXX_ABI_FORCE_ITANIUM _LIBCPP_ABI_FORCE_ITANIUM)
-config_define_if(LIBCXX_ABI_FORCE_MICROSOFT _LIBCPP_ABI_FORCE_MICROSOFT)
-config_define_if_not(LIBCXX_ENABLE_THREADS _LIBCPP_HAS_NO_THREADS)
-config_define_if_not(LIBCXX_ENABLE_MONOTONIC_CLOCK _LIBCPP_HAS_NO_MONOTONIC_CLOCK)
+config_define(${LIBCXX_ABI_VERSION} _LIBCUDACXX_ABI_VERSION)
+config_define(${LIBCXX_ABI_NAMESPACE} _LIBCUDACXX_ABI_NAMESPACE)
+config_define_if(LIBCXX_ABI_FORCE_ITANIUM _LIBCUDACXX_ABI_FORCE_ITANIUM)
+config_define_if(LIBCXX_ABI_FORCE_MICROSOFT _LIBCUDACXX_ABI_FORCE_MICROSOFT)
+config_define_if_not(LIBCXX_ENABLE_THREADS _LIBCUDACXX_HAS_NO_THREADS)
+config_define_if_not(LIBCXX_ENABLE_MONOTONIC_CLOCK _LIBCUDACXX_HAS_NO_MONOTONIC_CLOCK)
 if (NOT LIBCXX_TYPEINFO_COMPARISON_IMPLEMENTATION STREQUAL "default")
-  config_define("${LIBCXX_TYPEINFO_COMPARISON_IMPLEMENTATION}" _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION)
-endif()
-config_define_if(LIBCXX_HAS_PTHREAD_API _LIBCPP_HAS_THREAD_API_PTHREAD)
-config_define_if(LIBCXX_HAS_EXTERNAL_THREAD_API _LIBCPP_HAS_THREAD_API_EXTERNAL)
-config_define_if(LIBCXX_HAS_WIN32_THREAD_API _LIBCPP_HAS_THREAD_API_WIN32)
-config_define_if(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL)
-config_define_if(LIBCXX_HAS_MUSL_LIBC _LIBCPP_HAS_MUSL_LIBC)
-config_define_if(LIBCXX_NO_VCRUNTIME _LIBCPP_NO_VCRUNTIME)
-config_define_if(LIBCXX_ENABLE_PARALLEL_ALGORITHMS _LIBCPP_HAS_PARALLEL_ALGORITHMS)
-config_define_if_not(LIBCXX_ENABLE_FILESYSTEM _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
-config_define_if_not(LIBCXX_ENABLE_RANDOM_DEVICE _LIBCPP_HAS_NO_RANDOM_DEVICE)
-config_define_if_not(LIBCXX_ENABLE_LOCALIZATION _LIBCPP_HAS_NO_LOCALIZATION)
-config_define_if_not(LIBCXX_ENABLE_UNICODE _LIBCPP_HAS_NO_UNICODE)
-config_define_if_not(LIBCXX_ENABLE_WIDE_CHARACTERS _LIBCPP_HAS_NO_WIDE_CHARACTERS)
-config_define_if_not(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
-config_define_if(LIBCXX_ENABLE_DEBUG_MODE _LIBCPP_ENABLE_DEBUG_MODE)
+  config_define("${LIBCXX_TYPEINFO_COMPARISON_IMPLEMENTATION}" _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION)
+endif()
+config_define_if(LIBCXX_HAS_PTHREAD_API _LIBCUDACXX_HAS_THREAD_API_PTHREAD)
+config_define_if(LIBCXX_HAS_EXTERNAL_THREAD_API _LIBCUDACXX_HAS_THREAD_API_EXTERNAL)
+config_define_if(LIBCXX_HAS_WIN32_THREAD_API _LIBCUDACXX_HAS_THREAD_API_WIN32)
+config_define_if(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY _LIBCUDACXX_HAS_THREAD_LIBRARY_EXTERNAL)
+config_define_if(LIBCXX_HAS_MUSL_LIBC _LIBCUDACXX_HAS_MUSL_LIBC)
+config_define_if(LIBCXX_NO_VCRUNTIME _LIBCUDACXX_NO_VCRUNTIME)
+config_define_if(LIBCXX_ENABLE_PARALLEL_ALGORITHMS _LIBCUDACXX_HAS_PARALLEL_ALGORITHMS)
+config_define_if_not(LIBCXX_ENABLE_FILESYSTEM _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
+config_define_if_not(LIBCXX_ENABLE_RANDOM_DEVICE _LIBCUDACXX_HAS_NO_RANDOM_DEVICE)
+config_define_if_not(LIBCXX_ENABLE_LOCALIZATION _LIBCUDACXX_HAS_NO_LOCALIZATION)
+config_define_if_not(LIBCXX_ENABLE_UNICODE _LIBCUDACXX_HAS_NO_UNICODE)
+config_define_if_not(LIBCXX_ENABLE_WIDE_CHARACTERS _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
+config_define_if_not(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCUDACXX_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
+config_define_if(LIBCXX_ENABLE_DEBUG_MODE _LIBCUDACXX_ENABLE_DEBUG_MODE)
 if (LIBCXX_ENABLE_ASSERTIONS)
-  config_define(1 _LIBCPP_ENABLE_ASSERTIONS_DEFAULT)
+  config_define(1 _LIBCUDACXX_ENABLE_ASSERTIONS_DEFAULT)
 else()
-  config_define(0 _LIBCPP_ENABLE_ASSERTIONS_DEFAULT)
+  config_define(0 _LIBCUDACXX_ENABLE_ASSERTIONS_DEFAULT)
 endif()
 
 if (LIBCXX_ABI_DEFINES)
   set(abi_defines)
   foreach (abi_define ${LIBCXX_ABI_DEFINES})
-    if (NOT abi_define MATCHES "^_LIBCPP_ABI_")
+    if (NOT abi_define MATCHES "^_LIBCUDACXX_ABI_")
       message(SEND_ERROR "Invalid ABI macro ${abi_define} in LIBCXX_ABI_DEFINES")
     endif()
     list(APPEND abi_defines "#define ${abi_define}")
   endforeach()
   string(REPLACE ";" "\n" abi_defines "${abi_defines}")
-  config_define(${abi_defines} _LIBCPP_ABI_DEFINES)
+  config_define(${abi_defines} _LIBCUDACXX_ABI_DEFINES)
 endif()
 
 if (LIBCXX_EXTRA_SITE_DEFINES)
@@ -882,7 +882,7 @@ if (LIBCXX_EXTRA_SITE_DEFINES)
     list(APPEND extra_site_defines "#define ${extra_site_define}")
   endforeach()
   string(REPLACE ";" "\n" extra_site_defines "${extra_site_defines}")
-  config_define(${extra_site_defines} _LIBCPP_EXTRA_SITE_DEFINES)
+  config_define(${extra_site_defines} _LIBCUDACXX_EXTRA_SITE_DEFINES)
 endif()
 
 # By default libc++ on Windows expects to use a shared library, which requires
@@ -890,7 +890,7 @@ endif()
 # static library only we modify the headers to disable DLL import/export.
 if (DEFINED WIN32 AND LIBCXX_ENABLE_STATIC AND NOT LIBCXX_ENABLE_SHARED)
   message(STATUS "Generating custom __config for non-DLL Windows build")
-  config_define(ON _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
+  config_define(ON _LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS)
 endif()
 
 if (WIN32 AND LIBCXX_ENABLE_STATIC_ABI_LIBRARY)

diff  --git a/libcxx/benchmarks/std_format_spec_string_unicode.bench.cpp b/libcxx/benchmarks/std_format_spec_string_unicode.bench.cpp
index 3769e964269d..a8ac579f3618 100644
--- a/libcxx/benchmarks/std_format_spec_string_unicode.bench.cpp
+++ b/libcxx/benchmarks/std_format_spec_string_unicode.bench.cpp
@@ -4,7 +4,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_HAS_NO_UNICODE
+#ifndef _LIBCUDACXX_HAS_NO_UNICODE
 
 #  include <format>
 #  include <string_view>

diff  --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
index e77a4156071b..a194f94d3e06 100644
--- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake
+++ b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
@@ -170,7 +170,7 @@ elseif ("${LIBCXX_CXX_ABI}" STREQUAL "vcruntime")
 # Don't link against any ABI library
 elseif ("${LIBCXX_CXX_ABI}" STREQUAL "none")
   add_library(libcxx-abi-headers INTERFACE)
-  target_compile_definitions(libcxx-abi-headers INTERFACE "-D_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY")
+  target_compile_definitions(libcxx-abi-headers INTERFACE "-D_LIBCUDACXX_BUILDING_HAS_NO_ABI_LIBRARY")
 
   add_library(libcxx-abi-shared INTERFACE)
   target_link_libraries(libcxx-abi-shared INTERFACE libcxx-abi-headers)

diff  --git a/libcxx/docs/BuildingLibcxx.rst b/libcxx/docs/BuildingLibcxx.rst
index f365aac7e81a..fb4036689d94 100644
--- a/libcxx/docs/BuildingLibcxx.rst
+++ b/libcxx/docs/BuildingLibcxx.rst
@@ -218,7 +218,7 @@ libc++ specific options
 
   Build libc++ with assertions enabled in the compiled library, and enable assertions
   by default when building user code as well. Assertions can be turned off by users
-  by defining ``_LIBCPP_ENABLE_ASSERTIONS=0``. For details, see
+  by defining ``_LIBCUDACXX_ENABLE_ASSERTIONS=0``. For details, see
   :ref:`the documentation <assertions-mode>`.
 
 .. option:: LIBCXX_ENABLE_SHARED:BOOL

diff  --git a/libcxx/docs/Contributing.rst b/libcxx/docs/Contributing.rst
index 15c75e8c5168..b3b0af01dc9d 100644
--- a/libcxx/docs/Contributing.rst
+++ b/libcxx/docs/Contributing.rst
@@ -39,7 +39,7 @@ sure you don't forget anything:
 
   - Did you add it to ``include/module.modulemap.in``?
   - Did you add it to ``include/CMakeLists.txt``?
-  - If it's a public header, did you add a test under ``test/libcxx`` that the new header defines ``_LIBCPP_VERSION``? See ``test/libcxx/algorithms/version.pass.cpp`` for an example. NOTE: This should be automated.
+  - If it's a public header, did you add a test under ``test/libcxx`` that the new header defines ``_LIBCUDACXX_VERSION``? See ``test/libcxx/algorithms/version.pass.cpp`` for an example. NOTE: This should be automated.
   - If it's a public header, did you update ``utils/generate_header_inclusion_tests.py``?
 
 - Did you add the relevant feature test macro(s) for your feature? Did you update the ``generate_feature_test_macro_components.py`` script with it?
@@ -66,9 +66,9 @@ Post-release check list
 
 After branching for an LLVM release:
 
-1. Update ``_LIBCPP_VERSION`` in ``libcxx/include/__config``
+1. Update ``_LIBCUDACXX_VERSION`` in ``libcxx/include/__config``
 2. Update the version number in ``libcxx/docs/conf.py``
-3. Update ``_LIBCPPABI_VERSION`` in ``libcxxabi/include/cxxabi.h``
+3. Update ``_LIBCUDACXXABI_VERSION`` in ``libcxxabi/include/cxxabi.h``
 4. Update ``_LIBUNWIND_VERSION`` in ``libunwind/include/__libunwind_config.h``
 
 Exporting new symbols from the library

diff  --git a/libcxx/docs/DesignDocs/ABIVersioning.rst b/libcxx/docs/DesignDocs/ABIVersioning.rst
index 3b82f3cc60a4..9086003c0e11 100644
--- a/libcxx/docs/DesignDocs/ABIVersioning.rst
+++ b/libcxx/docs/DesignDocs/ABIVersioning.rst
@@ -18,7 +18,7 @@ To always use the most cutting-edge, most unstable ABI (which is currently ``2``
 but at some point will become ``3``), set the CMake option ``LIBCXX_ABI_UNSTABLE``.
 
 Internally, each ABI-changing feature is placed under its own C++ macro,
-``_LIBCPP_ABI_XXX``. These macros' definitions are controlled by the C++ macro
-``_LIBCPP_ABI_VERSION``, which is controlled by the ``LIBCXX_ABI_VERSION`` set
+``_LIBCUDACXX_ABI_XXX``. These macros' definitions are controlled by the C++ macro
+``_LIBCUDACXX_ABI_VERSION``, which is controlled by the ``LIBCXX_ABI_VERSION`` set
 at build time. Libc++ does not intend users to interact with these C++ macros
 directly.

diff  --git a/libcxx/docs/DesignDocs/DebugMode.rst b/libcxx/docs/DesignDocs/DebugMode.rst
index 9d0e78e7581b..538d0fa3fd61 100644
--- a/libcxx/docs/DesignDocs/DebugMode.rst
+++ b/libcxx/docs/DesignDocs/DebugMode.rst
@@ -58,4 +58,4 @@ the relative order of equal elements in ``std::sort`` or randomizing both parts
 partition after calling ``std::nth_element``. This effort helps migrating to potential
 future faster versions of these algorithms that might not have the exact same behavior.
 In particular, it makes it easier to deflake tests that depend on unspecified behavior.
-A seed can be used to make such failures reproducible: use ``_LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED=seed``.
+A seed can be used to make such failures reproducible: use ``_LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED=seed``.

diff  --git a/libcxx/docs/DesignDocs/ExperimentalFeatures.rst b/libcxx/docs/DesignDocs/ExperimentalFeatures.rst
index defe0e4e2428..ef51a04083c6 100644
--- a/libcxx/docs/DesignDocs/ExperimentalFeatures.rst
+++ b/libcxx/docs/DesignDocs/ExperimentalFeatures.rst
@@ -43,7 +43,7 @@ warning for the corresponding experimental feature warning users to move off
 of it and to the now-standardized feature.
 
 These deprecation warnings are guarded by a macro of the form
-``_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_<FEATURE>``, which
+``_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_<FEATURE>``, which
 can be defined by users to disable the deprecation warning. Whenever
 possible, deprecation warnings are put on a per-declaration basis
 using the ``[[deprecated]]`` attribute, which also allows disabling

diff  --git a/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst b/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst
index 330ce74cf77a..d37292615ff3 100644
--- a/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst
+++ b/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst
@@ -25,7 +25,7 @@ In order to support vendors with custom threading API's libc++ allows the
 entire internal threading interface to be provided by an external,
 vendor provided, header.
 
-When ``_LIBCPP_HAS_THREAD_API_EXTERNAL`` is defined the ``<__threading_support>``
+When ``_LIBCUDACXX_HAS_THREAD_API_EXTERNAL`` is defined the ``<__threading_support>``
 header simply forwards to the ``<__external_threading>`` header (which must exist).
 It is expected that the ``<__external_threading>`` header provide the exact
 interface normally provided by ``<__threading_support>``.
@@ -53,30 +53,30 @@ developers.
 Threading Configuration Macros
 ==============================
 
-**_LIBCPP_HAS_NO_THREADS**
+**_LIBCUDACXX_HAS_NO_THREADS**
   This macro is defined when libc++ is built without threading support. It
   should not be manually defined by the user.
 
-**_LIBCPP_HAS_THREAD_API_EXTERNAL**
+**_LIBCUDACXX_HAS_THREAD_API_EXTERNAL**
   This macro is defined when libc++ should use the ``<__external_threading>``
   header to provide the internal threading API. This macro overrides
-  ``_LIBCPP_HAS_THREAD_API_PTHREAD``.
+  ``_LIBCUDACXX_HAS_THREAD_API_PTHREAD``.
 
-**_LIBCPP_HAS_THREAD_API_PTHREAD**
+**_LIBCUDACXX_HAS_THREAD_API_PTHREAD**
   This macro is defined when libc++ should use POSIX threads to implement the
   internal threading API.
 
-**_LIBCPP_HAS_THREAD_API_WIN32**
+**_LIBCUDACXX_HAS_THREAD_API_WIN32**
   This macro is defined when libc++ should use Win32 threads to implement the
   internal threading API.
 
-**_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL**
+**_LIBCUDACXX_HAS_THREAD_LIBRARY_EXTERNAL**
   This macro is defined when libc++ expects the definitions of the internal
   threading API to be provided by an external library. When defined
   ``<__threading_support>`` will only provide the forward declarations and
   typedefs for the internal threading API.
 
-**_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL**
+**_LIBCUDACXX_BUILDING_THREAD_LIBRARY_EXTERNAL**
   This macro is used to build an external threading library using the
   ``<__threading_support>``. Specifically it exposes the threading API
   definitions in ``<__threading_support>`` as non-inline definitions meant to

diff  --git a/libcxx/docs/DesignDocs/UnspecifiedBehaviorRandomization.rst b/libcxx/docs/DesignDocs/UnspecifiedBehaviorRandomization.rst
index 7e92e27120b5..a279c1eb94cc 100644
--- a/libcxx/docs/DesignDocs/UnspecifiedBehaviorRandomization.rst
+++ b/libcxx/docs/DesignDocs/UnspecifiedBehaviorRandomization.rst
@@ -35,7 +35,7 @@ to gradually fix their tests while updating to new faster algorithms.
 Design
 ======
 
-* Introduce new macro ``_LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY`` which should
+* Introduce new macro ``_LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY`` which should
   be a part of the libcxx config.
 * This macro randomizes the unspecified behavior of algorithms and containers.
   For example, for sorting algorithm the input range is shuffled and then
@@ -50,7 +50,7 @@ Design
   runs, for example, for tests become flaky and eventually be seen as broken.
   For platforms which do not support ASLR, the seed is fixed during build.
 * The users can fix the seed of the random number generator by providing
-  ``_LIBCPP_RANDOMIZE_UNSPECIFIED_STABILITY_SEED=seed`` definition.
+  ``_LIBCUDACXX_RANDOMIZE_UNSPECIFIED_STABILITY_SEED=seed`` definition.
 
 This comes with some side effects if any of the flags is on:
 

diff  --git a/libcxx/docs/DesignDocs/VisibilityMacros.rst b/libcxx/docs/DesignDocs/VisibilityMacros.rst
index d1c162682b66..e7b1df4f983a 100644
--- a/libcxx/docs/DesignDocs/VisibilityMacros.rst
+++ b/libcxx/docs/DesignDocs/VisibilityMacros.rst
@@ -17,22 +17,22 @@ visibility and inlining characteristics of the symbols they are applied to.
 Visibility Macros
 =================
 
-**_LIBCPP_HIDDEN**
+**_LIBCUDACXX_HIDDEN**
   Mark a symbol as hidden so it will not be exported from shared libraries.
 
-**_LIBCPP_FUNC_VIS**
+**_LIBCUDACXX_FUNC_VIS**
   Mark a symbol as being exported by the libc++ library. This attribute must
   be applied to the declaration of all functions exported by the libc++ dylib.
 
-**_LIBCPP_EXPORTED_FROM_ABI**
+**_LIBCUDACXX_EXPORTED_FROM_ABI**
   Mark a symbol as being exported by the libc++ library. This attribute may
   only be applied to objects defined in the libc++ runtime library. On Windows,
   this macro applies `dllimport`/`dllexport` to the symbol, and on other
   platforms it gives the symbol default visibility.
 
-**_LIBCPP_OVERRIDABLE_FUNC_VIS**
+**_LIBCUDACXX_OVERRIDABLE_FUNC_VIS**
   Mark a symbol as being exported by the libc++ library, but allow it to be
-  overridden locally. On non-Windows, this is equivalent to `_LIBCPP_FUNC_VIS`.
+  overridden locally. On non-Windows, this is equivalent to `_LIBCUDACXX_FUNC_VIS`.
   This macro is applied to all `operator new` and `operator delete` overloads.
 
   **Windows Behavior**: Any symbol marked `dllimport` cannot be overridden
@@ -42,16 +42,16 @@ Visibility Macros
   this macro therefore expands to `__declspec(dllexport)` when building the
   library and has an empty definition otherwise.
 
-**_LIBCPP_HIDE_FROM_ABI**
+**_LIBCUDACXX_HIDE_FROM_ABI**
   Mark a function as not being part of the ABI of any final linked image that
   uses it.
 
-**_LIBCPP_INLINE_VISIBILITY**
-  Historical predecessor of ``_LIBCPP_HIDE_FROM_ABI`` -- please use
-  ``_LIBCPP_HIDE_FROM_ABI`` instead.
+**_LIBCUDACXX_INLINE_VISIBILITY**
+  Historical predecessor of ``_LIBCUDACXX_HIDE_FROM_ABI`` -- please use
+  ``_LIBCUDACXX_HIDE_FROM_ABI`` instead.
 
-**_LIBCPP_HIDE_FROM_ABI_AFTER_V1**
-  Mark a function as being hidden from the ABI (per `_LIBCPP_HIDE_FROM_ABI`)
+**_LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1**
+  Mark a function as being hidden from the ABI (per `_LIBCUDACXX_HIDE_FROM_ABI`)
   when libc++ is built with an ABI version after ABI v1. This macro is used to
   maintain ABI compatibility for symbols that have been historically exported
   by libc++ in v1 of the ABI, but that we don't want to export in the future.
@@ -62,14 +62,14 @@ Visibility Macros
   building libc++), the macro always marks symbols as internal so that programs
   built using new libc++ headers stop relying on symbols that are removed from
   the ABI in a future version. Each time we release a new stable version of the
-  ABI, we should create a new _LIBCPP_HIDE_FROM_ABI_AFTER_XXX macro, and we can
+  ABI, we should create a new _LIBCUDACXX_HIDE_FROM_ABI_AFTER_XXX macro, and we can
   use it to start removing symbols from the ABI after that stable version.
 
-**_LIBCPP_TYPE_VIS**
+**_LIBCUDACXX_TYPE_VIS**
   Mark a type's typeinfo, vtable and members as having default visibility.
   This attribute cannot be used on class templates.
 
-**_LIBCPP_TEMPLATE_VIS**
+**_LIBCUDACXX_TEMPLATE_VIS**
   Mark a type's typeinfo and vtable as having default visibility.
   This macro has no effect on the visibility of the type's member functions.
 
@@ -81,7 +81,7 @@ Visibility Macros
   The macro has an empty definition on this platform.
 
 
-**_LIBCPP_ENUM_VIS**
+**_LIBCUDACXX_ENUM_VIS**
   Mark the typeinfo of an enum as having default visibility. This attribute
   should be applied to all enum declarations.
 
@@ -93,12 +93,12 @@ Visibility Macros
   attribute to an enum class results in a warning. The macro has an empty
   definition with GCC.
 
-**_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS**
+**_LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS**
   Mark the member functions, typeinfo, and vtable of the type named in
   an extern template declaration as being exported by the libc++ library.
   This attribute must be specified on all extern class template declarations.
 
-  This macro is used to override the `_LIBCPP_TEMPLATE_VIS` attribute
+  This macro is used to override the `_LIBCUDACXX_TEMPLATE_VIS` attribute
   specified on the primary template and to export the member functions produced
   by the explicit instantiation in the dylib.
 
@@ -111,10 +111,10 @@ Visibility Macros
   explicit instantiations themselves are marked as exported. Note that this
   applies *only* to extern *class* templates. Extern *function* templates obey
   regular import/export semantics, and applying `dllexport` directly to the
-  extern template declaration (i.e. using `_LIBCPP_FUNC_VIS`) is the correct
+  extern template declaration (i.e. using `_LIBCUDACXX_FUNC_VIS`) is the correct
   thing to do for them.
 
-**_LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS**
+**_LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS**
   Mark the member functions, typeinfo, and vtable of an explicit instantiation
   of a class template as being exported by the libc++ library. This attribute
   must be specified on all class template explicit instantiations.
@@ -123,22 +123,22 @@ Visibility Macros
   the extern template declaration) as exported on Windows, as discussed above.
   On all other platforms, this macro has an empty definition.
 
-**_LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS**
+**_LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS**
   Mark a symbol as hidden so it will not be exported from shared libraries. This
   is intended specifically for method templates of either classes marked with
-  `_LIBCPP_TYPE_VIS` or classes with an extern template instantiation
-  declaration marked with `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS`.
+  `_LIBCUDACXX_TYPE_VIS` or classes with an extern template instantiation
+  declaration marked with `_LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS`.
 
   When building libc++ with hidden visibility, we want explicit template
   instantiations to export members, which is consistent with existing Windows
-  behavior. We also want classes annotated with `_LIBCPP_TYPE_VIS` to export
+  behavior. We also want classes annotated with `_LIBCUDACXX_TYPE_VIS` to export
   their members, which is again consistent with existing Windows behavior.
   Both these changes are necessary for clients to be able to link against a
   libc++ DSO built with hidden visibility without encountering missing symbols.
 
   An unfortunate side effect, however, is that method templates of classes
-  either marked `_LIBCPP_TYPE_VIS` or with extern template instantiation
-  declarations marked with `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` also get default
+  either marked `_LIBCUDACXX_TYPE_VIS` or with extern template instantiation
+  declarations marked with `_LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS` also get default
   visibility when instantiated. These methods are often implicitly instantiated
   inside other libraries which use the libc++ headers, and will therefore end up
   being exported from those libraries, since those implicit instantiations will
@@ -149,10 +149,10 @@ Visibility Macros
   either hidden (via this macro) or inline, so that they don't leak into client
   libraries. The problematic methods were found by running
   `bad-visibility-finder <https://github.com/smeenai/bad-visibility-finder>`_
-  against the libc++ headers after making `_LIBCPP_TYPE_VIS` and
-  `_LIBCPP_EXTERN_TEMPLATE_TYPE_VIS` expand to default visibility.
+  against the libc++ headers after making `_LIBCUDACXX_TYPE_VIS` and
+  `_LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS` expand to default visibility.
 
-**_LIBCPP_EXCEPTION_ABI**
+**_LIBCUDACXX_EXCEPTION_ABI**
   Mark the member functions, typeinfo, and vtable of the type as being exported
   by the libc++ library. This macro must be applied to all *exception types*.
   Exception types should be defined directly in namespace `std` and not the

diff  --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index 76a227b5c6d0..5c1a20176019 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -112,9 +112,9 @@ Improvements and New Features
   argument for the formatting functions. This change causes bit fields to become
   invalid arguments for the formatting functions.
 
-- The ``_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION`` macro has been added to allow
+- The ``_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION`` macro has been added to allow
   re-enabling the ``allocator<void>`` specialization. When used in conjunction with
-  ``_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS``, this ensures that the members of
+  ``_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS``, this ensures that the members of
   ``allocator<void>`` removed in C++20 can be accessed.
 
 - ``boyer_moore_searcher`` and ``boyer_moore_horspool_searcher`` have been implemented.
@@ -128,37 +128,37 @@ Deprecations and Removals
 
 - The header ``<experimental/filesystem>`` has been removed. Instead, use
   ``<filesystem>`` header. The associated macro
-  ``_LIBCPP_DEPRECATED_EXPERIMENTAL_FILESYSTEM`` has been removed too.
+  ``_LIBCUDACXX_DEPRECATED_EXPERIMENTAL_FILESYSTEM`` has been removed too.
 
 - The C++14 function ``std::quoted(const char*)`` is no longer supported in
   C++03 or C++11 modes.
 
-- Setting a custom debug handler with ``std::__libcpp_debug_function`` is not
+- Setting a custom debug handler with ``std::__LIBCUDACXX_debug_function`` is not
   supported anymore. Please migrate to using the new support for
   :ref:`assertions <assertions-mode>` instead.
 
 - ``std::function`` has been removed in C++03. If you are using it, please remove usages
   or upgrade to C++11 or later. It is possible to re-enable ``std::function`` in C++03 by defining
-  ``_LIBCPP_ENABLE_CXX03_FUNCTION``. This option will be removed in LLVM 16.
+  ``_LIBCUDACXX_ENABLE_CXX03_FUNCTION``. This option will be removed in LLVM 16.
 
 - ``unary_function`` and ``binary_function`` are no longer available in C++17 and C++20.
-  They can be re-enabled by defining ``_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION``.
+  They can be re-enabled by defining ``_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION``.
   They are also marked as ``[[deprecated]]`` in C++11 and later. To disable deprecation warnings
-  you have to define ``_LIBCPP_DISABLE_DEPRECATION_WARNINGS``. Note that this disables
+  you have to define ``_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS``. Note that this disables
   all deprecation warnings.
 
 - The contents of ``<codecvt>``, ``wstring_convert`` and ``wbuffer_convert`` have been marked as deprecated.
-  To disable deprecation warnings you have to define ``_LIBCPP_DISABLE_DEPRECATION_WARNINGS``. Note that this
+  To disable deprecation warnings you have to define ``_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS``. Note that this
   disables all deprecation warnings.
 
-- The ``_LIBCPP_DISABLE_EXTERN_TEMPLATE`` macro is not honored anymore when defined by
+- The ``_LIBCUDACXX_DISABLE_EXTERN_TEMPLATE`` macro is not honored anymore when defined by
   users of libc++. Instead, users not wishing to take a dependency on libc++ should link
   against the static version of libc++, which will result in no dependency being
   taken against the shared library.
 
-- The ``_LIBCPP_ABI_UNSTABLE`` macro has been removed in favour of setting
-  ``_LIBCPP_ABI_VERSION=2``. This should not have any impact on users because
-  they were not supposed to set ``_LIBCPP_ABI_UNSTABLE`` manually, however we
+- The ``_LIBCUDACXX_ABI_UNSTABLE`` macro has been removed in favour of setting
+  ``_LIBCUDACXX_ABI_VERSION=2``. This should not have any impact on users because
+  they were not supposed to set ``_LIBCUDACXX_ABI_UNSTABLE`` manually, however we
   still feel that it is worth mentioning in the release notes in case some users
   had been doing it.
 
@@ -174,30 +174,30 @@ Deprecations and Removals
 Upcoming Deprecations and Removals
 ----------------------------------
 
-- The ``_LIBCPP_DEBUG`` macro is not supported anymore. It will be honoured until
+- The ``_LIBCUDACXX_DEBUG`` macro is not supported anymore. It will be honoured until
   LLVM 16, and then it will be an error to define that macro. To enable basic
-  assertions (previously ``_LIBCPP_DEBUG=0``), please use ``_LIBCPP_ENABLE_ASSERTIONS=1``.
-  To enable the debug mode (previously ``_LIBCPP_DEBUG=1|2``), please ensure that
+  assertions (previously ``_LIBCUDACXX_DEBUG=0``), please use ``_LIBCUDACXX_ENABLE_ASSERTIONS=1``.
+  To enable the debug mode (previously ``_LIBCUDACXX_DEBUG=1|2``), please ensure that
   the library has been built with support for the debug mode, and it will be
-  enabled automatically (no need to define ``_LIBCPP_DEBUG``).
+  enabled automatically (no need to define ``_LIBCUDACXX_DEBUG``).
 
 - The experimental versions of ``boyer_moore_searcher`` and ``boyer_moore_horspool_searcher``
   will be removed in LLVM 17. You can disable the deprecation warnings by defining
-  ``_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS``.
+  ``_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS``.
 
 - The implementation of the Coroutines TS in ``std::experimental`` will be removed in LLVM 16.
 
 - Libc++ is getting ready to remove unnecessary transitive inclusions. This may
   break your code in the future. To future-proof your code to these removals,
-  please compile your code with ``_LIBCPP_REMOVE_TRANSITIVE_INCLUDES`` defined
+  please compile your code with ``_LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES`` defined
   and fix any compilation error resulting from missing includes.
 
 ABI Affecting Changes
 ---------------------
 
-- The ``_LIBCPP_ABI_USE_CXX03_NULLPTR_EMULATION`` macro controlling whether we use an
+- The ``_LIBCUDACXX_ABI_USE_CXX03_NULLPTR_EMULATION`` macro controlling whether we use an
   emulation for ``std::nullptr_t`` in C++03 mode has been removed. After this change,
-  ``_LIBCPP_ABI_USE_CXX03_NULLPTR_EMULATION`` will not be honoured anymore and there
+  ``_LIBCUDACXX_ABI_USE_CXX03_NULLPTR_EMULATION`` will not be honoured anymore and there
   will be no way to opt back into the C++03 emulation of ``std::nullptr_t``.
 
 - On FreeBSD, NetBSD, DragonFlyBSD and Solaris, ``std::random_device`` is now implemented on

diff  --git a/libcxx/docs/UsingLibcxx.rst b/libcxx/docs/UsingLibcxx.rst
index b3f1bf96c968..c869d8182008 100644
--- a/libcxx/docs/UsingLibcxx.rst
+++ b/libcxx/docs/UsingLibcxx.rst
@@ -54,7 +54,7 @@ are disabled by default because they are neither API nor ABI stable. However, th
 
 .. note::
   On compilers that do not support the ``-fexperimental-library`` flag, users can
-  define the ``_LIBCPP_ENABLE_EXPERIMENTAL`` macro and manually link against the
+  define the ``_LIBCUDACXX_ENABLE_EXPERIMENTAL`` macro and manually link against the
   appropriate static library (usually shipped as ``libc++experimental.a``) to get
   access to experimental library features.
 
@@ -143,14 +143,14 @@ assertions and the default when building user code will be to have assertions di
 As a user, you can consult your vendor to know whether assertions are enabled by default.
 
 Furthermore, independently of any vendor-selected default, users can always control whether
-assertions are enabled in their code by defining ``_LIBCPP_ENABLE_ASSERTIONS=0|1`` before
-including any libc++ header (we recommend passing ``-D_LIBCPP_ENABLE_ASSERTIONS=X`` to the
+assertions are enabled in their code by defining ``_LIBCUDACXX_ENABLE_ASSERTIONS=0|1`` before
+including any libc++ header (we recommend passing ``-D_LIBCUDACXX_ENABLE_ASSERTIONS=X`` to the
 compiler). Note that if the compiled library was built by the vendor without assertions,
 functions compiled inside the static or shared library won't have assertions enabled even
-if the user defines ``_LIBCPP_ENABLE_ASSERTIONS=1`` (the same is true for the inverse case
+if the user defines ``_LIBCUDACXX_ENABLE_ASSERTIONS=1`` (the same is true for the inverse case
 where the static or shared library was compiled **with** assertions but the user tries to
 disable them). However, most of the code in libc++ is in the headers, so the user-selected
-value for ``_LIBCPP_ENABLE_ASSERTIONS`` (if any) will usually be respected.
+value for ``_LIBCUDACXX_ENABLE_ASSERTIONS`` (if any) will usually be respected.
 
 When an assertion fails, the program is aborted through a special verbose termination function. The
 library provides a default function that prints an error message and calls ``std::abort()``. Note
@@ -161,12 +161,12 @@ However, users can also override that function with their own, which can be usef
 custom behavior or when deploying to an older platform where the default function isn't available.
 
 Replacing the default verbose termination function is done by defining the
-``_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED`` macro in all translation units of your program
+``_LIBCUDACXX_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED`` macro in all translation units of your program
 and defining the following function in exactly one translation unit:
 
 .. code-block:: cpp
 
-  void __libcpp_verbose_abort(char const* format, ...)
+  void __LIBCUDACXX_verbose_abort(char const* format, ...)
 
 This mechanism is similar to how one can replace the default definition of ``operator new``
 and ``operator delete``. For example:
@@ -176,7 +176,7 @@ and ``operator delete``. For example:
   // In HelloWorldHandler.cpp
   #include <version> // must include any libc++ header before defining the function (C compatibility headers excluded)
 
-  void std::__libcpp_verbose_abort(char const* format, ...) {
+  void std::__LIBCUDACXX_verbose_abort(char const* format, ...) {
     va_list list;
     va_start(list, format);
     std::vfprintf(stderr, format, list);
@@ -190,7 +190,7 @@ and ``operator delete``. For example:
 
   int main() {
     std::vector<int> v;
-    int& x = v[0]; // Your termination function will be called here if _LIBCPP_ENABLE_ASSERTIONS=1
+    int& x = v[0]; // Your termination function will be called here if _LIBCUDACXX_ENABLE_ASSERTIONS=1
   }
 
 Also note that the verbose termination function should never return. Since assertions in libc++
@@ -208,18 +208,18 @@ Libc++ provides a number of configuration macros which can be used to enable
 or disable extended libc++ behavior, including enabling "debug mode" or
 thread safety annotations.
 
-**_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS**:
+**_LIBCUDACXX_ENABLE_THREAD_SAFETY_ANNOTATIONS**:
   This macro is used to enable -Wthread-safety annotations on libc++'s
   ``std::mutex`` and ``std::lock_guard``. By default, these annotations are
   disabled and must be manually enabled by the user.
 
-**_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS**:
+**_LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS**:
   This macro is used to disable all visibility annotations inside libc++.
   Defining this macro and then building libc++ with hidden visibility gives a
   build of libc++ which does not export any symbols, which can be useful when
   building statically for inclusion into another library.
 
-**_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS**:
+**_LIBCUDACXX_DISABLE_ADDITIONAL_DIAGNOSTICS**:
   This macro disables the additional diagnostics generated by libc++ using the
   `diagnose_if` attribute. These additional diagnostics include checks for:
 
@@ -228,7 +228,7 @@ thread safety annotations.
     * Giving an unordered associative container a hasher that is not const
       callable.
 
-**_LIBCPP_NO_VCRUNTIME**:
+**_LIBCUDACXX_NO_VCRUNTIME**:
   Microsoft's C and C++ headers are fairly entangled, and some of their C++
   headers are fairly hard to avoid. In particular, `vcruntime_new.h` gets pulled
   in from a lot of other headers and provides definitions which clash with
@@ -239,7 +239,7 @@ thread safety annotations.
   By default, libc++ solves this problem by deferring to Microsoft's vcruntime
   headers where needed. However, it may be undesirable to depend on vcruntime
   headers, since they may not always be available in cross-compilation setups,
-  or they may clash with other headers. The `_LIBCPP_NO_VCRUNTIME` macro
+  or they may clash with other headers. The `_LIBCUDACXX_NO_VCRUNTIME` macro
   prevents libc++ from depending on vcruntime headers. Consequently, it also
   prevents libc++ headers from being interoperable with vcruntime headers (from
   the aforementioned clashes), so users of this macro are promising to not
@@ -248,7 +248,7 @@ thread safety annotations.
   replacement scenarios from working, e.g. replacing `operator new` and
   expecting a non-replaced `operator new[]` to call the replaced `operator new`.
 
-**_LIBCPP_ENABLE_NODISCARD**:
+**_LIBCUDACXX_ENABLE_NODISCARD**:
   Allow the library to add ``[[nodiscard]]`` attributes to entities not specified
   as ``[[nodiscard]]`` by the current language dialect. This includes
   backporting applications of ``[[nodiscard]]`` from newer dialects and
@@ -257,12 +257,12 @@ thread safety annotations.
   See :ref:`Extended Applications of [[nodiscard]] <nodiscard extension>` for
   more information.
 
-**_LIBCPP_DISABLE_NODISCARD_EXT**:
+**_LIBCUDACXX_DISABLE_NODISCARD_EXT**:
   This macro prevents the library from applying ``[[nodiscard]]`` to entities
   purely as an extension. See :ref:`Extended Applications of [[nodiscard]] <nodiscard extension>`
   for more information.
 
-**_LIBCPP_DISABLE_DEPRECATION_WARNINGS**:
+**_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS**:
   This macro disables warnings when using deprecated components. For example,
   using `std::auto_ptr` when compiling in C++11 mode will normally trigger a
   warning saying that `std::auto_ptr` is deprecated. If the macro is defined,
@@ -270,14 +270,14 @@ thread safety annotations.
 
 C++17 Specific Configuration Macros
 -----------------------------------
-**_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES**:
+**_LIBCUDACXX_ENABLE_CXX17_REMOVED_FEATURES**:
   This macro is used to re-enable all the features removed in C++17. The effect
   is equivalent to manually defining each macro listed below.
 
-**_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR**:
+**_LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR**:
   This macro is used to re-enable `auto_ptr`.
 
-**_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS**:
+**_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS**:
   This macro is used to re-enable the `binder1st`, `binder2nd`,
   `pointer_to_unary_function`, `pointer_to_binary_function`, `mem_fun_t`,
   `mem_fun1_t`, `mem_fun_ref_t`, `mem_fun1_ref_t`, `const_mem_fun_t`,
@@ -285,48 +285,48 @@ C++17 Specific Configuration Macros
   class templates, and the `bind1st`, `bind2nd`, `mem_fun`, `mem_fun_ref`,
   and `ptr_fun` functions.
 
-**_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE**:
+**_LIBCUDACXX_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE**:
   This macro is used to re-enable the `random_shuffle` algorithm.
 
-**_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS**:
+**_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS**:
   This macro is used to re-enable `set_unexpected`, `get_unexpected`, and
   `unexpected`.
 
 C++20 Specific Configuration Macros
 -----------------------------------
-**_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17**:
+**_LIBCUDACXX_DISABLE_NODISCARD_AFTER_CXX17**:
   This macro can be used to disable diagnostics emitted from functions marked
   ``[[nodiscard]]`` in dialects after C++17.  See :ref:`Extended Applications of [[nodiscard]] <nodiscard extension>`
   for more information.
 
-**_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES**:
+**_LIBCUDACXX_ENABLE_CXX20_REMOVED_FEATURES**:
   This macro is used to re-enable all the features removed in C++20. The effect
   is equivalent to manually defining each macro listed below.
 
-**_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS**:
+**_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS**:
   This macro is used to re-enable redundant members of `allocator<T>`,
   including `pointer`, `reference`, `rebind`, `address`, `max_size`,
   `construct`, `destroy`, and the two-argument overload of `allocate`.
 
-**_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION**:
+**_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION**:
   This macro is used to re-enable the library-provided specializations of
   `allocator<void>` and `allocator<const void>`.
-  Use it in conjunction with `_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS`
+  Use it in conjunction with `_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS`
   to ensure that removed members of `allocator<void>` can be accessed.
 
-**_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS**:
+**_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS**:
   This macro is used to re-enable the `argument_type`, `result_type`,
   `first_argument_type`, and `second_argument_type` members of class
   templates such as `plus`, `logical_not`, `hash`, and `owner_less`.
 
-**_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS**:
+**_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS**:
   This macro is used to re-enable `not1`, `not2`, `unary_negate`,
   and `binary_negate`.
 
-**_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR**:
+**_LIBCUDACXX_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR**:
   This macro is used to re-enable `raw_storage_iterator`.
 
-**_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS**:
+**_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS**:
   This macro is used to re-enable `is_literal_type`, `is_literal_type_v`,
   `result_of` and `result_of_t`.
 
@@ -350,7 +350,7 @@ Users who want help diagnosing misuses of STL functions may desire a more
 liberal application of ``[[nodiscard]]``.
 
 For this reason libc++ provides an extension that does just that! The
-extension must be enabled by defining ``_LIBCPP_ENABLE_NODISCARD``. The extended
+extension must be enabled by defining ``_LIBCUDACXX_ENABLE_NODISCARD``. The extended
 applications of ``[[nodiscard]]`` takes two forms:
 
 1. Backporting ``[[nodiscard]]`` to entities declared as such by the
@@ -364,13 +364,13 @@ additional macros.
 
 Applications of the first form, which backport ``[[nodiscard]]`` from a newer
 dialect, may be disabled using macros specific to the dialect in which it was
-added. For example, ``_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17``.
+added. For example, ``_LIBCUDACXX_DISABLE_NODISCARD_AFTER_CXX17``.
 
 Applications of the second form, which are pure extensions, may be disabled
-by defining ``_LIBCPP_DISABLE_NODISCARD_EXT``.
+by defining ``_LIBCUDACXX_DISABLE_NODISCARD_EXT``.
 
 
-Entities declared with ``_LIBCPP_NODISCARD_EXT``
+Entities declared with ``_LIBCUDACXX_NODISCARD_EXT``
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 This section lists all extended applications of ``[[nodiscard]]`` to entities

diff  --git a/libcxx/include/__algorithm/adjacent_find.h b/libcxx/include/__algorithm/adjacent_find.h
index 1089bb20d5b2..d6c60dfd49ac 100644
--- a/libcxx/include/__algorithm/adjacent_find.h
+++ b/libcxx/include/__algorithm/adjacent_find.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_ADJACENT_FIND_H
-#define _LIBCPP___ALGORITHM_ADJACENT_FIND_H
+#ifndef _LIBCUDACXX___ALGORITHM_ADJACENT_FIND_H
+#define _LIBCUDACXX___ALGORITHM_ADJACENT_FIND_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/iterator_operations.h>
@@ -16,14 +16,14 @@
 #include <__iterator/iterator_traits.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Iter, class _Sent, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Iter
 __adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
   if (__first == __last)
     return __first;
@@ -37,18 +37,18 @@ __adjacent_find(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
 }
 
 template <class _ForwardIterator, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 adjacent_find(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) {
   return std::__adjacent_find(std::move(__first), std::move(__last), __pred);
 }
 
 template <class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 adjacent_find(_ForwardIterator __first, _ForwardIterator __last) {
   typedef typename iterator_traits<_ForwardIterator>::value_type __v;
   return std::adjacent_find(std::move(__first), std::move(__last), __equal_to<__v>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_ADJACENT_FIND_H
+#endif // _LIBCUDACXX___ALGORITHM_ADJACENT_FIND_H

diff  --git a/libcxx/include/__algorithm/all_of.h b/libcxx/include/__algorithm/all_of.h
index 3af32a577504..f37540040f33 100644
--- a/libcxx/include/__algorithm/all_of.h
+++ b/libcxx/include/__algorithm/all_of.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_ALL_OF_H
-#define _LIBCPP___ALGORITHM_ALL_OF_H
+#ifndef _LIBCUDACXX___ALGORITHM_ALL_OF_H
+#define _LIBCUDACXX___ALGORITHM_ALL_OF_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
   for (; __first != __last; ++__first)
     if (!__pred(*__first))
@@ -27,6 +27,6 @@ all_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
   return true;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_ALL_OF_H
+#endif // _LIBCUDACXX___ALGORITHM_ALL_OF_H

diff  --git a/libcxx/include/__algorithm/any_of.h b/libcxx/include/__algorithm/any_of.h
index 6fe6a0b6b3c4..fc5ad6642301 100644
--- a/libcxx/include/__algorithm/any_of.h
+++ b/libcxx/include/__algorithm/any_of.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_ANY_OF_H
-#define _LIBCPP___ALGORITHM_ANY_OF_H
+#ifndef _LIBCUDACXX___ALGORITHM_ANY_OF_H
+#define _LIBCUDACXX___ALGORITHM_ANY_OF_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
   for (; __first != __last; ++__first)
     if (__pred(*__first))
@@ -27,6 +27,6 @@ any_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
   return false;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_ANY_OF_H
+#endif // _LIBCUDACXX___ALGORITHM_ANY_OF_H

diff  --git a/libcxx/include/__algorithm/binary_search.h b/libcxx/include/__algorithm/binary_search.h
index a44007237850..cf486e7eb7f9 100644
--- a/libcxx/include/__algorithm/binary_search.h
+++ b/libcxx/include/__algorithm/binary_search.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_BINARY_SEARCH_H
-#define _LIBCPP___ALGORITHM_BINARY_SEARCH_H
+#ifndef _LIBCUDACXX___ALGORITHM_BINARY_SEARCH_H
+#define _LIBCUDACXX___ALGORITHM_BINARY_SEARCH_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -15,15 +15,15 @@
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp)
 {
@@ -33,8 +33,8 @@ binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __va
 }
 
 template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
 {
@@ -42,6 +42,6 @@ binary_search(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __va
                               __less<typename iterator_traits<_ForwardIterator>::value_type, _Tp>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_BINARY_SEARCH_H
+#endif // _LIBCUDACXX___ALGORITHM_BINARY_SEARCH_H

diff  --git a/libcxx/include/__algorithm/clamp.h b/libcxx/include/__algorithm/clamp.h
index 30ddbdce64a9..e63400cfa498 100644
--- a/libcxx/include/__algorithm/clamp.h
+++ b/libcxx/include/__algorithm/clamp.h
@@ -6,41 +6,41 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_CLAMP_H
-#define _LIBCPP___ALGORITHM_CLAMP_H
+#ifndef _LIBCUDACXX___ALGORITHM_CLAMP_H
+#define _LIBCUDACXX___ALGORITHM_CLAMP_H
 
 #include <__algorithm/comp.h>
 #include <__assert>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template<class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 const _Tp&
 clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi, _Compare __comp)
 {
-    _LIBCPP_ASSERT(!__comp(__hi, __lo), "Bad bounds passed to std::clamp");
+    _LIBCUDACXX_ASSERT(!__comp(__hi, __lo), "Bad bounds passed to std::clamp");
     return __comp(__v, __lo) ? __lo : __comp(__hi, __v) ? __hi : __v;
 
 }
 
 template<class _Tp>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 const _Tp&
 clamp(const _Tp& __v, const _Tp& __lo, const _Tp& __hi)
 {
-    return _VSTD::clamp(__v, __lo, __hi, __less<_Tp>());
+    return _CUDA_VSTD::clamp(__v, __lo, __hi, __less<_Tp>());
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_CLAMP_H
+#endif // _LIBCUDACXX___ALGORITHM_CLAMP_H

diff  --git a/libcxx/include/__algorithm/comp.h b/libcxx/include/__algorithm/comp.h
index 62c06ae57f23..b6eaf9e56280 100644
--- a/libcxx/include/__algorithm/comp.h
+++ b/libcxx/include/__algorithm/comp.h
@@ -6,87 +6,87 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_COMP_H
-#define _LIBCPP___ALGORITHM_COMP_H
+#ifndef _LIBCUDACXX___ALGORITHM_COMP_H
+#define _LIBCUDACXX___ALGORITHM_COMP_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-// I'd like to replace these with _VSTD::equal_to<void>, but can't because:
+// I'd like to replace these with _CUDA_VSTD::equal_to<void>, but can't because:
 //   * That only works with C++14 and later, and
 //   * We haven't included <functional> here.
 template <class _T1, class _T2 = _T1>
 struct __equal_to
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T1& __x, const _T2& __y) const {return __x == __y;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T2& __x, const _T1& __y) const {return __x == __y;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 bool operator()(const _T2& __x, const _T2& __y) const {return __x == __y;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 bool operator()(const _T1& __x, const _T2& __y) const {return __x == __y;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 bool operator()(const _T2& __x, const _T1& __y) const {return __x == __y;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 bool operator()(const _T2& __x, const _T2& __y) const {return __x == __y;}
 };
 
 template <class _T1>
 struct __equal_to<_T1, _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
 };
 
 template <class _T1>
 struct __equal_to<const _T1, _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
 };
 
 template <class _T1>
 struct __equal_to<_T1, const _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _T1& __x, const _T1& __y) const {return __x == __y;}
 };
 
 template <class _T1, class _T2 = _T1>
 struct __less
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _T1& __x, const _T2& __y) const {return __x < __y;}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _T2& __x, const _T1& __y) const {return __x < __y;}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _T2& __x, const _T2& __y) const {return __x < __y;}
 };
 
 template <class _T1>
 struct __less<_T1, _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
 };
 
 template <class _T1>
 struct __less<const _T1, _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
 };
 
 template <class _T1>
 struct __less<_T1, const _T1>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;}
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_COMP_H
+#endif // _LIBCUDACXX___ALGORITHM_COMP_H

diff  --git a/libcxx/include/__algorithm/comp_ref_type.h b/libcxx/include/__algorithm/comp_ref_type.h
index 4719871461cf..32a689aaf9a3 100644
--- a/libcxx/include/__algorithm/comp_ref_type.h
+++ b/libcxx/include/__algorithm/comp_ref_type.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
-#define _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
+#ifndef _LIBCUDACXX___ALGORITHM_COMP_REF_TYPE_H
+#define _LIBCUDACXX___ALGORITHM_COMP_REF_TYPE_H
 
 #include <__config>
 #include <__debug>
 #include <__utility/declval.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Compare>
 struct __debug_less
 {
     _Compare &__comp_;
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     __debug_less(_Compare& __c) : __comp_(__c) {}
 
     template <class _Tp, class _Up>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _Tp& __x,  const _Up& __y)
     {
         bool __r = __comp_(__x, __y);
@@ -37,7 +37,7 @@ struct __debug_less
     }
 
     template <class _Tp, class _Up>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(_Tp& __x,  _Up& __y)
     {
         bool __r = __comp_(__x, __y);
@@ -47,20 +47,20 @@ struct __debug_less
     }
 
     template <class _LHS, class _RHS>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
-    inline _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     decltype((void)declval<_Compare&>()(
         declval<_LHS &>(), declval<_RHS &>()))
     __do_compare_assert(int, _LHS & __l, _RHS & __r) {
-        _LIBCPP_DEBUG_ASSERT(!__comp_(__l, __r),
+        _LIBCUDACXX_DEBUG_ASSERT(!__comp_(__l, __r),
             "Comparator does not induce a strict weak ordering");
         (void)__l;
         (void)__r;
     }
 
     template <class _LHS, class _RHS>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
-    inline _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     void __do_compare_assert(long, _LHS &, _RHS &) {}
 };
 
@@ -68,13 +68,13 @@ template <class _Comp>
 struct __comp_ref_type {
   // Pass the comparator by lvalue reference. Or in debug mode, using a
   // debugging wrapper that stores a reference.
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
   typedef __debug_less<_Comp> type;
 #else
   typedef _Comp& type;
 #endif
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_COMP_REF_TYPE_H
+#endif // _LIBCUDACXX___ALGORITHM_COMP_REF_TYPE_H

diff  --git a/libcxx/include/__algorithm/copy.h b/libcxx/include/__algorithm/copy.h
index f7535a81547a..7982d3134405 100644
--- a/libcxx/include/__algorithm/copy.h
+++ b/libcxx/include/__algorithm/copy.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_COPY_H
-#define _LIBCPP___ALGORITHM_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_COPY_H
+#define _LIBCUDACXX___ALGORITHM_COPY_H
 
 #include <__algorithm/unwrap_iter.h>
 #include <__algorithm/unwrap_range.h>
@@ -19,16 +19,16 @@
 #include <cstring>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // copy
 
 template <class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_InIter, _OutIter> __copy_impl(_InIter __first, _Sent __last, _OutIter __result) {
   while (__first != __last) {
     *__result = *__first;
@@ -42,11 +42,11 @@ template <class _InValueT,
           class _OutValueT,
           class = __enable_if_t<is_same<typename remove_const<_InValueT>::type, _OutValueT>::value
                              && is_trivially_copy_assignable<_OutValueT>::value> >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_InValueT*, _OutValueT*> __copy_impl(_InValueT* __first, _InValueT* __last, _OutValueT* __result) {
-  if (__libcpp_is_constant_evaluated()
+  if (__LIBCUDACXX_is_constant_evaluated()
 // TODO: Remove this once GCC supports __builtin_memmove during constant evaluation
-#ifndef _LIBCPP_COMPILER_GCC
+#ifndef _LIBCUDACXX_COMPILER_GCC
       && !is_trivially_copyable<_InValueT>::value
 #endif
      )
@@ -64,7 +64,7 @@ template <class _InIter, class _OutIter,
                       && is_trivially_copy_assignable<__iter_value_type<_OutIter> >::value
                       && __is_reverse_iterator<_InIter>::value
                       && __is_reverse_iterator<_OutIter>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_InIter, _OutIter>
 __copy_impl(_InIter __first, _InIter __last, _OutIter __result) {
   auto __first_base = std::__unwrap_iter(__first.base());
@@ -79,7 +79,7 @@ template <class _InIter, class _Sent, class _OutIter,
           __enable_if_t<!(is_copy_constructible<_InIter>::value
                        && is_copy_constructible<_Sent>::value
                        && is_copy_constructible<_OutIter>::value), int> = 0 >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_InIter, _OutIter> __copy(_InIter __first, _Sent __last, _OutIter __result) {
   return std::__copy_impl(std::move(__first), std::move(__last), std::move(__result));
 }
@@ -88,7 +88,7 @@ template <class _InIter, class _Sent, class _OutIter,
           __enable_if_t<is_copy_constructible<_InIter>::value
                      && is_copy_constructible<_Sent>::value
                      && is_copy_constructible<_OutIter>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_InIter, _OutIter> __copy(_InIter __first, _Sent __last, _OutIter __result) {
   auto __range = std::__unwrap_range(__first, __last);
   auto __ret   = std::__copy_impl(std::move(__range.first), std::move(__range.second), std::__unwrap_iter(__result));
@@ -97,12 +97,12 @@ pair<_InIter, _OutIter> __copy(_InIter __first, _Sent __last, _OutIter __result)
 }
 
 template <class _InputIterator, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
   return std::__copy(__first, __last, __result).second;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_COPY_H

diff  --git a/libcxx/include/__algorithm/copy_backward.h b/libcxx/include/__algorithm/copy_backward.h
index c5fa64bc8d75..143009a11897 100644
--- a/libcxx/include/__algorithm/copy_backward.h
+++ b/libcxx/include/__algorithm/copy_backward.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_COPY_BACKWARD_H
-#define _LIBCPP___ALGORITHM_COPY_BACKWARD_H
+#ifndef _LIBCUDACXX___ALGORITHM_COPY_BACKWARD_H
+#define _LIBCUDACXX___ALGORITHM_COPY_BACKWARD_H
 
 #include <__algorithm/copy.h>
 #include <__algorithm/iterator_operations.h>
@@ -22,15 +22,15 @@
 #include <__utility/pair.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _InputIterator, class _OutputIterator,
           __enable_if_t<is_same<_AlgPolicy, _ClassicAlgPolicy>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 pair<_InputIterator, _OutputIterator>
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 pair<_InputIterator, _OutputIterator>
 __copy_backward(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
   auto __ret = std::__copy(
       __unconstrained_reverse_iterator<_InputIterator>(__last),
@@ -39,23 +39,23 @@ __copy_backward(_InputIterator __first, _InputIterator __last, _OutputIterator _
   return pair<_InputIterator, _OutputIterator>(__ret.first.base(), __ret.second.base());
 }
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 template <class _AlgPolicy, class _Iter1, class _Sent1, class _Iter2,
           __enable_if_t<is_same<_AlgPolicy, _RangeAlgPolicy>::value, int> = 0>
-_LIBCPP_HIDE_FROM_ABI constexpr pair<_Iter1, _Iter2> __copy_backward(_Iter1 __first, _Sent1 __last, _Iter2 __result) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr pair<_Iter1, _Iter2> __copy_backward(_Iter1 __first, _Sent1 __last, _Iter2 __result) {
   auto __last_iter     = _IterOps<_AlgPolicy>::next(__first, std::move(__last));
   auto __reverse_range = std::__reverse_range(std::ranges::subrange(std::move(__first), __last_iter));
   auto __ret           = ranges::copy(std::move(__reverse_range), std::make_reverse_iterator(__result));
   return std::make_pair(__last_iter, __ret.out.base());
 }
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 template <class _BidirectionalIterator1, class _BidirectionalIterator2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _BidirectionalIterator2
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _BidirectionalIterator2
 copy_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last, _BidirectionalIterator2 __result) {
   return std::__copy_backward<_ClassicAlgPolicy>(__first, __last, __result).second;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_COPY_BACKWARD_H
+#endif // _LIBCUDACXX___ALGORITHM_COPY_BACKWARD_H

diff  --git a/libcxx/include/__algorithm/copy_if.h b/libcxx/include/__algorithm/copy_if.h
index 9c3cd29e2413..955fe2bbb0c2 100644
--- a/libcxx/include/__algorithm/copy_if.h
+++ b/libcxx/include/__algorithm/copy_if.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_COPY_IF_H
-#define _LIBCPP___ALGORITHM_COPY_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_COPY_IF_H
+#define _LIBCUDACXX___ALGORITHM_COPY_IF_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _InputIterator, class _OutputIterator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 copy_if(_InputIterator __first, _InputIterator __last,
         _OutputIterator __result, _Predicate __pred)
@@ -34,6 +34,6 @@ copy_if(_InputIterator __first, _InputIterator __last,
     return __result;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_COPY_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_COPY_IF_H

diff  --git a/libcxx/include/__algorithm/copy_n.h b/libcxx/include/__algorithm/copy_n.h
index 8b915af63c0d..e5c530fd4434 100644
--- a/libcxx/include/__algorithm/copy_n.h
+++ b/libcxx/include/__algorithm/copy_n.h
@@ -6,22 +6,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_COPY_N_H
-#define _LIBCPP___ALGORITHM_COPY_N_H
+#ifndef _LIBCUDACXX___ALGORITHM_COPY_N_H
+#define _LIBCUDACXX___ALGORITHM_COPY_N_H
 
 #include <__algorithm/copy.h>
 #include <__config>
 #include <__iterator/iterator_traits.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _InputIterator, class _Size, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename enable_if
 <
     __is_cpp17_input_iterator<_InputIterator>::value &&
@@ -30,7 +30,7 @@ typename enable_if
 >::type
 copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
 {
-    typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
+    typedef decltype(_CUDA_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
     _IntegralSize __n = __orig_n;
     if (__n > 0)
     {
@@ -47,7 +47,7 @@ copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
 }
 
 template<class _InputIterator, class _Size, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename enable_if
 <
     __is_cpp17_random_access_iterator<_InputIterator>::value,
@@ -56,11 +56,11 @@ typename enable_if
 copy_n(_InputIterator __first, _Size __orig_n, _OutputIterator __result)
 {
     typedef typename iterator_traits<_InputIterator>::
diff erence_type 
diff erence_type;
-    typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
+    typedef decltype(_CUDA_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
     _IntegralSize __n = __orig_n;
-    return _VSTD::copy(__first, __first + 
diff erence_type(__n), __result);
+    return _CUDA_VSTD::copy(__first, __first + 
diff erence_type(__n), __result);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_COPY_N_H
+#endif // _LIBCUDACXX___ALGORITHM_COPY_N_H

diff  --git a/libcxx/include/__algorithm/count.h b/libcxx/include/__algorithm/count.h
index 5b546934038d..fc29c5a96eb9 100644
--- a/libcxx/include/__algorithm/count.h
+++ b/libcxx/include/__algorithm/count.h
@@ -7,20 +7,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_COUNT_H
-#define _LIBCPP___ALGORITHM_COUNT_H
+#ifndef _LIBCUDACXX___ALGORITHM_COUNT_H
+#define _LIBCUDACXX___ALGORITHM_COUNT_H
 
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     typename iterator_traits<_InputIterator>::
diff erence_type
     count(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
   typename iterator_traits<_InputIterator>::
diff erence_type __r(0);
@@ -30,6 +30,6 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_C
   return __r;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_COUNT_H
+#endif // _LIBCUDACXX___ALGORITHM_COUNT_H

diff  --git a/libcxx/include/__algorithm/count_if.h b/libcxx/include/__algorithm/count_if.h
index 1ec2d83394e1..a6b75419fd8d 100644
--- a/libcxx/include/__algorithm/count_if.h
+++ b/libcxx/include/__algorithm/count_if.h
@@ -7,20 +7,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_COUNT_IF_H
-#define _LIBCPP___ALGORITHM_COUNT_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_COUNT_IF_H
+#define _LIBCUDACXX___ALGORITHM_COUNT_IF_H
 
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     typename iterator_traits<_InputIterator>::
diff erence_type
     count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
   typename iterator_traits<_InputIterator>::
diff erence_type __r(0);
@@ -30,6 +30,6 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_C
   return __r;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_COUNT_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_COUNT_IF_H

diff  --git a/libcxx/include/__algorithm/equal.h b/libcxx/include/__algorithm/equal.h
index ca1bc6bc5665..770ebad2636e 100644
--- a/libcxx/include/__algorithm/equal.h
+++ b/libcxx/include/__algorithm/equal.h
@@ -7,22 +7,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_EQUAL_H
-#define _LIBCPP___ALGORITHM_EQUAL_H
+#ifndef _LIBCUDACXX___ALGORITHM_EQUAL_H
+#define _LIBCUDACXX___ALGORITHM_EQUAL_H
 
 #include <__algorithm/comp.h>
 #include <__config>
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) {
   for (; __first1 != __last1; ++__first1, (void)++__first2)
     if (!__pred(*__first1, *__first2))
@@ -31,16 +31,16 @@ equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first
 }
 
 template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) {
   typedef typename iterator_traits<_InputIterator1>::value_type __v1;
   typedef typename iterator_traits<_InputIterator2>::value_type __v2;
-  return _VSTD::equal(__first1, __last1, __first2, __equal_to<__v1, __v2>());
+  return _CUDA_VSTD::equal(__first1, __last1, __first2, __equal_to<__v1, __v2>());
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _BinaryPredicate, class _InputIterator1, class _InputIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 __equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
         _BinaryPredicate __pred, input_iterator_tag, input_iterator_tag) {
   for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2)
@@ -50,36 +50,36 @@ __equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __fir
 }
 
 template <class _BinaryPredicate, class _RandomAccessIterator1, class _RandomAccessIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 __equal(_RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, _RandomAccessIterator2 __first2,
         _RandomAccessIterator2 __last2, _BinaryPredicate __pred, random_access_iterator_tag,
         random_access_iterator_tag) {
-  if (_VSTD::distance(__first1, __last1) != _VSTD::distance(__first2, __last2))
+  if (_CUDA_VSTD::distance(__first1, __last1) != _CUDA_VSTD::distance(__first2, __last2))
     return false;
-  return _VSTD::equal<_RandomAccessIterator1, _RandomAccessIterator2,
+  return _CUDA_VSTD::equal<_RandomAccessIterator1, _RandomAccessIterator2,
                       _BinaryPredicate&>(__first1, __last1, __first2, __pred);
 }
 
 template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
       _BinaryPredicate __pred) {
-  return _VSTD::__equal<_BinaryPredicate&>(
+  return _CUDA_VSTD::__equal<_BinaryPredicate&>(
       __first1, __last1, __first2, __last2, __pred, typename iterator_traits<_InputIterator1>::iterator_category(),
       typename iterator_traits<_InputIterator2>::iterator_category());
 }
 
 template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 equal(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
   typedef typename iterator_traits<_InputIterator1>::value_type __v1;
   typedef typename iterator_traits<_InputIterator2>::value_type __v2;
-  return _VSTD::__equal(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>(),
+  return _CUDA_VSTD::__equal(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>(),
                         typename iterator_traits<_InputIterator1>::iterator_category(),
                         typename iterator_traits<_InputIterator2>::iterator_category());
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_EQUAL_H
+#endif // _LIBCUDACXX___ALGORITHM_EQUAL_H

diff  --git a/libcxx/include/__algorithm/equal_range.h b/libcxx/include/__algorithm/equal_range.h
index b11165baf384..f1140a8796d7 100644
--- a/libcxx/include/__algorithm/equal_range.h
+++ b/libcxx/include/__algorithm/equal_range.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_EQUAL_RANGE_H
-#define _LIBCPP___ALGORITHM_EQUAL_RANGE_H
+#ifndef _LIBCUDACXX___ALGORITHM_EQUAL_RANGE_H
+#define _LIBCUDACXX___ALGORITHM_EQUAL_RANGE_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -27,14 +27,14 @@
 #include <__utility/move.h>
 #include <__utility/pair.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare, class _Iter, class _Sent, class _Tp, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_Iter, _Iter>
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<_Iter, _Iter>
 __equal_range(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp, _Proj&& __proj) {
   auto __len  = _IterOps<_AlgPolicy>::distance(__first, __last);
   _Iter __end = _IterOps<_AlgPolicy>::next(__first, __last);
@@ -58,7 +58,7 @@ __equal_range(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp
 }
 
 template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
 equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
   static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value,
                 "The comparator has to be callable");
@@ -70,7 +70,7 @@ equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
 }
 
 template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
 equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
   return std::equal_range(
       std::move(__first),
@@ -79,6 +79,6 @@ equal_range(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
       __less<typename iterator_traits<_ForwardIterator>::value_type, _Tp>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_EQUAL_RANGE_H
+#endif // _LIBCUDACXX___ALGORITHM_EQUAL_RANGE_H

diff  --git a/libcxx/include/__algorithm/fill.h b/libcxx/include/__algorithm/fill.h
index 901ba4e68689..1339a725b5f9 100644
--- a/libcxx/include/__algorithm/fill.h
+++ b/libcxx/include/__algorithm/fill.h
@@ -6,24 +6,24 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_FILL_H
-#define _LIBCPP___ALGORITHM_FILL_H
+#ifndef _LIBCUDACXX___ALGORITHM_FILL_H
+#define _LIBCUDACXX___ALGORITHM_FILL_H
 
 #include <__algorithm/fill_n.h>
 #include <__config>
 #include <__iterator/iterator_traits.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // fill isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.
 
 template <class _ForwardIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, forward_iterator_tag)
 {
@@ -32,21 +32,21 @@ __fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, fo
 }
 
 template <class _RandomAccessIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __fill(_RandomAccessIterator __first, _RandomAccessIterator __last, const _Tp& __value, random_access_iterator_tag)
 {
-    _VSTD::fill_n(__first, __last - __first, __value);
+    _CUDA_VSTD::fill_n(__first, __last - __first, __value);
 }
 
 template <class _ForwardIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
 {
-    _VSTD::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category());
+    _CUDA_VSTD::__fill(__first, __last, __value, typename iterator_traits<_ForwardIterator>::iterator_category());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_FILL_H
+#endif // _LIBCUDACXX___ALGORITHM_FILL_H

diff  --git a/libcxx/include/__algorithm/fill_n.h b/libcxx/include/__algorithm/fill_n.h
index 6c5e44efde9b..56103ad92219 100644
--- a/libcxx/include/__algorithm/fill_n.h
+++ b/libcxx/include/__algorithm/fill_n.h
@@ -6,23 +6,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_FILL_N_H
-#define _LIBCPP___ALGORITHM_FILL_N_H
+#ifndef _LIBCUDACXX___ALGORITHM_FILL_N_H
+#define _LIBCUDACXX___ALGORITHM_FILL_N_H
 
 #include <__config>
 #include <__iterator/iterator_traits.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // fill_n isn't specialized for std::memset, because the compiler already optimizes the loop to a call to std::memset.
 
 template <class _OutputIterator, class _Size, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 __fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
 {
@@ -32,13 +32,13 @@ __fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
 }
 
 template <class _OutputIterator, class _Size, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 fill_n(_OutputIterator __first, _Size __n, const _Tp& __value)
 {
-   return _VSTD::__fill_n(__first, _VSTD::__convert_to_integral(__n), __value);
+   return _CUDA_VSTD::__fill_n(__first, _CUDA_VSTD::__convert_to_integral(__n), __value);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_FILL_N_H
+#endif // _LIBCUDACXX___ALGORITHM_FILL_N_H

diff  --git a/libcxx/include/__algorithm/find.h b/libcxx/include/__algorithm/find.h
index ab37d81262f0..afb082ccd40d 100644
--- a/libcxx/include/__algorithm/find.h
+++ b/libcxx/include/__algorithm/find.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_FIND_H
-#define _LIBCPP___ALGORITHM_FIND_H
+#ifndef _LIBCUDACXX___ALGORITHM_FIND_H
+#define _LIBCUDACXX___ALGORITHM_FIND_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _InputIterator
 find(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
   for (; __first != __last; ++__first)
     if (*__first == __value)
@@ -27,6 +27,6 @@ find(_InputIterator __first, _InputIterator __last, const _Tp& __value) {
   return __first;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_FIND_H
+#endif // _LIBCUDACXX___ALGORITHM_FIND_H

diff  --git a/libcxx/include/__algorithm/find_end.h b/libcxx/include/__algorithm/find_end.h
index 65e9f29b1c1f..b04484f69197 100644
--- a/libcxx/include/__algorithm/find_end.h
+++ b/libcxx/include/__algorithm/find_end.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_FIND_END_OF_H
-#define _LIBCPP___ALGORITHM_FIND_END_OF_H
+#ifndef _LIBCUDACXX___ALGORITHM_FIND_END_OF_H
+#define _LIBCUDACXX___ALGORITHM_FIND_END_OF_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/iterator_operations.h>
@@ -22,11 +22,11 @@
 #include <__utility/pair.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <
     class _AlgPolicy,
@@ -37,7 +37,7 @@ template <
     class _Pred,
     class _Proj1,
     class _Proj2>
-_LIBCPP_HIDE_FROM_ABI inline _LIBCPP_CONSTEXPR_AFTER_CXX11 pair<_Iter1, _Iter1> __find_end_impl(
+_LIBCUDACXX_HIDE_FROM_ABI inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 pair<_Iter1, _Iter1> __find_end_impl(
     _Iter1 __first1,
     _Sent1 __last1,
     _Iter2 __first2,
@@ -91,7 +91,7 @@ template <
     class _Sent2,
     class _Proj1,
     class _Proj2>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter1 __find_end(
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Iter1 __find_end(
     _Iter1 __first1,
     _Sent1 __sent1,
     _Iter2 __first2,
@@ -144,7 +144,7 @@ template <
     class _Sent2,
     class _Proj1,
     class _Proj2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _Iter1 __find_end(
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _Iter1 __find_end(
     _Iter1 __first1,
     _Sent1 __sent1,
     _Iter2 __first2,
@@ -189,7 +189,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 _Iter1 __find_end(
 }
 
 template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _ForwardIterator1 __find_end_classic(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
                                      _ForwardIterator2 __first2, _ForwardIterator2 __last2,
                                      _BinaryPredicate& __pred) {
@@ -208,7 +208,7 @@ _ForwardIterator1 __find_end_classic(_ForwardIterator1 __first1, _ForwardIterato
 }
 
 template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
                            _ForwardIterator2 __first2, _ForwardIterator2 __last2,
                            _BinaryPredicate __pred) {
@@ -216,7 +216,7 @@ _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1
 }
 
 template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
                            _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
   using __v1 = typename iterator_traits<_ForwardIterator1>::value_type;
@@ -224,6 +224,6 @@ _ForwardIterator1 find_end(_ForwardIterator1 __first1, _ForwardIterator1 __last1
   return std::find_end(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_FIND_END_OF_H
+#endif // _LIBCUDACXX___ALGORITHM_FIND_END_OF_H

diff  --git a/libcxx/include/__algorithm/find_first_of.h b/libcxx/include/__algorithm/find_first_of.h
index 2096b0f0c9a5..0b211a8cedb3 100644
--- a/libcxx/include/__algorithm/find_first_of.h
+++ b/libcxx/include/__algorithm/find_first_of.h
@@ -7,21 +7,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_FIND_FIRST_OF_H
-#define _LIBCPP___ALGORITHM_FIND_FIRST_OF_H
+#ifndef _LIBCUDACXX___ALGORITHM_FIND_FIRST_OF_H
+#define _LIBCUDACXX___ALGORITHM_FIND_FIRST_OF_H
 
 #include <__algorithm/comp.h>
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator1 __find_first_of_ce(_ForwardIterator1 __first1,
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _ForwardIterator1 __find_first_of_ce(_ForwardIterator1 __first1,
                                                                    _ForwardIterator1 __last1,
                                                                    _ForwardIterator2 __first2,
                                                                    _ForwardIterator2 __last2,
@@ -34,20 +34,20 @@ _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator1 __find_first_of_ce(_ForwardItera
 }
 
 template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator1
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator1
 find_first_of(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
               _ForwardIterator2 __last2, _BinaryPredicate __pred) {
-  return _VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred);
+  return _CUDA_VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __pred);
 }
 
 template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator1 find_first_of(
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator1 find_first_of(
     _ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
   typedef typename iterator_traits<_ForwardIterator1>::value_type __v1;
   typedef typename iterator_traits<_ForwardIterator2>::value_type __v2;
-  return _VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
+  return _CUDA_VSTD::__find_first_of_ce(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_FIND_FIRST_OF_H
+#endif // _LIBCUDACXX___ALGORITHM_FIND_FIRST_OF_H

diff  --git a/libcxx/include/__algorithm/find_if.h b/libcxx/include/__algorithm/find_if.h
index aa98171a1f61..50eb86dde679 100644
--- a/libcxx/include/__algorithm/find_if.h
+++ b/libcxx/include/__algorithm/find_if.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_FIND_IF_H
-#define _LIBCPP___ALGORITHM_FIND_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_FIND_IF_H
+#define _LIBCUDACXX___ALGORITHM_FIND_IF_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _InputIterator
 find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
   for (; __first != __last; ++__first)
     if (__pred(*__first))
@@ -27,6 +27,6 @@ find_if(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
   return __first;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_FIND_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_FIND_IF_H

diff  --git a/libcxx/include/__algorithm/find_if_not.h b/libcxx/include/__algorithm/find_if_not.h
index 61ddab0b9805..8ebc582970c6 100644
--- a/libcxx/include/__algorithm/find_if_not.h
+++ b/libcxx/include/__algorithm/find_if_not.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_FIND_IF_NOT_H
-#define _LIBCPP___ALGORITHM_FIND_IF_NOT_H
+#ifndef _LIBCUDACXX___ALGORITHM_FIND_IF_NOT_H
+#define _LIBCUDACXX___ALGORITHM_FIND_IF_NOT_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _InputIterator
 find_if_not(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
   for (; __first != __last; ++__first)
     if (!__pred(*__first))
@@ -27,6 +27,6 @@ find_if_not(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
   return __first;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_FIND_IF_NOT_H
+#endif // _LIBCUDACXX___ALGORITHM_FIND_IF_NOT_H

diff  --git a/libcxx/include/__algorithm/for_each.h b/libcxx/include/__algorithm/for_each.h
index bfbd37c3a3a4..df9a483c374a 100644
--- a/libcxx/include/__algorithm/for_each.h
+++ b/libcxx/include/__algorithm/for_each.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_FOR_EACH_H
-#define _LIBCPP___ALGORITHM_FOR_EACH_H
+#ifndef _LIBCUDACXX___ALGORITHM_FOR_EACH_H
+#define _LIBCUDACXX___ALGORITHM_FOR_EACH_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Function>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Function for_each(_InputIterator __first,
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Function for_each(_InputIterator __first,
                                                                                   _InputIterator __last,
                                                                                   _Function __f) {
   for (; __first != __last; ++__first)
@@ -27,6 +27,6 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Function for_eac
   return __f;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_FOR_EACH_H
+#endif // _LIBCUDACXX___ALGORITHM_FOR_EACH_H

diff  --git a/libcxx/include/__algorithm/for_each_n.h b/libcxx/include/__algorithm/for_each_n.h
index 2552b40c2781..4c862ed784d3 100644
--- a/libcxx/include/__algorithm/for_each_n.h
+++ b/libcxx/include/__algorithm/for_each_n.h
@@ -7,25 +7,25 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_FOR_EACH_N_H
-#define _LIBCPP___ALGORITHM_FOR_EACH_N_H
+#ifndef _LIBCUDACXX___ALGORITHM_FOR_EACH_N_H
+#define _LIBCUDACXX___ALGORITHM_FOR_EACH_N_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _InputIterator, class _Size, class _Function>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator for_each_n(_InputIterator __first,
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _InputIterator for_each_n(_InputIterator __first,
                                                                                          _Size __orig_n,
                                                                                          _Function __f) {
-  typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
+  typedef decltype(_CUDA_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
   _IntegralSize __n = __orig_n;
   while (__n > 0) {
     __f(*__first);
@@ -37,6 +37,6 @@ inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _InputIterator fo
 
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_FOR_EACH_N_H
+#endif // _LIBCUDACXX___ALGORITHM_FOR_EACH_N_H

diff  --git a/libcxx/include/__algorithm/generate.h b/libcxx/include/__algorithm/generate.h
index dacbd8c68195..869f12afba8e 100644
--- a/libcxx/include/__algorithm/generate.h
+++ b/libcxx/include/__algorithm/generate.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_GENERATE_H
-#define _LIBCPP___ALGORITHM_GENERATE_H
+#ifndef _LIBCUDACXX___ALGORITHM_GENERATE_H
+#define _LIBCUDACXX___ALGORITHM_GENERATE_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _ForwardIterator, class _Generator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 generate(_ForwardIterator __first, _ForwardIterator __last, _Generator __gen)
 {
@@ -26,6 +26,6 @@ generate(_ForwardIterator __first, _ForwardIterator __last, _Generator __gen)
         *__first = __gen();
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_GENERATE_H
+#endif // _LIBCUDACXX___ALGORITHM_GENERATE_H

diff  --git a/libcxx/include/__algorithm/generate_n.h b/libcxx/include/__algorithm/generate_n.h
index 2650e9e5d8b7..362a5716710d 100644
--- a/libcxx/include/__algorithm/generate_n.h
+++ b/libcxx/include/__algorithm/generate_n.h
@@ -6,30 +6,30 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_GENERATE_N_H
-#define _LIBCPP___ALGORITHM_GENERATE_N_H
+#ifndef _LIBCUDACXX___ALGORITHM_GENERATE_N_H
+#define _LIBCUDACXX___ALGORITHM_GENERATE_N_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _OutputIterator, class _Size, class _Generator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 generate_n(_OutputIterator __first, _Size __orig_n, _Generator __gen)
 {
-    typedef decltype(_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
+    typedef decltype(_CUDA_VSTD::__convert_to_integral(__orig_n)) _IntegralSize;
     _IntegralSize __n = __orig_n;
     for (; __n > 0; ++__first, (void) --__n)
         *__first = __gen();
     return __first;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_GENERATE_N_H
+#endif // _LIBCUDACXX___ALGORITHM_GENERATE_N_H

diff  --git a/libcxx/include/__algorithm/half_positive.h b/libcxx/include/__algorithm/half_positive.h
index 7666ef1449c6..dfffcb126f81 100644
--- a/libcxx/include/__algorithm/half_positive.h
+++ b/libcxx/include/__algorithm/half_positive.h
@@ -6,22 +6,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_HALF_POSITIVE_H
-#define _LIBCPP___ALGORITHM_HALF_POSITIVE_H
+#ifndef _LIBCUDACXX___ALGORITHM_HALF_POSITIVE_H
+#define _LIBCUDACXX___ALGORITHM_HALF_POSITIVE_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Perform division by two quickly for positive integers (llvm.org/PR39129)
 
 template <typename _Integral>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     is_integral<_Integral>::value,
@@ -33,7 +33,7 @@ __half_positive(_Integral __value)
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     !is_integral<_Tp>::value,
@@ -44,6 +44,6 @@ __half_positive(_Tp __value)
     return __value / 2;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_HALF_POSITIVE_H
+#endif // _LIBCUDACXX___ALGORITHM_HALF_POSITIVE_H

diff  --git a/libcxx/include/__algorithm/in_found_result.h b/libcxx/include/__algorithm/in_found_result.h
index d43f45cd80ef..aa2ac6494071 100644
--- a/libcxx/include/__algorithm/in_found_result.h
+++ b/libcxx/include/__algorithm/in_found_result.h
@@ -7,43 +7,43 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IN_FOUND_RESULT_H
-#define _LIBCPP___ALGORITHM_IN_FOUND_RESULT_H
+#ifndef _LIBCUDACXX___ALGORITHM_IN_FOUND_RESULT_H
+#define _LIBCUDACXX___ALGORITHM_IN_FOUND_RESULT_H
 
 #include <__concepts/convertible_to.h>
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 template <class _InIter1>
 struct in_found_result {
-  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _InIter1 in;
   bool found;
 
   template <class _InIter2>
     requires convertible_to<const _InIter1&, _InIter2>
-  _LIBCPP_HIDE_FROM_ABI constexpr operator in_found_result<_InIter2>() const & {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr operator in_found_result<_InIter2>() const & {
     return {in, found};
   }
 
   template <class _InIter2>
     requires convertible_to<_InIter1, _InIter2>
-  _LIBCPP_HIDE_FROM_ABI constexpr operator in_found_result<_InIter2>() && {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr operator in_found_result<_InIter2>() && {
     return {std::move(in), found};
   }
 };
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_IN_FOUND_RESULT_H
+#endif // _LIBCUDACXX___ALGORITHM_IN_FOUND_RESULT_H

diff  --git a/libcxx/include/__algorithm/in_fun_result.h b/libcxx/include/__algorithm/in_fun_result.h
index 21efa655063d..a59cb75b2c94 100644
--- a/libcxx/include/__algorithm/in_fun_result.h
+++ b/libcxx/include/__algorithm/in_fun_result.h
@@ -7,43 +7,43 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IN_FUN_RESULT_H
-#define _LIBCPP___ALGORITHM_IN_FUN_RESULT_H
+#ifndef _LIBCUDACXX___ALGORITHM_IN_FUN_RESULT_H
+#define _LIBCUDACXX___ALGORITHM_IN_FUN_RESULT_H
 
 #include <__concepts/convertible_to.h>
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 template <class _InIter1, class _Func1>
 struct in_fun_result {
-  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
-  _LIBCPP_NO_UNIQUE_ADDRESS _Func1 fun;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _InIter1 in;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _Func1 fun;
 
   template <class _InIter2, class _Func2>
     requires convertible_to<const _InIter1&, _InIter2> && convertible_to<const _Func1&, _Func2>
-  _LIBCPP_HIDE_FROM_ABI constexpr operator in_fun_result<_InIter2, _Func2>() const & {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr operator in_fun_result<_InIter2, _Func2>() const & {
     return {in, fun};
   }
 
   template <class _InIter2, class _Func2>
     requires convertible_to<_InIter1, _InIter2> && convertible_to<_Func1, _Func2>
-  _LIBCPP_HIDE_FROM_ABI constexpr operator in_fun_result<_InIter2, _Func2>() && {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr operator in_fun_result<_InIter2, _Func2>() && {
     return {std::move(in), std::move(fun)};
   }
 };
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_IN_FUN_RESULT_H
+#endif // _LIBCUDACXX___ALGORITHM_IN_FUN_RESULT_H

diff  --git a/libcxx/include/__algorithm/in_in_out_result.h b/libcxx/include/__algorithm/in_in_out_result.h
index e45fef187e0d..570d62ad8ed3 100644
--- a/libcxx/include/__algorithm/in_in_out_result.h
+++ b/libcxx/include/__algorithm/in_in_out_result.h
@@ -7,33 +7,33 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H
-#define _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H
+#ifndef _LIBCUDACXX___ALGORITHM_IN_IN_OUT_RESULT_H
+#define _LIBCUDACXX___ALGORITHM_IN_IN_OUT_RESULT_H
 
 #include <__concepts/convertible_to.h>
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
 template <class _InIter1, class _InIter2, class _OutIter1>
 struct in_in_out_result {
-  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in1;
-  _LIBCPP_NO_UNIQUE_ADDRESS _InIter2 in2;
-  _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _InIter1 in1;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _InIter2 in2;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _OutIter1 out;
 
   template <class _InIter3, class _InIter4, class _OutIter2>
     requires convertible_to<const _InIter1&, _InIter3>
           && convertible_to<const _InIter2&, _InIter4> && convertible_to<const _OutIter1&, _OutIter2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   operator in_in_out_result<_InIter3, _InIter4, _OutIter2>() const& {
     return {in1, in2, out};
   }
@@ -41,7 +41,7 @@ struct in_in_out_result {
   template <class _InIter3, class _InIter4, class _OutIter2>
     requires convertible_to<_InIter1, _InIter3>
           && convertible_to<_InIter2, _InIter4> && convertible_to<_OutIter1, _OutIter2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   operator in_in_out_result<_InIter3, _InIter4, _OutIter2>() && {
     return {std::move(in1), std::move(in2), std::move(out)};
   }
@@ -49,8 +49,8 @@ struct in_in_out_result {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_IN_IN_OUT_RESULT_H
+#endif // _LIBCUDACXX___ALGORITHM_IN_IN_OUT_RESULT_H

diff  --git a/libcxx/include/__algorithm/in_in_result.h b/libcxx/include/__algorithm/in_in_result.h
index 39e64ced33b2..9121a7b208b6 100644
--- a/libcxx/include/__algorithm/in_in_result.h
+++ b/libcxx/include/__algorithm/in_in_result.h
@@ -7,38 +7,38 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IN_IN_RESULT_H
-#define _LIBCPP___ALGORITHM_IN_IN_RESULT_H
+#ifndef _LIBCUDACXX___ALGORITHM_IN_IN_RESULT_H
+#define _LIBCUDACXX___ALGORITHM_IN_IN_RESULT_H
 
 #include <__concepts/convertible_to.h>
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
 template <class _InIter1, class _InIter2>
 struct in_in_result {
-  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in1;
-  _LIBCPP_NO_UNIQUE_ADDRESS _InIter2 in2;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _InIter1 in1;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _InIter2 in2;
 
   template <class _InIter3, class _InIter4>
     requires convertible_to<const _InIter1&, _InIter3> && convertible_to<const _InIter2&, _InIter4>
-   _LIBCPP_HIDE_FROM_ABI constexpr
+   _LIBCUDACXX_HIDE_FROM_ABI constexpr
    operator in_in_result<_InIter3, _InIter4>() const & {
     return {in1, in2};
   }
 
   template <class _InIter3, class _InIter4>
     requires convertible_to<_InIter1, _InIter3> && convertible_to<_InIter2, _InIter4>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   operator in_in_result<_InIter3, _InIter4>() && {
     return {std::move(in1), std::move(in2)};
   }
@@ -46,8 +46,8 @@ struct in_in_result {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_IN_IN_RESULT_H
+#endif // _LIBCUDACXX___ALGORITHM_IN_IN_RESULT_H

diff  --git a/libcxx/include/__algorithm/in_out_out_result.h b/libcxx/include/__algorithm/in_out_out_result.h
index 52a883b17627..98c77eb67e96 100644
--- a/libcxx/include/__algorithm/in_out_out_result.h
+++ b/libcxx/include/__algorithm/in_out_out_result.h
@@ -7,32 +7,32 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IN_OUT_OUT_RESULT_H
-#define _LIBCPP___ALGORITHM_IN_OUT_OUT_RESULT_H
+#ifndef _LIBCUDACXX___ALGORITHM_IN_OUT_OUT_RESULT_H
+#define _LIBCUDACXX___ALGORITHM_IN_OUT_OUT_RESULT_H
 
 #include <__concepts/convertible_to.h>
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 template <class _InIter1, class _OutIter1, class _OutIter2>
 struct in_out_out_result {
-  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
-  _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out1;
-  _LIBCPP_NO_UNIQUE_ADDRESS _OutIter2 out2;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _InIter1 in;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _OutIter1 out1;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _OutIter2 out2;
 
   template <class _InIter2, class _OutIter3, class _OutIter4>
     requires convertible_to<const _InIter1&, _InIter2>
           && convertible_to<const _OutIter1&, _OutIter3> && convertible_to<const _OutIter2&, _OutIter4>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   operator in_out_out_result<_InIter2, _OutIter3, _OutIter4>() const& {
     return {in, out1, out2};
   }
@@ -40,15 +40,15 @@ struct in_out_out_result {
   template <class _InIter2, class _OutIter3, class _OutIter4>
     requires convertible_to<_InIter1, _InIter2>
           && convertible_to<_OutIter1, _OutIter3> && convertible_to<_OutIter2, _OutIter4>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   operator in_out_out_result<_InIter2, _OutIter3, _OutIter4>() && {
     return {std::move(in), std::move(out1), std::move(out2)};
   }
 };
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_IN_OUT_OUT_RESULT_H
+#endif // _LIBCUDACXX___ALGORITHM_IN_OUT_OUT_RESULT_H

diff  --git a/libcxx/include/__algorithm/in_out_result.h b/libcxx/include/__algorithm/in_out_result.h
index 47e6f3907943..61d47142b839 100644
--- a/libcxx/include/__algorithm/in_out_result.h
+++ b/libcxx/include/__algorithm/in_out_result.h
@@ -7,38 +7,38 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IN_OUT_RESULT_H
-#define _LIBCPP___ALGORITHM_IN_OUT_RESULT_H
+#ifndef _LIBCUDACXX___ALGORITHM_IN_OUT_RESULT_H
+#define _LIBCUDACXX___ALGORITHM_IN_OUT_RESULT_H
 
 #include <__concepts/convertible_to.h>
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
 template<class _InIter1, class _OutIter1>
 struct in_out_result {
-  _LIBCPP_NO_UNIQUE_ADDRESS _InIter1 in;
-  _LIBCPP_NO_UNIQUE_ADDRESS _OutIter1 out;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _InIter1 in;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _OutIter1 out;
 
   template <class _InIter2, class _OutIter2>
     requires convertible_to<const _InIter1&, _InIter2> && convertible_to<const _OutIter1&, _OutIter2>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr operator in_out_result<_InIter2, _OutIter2>() const & {
     return {in, out};
   }
 
   template <class _InIter2, class _OutIter2>
     requires convertible_to<_InIter1, _InIter2> && convertible_to<_OutIter1, _OutIter2>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr operator in_out_result<_InIter2, _OutIter2>() && {
     return {std::move(in), std::move(out)};
   }
@@ -46,8 +46,8 @@ struct in_out_result {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_IN_OUT_RESULT_H
+#endif // _LIBCUDACXX___ALGORITHM_IN_OUT_RESULT_H

diff  --git a/libcxx/include/__algorithm/includes.h b/libcxx/include/__algorithm/includes.h
index c64194a2c826..b82f85a040e4 100644
--- a/libcxx/include/__algorithm/includes.h
+++ b/libcxx/include/__algorithm/includes.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_INCLUDES_H
-#define _LIBCPP___ALGORITHM_INCLUDES_H
+#ifndef _LIBCUDACXX___ALGORITHM_INCLUDES_H
+#define _LIBCUDACXX___ALGORITHM_INCLUDES_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -18,14 +18,14 @@
 #include <__type_traits/is_callable.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Comp, class _Proj1, class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 __includes(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
            _Comp&& __comp, _Proj1&& __proj1, _Proj2&& __proj2) {
   for (; __first2 != __last2; ++__first1) {
@@ -39,7 +39,7 @@ __includes(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
 }
 
 template <class _InputIterator1, class _InputIterator2, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool includes(
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool includes(
     _InputIterator1 __first1,
     _InputIterator1 __last1,
     _InputIterator2 __first2,
@@ -55,7 +55,7 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
 }
 
 template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
   return std::includes(
       std::move(__first1),
@@ -66,6 +66,6 @@ includes(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __fi
              typename iterator_traits<_InputIterator2>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_INCLUDES_H
+#endif // _LIBCUDACXX___ALGORITHM_INCLUDES_H

diff  --git a/libcxx/include/__algorithm/inplace_merge.h b/libcxx/include/__algorithm/inplace_merge.h
index 0890639f4952..5a1a3b1d20f6 100644
--- a/libcxx/include/__algorithm/inplace_merge.h
+++ b/libcxx/include/__algorithm/inplace_merge.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_INPLACE_MERGE_H
-#define _LIBCPP___ALGORITHM_INPLACE_MERGE_H
+#ifndef _LIBCUDACXX___ALGORITHM_INPLACE_MERGE_H
+#define _LIBCUDACXX___ALGORITHM_INPLACE_MERGE_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -25,14 +25,14 @@
 #include <__iterator/reverse_iterator.h>
 #include <memory>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Predicate>
 class __invert // invert the sense of a comparison
@@ -40,17 +40,17 @@ class __invert // invert the sense of a comparison
 private:
     _Predicate __p_;
 public:
-    _LIBCPP_INLINE_VISIBILITY __invert() {}
+    _LIBCUDACXX_INLINE_VISIBILITY __invert() {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __invert(_Predicate __p) : __p_(__p) {}
 
     template <class _T1>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _T1& __x) {return !__p_(__x);}
 
     template <class _T1, class _T2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _T1& __x, const _T2& __y) {return __p_(__y, __x);}
 };
 
@@ -209,7 +209,7 @@ void __inplace_merge(
 }
 
 template <class _AlgPolicy, class _BidirectionalIterator, class _Compare>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 void
 __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last,
               _Compare&& __comp)
@@ -218,18 +218,18 @@ __inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle,
     typedef typename iterator_traits<_BidirectionalIterator>::
diff erence_type 
diff erence_type;
     
diff erence_type __len1 = _IterOps<_AlgPolicy>::distance(__first, __middle);
     
diff erence_type __len2 = _IterOps<_AlgPolicy>::distance(__middle, __last);
-    
diff erence_type __buf_size = _VSTD::min(__len1, __len2);
+    
diff erence_type __buf_size = _CUDA_VSTD::min(__len1, __len2);
 // TODO: Remove the use of std::get_temporary_buffer
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
-    pair<value_type*, ptr
diff _t> __buf = _VSTD::get_temporary_buffer<value_type>(__buf_size);
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
+    pair<value_type*, ptr
diff _t> __buf = _CUDA_VSTD::get_temporary_buffer<value_type>(__buf_size);
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
     unique_ptr<value_type, __return_temporary_buffer> __h(__buf.first);
     return std::__inplace_merge<_AlgPolicy>(
         std::move(__first), std::move(__middle), std::move(__last), __comp, __len1, __len2, __buf.first, __buf.second);
 }
 
 template <class _BidirectionalIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI void inplace_merge(
+inline _LIBCUDACXX_HIDE_FROM_ABI void inplace_merge(
     _BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Compare __comp) {
   typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
   std::__inplace_merge<_ClassicAlgPolicy>(
@@ -237,7 +237,7 @@ inline _LIBCPP_HIDE_FROM_ABI void inplace_merge(
 }
 
 template <class _BidirectionalIterator>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 void
 inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last)
 {
@@ -245,8 +245,8 @@ inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _
                         __less<typename iterator_traits<_BidirectionalIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___ALGORITHM_INPLACE_MERGE_H
+#endif // _LIBCUDACXX___ALGORITHM_INPLACE_MERGE_H

diff  --git a/libcxx/include/__algorithm/is_heap.h b/libcxx/include/__algorithm/is_heap.h
index 0d399a09b857..fde2e0192b09 100644
--- a/libcxx/include/__algorithm/is_heap.h
+++ b/libcxx/include/__algorithm/is_heap.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IS_HEAP_H
-#define _LIBCPP___ALGORITHM_IS_HEAP_H
+#ifndef _LIBCUDACXX___ALGORITHM_IS_HEAP_H
+#define _LIBCUDACXX___ALGORITHM_IS_HEAP_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -15,15 +15,15 @@
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _RandomAccessIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
 {
@@ -32,14 +32,14 @@ is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __
 }
 
 template<class _RandomAccessIterator>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 is_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
-    return _VSTD::is_heap(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
+    return _CUDA_VSTD::is_heap(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_IS_HEAP_H
+#endif // _LIBCUDACXX___ALGORITHM_IS_HEAP_H

diff  --git a/libcxx/include/__algorithm/is_heap_until.h b/libcxx/include/__algorithm/is_heap_until.h
index adb35af887fb..82ce8ae43632 100644
--- a/libcxx/include/__algorithm/is_heap_until.h
+++ b/libcxx/include/__algorithm/is_heap_until.h
@@ -6,22 +6,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IS_HEAP_UNTIL_H
-#define _LIBCPP___ALGORITHM_IS_HEAP_UNTIL_H
+#ifndef _LIBCUDACXX___ALGORITHM_IS_HEAP_UNTIL_H
+#define _LIBCUDACXX___ALGORITHM_IS_HEAP_UNTIL_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Compare, class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
 __is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp)
 {
     typedef typename iterator_traits<_RandomAccessIterator>::
diff erence_type 
diff erence_type;
@@ -48,7 +48,7 @@ __is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Co
 }
 
 template <class _RandomAccessIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
 is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp)
 {
     typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
@@ -56,12 +56,12 @@ is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp
 }
 
 template<class _RandomAccessIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _RandomAccessIterator
 is_heap_until(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
-    return _VSTD::__is_heap_until(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
+    return _CUDA_VSTD::__is_heap_until(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_IS_HEAP_UNTIL_H
+#endif // _LIBCUDACXX___ALGORITHM_IS_HEAP_UNTIL_H

diff  --git a/libcxx/include/__algorithm/is_partitioned.h b/libcxx/include/__algorithm/is_partitioned.h
index b4f421cfc053..b27a3ce0fb44 100644
--- a/libcxx/include/__algorithm/is_partitioned.h
+++ b/libcxx/include/__algorithm/is_partitioned.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IS_PARTITIONED_H
-#define _LIBCPP___ALGORITHM_IS_PARTITIONED_H
+#ifndef _LIBCUDACXX___ALGORITHM_IS_PARTITIONED_H
+#define _LIBCUDACXX___ALGORITHM_IS_PARTITIONED_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred)
 {
     for (; __first != __last; ++__first)
@@ -33,6 +33,6 @@ is_partitioned(_InputIterator __first, _InputIterator __last, _Predicate __pred)
     return true;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_IS_PARTITIONED_H
+#endif // _LIBCUDACXX___ALGORITHM_IS_PARTITIONED_H

diff  --git a/libcxx/include/__algorithm/is_permutation.h b/libcxx/include/__algorithm/is_permutation.h
index 06a4949e21b5..8866755c9b48 100644
--- a/libcxx/include/__algorithm/is_permutation.h
+++ b/libcxx/include/__algorithm/is_permutation.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IS_PERMUTATION_H
-#define _LIBCPP___ALGORITHM_IS_PERMUTATION_H
+#ifndef _LIBCUDACXX___ALGORITHM_IS_PERMUTATION_H
+#define _LIBCUDACXX___ALGORITHM_IS_PERMUTATION_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/iterator_operations.h>
@@ -22,16 +22,16 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class = void>
 struct _ConstTimeDistance : false_type {};
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _Iter1, class _Sent1, class _Iter2, class _Sent2>
 struct _ConstTimeDistance<_Iter1, _Sent1, _Iter2, _Sent2, __enable_if_t<
@@ -47,7 +47,7 @@ struct _ConstTimeDistance<_Iter1, _Iter1, _Iter2, _Iter2, __enable_if_t<
     is_same<typename iterator_traits<_Iter2>::iterator_category, random_access_iterator_tag>::value
 > > : true_type {};
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 // Internal functions
 
@@ -55,7 +55,7 @@ struct _ConstTimeDistance<_Iter1, _Iter1, _Iter2, _Iter2, __enable_if_t<
 template <class _AlgPolicy,
           class _Iter1, class _Sent1, class _Iter2, class _Sent2,
           class _Proj1, class _Proj2, class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 __is_permutation_impl(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
                       _Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2) {
   using _D1 = __iter_
diff _t<_Iter1>;
@@ -94,7 +94,7 @@ __is_permutation_impl(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 _
 
 // 2+1 iterators, predicate. Not used by range algorithms.
 template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 __is_permutation(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2,
                  _BinaryPredicate&& __pred) {
   // Shorten sequences as much as possible by lopping of any equal prefix.
@@ -122,7 +122,7 @@ __is_permutation(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterato
 template <class _AlgPolicy,
           class _Iter1, class _Sent1, class _Iter2, class _Sent2,
           class _Proj1, class _Proj2, class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
                  _Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2,
                  /*_ConstTimeDistance=*/false_type) {
@@ -156,7 +156,7 @@ __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last
 template <class _AlgPolicy,
           class _Iter1, class _Sent1, class _Iter2, class _Sent2,
           class _Proj1, class _Proj2, class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
                  _Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2,
                  /*_ConstTimeDistance=*/true_type) {
@@ -172,7 +172,7 @@ __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last
 template <class _AlgPolicy,
           class _Iter1, class _Sent1, class _Iter2, class _Sent2,
           class _Proj1, class _Proj2, class _Pred>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
                  _Pred&& __pred, _Proj1&& __proj1, _Proj2&& __proj2) {
   return std::__is_permutation<_AlgPolicy>(
@@ -185,7 +185,7 @@ __is_permutation(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last
 
 // 2+1 iterators, predicate
 template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
                _BinaryPredicate __pred) {
   static_assert(__is_callable<_BinaryPredicate, decltype(*__first1), decltype(*__first2)>::value,
@@ -197,18 +197,18 @@ is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIt
 
 // 2+1 iterators
 template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) {
   using __v1 = __iter_value_type<_ForwardIterator1>;
   using __v2 = __iter_value_type<_ForwardIterator2>;
   return std::is_permutation(__first1, __last1, __first2, __equal_to<__v1, __v2>());
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 
 // 2+2 iterators
 template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
                _ForwardIterator2 __last2) {
   using __v1 = __iter_value_type<_ForwardIterator1>;
@@ -221,7 +221,7 @@ is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIt
 
 // 2+2 iterators, predicate
 template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
                _ForwardIterator2 __last2, _BinaryPredicate __pred) {
   static_assert(__is_callable<_BinaryPredicate, decltype(*__first1), decltype(*__first2)>::value,
@@ -232,8 +232,8 @@ is_permutation(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIt
       __pred, __identity(), __identity());
 }
 
-#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER > 11
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_IS_PERMUTATION_H
+#endif // _LIBCUDACXX___ALGORITHM_IS_PERMUTATION_H

diff  --git a/libcxx/include/__algorithm/is_sorted.h b/libcxx/include/__algorithm/is_sorted.h
index 56de95bb31b7..56055be786e4 100644
--- a/libcxx/include/__algorithm/is_sorted.h
+++ b/libcxx/include/__algorithm/is_sorted.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IS_SORTED_H
-#define _LIBCPP___ALGORITHM_IS_SORTED_H
+#ifndef _LIBCUDACXX___ALGORITHM_IS_SORTED_H
+#define _LIBCUDACXX___ALGORITHM_IS_SORTED_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -15,31 +15,31 @@
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 is_sorted(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
     typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
-    return _VSTD::__is_sorted_until<_Comp_ref>(__first, __last, __comp) == __last;
+    return _CUDA_VSTD::__is_sorted_until<_Comp_ref>(__first, __last, __comp) == __last;
 }
 
 template<class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 is_sorted(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::is_sorted(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
+    return _CUDA_VSTD::is_sorted(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_IS_SORTED_H
+#endif // _LIBCUDACXX___ALGORITHM_IS_SORTED_H

diff  --git a/libcxx/include/__algorithm/is_sorted_until.h b/libcxx/include/__algorithm/is_sorted_until.h
index 338d28508c17..f6c70b169100 100644
--- a/libcxx/include/__algorithm/is_sorted_until.h
+++ b/libcxx/include/__algorithm/is_sorted_until.h
@@ -6,22 +6,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_IS_SORTED_UNTIL_H
-#define _LIBCPP___ALGORITHM_IS_SORTED_UNTIL_H
+#ifndef _LIBCUDACXX___ALGORITHM_IS_SORTED_UNTIL_H
+#define _LIBCUDACXX___ALGORITHM_IS_SORTED_UNTIL_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Compare, class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
     if (__first != __last)
@@ -38,20 +38,20 @@ __is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __
 }
 
 template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 is_sorted_until(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
     typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
-    return _VSTD::__is_sorted_until<_Comp_ref>(__first, __last, __comp);
+    return _CUDA_VSTD::__is_sorted_until<_Comp_ref>(__first, __last, __comp);
 }
 
 template<class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 is_sorted_until(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::is_sorted_until(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
+    return _CUDA_VSTD::is_sorted_until(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_IS_SORTED_UNTIL_H
+#endif // _LIBCUDACXX___ALGORITHM_IS_SORTED_UNTIL_H

diff  --git a/libcxx/include/__algorithm/iter_swap.h b/libcxx/include/__algorithm/iter_swap.h
index 038859e1361d..2b05955905f7 100644
--- a/libcxx/include/__algorithm/iter_swap.h
+++ b/libcxx/include/__algorithm/iter_swap.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_ITER_SWAP_H
-#define _LIBCPP___ALGORITHM_ITER_SWAP_H
+#ifndef _LIBCUDACXX___ALGORITHM_ITER_SWAP_H
+#define _LIBCUDACXX___ALGORITHM_ITER_SWAP_H
 
 #include <__config>
 #include <__utility/declval.h>
 #include <__utility/swap.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _ForwardIterator1, class _ForwardIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void iter_swap(_ForwardIterator1 __a,
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void iter_swap(_ForwardIterator1 __a,
                                                                               _ForwardIterator2 __b)
     //                                  _NOEXCEPT_(_NOEXCEPT_(swap(*__a, *__b)))
     _NOEXCEPT_(_NOEXCEPT_(swap(*declval<_ForwardIterator1>(), *declval<_ForwardIterator2>()))) {
   swap(*__a, *__b);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_ITER_SWAP_H
+#endif // _LIBCUDACXX___ALGORITHM_ITER_SWAP_H

diff  --git a/libcxx/include/__algorithm/iterator_operations.h b/libcxx/include/__algorithm/iterator_operations.h
index af461878737f..a4589814a88f 100644
--- a/libcxx/include/__algorithm/iterator_operations.h
+++ b/libcxx/include/__algorithm/iterator_operations.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_ITERATOR_OPERATIONS_H
-#define _LIBCPP___ALGORITHM_ITERATOR_OPERATIONS_H
+#ifndef _LIBCUDACXX___ALGORITHM_ITERATOR_OPERATIONS_H
+#define _LIBCUDACXX___ALGORITHM_ITERATOR_OPERATIONS_H
 
 #include <__algorithm/iter_swap.h>
 #include <__algorithm/ranges_iterator_concept.h>
@@ -26,15 +26,15 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy> struct _IterOps;
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 struct _RangeAlgPolicy {};
 
 template <>
@@ -76,14 +76,14 @@ struct _IterOps<_ClassicAlgPolicy> {
 
   // advance
   template <class _Iter, class _Distance>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   static void advance(_Iter& __iter, _Distance __count) {
     std::advance(__iter, __count);
   }
 
   // distance
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   static typename iterator_traits<_Iter>::
diff erence_type distance(_Iter __first, _Iter __last) {
     return std::distance(__first, __last);
   }
@@ -95,7 +95,7 @@ struct _IterOps<_ClassicAlgPolicy> {
   using __move_t = decltype(std::move(*std::declval<_Iter&>()));
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   static void __validate_iter_reference() {
     static_assert(is_same<__deref_t<_Iter>, typename iterator_traits<__uncvref_t<_Iter> >::reference>::value,
         "It looks like your iterator's `iterator_traits<It>::reference` does not match the return type of "
@@ -105,7 +105,7 @@ struct _IterOps<_ClassicAlgPolicy> {
 
   // iter_move
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 static
   // If the result of dereferencing `_Iter` is a reference type, deduce the result of calling `std::move` on it. Note
   // that the C++03 mode doesn't support `decltype(auto)` as the return type.
   __enable_if_t<
@@ -118,7 +118,7 @@ struct _IterOps<_ClassicAlgPolicy> {
   }
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 static
   // If the result of dereferencing `_Iter` is a value type, deduce the return value of this function to also be a
   // value -- otherwise, after `operator*` returns a temporary, this function would return a dangling reference to that
   // temporary. Note that the C++03 mode doesn't support `auto` as the return type.
@@ -133,20 +133,20 @@ struct _IterOps<_ClassicAlgPolicy> {
 
   // iter_swap
   template <class _Iter1, class _Iter2>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   static void iter_swap(_Iter1&& __a, _Iter2&& __b) {
     std::iter_swap(std::forward<_Iter1>(__a), std::forward<_Iter2>(__b));
   }
 
   // next
   template <class _Iterator>
-  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   _Iterator next(_Iterator, _Iterator __last) {
     return __last;
   }
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   __uncvref_t<_Iter> next(_Iter&& __it,
                           typename iterator_traits<__uncvref_t<_Iter> >::
diff erence_type __n = 1) {
     return std::next(std::forward<_Iter>(__it), __n);
@@ -154,19 +154,19 @@ struct _IterOps<_ClassicAlgPolicy> {
 
   // prev
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   __uncvref_t<_Iter> prev(_Iter&& __iter,
                  typename iterator_traits<__uncvref_t<_Iter> >::
diff erence_type __n = 1) {
     return std::prev(std::forward<_Iter>(__iter), __n);
   }
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   void __advance_to(_Iter& __first, _Iter __last) {
     __first = __last;
   }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_ITERATOR_OPERATIONS_H
+#endif // _LIBCUDACXX___ALGORITHM_ITERATOR_OPERATIONS_H

diff  --git a/libcxx/include/__algorithm/lexicographical_compare.h b/libcxx/include/__algorithm/lexicographical_compare.h
index 30ddf2408120..c5cfbf4b8561 100644
--- a/libcxx/include/__algorithm/lexicographical_compare.h
+++ b/libcxx/include/__algorithm/lexicographical_compare.h
@@ -6,22 +6,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H
-#define _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H
+#ifndef _LIBCUDACXX___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H
+#define _LIBCUDACXX___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Compare, class _InputIterator1, class _InputIterator2>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 __lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                           _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
 {
@@ -36,28 +36,28 @@ __lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
 }
 
 template <class _InputIterator1, class _InputIterator2, class _Compare>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                         _InputIterator2 __first2, _InputIterator2 __last2, _Compare __comp)
 {
     typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
-    return _VSTD::__lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp);
+    return _CUDA_VSTD::__lexicographical_compare<_Comp_ref>(__first1, __last1, __first2, __last2, __comp);
 }
 
 template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 lexicographical_compare(_InputIterator1 __first1, _InputIterator1 __last1,
                         _InputIterator2 __first2, _InputIterator2 __last2)
 {
-    return _VSTD::lexicographical_compare(__first1, __last1, __first2, __last2,
+    return _CUDA_VSTD::lexicographical_compare(__first1, __last1, __first2, __last2,
                                          __less<typename iterator_traits<_InputIterator1>::value_type,
                                                 typename iterator_traits<_InputIterator2>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H
+#endif // _LIBCUDACXX___ALGORITHM_LEXICOGRAPHICAL_COMPARE_H

diff  --git a/libcxx/include/__algorithm/lower_bound.h b/libcxx/include/__algorithm/lower_bound.h
index 2c92f715265a..85e5cffc89f3 100644
--- a/libcxx/include/__algorithm/lower_bound.h
+++ b/libcxx/include/__algorithm/lower_bound.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_LOWER_BOUND_H
-#define _LIBCPP___ALGORITHM_LOWER_BOUND_H
+#ifndef _LIBCUDACXX___ALGORITHM_LOWER_BOUND_H
+#define _LIBCUDACXX___ALGORITHM_LOWER_BOUND_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/half_positive.h>
@@ -22,14 +22,14 @@
 #include <__type_traits/remove_reference.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Iter, class _Sent, class _Type, class _Proj, class _Comp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _Iter __lower_bound_impl(_Iter __first, _Sent __last, const _Type& __value, _Comp& __comp, _Proj& __proj) {
   auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);
 
@@ -48,7 +48,7 @@ _Iter __lower_bound_impl(_Iter __first, _Sent __last, const _Type& __value, _Com
 }
 
 template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
   static_assert(__is_callable<_Compare, decltype(*__first), const _Tp&>::value,
                 "The comparator has to be callable");
@@ -57,12 +57,12 @@ _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last,
 }
 
 template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator lower_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
   return std::lower_bound(__first, __last, __value,
                           __less<typename iterator_traits<_ForwardIterator>::value_type, _Tp>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_LOWER_BOUND_H
+#endif // _LIBCUDACXX___ALGORITHM_LOWER_BOUND_H

diff  --git a/libcxx/include/__algorithm/make_heap.h b/libcxx/include/__algorithm/make_heap.h
index 0aa67d18ed0a..83140b93eb6d 100644
--- a/libcxx/include/__algorithm/make_heap.h
+++ b/libcxx/include/__algorithm/make_heap.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MAKE_HEAP_H
-#define _LIBCPP___ALGORITHM_MAKE_HEAP_H
+#ifndef _LIBCUDACXX___ALGORITHM_MAKE_HEAP_H
+#define _LIBCUDACXX___ALGORITHM_MAKE_HEAP_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -17,14 +17,14 @@
 #include <__iterator/iterator_traits.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) {
   using _CompRef = typename __comp_ref_type<_Compare>::type;
   _CompRef __comp_ref = __comp;
@@ -40,18 +40,18 @@ void __make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
 }
 
 template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
   std::__make_heap<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
 }
 
 template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
   std::make_heap(std::move(__first), std::move(__last),
       __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_MAKE_HEAP_H
+#endif // _LIBCUDACXX___ALGORITHM_MAKE_HEAP_H

diff  --git a/libcxx/include/__algorithm/make_projected.h b/libcxx/include/__algorithm/make_projected.h
index 6c1d15677667..81e6b52b9650 100644
--- a/libcxx/include/__algorithm/make_projected.h
+++ b/libcxx/include/__algorithm/make_projected.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MAKE_PROJECTED_H
-#define _LIBCPP___ALGORITHM_MAKE_PROJECTED_H
+#ifndef _LIBCUDACXX___ALGORITHM_MAKE_PROJECTED_H
+#define _LIBCUDACXX___ALGORITHM_MAKE_PROJECTED_H
 
 #include <__concepts/same_as.h>
 #include <__config>
@@ -21,24 +21,24 @@
 #include <__utility/declval.h>
 #include <__utility/forward.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Pred, class _Proj>
 struct _ProjectedPred {
   _Pred& __pred; // Can be a unary or a binary predicate.
   _Proj& __proj;
 
-  _LIBCPP_CONSTEXPR _ProjectedPred(_Pred& __pred_arg, _Proj& __proj_arg) : __pred(__pred_arg), __proj(__proj_arg) {}
+  _LIBCUDACXX_CONSTEXPR _ProjectedPred(_Pred& __pred_arg, _Proj& __proj_arg) : __pred(__pred_arg), __proj(__proj_arg) {}
 
   template <class _Tp>
   typename __invoke_of<_Pred&,
                        decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_Tp>()))
   >::type
-  _LIBCPP_CONSTEXPR operator()(_Tp&& __v) const {
+  _LIBCUDACXX_CONSTEXPR operator()(_Tp&& __v) const {
     return std::__invoke(__pred, std::__invoke(__proj, std::forward<_Tp>(__v)));
   }
 
@@ -47,7 +47,7 @@ struct _ProjectedPred {
                        decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_T1>())),
                        decltype(std::__invoke(std::declval<_Proj&>(), std::declval<_T2>()))
   >::type
-  _LIBCPP_CONSTEXPR operator()(_T1&& __lhs, _T2&& __rhs) const {
+  _LIBCUDACXX_CONSTEXPR operator()(_T1&& __lhs, _T2&& __rhs) const {
     return std::__invoke(__pred,
                       std::__invoke(__proj, std::forward<_T1>(__lhs)),
                       std::__invoke(__proj, std::forward<_T2>(__rhs)));
@@ -61,7 +61,7 @@ struct __can_use_pristine_comp : false_type {};
 template <class _Pred, class _Proj>
 struct __can_use_pristine_comp<_Pred, _Proj, __enable_if_t<
     !is_member_pointer<typename decay<_Pred>::type>::value && (
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
       is_same<typename decay<_Proj>::type, identity>::value ||
 #endif
       is_same<typename decay<_Proj>::type, __identity>::value
@@ -69,7 +69,7 @@ struct __can_use_pristine_comp<_Pred, _Proj, __enable_if_t<
 > > : true_type {};
 
 template <class _Pred, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR static
 __enable_if_t<
     !__can_use_pristine_comp<_Pred, _Proj>::value,
     _ProjectedPred<_Pred, _Proj>
@@ -82,7 +82,7 @@ __make_projected(_Pred& __pred, _Proj& __proj) {
 // optimizations that rely on the type of the comparator. Additionally, this results in less layers of indirection in
 // the call stack when the comparator is invoked, even in an unoptimized build.
 template <class _Pred, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR static
 __enable_if_t<
     __can_use_pristine_comp<_Pred, _Proj>::value,
     _Pred&
@@ -91,16 +91,16 @@ __make_projected(_Pred& __pred, _Proj&) {
   return __pred;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
 template <class _Comp, class _Proj1, class _Proj2>
-_LIBCPP_HIDE_FROM_ABI constexpr static
+_LIBCUDACXX_HIDE_FROM_ABI constexpr static
 decltype(auto) __make_projected_comp(_Comp& __comp, _Proj1& __proj1, _Proj2& __proj2) {
   if constexpr (same_as<decay_t<_Proj1>, identity> && same_as<decay_t<_Proj2>, identity> &&
                 !is_member_pointer_v<decay_t<_Comp>>) {
@@ -119,8 +119,8 @@ decltype(auto) __make_projected_comp(_Comp& __comp, _Proj1& __proj1, _Proj2& __p
 
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_MAKE_PROJECTED_H
+#endif // _LIBCUDACXX___ALGORITHM_MAKE_PROJECTED_H

diff  --git a/libcxx/include/__algorithm/max.h b/libcxx/include/__algorithm/max.h
index 345b235a2193..7170c49bbad4 100644
--- a/libcxx/include/__algorithm/max.h
+++ b/libcxx/include/__algorithm/max.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MAX_H
-#define _LIBCPP___ALGORITHM_MAX_H
+#ifndef _LIBCUDACXX___ALGORITHM_MAX_H
+#define _LIBCUDACXX___ALGORITHM_MAX_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -15,18 +15,18 @@
 #include <__config>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const _Tp&
 max(const _Tp& __a, const _Tp& __b, _Compare __comp)
 {
@@ -34,39 +34,39 @@ max(const _Tp& __a, const _Tp& __b, _Compare __comp)
 }
 
 template <class _Tp>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const _Tp&
 max(const _Tp& __a, const _Tp& __b)
 {
-    return _VSTD::max(__a, __b, __less<_Tp>());
+    return _CUDA_VSTD::max(__a, __b, __less<_Tp>());
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template<class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp
 max(initializer_list<_Tp> __t, _Compare __comp)
 {
     typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
-    return *_VSTD::__max_element<_Comp_ref>(__t.begin(), __t.end(), __comp);
+    return *_CUDA_VSTD::__max_element<_Comp_ref>(__t.begin(), __t.end(), __comp);
 }
 
 template<class _Tp>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp
 max(initializer_list<_Tp> __t)
 {
-    return *_VSTD::max_element(__t.begin(), __t.end(), __less<_Tp>());
+    return *_CUDA_VSTD::max_element(__t.begin(), __t.end(), __less<_Tp>());
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___ALGORITHM_MAX_H
+#endif // _LIBCUDACXX___ALGORITHM_MAX_H

diff  --git a/libcxx/include/__algorithm/max_element.h b/libcxx/include/__algorithm/max_element.h
index 795ec8e1ddc1..ef0edbcb5d29 100644
--- a/libcxx/include/__algorithm/max_element.h
+++ b/libcxx/include/__algorithm/max_element.h
@@ -6,22 +6,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MAX_ELEMENT_H
-#define _LIBCPP___ALGORITHM_MAX_ELEMENT_H
+#ifndef _LIBCUDACXX___ALGORITHM_MAX_ELEMENT_H
+#define _LIBCUDACXX___ALGORITHM_MAX_ELEMENT_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Compare, class _ForwardIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _ForwardIterator
 __max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
     static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -37,22 +37,22 @@ __max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp
 }
 
 template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _ForwardIterator
 max_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
     typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
-    return _VSTD::__max_element<_Comp_ref>(__first, __last, __comp);
+    return _CUDA_VSTD::__max_element<_Comp_ref>(__first, __last, __comp);
 }
 
 
 template <class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _ForwardIterator
 max_element(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::max_element(__first, __last,
+    return _CUDA_VSTD::max_element(__first, __last,
               __less<typename iterator_traits<_ForwardIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_MAX_ELEMENT_H
+#endif // _LIBCUDACXX___ALGORITHM_MAX_ELEMENT_H

diff  --git a/libcxx/include/__algorithm/merge.h b/libcxx/include/__algorithm/merge.h
index 48360ed5b445..3655cb84d913 100644
--- a/libcxx/include/__algorithm/merge.h
+++ b/libcxx/include/__algorithm/merge.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MERGE_H
-#define _LIBCPP___ALGORITHM_MERGE_H
+#ifndef _LIBCUDACXX___ALGORITHM_MERGE_H
+#define _LIBCUDACXX___ALGORITHM_MERGE_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -15,14 +15,14 @@
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Compare, class _InputIterator1, class _InputIterator2, class _OutputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 __merge(_InputIterator1 __first1, _InputIterator1 __last1,
         _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
@@ -30,7 +30,7 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1,
     for (; __first1 != __last1; ++__result)
     {
         if (__first2 == __last2)
-            return _VSTD::copy(__first1, __last1, __result);
+            return _CUDA_VSTD::copy(__first1, __last1, __result);
         if (__comp(*__first2, *__first1))
         {
             *__result = *__first2;
@@ -42,30 +42,30 @@ __merge(_InputIterator1 __first1, _InputIterator1 __last1,
             ++__first1;
         }
     }
-    return _VSTD::copy(__first2, __last2, __result);
+    return _CUDA_VSTD::copy(__first2, __last2, __result);
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 merge(_InputIterator1 __first1, _InputIterator1 __last1,
       _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result, _Compare __comp)
 {
     typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
-    return _VSTD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
+    return _CUDA_VSTD::__merge<_Comp_ref>(__first1, __last1, __first2, __last2, __result, __comp);
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 merge(_InputIterator1 __first1, _InputIterator1 __last1,
       _InputIterator2 __first2, _InputIterator2 __last2, _OutputIterator __result)
 {
     typedef typename iterator_traits<_InputIterator1>::value_type __v1;
     typedef typename iterator_traits<_InputIterator2>::value_type __v2;
-    return _VSTD::merge(__first1, __last1, __first2, __last2, __result, __less<__v1, __v2>());
+    return _CUDA_VSTD::merge(__first1, __last1, __first2, __last2, __result, __less<__v1, __v2>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_MERGE_H
+#endif // _LIBCUDACXX___ALGORITHM_MERGE_H

diff  --git a/libcxx/include/__algorithm/min.h b/libcxx/include/__algorithm/min.h
index 3d8c73d78f11..9b4bc80430ee 100644
--- a/libcxx/include/__algorithm/min.h
+++ b/libcxx/include/__algorithm/min.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MIN_H
-#define _LIBCPP___ALGORITHM_MIN_H
+#ifndef _LIBCUDACXX___ALGORITHM_MIN_H
+#define _LIBCUDACXX___ALGORITHM_MIN_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -15,18 +15,18 @@
 #include <__config>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const _Tp&
 min(const _Tp& __a, const _Tp& __b, _Compare __comp)
 {
@@ -34,39 +34,39 @@ min(const _Tp& __a, const _Tp& __b, _Compare __comp)
 }
 
 template <class _Tp>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const _Tp&
 min(const _Tp& __a, const _Tp& __b)
 {
-    return _VSTD::min(__a, __b, __less<_Tp>());
+    return _CUDA_VSTD::min(__a, __b, __less<_Tp>());
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template<class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp
 min(initializer_list<_Tp> __t, _Compare __comp)
 {
     typedef typename __comp_ref_type<_Compare>::type _Comp_ref;
-    return *_VSTD::__min_element<_Comp_ref>(__t.begin(), __t.end(), __comp);
+    return *_CUDA_VSTD::__min_element<_Comp_ref>(__t.begin(), __t.end(), __comp);
 }
 
 template<class _Tp>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp
 min(initializer_list<_Tp> __t)
 {
-    return *_VSTD::min_element(__t.begin(), __t.end(), __less<_Tp>());
+    return *_CUDA_VSTD::min_element(__t.begin(), __t.end(), __less<_Tp>());
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___ALGORITHM_MIN_H
+#endif // _LIBCUDACXX___ALGORITHM_MIN_H

diff  --git a/libcxx/include/__algorithm/min_element.h b/libcxx/include/__algorithm/min_element.h
index 17b242c341e6..552a4565bdfc 100644
--- a/libcxx/include/__algorithm/min_element.h
+++ b/libcxx/include/__algorithm/min_element.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MIN_ELEMENT_H
-#define _LIBCPP___ALGORITHM_MIN_ELEMENT_H
+#ifndef _LIBCUDACXX___ALGORITHM_MIN_ELEMENT_H
+#define _LIBCUDACXX___ALGORITHM_MIN_ELEMENT_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -18,14 +18,14 @@
 #include <__type_traits/is_callable.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Comp, class _Iter, class _Sent, class _Proj>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Iter __min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) {
   if (__first == __last)
     return __first;
@@ -39,14 +39,14 @@ _Iter __min_element(_Iter __first, _Sent __last, _Comp __comp, _Proj& __proj) {
 }
 
 template <class _Comp, class _Iter, class _Sent>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Iter __min_element(_Iter __first, _Sent __last, _Comp __comp) {
   auto __proj = __identity();
   return std::__min_element<_Comp>(std::move(__first), std::move(__last), __comp, __proj);
 }
 
 template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _ForwardIterator
 min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 {
   static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -59,13 +59,13 @@ min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp)
 }
 
 template <class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _ForwardIterator
 min_element(_ForwardIterator __first, _ForwardIterator __last)
 {
-    return _VSTD::min_element(__first, __last,
+    return _CUDA_VSTD::min_element(__first, __last,
               __less<typename iterator_traits<_ForwardIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_MIN_ELEMENT_H
+#endif // _LIBCUDACXX___ALGORITHM_MIN_ELEMENT_H

diff  --git a/libcxx/include/__algorithm/min_max_result.h b/libcxx/include/__algorithm/min_max_result.h
index ca77dcc5725a..9dea9e170fa6 100644
--- a/libcxx/include/__algorithm/min_max_result.h
+++ b/libcxx/include/__algorithm/min_max_result.h
@@ -7,50 +7,50 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MIN_MAX_RESULT_H
-#define _LIBCPP___ALGORITHM_MIN_MAX_RESULT_H
+#ifndef _LIBCUDACXX___ALGORITHM_MIN_MAX_RESULT_H
+#define _LIBCUDACXX___ALGORITHM_MIN_MAX_RESULT_H
 
 #include <__concepts/convertible_to.h>
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
 template <class _T1>
 struct min_max_result {
-  _LIBCPP_NO_UNIQUE_ADDRESS _T1 min;
-  _LIBCPP_NO_UNIQUE_ADDRESS _T1 max;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _T1 min;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _T1 max;
 
   template <class _T2>
     requires convertible_to<const _T1&, _T2>
-  _LIBCPP_HIDE_FROM_ABI constexpr operator min_max_result<_T2>() const & {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr operator min_max_result<_T2>() const & {
     return {min, max};
   }
 
   template <class _T2>
     requires convertible_to<_T1, _T2>
-  _LIBCPP_HIDE_FROM_ABI constexpr operator min_max_result<_T2>() && {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr operator min_max_result<_T2>() && {
     return {std::move(min), std::move(max)};
   }
 };
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___ALGORITHM_MIN_MAX_RESULT_H
+#endif // _LIBCUDACXX___ALGORITHM_MIN_MAX_RESULT_H

diff  --git a/libcxx/include/__algorithm/minmax.h b/libcxx/include/__algorithm/minmax.h
index 7e10b8b8350c..4ae73547c64d 100644
--- a/libcxx/include/__algorithm/minmax.h
+++ b/libcxx/include/__algorithm/minmax.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MINMAX_H
-#define _LIBCPP___ALGORITHM_MINMAX_H
+#ifndef _LIBCUDACXX___ALGORITHM_MINMAX_H
+#define _LIBCUDACXX___ALGORITHM_MINMAX_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/minmax_element.h>
@@ -17,15 +17,15 @@
 #include <__utility/pair.h>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<const _Tp&, const _Tp&>
 minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
 {
@@ -34,18 +34,18 @@ minmax(const _Tp& __a, const _Tp& __b, _Compare __comp)
 }
 
 template<class _Tp>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<const _Tp&, const _Tp&>
 minmax(const _Tp& __a, const _Tp& __b)
 {
     return std::minmax(__a, __b, __less<_Tp>());
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template<class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_Tp, _Tp> minmax(initializer_list<_Tp> __t, _Compare __comp) {
     static_assert(__is_callable<_Compare, _Tp, _Tp>::value, "The comparator has to be callable");
     __identity __proj;
@@ -54,16 +54,16 @@ pair<_Tp, _Tp> minmax(initializer_list<_Tp> __t, _Compare __comp) {
 }
 
 template<class _Tp>
-_LIBCPP_NODISCARD_EXT inline
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_Tp, _Tp>
 minmax(initializer_list<_Tp> __t)
 {
     return std::minmax(__t, __less<_Tp>());
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_MINMAX_H
+#endif // _LIBCUDACXX___ALGORITHM_MINMAX_H

diff  --git a/libcxx/include/__algorithm/minmax_element.h b/libcxx/include/__algorithm/minmax_element.h
index cf67184e0b4c..0c14399dbf95 100644
--- a/libcxx/include/__algorithm/minmax_element.h
+++ b/libcxx/include/__algorithm/minmax_element.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MINMAX_ELEMENT_H
-#define _LIBCPP___ALGORITHM_MINMAX_ELEMENT_H
+#ifndef _LIBCUDACXX___ALGORITHM_MINMAX_ELEMENT_H
+#define _LIBCUDACXX___ALGORITHM_MINMAX_ELEMENT_H
 
 #include <__algorithm/comp.h>
 #include <__config>
@@ -16,11 +16,11 @@
 #include <__utility/pair.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Comp, class _Proj>
 class _MinmaxElementLessFunc {
@@ -28,18 +28,18 @@ class _MinmaxElementLessFunc {
   _Proj& __proj_;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
   _MinmaxElementLessFunc(_Comp& __comp, _Proj& __proj) : __comp_(__comp), __proj_(__proj) {}
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   bool operator()(_Iter& __it1, _Iter& __it2) {
     return std::__invoke(__comp_, std::__invoke(__proj_, *__it1), std::__invoke(__proj_, *__it2));
   }
 };
 
 template <class _Iter, class _Sent, class _Proj, class _Comp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_Iter, _Iter> __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
   auto __less = _MinmaxElementLessFunc<_Comp, _Proj>(__comp, __proj);
 
@@ -79,7 +79,7 @@ pair<_Iter, _Iter> __minmax_element_impl(_Iter __first, _Sent __last, _Comp& __c
 }
 
 template <class _ForwardIterator, class _Compare>
-_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_ForwardIterator, _ForwardIterator>
 minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp) {
   static_assert(__is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -91,11 +91,11 @@ minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __com
 }
 
 template <class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_ForwardIterator, _ForwardIterator> minmax_element(_ForwardIterator __first, _ForwardIterator __last) {
     return std::minmax_element(__first, __last, __less<typename iterator_traits<_ForwardIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_MINMAX_ELEMENT_H
+#endif // _LIBCUDACXX___ALGORITHM_MINMAX_ELEMENT_H

diff  --git a/libcxx/include/__algorithm/mismatch.h b/libcxx/include/__algorithm/mismatch.h
index f2011faf2f9a..309762d69306 100644
--- a/libcxx/include/__algorithm/mismatch.h
+++ b/libcxx/include/__algorithm/mismatch.h
@@ -7,23 +7,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MISMATCH_H
-#define _LIBCPP___ALGORITHM_MISMATCH_H
+#ifndef _LIBCUDACXX___ALGORITHM_MISMATCH_H
+#define _LIBCUDACXX___ALGORITHM_MISMATCH_H
 
 #include <__algorithm/comp.h>
 #include <__config>
 #include <__iterator/iterator_traits.h>
 #include <__utility/pair.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
     mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __pred) {
   for (; __first1 != __last1; ++__first1, (void)++__first2)
     if (!__pred(*__first1, *__first2))
@@ -32,18 +32,18 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
 }
 
 template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
     mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) {
   typedef typename iterator_traits<_InputIterator1>::value_type __v1;
   typedef typename iterator_traits<_InputIterator2>::value_type __v2;
-  return _VSTD::mismatch(__first1, __last1, __first2, __equal_to<__v1, __v2>());
+  return _CUDA_VSTD::mismatch(__first1, __last1, __first2, __equal_to<__v1, __v2>());
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _InputIterator1, class _InputIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
     mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2,
              _BinaryPredicate __pred) {
   for (; __first1 != __last1 && __first2 != __last2; ++__first1, (void)++__first2)
@@ -53,15 +53,15 @@ _LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
 }
 
 template <class _InputIterator1, class _InputIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<_InputIterator1, _InputIterator2>
     mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _InputIterator2 __last2) {
   typedef typename iterator_traits<_InputIterator1>::value_type __v1;
   typedef typename iterator_traits<_InputIterator2>::value_type __v2;
-  return _VSTD::mismatch(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
+  return _CUDA_VSTD::mismatch(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_MISMATCH_H
+#endif // _LIBCUDACXX___ALGORITHM_MISMATCH_H

diff  --git a/libcxx/include/__algorithm/move.h b/libcxx/include/__algorithm/move.h
index c090faf6b6dc..c9d456251fc8 100644
--- a/libcxx/include/__algorithm/move.h
+++ b/libcxx/include/__algorithm/move.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MOVE_H
-#define _LIBCPP___ALGORITHM_MOVE_H
+#ifndef _LIBCUDACXX___ALGORITHM_MOVE_H
+#define _LIBCUDACXX___ALGORITHM_MOVE_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/unwrap_iter.h>
@@ -19,16 +19,16 @@
 #include <cstring>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // move
 
 template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 pair<_InIter, _OutIter> __move_impl(_InIter __first, _Sent __last, _OutIter __result) {
   while (__first != __last) {
     *__result = _IterOps<_AlgPolicy>::__iter_move(__first);
@@ -43,11 +43,11 @@ template <class _AlgPolicy,
           class _OutType,
           class = __enable_if_t<is_same<typename remove_const<_InType>::type, _OutType>::value
                              && is_trivially_move_assignable<_OutType>::value> >
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_InType*, _OutType*> __move_impl(_InType* __first, _InType* __last, _OutType* __result) {
-  if (__libcpp_is_constant_evaluated()
+  if (__LIBCUDACXX_is_constant_evaluated()
 // TODO: Remove this once GCC supports __builtin_memmove during constant evaluation
-#ifndef _LIBCPP_COMPILER_GCC
+#ifndef _LIBCUDACXX_COMPILER_GCC
    && !is_trivially_copyable<_InType>::value
 #endif
      )
@@ -75,7 +75,7 @@ template <class _AlgPolicy,
                      && __is_cpp17_contiguous_iterator<_InIter>::value
                      && __is_cpp17_contiguous_iterator<_OutIter>::value
                      && is_trivially_move_assignable<__iter_value_type<_OutIter> >::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 pair<reverse_iterator<_InIter>, reverse_iterator<_OutIter> >
 __move_impl(reverse_iterator<_InIter> __first,
             reverse_iterator<_InIter> __last,
@@ -89,7 +89,7 @@ __move_impl(reverse_iterator<_InIter> __first,
 }
 
 template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 __enable_if_t<is_copy_constructible<_InIter>::value
            && is_copy_constructible<_Sent>::value
            && is_copy_constructible<_OutIter>::value, pair<_InIter, _OutIter> >
@@ -100,7 +100,7 @@ __move(_InIter __first, _Sent __last, _OutIter __result) {
 }
 
 template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 __enable_if_t<!is_copy_constructible<_InIter>::value
            || !is_copy_constructible<_Sent>::value
            || !is_copy_constructible<_OutIter>::value, pair<_InIter, _OutIter> >
@@ -109,11 +109,11 @@ __move(_InIter __first, _Sent __last, _OutIter __result) {
 }
 
 template <class _InputIterator, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator move(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
   return std::__move<_ClassicAlgPolicy>(__first, __last, __result).second;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_MOVE_H
+#endif // _LIBCUDACXX___ALGORITHM_MOVE_H

diff  --git a/libcxx/include/__algorithm/move_backward.h b/libcxx/include/__algorithm/move_backward.h
index 626e250b6d41..9c8bedb69e91 100644
--- a/libcxx/include/__algorithm/move_backward.h
+++ b/libcxx/include/__algorithm/move_backward.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_MOVE_BACKWARD_H
-#define _LIBCPP___ALGORITHM_MOVE_BACKWARD_H
+#ifndef _LIBCUDACXX___ALGORITHM_MOVE_BACKWARD_H
+#define _LIBCUDACXX___ALGORITHM_MOVE_BACKWARD_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/unwrap_iter.h>
@@ -16,14 +16,14 @@
 #include <cstring>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _InputIterator, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 _OutputIterator
 __move_backward_constexpr(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
 {
@@ -33,15 +33,15 @@ __move_backward_constexpr(_InputIterator __first, _InputIterator __last, _Output
 }
 
 template <class _AlgPolicy, class _InputIterator, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 _OutputIterator
 __move_backward_impl(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
 {
-    return _VSTD::__move_backward_constexpr<_AlgPolicy>(__first, __last, __result);
+    return _CUDA_VSTD::__move_backward_constexpr<_AlgPolicy>(__first, __last, __result);
 }
 
 template <class _AlgPolicy, class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 typename enable_if
 <
     is_same<typename remove_const<_Tp>::type, _Up>::value &&
@@ -54,29 +54,29 @@ __move_backward_impl(_Tp* __first, _Tp* __last, _Up* __result)
     if (__n > 0)
     {
         __result -= __n;
-        _VSTD::memmove(__result, __first, __n * sizeof(_Up));
+        _CUDA_VSTD::memmove(__result, __first, __n * sizeof(_Up));
     }
     return __result;
 }
 
 template <class _AlgPolicy, class _BidirectionalIterator1, class _BidirectionalIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _BidirectionalIterator2
 __move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
                 _BidirectionalIterator2 __result)
 {
-    if (__libcpp_is_constant_evaluated()) {
-        return _VSTD::__move_backward_constexpr<_AlgPolicy>(__first, __last, __result);
+    if (__LIBCUDACXX_is_constant_evaluated()) {
+        return _CUDA_VSTD::__move_backward_constexpr<_AlgPolicy>(__first, __last, __result);
     } else {
-        return _VSTD::__rewrap_iter(__result,
-            _VSTD::__move_backward_impl<_AlgPolicy>(_VSTD::__unwrap_iter(__first),
-                                                    _VSTD::__unwrap_iter(__last),
-                                                    _VSTD::__unwrap_iter(__result)));
+        return _CUDA_VSTD::__rewrap_iter(__result,
+            _CUDA_VSTD::__move_backward_impl<_AlgPolicy>(_CUDA_VSTD::__unwrap_iter(__first),
+                                                    _CUDA_VSTD::__unwrap_iter(__last),
+                                                    _CUDA_VSTD::__unwrap_iter(__result)));
     }
 }
 
 template <class _BidirectionalIterator1, class _BidirectionalIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _BidirectionalIterator2
 move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
               _BidirectionalIterator2 __result)
@@ -84,6 +84,6 @@ move_backward(_BidirectionalIterator1 __first, _BidirectionalIterator1 __last,
   return std::__move_backward<_ClassicAlgPolicy>(std::move(__first), std::move(__last), std::move(__result));
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_MOVE_BACKWARD_H
+#endif // _LIBCUDACXX___ALGORITHM_MOVE_BACKWARD_H

diff  --git a/libcxx/include/__algorithm/next_permutation.h b/libcxx/include/__algorithm/next_permutation.h
index b58dcf4e1a91..26c4456a86bb 100644
--- a/libcxx/include/__algorithm/next_permutation.h
+++ b/libcxx/include/__algorithm/next_permutation.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_NEXT_PERMUTATION_H
-#define _LIBCPP___ALGORITHM_NEXT_PERMUTATION_H
+#ifndef _LIBCUDACXX___ALGORITHM_NEXT_PERMUTATION_H
+#define _LIBCUDACXX___ALGORITHM_NEXT_PERMUTATION_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -18,14 +18,14 @@
 #include <__utility/move.h>
 #include <__utility/pair.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 pair<_BidirectionalIterator, bool>
 __next_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
 {
@@ -57,7 +57,7 @@ __next_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&&
 }
 
 template <class _BidirectionalIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
 {
@@ -67,14 +67,14 @@ next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last,
 }
 
 template <class _BidirectionalIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 next_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
 {
-    return _VSTD::next_permutation(__first, __last,
+    return _CUDA_VSTD::next_permutation(__first, __last,
                                   __less<typename iterator_traits<_BidirectionalIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_NEXT_PERMUTATION_H
+#endif // _LIBCUDACXX___ALGORITHM_NEXT_PERMUTATION_H

diff  --git a/libcxx/include/__algorithm/none_of.h b/libcxx/include/__algorithm/none_of.h
index b34b1e00ddb8..71927a8f7abe 100644
--- a/libcxx/include/__algorithm/none_of.h
+++ b/libcxx/include/__algorithm/none_of.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_NONE_OF_H
-#define _LIBCPP___ALGORITHM_NONE_OF_H
+#ifndef _LIBCUDACXX___ALGORITHM_NONE_OF_H
+#define _LIBCUDACXX___ALGORITHM_NONE_OF_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
   for (; __first != __last; ++__first)
     if (__pred(*__first))
@@ -27,6 +27,6 @@ none_of(_InputIterator __first, _InputIterator __last, _Predicate __pred) {
   return true;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_NONE_OF_H
+#endif // _LIBCUDACXX___ALGORITHM_NONE_OF_H

diff  --git a/libcxx/include/__algorithm/nth_element.h b/libcxx/include/__algorithm/nth_element.h
index 688398dee814..53f742f12b62 100644
--- a/libcxx/include/__algorithm/nth_element.h
+++ b/libcxx/include/__algorithm/nth_element.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_NTH_ELEMENT_H
-#define _LIBCPP___ALGORITHM_NTH_ELEMENT_H
+#ifndef _LIBCUDACXX___ALGORITHM_NTH_ELEMENT_H
+#define _LIBCUDACXX___ALGORITHM_NTH_ELEMENT_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -19,14 +19,14 @@
 #include <__iterator/iterator_traits.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _Compare, class _RandomAccessIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 bool
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 bool
 __nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
                          _RandomAccessIterator __m, _Compare __comp)
 {
@@ -42,7 +42,7 @@ __nth_element_find_guard(_RandomAccessIterator& __i, _RandomAccessIterator& __j,
 }
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 void
 __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last, _Compare __comp)
 {
     using _Ops = _IterOps<_AlgPolicy>;
@@ -91,7 +91,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
         if (!__comp(*__i, *__m))  // if *__first == *__m
         {
             // *__first == *__m, *__first doesn't go in first part
-            if (_VSTD::__nth_element_find_guard<_Compare>(__i, __j, __m, __comp)) {
+            if (_CUDA_VSTD::__nth_element_find_guard<_Compare>(__i, __j, __m, __comp)) {
                 _Ops::iter_swap(__i, __j);
                 ++__n_swaps;
             } else {
@@ -133,7 +133,7 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
                     return;
                 }
                 // __nth_element the second part
-                // _VSTD::__nth_element<_Compare>(__i, __nth, __last, __comp);
+                // _CUDA_VSTD::__nth_element<_Compare>(__i, __nth, __last, __comp);
                 __first = __i;
                 continue;
             }
@@ -211,19 +211,19 @@ __nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _Rando
         // __nth_element on range containing __nth
         if (__nth < __i)
         {
-            // _VSTD::__nth_element<_Compare>(__first, __nth, __i, __comp);
+            // _CUDA_VSTD::__nth_element<_Compare>(__first, __nth, __i, __comp);
             __last = __i;
         }
         else
         {
-            // _VSTD::__nth_element<_Compare>(__i+1, __nth, __last, __comp);
+            // _CUDA_VSTD::__nth_element<_Compare>(__i+1, __nth, __last, __comp);
             __first = ++__i;
         }
     }
 }
 
 template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void __nth_element_impl(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last,
                         _Compare& __comp) {
   if (__nth == __last)
@@ -241,19 +241,19 @@ void __nth_element_impl(_RandomAccessIterator __first, _RandomAccessIterator __n
 }
 
 template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last,
                  _Compare __comp) {
   std::__nth_element_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__nth), std::move(__last), __comp);
 }
 
 template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void nth_element(_RandomAccessIterator __first, _RandomAccessIterator __nth, _RandomAccessIterator __last) {
   std::nth_element(std::move(__first), std::move(__nth), std::move(__last), __less<typename
       iterator_traits<_RandomAccessIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_NTH_ELEMENT_H
+#endif // _LIBCUDACXX___ALGORITHM_NTH_ELEMENT_H

diff  --git a/libcxx/include/__algorithm/partial_sort.h b/libcxx/include/__algorithm/partial_sort.h
index dff0cd01f35a..8609246c45aa 100644
--- a/libcxx/include/__algorithm/partial_sort.h
+++ b/libcxx/include/__algorithm/partial_sort.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_PARTIAL_SORT_H
-#define _LIBCPP___ALGORITHM_PARTIAL_SORT_H
+#ifndef _LIBCUDACXX___ALGORITHM_PARTIAL_SORT_H
+#define _LIBCUDACXX___ALGORITHM_PARTIAL_SORT_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -22,14 +22,14 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _RandomAccessIterator __partial_sort_impl(
     _RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last, _Compare&& __comp) {
   if (__first == __middle) {
@@ -55,7 +55,7 @@ _RandomAccessIterator __partial_sort_impl(
 }
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _RandomAccessIterator __partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Sentinel __last,
                                      _Compare& __comp) {
   if (__first == __middle)
@@ -72,7 +72,7 @@ _RandomAccessIterator __partial_sort(_RandomAccessIterator __first, _RandomAcces
 }
 
 template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
              _Compare __comp)
@@ -84,14 +84,14 @@ partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
 }
 
 template <class _RandomAccessIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 partial_sort(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
 {
-    _VSTD::partial_sort(__first, __middle, __last,
+    _CUDA_VSTD::partial_sort(__first, __middle, __last,
                         __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_PARTIAL_SORT_H
+#endif // _LIBCUDACXX___ALGORITHM_PARTIAL_SORT_H

diff  --git a/libcxx/include/__algorithm/partial_sort_copy.h b/libcxx/include/__algorithm/partial_sort_copy.h
index 55edf31b0f92..3e650ede8277 100644
--- a/libcxx/include/__algorithm/partial_sort_copy.h
+++ b/libcxx/include/__algorithm/partial_sort_copy.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_PARTIAL_SORT_COPY_H
-#define _LIBCPP___ALGORITHM_PARTIAL_SORT_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_PARTIAL_SORT_COPY_H
+#define _LIBCUDACXX___ALGORITHM_PARTIAL_SORT_COPY_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -24,16 +24,16 @@
 #include <__utility/move.h>
 #include <__utility/pair.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare,
           class _InputIterator, class _Sentinel1, class _RandomAccessIterator, class _Sentinel2,
           class _Proj1, class _Proj2>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_InputIterator, _RandomAccessIterator>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<_InputIterator, _RandomAccessIterator>
 __partial_sort_copy(_InputIterator __first, _Sentinel1 __last,
                     _RandomAccessIterator __result_first, _Sentinel2 __result_last,
                     _Compare&& __comp, _Proj1&& __proj1, _Proj2&& __proj2)
@@ -60,7 +60,7 @@ __partial_sort_copy(_InputIterator __first, _Sentinel1 __last,
 }
 
 template <class _InputIterator, class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _RandomAccessIterator
 partial_sort_copy(_InputIterator __first, _InputIterator __last,
                   _RandomAccessIterator __result_first, _RandomAccessIterator __result_last, _Compare __comp)
@@ -75,15 +75,15 @@ partial_sort_copy(_InputIterator __first, _InputIterator __last,
 }
 
 template <class _InputIterator, class _RandomAccessIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _RandomAccessIterator
 partial_sort_copy(_InputIterator __first, _InputIterator __last,
                   _RandomAccessIterator __result_first, _RandomAccessIterator __result_last)
 {
-    return _VSTD::partial_sort_copy(__first, __last, __result_first, __result_last,
+    return _CUDA_VSTD::partial_sort_copy(__first, __last, __result_first, __result_last,
                                    __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_PARTIAL_SORT_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_PARTIAL_SORT_COPY_H

diff  --git a/libcxx/include/__algorithm/partition.h b/libcxx/include/__algorithm/partition.h
index 60b4e290ebeb..880b63981430 100644
--- a/libcxx/include/__algorithm/partition.h
+++ b/libcxx/include/__algorithm/partition.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_PARTITION_H
-#define _LIBCPP___ALGORITHM_PARTITION_H
+#ifndef _LIBCUDACXX___ALGORITHM_PARTITION_H
+#define _LIBCUDACXX___ALGORITHM_PARTITION_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__config>
@@ -16,14 +16,14 @@
 #include <__utility/pair.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Predicate, class _AlgPolicy, class _ForwardIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<_ForwardIterator, _ForwardIterator>
 __partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred, forward_iterator_tag)
 {
     while (true)
@@ -48,7 +48,7 @@ __partition_impl(_ForwardIterator __first, _Sentinel __last, _Predicate __pred,
 }
 
 template <class _Predicate, class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_BidirectionalIterator, _BidirectionalIterator>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<_BidirectionalIterator, _BidirectionalIterator>
 __partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicate __pred,
             bidirectional_iterator_tag)
 {
@@ -76,7 +76,7 @@ __partition_impl(_BidirectionalIterator __first, _Sentinel __sentinel, _Predicat
 }
 
 template <class _AlgPolicy, class _ForwardIterator, class _Sentinel, class _Predicate, class _IterCategory>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 pair<_ForwardIterator, _ForwardIterator> __partition(
     _ForwardIterator __first, _Sentinel __last, _Predicate&& __pred, _IterCategory __iter_category) {
   return std::__partition_impl<__uncvref_t<_Predicate>&, _AlgPolicy>(
@@ -84,7 +84,7 @@ pair<_ForwardIterator, _ForwardIterator> __partition(
 }
 
 template <class _ForwardIterator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator
 partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
 {
@@ -93,6 +93,6 @@ partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
   return __result.first;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_PARTITION_H
+#endif // _LIBCUDACXX___ALGORITHM_PARTITION_H

diff  --git a/libcxx/include/__algorithm/partition_copy.h b/libcxx/include/__algorithm/partition_copy.h
index cacde0bfd47b..46994d8e1d19 100644
--- a/libcxx/include/__algorithm/partition_copy.h
+++ b/libcxx/include/__algorithm/partition_copy.h
@@ -6,22 +6,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_PARTITION_COPY_H
-#define _LIBCPP___ALGORITHM_PARTITION_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_PARTITION_COPY_H
+#define _LIBCUDACXX___ALGORITHM_PARTITION_COPY_H
 
 #include <__config>
 #include <__iterator/iterator_traits.h>
 #include <__utility/pair.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _OutputIterator1,
           class _OutputIterator2, class _Predicate>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 pair<_OutputIterator1, _OutputIterator2>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<_OutputIterator1, _OutputIterator2>
 partition_copy(_InputIterator __first, _InputIterator __last,
                _OutputIterator1 __out_true, _OutputIterator2 __out_false,
                _Predicate __pred)
@@ -42,6 +42,6 @@ partition_copy(_InputIterator __first, _InputIterator __last,
     return pair<_OutputIterator1, _OutputIterator2>(__out_true, __out_false);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_PARTITION_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_PARTITION_COPY_H

diff  --git a/libcxx/include/__algorithm/partition_point.h b/libcxx/include/__algorithm/partition_point.h
index 1675534e60d5..4148076da456 100644
--- a/libcxx/include/__algorithm/partition_point.h
+++ b/libcxx/include/__algorithm/partition_point.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_PARTITION_POINT_H
-#define _LIBCPP___ALGORITHM_PARTITION_POINT_H
+#ifndef _LIBCUDACXX___ALGORITHM_PARTITION_POINT_H
+#define _LIBCUDACXX___ALGORITHM_PARTITION_POINT_H
 
 #include <__algorithm/half_positive.h>
 #include <__config>
@@ -15,23 +15,23 @@
 #include <__iterator/distance.h>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _ForwardIterator, class _Predicate>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
 {
     typedef typename iterator_traits<_ForwardIterator>::
diff erence_type 
diff erence_type;
-    
diff erence_type __len = _VSTD::distance(__first, __last);
+    
diff erence_type __len = _CUDA_VSTD::distance(__first, __last);
     while (__len != 0)
     {
-        
diff erence_type __l2 = _VSTD::__half_positive(__len);
+        
diff erence_type __l2 = _CUDA_VSTD::__half_positive(__len);
         _ForwardIterator __m = __first;
-        _VSTD::advance(__m, __l2);
+        _CUDA_VSTD::advance(__m, __l2);
         if (__pred(*__m))
         {
             __first = ++__m;
@@ -43,6 +43,6 @@ partition_point(_ForwardIterator __first, _ForwardIterator __last, _Predicate __
     return __first;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_PARTITION_POINT_H
+#endif // _LIBCUDACXX___ALGORITHM_PARTITION_POINT_H

diff  --git a/libcxx/include/__algorithm/pop_heap.h b/libcxx/include/__algorithm/pop_heap.h
index 44d5d3972605..fdcc64783fad 100644
--- a/libcxx/include/__algorithm/pop_heap.h
+++ b/libcxx/include/__algorithm/pop_heap.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_POP_HEAP_H
-#define _LIBCPP___ALGORITHM_POP_HEAP_H
+#ifndef _LIBCUDACXX___ALGORITHM_POP_HEAP_H
+#define _LIBCUDACXX___ALGORITHM_POP_HEAP_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -20,17 +20,17 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp,
     typename iterator_traits<_RandomAccessIterator>::
diff erence_type __len) {
-  _LIBCPP_ASSERT(__len > 0, "The heap given to pop_heap must be non-empty");
+  _LIBCUDACXX_ASSERT(__len > 0, "The heap given to pop_heap must be non-empty");
 
   using _CompRef = typename __comp_ref_type<_Compare>::type;
   _CompRef __comp_ref = __comp;
@@ -53,7 +53,7 @@ void __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Co
 }
 
 template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
   static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
   static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
@@ -63,12 +63,12 @@ void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp
 }
 
 template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
   std::pop_heap(std::move(__first), std::move(__last),
       __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_POP_HEAP_H
+#endif // _LIBCUDACXX___ALGORITHM_POP_HEAP_H

diff  --git a/libcxx/include/__algorithm/prev_permutation.h b/libcxx/include/__algorithm/prev_permutation.h
index 698506372b6f..b8273dca6850 100644
--- a/libcxx/include/__algorithm/prev_permutation.h
+++ b/libcxx/include/__algorithm/prev_permutation.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_PREV_PERMUTATION_H
-#define _LIBCPP___ALGORITHM_PREV_PERMUTATION_H
+#ifndef _LIBCUDACXX___ALGORITHM_PREV_PERMUTATION_H
+#define _LIBCUDACXX___ALGORITHM_PREV_PERMUTATION_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -18,14 +18,14 @@
 #include <__utility/move.h>
 #include <__utility/pair.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 pair<_BidirectionalIterator, bool>
 __prev_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&& __comp)
 {
@@ -57,7 +57,7 @@ __prev_permutation(_BidirectionalIterator __first, _Sentinel __last, _Compare&&
 }
 
 template <class _BidirectionalIterator, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp)
 {
@@ -67,14 +67,14 @@ prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last,
 }
 
 template <class _BidirectionalIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 prev_permutation(_BidirectionalIterator __first, _BidirectionalIterator __last)
 {
-    return _VSTD::prev_permutation(__first, __last,
+    return _CUDA_VSTD::prev_permutation(__first, __last,
                                   __less<typename iterator_traits<_BidirectionalIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_PREV_PERMUTATION_H
+#endif // _LIBCUDACXX___ALGORITHM_PREV_PERMUTATION_H

diff  --git a/libcxx/include/__algorithm/push_heap.h b/libcxx/include/__algorithm/push_heap.h
index 72ad51e1a887..f9b6fbfd7d40 100644
--- a/libcxx/include/__algorithm/push_heap.h
+++ b/libcxx/include/__algorithm/push_heap.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_PUSH_HEAP_H
-#define _LIBCPP___ALGORITHM_PUSH_HEAP_H
+#ifndef _LIBCUDACXX___ALGORITHM_PUSH_HEAP_H
+#define _LIBCUDACXX___ALGORITHM_PUSH_HEAP_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -17,14 +17,14 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void __sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp,
         typename iterator_traits<_RandomAccessIterator>::
diff erence_type __len) {
   using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
@@ -50,7 +50,7 @@ void __sift_up(_RandomAccessIterator __first, _RandomAccessIterator __last, _Com
 }
 
 template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void __push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) {
   using _CompRef = typename __comp_ref_type<_Compare>::type;
   typename iterator_traits<_RandomAccessIterator>::
diff erence_type __len = __last - __first;
@@ -58,7 +58,7 @@ void __push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
 }
 
 template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
   static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
   static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
@@ -67,12 +67,12 @@ void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Com
 }
 
 template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
   std::push_heap(std::move(__first), std::move(__last),
       __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_PUSH_HEAP_H
+#endif // _LIBCUDACXX___ALGORITHM_PUSH_HEAP_H

diff  --git a/libcxx/include/__algorithm/ranges_adjacent_find.h b/libcxx/include/__algorithm/ranges_adjacent_find.h
index e798d568299d..dbf2bd54b9a1 100644
--- a/libcxx/include/__algorithm/ranges_adjacent_find.h
+++ b/libcxx/include/__algorithm/ranges_adjacent_find.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_ADJACENT_FIND_H
-#define _LIBCPP___ALGORITHM_RANGES_ADJACENT_FIND_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_ADJACENT_FIND_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_ADJACENT_FIND_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -20,20 +20,20 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __adjacent_find {
 struct __fn {
 
   template <class _Iter, class _Sent, class _Proj, class _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   _Iter __adjacent_find_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
     if (__first == __last)
       return __first;
@@ -50,7 +50,7 @@ struct __fn {
   template <forward_iterator _Iter, sentinel_for<_Iter> _Sent,
             class _Proj = identity,
             indirect_binary_predicate<projected<_Iter, _Proj>, projected<_Iter, _Proj>> _Pred = ranges::equal_to>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, _Pred __pred = {}, _Proj __proj = {}) const {
     return __adjacent_find_impl(std::move(__first), std::move(__last), __pred, __proj);
   }
@@ -59,7 +59,7 @@ struct __fn {
             class _Proj = identity,
             indirect_binary_predicate<projected<iterator_t<_Range>, _Proj>,
                                       projected<iterator_t<_Range>, _Proj>> _Pred = ranges::equal_to>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __range, _Pred __pred = {}, _Proj __proj = {}) const {
     return __adjacent_find_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
   }
@@ -71,8 +71,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_ADJACENT_FIND_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_ADJACENT_FIND_H

diff  --git a/libcxx/include/__algorithm/ranges_all_of.h b/libcxx/include/__algorithm/ranges_all_of.h
index a146865652a7..d95ba40c3d99 100644
--- a/libcxx/include/__algorithm/ranges_all_of.h
+++ b/libcxx/include/__algorithm/ranges_all_of.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_ALL_OF_H
-#define _LIBCPP___ALGORITHM_RANGES_ALL_OF_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_ALL_OF_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_ALL_OF_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -18,20 +18,20 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __all_of {
 struct __fn {
 
   template <class _Iter, class _Sent, class _Proj, class _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   bool __all_of_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
     for (; __first != __last; ++__first) {
       if (!std::invoke(__pred, std::invoke(__proj, *__first)))
@@ -42,14 +42,14 @@ struct __fn {
 
   template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
             indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
     return __all_of_impl(std::move(__first), std::move(__last), __pred, __proj);
   }
 
   template <input_range _Range, class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
     return __all_of_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
   }
@@ -61,8 +61,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_ALL_OF_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_ALL_OF_H

diff  --git a/libcxx/include/__algorithm/ranges_any_of.h b/libcxx/include/__algorithm/ranges_any_of.h
index 11c52cbe21ea..de3759f46d40 100644
--- a/libcxx/include/__algorithm/ranges_any_of.h
+++ b/libcxx/include/__algorithm/ranges_any_of.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_ANY_OF_H
-#define _LIBCPP___ALGORITHM_RANGES_ANY_OF_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_ANY_OF_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_ANY_OF_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -18,20 +18,20 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __any_of {
 struct __fn {
 
   template <class _Iter, class _Sent, class _Proj, class _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   bool __any_of_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
     for (; __first != __last; ++__first) {
       if (std::invoke(__pred, std::invoke(__proj, *__first)))
@@ -42,14 +42,14 @@ struct __fn {
 
   template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
             indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Iter __first, _Sent __last, _Pred __pred = {}, _Proj __proj = {}) const {
     return __any_of_impl(std::move(__first), std::move(__last), __pred, __proj);
   }
 
   template <input_range _Range, class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
     return __any_of_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
   }
@@ -61,8 +61,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_ANY_OF_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_ANY_OF_H

diff  --git a/libcxx/include/__algorithm/ranges_binary_search.h b/libcxx/include/__algorithm/ranges_binary_search.h
index 6da68834aa3b..9a48a20491a5 100644
--- a/libcxx/include/__algorithm/ranges_binary_search.h
+++ b/libcxx/include/__algorithm/ranges_binary_search.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_BINARY_SEARCH_H
-#define _LIBCPP___ALGORITHM_RANGES_BINARY_SEARCH_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_BINARY_SEARCH_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_BINARY_SEARCH_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/lower_bound.h>
@@ -20,20 +20,20 @@
 #include <__ranges/access.h>
 #include <__ranges/concepts.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __binary_search {
 struct __fn {
   template <forward_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity,
             indirect_strict_weak_order<const _Type*, projected<_Iter, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Iter __first, _Sent __last, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __ret = std::__lower_bound_impl<_RangeAlgPolicy>(__first, __last, __value, __comp, __proj);
     return __ret != __last && !std::invoke(__comp, __value, std::invoke(__proj, *__first));
@@ -41,7 +41,7 @@ struct __fn {
 
   template <forward_range _Range, class _Type, class _Proj = identity,
             indirect_strict_weak_order<const _Type*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Range&& __r, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __first = ranges::begin(__r);
     auto __last = ranges::end(__r);
@@ -56,8 +56,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_BINARY_SEARCH_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_BINARY_SEARCH_H

diff  --git a/libcxx/include/__algorithm/ranges_clamp.h b/libcxx/include/__algorithm/ranges_clamp.h
index bdde97e178a7..43e1e9c806cc 100644
--- a/libcxx/include/__algorithm/ranges_clamp.h
+++ b/libcxx/include/__algorithm/ranges_clamp.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_CLAMP_H
-#define _LIBCPP___ALGORITHM_RANGES_CLAMP_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_CLAMP_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_CLAMP_H
 
 #include <__assert>
 #include <__config>
@@ -18,13 +18,13 @@
 #include <__iterator/projected.h>
 #include <__utility/forward.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __clamp {
@@ -33,13 +33,13 @@ struct __fn {
   template <class _Type,
             class _Proj = identity,
             indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   const _Type& operator()(const _Type& __value,
                           const _Type& __low,
                           const _Type& __high,
                           _Comp __comp = {},
                           _Proj __proj = {}) const {
-    _LIBCPP_ASSERT(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))),
+    _LIBCUDACXX_ASSERT(!bool(std::invoke(__comp, std::invoke(__proj, __high), std::invoke(__proj, __low))),
                    "Bad bounds passed to std::ranges::clamp");
 
     if (std::invoke(__comp, std::invoke(__proj, __value), std::invoke(__proj, __low)))
@@ -58,8 +58,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_CLAMP_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_CLAMP_H

diff  --git a/libcxx/include/__algorithm/ranges_copy.h b/libcxx/include/__algorithm/ranges_copy.h
index f5d6d5cd139a..0e6e29702086 100644
--- a/libcxx/include/__algorithm/ranges_copy.h
+++ b/libcxx/include/__algorithm/ranges_copy.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_COPY_H
-#define _LIBCPP___ALGORITHM_RANGES_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_COPY_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_COPY_H
 
 #include <__algorithm/copy.h>
 #include <__algorithm/in_out_result.h>
@@ -19,13 +19,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -37,7 +37,7 @@ struct __fn {
 
   template <input_iterator _InIter, sentinel_for<_InIter> _Sent, weakly_incrementable _OutIter>
     requires indirectly_copyable<_InIter, _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   copy_result<_InIter, _OutIter> operator()(_InIter __first, _Sent __last, _OutIter __result) const {
     auto __ret = std::__copy(std::move(__first), std::move(__last), std::move(__result));
     return {std::move(__ret.first), std::move(__ret.second)};
@@ -45,7 +45,7 @@ struct __fn {
 
   template <input_range _Range, weakly_incrementable _OutIter>
     requires indirectly_copyable<iterator_t<_Range>, _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   copy_result<borrowed_iterator_t<_Range>, _OutIter> operator()(_Range&& __r, _OutIter __result) const {
     auto __ret = std::__copy(ranges::begin(__r), ranges::end(__r), std::move(__result));
     return {std::move(__ret.first), std::move(__ret.second)};
@@ -58,8 +58,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_COPY_H

diff  --git a/libcxx/include/__algorithm/ranges_copy_backward.h b/libcxx/include/__algorithm/ranges_copy_backward.h
index 673df8025fab..f584257ed549 100644
--- a/libcxx/include/__algorithm/ranges_copy_backward.h
+++ b/libcxx/include/__algorithm/ranges_copy_backward.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_COPY_BACKWARD_H
-#define _LIBCPP___ALGORITHM_RANGES_COPY_BACKWARD_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_COPY_BACKWARD_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_COPY_BACKWARD_H
 
 #include <__algorithm/copy_backward.h>
 #include <__algorithm/in_out_result.h>
@@ -20,13 +20,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -38,7 +38,7 @@ struct __fn {
 
   template <bidirectional_iterator _InIter1, sentinel_for<_InIter1> _Sent1, bidirectional_iterator _InIter2>
     requires indirectly_copyable<_InIter1, _InIter2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   copy_backward_result<_InIter1, _InIter2> operator()(_InIter1 __first, _Sent1 __last, _InIter2 __result) const {
     auto __ret = std::__copy_backward<_RangeAlgPolicy>(std::move(__first), std::move(__last), std::move(__result));
     return {std::move(__ret.first), std::move(__ret.second)};
@@ -46,7 +46,7 @@ struct __fn {
 
   template <bidirectional_range _Range, bidirectional_iterator _Iter>
     requires indirectly_copyable<iterator_t<_Range>, _Iter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   copy_backward_result<borrowed_iterator_t<_Range>, _Iter> operator()(_Range&& __r, _Iter __result) const {
     auto __ret = std::__copy_backward<_RangeAlgPolicy>(ranges::begin(__r), ranges::end(__r), std::move(__result));
     return {std::move(__ret.first), std::move(__ret.second)};
@@ -59,8 +59,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_COPY_BACKWARD_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_COPY_BACKWARD_H

diff  --git a/libcxx/include/__algorithm/ranges_copy_if.h b/libcxx/include/__algorithm/ranges_copy_if.h
index 492104fbbfba..4e35fd3c6e88 100644
--- a/libcxx/include/__algorithm/ranges_copy_if.h
+++ b/libcxx/include/__algorithm/ranges_copy_if.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_COPY_IF_H
-#define _LIBCPP___ALGORITHM_RANGES_COPY_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_COPY_IF_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_COPY_IF_H
 
 #include <__algorithm/in_out_result.h>
 #include <__config>
@@ -20,13 +20,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -37,7 +37,7 @@ namespace __copy_if {
 struct __fn {
 
   template <class _InIter, class _Sent, class _OutIter, class _Proj, class _Pred>
-  _LIBCPP_HIDE_FROM_ABI static constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr
   copy_if_result <_InIter, _OutIter>
   __copy_if_impl(_InIter __first, _Sent __last, _OutIter __result, _Pred& __pred, _Proj& __proj) {
     for (; __first != __last; ++__first) {
@@ -52,7 +52,7 @@ struct __fn {
   template <input_iterator _Iter, sentinel_for<_Iter> _Sent, weakly_incrementable _OutIter, class _Proj = identity,
             indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
     requires indirectly_copyable<_Iter, _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   copy_if_result<_Iter, _OutIter>
   operator()(_Iter __first, _Sent __last, _OutIter __result, _Pred __pred, _Proj __proj = {}) const {
     return __copy_if_impl(std::move(__first), std::move(__last), std::move(__result), __pred, __proj);
@@ -61,7 +61,7 @@ struct __fn {
   template <input_range _Range, weakly_incrementable _OutIter, class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
     requires indirectly_copyable<iterator_t<_Range>, _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   copy_if_result<borrowed_iterator_t<_Range>, _OutIter>
   operator()(_Range&& __r, _OutIter __result, _Pred __pred, _Proj __proj = {}) const {
     return __copy_if_impl(ranges::begin(__r), ranges::end(__r), std::move(__result), __pred, __proj);
@@ -74,8 +74,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_COPY_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_COPY_IF_H

diff  --git a/libcxx/include/__algorithm/ranges_copy_n.h b/libcxx/include/__algorithm/ranges_copy_n.h
index eaa05c954686..614342bfba47 100644
--- a/libcxx/include/__algorithm/ranges_copy_n.h
+++ b/libcxx/include/__algorithm/ranges_copy_n.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_COPY_N_H
-#define _LIBCPP___ALGORITHM_RANGES_COPY_N_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_COPY_N_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_COPY_N_H
 
 #include <__algorithm/copy.h>
 #include <__algorithm/in_out_result.h>
@@ -20,13 +20,13 @@
 #include <__iterator/wrap_iter.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
@@ -37,7 +37,7 @@ namespace __copy_n {
 struct __fn {
 
   template <class _InIter, class _DiffType, class _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   copy_n_result<_InIter, _OutIter> __go(_InIter __first, _DiffType __n, _OutIter __result) {
     while (__n != 0) {
       *__result = *__first;
@@ -49,7 +49,7 @@ struct __fn {
   }
 
   template <random_access_iterator _InIter, class _DiffType, random_access_iterator _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   copy_n_result<_InIter, _OutIter> __go(_InIter __first, _DiffType __n, _OutIter __result) {
     auto __ret = std::__copy(__first, __first + __n, __result);
     return {__ret.first, __ret.second};
@@ -57,7 +57,7 @@ struct __fn {
 
   template <input_iterator _Ip, weakly_incrementable _Op>
     requires indirectly_copyable<_Ip, _Op>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   copy_n_result<_Ip, _Op> operator()(_Ip __first, iter_
diff erence_t<_Ip> __n, _Op __result) const {
     return __go(std::move(__first), __n, std::move(__result));
   }
@@ -69,8 +69,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_RANGES_COPY_N_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_COPY_N_H

diff  --git a/libcxx/include/__algorithm/ranges_count.h b/libcxx/include/__algorithm/ranges_count.h
index 670df26911d0..c0b2f0f61c1d 100644
--- a/libcxx/include/__algorithm/ranges_count.h
+++ b/libcxx/include/__algorithm/ranges_count.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_COUNT_H
-#define _LIBCPP___ALGORITHM_RANGES_COUNT_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_COUNT_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_COUNT_H
 
 #include <__algorithm/ranges_count_if.h>
 #include <__config>
@@ -21,20 +21,20 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __count {
 struct __fn {
   template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity>
     requires indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Type*>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   iter_
diff erence_t<_Iter> operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) const {
     auto __pred = [&](auto&& __e) { return __e == __value; };
     return ranges::__count_if_impl(std::move(__first), std::move(__last), __pred, __proj);
@@ -42,7 +42,7 @@ struct __fn {
 
   template <input_range _Range, class _Type, class _Proj = identity>
     requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type*>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   range_
diff erence_t<_Range> operator()(_Range&& __r, const _Type& __value, _Proj __proj = {}) const {
     auto __pred = [&](auto&& __e) { return __e == __value; };
     return ranges::__count_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
@@ -55,8 +55,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_COUNT_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_COUNT_H

diff  --git a/libcxx/include/__algorithm/ranges_count_if.h b/libcxx/include/__algorithm/ranges_count_if.h
index 0f34ee9f2b1b..a069aaa5fca7 100644
--- a/libcxx/include/__algorithm/ranges_count_if.h
+++ b/libcxx/include/__algorithm/ranges_count_if.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_COUNT_IF_H
-#define _LIBCPP___ALGORITHM_RANGES_COUNT_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_COUNT_IF_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_COUNT_IF_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -21,17 +21,17 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 template <class _Iter, class _Sent, class _Proj, class _Pred>
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 iter_
diff erence_t<_Iter> __count_if_impl(_Iter __first, _Sent __last,
                                              _Pred& __pred, _Proj& __proj) {
   iter_
diff erence_t<_Iter> __counter(0);
@@ -46,14 +46,14 @@ namespace __count_if {
 struct __fn {
   template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
             indirect_unary_predicate<projected<_Iter, _Proj>> _Predicate>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   iter_
diff erence_t<_Iter> operator()(_Iter __first, _Sent __last, _Predicate __pred, _Proj __proj = {}) const {
     return ranges::__count_if_impl(std::move(__first), std::move(__last), __pred, __proj);
   }
 
   template <input_range _Range, class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Predicate>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   range_
diff erence_t<_Range> operator()(_Range&& __r, _Predicate __pred, _Proj __proj = {}) const {
     return ranges::__count_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
   }
@@ -65,8 +65,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_COUNT_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_COUNT_IF_H

diff  --git a/libcxx/include/__algorithm/ranges_equal.h b/libcxx/include/__algorithm/ranges_equal.h
index c5f2d2332216..75a304245b40 100644
--- a/libcxx/include/__algorithm/ranges_equal.h
+++ b/libcxx/include/__algorithm/ranges_equal.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_EQUAL_H
-#define _LIBCPP___ALGORITHM_RANGES_EQUAL_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_EQUAL_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_EQUAL_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -20,13 +20,13 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __equal {
@@ -37,7 +37,7 @@ struct __fn {
             class _Pred,
             class _Proj1,
             class _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   bool __equal_impl(_Iter1 __first1, _Sent1 __last1,
                     _Iter2 __first2, _Sent2 __last2,
                     _Pred& __pred,
@@ -60,7 +60,7 @@ struct __fn {
             class _Proj1 = identity,
             class _Proj2 = identity>
     requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Iter1 __first1, _Sent1 __last1,
                   _Iter2 __first2, _Sent2 __last2,
                   _Pred __pred = {},
@@ -83,7 +83,7 @@ struct __fn {
             class _Proj1 = identity,
             class _Proj2 = identity>
     requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Range1&& __range1,
                   _Range2&& __range2,
                   _Pred __pred = {},
@@ -108,8 +108,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_EQUAL_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_EQUAL_H

diff  --git a/libcxx/include/__algorithm/ranges_equal_range.h b/libcxx/include/__algorithm/ranges_equal_range.h
index dd4b377df1a1..173c054f1b29 100644
--- a/libcxx/include/__algorithm/ranges_equal_range.h
+++ b/libcxx/include/__algorithm/ranges_equal_range.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_EQUAL_RANGE_H
-#define _LIBCPP___ALGORITHM_RANGES_EQUAL_RANGE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_EQUAL_RANGE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_EQUAL_RANGE_H
 
 #include <__algorithm/equal_range.h>
 #include <__algorithm/iterator_operations.h>
@@ -25,13 +25,13 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __equal_range {
@@ -43,7 +43,7 @@ struct __fn {
       class _Tp,
       class _Proj                                                           = identity,
       indirect_strict_weak_order<const _Tp*, projected<_Iter, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange<_Iter>
   operator()(_Iter __first, _Sent __last, const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __ret = std::__equal_range<_RangeAlgPolicy>(
         std::move(__first), std::move(__last), __value, __comp, __proj);
@@ -55,7 +55,7 @@ struct __fn {
       class _Tp,
       class _Proj                                                                        = identity,
       indirect_strict_weak_order<const _Tp*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
   operator()(_Range&& __range, const _Tp& __value, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __ret = std::__equal_range<_RangeAlgPolicy>(
         ranges::begin(__range), ranges::end(__range), __value, __comp, __proj);
@@ -70,8 +70,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_EQUAL_RANGE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_EQUAL_RANGE_H

diff  --git a/libcxx/include/__algorithm/ranges_fill.h b/libcxx/include/__algorithm/ranges_fill.h
index 7ce4a76ba9e9..c30936e52e73 100644
--- a/libcxx/include/__algorithm/ranges_fill.h
+++ b/libcxx/include/__algorithm/ranges_fill.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_FILL_H
-#define _LIBCPP___ALGORITHM_RANGES_FILL_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_FILL_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_FILL_H
 
 #include <__algorithm/ranges_fill_n.h>
 #include <__config>
@@ -16,19 +16,19 @@
 #include <__ranges/concepts.h>
 #include <__ranges/dangling.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __fill {
 struct __fn {
   template <class _Type, output_iterator<const _Type&> _Iter, sentinel_for<_Iter> _Sent>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, const _Type& __value) const {
     if constexpr(random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>) {
       return ranges::fill_n(__first, __last - __first, __value);
@@ -40,7 +40,7 @@ struct __fn {
   }
 
   template <class _Type, output_range<const _Type&> _Range>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __range, const _Type& __value) const {
     return (*this)(ranges::begin(__range), ranges::end(__range), __value);
   }
@@ -52,8 +52,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_FILL_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_FILL_H

diff  --git a/libcxx/include/__algorithm/ranges_fill_n.h b/libcxx/include/__algorithm/ranges_fill_n.h
index d93c573406ec..24f2a4e6092a 100644
--- a/libcxx/include/__algorithm/ranges_fill_n.h
+++ b/libcxx/include/__algorithm/ranges_fill_n.h
@@ -6,26 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_FILL_N_H
-#define _LIBCPP___ALGORITHM_RANGES_FILL_N_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_FILL_N_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_FILL_N_H
 
 #include <__config>
 #include <__iterator/concepts.h>
 #include <__iterator/incrementable_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __fill_n {
 struct __fn {
   template <class _Type, output_iterator<const _Type&> _Iter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, iter_
diff erence_t<_Iter> __n, const _Type& __value) const {
     for (; __n != 0; --__n) {
       *__first = __value;
@@ -41,8 +41,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_FILL_N_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_FILL_N_H

diff  --git a/libcxx/include/__algorithm/ranges_find.h b/libcxx/include/__algorithm/ranges_find.h
index ca6d2f438295..ee323c94a47a 100644
--- a/libcxx/include/__algorithm/ranges_find.h
+++ b/libcxx/include/__algorithm/ranges_find.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_FIND_H
-#define _LIBCPP___ALGORITHM_RANGES_FIND_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_FIND_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_FIND_H
 
 #include <__algorithm/ranges_find_if.h>
 #include <__config>
@@ -22,20 +22,20 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __find {
 struct __fn {
   template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Tp, class _Proj = identity>
     requires indirect_binary_predicate<ranges::equal_to, projected<_Ip, _Proj>, const _Tp*>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Ip operator()(_Ip __first, _Sp __last, const _Tp& __value, _Proj __proj = {}) const {
     auto __pred = [&](auto&& __e) { return std::forward<decltype(__e)>(__e) == __value; };
     return ranges::__find_if_impl(std::move(__first), std::move(__last), __pred, __proj);
@@ -43,7 +43,7 @@ struct __fn {
 
   template <input_range _Rp, class _Tp, class _Proj = identity>
     requires indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Rp>, _Proj>, const _Tp*>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Rp> operator()(_Rp&& __r, const _Tp& __value, _Proj __proj = {}) const {
     auto __pred = [&](auto&& __e) { return std::forward<decltype(__e)>(__e) == __value; };
     return ranges::__find_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
@@ -56,8 +56,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_FIND_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_FIND_H

diff  --git a/libcxx/include/__algorithm/ranges_find_end.h b/libcxx/include/__algorithm/ranges_find_end.h
index 270b00649848..584f9ae314bb 100644
--- a/libcxx/include/__algorithm/ranges_find_end.h
+++ b/libcxx/include/__algorithm/ranges_find_end.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_FIND_END_H
-#define _LIBCPP___ALGORITHM_RANGES_FIND_END_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_FIND_END_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_FIND_END_H
 
 #include <__algorithm/find_end.h>
 #include <__algorithm/iterator_operations.h>
@@ -22,13 +22,13 @@
 #include <__ranges/concepts.h>
 #include <__ranges/subrange.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __find_end {
@@ -39,7 +39,7 @@ struct __fn {
             class _Proj1 = identity,
             class _Proj2 = identity>
     requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   subrange<_Iter1> operator()(_Iter1 __first1, _Sent1 __last1,
                               _Iter2 __first2, _Sent2 __last2,
                               _Pred __pred = {},
@@ -64,7 +64,7 @@ struct __fn {
             class _Proj1 = identity,
             class _Proj2 = identity>
     requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_subrange_t<_Range1> operator()(_Range1&& __range1,
                                           _Range2&& __range2,
                                           _Pred __pred = {},
@@ -90,8 +90,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_FIND_END_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_FIND_END_H

diff  --git a/libcxx/include/__algorithm/ranges_find_first_of.h b/libcxx/include/__algorithm/ranges_find_first_of.h
index ae31d38e6a95..cc206015c467 100644
--- a/libcxx/include/__algorithm/ranges_find_first_of.h
+++ b/libcxx/include/__algorithm/ranges_find_first_of.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_FIND_FIRST_OF_H
-#define _LIBCPP___ALGORITHM_RANGES_FIND_FIRST_OF_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_FIND_FIRST_OF_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_FIND_FIRST_OF_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -20,20 +20,20 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __find_first_of {
 struct __fn {
 
   template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Pred, class _Proj1, class _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   _Iter1 __find_first_of_impl(_Iter1 __first1, _Sent1 __last1,
                               _Iter2 __first2, _Sent2 __last2,
                               _Pred& __pred,
@@ -54,7 +54,7 @@ struct __fn {
             class _Proj1 = identity,
             class _Proj2 = identity>
     requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter1 operator()(_Iter1 __first1, _Sent1 __last1,
                     _Iter2 __first2, _Sent2 __last2,
                     _Pred __pred = {},
@@ -73,7 +73,7 @@ struct __fn {
             class _Proj1 = identity,
             class _Proj2 = identity>
     requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range1> operator()(_Range1&& __range1,
                                           _Range2&& __range2,
                                           _Pred __pred = {},
@@ -94,8 +94,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_FIND_FIRST_OF_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_FIND_FIRST_OF_H

diff  --git a/libcxx/include/__algorithm/ranges_find_if.h b/libcxx/include/__algorithm/ranges_find_if.h
index 65ac122f6677..644b421a716a 100644
--- a/libcxx/include/__algorithm/ranges_find_if.h
+++ b/libcxx/include/__algorithm/ranges_find_if.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_FIND_IF_H
-#define _LIBCPP___ALGORITHM_RANGES_FIND_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_FIND_IF_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_FIND_IF_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -20,18 +20,18 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
 template <class _Ip, class _Sp, class _Pred, class _Proj>
-_LIBCPP_HIDE_FROM_ABI static constexpr
+_LIBCUDACXX_HIDE_FROM_ABI static constexpr
 _Ip __find_if_impl(_Ip __first, _Sp __last, _Pred& __pred, _Proj& __proj) {
   for (; __first != __last; ++__first) {
     if (std::invoke(__pred, std::invoke(__proj, *__first)))
@@ -45,14 +45,14 @@ struct __fn {
 
   template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
             indirect_unary_predicate<projected<_Ip, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Ip operator()(_Ip __first, _Sp __last, _Pred __pred, _Proj __proj = {}) const {
     return ranges::__find_if_impl(std::move(__first), std::move(__last), __pred, __proj);
   }
 
   template <input_range _Rp, class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Rp>, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Pred __pred, _Proj __proj = {}) const {
     return ranges::__find_if_impl(ranges::begin(__r), ranges::end(__r), __pred, __proj);
   }
@@ -64,8 +64,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_FIND_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_FIND_IF_H

diff  --git a/libcxx/include/__algorithm/ranges_find_if_not.h b/libcxx/include/__algorithm/ranges_find_if_not.h
index 9a1adf71fc58..d470efbc8122 100644
--- a/libcxx/include/__algorithm/ranges_find_if_not.h
+++ b/libcxx/include/__algorithm/ranges_find_if_not.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_FIND_IF_NOT_H
-#define _LIBCPP___ALGORITHM_RANGES_FIND_IF_NOT_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_FIND_IF_NOT_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_FIND_IF_NOT_H
 
 #include <__algorithm/ranges_find_if.h>
 #include <__config>
@@ -22,20 +22,20 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __find_if_not {
 struct __fn {
   template <input_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
             indirect_unary_predicate<projected<_Ip, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Ip operator()(_Ip __first, _Sp __last, _Pred __pred, _Proj __proj = {}) const {
     auto __pred2 = [&](auto&& __e) { return !std::invoke(__pred, std::forward<decltype(__e)>(__e)); };
     return ranges::__find_if_impl(std::move(__first), std::move(__last), __pred2, __proj);
@@ -43,7 +43,7 @@ struct __fn {
 
   template <input_range _Rp, class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Rp>, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Pred __pred, _Proj __proj = {}) const {
     auto __pred2 = [&](auto&& __e) { return !std::invoke(__pred, std::forward<decltype(__e)>(__e)); };
     return ranges::__find_if_impl(ranges::begin(__r), ranges::end(__r), __pred2, __proj);
@@ -56,8 +56,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_FIND_IF_NOT_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_FIND_IF_NOT_H

diff  --git a/libcxx/include/__algorithm/ranges_for_each.h b/libcxx/include/__algorithm/ranges_for_each.h
index f284c0ee3ad4..e85092914eca 100644
--- a/libcxx/include/__algorithm/ranges_for_each.h
+++ b/libcxx/include/__algorithm/ranges_for_each.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_FOR_EACH_H
-#define _LIBCPP___ALGORITHM_RANGES_FOR_EACH_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_FOR_EACH_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_FOR_EACH_H
 
 #include <__algorithm/in_fun_result.h>
 #include <__config>
@@ -20,13 +20,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -37,7 +37,7 @@ namespace __for_each {
 struct __fn {
 private:
   template <class _Iter, class _Sent, class _Proj, class _Func>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   for_each_result<_Iter, _Func> __for_each_impl(_Iter __first, _Sent __last, _Func& __func, _Proj& __proj) {
     for (; __first != __last; ++__first)
       std::invoke(__func, std::invoke(__proj, *__first));
@@ -48,7 +48,7 @@ struct __fn {
   template <input_iterator _Iter, sentinel_for<_Iter> _Sent,
             class _Proj = identity,
             indirectly_unary_invocable<projected<_Iter, _Proj>> _Func>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   for_each_result<_Iter, _Func> operator()(_Iter __first, _Sent __last, _Func __func, _Proj __proj = {}) const {
     return __for_each_impl(std::move(__first), std::move(__last), __func, __proj);
   }
@@ -56,7 +56,7 @@ struct __fn {
   template <input_range _Range,
             class _Proj = identity,
             indirectly_unary_invocable<projected<iterator_t<_Range>, _Proj>> _Func>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   for_each_result<borrowed_iterator_t<_Range>, _Func> operator()(_Range&& __range,
                                                                  _Func __func,
                                                                  _Proj __proj = {}) const {
@@ -71,8 +71,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_FOR_EACH_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_FOR_EACH_H

diff  --git a/libcxx/include/__algorithm/ranges_for_each_n.h b/libcxx/include/__algorithm/ranges_for_each_n.h
index 013afbd19389..39ee77a563a8 100644
--- a/libcxx/include/__algorithm/ranges_for_each_n.h
+++ b/libcxx/include/__algorithm/ranges_for_each_n.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_FOR_EACH_N_H
-#define _LIBCPP___ALGORITHM_RANGES_FOR_EACH_N_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_FOR_EACH_N_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_FOR_EACH_N_H
 
 #include <__algorithm/in_fun_result.h>
 #include <__config>
@@ -20,13 +20,13 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -39,7 +39,7 @@ struct __fn {
   template <input_iterator _Iter,
             class _Proj = identity,
             indirectly_unary_invocable<projected<_Iter, _Proj>> _Func>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   for_each_n_result<_Iter, _Func> operator()(_Iter __first,
                                              iter_
diff erence_t<_Iter> __count,
                                              _Func __func,
@@ -59,8 +59,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_FOR_EACH_N_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_FOR_EACH_N_H

diff  --git a/libcxx/include/__algorithm/ranges_generate.h b/libcxx/include/__algorithm/ranges_generate.h
index 149296574d80..a356cb9a1877 100644
--- a/libcxx/include/__algorithm/ranges_generate.h
+++ b/libcxx/include/__algorithm/ranges_generate.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_GENERATE_H
-#define _LIBCPP___ALGORITHM_RANGES_GENERATE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_GENERATE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_GENERATE_H
 
 #include <__concepts/constructible.h>
 #include <__concepts/invocable.h>
@@ -20,13 +20,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __generate {
@@ -34,7 +34,7 @@ namespace __generate {
 struct __fn {
 
   template <class _OutIter, class _Sent, class _Func>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   static _OutIter __generate_fn_impl(_OutIter __first, _Sent __last, _Func& __gen) {
     for (; __first != __last; ++__first) {
       *__first = __gen();
@@ -45,14 +45,14 @@ struct __fn {
 
   template <input_or_output_iterator _OutIter, sentinel_for<_OutIter> _Sent, copy_constructible _Func>
   requires invocable<_Func&> && indirectly_writable<_OutIter, invoke_result_t<_Func&>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _OutIter operator()(_OutIter __first, _Sent __last, _Func __gen) const {
     return __generate_fn_impl(std::move(__first), std::move(__last), __gen);
   }
 
   template <class _Range, copy_constructible _Func>
   requires invocable<_Func&> && output_range<_Range, invoke_result_t<_Func&>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __range, _Func __gen) const {
     return __generate_fn_impl(ranges::begin(__range), ranges::end(__range), __gen);
   }
@@ -66,8 +66,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_GENERATE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_GENERATE_H

diff  --git a/libcxx/include/__algorithm/ranges_generate_n.h b/libcxx/include/__algorithm/ranges_generate_n.h
index 63f466cecdd7..d40d5562084c 100644
--- a/libcxx/include/__algorithm/ranges_generate_n.h
+++ b/libcxx/include/__algorithm/ranges_generate_n.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_GENERATE_N_H
-#define _LIBCPP___ALGORITHM_RANGES_GENERATE_N_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_GENERATE_N_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_GENERATE_N_H
 
 #include <__concepts/constructible.h>
 #include <__concepts/invocable.h>
@@ -21,13 +21,13 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __generate_n {
@@ -36,7 +36,7 @@ struct __fn {
 
   template <input_or_output_iterator _OutIter, copy_constructible _Func>
   requires invocable<_Func&> && indirectly_writable<_OutIter, invoke_result_t<_Func&>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _OutIter operator()(_OutIter __first, iter_
diff erence_t<_OutIter> __n, _Func __gen) const {
     for (; __n > 0; --__n) {
       *__first = __gen();
@@ -55,8 +55,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_GENERATE_N_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_GENERATE_N_H

diff  --git a/libcxx/include/__algorithm/ranges_includes.h b/libcxx/include/__algorithm/ranges_includes.h
index 2c7581af68af..07564ec4e41d 100644
--- a/libcxx/include/__algorithm/ranges_includes.h
+++ b/libcxx/include/__algorithm/ranges_includes.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_INCLUDES_H
-#define _LIBCPP___ALGORITHM_RANGES_INCLUDES_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_INCLUDES_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_INCLUDES_H
 
 #include <__algorithm/includes.h>
 #include <__algorithm/make_projected.h>
@@ -23,13 +23,13 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __includes {
@@ -43,7 +43,7 @@ struct __fn {
       class _Proj1                                                                           = identity,
       class _Proj2                                                                           = identity,
       indirect_strict_weak_order<projected<_Iter1, _Proj1>, projected<_Iter2, _Proj2>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool operator()(
       _Iter1 __first1,
       _Sent1 __last1,
       _Iter2 __first2,
@@ -68,7 +68,7 @@ struct __fn {
       class _Proj2 = identity,
       indirect_strict_weak_order<projected<iterator_t<_Range1>, _Proj1>, projected<iterator_t<_Range2>, _Proj2>>
           _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool operator()(
       _Range1&& __range1, _Range2&& __range2, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
     return std::__includes(
         ranges::begin(__range1),
@@ -88,8 +88,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_INCLUDES_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_INCLUDES_H

diff  --git a/libcxx/include/__algorithm/ranges_inplace_merge.h b/libcxx/include/__algorithm/ranges_inplace_merge.h
index 12c90908c210..dc6d4f507587 100644
--- a/libcxx/include/__algorithm/ranges_inplace_merge.h
+++ b/libcxx/include/__algorithm/ranges_inplace_merge.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_INPLACE_MERGE_H
-#define _LIBCPP___ALGORITHM_RANGES_INPLACE_MERGE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_INPLACE_MERGE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_INPLACE_MERGE_H
 
 #include <__algorithm/inplace_merge.h>
 #include <__algorithm/iterator_operations.h>
@@ -27,20 +27,20 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __inplace_merge {
 
   struct __fn {
     template <class _Iter, class _Sent, class _Comp, class _Proj>
-    _LIBCPP_HIDE_FROM_ABI static constexpr auto
+    _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
     __inplace_merge_impl(_Iter __first, _Iter __middle, _Sent __last, _Comp&& __comp, _Proj&& __proj) {
       auto __last_iter = ranges::next(__middle, __last);
       std::__inplace_merge<_RangeAlgPolicy>(
@@ -54,7 +54,7 @@ namespace __inplace_merge {
         class _Comp = ranges::less,
         class _Proj = identity>
       requires sortable<_Iter, _Comp, _Proj>
-    _LIBCPP_HIDE_FROM_ABI _Iter
+    _LIBCUDACXX_HIDE_FROM_ABI _Iter
     operator()(_Iter __first, _Iter __middle, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
       return __inplace_merge_impl(
           std::move(__first), std::move(__middle), std::move(__last), std::move(__comp), std::move(__proj));
@@ -64,7 +64,7 @@ namespace __inplace_merge {
       requires sortable<
           iterator_t<_Range>,
           _Comp,
-          _Proj> _LIBCPP_HIDE_FROM_ABI borrowed_iterator_t<_Range>
+          _Proj> _LIBCUDACXX_HIDE_FROM_ABI borrowed_iterator_t<_Range>
       operator()(_Range&& __range, iterator_t<_Range> __middle, _Comp __comp = {}, _Proj __proj = {}) const {
       return __inplace_merge_impl(
           ranges::begin(__range), std::move(__middle), ranges::end(__range), std::move(__comp), std::move(__proj));
@@ -78,8 +78,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_INPLACE_MERGE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_INPLACE_MERGE_H

diff  --git a/libcxx/include/__algorithm/ranges_is_heap.h b/libcxx/include/__algorithm/ranges_is_heap.h
index 0bb1dcda0e34..9e8cd4cff423 100644
--- a/libcxx/include/__algorithm/ranges_is_heap.h
+++ b/libcxx/include/__algorithm/ranges_is_heap.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_IS_HEAP_H
-#define _LIBCPP___ALGORITHM_RANGES_IS_HEAP_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_IS_HEAP_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_IS_HEAP_H
 
 #include <__algorithm/is_heap_until.h>
 #include <__algorithm/make_projected.h>
@@ -22,13 +22,13 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __is_heap {
@@ -36,7 +36,7 @@ namespace __is_heap {
 struct __fn {
 
   template <class _Iter, class _Sent, class _Proj, class _Comp>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   static bool __is_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
     auto __last_iter = ranges::next(__first, __last);
     auto&& __projected_comp = std::__make_projected(__comp, __proj);
@@ -47,14 +47,14 @@ struct __fn {
 
   template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
             indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return __is_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
   }
 
   template <random_access_range _Range, class _Proj = identity,
             indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
     return __is_heap_fn_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj);
   }
@@ -67,8 +67,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_IS_HEAP_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_IS_HEAP_H

diff  --git a/libcxx/include/__algorithm/ranges_is_heap_until.h b/libcxx/include/__algorithm/ranges_is_heap_until.h
index 8a751fcc5130..b2f3b47afeb5 100644
--- a/libcxx/include/__algorithm/ranges_is_heap_until.h
+++ b/libcxx/include/__algorithm/ranges_is_heap_until.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_IS_HEAP_UNTIL_H
-#define _LIBCPP___ALGORITHM_RANGES_IS_HEAP_UNTIL_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_IS_HEAP_UNTIL_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_IS_HEAP_UNTIL_H
 
 #include <__algorithm/is_heap_until.h>
 #include <__algorithm/make_projected.h>
@@ -23,13 +23,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __is_heap_until {
@@ -37,7 +37,7 @@ namespace __is_heap_until {
 struct __fn {
 
   template <class _Iter, class _Sent, class _Proj, class _Comp>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   static _Iter __is_heap_until_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
     auto __last_iter = ranges::next(__first, __last);
     auto&& __projected_comp = std::__make_projected(__comp, __proj);
@@ -47,14 +47,14 @@ struct __fn {
 
   template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
             indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return __is_heap_until_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
   }
 
   template <random_access_range _Range, class _Proj = identity,
             indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
     return __is_heap_until_fn_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj);
   }
@@ -68,8 +68,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_IS_HEAP_UNTIL_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_IS_HEAP_UNTIL_H

diff  --git a/libcxx/include/__algorithm/ranges_is_partitioned.h b/libcxx/include/__algorithm/ranges_is_partitioned.h
index 3d572895ebe1..1afc587c3681 100644
--- a/libcxx/include/__algorithm/ranges_is_partitioned.h
+++ b/libcxx/include/__algorithm/ranges_is_partitioned.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_IS_PARTITIONED_H
-#define _LIBCPP___ALGORITHM_RANGES_IS_PARTITIONED_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_IS_PARTITIONED_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_IS_PARTITIONED_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -19,20 +19,20 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __is_partitioned {
 struct __fn {
 
   template <class _Iter, class _Sent, class _Proj, class _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   bool __is_parititioned_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
     for (; __first != __last; ++__first) {
       if (!std::invoke(__pred, std::invoke(__proj, *__first)))
@@ -54,7 +54,7 @@ struct __fn {
   template <input_iterator _Iter, sentinel_for<_Iter> _Sent,
             class _Proj = identity,
             indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
     return __is_parititioned_impl(std::move(__first), std::move(__last), __pred, __proj);
   }
@@ -62,7 +62,7 @@ struct __fn {
   template <input_range _Range,
             class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
     return __is_parititioned_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
   }
@@ -74,8 +74,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_IS_PARTITIONED_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_IS_PARTITIONED_H

diff  --git a/libcxx/include/__algorithm/ranges_is_permutation.h b/libcxx/include/__algorithm/ranges_is_permutation.h
index 41e302fe99dc..c812c06343bd 100644
--- a/libcxx/include/__algorithm/ranges_is_permutation.h
+++ b/libcxx/include/__algorithm/ranges_is_permutation.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_IS_PERMUTATION_H
-#define _LIBCPP___ALGORITHM_RANGES_IS_PERMUTATION_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_IS_PERMUTATION_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_IS_PERMUTATION_H
 
 #include <__algorithm/is_permutation.h>
 #include <__algorithm/iterator_operations.h>
@@ -21,13 +21,13 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __is_permutation {
@@ -35,7 +35,7 @@ struct __fn {
 
   template <class _Iter1, class _Sent1, class _Iter2, class _Sent2,
             class _Proj1, class _Proj2, class _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   bool __is_permutation_func_impl(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
                                   _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) {
     return std::__is_permutation<_RangeAlgPolicy>(
@@ -49,7 +49,7 @@ struct __fn {
             class _Proj2 = identity,
             indirect_equivalence_relation<projected<_Iter1, _Proj1>,
                                           projected<_Iter2, _Proj2>> _Pred = ranges::equal_to>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Iter1 __first1, _Sent1 __last1, _Iter2 __first2, _Sent2 __last2,
                   _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
     return __is_permutation_func_impl(
@@ -62,7 +62,7 @@ struct __fn {
             class _Proj1 = identity,
             class _Proj2 = identity,
             indirect_equivalence_relation<projected<iterator_t<_Range1>, _Proj1>, projected<iterator_t<_Range2>, _Proj2>> _Pred = ranges::equal_to>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Range1&& __range1, _Range2&& __range2,
                   _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
     if constexpr (sized_range<_Range1> && sized_range<_Range2>) {
@@ -82,8 +82,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_IS_PERMUTATION_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_IS_PERMUTATION_H

diff  --git a/libcxx/include/__algorithm/ranges_is_sorted.h b/libcxx/include/__algorithm/ranges_is_sorted.h
index 938e69afba8d..22d88924bcf0 100644
--- a/libcxx/include/__algorithm/ranges_is_sorted.h
+++ b/libcxx/include/__algorithm/ranges_is_sorted.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP__ALGORITHM_RANGES_IS_SORTED_H
-#define _LIBCPP__ALGORITHM_RANGES_IS_SORTED_H
+#ifndef _LIBCUDACXX__ALGORITHM_RANGES_IS_SORTED_H
+#define _LIBCUDACXX__ALGORITHM_RANGES_IS_SORTED_H
 
 #include <__algorithm/ranges_is_sorted_until.h>
 #include <__config>
@@ -19,13 +19,13 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __is_sorted {
@@ -33,7 +33,7 @@ struct __fn {
   template <forward_iterator _Iter, sentinel_for<_Iter> _Sent,
             class _Proj = identity,
             indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return ranges::__is_sorted_until_impl(std::move(__first), __last, __comp, __proj) == __last;
   }
@@ -41,7 +41,7 @@ struct __fn {
   template <forward_range _Range,
             class _Proj = identity,
             indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __last = ranges::end(__range);
     return ranges::__is_sorted_until_impl(ranges::begin(__range), __last, __comp, __proj) == __last;
@@ -54,8 +54,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP__ALGORITHM_RANGES_IS_SORTED_H
+#endif // _LIBCUDACXX__ALGORITHM_RANGES_IS_SORTED_H

diff  --git a/libcxx/include/__algorithm/ranges_is_sorted_until.h b/libcxx/include/__algorithm/ranges_is_sorted_until.h
index c8f0608e1255..2116473523bc 100644
--- a/libcxx/include/__algorithm/ranges_is_sorted_until.h
+++ b/libcxx/include/__algorithm/ranges_is_sorted_until.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP__ALGORITHM_RANGES_IS_SORTED_UNTIL_H
-#define _LIBCPP__ALGORITHM_RANGES_IS_SORTED_UNTIL_H
+#ifndef _LIBCUDACXX__ALGORITHM_RANGES_IS_SORTED_UNTIL_H
+#define _LIBCUDACXX__ALGORITHM_RANGES_IS_SORTED_UNTIL_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -20,18 +20,18 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
 template <class _Iter, class _Sent, class _Proj, class _Comp>
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 _Iter __is_sorted_until_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
   if (__first == __last)
     return __first;
@@ -49,7 +49,7 @@ struct __fn {
   template <forward_iterator _Iter, sentinel_for<_Iter> _Sent,
             class _Proj = identity,
             indirect_strict_weak_order<projected<_Iter, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return ranges::__is_sorted_until_impl(std::move(__first), std::move(__last), __comp, __proj);
   }
@@ -57,7 +57,7 @@ struct __fn {
   template <forward_range _Range,
             class _Proj = identity,
             indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
     return ranges::__is_sorted_until_impl(ranges::begin(__range), ranges::end(__range), __comp, __proj);
   }
@@ -69,8 +69,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP__ALGORITHM_RANGES_IS_SORTED_UNTIL_H
+#endif // _LIBCUDACXX__ALGORITHM_RANGES_IS_SORTED_UNTIL_H

diff  --git a/libcxx/include/__algorithm/ranges_iterator_concept.h b/libcxx/include/__algorithm/ranges_iterator_concept.h
index 3323119317ae..94619b0c3c73 100644
--- a/libcxx/include/__algorithm/ranges_iterator_concept.h
+++ b/libcxx/include/__algorithm/ranges_iterator_concept.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_ITERATOR_CONCEPT_H
-#define _LIBCPP___ALGORITHM_RANGES_ITERATOR_CONCEPT_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_ITERATOR_CONCEPT_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_ITERATOR_CONCEPT_H
 
 #include <__config>
 #include <__iterator/concepts.h>
 #include <__iterator/iterator_traits.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -44,8 +44,8 @@ template <class _Iter>
 using __iterator_concept = decltype(__get_iterator_concept<_Iter>());
 
 } // namespace ranges
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_ITERATOR_CONCEPT_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_ITERATOR_CONCEPT_H

diff  --git a/libcxx/include/__algorithm/ranges_lexicographical_compare.h b/libcxx/include/__algorithm/ranges_lexicographical_compare.h
index fe709f7a7f70..996d60045309 100644
--- a/libcxx/include/__algorithm/ranges_lexicographical_compare.h
+++ b/libcxx/include/__algorithm/ranges_lexicographical_compare.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_LEXICOGRAPHICAL_COMPARE_H
-#define _LIBCPP___ALGORITHM_RANGES_LEXICOGRAPHICAL_COMPARE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_LEXICOGRAPHICAL_COMPARE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_LEXICOGRAPHICAL_COMPARE_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -19,20 +19,20 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __lexicographical_compare {
 struct __fn {
 
   template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Proj1, class _Proj2, class _Comp>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   bool __lexicographical_compare_impl(_Iter1 __first1, _Sent1 __last1,
                                       _Iter2 __first2, _Sent2 __last2,
                                       _Comp& __comp,
@@ -55,7 +55,7 @@ struct __fn {
             class _Proj1 = identity,
             class _Proj2 = identity,
             indirect_strict_weak_order<projected<_Iter1, _Proj1>, projected<_Iter2, _Proj2>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Iter1 __first1, _Sent1 __last1,
                   _Iter2 __first2, _Sent2 __last2,
                   _Comp __comp = {},
@@ -74,7 +74,7 @@ struct __fn {
             class _Proj2 = identity,
             indirect_strict_weak_order<projected<iterator_t<_Range1>, _Proj1>,
                                        projected<iterator_t<_Range2>, _Proj2>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Range1&& __range1, _Range2&& __range2, _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
     return __lexicographical_compare_impl(ranges::begin(__range1), ranges::end(__range1),
                                           ranges::begin(__range2), ranges::end(__range2),
@@ -91,8 +91,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_LEXICOGRAPHICAL_COMPARE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_LEXICOGRAPHICAL_COMPARE_H

diff  --git a/libcxx/include/__algorithm/ranges_lower_bound.h b/libcxx/include/__algorithm/ranges_lower_bound.h
index 1a9ae204a1ee..f6a0e6aedf72 100644
--- a/libcxx/include/__algorithm/ranges_lower_bound.h
+++ b/libcxx/include/__algorithm/ranges_lower_bound.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_LOWER_BOUND_H
-#define _LIBCPP___ALGORITHM_RANGES_LOWER_BOUND_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_LOWER_BOUND_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_LOWER_BOUND_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/lower_bound.h>
@@ -23,13 +23,13 @@
 #include <__ranges/concepts.h>
 #include <__ranges/dangling.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -37,14 +37,14 @@ namespace __lower_bound {
 struct __fn {
   template <forward_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity,
             indirect_strict_weak_order<const _Type*, projected<_Iter, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
     return std::__lower_bound_impl<_RangeAlgPolicy>(__first, __last, __value, __comp, __proj);
   }
 
   template <forward_range _Range, class _Type, class _Proj = identity,
             indirect_strict_weak_order<const _Type*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __r,
                                          const _Type& __value,
                                          _Comp __comp = {},
@@ -59,8 +59,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_LOWER_BOUND_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_LOWER_BOUND_H

diff  --git a/libcxx/include/__algorithm/ranges_make_heap.h b/libcxx/include/__algorithm/ranges_make_heap.h
index b114286a85cc..c2eb0e62f4a5 100644
--- a/libcxx/include/__algorithm/ranges_make_heap.h
+++ b/libcxx/include/__algorithm/ranges_make_heap.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_MAKE_HEAP_H
-#define _LIBCPP___ALGORITHM_RANGES_MAKE_HEAP_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_MAKE_HEAP_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_MAKE_HEAP_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/make_heap.h>
@@ -28,20 +28,20 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __make_heap {
 
 struct __fn {
   template <class _Iter, class _Sent, class _Comp, class _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   _Iter __make_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
     auto __last_iter = ranges::next(__first, __last);
 
@@ -53,14 +53,14 @@ struct __fn {
 
   template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<_Iter, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return __make_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
   }
 
   template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<iterator_t<_Range>, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     return __make_heap_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
   }
@@ -73,8 +73,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_MAKE_HEAP_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_MAKE_HEAP_H

diff  --git a/libcxx/include/__algorithm/ranges_max.h b/libcxx/include/__algorithm/ranges_max.h
index f48bc3ececa2..21edcf83d841 100644
--- a/libcxx/include/__algorithm/ranges_max.h
+++ b/libcxx/include/__algorithm/ranges_max.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_MAX_H
-#define _LIBCPP___ALGORITHM_RANGES_MAX_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_MAX_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_MAX_H
 
 #include <__algorithm/ranges_min_element.h>
 #include <__assert>
@@ -23,32 +23,32 @@
 #include <__utility/move.h>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __max {
 struct __fn {
   template <class _Tp, class _Proj = identity,
             indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   const _Tp& operator()(const _Tp& __a, const _Tp& __b, _Comp __comp = {}, _Proj __proj = {}) const {
     return std::invoke(__comp, std::invoke(__proj, __a), std::invoke(__proj, __b)) ? __b : __a;
   }
 
   template <copyable _Tp, class _Proj = identity,
             indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Tp operator()(initializer_list<_Tp> __il, _Comp __comp = {}, _Proj __proj = {}) const {
-    _LIBCPP_ASSERT(__il.begin() != __il.end(), "initializer_list must contain at least one element");
+    _LIBCUDACXX_ASSERT(__il.begin() != __il.end(), "initializer_list must contain at least one element");
 
     auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
     return *ranges::__min_element_impl(__il.begin(), __il.end(), __comp_lhs_rhs_swapped, __proj);
@@ -57,12 +57,12 @@ struct __fn {
   template <input_range _Rp, class _Proj = identity,
             indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
     requires indirectly_copyable_storable<iterator_t<_Rp>, range_value_t<_Rp>*>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   range_value_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __first = ranges::begin(__r);
     auto __last = ranges::end(__r);
 
-    _LIBCPP_ASSERT(__first != __last, "range must contain at least one element");
+    _LIBCUDACXX_ASSERT(__first != __last, "range must contain at least one element");
 
     if constexpr (forward_range<_Rp>) {
       auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
@@ -84,10 +84,10 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_STD_VER > 17 && && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_MAX_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_MAX_H

diff  --git a/libcxx/include/__algorithm/ranges_max_element.h b/libcxx/include/__algorithm/ranges_max_element.h
index d8d7242e176b..2169679f2c8b 100644
--- a/libcxx/include/__algorithm/ranges_max_element.h
+++ b/libcxx/include/__algorithm/ranges_max_element.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_MAX_ELEMENT_H
-#define _LIBCPP___ALGORITHM_RANGES_MAX_ELEMENT_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_MAX_ELEMENT_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_MAX_ELEMENT_H
 
 #include <__algorithm/ranges_min_element.h>
 #include <__config>
@@ -20,20 +20,20 @@
 #include <__ranges/concepts.h>
 #include <__ranges/dangling.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __max_element {
 struct __fn {
   template <forward_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
             indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Ip operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
     return ranges::__min_element_impl(__first, __last, __comp_lhs_rhs_swapped, __proj);
@@ -41,7 +41,7 @@ struct __fn {
 
   template <forward_range _Rp, class _Proj = identity,
             indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __comp_lhs_rhs_swapped = [&](auto&& __lhs, auto&& __rhs) { return std::invoke(__comp, __rhs, __lhs); };
     return ranges::__min_element_impl(ranges::begin(__r), ranges::end(__r), __comp_lhs_rhs_swapped, __proj);
@@ -54,8 +54,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_MAX_ELEMENT_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_MAX_ELEMENT_H

diff  --git a/libcxx/include/__algorithm/ranges_merge.h b/libcxx/include/__algorithm/ranges_merge.h
index c73e09e94ccc..ecc32c1b4864 100644
--- a/libcxx/include/__algorithm/ranges_merge.h
+++ b/libcxx/include/__algorithm/ranges_merge.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_MERGE_H
-#define _LIBCPP___ALGORITHM_RANGES_MERGE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_MERGE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_MERGE_H
 
 #include <__algorithm/in_in_out_result.h>
 #include <__algorithm/ranges_copy.h>
@@ -23,13 +23,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -47,7 +47,7 @@ template <
     class _Comp,
     class _Proj1,
     class _Proj2>
-_LIBCPP_HIDE_FROM_ABI constexpr merge_result<__uncvref_t<_InIter1>, __uncvref_t<_InIter2>, __uncvref_t<_OutIter>>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr merge_result<__uncvref_t<_InIter1>, __uncvref_t<_InIter2>, __uncvref_t<_OutIter>>
 __merge_impl(
     _InIter1&& __first1,
     _Sent1&& __last1,
@@ -82,7 +82,7 @@ struct __fn {
       class _Proj1 = identity,
       class _Proj2 = identity>
     requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr merge_result<_InIter1, _InIter2, _OutIter> operator()(
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr merge_result<_InIter1, _InIter2, _OutIter> operator()(
       _InIter1 __first1,
       _Sent1 __last1,
       _InIter2 __first2,
@@ -108,7 +108,7 @@ struct __fn {
         _Comp,
         _Proj1,
         _Proj2> 
-  _LIBCPP_HIDE_FROM_ABI constexpr merge_result<borrowed_iterator_t<_Range1>, borrowed_iterator_t<_Range2>, _OutIter>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr merge_result<borrowed_iterator_t<_Range1>, borrowed_iterator_t<_Range2>, _OutIter>
         operator()(
             _Range1&& __range1,
             _Range2&& __range2,
@@ -135,8 +135,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_MERGE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_MERGE_H

diff  --git a/libcxx/include/__algorithm/ranges_min.h b/libcxx/include/__algorithm/ranges_min.h
index 0bb1e72ac5ac..5e9fd6988e7d 100644
--- a/libcxx/include/__algorithm/ranges_min.h
+++ b/libcxx/include/__algorithm/ranges_min.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_MIN_H
-#define _LIBCPP___ALGORITHM_RANGES_MIN_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_MIN_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_MIN_H
 
 #include <__algorithm/ranges_min_element.h>
 #include <__assert>
@@ -22,44 +22,44 @@
 #include <__ranges/concepts.h>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __min {
 struct __fn {
   template <class _Tp, class _Proj = identity,
             indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   const _Tp& operator()(const _Tp& __a, const _Tp& __b, _Comp __comp = {}, _Proj __proj = {}) const {
     return std::invoke(__comp, std::invoke(__proj, __b), std::invoke(__proj, __a)) ? __b : __a;
   }
 
   template <copyable _Tp, class _Proj = identity,
             indirect_strict_weak_order<projected<const _Tp*, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Tp operator()(initializer_list<_Tp> __il, _Comp __comp = {}, _Proj __proj = {}) const {
-    _LIBCPP_ASSERT(__il.begin() != __il.end(), "initializer_list must contain at least one element");
+    _LIBCUDACXX_ASSERT(__il.begin() != __il.end(), "initializer_list must contain at least one element");
     return *ranges::__min_element_impl(__il.begin(), __il.end(), __comp, __proj);
   }
 
   template <input_range _Rp, class _Proj = identity,
             indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
     requires indirectly_copyable_storable<iterator_t<_Rp>, range_value_t<_Rp>*>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   range_value_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __first = ranges::begin(__r);
     auto __last = ranges::end(__r);
 
-    _LIBCPP_ASSERT(__first != __last, "range must contain at least one element");
+    _LIBCUDACXX_ASSERT(__first != __last, "range must contain at least one element");
 
     if constexpr (forward_range<_Rp>) {
       return *ranges::__min_element_impl(__first, __last, __comp, __proj);
@@ -80,10 +80,10 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_STD_VER > 17 && && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_MIN_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_MIN_H

diff  --git a/libcxx/include/__algorithm/ranges_min_element.h b/libcxx/include/__algorithm/ranges_min_element.h
index 26f95fe3a6d2..9f91f8990b4f 100644
--- a/libcxx/include/__algorithm/ranges_min_element.h
+++ b/libcxx/include/__algorithm/ranges_min_element.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H
-#define _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_MIN_ELEMENT_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_MIN_ELEMENT_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -20,19 +20,19 @@
 #include <__ranges/dangling.h>
 #include <__utility/forward.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
 // TODO(ranges): `ranges::min_element` can now simply delegate to `std::__min_element`.
 template <class _Ip, class _Sp, class _Proj, class _Comp>
-_LIBCPP_HIDE_FROM_ABI static constexpr
+_LIBCUDACXX_HIDE_FROM_ABI static constexpr
 _Ip __min_element_impl(_Ip __first, _Sp __last, _Comp& __comp, _Proj& __proj) {
   if (__first == __last)
     return __first;
@@ -48,14 +48,14 @@ namespace __min_element {
 struct __fn {
   template <forward_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
             indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Ip operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return ranges::__min_element_impl(__first, __last, __comp, __proj);
   }
 
   template <forward_range _Rp, class _Proj = identity,
             indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Rp> operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     return ranges::__min_element_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
   }
@@ -67,8 +67,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_MIN_ELEMENT_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_MIN_ELEMENT_H

diff  --git a/libcxx/include/__algorithm/ranges_minmax.h b/libcxx/include/__algorithm/ranges_minmax.h
index 2f4bba0e7cc0..35b496b5f4f0 100644
--- a/libcxx/include/__algorithm/ranges_minmax.h
+++ b/libcxx/include/__algorithm/ranges_minmax.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_MINMAX_H
-#define _LIBCPP___ALGORITHM_RANGES_MINMAX_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_MINMAX_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_MINMAX_H
 
 #include <__algorithm/min_max_result.h>
 #include <__algorithm/minmax_element.h>
@@ -25,16 +25,16 @@
 #include <__utility/move.h>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 template <class _T1>
@@ -44,7 +44,7 @@ namespace __minmax {
 struct __fn {
   template <class _Type, class _Proj = identity,
             indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr ranges::minmax_result<const _Type&>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr ranges::minmax_result<const _Type&>
   operator()(const _Type& __a, const _Type& __b, _Comp __comp = {}, _Proj __proj = {}) const {
     if (std::invoke(__comp, std::invoke(__proj, __b), std::invoke(__proj, __a)))
       return {__b, __a};
@@ -53,9 +53,9 @@ struct __fn {
 
   template <copyable _Type, class _Proj = identity,
             indirect_strict_weak_order<projected<const _Type*, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   ranges::minmax_result<_Type> operator()(initializer_list<_Type> __il, _Comp __comp = {}, _Proj __proj = {}) const {
-    _LIBCPP_ASSERT(__il.begin() != __il.end(), "initializer_list has to contain at least one element");
+    _LIBCUDACXX_ASSERT(__il.begin() != __il.end(), "initializer_list has to contain at least one element");
     auto __iters = std::__minmax_element_impl(__il.begin(), __il.end(), __comp, __proj);
     return ranges::minmax_result<_Type> { *__iters.first, *__iters.second };
   }
@@ -63,13 +63,13 @@ struct __fn {
   template <input_range _Range, class _Proj = identity,
             indirect_strict_weak_order<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
     requires indirectly_copyable_storable<iterator_t<_Range>, range_value_t<_Range>*>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   ranges::minmax_result<range_value_t<_Range>> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __first = ranges::begin(__r);
     auto __last = ranges::end(__r);
     using _ValueT = range_value_t<_Range>;
 
-    _LIBCPP_ASSERT(__first != __last, "range has to contain at least one element");
+    _LIBCUDACXX_ASSERT(__first != __last, "range has to contain at least one element");
 
     if constexpr (forward_range<_Range>) {
       auto __result = std::__minmax_element_impl(__first, __last, __comp, __proj);
@@ -124,10 +124,10 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_MINMAX_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_MINMAX_H

diff  --git a/libcxx/include/__algorithm/ranges_minmax_element.h b/libcxx/include/__algorithm/ranges_minmax_element.h
index b7bb26cefe95..34dd55c241ee 100644
--- a/libcxx/include/__algorithm/ranges_minmax_element.h
+++ b/libcxx/include/__algorithm/ranges_minmax_element.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_MINMAX_ELEMENT_H
-#define _LIBCPP___ALGORITHM_RANGES_MINMAX_ELEMENT_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_MINMAX_ELEMENT_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_MINMAX_ELEMENT_H
 
 #include <__algorithm/min_max_result.h>
 #include <__algorithm/minmax_element.h>
@@ -25,13 +25,13 @@
 #include <__utility/pair.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -42,7 +42,7 @@ namespace __minmax_element {
 struct __fn {
   template <forward_iterator _Ip, sentinel_for<_Ip> _Sp, class _Proj = identity,
             indirect_strict_weak_order<projected<_Ip, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   ranges::minmax_element_result<_Ip> operator()(_Ip __first, _Sp __last, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __ret = std::__minmax_element_impl(std::move(__first), std::move(__last), __comp, __proj);
     return {__ret.first, __ret.second};
@@ -50,7 +50,7 @@ struct __fn {
 
   template <forward_range _Rp, class _Proj = identity,
             indirect_strict_weak_order<projected<iterator_t<_Rp>, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   ranges::minmax_element_result<borrowed_iterator_t<_Rp>>
   operator()(_Rp&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __ret = std::__minmax_element_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
@@ -65,8 +65,8 @@ inline namespace __cpo {
 
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_MINMAX_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_MINMAX_H

diff  --git a/libcxx/include/__algorithm/ranges_mismatch.h b/libcxx/include/__algorithm/ranges_mismatch.h
index 4c1440b5da06..4af72a6d38d9 100644
--- a/libcxx/include/__algorithm/ranges_mismatch.h
+++ b/libcxx/include/__algorithm/ranges_mismatch.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_MISMATCH_H
-#define _LIBCPP___ALGORITHM_RANGES_MISMATCH_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_MISMATCH_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_MISMATCH_H
 
 #include <__algorithm/in_in_result.h>
 #include <__config>
@@ -21,13 +21,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
@@ -38,7 +38,7 @@ namespace __mismatch {
 struct __fn {
   template <class _I1, class _S1, class _I2, class _S2,
             class _Pred, class _Proj1, class _Proj2>
-  static _LIBCPP_HIDE_FROM_ABI constexpr
+  static _LIBCUDACXX_HIDE_FROM_ABI constexpr
   mismatch_result<_I1, _I2>
   __go(_I1 __first1, _S1 __last1, _I2 __first2, _S2 __last2,
        _Pred& __pred, _Proj1& __proj1, _Proj2& __proj2) {
@@ -55,7 +55,7 @@ struct __fn {
             input_iterator _I2, sentinel_for<_I2> _S2,
             class _Pred = ranges::equal_to, class _Proj1 = identity, class _Proj2 = identity>
     requires indirectly_comparable<_I1, _I2, _Pred, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   mismatch_result<_I1, _I2> operator()(_I1 __first1, _S1 __last1, _I2 __first2, _S2 __last2,
                                        _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
     return __go(std::move(__first1), __last1, std::move(__first2), __last2, __pred, __proj1, __proj2);
@@ -64,7 +64,7 @@ struct __fn {
   template <input_range _R1, input_range _R2,
             class _Pred = ranges::equal_to, class _Proj1 = identity, class _Proj2 = identity>
     requires indirectly_comparable<iterator_t<_R1>, iterator_t<_R2>, _Pred, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   mismatch_result<borrowed_iterator_t<_R1>, borrowed_iterator_t<_R2>>
   operator()(_R1&& __r1, _R2&& __r2, _Pred __pred = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
     return __go(ranges::begin(__r1), ranges::end(__r1), ranges::begin(__r2), ranges::end(__r2),
@@ -78,8 +78,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_RANGES_MISMATCH_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_MISMATCH_H

diff  --git a/libcxx/include/__algorithm/ranges_move.h b/libcxx/include/__algorithm/ranges_move.h
index 9e1d4c72fb58..016e9a632e50 100644
--- a/libcxx/include/__algorithm/ranges_move.h
+++ b/libcxx/include/__algorithm/ranges_move.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_MOVE_H
-#define _LIBCPP___ALGORITHM_RANGES_MOVE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_MOVE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_MOVE_H
 
 #include <__algorithm/in_out_result.h>
 #include <__algorithm/iterator_operations.h>
@@ -20,13 +20,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -37,7 +37,7 @@ namespace __move {
 struct __fn {
 
   template <class _InIter, class _Sent, class _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   move_result<_InIter, _OutIter> __move_impl(_InIter __first, _Sent __last, _OutIter __result) {
     auto __ret = std::__move<_RangeAlgPolicy>(std::move(__first), std::move(__last), std::move(__result));
     return {std::move(__ret.first), std::move(__ret.second)};
@@ -45,14 +45,14 @@ struct __fn {
 
   template <input_iterator _InIter, sentinel_for<_InIter> _Sent, weakly_incrementable _OutIter>
     requires indirectly_movable<_InIter, _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   move_result<_InIter, _OutIter> operator()(_InIter __first, _Sent __last, _OutIter __result) const {
     return __move_impl(std::move(__first), std::move(__last), std::move(__result));
   }
 
   template <input_range _Range, weakly_incrementable _OutIter>
     requires indirectly_movable<iterator_t<_Range>, _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   move_result<borrowed_iterator_t<_Range>, _OutIter> operator()(_Range&& __range, _OutIter __result) const {
     return __move_impl(ranges::begin(__range), ranges::end(__range), std::move(__result));
   }
@@ -65,8 +65,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_MOVE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_MOVE_H

diff  --git a/libcxx/include/__algorithm/ranges_move_backward.h b/libcxx/include/__algorithm/ranges_move_backward.h
index 583a6bf29d51..365332888fe6 100644
--- a/libcxx/include/__algorithm/ranges_move_backward.h
+++ b/libcxx/include/__algorithm/ranges_move_backward.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_MOVE_BACKWARD_H
-#define _LIBCPP___ALGORITHM_RANGES_MOVE_BACKWARD_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_MOVE_BACKWARD_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_MOVE_BACKWARD_H
 
 #include <__algorithm/in_out_result.h>
 #include <__algorithm/ranges_move.h>
@@ -21,13 +21,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -38,7 +38,7 @@ namespace __move_backward {
 struct __fn {
 
   template <class _InIter, class _Sent, class _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   move_backward_result<_InIter, _OutIter> __move_backward_impl(_InIter __first, _Sent __last, _OutIter __result) {
     auto __last_iter = ranges::next(__first, std::move(__last));
     auto __ret = ranges::move(std::make_reverse_iterator(__last_iter),
@@ -49,14 +49,14 @@ struct __fn {
 
   template <bidirectional_iterator _InIter, sentinel_for<_InIter> _Sent, bidirectional_iterator _OutIter>
     requires indirectly_movable<_InIter, _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   move_backward_result<_InIter, _OutIter> operator()(_InIter __first, _Sent __last, _OutIter __result) const {
     return __move_backward_impl(std::move(__first), std::move(__last), std::move(__result));
   }
 
   template <bidirectional_range _Range, bidirectional_iterator _Iter>
     requires indirectly_movable<iterator_t<_Range>, _Iter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   move_backward_result<borrowed_iterator_t<_Range>, _Iter> operator()(_Range&& __range, _Iter __result) const {
     return __move_backward_impl(ranges::begin(__range), ranges::end(__range), std::move(__result));
   }
@@ -69,8 +69,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_MOVE_BACKWARD_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_MOVE_BACKWARD_H

diff  --git a/libcxx/include/__algorithm/ranges_next_permutation.h b/libcxx/include/__algorithm/ranges_next_permutation.h
index 34c5fee04050..8a4070d2ddd8 100644
--- a/libcxx/include/__algorithm/ranges_next_permutation.h
+++ b/libcxx/include/__algorithm/ranges_next_permutation.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_NEXT_PERMUTATION_H
-#define _LIBCPP___ALGORITHM_RANGES_NEXT_PERMUTATION_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_NEXT_PERMUTATION_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_NEXT_PERMUTATION_H
 
 #include <__algorithm/in_found_result.h>
 #include <__algorithm/iterator_operations.h>
@@ -23,13 +23,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -41,7 +41,7 @@ namespace __next_permutation {
 struct __fn {
   template <bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<_Iter, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr next_permutation_result<_Iter>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr next_permutation_result<_Iter>
   operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __result = std::__next_permutation<_RangeAlgPolicy>(
         std::move(__first), std::move(__last), std::__make_projected(__comp, __proj));
@@ -50,7 +50,7 @@ struct __fn {
 
   template <bidirectional_range _Range, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<iterator_t<_Range>, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr next_permutation_result<borrowed_iterator_t<_Range>>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr next_permutation_result<borrowed_iterator_t<_Range>>
   operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __result = std::__next_permutation<_RangeAlgPolicy>(
         ranges::begin(__range), ranges::end(__range), std::__make_projected(__comp, __proj));
@@ -65,8 +65,8 @@ constexpr inline auto next_permutation = __next_permutation::__fn{};
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_NEXT_PERMUTATION_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_NEXT_PERMUTATION_H

diff  --git a/libcxx/include/__algorithm/ranges_none_of.h b/libcxx/include/__algorithm/ranges_none_of.h
index 706ff5cd741d..0e564644cb47 100644
--- a/libcxx/include/__algorithm/ranges_none_of.h
+++ b/libcxx/include/__algorithm/ranges_none_of.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_NONE_OF_H
-#define _LIBCPP___ALGORITHM_RANGES_NONE_OF_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_NONE_OF_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_NONE_OF_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -18,20 +18,20 @@
 #include <__ranges/concepts.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __none_of {
 struct __fn {
 
   template <class _Iter, class _Sent, class _Proj, class _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   bool __none_of_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
     for (; __first != __last; ++__first) {
       if (std::invoke(__pred, std::invoke(__proj, *__first)))
@@ -42,14 +42,14 @@ struct __fn {
 
   template <input_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
             indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Iter __first, _Sent __last, _Pred __pred = {}, _Proj __proj = {}) const {
     return __none_of_impl(std::move(__first), std::move(__last), __pred, __proj);
   }
 
   template <input_range _Range, class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   bool operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
     return __none_of_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
   }
@@ -61,8 +61,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_NONE_OF_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_NONE_OF_H

diff  --git a/libcxx/include/__algorithm/ranges_nth_element.h b/libcxx/include/__algorithm/ranges_nth_element.h
index ad63bd20fb47..cdbd9c2adac6 100644
--- a/libcxx/include/__algorithm/ranges_nth_element.h
+++ b/libcxx/include/__algorithm/ranges_nth_element.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_NTH_ELEMENT_H
-#define _LIBCPP___ALGORITHM_RANGES_NTH_ELEMENT_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_NTH_ELEMENT_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_NTH_ELEMENT_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/make_projected.h>
@@ -27,20 +27,20 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __nth_element {
 
 struct __fn {
   template <class _Iter, class _Sent, class _Comp, class _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   _Iter __nth_element_fn_impl(_Iter __first, _Iter __nth, _Sent __last, _Comp& __comp, _Proj& __proj) {
     auto __last_iter = ranges::next(__first, __last);
 
@@ -52,14 +52,14 @@ struct __fn {
 
   template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<_Iter, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Iter __nth, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return __nth_element_fn_impl(std::move(__first), std::move(__nth), std::move(__last), __comp, __proj);
   }
 
   template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<iterator_t<_Range>, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __r, iterator_t<_Range> __nth, _Comp __comp = {},
                                          _Proj __proj = {}) const {
     return __nth_element_fn_impl(ranges::begin(__r), std::move(__nth), ranges::end(__r), __comp, __proj);
@@ -73,8 +73,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_NTH_ELEMENT_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_NTH_ELEMENT_H

diff  --git a/libcxx/include/__algorithm/ranges_partial_sort.h b/libcxx/include/__algorithm/ranges_partial_sort.h
index 020e34925df7..adae30c4d4f8 100644
--- a/libcxx/include/__algorithm/ranges_partial_sort.h
+++ b/libcxx/include/__algorithm/ranges_partial_sort.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_H
-#define _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_PARTIAL_SORT_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_PARTIAL_SORT_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/make_projected.h>
@@ -28,20 +28,20 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __partial_sort {
 
 struct __fn {
   template <class _Iter, class _Sent, class _Comp, class _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   _Iter __partial_sort_fn_impl(_Iter __first, _Iter __middle, _Sent __last, _Comp& __comp, _Proj& __proj) {
     auto&& __projected_comp = std::__make_projected(__comp, __proj);
     return std::__partial_sort<_RangeAlgPolicy>(std::move(__first), std::move(__middle), __last, __projected_comp);
@@ -49,14 +49,14 @@ struct __fn {
 
   template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<_Iter, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Iter __middle, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return __partial_sort_fn_impl(std::move(__first), std::move(__middle), std::move(__last), __comp, __proj);
   }
 
   template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<iterator_t<_Range>, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __r, iterator_t<_Range> __middle, _Comp __comp = {},
                                          _Proj __proj = {}) const {
     return __partial_sort_fn_impl(ranges::begin(__r), std::move(__middle), ranges::end(__r), __comp, __proj);
@@ -70,8 +70,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_PARTIAL_SORT_H

diff  --git a/libcxx/include/__algorithm/ranges_partial_sort_copy.h b/libcxx/include/__algorithm/ranges_partial_sort_copy.h
index 271c347b7aa2..e7f4d063606c 100644
--- a/libcxx/include/__algorithm/ranges_partial_sort_copy.h
+++ b/libcxx/include/__algorithm/ranges_partial_sort_copy.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H
-#define _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H
 
 #include <__algorithm/in_out_result.h>
 #include <__algorithm/iterator_operations.h>
@@ -25,13 +25,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -47,7 +47,7 @@ struct __fn {
             class _Comp = ranges::less, class _Proj1 = identity, class _Proj2 = identity>
   requires indirectly_copyable<_Iter1, _Iter2> && sortable<_Iter2, _Comp, _Proj2> &&
            indirect_strict_weak_order<_Comp, projected<_Iter1, _Proj1>, projected<_Iter2, _Proj2>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   partial_sort_copy_result<_Iter1, _Iter2>
   operator()(_Iter1 __first, _Sent1 __last, _Iter2 __result_first, _Sent2 __result_last,
              _Comp __comp = {}, _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
@@ -64,7 +64,7 @@ struct __fn {
            sortable<iterator_t<_Range2>, _Comp, _Proj2> &&
            indirect_strict_weak_order<_Comp, projected<iterator_t<_Range1>, _Proj1>,
                                       projected<iterator_t<_Range2>, _Proj2>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   partial_sort_copy_result<borrowed_iterator_t<_Range1>, borrowed_iterator_t<_Range2>>
   operator()(_Range1&& __range, _Range2&& __result_range, _Comp __comp = {},
              _Proj1 __proj1 = {}, _Proj2 __proj2 = {}) const {
@@ -84,8 +84,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_PARTIAL_SORT_COPY_H

diff  --git a/libcxx/include/__algorithm/ranges_partition.h b/libcxx/include/__algorithm/ranges_partition.h
index 6a53933f37aa..422cc8bd4a19 100644
--- a/libcxx/include/__algorithm/ranges_partition.h
+++ b/libcxx/include/__algorithm/ranges_partition.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_PARTITION_H
-#define _LIBCPP___ALGORITHM_RANGES_PARTITION_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_PARTITION_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_PARTITION_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/make_projected.h>
@@ -28,13 +28,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __partition {
@@ -42,7 +42,7 @@ namespace __partition {
 struct __fn {
 
   template <class _Iter, class _Sent, class _Proj, class _Pred>
-  _LIBCPP_HIDE_FROM_ABI static constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr
   subrange<__uncvref_t<_Iter>> __partition_fn_impl(_Iter&& __first, _Sent&& __last, _Pred&& __pred, _Proj&& __proj) {
     auto&& __projected_pred = std::__make_projected(__pred, __proj);
     auto __result = std::__partition<_RangeAlgPolicy>(
@@ -53,7 +53,7 @@ struct __fn {
 
   template <permutable _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
             indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   subrange<_Iter> operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
     return __partition_fn_impl(__first, __last, __pred, __proj);
   }
@@ -61,7 +61,7 @@ struct __fn {
   template <forward_range _Range, class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
   requires permutable<iterator_t<_Range>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_subrange_t<_Range> operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
     return __partition_fn_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
   }
@@ -75,8 +75,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_PARTITION_H

diff  --git a/libcxx/include/__algorithm/ranges_partition_copy.h b/libcxx/include/__algorithm/ranges_partition_copy.h
index 7201a8cbfe45..bb6f2f81bcea 100644
--- a/libcxx/include/__algorithm/ranges_partition_copy.h
+++ b/libcxx/include/__algorithm/ranges_partition_copy.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_PARTITION_COPY_H
-#define _LIBCPP___ALGORITHM_RANGES_PARTITION_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_PARTITION_COPY_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_PARTITION_COPY_H
 
 #include <__algorithm/in_out_out_result.h>
 #include <__config>
@@ -22,13 +22,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -41,7 +41,7 @@ struct __fn {
 
   // TODO(ranges): delegate to the classic algorithm.
   template <class _InIter, class _Sent, class _OutIter1, class _OutIter2, class _Proj, class _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   static partition_copy_result<
       __uncvref_t<_InIter>, __uncvref_t<_OutIter1>, __uncvref_t<_OutIter2>
   > __partition_copy_fn_impl( _InIter&& __first, _Sent&& __last, _OutIter1&& __out_true, _OutIter2&& __out_false,
@@ -64,7 +64,7 @@ struct __fn {
             weakly_incrementable _OutIter1, weakly_incrementable _OutIter2,
             class _Proj = identity, indirect_unary_predicate<projected<_InIter, _Proj>> _Pred>
   requires indirectly_copyable<_InIter, _OutIter1> && indirectly_copyable<_InIter, _OutIter2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   partition_copy_result<_InIter, _OutIter1, _OutIter2>
   operator()(_InIter __first, _Sent __last, _OutIter1 __out_true, _OutIter2 __out_false,
              _Pred __pred, _Proj __proj = {}) const {
@@ -75,7 +75,7 @@ struct __fn {
   template <input_range _Range, weakly_incrementable _OutIter1, weakly_incrementable _OutIter2,
             class _Proj = identity, indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
   requires indirectly_copyable<iterator_t<_Range>, _OutIter1> && indirectly_copyable<iterator_t<_Range>, _OutIter2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   partition_copy_result<borrowed_iterator_t<_Range>, _OutIter1, _OutIter2>
   operator()(_Range&& __range, _OutIter1 __out_true, _OutIter2 __out_false, _Pred __pred, _Proj __proj = {}) const {
     return __partition_copy_fn_impl(
@@ -91,8 +91,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_PARTITION_COPY_H

diff  --git a/libcxx/include/__algorithm/ranges_partition_point.h b/libcxx/include/__algorithm/ranges_partition_point.h
index 6614a0bb50fd..40c0460f81ee 100644
--- a/libcxx/include/__algorithm/ranges_partition_point.h
+++ b/libcxx/include/__algorithm/ranges_partition_point.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_PARTITION_POINT_H
-#define _LIBCPP___ALGORITHM_RANGES_PARTITION_POINT_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_PARTITION_POINT_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_PARTITION_POINT_H
 
 #include <__algorithm/half_positive.h>
 #include <__config>
@@ -23,13 +23,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __partition_point {
@@ -38,7 +38,7 @@ struct __fn {
 
   // TODO(ranges): delegate to the classic algorithm.
   template <class _Iter, class _Sent, class _Proj, class _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   static _Iter __partition_point_fn_impl(_Iter&& __first, _Sent&& __last, _Pred& __pred, _Proj& __proj) {
     auto __len = ranges::distance(__first, __last);
 
@@ -60,14 +60,14 @@ struct __fn {
 
   template <forward_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
             indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
     return __partition_point_fn_impl(std::move(__first), std::move(__last), __pred, __proj);
   }
 
   template <forward_range _Range, class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
     return __partition_point_fn_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
   }
@@ -81,8 +81,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_PARTITION_POINT_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_PARTITION_POINT_H

diff  --git a/libcxx/include/__algorithm/ranges_pop_heap.h b/libcxx/include/__algorithm/ranges_pop_heap.h
index fc7554fb0733..148beac22c0a 100644
--- a/libcxx/include/__algorithm/ranges_pop_heap.h
+++ b/libcxx/include/__algorithm/ranges_pop_heap.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_POP_HEAP_H
-#define _LIBCPP___ALGORITHM_RANGES_POP_HEAP_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_POP_HEAP_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_POP_HEAP_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/make_projected.h>
@@ -28,20 +28,20 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __pop_heap {
 
 struct __fn {
   template <class _Iter, class _Sent, class _Comp, class _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   _Iter __pop_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
     auto __last_iter = ranges::next(__first, __last);
     auto __len = __last_iter - __first;
@@ -54,14 +54,14 @@ struct __fn {
 
   template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<_Iter, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return __pop_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
   }
 
   template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<iterator_t<_Range>, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     return __pop_heap_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
   }
@@ -74,8 +74,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_POP_HEAP_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_POP_HEAP_H

diff  --git a/libcxx/include/__algorithm/ranges_prev_permutation.h b/libcxx/include/__algorithm/ranges_prev_permutation.h
index 58da606d07f7..952932b72b2d 100644
--- a/libcxx/include/__algorithm/ranges_prev_permutation.h
+++ b/libcxx/include/__algorithm/ranges_prev_permutation.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_PREV_PERMUTATION_H
-#define _LIBCPP___ALGORITHM_RANGES_PREV_PERMUTATION_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_PREV_PERMUTATION_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_PREV_PERMUTATION_H
 
 #include <__algorithm/in_found_result.h>
 #include <__algorithm/iterator_operations.h>
@@ -23,13 +23,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -43,7 +43,7 @@ struct __fn {
   template <bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent,
             class _Comp = ranges::less, class _Proj = identity>
     requires sortable<_Iter, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr prev_permutation_result<_Iter>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr prev_permutation_result<_Iter>
   operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __result = std::__prev_permutation<_RangeAlgPolicy>(
         std::move(__first), std::move(__last), std::__make_projected(__comp, __proj));
@@ -53,7 +53,7 @@ struct __fn {
   template <bidirectional_range _Range,
             class _Comp = ranges::less, class _Proj = identity>
     requires sortable<iterator_t<_Range>, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr prev_permutation_result<borrowed_iterator_t<_Range>>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr prev_permutation_result<borrowed_iterator_t<_Range>>
   operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __result = std::__prev_permutation<_RangeAlgPolicy>(
         ranges::begin(__range), ranges::end(__range), std::__make_projected(__comp, __proj));
@@ -69,8 +69,8 @@ constexpr inline auto prev_permutation = __prev_permutation::__fn{};
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_PREV_PERMUTATION_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_PREV_PERMUTATION_H

diff  --git a/libcxx/include/__algorithm/ranges_push_heap.h b/libcxx/include/__algorithm/ranges_push_heap.h
index 3436b39e12cc..e946c0970de4 100644
--- a/libcxx/include/__algorithm/ranges_push_heap.h
+++ b/libcxx/include/__algorithm/ranges_push_heap.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_PUSH_HEAP_H
-#define _LIBCPP___ALGORITHM_RANGES_PUSH_HEAP_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_PUSH_HEAP_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_PUSH_HEAP_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/make_projected.h>
@@ -28,20 +28,20 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __push_heap {
 
 struct __fn {
   template <class _Iter, class _Sent, class _Comp, class _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   _Iter __push_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
     auto __last_iter = ranges::next(__first, __last);
 
@@ -53,14 +53,14 @@ struct __fn {
 
   template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<_Iter, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return __push_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
   }
 
   template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<iterator_t<_Range>, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     return __push_heap_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
   }
@@ -73,8 +73,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_PUSH_HEAP_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_PUSH_HEAP_H

diff  --git a/libcxx/include/__algorithm/ranges_remove.h b/libcxx/include/__algorithm/ranges_remove.h
index a6a1200763d2..fdfd41b03ca8 100644
--- a/libcxx/include/__algorithm/ranges_remove.h
+++ b/libcxx/include/__algorithm/ranges_remove.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_REMOVE_H
-#define _LIBCPP___ALGORITHM_RANGES_REMOVE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_H
 #include <__config>
 
 #include <__algorithm/ranges_remove_if.h>
@@ -21,13 +21,13 @@
 #include <__ranges/subrange.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __remove {
@@ -35,7 +35,7 @@ struct __fn {
 
   template <permutable _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity>
     requires indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Type*>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   subrange<_Iter> operator()(_Iter __first, _Sent __last, const _Type& __value, _Proj __proj = {}) const {
     auto __pred = [&](auto&& __other) { return __value == __other; };
     return ranges::__remove_if_impl(std::move(__first), std::move(__last), __pred, __proj);
@@ -44,7 +44,7 @@ struct __fn {
   template <forward_range _Range, class _Type, class _Proj = identity>
     requires permutable<iterator_t<_Range>>
           && indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type*>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_subrange_t<_Range> operator()(_Range&& __range, const _Type& __value, _Proj __proj = {}) const {
     auto __pred = [&](auto&& __other) { return __value == __other; };
     return ranges::__remove_if_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
@@ -57,8 +57,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_H

diff  --git a/libcxx/include/__algorithm/ranges_remove_copy.h b/libcxx/include/__algorithm/ranges_remove_copy.h
index a8144ce0ecbf..838f7ac2cd3f 100644
--- a/libcxx/include/__algorithm/ranges_remove_copy.h
+++ b/libcxx/include/__algorithm/ranges_remove_copy.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_H
-#define _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_COPY_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_COPY_H
 
 #include <__algorithm/in_out_result.h>
 #include <__algorithm/ranges_remove_copy_if.h>
@@ -22,13 +22,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -45,7 +45,7 @@ namespace __remove_copy {
               class _Proj = identity>
       requires indirectly_copyable<_InIter, _OutIter> &&
                indirect_binary_predicate<ranges::equal_to, projected<_InIter, _Proj>, const _Type*>
-    _LIBCPP_HIDE_FROM_ABI constexpr remove_copy_result<_InIter, _OutIter>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr remove_copy_result<_InIter, _OutIter>
     operator()(_InIter __first, _Sent __last, _OutIter __result, const _Type& __value, _Proj __proj = {}) const {
       auto __pred = [&](auto&& __val) { return __value == __val; };
       return ranges::__remove_copy_if_impl(std::move(__first), std::move(__last), std::move(__result), __pred, __proj);
@@ -54,7 +54,7 @@ namespace __remove_copy {
     template <input_range _Range, weakly_incrementable _OutIter, class _Type, class _Proj = identity>
       requires indirectly_copyable<iterator_t<_Range>, _OutIter> &&
                indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type*>
-    _LIBCPP_HIDE_FROM_ABI constexpr remove_copy_result<borrowed_iterator_t<_Range>, _OutIter>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr remove_copy_result<borrowed_iterator_t<_Range>, _OutIter>
     operator()(_Range&& __range, _OutIter __result, const _Type& __value, _Proj __proj = {}) const {
       auto __pred = [&](auto&& __val) { return __value == __val; };
       return ranges::__remove_copy_if_impl(
@@ -69,8 +69,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_COPY_H

diff  --git a/libcxx/include/__algorithm/ranges_remove_copy_if.h b/libcxx/include/__algorithm/ranges_remove_copy_if.h
index 3f56693fa1f2..c0a216061188 100644
--- a/libcxx/include/__algorithm/ranges_remove_copy_if.h
+++ b/libcxx/include/__algorithm/ranges_remove_copy_if.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_IF_H
-#define _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_COPY_IF_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_COPY_IF_H
 
 #include <__algorithm/in_out_result.h>
 #include <__algorithm/make_projected.h>
@@ -25,13 +25,13 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -39,7 +39,7 @@ template <class _InIter, class _OutIter>
 using remove_copy_if_result = in_out_result<_InIter, _OutIter>;
 
 template <class _InIter, class _Sent, class _OutIter, class _Proj, class _Pred>
-_LIBCPP_HIDE_FROM_ABI constexpr in_out_result<_InIter, _OutIter>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr in_out_result<_InIter, _OutIter>
 __remove_copy_if_impl(_InIter __first, _Sent __last, _OutIter __result, _Pred& __pred, _Proj& __proj) {
   for (; __first != __last; ++__first) {
     if (!std::invoke(__pred, std::invoke(__proj, *__first))) {
@@ -59,7 +59,7 @@ namespace __remove_copy_if {
               class _Proj = identity,
               indirect_unary_predicate<projected<_InIter, _Proj>> _Pred>
       requires indirectly_copyable<_InIter, _OutIter>
-    _LIBCPP_HIDE_FROM_ABI constexpr remove_copy_if_result<_InIter, _OutIter>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr remove_copy_if_result<_InIter, _OutIter>
     operator()(_InIter __first, _Sent __last, _OutIter __result, _Pred __pred, _Proj __proj = {}) const {
       return ranges::__remove_copy_if_impl(std::move(__first), std::move(__last), std::move(__result), __pred, __proj);
     }
@@ -69,7 +69,7 @@ namespace __remove_copy_if {
               class _Proj = identity,
               indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
       requires indirectly_copyable<iterator_t<_Range>, _OutIter>
-    _LIBCPP_HIDE_FROM_ABI constexpr remove_copy_if_result<borrowed_iterator_t<_Range>, _OutIter>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr remove_copy_if_result<borrowed_iterator_t<_Range>, _OutIter>
     operator()(_Range&& __range, _OutIter __result, _Pred __pred, _Proj __proj = {}) const {
       return ranges::__remove_copy_if_impl(
           ranges::begin(__range), ranges::end(__range), std::move(__result), __pred, __proj);
@@ -83,8 +83,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_COPY_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_COPY_IF_H

diff  --git a/libcxx/include/__algorithm/ranges_remove_if.h b/libcxx/include/__algorithm/ranges_remove_if.h
index d4e382e551c6..dac600a94772 100644
--- a/libcxx/include/__algorithm/ranges_remove_if.h
+++ b/libcxx/include/__algorithm/ranges_remove_if.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_REMOVE_IF_H
-#define _LIBCPP___ALGORITHM_RANGES_REMOVE_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_IF_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_IF_H
 #include <__config>
 
 #include <__algorithm/ranges_find_if.h>
@@ -23,18 +23,18 @@
 #include <__ranges/subrange.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
 template <class _Iter, class _Sent, class _Proj, class _Pred>
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 subrange<_Iter> __remove_if_impl(_Iter __first, _Sent __last, _Pred& __pred, _Proj& __proj) {
   auto __new_end = ranges::__find_if_impl(__first, __last, __pred, __proj);
   if (__new_end == __last)
@@ -56,7 +56,7 @@ struct __fn {
   template <permutable _Iter, sentinel_for<_Iter> _Sent,
             class _Proj = identity,
             indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   subrange<_Iter> operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
     return ranges::__remove_if_impl(std::move(__first), std::move(__last), __pred, __proj);
   }
@@ -65,7 +65,7 @@ struct __fn {
             class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
     requires permutable<iterator_t<_Range>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_subrange_t<_Range> operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
     return ranges::__remove_if_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
   }
@@ -78,8 +78,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_REMOVE_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_REMOVE_IF_H

diff  --git a/libcxx/include/__algorithm/ranges_replace.h b/libcxx/include/__algorithm/ranges_replace.h
index 5e74c3ff80cb..4f8c6ff4c21e 100644
--- a/libcxx/include/__algorithm/ranges_replace.h
+++ b/libcxx/include/__algorithm/ranges_replace.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_REPLACE_H
-#define _LIBCPP___ALGORITHM_RANGES_REPLACE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_H
 
 #include <__algorithm/ranges_replace_if.h>
 #include <__config>
@@ -20,13 +20,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined (_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined (_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __replace {
@@ -38,7 +38,7 @@ struct __fn {
             class _Proj = identity>
     requires indirectly_writable<_Iter, const _Type2&>
           && indirect_binary_predicate<ranges::equal_to, projected<_Iter, _Proj>, const _Type1*>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last,
                    const _Type1& __old_value,
                    const _Type2& __new_value,
@@ -53,7 +53,7 @@ struct __fn {
             class _Proj = identity>
     requires indirectly_writable<iterator_t<_Range>, const _Type2&>
           && indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _Type1*>
-  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
   operator()(_Range&& __range, const _Type1& __old_value, const _Type2& __new_value, _Proj __proj = {}) const {
     auto __pred = [&](auto&& __val) { return __val == __old_value; };
     return ranges::__replace_if_impl(ranges::begin(__range), ranges::end(__range), __pred, __new_value, __proj);
@@ -67,8 +67,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined (_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined (_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_H

diff  --git a/libcxx/include/__algorithm/ranges_replace_copy.h b/libcxx/include/__algorithm/ranges_replace_copy.h
index 7d59dbe7dbed..630800253c4a 100644
--- a/libcxx/include/__algorithm/ranges_replace_copy.h
+++ b/libcxx/include/__algorithm/ranges_replace_copy.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_H
-#define _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_COPY_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_COPY_H
 
 #include <__algorithm/in_out_result.h>
 #include <__algorithm/ranges_replace_copy_if.h>
@@ -22,13 +22,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -46,7 +46,7 @@ namespace __replace_copy {
               class _Proj = identity>
       requires indirectly_copyable<_InIter, _OutIter> &&
                indirect_binary_predicate<ranges::equal_to, projected<_InIter, _Proj>, const _OldType*>
-    _LIBCPP_HIDE_FROM_ABI constexpr replace_copy_result<_InIter, _OutIter>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr replace_copy_result<_InIter, _OutIter>
     operator()(_InIter __first,
                _Sent __last,
                _OutIter __result,
@@ -65,7 +65,7 @@ namespace __replace_copy {
               class _Proj = identity>
       requires indirectly_copyable<iterator_t<_Range>, _OutIter> &&
                indirect_binary_predicate<ranges::equal_to, projected<iterator_t<_Range>, _Proj>, const _OldType*>
-    _LIBCPP_HIDE_FROM_ABI constexpr replace_copy_result<borrowed_iterator_t<_Range>, _OutIter>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr replace_copy_result<borrowed_iterator_t<_Range>, _OutIter>
     operator()(_Range&& __range,
                _OutIter __result,
                const _OldType& __old_value,
@@ -84,8 +84,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_COPY_H

diff  --git a/libcxx/include/__algorithm/ranges_replace_copy_if.h b/libcxx/include/__algorithm/ranges_replace_copy_if.h
index 7602e8a14487..6532ff2fc30c 100644
--- a/libcxx/include/__algorithm/ranges_replace_copy_if.h
+++ b/libcxx/include/__algorithm/ranges_replace_copy_if.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_IF_H
-#define _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_COPY_IF_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_COPY_IF_H
 
 #include <__algorithm/in_out_result.h>
 #include <__config>
@@ -20,13 +20,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -34,7 +34,7 @@ template <class _InIter, class _OutIter>
 using replace_copy_if_result = in_out_result<_InIter, _OutIter>;
 
 template <class _InIter, class _Sent, class _OutIter, class _Pred, class _Type, class _Proj>
-_LIBCPP_HIDE_FROM_ABI constexpr replace_copy_if_result<_InIter, _OutIter> __replace_copy_if_impl(
+_LIBCUDACXX_HIDE_FROM_ABI constexpr replace_copy_if_result<_InIter, _OutIter> __replace_copy_if_impl(
     _InIter __first, _Sent __last, _OutIter __result, _Pred& __pred, const _Type& __new_value, _Proj& __proj) {
   while (__first != __last) {
     if (std::invoke(__pred, std::invoke(__proj, *__first)))
@@ -59,7 +59,7 @@ namespace __replace_copy_if {
               class _Proj = identity,
               indirect_unary_predicate<projected<_InIter, _Proj>> _Pred>
       requires indirectly_copyable<_InIter, _OutIter>
-    _LIBCPP_HIDE_FROM_ABI constexpr replace_copy_if_result<_InIter, _OutIter> operator()(
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr replace_copy_if_result<_InIter, _OutIter> operator()(
         _InIter __first, _Sent __last, _OutIter __result, _Pred __pred, const _Type& __new_value, _Proj __proj = {})
         const {
       return ranges::__replace_copy_if_impl(
@@ -72,7 +72,7 @@ namespace __replace_copy_if {
               class _Proj = identity,
               indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
       requires indirectly_copyable<iterator_t<_Range>, _OutIter>
-    _LIBCPP_HIDE_FROM_ABI constexpr replace_copy_if_result<borrowed_iterator_t<_Range>, _OutIter>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr replace_copy_if_result<borrowed_iterator_t<_Range>, _OutIter>
     operator()(_Range&& __range, _OutIter __result, _Pred __pred, const _Type& __new_value, _Proj __proj = {}) const {
       return ranges::__replace_copy_if_impl(
           ranges::begin(__range), ranges::end(__range), std::move(__result), __pred, __new_value, __proj);
@@ -86,8 +86,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_COPY_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_COPY_IF_H

diff  --git a/libcxx/include/__algorithm/ranges_replace_if.h b/libcxx/include/__algorithm/ranges_replace_if.h
index 0f9555fc35c2..a2f910383c31 100644
--- a/libcxx/include/__algorithm/ranges_replace_if.h
+++ b/libcxx/include/__algorithm/ranges_replace_if.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_REPLACE_IF_H
-#define _LIBCPP___ALGORITHM_RANGES_REPLACE_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_IF_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_IF_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -19,18 +19,18 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined (_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined (_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
 template <class _Iter, class _Sent, class _Type, class _Proj, class _Pred>
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 _Iter __replace_if_impl(_Iter __first, _Sent __last, _Pred& __pred, const _Type& __new_value, _Proj& __proj) {
   for (; __first != __last; ++__first) {
     if (std::invoke(__pred, std::invoke(__proj, *__first)))
@@ -47,7 +47,7 @@ struct __fn {
             class _Proj = identity,
             indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
     requires indirectly_writable<_Iter, const _Type&>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, _Pred __pred, const _Type& __new_value, _Proj __proj = {}) const {
     return ranges::__replace_if_impl(std::move(__first), std::move(__last), __pred, __new_value, __proj);
   }
@@ -57,7 +57,7 @@ struct __fn {
             class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
     requires indirectly_writable<iterator_t<_Range>, const _Type&>
-  _LIBCPP_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr borrowed_iterator_t<_Range>
   operator()(_Range&& __range, _Pred __pred, const _Type& __new_value, _Proj __proj = {}) const {
     return ranges::__replace_if_impl(ranges::begin(__range), ranges::end(__range), __pred, __new_value, __proj);
   }
@@ -70,8 +70,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined (_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined (_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_REPLACE_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_REPLACE_IF_H

diff  --git a/libcxx/include/__algorithm/ranges_reverse.h b/libcxx/include/__algorithm/ranges_reverse.h
index e7555d0f9acd..61ad15b99ef2 100644
--- a/libcxx/include/__algorithm/ranges_reverse.h
+++ b/libcxx/include/__algorithm/ranges_reverse.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_REVERSE_H
-#define _LIBCPP___ALGORITHM_RANGES_REVERSE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_REVERSE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_REVERSE_H
 
 #include <__config>
 #include <__iterator/concepts.h>
@@ -18,13 +18,13 @@
 #include <__ranges/concepts.h>
 #include <__ranges/dangling.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __reverse {
@@ -32,7 +32,7 @@ struct __fn {
 
   template <bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent>
     requires permutable<_Iter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last) const {
     if constexpr (random_access_iterator<_Iter>) {
       if (__first == __last)
@@ -63,7 +63,7 @@ struct __fn {
 
   template <bidirectional_range _Range>
     requires permutable<iterator_t<_Range>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __range) const {
     return (*this)(ranges::begin(__range), ranges::end(__range));
   }
@@ -76,8 +76,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_REVERSE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_REVERSE_H

diff  --git a/libcxx/include/__algorithm/ranges_reverse_copy.h b/libcxx/include/__algorithm/ranges_reverse_copy.h
index e2da9b484aaf..3459038043ab 100644
--- a/libcxx/include/__algorithm/ranges_reverse_copy.h
+++ b/libcxx/include/__algorithm/ranges_reverse_copy.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_REVERSE_COPY_H
-#define _LIBCPP___ALGORITHM_RANGES_REVERSE_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_REVERSE_COPY_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_REVERSE_COPY_H
 
 #include <__algorithm/in_out_result.h>
 #include <__algorithm/ranges_copy.h>
@@ -21,13 +21,13 @@
 #include <__ranges/subrange.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -39,14 +39,14 @@ struct __fn {
 
   template <bidirectional_iterator _InIter, sentinel_for<_InIter> _Sent, weakly_incrementable _OutIter>
     requires indirectly_copyable<_InIter, _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   reverse_copy_result<_InIter, _OutIter> operator()(_InIter __first, _Sent __last, _OutIter __result) const {
     return (*this)(subrange(std::move(__first), std::move(__last)), std::move(__result));
   }
 
   template <bidirectional_range _Range, weakly_incrementable _OutIter>
     requires indirectly_copyable<iterator_t<_Range>, _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   reverse_copy_result<borrowed_iterator_t<_Range>, _OutIter> operator()(_Range&& __range, _OutIter __result) const {
     auto __ret = ranges::copy(std::__reverse_range(__range), std::move(__result));
     return {ranges::next(ranges::begin(__range), ranges::end(__range)), std::move(__ret.out)};
@@ -60,8 +60,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_REVERSE_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_REVERSE_COPY_H

diff  --git a/libcxx/include/__algorithm/ranges_rotate.h b/libcxx/include/__algorithm/ranges_rotate.h
index 1cd69a141fe3..18aefa15c120 100644
--- a/libcxx/include/__algorithm/ranges_rotate.h
+++ b/libcxx/include/__algorithm/ranges_rotate.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_ROTATE_H
-#define _LIBCPP___ALGORITHM_RANGES_ROTATE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_ROTATE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_ROTATE_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/ranges_iterator_concept.h>
@@ -21,13 +21,13 @@
 #include <__ranges/subrange.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __rotate {
@@ -35,7 +35,7 @@ namespace __rotate {
 struct __fn {
 
   template <class _Iter, class _Sent>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   static subrange<_Iter> __rotate_fn_impl(_Iter __first, _Iter __middle, _Sent __last) {
     auto __ret = std::__rotate<_RangeAlgPolicy>(
       std::move(__first), std::move(__middle), std::move(__last));
@@ -43,14 +43,14 @@ struct __fn {
   }
 
   template <permutable _Iter, sentinel_for<_Iter> _Sent>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   subrange<_Iter> operator()(_Iter __first, _Iter __middle, _Sent __last) const {
     return __rotate_fn_impl(std::move(__first), std::move(__middle), std::move(__last));
   }
 
   template <forward_range _Range>
   requires permutable<iterator_t<_Range>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_subrange_t<_Range> operator()(_Range&& __range, iterator_t<_Range> __middle) const {
     return __rotate_fn_impl(ranges::begin(__range), std::move(__middle), ranges::end(__range));
   }
@@ -64,8 +64,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_ROTATE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_ROTATE_H

diff  --git a/libcxx/include/__algorithm/ranges_rotate_copy.h b/libcxx/include/__algorithm/ranges_rotate_copy.h
index d7a282c86750..7eb02c1b9dff 100644
--- a/libcxx/include/__algorithm/ranges_rotate_copy.h
+++ b/libcxx/include/__algorithm/ranges_rotate_copy.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_ROTATE_COPY_H
-#define _LIBCPP___ALGORITHM_RANGES_ROTATE_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_ROTATE_COPY_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_ROTATE_COPY_H
 
 #include <__algorithm/in_out_result.h>
 #include <__algorithm/ranges_copy.h>
@@ -19,13 +19,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -37,7 +37,7 @@ struct __fn {
 
   template <bidirectional_iterator _InIter, sentinel_for<_InIter> _Sent, weakly_incrementable _OutIter>
     requires indirectly_copyable<_InIter, _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   rotate_copy_result<_InIter, _OutIter>
   operator()(_InIter __first, _InIter __middle, _Sent __last, _OutIter __result) const {
     auto __res1 = ranges::copy(__middle, __last, std::move(__result));
@@ -47,7 +47,7 @@ struct __fn {
 
   template <bidirectional_range _Range, weakly_incrementable _OutIter>
     requires indirectly_copyable<iterator_t<_Range>, _OutIter>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   rotate_copy_result<borrowed_iterator_t<_Range>, _OutIter>
   operator()(_Range&& __range, iterator_t<_Range> __middle, _OutIter __result) const {
     return (*this)(ranges::begin(__range), std::move(__middle), ranges::end(__range), std::move(__result));
@@ -61,8 +61,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_ROTATE_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_ROTATE_COPY_H

diff  --git a/libcxx/include/__algorithm/ranges_sample.h b/libcxx/include/__algorithm/ranges_sample.h
index a8477f803788..5d1ea8350bf1 100644
--- a/libcxx/include/__algorithm/ranges_sample.h
+++ b/libcxx/include/__algorithm/ranges_sample.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_SAMPLE_H
-#define _LIBCPP___ALGORITHM_RANGES_SAMPLE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_SAMPLE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_SAMPLE_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/sample.h>
@@ -23,13 +23,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __sample {
@@ -40,7 +40,7 @@ struct __fn {
   requires (forward_iterator<_Iter> || random_access_iterator<_OutIter>) &&
            indirectly_copyable<_Iter, _OutIter> &&
            uniform_random_bit_generator<remove_reference_t<_Gen>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   _OutIter operator()(_Iter __first, _Sent __last,
                       _OutIter __out_first, iter_
diff erence_t<_Iter> __n, _Gen&& __gen) const {
     _ClassicGenAdaptor<_Gen> __adapted_gen(__gen);
@@ -52,7 +52,7 @@ struct __fn {
   requires (forward_range<_Range> || random_access_iterator<_OutIter>) &&
            indirectly_copyable<iterator_t<_Range>, _OutIter> &&
            uniform_random_bit_generator<remove_reference_t<_Gen>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   _OutIter operator()(_Range&& __range, _OutIter __out_first, range_
diff erence_t<_Range> __n, _Gen&& __gen) const {
     return (*this)(ranges::begin(__range), ranges::end(__range),
                    std::move(__out_first), __n, std::forward<_Gen>(__gen));
@@ -67,8 +67,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_SAMPLE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_SAMPLE_H

diff  --git a/libcxx/include/__algorithm/ranges_search.h b/libcxx/include/__algorithm/ranges_search.h
index 0564bbe1f8b3..f75a90f4d858 100644
--- a/libcxx/include/__algorithm/ranges_search.h
+++ b/libcxx/include/__algorithm/ranges_search.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_SEARCH_H
-#define _LIBCPP___ALGORITHM_RANGES_SEARCH_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_SEARCH_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_SEARCH_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/search.h>
@@ -23,19 +23,19 @@
 #include <__ranges/size.h>
 #include <__ranges/subrange.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __search {
 struct __fn {
   template <class _Iter1, class _Sent1, class _Iter2, class _Sent2, class _Pred, class _Proj1, class _Proj2>
-  _LIBCPP_HIDE_FROM_ABI static constexpr subrange<_Iter1> __ranges_search_impl(
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr subrange<_Iter1> __ranges_search_impl(
       _Iter1 __first1,
       _Sent1 __last1,
       _Iter2 __first2,
@@ -74,7 +74,7 @@ struct __fn {
             class _Proj1 = identity,
             class _Proj2 = identity>
     requires indirectly_comparable<_Iter1, _Iter2, _Pred, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   subrange<_Iter1> operator()(_Iter1 __first1, _Sent1 __last1,
                               _Iter2 __first2, _Sent2 __last2,
                               _Pred __pred = {},
@@ -89,7 +89,7 @@ struct __fn {
             class _Proj1 = identity,
             class _Proj2 = identity>
     requires indirectly_comparable<iterator_t<_Range1>, iterator_t<_Range2>, _Pred, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_subrange_t<_Range1> operator()(_Range1&& __range1,
                                           _Range2&& __range2,
                                           _Pred __pred = {},
@@ -127,8 +127,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_SEARCH_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_SEARCH_H

diff  --git a/libcxx/include/__algorithm/ranges_search_n.h b/libcxx/include/__algorithm/ranges_search_n.h
index 29fdbfb1c725..b139184b2c1c 100644
--- a/libcxx/include/__algorithm/ranges_search_n.h
+++ b/libcxx/include/__algorithm/ranges_search_n.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_SEARCH_N_H
-#define _LIBCPP___ALGORITHM_RANGES_SEARCH_N_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_SEARCH_N_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_SEARCH_N_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/search_n.h>
@@ -26,20 +26,20 @@
 #include <__ranges/subrange.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __search_n {
 struct __fn {
 
   template <class _Iter1, class _Sent1, class _SizeT, class _Type, class _Pred, class _Proj>
-  _LIBCPP_HIDE_FROM_ABI static constexpr subrange<_Iter1> __ranges_search_n_impl(
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr subrange<_Iter1> __ranges_search_n_impl(
       _Iter1 __first, _Sent1 __last, _SizeT __count, const _Type& __value, _Pred& __pred, _Proj& __proj) {
     if (__count == 0)
       return {__first, __first};
@@ -75,7 +75,7 @@ struct __fn {
             class _Pred = ranges::equal_to,
             class _Proj = identity>
     requires indirectly_comparable<_Iter, const _Type*, _Pred, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   subrange<_Iter> operator()(_Iter __first, _Sent __last,
                              iter_
diff erence_t<_Iter> __count,
                              const _Type& __value,
@@ -86,7 +86,7 @@ struct __fn {
 
   template <forward_range _Range, class _Type, class _Pred = ranges::equal_to, class _Proj = identity>
     requires indirectly_comparable<iterator_t<_Range>, const _Type*, _Pred, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_subrange_t<_Range> operator()(_Range&& __range,
                                          range_
diff erence_t<_Range> __count,
                                          const _Type& __value,
@@ -113,8 +113,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_SEARCH_N_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_SEARCH_N_H

diff  --git a/libcxx/include/__algorithm/ranges_set_
diff erence.h b/libcxx/include/__algorithm/ranges_set_
diff erence.h
index 4eb3efad3895..7a6c36a90714 100644
--- a/libcxx/include/__algorithm/ranges_set_
diff erence.h
+++ b/libcxx/include/__algorithm/ranges_set_
diff erence.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_SET_DIFFERENCE_H
-#define _LIBCPP___ALGORITHM_RANGES_SET_DIFFERENCE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_SET_DIFFERENCE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_SET_DIFFERENCE_H
 
 #include <__algorithm/in_out_result.h>
 #include <__algorithm/make_projected.h>
@@ -24,13 +24,13 @@
 #include <__type_traits/decay.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -50,7 +50,7 @@ struct __fn {
       class _Proj1 = identity,
       class _Proj2 = identity>
     requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr set_
diff erence_result<_InIter1, _OutIter> operator()(
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr set_
diff erence_result<_InIter1, _OutIter> operator()(
       _InIter1 __first1,
       _Sent1 __last1,
       _InIter2 __first2,
@@ -72,7 +72,7 @@ struct __fn {
       class _Proj1 = identity,
       class _Proj2 = identity>
     requires mergeable<iterator_t<_Range1>, iterator_t<_Range2>, _OutIter, _Comp, _Proj1, _Proj2> 
-  _LIBCPP_HIDE_FROM_ABI constexpr set_
diff erence_result<borrowed_iterator_t<_Range1>, _OutIter>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr set_
diff erence_result<borrowed_iterator_t<_Range1>, _OutIter>
     operator()(
         _Range1&& __range1,
         _Range2&& __range2,
@@ -98,7 +98,7 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
-#endif // _LIBCPP___ALGORITHM_RANGES_SET_DIFFERENCE_H
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_SET_DIFFERENCE_H

diff  --git a/libcxx/include/__algorithm/ranges_set_intersection.h b/libcxx/include/__algorithm/ranges_set_intersection.h
index 05af91ae29e5..8fb64dad4e23 100644
--- a/libcxx/include/__algorithm/ranges_set_intersection.h
+++ b/libcxx/include/__algorithm/ranges_set_intersection.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_SET_INTERSECTION_H
-#define _LIBCPP___ALGORITHM_RANGES_SET_INTERSECTION_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_SET_INTERSECTION_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_SET_INTERSECTION_H
 
 #include <__algorithm/in_in_out_result.h>
 #include <__algorithm/iterator_operations.h>
@@ -24,13 +24,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -50,7 +50,7 @@ struct __fn {
       class _Proj1 = identity,
       class _Proj2 = identity>
     requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr set_intersection_result<_InIter1, _InIter2, _OutIter> operator()(
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr set_intersection_result<_InIter1, _InIter2, _OutIter> operator()(
       _InIter1 __first1,
       _Sent1 __last1,
       _InIter2 __first2,
@@ -83,7 +83,7 @@ struct __fn {
         _Comp,
         _Proj1,
         _Proj2> 
-    _LIBCPP_HIDE_FROM_ABI constexpr set_intersection_result<borrowed_iterator_t<_Range1>,
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr set_intersection_result<borrowed_iterator_t<_Range1>,
                                                             borrowed_iterator_t<_Range2>,
                                                             _OutIter>
     operator()(
@@ -111,7 +111,7 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
-#endif // _LIBCPP___ALGORITHM_RANGES_SET_INTERSECTION_H
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_SET_INTERSECTION_H

diff  --git a/libcxx/include/__algorithm/ranges_set_symmetric_
diff erence.h b/libcxx/include/__algorithm/ranges_set_symmetric_
diff erence.h
index c54cf3a65112..aca7c1d90ae9 100644
--- a/libcxx/include/__algorithm/ranges_set_symmetric_
diff erence.h
+++ b/libcxx/include/__algorithm/ranges_set_symmetric_
diff erence.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_SET_SYMMETRIC_DIFFERENCE_H
-#define _LIBCPP___ALGORITHM_RANGES_SET_SYMMETRIC_DIFFERENCE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_SET_SYMMETRIC_DIFFERENCE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_SET_SYMMETRIC_DIFFERENCE_H
 
 #include <__algorithm/in_in_out_result.h>
 #include <__algorithm/make_projected.h>
@@ -23,13 +23,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -49,7 +49,7 @@ struct __fn {
       class _Proj1 = identity,
       class _Proj2 = identity>
     requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr set_symmetric_
diff erence_result<_InIter1, _InIter2, _OutIter> operator()(
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr set_symmetric_
diff erence_result<_InIter1, _InIter2, _OutIter> operator()(
       _InIter1 __first1,
       _Sent1 __last1,
       _InIter2 __first2,
@@ -82,7 +82,7 @@ struct __fn {
         _Comp,
         _Proj1,
         _Proj2> 
-  _LIBCPP_HIDE_FROM_ABI constexpr set_symmetric_
diff erence_result<borrowed_iterator_t<_Range1>,
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr set_symmetric_
diff erence_result<borrowed_iterator_t<_Range1>,
                                                                   borrowed_iterator_t<_Range2>,
                                                                   _OutIter>
     operator()(
@@ -110,7 +110,7 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
-#endif // _LIBCPP___ALGORITHM_RANGES_SET_SYMMETRIC_DIFFERENCE_H
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_SET_SYMMETRIC_DIFFERENCE_H

diff  --git a/libcxx/include/__algorithm/ranges_set_union.h b/libcxx/include/__algorithm/ranges_set_union.h
index 3826e55688f7..f0989cff7140 100644
--- a/libcxx/include/__algorithm/ranges_set_union.h
+++ b/libcxx/include/__algorithm/ranges_set_union.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_SET_UNION_H
-#define _LIBCPP___ALGORITHM_RANGES_SET_UNION_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_SET_UNION_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_SET_UNION_H
 
 #include <__algorithm/in_in_out_result.h>
 #include <__algorithm/make_projected.h>
@@ -26,13 +26,13 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -52,7 +52,7 @@ struct __fn {
       class _Proj1 = identity,
       class _Proj2 = identity>
     requires mergeable<_InIter1, _InIter2, _OutIter, _Comp, _Proj1, _Proj2>
-  _LIBCPP_HIDE_FROM_ABI constexpr set_union_result<_InIter1, _InIter2, _OutIter> operator()(
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr set_union_result<_InIter1, _InIter2, _OutIter> operator()(
       _InIter1 __first1,
       _Sent1 __last1,
       _InIter2 __first2,
@@ -85,7 +85,7 @@ struct __fn {
         _Comp,
         _Proj1,
         _Proj2> 
-  _LIBCPP_HIDE_FROM_ABI constexpr set_union_result<borrowed_iterator_t<_Range1>,
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr set_union_result<borrowed_iterator_t<_Range1>,
                                                    borrowed_iterator_t<_Range2>,
                                                    _OutIter>
     operator()(
@@ -113,8 +113,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_SET_UNION_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_SET_UNION_H

diff  --git a/libcxx/include/__algorithm/ranges_shuffle.h b/libcxx/include/__algorithm/ranges_shuffle.h
index 9b7f81e489b3..9fe89d4dbdc8 100644
--- a/libcxx/include/__algorithm/ranges_shuffle.h
+++ b/libcxx/include/__algorithm/ranges_shuffle.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_SHUFFLE_H
-#define _LIBCPP___ALGORITHM_RANGES_SHUFFLE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_SHUFFLE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_SHUFFLE_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/shuffle.h>
@@ -27,13 +27,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __shuffle {
@@ -42,7 +42,7 @@ struct __fn {
 
   template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Gen>
   requires permutable<_Iter> && uniform_random_bit_generator<remove_reference_t<_Gen>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   _Iter operator()(_Iter __first, _Sent __last, _Gen&& __gen) const {
     _ClassicGenAdaptor<_Gen> __adapted_gen(__gen);
     return std::__shuffle<_RangeAlgPolicy>(std::move(__first), std::move(__last), __adapted_gen);
@@ -50,7 +50,7 @@ struct __fn {
 
   template<random_access_range _Range, class _Gen>
   requires permutable<iterator_t<_Range>> && uniform_random_bit_generator<remove_reference_t<_Gen>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   borrowed_iterator_t<_Range> operator()(_Range&& __range, _Gen&& __gen) const {
     return (*this)(ranges::begin(__range), ranges::end(__range), std::forward<_Gen>(__gen));
   }
@@ -64,8 +64,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_SHUFFLE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_SHUFFLE_H

diff  --git a/libcxx/include/__algorithm/ranges_sort.h b/libcxx/include/__algorithm/ranges_sort.h
index c3f3cbff007c..6d0ec7279a50 100644
--- a/libcxx/include/__algorithm/ranges_sort.h
+++ b/libcxx/include/__algorithm/ranges_sort.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_SORT_H
-#define _LIBCPP___ALGORITHM_RANGES_SORT_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_SORT_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_SORT_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/make_projected.h>
@@ -27,20 +27,20 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __sort {
 
 struct __fn {
   template <class _Iter, class _Sent, class _Comp, class _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   _Iter __sort_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
     auto __last_iter = ranges::next(__first, __last);
 
@@ -52,14 +52,14 @@ struct __fn {
 
   template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<_Iter, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return __sort_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
   }
 
   template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<iterator_t<_Range>, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     return __sort_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
   }
@@ -72,8 +72,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_SORT_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_SORT_H

diff  --git a/libcxx/include/__algorithm/ranges_sort_heap.h b/libcxx/include/__algorithm/ranges_sort_heap.h
index f6e4dcb43ddf..341448cf4c43 100644
--- a/libcxx/include/__algorithm/ranges_sort_heap.h
+++ b/libcxx/include/__algorithm/ranges_sort_heap.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_SORT_HEAP_H
-#define _LIBCPP___ALGORITHM_RANGES_SORT_HEAP_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_SORT_HEAP_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_SORT_HEAP_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/make_projected.h>
@@ -28,20 +28,20 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __sort_heap {
 
 struct __fn {
   template <class _Iter, class _Sent, class _Comp, class _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr static
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr static
   _Iter __sort_heap_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
     auto __last_iter = ranges::next(__first, __last);
 
@@ -53,14 +53,14 @@ struct __fn {
 
   template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<_Iter, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return __sort_heap_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
   }
 
   template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<iterator_t<_Range>, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     return __sort_heap_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
   }
@@ -73,8 +73,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_SORT_HEAP_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_SORT_HEAP_H

diff  --git a/libcxx/include/__algorithm/ranges_stable_partition.h b/libcxx/include/__algorithm/ranges_stable_partition.h
index b20dfa3a8bfc..ba44fa4cbe70 100644
--- a/libcxx/include/__algorithm/ranges_stable_partition.h
+++ b/libcxx/include/__algorithm/ranges_stable_partition.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_STABLE_PARTITION_H
-#define _LIBCPP___ALGORITHM_RANGES_STABLE_PARTITION_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_STABLE_PARTITION_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_STABLE_PARTITION_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/make_projected.h>
@@ -30,13 +30,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __stable_partition {
@@ -44,7 +44,7 @@ namespace __stable_partition {
 struct __fn {
 
   template <class _Iter, class _Sent, class _Proj, class _Pred>
-  _LIBCPP_HIDE_FROM_ABI static
+  _LIBCUDACXX_HIDE_FROM_ABI static
   subrange<__uncvref_t<_Iter>> __stable_partition_fn_impl(
       _Iter&& __first, _Sent&& __last, _Pred&& __pred, _Proj&& __proj) {
     auto __last_iter = ranges::next(__first, __last);
@@ -59,7 +59,7 @@ struct __fn {
   template <bidirectional_iterator _Iter, sentinel_for<_Iter> _Sent, class _Proj = identity,
             indirect_unary_predicate<projected<_Iter, _Proj>> _Pred>
   requires permutable<_Iter>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   subrange<_Iter> operator()(_Iter __first, _Sent __last, _Pred __pred, _Proj __proj = {}) const {
     return __stable_partition_fn_impl(__first, __last, __pred, __proj);
   }
@@ -67,7 +67,7 @@ struct __fn {
   template <bidirectional_range _Range, class _Proj = identity,
             indirect_unary_predicate<projected<iterator_t<_Range>, _Proj>> _Pred>
   requires permutable<iterator_t<_Range>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   borrowed_subrange_t<_Range> operator()(_Range&& __range, _Pred __pred, _Proj __proj = {}) const {
     return __stable_partition_fn_impl(ranges::begin(__range), ranges::end(__range), __pred, __proj);
   }
@@ -81,8 +81,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_STABLE_PARTITION_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_STABLE_PARTITION_H

diff  --git a/libcxx/include/__algorithm/ranges_stable_sort.h b/libcxx/include/__algorithm/ranges_stable_sort.h
index 7ecffefc19da..6300b235329f 100644
--- a/libcxx/include/__algorithm/ranges_stable_sort.h
+++ b/libcxx/include/__algorithm/ranges_stable_sort.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_STABLE_SORT_H
-#define _LIBCPP___ALGORITHM_RANGES_STABLE_SORT_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_STABLE_SORT_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_STABLE_SORT_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/make_projected.h>
@@ -27,20 +27,20 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __stable_sort {
 
 struct __fn {
   template <class _Iter, class _Sent, class _Comp, class _Proj>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _Iter __stable_sort_fn_impl(_Iter __first, _Sent __last, _Comp& __comp, _Proj& __proj) {
     auto __last_iter = ranges::next(__first, __last);
 
@@ -52,14 +52,14 @@ struct __fn {
 
   template <random_access_iterator _Iter, sentinel_for<_Iter> _Sent, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<_Iter, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   _Iter operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
     return __stable_sort_fn_impl(std::move(__first), std::move(__last), __comp, __proj);
   }
 
   template <random_access_range _Range, class _Comp = ranges::less, class _Proj = identity>
     requires sortable<iterator_t<_Range>, _Comp, _Proj>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   borrowed_iterator_t<_Range> operator()(_Range&& __r, _Comp __comp = {}, _Proj __proj = {}) const {
     return __stable_sort_fn_impl(ranges::begin(__r), ranges::end(__r), __comp, __proj);
   }
@@ -72,8 +72,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_STABLE_SORT_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_STABLE_SORT_H

diff  --git a/libcxx/include/__algorithm/ranges_swap_ranges.h b/libcxx/include/__algorithm/ranges_swap_ranges.h
index d980fdec2c49..3d57f57132df 100644
--- a/libcxx/include/__algorithm/ranges_swap_ranges.h
+++ b/libcxx/include/__algorithm/ranges_swap_ranges.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H
-#define _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_SWAP_RANGES_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_SWAP_RANGES_H
 
 #include <__algorithm/in_in_result.h>
 #include <__algorithm/iterator_operations.h>
@@ -20,13 +20,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -38,7 +38,7 @@ struct __fn {
   template <input_iterator _I1, sentinel_for<_I1> _S1,
             input_iterator _I2, sentinel_for<_I2> _S2>
     requires indirectly_swappable<_I1, _I2>
-  _LIBCPP_HIDE_FROM_ABI constexpr swap_ranges_result<_I1, _I2>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr swap_ranges_result<_I1, _I2>
   operator()(_I1 __first1, _S1 __last1, _I2 __first2, _S2 __last2) const {
     auto __ret = std::__swap_ranges<_RangeAlgPolicy>(
         std::move(__first1), std::move(__last1), std::move(__first2), std::move(__last2));
@@ -47,7 +47,7 @@ struct __fn {
 
   template <input_range _R1, input_range _R2>
     requires indirectly_swappable<iterator_t<_R1>, iterator_t<_R2>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   swap_ranges_result<borrowed_iterator_t<_R1>, borrowed_iterator_t<_R2>>
   operator()(_R1&& __r1, _R2&& __r2) const {
     return operator()(ranges::begin(__r1), ranges::end(__r1),
@@ -61,8 +61,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_SWAP_RANGES_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_SWAP_RANGES_H

diff  --git a/libcxx/include/__algorithm/ranges_transform.h b/libcxx/include/__algorithm/ranges_transform.h
index 3c13b1b79ff3..3b6fe339a162 100644
--- a/libcxx/include/__algorithm/ranges_transform.h
+++ b/libcxx/include/__algorithm/ranges_transform.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_TRANSFORM_H
-#define _LIBCPP___ALGORITHM_RANGES_TRANSFORM_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_TRANSFORM_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_TRANSFORM_H
 
 #include <__algorithm/in_in_out_result.h>
 #include <__algorithm/in_out_result.h>
@@ -22,13 +22,13 @@
 #include <__ranges/dangling.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -45,7 +45,7 @@ struct __fn {
             class _OutIter,
             class _Func,
             class _Proj>
-  _LIBCPP_HIDE_FROM_ABI static constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr
   unary_transform_result<_InIter, _OutIter> __unary(_InIter __first, _Sent __last,
                                                     _OutIter __result,
                                                     _Func& __operation,
@@ -65,7 +65,7 @@ struct __fn {
             class _Func,
             class _Proj1,
             class _Proj2>
-  _LIBCPP_HIDE_FROM_ABI static constexpr binary_transform_result<_InIter1, _InIter2, _OutIter>
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr binary_transform_result<_InIter1, _InIter2, _OutIter>
   __binary(_InIter1 __first1, _Sent1 __last1,
            _InIter2 __first2, _Sent2 __last2,
            _OutIter __result,
@@ -87,7 +87,7 @@ struct __fn {
             copy_constructible _Func,
             class _Proj = identity>
     requires indirectly_writable<_OutIter, indirect_result_t<_Func&, projected<_InIter, _Proj>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   unary_transform_result<_InIter, _OutIter> operator()(_InIter __first, _Sent __last,
                                                        _OutIter __result,
                                                        _Func __operation,
@@ -100,7 +100,7 @@ struct __fn {
             copy_constructible _Func,
             class _Proj = identity>
     requires indirectly_writable<_OutIter, indirect_result_t<_Func, projected<iterator_t<_Range>, _Proj>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   unary_transform_result<borrowed_iterator_t<_Range>, _OutIter> operator()(_Range&& __range,
                                                                            _OutIter __result,
                                                                            _Func __operation,
@@ -116,7 +116,7 @@ struct __fn {
             class _Proj2 = identity>
     requires indirectly_writable<_OutIter, indirect_result_t<_Func&, projected<_InIter1, _Proj1>,
                                                                      projected<_InIter2, _Proj2>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   binary_transform_result<_InIter1, _InIter2, _OutIter> operator()(_InIter1 __first1, _Sent1 __last1,
                                                                    _InIter2 __first2, _Sent2 __last2,
                                                                    _OutIter __result,
@@ -139,7 +139,7 @@ struct __fn {
             class _Proj2 = identity>
     requires indirectly_writable<_OutIter, indirect_result_t<_Func&, projected<iterator_t<_Range1>, _Proj1>,
                                                                      projected<iterator_t<_Range2>, _Proj2>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   binary_transform_result<borrowed_iterator_t<_Range1>, borrowed_iterator_t<_Range2>, _OutIter>
   operator()(_Range1&& __range1,
              _Range2&& __range2,
@@ -163,8 +163,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_TRANSFORM_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_TRANSFORM_H

diff  --git a/libcxx/include/__algorithm/ranges_unique.h b/libcxx/include/__algorithm/ranges_unique.h
index 11370aeccd24..4d1c66096292 100644
--- a/libcxx/include/__algorithm/ranges_unique.h
+++ b/libcxx/include/__algorithm/ranges_unique.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_UNIQUE_H
-#define _LIBCPP___ALGORITHM_RANGES_UNIQUE_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_UNIQUE_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_UNIQUE_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/make_projected.h>
@@ -27,13 +27,13 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __unique {
@@ -44,7 +44,7 @@ namespace __unique {
         sentinel_for<_Iter> _Sent,
         class _Proj                                                  = identity,
         indirect_equivalence_relation<projected<_Iter, _Proj>> _Comp = ranges::equal_to>
-    _LIBCPP_HIDE_FROM_ABI constexpr subrange<_Iter>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange<_Iter>
     operator()(_Iter __first, _Sent __last, _Comp __comp = {}, _Proj __proj = {}) const {
       auto __ret = std::__unique<_RangeAlgPolicy>(
           std::move(__first), std::move(__last), std::__make_projected(__comp, __proj));
@@ -56,7 +56,7 @@ namespace __unique {
         class _Proj                                                               = identity,
         indirect_equivalence_relation<projected<iterator_t<_Range>, _Proj>> _Comp = ranges::equal_to>
       requires permutable<iterator_t<_Range>>
-    _LIBCPP_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr borrowed_subrange_t<_Range>
     operator()(_Range&& __range, _Comp __comp = {}, _Proj __proj = {}) const {
       auto __ret = std::__unique<_RangeAlgPolicy>(
           ranges::begin(__range), ranges::end(__range), std::__make_projected(__comp, __proj));
@@ -71,8 +71,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_UNIQUE_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_UNIQUE_H

diff  --git a/libcxx/include/__algorithm/ranges_unique_copy.h b/libcxx/include/__algorithm/ranges_unique_copy.h
index 8c0b970d043f..9b0160c5ed77 100644
--- a/libcxx/include/__algorithm/ranges_unique_copy.h
+++ b/libcxx/include/__algorithm/ranges_unique_copy.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_UNIQUE_COPY_H
-#define _LIBCPP___ALGORITHM_RANGES_UNIQUE_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_UNIQUE_COPY_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_UNIQUE_COPY_H
 
 #include <__algorithm/in_out_result.h>
 #include <__algorithm/iterator_operations.h>
@@ -28,13 +28,13 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 
@@ -70,7 +70,7 @@ struct __fn {
              (forward_iterator<_InIter> ||
               (input_iterator<_OutIter> && same_as<iter_value_t<_InIter>, iter_value_t<_OutIter>>) ||
               indirectly_copyable_storable<_InIter, _OutIter>)
-  _LIBCPP_HIDE_FROM_ABI constexpr unique_copy_result<_InIter, _OutIter>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr unique_copy_result<_InIter, _OutIter>
   operator()(_InIter __first, _Sent __last, _OutIter __result, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __ret = std::__unique_copy<_RangeAlgPolicy>(
         std::move(__first),
@@ -89,7 +89,7 @@ struct __fn {
       (forward_iterator<iterator_t<_Range>> ||
        (input_iterator<_OutIter> && same_as<range_value_t<_Range>, iter_value_t<_OutIter>>) ||
        indirectly_copyable_storable<iterator_t<_Range>, _OutIter>)
-  _LIBCPP_HIDE_FROM_ABI constexpr unique_copy_result<borrowed_iterator_t<_Range>, _OutIter>
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr unique_copy_result<borrowed_iterator_t<_Range>, _OutIter>
   operator()(_Range&& __range, _OutIter __result, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __ret = std::__unique_copy<_RangeAlgPolicy>(
         ranges::begin(__range),
@@ -108,8 +108,8 @@ inline constexpr auto unique_copy = __unique_copy::__fn{};
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_UNIQUE_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_UNIQUE_COPY_H

diff  --git a/libcxx/include/__algorithm/ranges_upper_bound.h b/libcxx/include/__algorithm/ranges_upper_bound.h
index 3c63249248fa..15d5e164a3f7 100644
--- a/libcxx/include/__algorithm/ranges_upper_bound.h
+++ b/libcxx/include/__algorithm/ranges_upper_bound.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_UPPER_BOUND_H
-#define _LIBCPP___ALGORITHM_RANGES_UPPER_BOUND_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_UPPER_BOUND_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_UPPER_BOUND_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/lower_bound.h>
@@ -21,20 +21,20 @@
 #include <__ranges/concepts.h>
 #include <__ranges/dangling.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace ranges {
 namespace __upper_bound {
 struct __fn {
   template <forward_iterator _Iter, sentinel_for<_Iter> _Sent, class _Type, class _Proj = identity,
             indirect_strict_weak_order<const _Type*, projected<_Iter, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   _Iter operator()(_Iter __first, _Sent __last, const _Type& __value, _Comp __comp = {}, _Proj __proj = {}) const {
     auto __comp_lhs_rhs_swapped = [&](const auto& __lhs, const auto& __rhs) {
       return !std::invoke(__comp, __rhs, __lhs);
@@ -45,7 +45,7 @@ struct __fn {
 
   template <forward_range _Range, class _Type, class _Proj = identity,
             indirect_strict_weak_order<const _Type*, projected<iterator_t<_Range>, _Proj>> _Comp = ranges::less>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   borrowed_iterator_t<_Range> operator()(_Range&& __r,
                                          const _Type& __value,
                                          _Comp __comp = {},
@@ -68,8 +68,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-#endif // _LIBCPP___ALGORITHM_RANGES_UPPER_BOUND_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_UPPER_BOUND_H

diff  --git a/libcxx/include/__algorithm/remove.h b/libcxx/include/__algorithm/remove.h
index 8a7e99ba09a1..f009572178b9 100644
--- a/libcxx/include/__algorithm/remove.h
+++ b/libcxx/include/__algorithm/remove.h
@@ -6,25 +6,25 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_REMOVE_H
-#define _LIBCPP___ALGORITHM_REMOVE_H
+#ifndef _LIBCUDACXX___ALGORITHM_REMOVE_H
+#define _LIBCUDACXX___ALGORITHM_REMOVE_H
 
 #include <__algorithm/find.h>
 #include <__algorithm/find_if.h>
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
 {
-    __first = _VSTD::find(__first, __last, __value);
+    __first = _CUDA_VSTD::find(__first, __last, __value);
     if (__first != __last)
     {
         _ForwardIterator __i = __first;
@@ -32,7 +32,7 @@ remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
         {
             if (!(*__i == __value))
             {
-                *__first = _VSTD::move(*__i);
+                *__first = _CUDA_VSTD::move(*__i);
                 ++__first;
             }
         }
@@ -40,6 +40,6 @@ remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
     return __first;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_REMOVE_H
+#endif // _LIBCUDACXX___ALGORITHM_REMOVE_H

diff  --git a/libcxx/include/__algorithm/remove_copy.h b/libcxx/include/__algorithm/remove_copy.h
index 55fc1d90a1e7..ffdc083d122b 100644
--- a/libcxx/include/__algorithm/remove_copy.h
+++ b/libcxx/include/__algorithm/remove_copy.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_REMOVE_COPY_H
-#define _LIBCPP___ALGORITHM_REMOVE_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_REMOVE_COPY_H
+#define _LIBCUDACXX___ALGORITHM_REMOVE_COPY_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _OutputIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, const _Tp& __value)
 {
@@ -33,6 +33,6 @@ remove_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __res
     return __result;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_REMOVE_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_REMOVE_COPY_H

diff  --git a/libcxx/include/__algorithm/remove_copy_if.h b/libcxx/include/__algorithm/remove_copy_if.h
index 36ddba4883ab..fa611eecc7e5 100644
--- a/libcxx/include/__algorithm/remove_copy_if.h
+++ b/libcxx/include/__algorithm/remove_copy_if.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_REMOVE_COPY_IF_H
-#define _LIBCPP___ALGORITHM_REMOVE_COPY_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_REMOVE_COPY_IF_H
+#define _LIBCUDACXX___ALGORITHM_REMOVE_COPY_IF_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _OutputIterator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Predicate __pred)
 {
@@ -33,6 +33,6 @@ remove_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __
     return __result;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_REMOVE_COPY_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_REMOVE_COPY_IF_H

diff  --git a/libcxx/include/__algorithm/remove_if.h b/libcxx/include/__algorithm/remove_if.h
index 0ae131498d22..111d694aeb82 100644
--- a/libcxx/include/__algorithm/remove_if.h
+++ b/libcxx/include/__algorithm/remove_if.h
@@ -6,24 +6,24 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_REMOVE_IF_H
-#define _LIBCPP___ALGORITHM_REMOVE_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_REMOVE_IF_H
+#define _LIBCUDACXX___ALGORITHM_REMOVE_IF_H
 
 #include <__algorithm/find_if.h>
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _ForwardIterator, class _Predicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
 {
-    __first = _VSTD::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred);
+    __first = _CUDA_VSTD::find_if<_ForwardIterator, _Predicate&>(__first, __last, __pred);
     if (__first != __last)
     {
         _ForwardIterator __i = __first;
@@ -31,7 +31,7 @@ remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
         {
             if (!__pred(*__i))
             {
-                *__first = _VSTD::move(*__i);
+                *__first = _CUDA_VSTD::move(*__i);
                 ++__first;
             }
         }
@@ -39,6 +39,6 @@ remove_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
     return __first;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_REMOVE_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_REMOVE_IF_H

diff  --git a/libcxx/include/__algorithm/replace.h b/libcxx/include/__algorithm/replace.h
index d0ae8f65d4a2..48e07c524852 100644
--- a/libcxx/include/__algorithm/replace.h
+++ b/libcxx/include/__algorithm/replace.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_REPLACE_H
-#define _LIBCPP___ALGORITHM_REPLACE_H
+#ifndef _LIBCUDACXX___ALGORITHM_REPLACE_H
+#define _LIBCUDACXX___ALGORITHM_REPLACE_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _ForwardIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_value, const _Tp& __new_value)
 {
@@ -27,6 +27,6 @@ replace(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __old_valu
             *__first = __new_value;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_REPLACE_H
+#endif // _LIBCUDACXX___ALGORITHM_REPLACE_H

diff  --git a/libcxx/include/__algorithm/replace_copy.h b/libcxx/include/__algorithm/replace_copy.h
index 7c8a5a0b93cb..fcdb66dec6c0 100644
--- a/libcxx/include/__algorithm/replace_copy.h
+++ b/libcxx/include/__algorithm/replace_copy.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_REPLACE_COPY_H
-#define _LIBCPP___ALGORITHM_REPLACE_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_REPLACE_COPY_H
+#define _LIBCUDACXX___ALGORITHM_REPLACE_COPY_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _OutputIterator, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 replace_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
              const _Tp& __old_value, const _Tp& __new_value)
@@ -31,6 +31,6 @@ replace_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __re
     return __result;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_REPLACE_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_REPLACE_COPY_H

diff  --git a/libcxx/include/__algorithm/replace_copy_if.h b/libcxx/include/__algorithm/replace_copy_if.h
index 9d8a68fdc0f3..0071f8a94213 100644
--- a/libcxx/include/__algorithm/replace_copy_if.h
+++ b/libcxx/include/__algorithm/replace_copy_if.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_REPLACE_COPY_IF_H
-#define _LIBCPP___ALGORITHM_REPLACE_COPY_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_REPLACE_COPY_IF_H
+#define _LIBCUDACXX___ALGORITHM_REPLACE_COPY_IF_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _OutputIterator, class _Predicate, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 replace_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
                 _Predicate __pred, const _Tp& __new_value)
@@ -31,6 +31,6 @@ replace_copy_if(_InputIterator __first, _InputIterator __last, _OutputIterator _
     return __result;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_REPLACE_COPY_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_REPLACE_COPY_IF_H

diff  --git a/libcxx/include/__algorithm/replace_if.h b/libcxx/include/__algorithm/replace_if.h
index 37c719a34c84..4b33324f4adf 100644
--- a/libcxx/include/__algorithm/replace_if.h
+++ b/libcxx/include/__algorithm/replace_if.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_REPLACE_IF_H
-#define _LIBCPP___ALGORITHM_REPLACE_IF_H
+#ifndef _LIBCUDACXX___ALGORITHM_REPLACE_IF_H
+#define _LIBCUDACXX___ALGORITHM_REPLACE_IF_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _ForwardIterator, class _Predicate, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 replace_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, const _Tp& __new_value)
 {
@@ -27,6 +27,6 @@ replace_if(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred,
             *__first = __new_value;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_REPLACE_IF_H
+#endif // _LIBCUDACXX___ALGORITHM_REPLACE_IF_H

diff  --git a/libcxx/include/__algorithm/reverse.h b/libcxx/include/__algorithm/reverse.h
index 6484c73752ef..c9fbd755ee9a 100644
--- a/libcxx/include/__algorithm/reverse.h
+++ b/libcxx/include/__algorithm/reverse.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_REVERSE_H
-#define _LIBCPP___ALGORITHM_REVERSE_H
+#ifndef _LIBCUDACXX___ALGORITHM_REVERSE_H
+#define _LIBCUDACXX___ALGORITHM_REVERSE_H
 
 #include <__algorithm/iter_swap.h>
 #include <__algorithm/iterator_operations.h>
@@ -15,14 +15,14 @@
 #include <__iterator/iterator_traits.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _BidirectionalIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __reverse_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, bidirectional_iterator_tag)
 {
@@ -36,7 +36,7 @@ __reverse_impl(_BidirectionalIterator __first, _BidirectionalIterator __last, bi
 }
 
 template <class _AlgPolicy, class _RandomAccessIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __reverse_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, random_access_iterator_tag)
 {
@@ -46,20 +46,20 @@ __reverse_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, rand
 }
 
 template <class _AlgPolicy, class _BidirectionalIterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void __reverse(_BidirectionalIterator __first, _Sentinel __last) {
   using _IterCategory = typename _IterOps<_AlgPolicy>::template __iterator_category<_BidirectionalIterator>;
   std::__reverse_impl<_AlgPolicy>(std::move(__first), std::move(__last), _IterCategory());
 }
 
 template <class _BidirectionalIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 reverse(_BidirectionalIterator __first, _BidirectionalIterator __last)
 {
   std::__reverse<_ClassicAlgPolicy>(std::move(__first), std::move(__last));
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_REVERSE_H
+#endif // _LIBCUDACXX___ALGORITHM_REVERSE_H

diff  --git a/libcxx/include/__algorithm/reverse_copy.h b/libcxx/include/__algorithm/reverse_copy.h
index 158390707803..b311b4af5be7 100644
--- a/libcxx/include/__algorithm/reverse_copy.h
+++ b/libcxx/include/__algorithm/reverse_copy.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_REVERSE_COPY_H
-#define _LIBCPP___ALGORITHM_REVERSE_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_REVERSE_COPY_H
+#define _LIBCUDACXX___ALGORITHM_REVERSE_COPY_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _BidirectionalIterator, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, _OutputIterator __result)
 {
@@ -27,6 +27,6 @@ reverse_copy(_BidirectionalIterator __first, _BidirectionalIterator __last, _Out
     return __result;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_REVERSE_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_REVERSE_COPY_H

diff  --git a/libcxx/include/__algorithm/rotate.h b/libcxx/include/__algorithm/rotate.h
index beb5409d5b88..5c44ce18e541 100644
--- a/libcxx/include/__algorithm/rotate.h
+++ b/libcxx/include/__algorithm/rotate.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_ROTATE_H
-#define _LIBCPP___ALGORITHM_ROTATE_H
+#ifndef _LIBCUDACXX___ALGORITHM_ROTATE_H
+#define _LIBCUDACXX___ALGORITHM_ROTATE_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/move.h>
@@ -19,14 +19,14 @@
 #include <__utility/pair.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _ForwardIterator
 __rotate_left(_ForwardIterator __first, _ForwardIterator __last)
 {
     typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
@@ -35,12 +35,12 @@ __rotate_left(_ForwardIterator __first, _ForwardIterator __last)
     value_type __tmp = _Ops::__iter_move(__first);
     _ForwardIterator __lm1 = std::__move<_AlgPolicy>(
         _Ops::next(__first), __last, __first).second;
-    *__lm1 = _VSTD::move(__tmp);
+    *__lm1 = _CUDA_VSTD::move(__tmp);
     return __lm1;
 }
 
 template <class _AlgPolicy, class _BidirectionalIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
 __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
 {
     typedef typename iterator_traits<_BidirectionalIterator>::value_type value_type;
@@ -49,12 +49,12 @@ __rotate_right(_BidirectionalIterator __first, _BidirectionalIterator __last)
     _BidirectionalIterator __lm1 = _Ops::prev(__last);
     value_type __tmp = _Ops::__iter_move(__lm1);
     _BidirectionalIterator __fp1 = std::__move_backward<_AlgPolicy>(__first, __lm1, std::move(__last));
-    *__first = _VSTD::move(__tmp);
+    *__first = _CUDA_VSTD::move(__tmp);
     return __fp1;
 }
 
 template <class _AlgPolicy, class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX14 _ForwardIterator
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX14 _ForwardIterator
 __rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last)
 {
     _ForwardIterator __i = __middle;
@@ -89,8 +89,8 @@ __rotate_forward(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIt
 }
 
 template<typename _Integral>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX14 _Integral
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX14 _Integral
 __algo_gcd(_Integral __x, _Integral __y)
 {
     do
@@ -103,7 +103,7 @@ __algo_gcd(_Integral __x, _Integral __y)
 }
 
 template <class _AlgPolicy, typename _RandomAccessIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX14 _RandomAccessIterator
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX14 _RandomAccessIterator
 __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last)
 {
     typedef typename iterator_traits<_RandomAccessIterator>::
diff erence_type 
diff erence_type;
@@ -117,7 +117,7 @@ __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
         std::__swap_ranges<_AlgPolicy>(__first, __middle, __middle, __last);
         return __middle;
     }
-    const 
diff erence_type __g = _VSTD::__algo_gcd(__m1, __m2);
+    const 
diff erence_type __g = _CUDA_VSTD::__algo_gcd(__m1, __m2);
     for (_RandomAccessIterator __p = __first + __g; __p != __first;)
     {
         value_type __t(_Ops::__iter_move(--__p));
@@ -133,16 +133,16 @@ __rotate_gcd(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ran
             else
                 __p2 = __first + (__m1 - __d);
         } while (__p2 != __p);
-        *__p1 = _VSTD::move(__t);
+        *__p1 = _CUDA_VSTD::move(__t);
     }
     return __first + __m2;
 }
 
 template <class _AlgPolicy, class _ForwardIterator>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _ForwardIterator
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _ForwardIterator
 __rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
-         _VSTD::forward_iterator_tag)
+         _CUDA_VSTD::forward_iterator_tag)
 {
     typedef typename iterator_traits<_ForwardIterator>::value_type value_type;
     if (is_trivially_move_assignable<value_type>::value)
@@ -154,8 +154,8 @@ __rotate_impl(_ForwardIterator __first, _ForwardIterator __middle, _ForwardItera
 }
 
 template <class _AlgPolicy, class _BidirectionalIterator>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _BidirectionalIterator
 __rotate_impl(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last,
          bidirectional_iterator_tag)
 {
@@ -171,8 +171,8 @@ __rotate_impl(_BidirectionalIterator __first, _BidirectionalIterator __middle, _
 }
 
 template <class _AlgPolicy, class _RandomAccessIterator>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
 __rotate_impl(_RandomAccessIterator __first, _RandomAccessIterator __middle, _RandomAccessIterator __last,
          random_access_iterator_tag)
 {
@@ -189,7 +189,7 @@ __rotate_impl(_RandomAccessIterator __first, _RandomAccessIterator __middle, _Ra
 }
 
 template <class _AlgPolicy, class _Iterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_Iterator, _Iterator>
 __rotate(_Iterator __first, _Iterator __middle, _Sentinel __last) {
   using _Ret = pair<_Iterator, _Iterator>;
@@ -208,14 +208,14 @@ __rotate(_Iterator __first, _Iterator __middle, _Sentinel __last) {
 }
 
 template <class _ForwardIterator>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last)
 {
   return std::__rotate<_ClassicAlgPolicy>(
       std::move(__first), std::move(__middle), std::move(__last)).first;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_ROTATE_H
+#endif // _LIBCUDACXX___ALGORITHM_ROTATE_H

diff  --git a/libcxx/include/__algorithm/rotate_copy.h b/libcxx/include/__algorithm/rotate_copy.h
index ab569ef7c6be..dfab8f2fdf5e 100644
--- a/libcxx/include/__algorithm/rotate_copy.h
+++ b/libcxx/include/__algorithm/rotate_copy.h
@@ -6,26 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_ROTATE_COPY_H
-#define _LIBCPP___ALGORITHM_ROTATE_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_ROTATE_COPY_H
+#define _LIBCUDACXX___ALGORITHM_ROTATE_COPY_H
 
 #include <__algorithm/copy.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _ForwardIterator, class _OutputIterator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 rotate_copy(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, _OutputIterator __result)
 {
-    return _VSTD::copy(__first, __middle, _VSTD::copy(__middle, __last, __result));
+    return _CUDA_VSTD::copy(__first, __middle, _CUDA_VSTD::copy(__middle, __last, __result));
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_ROTATE_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_ROTATE_COPY_H

diff  --git a/libcxx/include/__algorithm/sample.h b/libcxx/include/__algorithm/sample.h
index f403ba612580..00cf1049d53a 100644
--- a/libcxx/include/__algorithm/sample.h
+++ b/libcxx/include/__algorithm/sample.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SAMPLE_H
-#define _LIBCPP___ALGORITHM_SAMPLE_H
+#ifndef _LIBCUDACXX___ALGORITHM_SAMPLE_H
+#define _LIBCUDACXX___ALGORITHM_SAMPLE_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/min.h>
@@ -19,19 +19,19 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy,
           class _PopulationIterator, class _PopulationSentinel, class _SampleIterator, class _Distance,
           class _UniformRandomNumberGenerator>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _SampleIterator __sample(_PopulationIterator __first,
                          _PopulationSentinel __last, _SampleIterator __output_iter,
                          _Distance __n,
@@ -47,20 +47,20 @@ _SampleIterator __sample(_PopulationIterator __first,
     if (__r < __sz)
       __output_iter[__r] = *__first;
   }
-  return __output_iter + _VSTD::min(__n, __k);
+  return __output_iter + _CUDA_VSTD::min(__n, __k);
 }
 
 template <class _AlgPolicy,
           class _PopulationIterator, class _PopulationSentinel, class _SampleIterator, class _Distance,
           class _UniformRandomNumberGenerator>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _SampleIterator __sample(_PopulationIterator __first,
                          _PopulationSentinel __last, _SampleIterator __output_iter,
                          _Distance __n,
                          _UniformRandomNumberGenerator& __g,
                          forward_iterator_tag) {
   _Distance __unsampled_sz = _IterOps<_AlgPolicy>::distance(__first, __last);
-  for (__n = _VSTD::min(__n, __unsampled_sz); __n != 0; ++__first) {
+  for (__n = _CUDA_VSTD::min(__n, __unsampled_sz); __n != 0; ++__first) {
     _Distance __r = uniform_int_distribution<_Distance>(0, --__unsampled_sz)(__g);
     if (__r < __n) {
       *__output_iter++ = *__first;
@@ -73,11 +73,11 @@ _SampleIterator __sample(_PopulationIterator __first,
 template <class _AlgPolicy,
           class _PopulationIterator, class _PopulationSentinel, class _SampleIterator, class _Distance,
           class _UniformRandomNumberGenerator>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _SampleIterator __sample(_PopulationIterator __first,
                          _PopulationSentinel __last, _SampleIterator __output_iter,
                          _Distance __n, _UniformRandomNumberGenerator& __g) {
-  _LIBCPP_ASSERT(__n >= 0, "N must be a positive number.");
+  _LIBCUDACXX_ASSERT(__n >= 0, "N must be a positive number.");
 
   using _PopIterCategory = typename _IterOps<_AlgPolicy>::template __iterator_category<_PopulationIterator>;
   using _Difference = typename _IterOps<_AlgPolicy>::template __
diff erence_type<_PopulationIterator>;
@@ -88,10 +88,10 @@ _SampleIterator __sample(_PopulationIterator __first,
       __g, _PopIterCategory());
 }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _PopulationIterator, class _SampleIterator, class _Distance,
           class _UniformRandomNumberGenerator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _SampleIterator sample(_PopulationIterator __first,
                        _PopulationIterator __last, _SampleIterator __output_iter,
                        _Distance __n, _UniformRandomNumberGenerator&& __g) {
@@ -103,10 +103,10 @@ _SampleIterator sample(_PopulationIterator __first,
       std::move(__first), std::move(__last), std::move(__output_iter), __n, __g);
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___ALGORITHM_SAMPLE_H
+#endif // _LIBCUDACXX___ALGORITHM_SAMPLE_H

diff  --git a/libcxx/include/__algorithm/search.h b/libcxx/include/__algorithm/search.h
index 4ead6cac82b7..7e18ec0dcea0 100644
--- a/libcxx/include/__algorithm/search.h
+++ b/libcxx/include/__algorithm/search.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SEARCH_H
-#define _LIBCPP___ALGORITHM_SEARCH_H
+#ifndef _LIBCUDACXX___ALGORITHM_SEARCH_H
+#define _LIBCUDACXX___ALGORITHM_SEARCH_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/iterator_operations.h>
@@ -21,11 +21,11 @@
 #include <__utility/pair.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy,
           class _Iter1, class _Sent1,
@@ -33,7 +33,7 @@ template <class _AlgPolicy,
           class _Pred,
           class _Proj1,
           class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_Iter1, _Iter1> __search_forward_impl(_Iter1 __first1, _Sent1 __last1,
                                            _Iter2 __first2, _Sent2 __last2,
                                            _Pred& __pred,
@@ -80,7 +80,7 @@ template <class _AlgPolicy,
           class _Proj2,
           class _DiffT1,
           class _DiffT2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_Iter1, _Iter1> __search_random_access_impl(_Iter1 __first1, _Sent1 __last1,
                                                  _Iter2 __first2, _Sent2 __last2,
                                                  _Pred& __pred,
@@ -120,7 +120,7 @@ template <class _Iter1, class _Sent1,
           class _Pred,
           class _Proj1,
           class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_Iter1, _Iter1> __search_impl(_Iter1 __first1, _Sent1 __last1,
                                    _Iter2 __first2, _Sent2 __last2,
                                    _Pred& __pred,
@@ -152,7 +152,7 @@ template <class _Iter1, class _Sent1,
           class _Pred,
           class _Proj1,
           class _Proj2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_Iter1, _Iter1> __search_impl(_Iter1 __first1, _Sent1 __last1,
                                    _Iter2 __first2, _Sent2 __last2,
                                    _Pred& __pred,
@@ -170,7 +170,7 @@ pair<_Iter1, _Iter1> __search_impl(_Iter1 __first1, _Sent1 __last1,
 }
 
 template <class _ForwardIterator1, class _ForwardIterator2, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
                          _ForwardIterator2 __first2, _ForwardIterator2 __last2,
                          _BinaryPredicate __pred) {
@@ -181,7 +181,7 @@ _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
 }
 
 template <class _ForwardIterator1, class _ForwardIterator2>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
                          _ForwardIterator2 __first2, _ForwardIterator2 __last2) {
   using __v1 = typename iterator_traits<_ForwardIterator1>::value_type;
@@ -189,15 +189,15 @@ _ForwardIterator1 search(_ForwardIterator1 __first1, _ForwardIterator1 __last1,
   return std::search(__first1, __last1, __first2, __last2, __equal_to<__v1, __v2>());
 }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _ForwardIterator, class _Searcher>
-_LIBCPP_NODISCARD_EXT _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher& __s) {
   return __s(__f, __l).first;
 }
 
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SEARCH_H
+#endif // _LIBCUDACXX___ALGORITHM_SEARCH_H

diff  --git a/libcxx/include/__algorithm/search_n.h b/libcxx/include/__algorithm/search_n.h
index ccb8e845f5b1..8b70586d9c33 100644
--- a/libcxx/include/__algorithm/search_n.h
+++ b/libcxx/include/__algorithm/search_n.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SEARCH_N_H
-#define _LIBCPP___ALGORITHM_SEARCH_N_H
+#ifndef _LIBCUDACXX___ALGORITHM_SEARCH_N_H
+#define _LIBCUDACXX___ALGORITHM_SEARCH_N_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/iterator_operations.h>
@@ -22,14 +22,14 @@
 #include <__utility/pair.h>
 #include <type_traits>  // __convert_to_integral
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Pred, class _Iter, class _Sent, class _SizeT, class _Type, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_Iter, _Iter> __search_n_forward_impl(_Iter __first, _Sent __last,
                                            _SizeT __count,
                                            const _Type& __value,
@@ -71,7 +71,7 @@ pair<_Iter, _Iter> __search_n_forward_impl(_Iter __first, _Sent __last,
 }
 
 template <class _AlgPolicy, class _Pred, class _Iter, class _Sent, class _SizeT, class _Type, class _Proj, class _DiffT>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 std::pair<_Iter, _Iter> __search_n_random_access_impl(_Iter __first, _Sent __last,
                                                       _SizeT __count,
                                                       const _Type& __value,
@@ -122,7 +122,7 @@ template <class _Iter, class _Sent,
           class _Type,
           class _Pred,
           class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_Iter, _Iter> __search_n_impl(_Iter __first, _Sent __last,
                                    _DiffT __count,
                                    const _Type& __value,
@@ -142,7 +142,7 @@ template <class _Iter1, class _Sent1,
           class _Type,
           class _Pred,
           class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<_Iter1, _Iter1> __search_n_impl(_Iter1 __first, _Sent1 __last,
                                      _DiffT __count,
                                      const _Type& __value,
@@ -158,7 +158,7 @@ pair<_Iter1, _Iter1> __search_n_impl(_Iter1 __first, _Sent1 __last,
 }
 
 template <class _ForwardIterator, class _Size, class _Tp, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last,
                           _Size __count,
                           const _Tp& __value,
@@ -170,12 +170,12 @@ _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last,
 }
 
 template <class _ForwardIterator, class _Size, class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator search_n(_ForwardIterator __first, _ForwardIterator __last, _Size __count, const _Tp& __value) {
   typedef typename iterator_traits<_ForwardIterator>::value_type __v;
   return std::search_n(__first, __last, std::__convert_to_integral(__count), __value, __equal_to<__v, _Tp>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SEARCH_N_H
+#endif // _LIBCUDACXX___ALGORITHM_SEARCH_N_H

diff  --git a/libcxx/include/__algorithm/set_
diff erence.h b/libcxx/include/__algorithm/set_
diff erence.h
index 4378bd5304d9..aa8a318bb638 100644
--- a/libcxx/include/__algorithm/set_
diff erence.h
+++ b/libcxx/include/__algorithm/set_
diff erence.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SET_DIFFERENCE_H
-#define _LIBCPP___ALGORITHM_SET_DIFFERENCE_H
+#ifndef _LIBCUDACXX___ALGORITHM_SET_DIFFERENCE_H
+#define _LIBCUDACXX___ALGORITHM_SET_DIFFERENCE_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -20,14 +20,14 @@
 #include <__utility/pair.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template < class _Comp, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 pair<__uncvref_t<_InIter1>, __uncvref_t<_OutIter> >
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pair<__uncvref_t<_InIter1>, __uncvref_t<_OutIter> >
 __set_
diff erence(
     _InIter1&& __first1, _Sent1&& __last1, _InIter2&& __first2, _Sent2&& __last2, _OutIter&& __result, _Comp&& __comp) {
   while (__first1 != __last1 && __first2 != __last2) {
@@ -46,7 +46,7 @@ __set_
diff erence(
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_
diff erence(
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator set_
diff erence(
     _InputIterator1 __first1,
     _InputIterator1 __last1,
     _InputIterator2 __first2,
@@ -58,7 +58,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_d
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_
diff erence(
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator set_
diff erence(
     _InputIterator1 __first1,
     _InputIterator1 __last1,
     _InputIterator2 __first2,
@@ -74,6 +74,6 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_d
              typename iterator_traits<_InputIterator2>::value_type>()).second;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SET_DIFFERENCE_H
+#endif // _LIBCUDACXX___ALGORITHM_SET_DIFFERENCE_H

diff  --git a/libcxx/include/__algorithm/set_intersection.h b/libcxx/include/__algorithm/set_intersection.h
index 77cc83738d1f..8b75df0b6d05 100644
--- a/libcxx/include/__algorithm/set_intersection.h
+++ b/libcxx/include/__algorithm/set_intersection.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SET_INTERSECTION_H
-#define _LIBCPP___ALGORITHM_SET_INTERSECTION_H
+#ifndef _LIBCUDACXX___ALGORITHM_SET_INTERSECTION_H
+#define _LIBCUDACXX___ALGORITHM_SET_INTERSECTION_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -17,11 +17,11 @@
 #include <__iterator/next.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InIter1, class _InIter2, class _OutIter>
 struct __set_intersection_result {
@@ -30,13 +30,13 @@ struct __set_intersection_result {
   _OutIter __out_;
 
   // need a constructor as C++03 aggregate init is hard
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
   __set_intersection_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
       : __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
 };
 
 template <class _AlgPolicy, class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_intersection_result<_InIter1, _InIter2, _OutIter>
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __set_intersection_result<_InIter1, _InIter2, _OutIter>
 __set_intersection(
     _InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
   while (__first1 != __last1 && __first2 != __last2) {
@@ -59,7 +59,7 @@ __set_intersection(
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_intersection(
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator set_intersection(
     _InputIterator1 __first1,
     _InputIterator1 __last1,
     _InputIterator2 __first2,
@@ -78,7 +78,7 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_i
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_intersection(
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator set_intersection(
     _InputIterator1 __first1,
     _InputIterator1 __last1,
     _InputIterator2 __first2,
@@ -95,6 +95,6 @@ inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_i
       .__out_;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SET_INTERSECTION_H
+#endif // _LIBCUDACXX___ALGORITHM_SET_INTERSECTION_H

diff  --git a/libcxx/include/__algorithm/set_symmetric_
diff erence.h b/libcxx/include/__algorithm/set_symmetric_
diff erence.h
index cd532ab5800d..c6d1542b28db 100644
--- a/libcxx/include/__algorithm/set_symmetric_
diff erence.h
+++ b/libcxx/include/__algorithm/set_symmetric_
diff erence.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H
-#define _LIBCPP___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H
+#ifndef _LIBCUDACXX___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H
+#define _LIBCUDACXX___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -16,11 +16,11 @@
 #include <__iterator/iterator_traits.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InIter1, class _InIter2, class _OutIter>
 struct __set_symmetric_
diff erence_result {
@@ -29,13 +29,13 @@ struct __set_symmetric_
diff erence_result {
   _OutIter __out_;
 
   // need a constructor as C++03 aggregate init is hard
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
   __set_symmetric_
diff erence_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
       : __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
 };
 
 template <class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_symmetric_
diff erence_result<_InIter1, _InIter2, _OutIter>
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __set_symmetric_
diff erence_result<_InIter1, _InIter2, _OutIter>
 __set_symmetric_
diff erence(
     _InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
   while (__first1 != __last1) {
@@ -64,7 +64,7 @@ __set_symmetric_
diff erence(
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetric_
diff erence(
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetric_
diff erence(
     _InputIterator1 __first1,
     _InputIterator1 __last1,
     _InputIterator2 __first2,
@@ -83,7 +83,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetri
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetric_
diff erence(
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetric_
diff erence(
     _InputIterator1 __first1,
     _InputIterator1 __last1,
     _InputIterator2 __first2,
@@ -99,6 +99,6 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_symmetri
              typename iterator_traits<_InputIterator2>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H
+#endif // _LIBCUDACXX___ALGORITHM_SET_SYMMETRIC_DIFFERENCE_H

diff  --git a/libcxx/include/__algorithm/set_union.h b/libcxx/include/__algorithm/set_union.h
index 3bd437980161..5b510de4919c 100644
--- a/libcxx/include/__algorithm/set_union.h
+++ b/libcxx/include/__algorithm/set_union.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SET_UNION_H
-#define _LIBCPP___ALGORITHM_SET_UNION_H
+#ifndef _LIBCUDACXX___ALGORITHM_SET_UNION_H
+#define _LIBCUDACXX___ALGORITHM_SET_UNION_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -16,11 +16,11 @@
 #include <__iterator/iterator_traits.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InIter1, class _InIter2, class _OutIter>
 struct __set_union_result {
@@ -29,13 +29,13 @@ struct __set_union_result {
   _OutIter __out_;
 
   // need a constructor as C++03 aggregate init is hard
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
   __set_union_result(_InIter1&& __in_iter1, _InIter2&& __in_iter2, _OutIter&& __out_iter)
       : __in1_(std::move(__in_iter1)), __in2_(std::move(__in_iter2)), __out_(std::move(__out_iter)) {}
 };
 
 template <class _Compare, class _InIter1, class _Sent1, class _InIter2, class _Sent2, class _OutIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_union_result<_InIter1, _InIter2, _OutIter> __set_union(
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __set_union_result<_InIter1, _InIter2, _OutIter> __set_union(
     _InIter1 __first1, _Sent1 __last1, _InIter2 __first2, _Sent2 __last2, _OutIter __result, _Compare&& __comp) {
   for (; __first1 != __last1; ++__result) {
     if (__first2 == __last2) {
@@ -60,7 +60,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 __set_union_result<_InIter1,
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _Compare>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
     _InputIterator1 __first1,
     _InputIterator1 __last1,
     _InputIterator2 __first2,
@@ -79,7 +79,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
     _InputIterator1 __first1,
     _InputIterator1 __last1,
     _InputIterator2 __first2,
@@ -95,6 +95,6 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator set_union(
              typename iterator_traits<_InputIterator2>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SET_UNION_H
+#endif // _LIBCUDACXX___ALGORITHM_SET_UNION_H

diff  --git a/libcxx/include/__algorithm/shift_left.h b/libcxx/include/__algorithm/shift_left.h
index 33f06d57e23a..f68b10b7059b 100644
--- a/libcxx/include/__algorithm/shift_left.h
+++ b/libcxx/include/__algorithm/shift_left.h
@@ -6,24 +6,24 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SHIFT_LEFT_H
-#define _LIBCPP___ALGORITHM_SHIFT_LEFT_H
+#ifndef _LIBCUDACXX___ALGORITHM_SHIFT_LEFT_H
+#define _LIBCUDACXX___ALGORITHM_SHIFT_LEFT_H
 
 #include <__algorithm/move.h>
 #include <__config>
 #include <__iterator/iterator_traits.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _ForwardIterator>
-inline _LIBCPP_INLINE_VISIBILITY constexpr
+inline _LIBCUDACXX_INLINE_VISIBILITY constexpr
 _ForwardIterator
 shift_left(_ForwardIterator __first, _ForwardIterator __last,
            typename iterator_traits<_ForwardIterator>::
diff erence_type __n)
@@ -46,11 +46,11 @@ shift_left(_ForwardIterator __first, _ForwardIterator __last,
             ++__m;
         }
     }
-    return _VSTD::move(__m, __last, __first);
+    return _CUDA_VSTD::move(__m, __last, __first);
 }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SHIFT_LEFT_H
+#endif // _LIBCUDACXX___ALGORITHM_SHIFT_LEFT_H

diff  --git a/libcxx/include/__algorithm/shift_right.h b/libcxx/include/__algorithm/shift_right.h
index 14bc761598b2..444fbc26ff59 100644
--- a/libcxx/include/__algorithm/shift_right.h
+++ b/libcxx/include/__algorithm/shift_right.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SHIFT_RIGHT_H
-#define _LIBCPP___ALGORITHM_SHIFT_RIGHT_H
+#ifndef _LIBCUDACXX___ALGORITHM_SHIFT_RIGHT_H
+#define _LIBCUDACXX___ALGORITHM_SHIFT_RIGHT_H
 
 #include <__algorithm/move.h>
 #include <__algorithm/move_backward.h>
@@ -17,16 +17,16 @@
 #include <__utility/swap.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _ForwardIterator>
-inline _LIBCPP_INLINE_VISIBILITY constexpr
+inline _LIBCUDACXX_INLINE_VISIBILITY constexpr
 _ForwardIterator
 shift_right(_ForwardIterator __first, _ForwardIterator __last,
             typename iterator_traits<_ForwardIterator>::
diff erence_type __n)
@@ -41,7 +41,7 @@ shift_right(_ForwardIterator __first, _ForwardIterator __last,
             return __last;
         }
         _ForwardIterator __m = __first + (__d - __n);
-        return _VSTD::move_backward(__first, __m, __last);
+        return _CUDA_VSTD::move_backward(__first, __m, __last);
     } else if constexpr (__is_cpp17_bidirectional_iterator<_ForwardIterator>::value) {
         _ForwardIterator __m = __last;
         for (; __n > 0; --__n) {
@@ -50,7 +50,7 @@ shift_right(_ForwardIterator __first, _ForwardIterator __last,
             }
             --__m;
         }
-        return _VSTD::move_backward(__first, __m, __last);
+        return _CUDA_VSTD::move_backward(__first, __m, __last);
     } else {
         _ForwardIterator __ret = __first;
         for (; __n > 0; --__n) {
@@ -70,7 +70,7 @@ shift_right(_ForwardIterator __first, _ForwardIterator __last,
         auto __lead = __ret;
         while (__trail != __ret) {
             if (__lead == __last) {
-                _VSTD::move(__first, __trail, __ret);
+                _CUDA_VSTD::move(__first, __trail, __ret);
                 return __ret;
             }
             ++__trail;
@@ -80,8 +80,8 @@ shift_right(_ForwardIterator __first, _ForwardIterator __last,
         _ForwardIterator __mid = __first;
         while (true) {
             if (__lead == __last) {
-                __trail = _VSTD::move(__mid, __ret, __trail);
-                _VSTD::move(__first, __mid, __trail);
+                __trail = _CUDA_VSTD::move(__mid, __ret, __trail);
+                _CUDA_VSTD::move(__first, __mid, __trail);
                 return __ret;
             }
             swap(*__mid, *__trail);
@@ -95,8 +95,8 @@ shift_right(_ForwardIterator __first, _ForwardIterator __last,
     }
 }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SHIFT_RIGHT_H
+#endif // _LIBCUDACXX___ALGORITHM_SHIFT_RIGHT_H

diff  --git a/libcxx/include/__algorithm/shuffle.h b/libcxx/include/__algorithm/shuffle.h
index e32c6a7608ba..2946977081a5 100644
--- a/libcxx/include/__algorithm/shuffle.h
+++ b/libcxx/include/__algorithm/shuffle.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SHUFFLE_H
-#define _LIBCPP___ALGORITHM_SHUFFLE_H
+#ifndef _LIBCUDACXX___ALGORITHM_SHUFFLE_H
+#define _LIBCUDACXX___ALGORITHM_SHUFFLE_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__config>
@@ -19,18 +19,18 @@
 #include <cstddef>
 #include <cstdint>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS __libcpp_debug_randomizer {
+class _LIBCUDACXX_TYPE_VIS __LIBCUDACXX_debug_randomizer {
 public:
-  __libcpp_debug_randomizer() {
+  __LIBCUDACXX_debug_randomizer() {
     __state = __seed();
     __inc = __state + 0xda3e39cb94b95bdbULL;
     __inc = (__inc << 1) | 1;
@@ -40,21 +40,21 @@ class _LIBCPP_TYPE_VIS __libcpp_debug_randomizer {
   static const result_type _Min = 0;
   static const result_type _Max = 0xFFFFFFFF;
 
-  _LIBCPP_HIDE_FROM_ABI result_type operator()() {
+  _LIBCUDACXX_HIDE_FROM_ABI result_type operator()() {
     uint_fast64_t __oldstate = __state;
     __state = __oldstate * 6364136223846793005ULL + __inc;
     return __oldstate >> 32;
   }
 
-  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type min() { return _Min; }
-  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR result_type max() { return _Max; }
+  static _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR result_type min() { return _Min; }
+  static _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR result_type max() { return _Max; }
 
 private:
   uint_fast64_t __state;
   uint_fast64_t __inc;
-  _LIBCPP_HIDE_FROM_ABI static uint_fast64_t __seed() {
-#ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED
-    return _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED;
+  _LIBCUDACXX_HIDE_FROM_ABI static uint_fast64_t __seed() {
+#ifdef _LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED
+    return _LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY_SEED;
 #else
     static char __x;
     return reinterpret_cast<uintptr_t>(&__x);
@@ -62,13 +62,13 @@ class _LIBCPP_TYPE_VIS __libcpp_debug_randomizer {
   }
 };
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) \
-  || defined(_LIBCPP_BUILDING_LIBRARY)
-class _LIBCPP_TYPE_VIS __rs_default;
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) \
+  || defined(_LIBCUDACXX_BUILDING_LIBRARY)
+class _LIBCUDACXX_TYPE_VIS __rs_default;
 
-_LIBCPP_FUNC_VIS __rs_default __rs_get();
+_LIBCUDACXX_FUNC_VIS __rs_default __rs_get();
 
-class _LIBCPP_TYPE_VIS __rs_default
+class _LIBCUDACXX_TYPE_VIS __rs_default
 {
     static unsigned __c_;
 
@@ -84,16 +84,16 @@ class _LIBCPP_TYPE_VIS __rs_default
 
     result_type operator()();
 
-    static _LIBCPP_CONSTEXPR result_type min() {return _Min;}
-    static _LIBCPP_CONSTEXPR result_type max() {return _Max;}
+    static _LIBCUDACXX_CONSTEXPR result_type min() {return _Min;}
+    static _LIBCUDACXX_CONSTEXPR result_type max() {return _Max;}
 
-    friend _LIBCPP_FUNC_VIS __rs_default __rs_get();
+    friend _LIBCUDACXX_FUNC_VIS __rs_default __rs_get();
 };
 
-_LIBCPP_FUNC_VIS __rs_default __rs_get();
+_LIBCUDACXX_FUNC_VIS __rs_default __rs_get();
 
 template <class _RandomAccessIterator>
-_LIBCPP_DEPRECATED_IN_CXX14 void
+_LIBCUDACXX_DEPRECATED_IN_CXX14 void
 random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
     typedef typename iterator_traits<_RandomAccessIterator>::
diff erence_type 
diff erence_type;
@@ -114,9 +114,9 @@ random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last)
 }
 
 template <class _RandomAccessIterator, class _RandomNumberGenerator>
-_LIBCPP_DEPRECATED_IN_CXX14 void
+_LIBCUDACXX_DEPRECATED_IN_CXX14 void
 random_shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
                _RandomNumberGenerator&& __rand)
 #else
                _RandomNumberGenerator& __rand)
@@ -167,8 +167,8 @@ void shuffle(_RandomAccessIterator __first, _RandomAccessIterator __last,
       std::move(__first), std::move(__last), std::forward<_UniformRandomNumberGenerator>(__g));
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___ALGORITHM_SHUFFLE_H
+#endif // _LIBCUDACXX___ALGORITHM_SHUFFLE_H

diff  --git a/libcxx/include/__algorithm/sift_down.h b/libcxx/include/__algorithm/sift_down.h
index 06811239f84f..72063b25ed93 100644
--- a/libcxx/include/__algorithm/sift_down.h
+++ b/libcxx/include/__algorithm/sift_down.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SIFT_DOWN_H
-#define _LIBCPP___ALGORITHM_SIFT_DOWN_H
+#ifndef _LIBCUDACXX___ALGORITHM_SIFT_DOWN_H
+#define _LIBCUDACXX___ALGORITHM_SIFT_DOWN_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__assert>
@@ -15,14 +15,14 @@
 #include <__iterator/iterator_traits.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 void
 __sift_down(_RandomAccessIterator __first, _Compare&& __comp,
             typename iterator_traits<_RandomAccessIterator>::
diff erence_type __len,
             _RandomAccessIterator __start)
@@ -74,16 +74,16 @@ __sift_down(_RandomAccessIterator __first, _Compare&& __comp,
 
         // check if we are in heap-order
     } while (!__comp(*__child_i, __top));
-    *__start = _VSTD::move(__top);
+    *__start = _CUDA_VSTD::move(__top);
 }
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _RandomAccessIterator
 __floyd_sift_down(_RandomAccessIterator __first, _Compare&& __comp,
                   typename iterator_traits<_RandomAccessIterator>::
diff erence_type __len)
 {
     using 
diff erence_type = typename iterator_traits<_RandomAccessIterator>::
diff erence_type;
-    _LIBCPP_ASSERT(__len >= 2, "shouldn't be called unless __len >= 2");
+    _LIBCUDACXX_ASSERT(__len >= 2, "shouldn't be called unless __len >= 2");
 
     _RandomAccessIterator __hole = __first;
     _RandomAccessIterator __child_i = __first;
@@ -109,6 +109,6 @@ __floyd_sift_down(_RandomAccessIterator __first, _Compare&& __comp,
     }
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SIFT_DOWN_H
+#endif // _LIBCUDACXX___ALGORITHM_SIFT_DOWN_H

diff  --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h
index 1ca2f1b81712..219fa41f6dc5 100644
--- a/libcxx/include/__algorithm/sort.h
+++ b/libcxx/include/__algorithm/sort.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SORT_H
-#define _LIBCPP___ALGORITHM_SORT_H
+#ifndef _LIBCUDACXX___ALGORITHM_SORT_H
+#define _LIBCUDACXX___ALGORITHM_SORT_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -25,11 +25,11 @@
 #include <climits>
 #include <memory>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Wraps an algorithm policy tag and a comparator in a single struct, used to pass the policy tag around without
 // changing the number of template arguments (to keep the ABI stable). This is only used for the "range" policy tag.
@@ -43,7 +43,7 @@ struct _WrapAlgPolicy {
   using _Comp = _CompT;
   _Comp& __comp;
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   _WrapAlgPolicy(_Comp& __c) : __comp(__c) {}
 };
 
@@ -62,7 +62,7 @@ struct _UnwrapAlgPolicy {
   using _AlgPolicy = _ClassicAlgPolicy;
   using _Comp = _CompT;
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 static
   _Comp __get_comp(_Comp __comp) { return __comp; }
 };
 
@@ -73,14 +73,14 @@ struct _UnwrapAlgPolicy<_WrapAlgPolicy<_Ts...> > {
   using _AlgPolicy = typename _Wrapped::_AlgPolicy;
   using _Comp = typename _Wrapped::_Comp;
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 static
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 static
   _Comp __get_comp(_Wrapped& __w) { return __w.__comp; }
 };
 
 // stable, 2-3 compares, 0-2 swaps
 
 template <class _AlgPolicy, class _Compare, class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 unsigned __sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z,
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 unsigned __sort3(_ForwardIterator __x, _ForwardIterator __y, _ForwardIterator __z,
                                                _Compare __c) {
   using _Ops = _IterOps<_AlgPolicy>;
 
@@ -141,7 +141,7 @@ unsigned __sort4(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator
 // stable, 4-10 compares, 0-9 swaps
 
 template <class _WrappedComp, class _ForwardIterator>
-_LIBCPP_HIDDEN unsigned __sort5(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
+_LIBCUDACXX_HIDDEN unsigned __sort5(_ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3,
                                 _ForwardIterator __x4, _ForwardIterator __x5, _WrappedComp __wrapped_comp) {
   using _Unwrap = _UnwrapAlgPolicy<_WrappedComp>;
   using _AlgPolicy = typename _Unwrap::_AlgPolicy;
@@ -171,7 +171,7 @@ _LIBCPP_HIDDEN unsigned __sort5(_ForwardIterator __x1, _ForwardIterator __x2, _F
 }
 
 template <class _AlgPolicy, class _Compare, class _ForwardIterator>
-_LIBCPP_HIDDEN unsigned __sort5_wrap_policy(
+_LIBCUDACXX_HIDDEN unsigned __sort5_wrap_policy(
     _ForwardIterator __x1, _ForwardIterator __x2, _ForwardIterator __x3, _ForwardIterator __x4, _ForwardIterator __x5,
     _Compare __c) {
   using _WrappedComp = typename _WrapAlgPolicy<_AlgPolicy, _Compare>::type;
@@ -189,7 +189,7 @@ template <class _Tp>
 struct __is_simple_comparator<less<_Tp>&> : true_type {};
 template <class _Tp>
 struct __is_simple_comparator<greater<_Tp>&> : true_type {};
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <>
 struct __is_simple_comparator<ranges::less&> : true_type {};
 template <>
@@ -203,7 +203,7 @@ using __use_branchless_sort =
 
 // Ensures that __c(*__x, *__y) is true by swapping *__x and *__y if necessary.
 template <class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI void __cond_swap(_RandomAccessIterator __x, _RandomAccessIterator __y, _Compare __c) {
+inline _LIBCUDACXX_HIDE_FROM_ABI void __cond_swap(_RandomAccessIterator __x, _RandomAccessIterator __y, _Compare __c) {
   // Note: this function behaves correctly even with proxy iterators (because it relies on `value_type`).
   using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
   bool __r = __c(*__x, *__y);
@@ -215,7 +215,7 @@ inline _LIBCPP_HIDE_FROM_ABI void __cond_swap(_RandomAccessIterator __x, _Random
 // Ensures that *__x, *__y and *__z are ordered according to the comparator __c,
 // under the assumption that *__y and *__z are already ordered.
 template <class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI void __partially_sorted_swap(_RandomAccessIterator __x, _RandomAccessIterator __y,
+inline _LIBCUDACXX_HIDE_FROM_ABI void __partially_sorted_swap(_RandomAccessIterator __x, _RandomAccessIterator __y,
                                                           _RandomAccessIterator __z, _Compare __c) {
   // Note: this function behaves correctly even with proxy iterators (because it relies on `value_type`).
   using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
@@ -228,52 +228,52 @@ inline _LIBCPP_HIDE_FROM_ABI void __partially_sorted_swap(_RandomAccessIterator
 }
 
 template <class, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
+inline _LIBCUDACXX_HIDE_FROM_ABI __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
 __sort3_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
                          _Compare __c) {
-  _VSTD::__cond_swap<_Compare>(__x2, __x3, __c);
-  _VSTD::__partially_sorted_swap<_Compare>(__x1, __x2, __x3, __c);
+  _CUDA_VSTD::__cond_swap<_Compare>(__x2, __x3, __c);
+  _CUDA_VSTD::__partially_sorted_swap<_Compare>(__x1, __x2, __x3, __c);
 }
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
+inline _LIBCUDACXX_HIDE_FROM_ABI __enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
 __sort3_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
                          _Compare __c) {
   std::__sort3<_AlgPolicy, _Compare>(__x1, __x2, __x3, __c);
 }
 
 template <class, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
+inline _LIBCUDACXX_HIDE_FROM_ABI __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
 __sort4_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
                          _RandomAccessIterator __x4, _Compare __c) {
-  _VSTD::__cond_swap<_Compare>(__x1, __x3, __c);
-  _VSTD::__cond_swap<_Compare>(__x2, __x4, __c);
-  _VSTD::__cond_swap<_Compare>(__x1, __x2, __c);
-  _VSTD::__cond_swap<_Compare>(__x3, __x4, __c);
-  _VSTD::__cond_swap<_Compare>(__x2, __x3, __c);
+  _CUDA_VSTD::__cond_swap<_Compare>(__x1, __x3, __c);
+  _CUDA_VSTD::__cond_swap<_Compare>(__x2, __x4, __c);
+  _CUDA_VSTD::__cond_swap<_Compare>(__x1, __x2, __c);
+  _CUDA_VSTD::__cond_swap<_Compare>(__x3, __x4, __c);
+  _CUDA_VSTD::__cond_swap<_Compare>(__x2, __x3, __c);
 }
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
+inline _LIBCUDACXX_HIDE_FROM_ABI __enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
 __sort4_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
                          _RandomAccessIterator __x4, _Compare __c) {
   std::__sort4<_AlgPolicy, _Compare>(__x1, __x2, __x3, __x4, __c);
 }
 
 template <class, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
+inline _LIBCUDACXX_HIDE_FROM_ABI __enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
 __sort5_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
                          _RandomAccessIterator __x4, _RandomAccessIterator __x5, _Compare __c) {
-  _VSTD::__cond_swap<_Compare>(__x1, __x2, __c);
-  _VSTD::__cond_swap<_Compare>(__x4, __x5, __c);
-  _VSTD::__partially_sorted_swap<_Compare>(__x3, __x4, __x5, __c);
-  _VSTD::__cond_swap<_Compare>(__x2, __x5, __c);
-  _VSTD::__partially_sorted_swap<_Compare>(__x1, __x3, __x4, __c);
-  _VSTD::__partially_sorted_swap<_Compare>(__x2, __x3, __x4, __c);
+  _CUDA_VSTD::__cond_swap<_Compare>(__x1, __x2, __c);
+  _CUDA_VSTD::__cond_swap<_Compare>(__x4, __x5, __c);
+  _CUDA_VSTD::__partially_sorted_swap<_Compare>(__x3, __x4, __x5, __c);
+  _CUDA_VSTD::__cond_swap<_Compare>(__x2, __x5, __c);
+  _CUDA_VSTD::__partially_sorted_swap<_Compare>(__x1, __x3, __x4, __c);
+  _CUDA_VSTD::__partially_sorted_swap<_Compare>(__x2, __x3, __x4, __c);
 }
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI __enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
+inline _LIBCUDACXX_HIDE_FROM_ABI __enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>::value, void>
 __sort5_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3,
                          _RandomAccessIterator __x4, _RandomAccessIterator __x5, _Compare __c) {
   std::__sort5_wrap_policy<_AlgPolicy, _Compare>(__x1, __x2, __x3, __x4, __x5, __c);
@@ -281,7 +281,7 @@ __sort5_maybe_branchless(_RandomAccessIterator __x1, _RandomAccessIterator __x2,
 
 // Assumes size > 0
 template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 void __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last,
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 void __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last,
                                                     _Compare __comp) {
   _BidirectionalIterator __lm1 = __last;
   for (--__lm1; __first != __lm1; ++__first) {
@@ -303,7 +303,7 @@ void __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __l
       value_type __t(_Ops::__iter_move(__j));
       for (_BidirectionalIterator __k = __i; __k != __first && __comp(__t, *--__k); --__j)
         *__j = _Ops::__iter_move(__k);
-      *__j = _VSTD::move(__t);
+      *__j = _CUDA_VSTD::move(__t);
     }
   }
 }
@@ -325,7 +325,7 @@ void __insertion_sort_3(_RandomAccessIterator __first, _RandomAccessIterator __l
         *__j = _Ops::__iter_move(__k);
         __j = __k;
       } while (__j != __first && __comp(__t, *--__k));
-      *__j = _VSTD::move(__t);
+      *__j = _CUDA_VSTD::move(__t);
     }
     __j = __i;
   }
@@ -377,7 +377,7 @@ bool __insertion_sort_incomplete(
         *__j = _Ops::__iter_move(__k);
         __j = __k;
       } while (__j != __first && __comp(__t, *--__k));
-      *__j = _VSTD::move(__t);
+      *__j = _CUDA_VSTD::move(__t);
       if (++__count == __limit)
         return ++__i == __last;
     }
@@ -526,7 +526,7 @@ void __introsort(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
           }
           // [__first, __i) == *__first and *__first < [__i, __last)
           // The first part is sorted, sort the second part
-          // _VSTD::__sort<_Compare>(__i, __last, __comp);
+          // _CUDA_VSTD::__sort<_Compare>(__i, __last, __comp);
           __first = __i;
           goto __restart;
         }
@@ -597,15 +597,15 @@ void __introsort(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
 }
 
 template <typename _Number>
-inline _LIBCPP_HIDE_FROM_ABI _Number __log2i(_Number __n) {
+inline _LIBCUDACXX_HIDE_FROM_ABI _Number __log2i(_Number __n) {
   if (__n == 0)
     return 0;
   if (sizeof(__n) <= sizeof(unsigned))
-    return sizeof(unsigned) * CHAR_BIT - 1 - __libcpp_clz(static_cast<unsigned>(__n));
+    return sizeof(unsigned) * CHAR_BIT - 1 - __LIBCUDACXX_clz(static_cast<unsigned>(__n));
   if (sizeof(__n) <= sizeof(unsigned long))
-    return sizeof(unsigned long) * CHAR_BIT - 1 - __libcpp_clz(static_cast<unsigned long>(__n));
+    return sizeof(unsigned long) * CHAR_BIT - 1 - __LIBCUDACXX_clz(static_cast<unsigned long>(__n));
   if (sizeof(__n) <= sizeof(unsigned long long))
-    return sizeof(unsigned long long) * CHAR_BIT - 1 - __libcpp_clz(static_cast<unsigned long long>(__n));
+    return sizeof(unsigned long long) * CHAR_BIT - 1 - __LIBCUDACXX_clz(static_cast<unsigned long long>(__n));
 
   _Number __log2 = 0;
   while (__n > 1) {
@@ -628,56 +628,56 @@ void __sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Wrappe
 }
 
 template <class _Compare, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY void __sort(_Tp** __first, _Tp** __last, __less<_Tp*>&) {
+inline _LIBCUDACXX_INLINE_VISIBILITY void __sort(_Tp** __first, _Tp** __last, __less<_Tp*>&) {
   __less<uintptr_t> __comp;
   std::__sort<__less<uintptr_t>&, uintptr_t*>((uintptr_t*)__first, (uintptr_t*)__last, __comp);
 }
 
-extern template _LIBCPP_FUNC_VIS void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template _LIBCPP_FUNC_VIS void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
 #endif
-extern template _LIBCPP_FUNC_VIS void __sort<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<unsigned char>&, unsigned char*>(unsigned char*, unsigned char*, __less<unsigned char>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<short>&, short*>(short*, short*, __less<short>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, __less<unsigned short>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<int>&, int*>(int*, int*, __less<int>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<unsigned>&, unsigned*>(unsigned*, unsigned*, __less<unsigned>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<long>&, long*>(long*, long*, __less<long>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<unsigned long>&, unsigned long*>(unsigned long*, unsigned long*, __less<unsigned long>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<long long>&, long long*>(long long*, long long*, __less<long long>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<unsigned long long>&, unsigned long long*>(unsigned long long*, unsigned long long*, __less<unsigned long long>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<float>&, float*>(float*, float*, __less<float>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<double>&, double*>(double*, double*, __less<double>&);
-extern template _LIBCPP_FUNC_VIS void __sort<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
-
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<char>&, char*>(char*, char*, __less<char>&);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<unsigned char>&, unsigned char*>(unsigned char*, unsigned char*, __less<unsigned char>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<short>&, short*>(short*, short*, __less<short>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, __less<unsigned short>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<int>&, int*>(int*, int*, __less<int>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<unsigned>&, unsigned*>(unsigned*, unsigned*, __less<unsigned>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<long>&, long*>(long*, long*, __less<long>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<unsigned long>&, unsigned long*>(unsigned long*, unsigned long*, __less<unsigned long>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<long long>&, long long*>(long long*, long long*, __less<long long>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<unsigned long long>&, unsigned long long*>(unsigned long long*, unsigned long long*, __less<unsigned long long>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<float>&, float*>(float*, float*, __less<float>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<double>&, double*>(double*, double*, __less<double>&);
+extern template _LIBCUDACXX_FUNC_VIS void __sort<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
+
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<char>&, char*>(char*, char*, __less<char>&);
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
 #endif
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<unsigned char>&, unsigned char*>(unsigned char*, unsigned char*, __less<unsigned char>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<short>&, short*>(short*, short*, __less<short>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, __less<unsigned short>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<int>&, int*>(int*, int*, __less<int>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<unsigned>&, unsigned*>(unsigned*, unsigned*, __less<unsigned>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<long>&, long*>(long*, long*, __less<long>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<unsigned long>&, unsigned long*>(unsigned long*, unsigned long*, __less<unsigned long>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<long long>&, long long*>(long long*, long long*, __less<long long>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<unsigned long long>&, unsigned long long*>(unsigned long long*, unsigned long long*, __less<unsigned long long>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<float>&, float*>(float*, float*, __less<float>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<double>&, double*>(double*, double*, __less<double>&);
-extern template _LIBCPP_FUNC_VIS bool __insertion_sort_incomplete<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
-
-extern template _LIBCPP_FUNC_VIS unsigned __sort5<__less<long double>&, long double*>(long double*, long double*, long double*, long double*, long double*, __less<long double>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<unsigned char>&, unsigned char*>(unsigned char*, unsigned char*, __less<unsigned char>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<short>&, short*>(short*, short*, __less<short>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<unsigned short>&, unsigned short*>(unsigned short*, unsigned short*, __less<unsigned short>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<int>&, int*>(int*, int*, __less<int>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<unsigned>&, unsigned*>(unsigned*, unsigned*, __less<unsigned>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<long>&, long*>(long*, long*, __less<long>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<unsigned long>&, unsigned long*>(unsigned long*, unsigned long*, __less<unsigned long>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<long long>&, long long*>(long long*, long long*, __less<long long>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<unsigned long long>&, unsigned long long*>(unsigned long long*, unsigned long long*, __less<unsigned long long>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<float>&, float*>(float*, float*, __less<float>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<double>&, double*>(double*, double*, __less<double>&);
+extern template _LIBCUDACXX_FUNC_VIS bool __insertion_sort_incomplete<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
+
+extern template _LIBCUDACXX_FUNC_VIS unsigned __sort5<__less<long double>&, long double*>(long double*, long double*, long double*, long double*, long double*, __less<long double>&);
 
 template <class _AlgPolicy, class _RandomAccessIterator, class _Comp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void __sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
   std::__debug_randomize_range<_AlgPolicy>(__first, __last);
 
   using _Comp_ref = typename __comp_ref_type<_Comp>::type;
-  if (__libcpp_is_constant_evaluated()) {
+  if (__LIBCUDACXX_is_constant_evaluated()) {
     std::__partial_sort<_AlgPolicy>(__first, __last, __last, __comp);
 
   } else {
@@ -689,17 +689,17 @@ void __sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
 }
 
 template <class _RandomAccessIterator, class _Comp>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
   std::__sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
 }
 
 template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) {
   std::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SORT_H
+#endif // _LIBCUDACXX___ALGORITHM_SORT_H

diff  --git a/libcxx/include/__algorithm/sort_heap.h b/libcxx/include/__algorithm/sort_heap.h
index 7713b766f913..0c927ed961c9 100644
--- a/libcxx/include/__algorithm/sort_heap.h
+++ b/libcxx/include/__algorithm/sort_heap.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SORT_HEAP_H
-#define _LIBCPP___ALGORITHM_SORT_HEAP_H
+#ifndef _LIBCUDACXX___ALGORITHM_SORT_HEAP_H
+#define _LIBCUDACXX___ALGORITHM_SORT_HEAP_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -18,14 +18,14 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare&& __comp) {
   using _CompRef = typename __comp_ref_type<_Compare>::type;
   _CompRef __comp_ref = __comp;
@@ -36,7 +36,7 @@ void __sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _C
 }
 
 template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
   static_assert(std::is_copy_constructible<_RandomAccessIterator>::value, "Iterators must be copy constructible.");
   static_assert(std::is_copy_assignable<_RandomAccessIterator>::value, "Iterators must be copy assignable.");
@@ -45,12 +45,12 @@ void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, _Com
 }
 
 template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) {
   std::sort_heap(std::move(__first), std::move(__last),
       __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SORT_HEAP_H
+#endif // _LIBCUDACXX___ALGORITHM_SORT_HEAP_H

diff  --git a/libcxx/include/__algorithm/stable_partition.h b/libcxx/include/__algorithm/stable_partition.h
index c7aa3f07a88c..04f45027623a 100644
--- a/libcxx/include/__algorithm/stable_partition.h
+++ b/libcxx/include/__algorithm/stable_partition.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_STABLE_PARTITION_H
-#define _LIBCPP___ALGORITHM_STABLE_PARTITION_H
+#ifndef _LIBCUDACXX___ALGORITHM_STABLE_PARTITION_H
+#define _LIBCUDACXX___ALGORITHM_STABLE_PARTITION_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__algorithm/rotate.h>
@@ -18,11 +18,11 @@
 #include <memory>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Predicate, class _ForwardIterator, class _Distance, class _Pair>
 _ForwardIterator
@@ -138,9 +138,9 @@ __stable_partition_impl(_ForwardIterator __first, _ForwardIterator __last, _Pred
     if (__len >= __alloc_limit)
     {
 // TODO: Remove the use of std::get_temporary_buffer
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
-        __p = _VSTD::get_temporary_buffer<value_type>(__len);
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
+        __p = _CUDA_VSTD::get_temporary_buffer<value_type>(__len);
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
         __h.reset(__p.first);
     }
     return std::__stable_partition_impl<_AlgPolicy, _Predicate&>(
@@ -292,9 +292,9 @@ __stable_partition_impl(_BidirectionalIterator __first, _BidirectionalIterator _
     if (__len >= __alloc_limit)
     {
 // TODO: Remove the use of std::get_temporary_buffer
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
-        __p = _VSTD::get_temporary_buffer<value_type>(__len);
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
+        __p = _CUDA_VSTD::get_temporary_buffer<value_type>(__len);
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
         __h.reset(__p.first);
     }
     return std::__stable_partition_impl<_AlgPolicy, _Predicate&>(
@@ -302,7 +302,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
 }
 
 template <class _AlgPolicy, class _Predicate, class _ForwardIterator, class _IterCategory>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 _ForwardIterator __stable_partition(
     _ForwardIterator __first, _ForwardIterator __last, _Predicate&& __pred, _IterCategory __iter_category) {
   return std::__stable_partition_impl<_AlgPolicy, __uncvref_t<_Predicate>&>(
@@ -310,7 +310,7 @@ _ForwardIterator __stable_partition(
 }
 
 template <class _ForwardIterator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _ForwardIterator
 stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate __pred)
 {
@@ -319,6 +319,6 @@ stable_partition(_ForwardIterator __first, _ForwardIterator __last, _Predicate _
       std::move(__first), std::move(__last), __pred, _IterCategory());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_STABLE_PARTITION_H
+#endif // _LIBCUDACXX___ALGORITHM_STABLE_PARTITION_H

diff  --git a/libcxx/include/__algorithm/stable_sort.h b/libcxx/include/__algorithm/stable_sort.h
index fb149eeb65dc..6b1adb4c2695 100644
--- a/libcxx/include/__algorithm/stable_sort.h
+++ b/libcxx/include/__algorithm/stable_sort.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_STABLE_SORT_H
-#define _LIBCPP___ALGORITHM_STABLE_SORT_H
+#ifndef _LIBCUDACXX___ALGORITHM_STABLE_SORT_H
+#define _LIBCUDACXX___ALGORITHM_STABLE_SORT_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/comp_ref_type.h>
@@ -20,11 +20,11 @@
 #include <memory>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare, class _InputIterator1, class _InputIterator2>
 void
@@ -194,7 +194,7 @@ __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp
         __d.__set(__len, (value_type*)nullptr);
         std::__merge_move_assign<_AlgPolicy, _Compare>(
             __buff, __buff + __l2, __buff + __l2, __buff + __len, __first, __comp);
-//         _VSTD::__merge<_Compare>(move_iterator<value_type*>(__buff),
+//         _CUDA_VSTD::__merge<_Compare>(move_iterator<value_type*>(__buff),
 //                                  move_iterator<value_type*>(__buff + __l2),
 //                                  move_iterator<_RandomAccessIterator>(__buff + __l2),
 //                                  move_iterator<_RandomAccessIterator>(__buff + __len),
@@ -207,7 +207,7 @@ __stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp
 }
 
 template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 void __stable_sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare& __comp) {
   using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
   using 
diff erence_type = typename iterator_traits<_RandomAccessIterator>::
diff erence_type;
@@ -217,9 +217,9 @@ void __stable_sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __l
   unique_ptr<value_type, __return_temporary_buffer> __h;
   if (__len > static_cast<
diff erence_type>(__stable_sort_switch<value_type>::value)) {
 // TODO: Remove the use of std::get_temporary_buffer
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
       __buf = std::get_temporary_buffer<value_type>(__len);
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
       __h.reset(__buf.first);
   }
 
@@ -228,17 +228,17 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
 }
 
 template <class _RandomAccessIterator, class _Compare>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
   std::__stable_sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
 }
 
 template <class _RandomAccessIterator>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 void stable_sort(_RandomAccessIterator __first, _RandomAccessIterator __last) {
   std::stable_sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_STABLE_SORT_H
+#endif // _LIBCUDACXX___ALGORITHM_STABLE_SORT_H

diff  --git a/libcxx/include/__algorithm/swap_ranges.h b/libcxx/include/__algorithm/swap_ranges.h
index 0cff519a8da9..52346fe6d56c 100644
--- a/libcxx/include/__algorithm/swap_ranges.h
+++ b/libcxx/include/__algorithm/swap_ranges.h
@@ -6,23 +6,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_SWAP_RANGES_H
-#define _LIBCPP___ALGORITHM_SWAP_RANGES_H
+#ifndef _LIBCUDACXX___ALGORITHM_SWAP_RANGES_H
+#define _LIBCUDACXX___ALGORITHM_SWAP_RANGES_H
 
 #include <__algorithm/iterator_operations.h>
 #include <__config>
 #include <__utility/move.h>
 #include <__utility/pair.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // 2+2 iterators: the shorter size will be used.
 template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2, class _Sentinel2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 pair<_ForwardIterator1, _ForwardIterator2>
 __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2, _Sentinel2 __last2) {
   while (__first1 != __last1 && __first2 != __last2) {
@@ -36,7 +36,7 @@ __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2
 
 // 2+1 iterators: size2 >= size1.
 template <class _AlgPolicy, class _ForwardIterator1, class _Sentinel1, class _ForwardIterator2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 pair<_ForwardIterator1, _ForwardIterator2>
 __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2 __first2) {
   while (__first1 != __last1) {
@@ -49,12 +49,12 @@ __swap_ranges(_ForwardIterator1 __first1, _Sentinel1 __last1, _ForwardIterator2
 }
 
 template <class _ForwardIterator1, class _ForwardIterator2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator2
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator2
 swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) {
   return std::__swap_ranges<_ClassicAlgPolicy>(
       std::move(__first1), std::move(__last1), std::move(__first2)).second;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_SWAP_RANGES_H
+#endif // _LIBCUDACXX___ALGORITHM_SWAP_RANGES_H

diff  --git a/libcxx/include/__algorithm/transform.h b/libcxx/include/__algorithm/transform.h
index f9db806f5b94..93119322af3c 100644
--- a/libcxx/include/__algorithm/transform.h
+++ b/libcxx/include/__algorithm/transform.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_TRANSFORM_H
-#define _LIBCPP___ALGORITHM_TRANSFORM_H
+#ifndef _LIBCUDACXX___ALGORITHM_TRANSFORM_H
+#define _LIBCUDACXX___ALGORITHM_TRANSFORM_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _OutputIterator, class _UnaryOperation>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 transform(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _UnaryOperation __op)
 {
@@ -28,7 +28,7 @@ transform(_InputIterator __first, _InputIterator __last, _OutputIterator __resul
 }
 
 template <class _InputIterator1, class _InputIterator2, class _OutputIterator, class _BinaryOperation>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 transform(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2,
           _OutputIterator __result, _BinaryOperation __binary_op)
@@ -38,6 +38,6 @@ transform(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __f
     return __result;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_TRANSFORM_H
+#endif // _LIBCUDACXX___ALGORITHM_TRANSFORM_H

diff  --git a/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h b/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h
index 04a67752dd0b..dfb3cac77239 100644
--- a/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h
+++ b/libcxx/include/__algorithm/uniform_random_bit_generator_adaptor.h
@@ -6,23 +6,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_RANGES_UNIFORM_RANDOM_BIT_GENERATOR_ADAPTOR_H
-#define _LIBCPP___ALGORITHM_RANGES_UNIFORM_RANDOM_BIT_GENERATOR_ADAPTOR_H
+#ifndef _LIBCUDACXX___ALGORITHM_RANGES_UNIFORM_RANDOM_BIT_GENERATOR_ADAPTOR_H
+#define _LIBCUDACXX___ALGORITHM_RANGES_UNIFORM_RANDOM_BIT_GENERATOR_ADAPTOR_H
 
 #include <__config>
 #include <__functional/invoke.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Range versions of random algorithms (e.g. `std::shuffle`) are less constrained than their classic counterparts.
 // Range algorithms only require the given generator to satisfy the `std::uniform_random_bit_generator` concept.
@@ -41,22 +41,22 @@ class _ClassicGenAdaptor {
 public:
   using result_type = invoke_result_t<_Gen&>;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static constexpr auto min() { return __uncvref_t<_Gen>::min(); }
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static constexpr auto max() { return __uncvref_t<_Gen>::max(); }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr explicit _ClassicGenAdaptor(_Gen& __g) : __gen(__g) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()() const { return __gen(); }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___ALGORITHM_RANGES_UNIFORM_RANDOM_BIT_GENERATOR_ADAPTOR_H
+#endif // _LIBCUDACXX___ALGORITHM_RANGES_UNIFORM_RANDOM_BIT_GENERATOR_ADAPTOR_H

diff  --git a/libcxx/include/__algorithm/unique.h b/libcxx/include/__algorithm/unique.h
index 1727225a91cd..0c8b00fbfbff 100644
--- a/libcxx/include/__algorithm/unique.h
+++ b/libcxx/include/__algorithm/unique.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_UNIQUE_H
-#define _LIBCPP___ALGORITHM_UNIQUE_H
+#ifndef _LIBCUDACXX___ALGORITHM_UNIQUE_H
+#define _LIBCUDACXX___ALGORITHM_UNIQUE_H
 
 #include <__algorithm/adjacent_find.h>
 #include <__algorithm/comp.h>
@@ -17,16 +17,16 @@
 #include <__utility/move.h>
 #include <__utility/pair.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // unique
 
 template <class _AlgPolicy, class _Iter, class _Sent, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 std::pair<_Iter, _Iter>
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 std::pair<_Iter, _Iter>
 __unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
   __first = std::__adjacent_find(__first, __last, __pred);
   if (__first != __last) {
@@ -43,18 +43,18 @@ __unique(_Iter __first, _Sent __last, _BinaryPredicate&& __pred) {
 }
 
 template <class _ForwardIterator, class _BinaryPredicate>
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred) {
   return std::__unique<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __pred).first;
 }
 
 template <class _ForwardIterator>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 unique(_ForwardIterator __first, _ForwardIterator __last) {
   typedef typename iterator_traits<_ForwardIterator>::value_type __v;
   return std::unique(__first, __last, __equal_to<__v>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_UNIQUE_H
+#endif // _LIBCUDACXX___ALGORITHM_UNIQUE_H

diff  --git a/libcxx/include/__algorithm/unique_copy.h b/libcxx/include/__algorithm/unique_copy.h
index c7c8d8e9d8fd..804573352b81 100644
--- a/libcxx/include/__algorithm/unique_copy.h
+++ b/libcxx/include/__algorithm/unique_copy.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_UNIQUE_COPY_H
-#define _LIBCPP___ALGORITHM_UNIQUE_COPY_H
+#ifndef _LIBCUDACXX___ALGORITHM_UNIQUE_COPY_H
+#define _LIBCUDACXX___ALGORITHM_UNIQUE_COPY_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/iterator_operations.h>
@@ -19,11 +19,11 @@
 #include <__utility/move.h>
 #include <__utility/pair.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace __unique_copy_tags {
 
@@ -34,7 +34,7 @@ struct __read_from_tmp_value_tag {};
 } // namespace __unique_copy_tags
 
 template <class _AlgPolicy, class _BinaryPredicate, class _InputIterator, class _Sent, class _OutputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _OutputIterator>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI pair<_InputIterator, _OutputIterator>
 __unique_copy(_InputIterator __first,
               _Sent __last,
               _OutputIterator __result,
@@ -56,7 +56,7 @@ __unique_copy(_InputIterator __first,
 }
 
 template <class _AlgPolicy, class _BinaryPredicate, class _ForwardIterator, class _Sent, class _OutputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pair<_ForwardIterator, _OutputIterator>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI pair<_ForwardIterator, _OutputIterator>
 __unique_copy(_ForwardIterator __first,
               _Sent __last,
               _OutputIterator __result,
@@ -78,7 +78,7 @@ __unique_copy(_ForwardIterator __first,
 }
 
 template <class _AlgPolicy, class _BinaryPredicate, class _InputIterator, class _Sent, class _InputAndOutputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _InputAndOutputIterator>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI pair<_InputIterator, _InputAndOutputIterator>
 __unique_copy(_InputIterator __first,
               _Sent __last,
               _InputAndOutputIterator __result,
@@ -95,7 +95,7 @@ __unique_copy(_InputIterator __first,
 }
 
 template <class _InputIterator, class _OutputIterator, class _BinaryPredicate>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator
 unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryPredicate __pred) {
   using __algo_tag = typename conditional<
       is_base_of<forward_iterator_tag, typename iterator_traits<_InputIterator>::iterator_category>::value,
@@ -112,12 +112,12 @@ unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __res
 }
 
 template <class _InputIterator, class _OutputIterator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator
 unique_copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
   typedef typename iterator_traits<_InputIterator>::value_type __v;
   return std::unique_copy(std::move(__first), std::move(__last), std::move(__result), __equal_to<__v>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_UNIQUE_COPY_H
+#endif // _LIBCUDACXX___ALGORITHM_UNIQUE_COPY_H

diff  --git a/libcxx/include/__algorithm/unwrap_iter.h b/libcxx/include/__algorithm/unwrap_iter.h
index fa9a8fbf2dde..93f5d8cd6ba2 100644
--- a/libcxx/include/__algorithm/unwrap_iter.h
+++ b/libcxx/include/__algorithm/unwrap_iter.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_UNWRAP_ITER_H
-#define _LIBCPP___ALGORITHM_UNWRAP_ITER_H
+#ifndef _LIBCUDACXX___ALGORITHM_UNWRAP_ITER_H
+#define _LIBCUDACXX___ALGORITHM_UNWRAP_ITER_H
 
 #include <__config>
 #include <__iterator/iterator_traits.h>
@@ -15,11 +15,11 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // TODO: Change the name of __unwrap_iter_impl to something more appropriate
 // The job of __unwrap_iter is to remove iterator wrappers (like reverse_iterator or __wrap_iter),
@@ -32,41 +32,41 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 // Default case - we can't unwrap anything
 template <class _Iter, bool = __is_cpp17_contiguous_iterator<_Iter>::value>
 struct __unwrap_iter_impl {
-  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap(_Iter, _Iter __iter) { return __iter; }
-  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __unwrap(_Iter __i) _NOEXCEPT { return __i; }
+  static _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR _Iter __rewrap(_Iter, _Iter __iter) { return __iter; }
+  static _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR _Iter __unwrap(_Iter __i) _NOEXCEPT { return __i; }
 };
 
-#ifndef _LIBCPP_ENABLE_DEBUG_MODE
+#ifndef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 // It's a contiguous iterator, so we can use a raw pointer instead
 template <class _Iter>
 struct __unwrap_iter_impl<_Iter, true> {
   using _ToAddressT = decltype(std::__to_address(std::declval<_Iter>()));
 
-  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap(_Iter __orig_iter, _ToAddressT __unwrapped_iter) {
+  static _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR _Iter __rewrap(_Iter __orig_iter, _ToAddressT __unwrapped_iter) {
     return __orig_iter + (__unwrapped_iter - std::__to_address(__orig_iter));
   }
 
-  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ToAddressT __unwrap(_Iter __i) _NOEXCEPT {
+  static _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR _ToAddressT __unwrap(_Iter __i) _NOEXCEPT {
     return std::__to_address(__i);
   }
 };
 
-#endif // !_LIBCPP_ENABLE_DEBUG_MODE
+#endif // !_LIBCUDACXX_ENABLE_DEBUG_MODE
 
 template<class _Iter,
          class _Impl = __unwrap_iter_impl<_Iter>,
          __enable_if_t<is_copy_constructible<_Iter>::value, int> = 0>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 decltype(_Impl::__unwrap(std::declval<_Iter>())) __unwrap_iter(_Iter __i) _NOEXCEPT {
   return _Impl::__unwrap(__i);
 }
 
 template <class _OrigIter, class _Iter, class _Impl = __unwrap_iter_impl<_OrigIter> >
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _OrigIter __rewrap_iter(_OrigIter __orig_iter, _Iter __iter) _NOEXCEPT {
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR _OrigIter __rewrap_iter(_OrigIter __orig_iter, _Iter __iter) _NOEXCEPT {
   return _Impl::__rewrap(std::move(__orig_iter), std::move(__iter));
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_UNWRAP_ITER_H
+#endif // _LIBCUDACXX___ALGORITHM_UNWRAP_ITER_H

diff  --git a/libcxx/include/__algorithm/unwrap_range.h b/libcxx/include/__algorithm/unwrap_range.h
index 745906a96e15..e8a07e5155c0 100644
--- a/libcxx/include/__algorithm/unwrap_range.h
+++ b/libcxx/include/__algorithm/unwrap_range.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_UNWRAP_RANGE_H
-#define _LIBCPP___ALGORITHM_UNWRAP_RANGE_H
+#ifndef _LIBCUDACXX___ALGORITHM_UNWRAP_RANGE_H
+#define _LIBCUDACXX___ALGORITHM_UNWRAP_RANGE_H
 
 #include <__algorithm/unwrap_iter.h>
 #include <__concepts/constructible.h>
@@ -18,38 +18,38 @@
 #include <__utility/move.h>
 #include <__utility/pair.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // __unwrap_range and __rewrap_range are used to unwrap ranges which may have 
diff erent iterator and sentinel types.
 // __unwrap_iter and __rewrap_iter don't work for this, because they assume that the iterator and sentinel have
 // the same type. __unwrap_range tries to get two iterators and then forward to __unwrap_iter.
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 template <class _Iter, class _Sent>
 struct __unwrap_range_impl {
-  _LIBCPP_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Sent __sent)
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Sent __sent)
     requires random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>
   {
     auto __last = ranges::next(__first, __sent);
     return pair{std::__unwrap_iter(std::move(__first)), std::__unwrap_iter(std::move(__last))};
   }
 
-  _LIBCPP_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Sent __last) {
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Sent __last) {
     return pair{std::move(__first), std::move(__last)};
   }
 
-  _LIBCPP_HIDE_FROM_ABI static constexpr auto
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
   __rewrap(_Iter __orig_iter, decltype(std::__unwrap_iter(__orig_iter)) __iter)
     requires random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>
   {
     return std::__rewrap_iter(std::move(__orig_iter), std::move(__iter));
   }
 
-  _LIBCPP_HIDE_FROM_ABI static constexpr auto __rewrap(const _Iter&, _Iter __iter)
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto __rewrap(const _Iter&, _Iter __iter)
     requires (!(random_access_iterator<_Iter> && sized_sentinel_for<_Sent, _Iter>))
   {
     return __iter;
@@ -58,18 +58,18 @@ struct __unwrap_range_impl {
 
 template <class _Iter>
 struct __unwrap_range_impl<_Iter, _Iter> {
-  _LIBCPP_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Iter __last) {
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto __unwrap(_Iter __first, _Iter __last) {
     return pair{std::__unwrap_iter(std::move(__first)), std::__unwrap_iter(std::move(__last))};
   }
 
-  _LIBCPP_HIDE_FROM_ABI static constexpr auto
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
   __rewrap(_Iter __orig_iter, decltype(std::__unwrap_iter(__orig_iter)) __iter) {
     return std::__rewrap_iter(std::move(__orig_iter), std::move(__iter));
   }
 };
 
 template <class _Iter, class _Sent>
-_LIBCPP_HIDE_FROM_ABI constexpr auto __unwrap_range(_Iter __first, _Sent __last) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr auto __unwrap_range(_Iter __first, _Sent __last) {
   return __unwrap_range_impl<_Iter, _Sent>::__unwrap(std::move(__first), std::move(__last));
 }
 
@@ -77,21 +77,21 @@ template <
     class _Sent,
     class _Iter,
     class _Unwrapped = decltype(std::__unwrap_range(std::declval<_Iter>(), std::declval<_Sent>()))>
-_LIBCPP_HIDE_FROM_ABI constexpr _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
   return __unwrap_range_impl<_Iter, _Sent>::__rewrap(std::move(__orig_iter), std::move(__iter));
 }
-#else  // _LIBCPP_STD_VER > 17
+#else  // _LIBCUDACXX_STD_VER > 17
 template <class _Iter, class _Unwrapped = decltype(std::__unwrap_iter(std::declval<_Iter>()))>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR pair<_Unwrapped, _Unwrapped> __unwrap_range(_Iter __first, _Iter __last) {
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR pair<_Unwrapped, _Unwrapped> __unwrap_range(_Iter __first, _Iter __last) {
   return std::make_pair(std::__unwrap_iter(std::move(__first)), std::__unwrap_iter(std::move(__last)));
 }
 
 template <class _Iter, class _Unwrapped = decltype(std::__unwrap_iter(std::declval<_Iter>()))>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR _Iter __rewrap_range(_Iter __orig_iter, _Unwrapped __iter) {
   return std::__rewrap_iter(std::move(__orig_iter), std::move(__iter));
 }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_UNWRAP_RANGE_H
+#endif // _LIBCUDACXX___ALGORITHM_UNWRAP_RANGE_H

diff  --git a/libcxx/include/__algorithm/upper_bound.h b/libcxx/include/__algorithm/upper_bound.h
index 1045380bc84e..c7473f51d69f 100644
--- a/libcxx/include/__algorithm/upper_bound.h
+++ b/libcxx/include/__algorithm/upper_bound.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ALGORITHM_UPPER_BOUND_H
-#define _LIBCPP___ALGORITHM_UPPER_BOUND_H
+#ifndef _LIBCUDACXX___ALGORITHM_UPPER_BOUND_H
+#define _LIBCUDACXX___ALGORITHM_UPPER_BOUND_H
 
 #include <__algorithm/comp.h>
 #include <__algorithm/half_positive.h>
@@ -21,14 +21,14 @@
 #include <__type_traits/is_copy_constructible.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Compare, class _Iter, class _Sent, class _Tp, class _Proj>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Iter
 __upper_bound(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp, _Proj&& __proj) {
   auto __len = _IterOps<_AlgPolicy>::distance(__first, __last);
   while (__len != 0) {
@@ -45,7 +45,7 @@ __upper_bound(_Iter __first, _Sent __last, const _Tp& __value, _Compare&& __comp
 }
 
 template <class _ForwardIterator, class _Tp, class _Compare>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, _Compare __comp) {
   static_assert(is_copy_constructible<_ForwardIterator>::value,
                 "Iterator has to be copy constructible");
@@ -54,7 +54,7 @@ upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
 }
 
 template <class _ForwardIterator, class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _ForwardIterator
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _ForwardIterator
 upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) {
   return std::upper_bound(
       std::move(__first),
@@ -63,6 +63,6 @@ upper_bound(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __valu
       __less<_Tp, typename iterator_traits<_ForwardIterator>::value_type>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ALGORITHM_UPPER_BOUND_H
+#endif // _LIBCUDACXX___ALGORITHM_UPPER_BOUND_H

diff  --git a/libcxx/include/__assert b/libcxx/include/__assert
index 87556085eabb..337f9469f370 100644
--- a/libcxx/include/__assert
+++ b/libcxx/include/__assert
@@ -7,53 +7,53 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ASSERT
-#define _LIBCPP___ASSERT
+#ifndef _LIBCUDACXX___ASSERT
+#define _LIBCUDACXX___ASSERT
 
 #include <__config>
 #include <__verbose_abort>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 // This is for backwards compatibility with code that might have been enabling
 // assertions through the Debug mode previously.
-// TODO: In LLVM 16, make it an error to define _LIBCPP_DEBUG
-#if defined(_LIBCPP_DEBUG)
-# ifndef _LIBCPP_ENABLE_ASSERTIONS
-#   define _LIBCPP_ENABLE_ASSERTIONS 1
+// TODO: In LLVM 16, make it an error to define _LIBCUDACXX_DEBUG
+#if defined(_LIBCUDACXX_DEBUG)
+# ifndef _LIBCUDACXX_ENABLE_ASSERTIONS
+#   define _LIBCUDACXX_ENABLE_ASSERTIONS 1
 # endif
 #endif
 
 // Automatically enable assertions when the debug mode is enabled.
-#if defined(_LIBCPP_ENABLE_DEBUG_MODE)
-# ifndef _LIBCPP_ENABLE_ASSERTIONS
-#   define _LIBCPP_ENABLE_ASSERTIONS 1
+#if defined(_LIBCUDACXX_ENABLE_DEBUG_MODE)
+# ifndef _LIBCUDACXX_ENABLE_ASSERTIONS
+#   define _LIBCUDACXX_ENABLE_ASSERTIONS 1
 # endif
 #endif
 
-#ifndef _LIBCPP_ENABLE_ASSERTIONS
-# define _LIBCPP_ENABLE_ASSERTIONS _LIBCPP_ENABLE_ASSERTIONS_DEFAULT
+#ifndef _LIBCUDACXX_ENABLE_ASSERTIONS
+# define _LIBCUDACXX_ENABLE_ASSERTIONS _LIBCUDACXX_ENABLE_ASSERTIONS_DEFAULT
 #endif
 
-#if _LIBCPP_ENABLE_ASSERTIONS != 0 && _LIBCPP_ENABLE_ASSERTIONS != 1
-# error "_LIBCPP_ENABLE_ASSERTIONS must be set to 0 or 1"
+#if _LIBCUDACXX_ENABLE_ASSERTIONS != 0 && _LIBCUDACXX_ENABLE_ASSERTIONS != 1
+# error "_LIBCUDACXX_ENABLE_ASSERTIONS must be set to 0 or 1"
 #endif
 
-#if _LIBCPP_ENABLE_ASSERTIONS
-# define _LIBCPP_ASSERT(expression, message)                                        \
+#if _LIBCUDACXX_ENABLE_ASSERTIONS
+# define _LIBCUDACXX_ASSERT(expression, message)                                        \
     (__builtin_expect(static_cast<bool>(expression), 1) ?                           \
       (void)0 :                                                                     \
-      ::std::__libcpp_verbose_abort("%s:%d: assertion %s failed: %s", __FILE__, __LINE__, #expression, message))
-#elif !defined(_LIBCPP_ASSERTIONS_DISABLE_ASSUME) && __has_builtin(__builtin_assume)
-# define _LIBCPP_ASSERT(expression, message)                                        \
-    (_LIBCPP_DIAGNOSTIC_PUSH                                                        \
-    _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wassume")                                    \
+      ::std::__LIBCUDACXX_verbose_abort("%s:%d: assertion %s failed: %s", __FILE__, __LINE__, #expression, message))
+#elif !defined(_LIBCUDACXX_ASSERTIONS_DISABLE_ASSUME) && __has_builtin(__builtin_assume)
+# define _LIBCUDACXX_ASSERT(expression, message)                                        \
+    (_LIBCUDACXX_DIAGNOSTIC_PUSH                                                        \
+    _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wassume")                                    \
     __builtin_assume(static_cast<bool>(expression))                                 \
-    _LIBCPP_DIAGNOSTIC_POP)
+    _LIBCUDACXX_DIAGNOSTIC_POP)
 #else
-# define _LIBCPP_ASSERT(expression, message) ((void)0)
+# define _LIBCUDACXX_ASSERT(expression, message) ((void)0)
 #endif
 
-#endif // _LIBCPP___ASSERT
+#endif // _LIBCUDACXX___ASSERT

diff  --git a/libcxx/include/__availability b/libcxx/include/__availability
index 72ff663334d3..cfbc18699ada 100644
--- a/libcxx/include/__availability
+++ b/libcxx/include/__availability
@@ -7,12 +7,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___AVAILABILITY
-#define _LIBCPP___AVAILABILITY
+#ifndef _LIBCUDACXX___AVAILABILITY
+#define _LIBCUDACXX___AVAILABILITY
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -59,33 +59,33 @@
 // [1]: https://clang.llvm.org/docs/AttributeReference.html#availability
 
 
-// For backwards compatibility, allow users to define _LIBCPP_DISABLE_AVAILABILITY
+// For backwards compatibility, allow users to define _LIBCUDACXX_DISABLE_AVAILABILITY
 // for a while.
-#if defined(_LIBCPP_DISABLE_AVAILABILITY)
-#   if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
-#       define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
+#if defined(_LIBCUDACXX_DISABLE_AVAILABILITY)
+#   if !defined(_LIBCUDACXX_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
+#       define _LIBCUDACXX_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
 #   endif
 #endif
 
 // Availability markup is disabled when building the library, or when the compiler
 // doesn't support the proper attributes.
-#if defined(_LIBCPP_BUILDING_LIBRARY) ||                                        \
+#if defined(_LIBCUDACXX_BUILDING_LIBRARY) ||                                        \
     defined(_LIBCXXABI_BUILDING_LIBRARY) ||                                     \
     !__has_feature(attribute_availability_with_strict) ||                       \
     !__has_feature(attribute_availability_in_templates) ||                      \
     !__has_extension(pragma_clang_attribute_external_declaration)
-#   if !defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
-#       define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
+#   if !defined(_LIBCUDACXX_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
+#       define _LIBCUDACXX_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
 #   endif
 #endif
 
-#if defined(_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
+#if defined(_LIBCUDACXX_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
 
     // This controls the availability of std::shared_mutex and std::shared_timed_mutex,
     // which were added to the dylib later.
-#   define _LIBCPP_AVAILABILITY_SHARED_MUTEX
-// #   define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex
-// #   define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex
+#   define _LIBCUDACXX_AVAILABILITY_SHARED_MUTEX
+// #   define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex
+// #   define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex
 
     // These macros control the availability of std::bad_optional_access and
     // other exception types. These were put in the shared library to prevent
@@ -95,66 +95,66 @@
     // Note that when exceptions are disabled, the methods that normally throw
     // these exceptions can be used even on older deployment targets, but those
     // methods will abort instead of throwing.
-#   define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
-#   define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS
-#   define _LIBCPP_AVAILABILITY_BAD_ANY_CAST
+#   define _LIBCUDACXX_AVAILABILITY_BAD_OPTIONAL_ACCESS
+#   define _LIBCUDACXX_AVAILABILITY_BAD_VARIANT_ACCESS
+#   define _LIBCUDACXX_AVAILABILITY_BAD_ANY_CAST
 
     // This controls the availability of std::uncaught_exceptions().
-#   define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS
+#   define _LIBCUDACXX_AVAILABILITY_UNCAUGHT_EXCEPTIONS
 
     // This controls the availability of the sized version of ::operator delete,
     // ::operator delete[], and their align_val_t variants, which were all added
     // in C++17, and hence not present in early dylibs.
-#   define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE
+#   define _LIBCUDACXX_AVAILABILITY_SIZED_NEW_DELETE
 
     // This controls the availability of the std::future_error exception.
     //
     // Note that when exceptions are disabled, the methods that normally throw
     // std::future_error can be used even on older deployment targets, but those
     // methods will abort instead of throwing.
-#   define _LIBCPP_AVAILABILITY_FUTURE_ERROR
+#   define _LIBCUDACXX_AVAILABILITY_FUTURE_ERROR
 
     // This controls the availability of std::type_info's vtable.
     // I can't imagine how using std::type_info can work at all if
     // this isn't supported.
-#   define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE
+#   define _LIBCUDACXX_AVAILABILITY_TYPEINFO_VTABLE
 
     // This controls the availability of std::locale::category members
     // (e.g. std::locale::collate), which are defined in the dylib.
-#   define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY
+#   define _LIBCUDACXX_AVAILABILITY_LOCALE_CATEGORY
 
     // This controls the availability of atomic operations on std::shared_ptr
     // (e.g. `std::atomic_store(std::shared_ptr)`), which require a shared
     // lock table located in the dylib.
-#   define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+#   define _LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 
     // These macros control the availability of all parts of <filesystem> that
     // depend on something in the dylib.
-#   define _LIBCPP_AVAILABILITY_FILESYSTEM
-#   define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-#   define _LIBCPP_AVAILABILITY_FILESYSTEM_POP
-// #   define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem
+#   define _LIBCUDACXX_AVAILABILITY_FILESYSTEM
+#   define _LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
+#   define _LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
+// #   define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem
 
     // This controls the availability of floating-point std::to_chars functions.
     // These overloads were added later than the integer overloads.
-#   define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT
+#   define _LIBCUDACXX_AVAILABILITY_TO_CHARS_FLOATING_POINT
 
     // This controls the availability of the C++20 synchronization library,
     // which requires shared library support for various operations
     // (see libcxx/src/atomic.cpp). This includes <barier>, <latch>,
     // <semaphore>, and notification functions on std::atomic.
-#   define _LIBCPP_AVAILABILITY_SYNC
-// #   define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait
-// #   define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier
-// #   define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch
-// #   define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore
+#   define _LIBCUDACXX_AVAILABILITY_SYNC
+// #   define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait
+// #   define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier
+// #   define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch
+// #   define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore
 
     // This controls the availability of the C++20 format library.
     // The library is in development and not ABI stable yet. P2216 is
     // retroactively accepted in C++20. This paper contains ABI breaking
     // changes.
-#   define _LIBCPP_AVAILABILITY_FORMAT
-// #   define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format
+#   define _LIBCUDACXX_AVAILABILITY_FORMAT
+// #   define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format
 
     // This controls whether the default verbose termination function is
     // provided by the library.
@@ -165,16 +165,16 @@
     // (it will think that no function is provided, when in reality the
     // user has provided their own).
     //
-    // Users can pass -D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED
+    // Users can pass -D_LIBCUDACXX_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED
     // to the compiler to tell the library not to define its own verbose abort.
     // Note that defining this macro but failing to define a custom function
     // will lead to a load-time error on back-deployment targets, so it should
     // be avoided.
-// #   define _LIBCPP_HAS_NO_VERBOSE_ABORT_IN_LIBRARY
+// #   define _LIBCUDACXX_HAS_NO_VERBOSE_ABORT_IN_LIBRARY
 
 #elif defined(__APPLE__)
 
-#   define _LIBCPP_AVAILABILITY_SHARED_MUTEX                                    \
+#   define _LIBCUDACXX_AVAILABILITY_SHARED_MUTEX                                    \
         __attribute__((availability(macos,strict,introduced=10.12)))            \
         __attribute__((availability(ios,strict,introduced=10.0)))               \
         __attribute__((availability(tvos,strict,introduced=10.0)))              \
@@ -183,61 +183,61 @@
         (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \
         (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) ||         \
         (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000)
-#       define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex
-#       define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex
+#       define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex
+#       define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex
 #   endif
 
         // Note: bad_optional_access & friends were not introduced in the matching
         // macOS and iOS versions, so the version mismatch between macOS and others
         // is intended.
-#   define _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS                             \
+#   define _LIBCUDACXX_AVAILABILITY_BAD_OPTIONAL_ACCESS                             \
         __attribute__((availability(macos,strict,introduced=10.13)))            \
         __attribute__((availability(ios,strict,introduced=12.0)))               \
         __attribute__((availability(tvos,strict,introduced=12.0)))              \
         __attribute__((availability(watchos,strict,introduced=5.0)))
-#   define _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS                              \
-        _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
-#   define _LIBCPP_AVAILABILITY_BAD_ANY_CAST                                    \
-        _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
+#   define _LIBCUDACXX_AVAILABILITY_BAD_VARIANT_ACCESS                              \
+        _LIBCUDACXX_AVAILABILITY_BAD_OPTIONAL_ACCESS
+#   define _LIBCUDACXX_AVAILABILITY_BAD_ANY_CAST                                    \
+        _LIBCUDACXX_AVAILABILITY_BAD_OPTIONAL_ACCESS
 
-#   define _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS                             \
+#   define _LIBCUDACXX_AVAILABILITY_UNCAUGHT_EXCEPTIONS                             \
         __attribute__((availability(macos,strict,introduced=10.12)))            \
         __attribute__((availability(ios,strict,introduced=10.0)))               \
         __attribute__((availability(tvos,strict,introduced=10.0)))              \
         __attribute__((availability(watchos,strict,introduced=3.0)))
 
-#   define _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE                                \
+#   define _LIBCUDACXX_AVAILABILITY_SIZED_NEW_DELETE                                \
         __attribute__((availability(macos,strict,introduced=10.12)))            \
         __attribute__((availability(ios,strict,introduced=10.0)))               \
         __attribute__((availability(tvos,strict,introduced=10.0)))              \
         __attribute__((availability(watchos,strict,introduced=3.0)))
 
-#   define _LIBCPP_AVAILABILITY_FUTURE_ERROR                                    \
+#   define _LIBCUDACXX_AVAILABILITY_FUTURE_ERROR                                    \
         __attribute__((availability(ios,strict,introduced=6.0)))
 
-#   define _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE                                 \
+#   define _LIBCUDACXX_AVAILABILITY_TYPEINFO_VTABLE                                 \
         __attribute__((availability(macos,strict,introduced=10.9)))             \
         __attribute__((availability(ios,strict,introduced=7.0)))
 
-#   define _LIBCPP_AVAILABILITY_LOCALE_CATEGORY                                 \
+#   define _LIBCUDACXX_AVAILABILITY_LOCALE_CATEGORY                                 \
         __attribute__((availability(macos,strict,introduced=10.9)))             \
         __attribute__((availability(ios,strict,introduced=7.0)))
 
-#   define _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR                               \
+#   define _LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR                               \
         __attribute__((availability(macos,strict,introduced=10.9)))             \
         __attribute__((availability(ios,strict,introduced=7.0)))
 
-#   define _LIBCPP_AVAILABILITY_FILESYSTEM                                      \
+#   define _LIBCUDACXX_AVAILABILITY_FILESYSTEM                                      \
         __attribute__((availability(macos,strict,introduced=10.15)))            \
         __attribute__((availability(ios,strict,introduced=13.0)))               \
         __attribute__((availability(tvos,strict,introduced=13.0)))              \
         __attribute__((availability(watchos,strict,introduced=6.0)))
-#   define _LIBCPP_AVAILABILITY_FILESYSTEM_PUSH                                 \
+#   define _LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH                                 \
         _Pragma("clang attribute push(__attribute__((availability(macos,strict,introduced=10.15))), apply_to=any(function,record))") \
         _Pragma("clang attribute push(__attribute__((availability(ios,strict,introduced=13.0))), apply_to=any(function,record))")    \
         _Pragma("clang attribute push(__attribute__((availability(tvos,strict,introduced=13.0))), apply_to=any(function,record))")   \
         _Pragma("clang attribute push(__attribute__((availability(watchos,strict,introduced=6.0))), apply_to=any(function,record))")
-#   define _LIBCPP_AVAILABILITY_FILESYSTEM_POP                                  \
+#   define _LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP                                  \
         _Pragma("clang attribute pop")                                          \
         _Pragma("clang attribute pop")                                          \
         _Pragma("clang attribute pop")                                          \
@@ -246,13 +246,13 @@
         (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 130000) || \
         (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 130000) ||         \
         (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 60000)
-#       define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem
+#       define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem
 #   endif
 
-#   define _LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT                         \
+#   define _LIBCUDACXX_AVAILABILITY_TO_CHARS_FLOATING_POINT                         \
         __attribute__((unavailable))
 
-#   define _LIBCPP_AVAILABILITY_SYNC                                            \
+#   define _LIBCUDACXX_AVAILABILITY_SYNC                                            \
         __attribute__((availability(macos,strict,introduced=11.0)))             \
         __attribute__((availability(ios,strict,introduced=14.0)))               \
         __attribute__((availability(tvos,strict,introduced=14.0)))              \
@@ -261,17 +261,17 @@
         (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 140000) || \
         (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 140000) ||         \
         (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 70000)
-#       define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait
-#       define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier
-#       define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch
-#       define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore
+#       define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait
+#       define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier
+#       define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch
+#       define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore
 #   endif
 
-#   define _LIBCPP_AVAILABILITY_FORMAT                                          \
+#   define _LIBCUDACXX_AVAILABILITY_FORMAT                                          \
         __attribute__((unavailable))
-#   define _LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format
+#   define _LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format
 
-#   define _LIBCPP_HAS_NO_VERBOSE_ABORT_IN_LIBRARY
+#   define _LIBCUDACXX_HAS_NO_VERBOSE_ABORT_IN_LIBRARY
 
 #else
 
@@ -281,19 +281,19 @@
 
 #endif
 
-// Define availability attributes that depend on _LIBCPP_NO_EXCEPTIONS.
+// Define availability attributes that depend on _LIBCUDACXX_NO_EXCEPTIONS.
 // Those are defined in terms of the availability attributes above, and
 // should not be vendor-specific.
-#if defined(_LIBCPP_NO_EXCEPTIONS)
-#   define _LIBCPP_AVAILABILITY_FUTURE
-#   define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
-#   define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
-#   define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+#if defined(_LIBCUDACXX_NO_EXCEPTIONS)
+#   define _LIBCUDACXX_AVAILABILITY_FUTURE
+#   define _LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST
+#   define _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+#   define _LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 #else
-#   define _LIBCPP_AVAILABILITY_FUTURE                    _LIBCPP_AVAILABILITY_FUTURE_ERROR
-#   define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST        _LIBCPP_AVAILABILITY_BAD_ANY_CAST
-#   define _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS
-#   define _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS  _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS
+#   define _LIBCUDACXX_AVAILABILITY_FUTURE                    _LIBCUDACXX_AVAILABILITY_FUTURE_ERROR
+#   define _LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST        _LIBCUDACXX_AVAILABILITY_BAD_ANY_CAST
+#   define _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS _LIBCUDACXX_AVAILABILITY_BAD_OPTIONAL_ACCESS
+#   define _LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS  _LIBCUDACXX_AVAILABILITY_BAD_VARIANT_ACCESS
 #endif
 
-#endif // _LIBCPP___AVAILABILITY
+#endif // _LIBCUDACXX___AVAILABILITY

diff  --git a/libcxx/include/__bit/bit_cast.h b/libcxx/include/__bit/bit_cast.h
index 831207671ec9..00afcd48ded4 100644
--- a/libcxx/include/__bit/bit_cast.h
+++ b/libcxx/include/__bit/bit_cast.h
@@ -7,30 +7,30 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___BIT_BIT_CAST_H
-#define _LIBCPP___BIT_BIT_CAST_H
+#ifndef _LIBCUDACXX___BIT_BIT_CAST_H
+#define _LIBCUDACXX___BIT_BIT_CAST_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _ToType, class _FromType>
   requires(sizeof(_ToType) == sizeof(_FromType) &&
            is_trivially_copyable_v<_ToType> &&
            is_trivially_copyable_v<_FromType>)
-_LIBCPP_NODISCARD_EXT _LIBCPP_HIDE_FROM_ABI constexpr _ToType bit_cast(const _FromType& __from) noexcept {
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_HIDE_FROM_ABI constexpr _ToType bit_cast(const _FromType& __from) noexcept {
   return __builtin_bit_cast(_ToType, __from);
 }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___BIT_BIT_CAST_H
+#endif // _LIBCUDACXX___BIT_BIT_CAST_H

diff  --git a/libcxx/include/__bit/byteswap.h b/libcxx/include/__bit/byteswap.h
index 6fa8d48bafa4..7beee0752b72 100644
--- a/libcxx/include/__bit/byteswap.h
+++ b/libcxx/include/__bit/byteswap.h
@@ -7,24 +7,24 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___BIT_BYTESWAP_H
-#define _LIBCPP___BIT_BYTESWAP_H
+#ifndef _LIBCUDACXX___BIT_BYTESWAP_H
+#define _LIBCUDACXX___BIT_BYTESWAP_H
 
 #include <__concepts/arithmetic.h>
 #include <__config>
 #include <cstdint>
 #include <cstdlib>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 
 template <integral _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp byteswap(_Tp __val) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp byteswap(_Tp __val) noexcept {
 
   if constexpr (sizeof(_Tp) == 1) {
     return __val;
@@ -34,7 +34,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Tp byteswap(_Tp __val) noexcept {
     return __builtin_bswap32(__val);
   } else if constexpr (sizeof(_Tp) == 8) {
     return __builtin_bswap64(__val);
-#ifndef _LIBCPP_HAS_NO_INT128
+#ifndef _LIBCUDACXX_HAS_NO_INT128
   } else if constexpr (sizeof(_Tp) == 16) {
 #if __has_builtin(__builtin_bswap128)
     return __builtin_bswap128(__val);
@@ -42,14 +42,14 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Tp byteswap(_Tp __val) noexcept {
     return static_cast<_Tp>(byteswap(static_cast<uint64_t>(__val))) << 64 |
            static_cast<_Tp>(byteswap(static_cast<uint64_t>(__val >> 64)));
 #endif // __has_builtin(__builtin_bswap128)
-#endif // _LIBCPP_HAS_NO_INT128
+#endif // _LIBCUDACXX_HAS_NO_INT128
   } else {
     static_assert(sizeof(_Tp) == 0, "byteswap is unimplemented for integral types of this size");
   }
 }
 
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___BIT_BYTESWAP_H
+#endif // _LIBCUDACXX___BIT_BYTESWAP_H

diff  --git a/libcxx/include/__bit_reference b/libcxx/include/__bit_reference
index 60f57d665a1c..106a884cec84 100644
--- a/libcxx/include/__bit_reference
+++ b/libcxx/include/__bit_reference
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___BIT_REFERENCE
-#define _LIBCPP___BIT_REFERENCE
+#ifndef _LIBCUDACXX___BIT_REFERENCE
+#define _LIBCUDACXX___BIT_REFERENCE
 
 #include <__algorithm/copy_n.h>
 #include <__algorithm/fill_n.h>
@@ -21,15 +21,15 @@
 #include <cstring>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Cp, bool _IsConst, typename _Cp::__storage_type = 0> class __bit_iterator;
 template <class _Cp> class __bit_const_reference;
@@ -54,15 +54,15 @@ class __bit_reference
     friend class __bit_const_reference<_Cp>;
     friend class __bit_iterator<_Cp, false>;
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __bit_reference(const __bit_reference&) = default;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 operator bool() const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 operator bool() const _NOEXCEPT
         {return static_cast<bool>(*__seg_ & __mask_);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 bool operator ~() const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool operator ~() const _NOEXCEPT
         {return !static_cast<bool>(*this);}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __bit_reference& operator=(bool __x) _NOEXCEPT
     {
         if (__x)
@@ -72,8 +72,8 @@ public:
         return *this;
     }
 
-#if _LIBCPP_STD_VER > 20
-    _LIBCPP_HIDE_FROM_ABI constexpr const __bit_reference& operator=(bool __x) const noexcept {
+#if _LIBCUDACXX_STD_VER > 20
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr const __bit_reference& operator=(bool __x) const noexcept {
         if (__x)
             *__seg_ |= __mask_;
         else
@@ -82,15 +82,15 @@ public:
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __bit_reference& operator=(const __bit_reference& __x) _NOEXCEPT
         {return operator=(static_cast<bool>(__x));}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void flip() _NOEXCEPT {*__seg_ ^= __mask_;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false> operator&() const _NOEXCEPT
-        {return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void flip() _NOEXCEPT {*__seg_ ^= __mask_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false> operator&() const _NOEXCEPT
+        {return __bit_iterator<_Cp, false>(__seg_, static_cast<unsigned>(__LIBCUDACXX_ctz(__mask_)));}
 private:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     explicit __bit_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
         : __seg_(__s), __mask_(__m) {}
 };
@@ -101,7 +101,7 @@ class __bit_reference<_Cp, false>
 };
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT
 {
@@ -111,7 +111,7 @@ swap(__bit_reference<_Cp> __x, __bit_reference<_Cp> __y) _NOEXCEPT
 }
 
 template <class _Cp, class _Dp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT
 {
@@ -121,7 +121,7 @@ swap(__bit_reference<_Cp> __x, __bit_reference<_Dp> __y) _NOEXCEPT
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT
 {
@@ -131,7 +131,7 @@ swap(__bit_reference<_Cp> __x, bool& __y) _NOEXCEPT
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 swap(bool& __x, __bit_reference<_Cp> __y) _NOEXCEPT
 {
@@ -152,21 +152,21 @@ class __bit_const_reference
     friend typename _Cp::__self;
     friend class __bit_iterator<_Cp, true>;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __bit_const_reference(const __bit_const_reference&) = default;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __bit_const_reference(const __bit_reference<_Cp>& __x) _NOEXCEPT
         : __seg_(__x.__seg_), __mask_(__x.__mask_) {}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR operator bool() const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR operator bool() const _NOEXCEPT
         {return static_cast<bool>(*__seg_ & __mask_);}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, true> operator&() const _NOEXCEPT
-        {return __bit_iterator<_Cp, true>(__seg_, static_cast<unsigned>(__libcpp_ctz(__mask_)));}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, true> operator&() const _NOEXCEPT
+        {return __bit_iterator<_Cp, true>(__seg_, static_cast<unsigned>(__LIBCUDACXX_ctz(__mask_)));}
 private:
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR
     explicit __bit_const_reference(__storage_pointer __s, __storage_type __m) _NOEXCEPT
         : __seg_(__s), __mask_(__m) {}
 
@@ -176,7 +176,7 @@ private:
 // find
 
 template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, _IsConst>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, _IsConst>
 __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
 {
     typedef __bit_iterator<_Cp, _IsConst> _It;
@@ -186,11 +186,11 @@ __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
     if (__first.__ctz_ != 0)
     {
         __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
-        __storage_type __dn = _VSTD::min(__clz_f, __n);
+        __storage_type __dn = _CUDA_VSTD::min(__clz_f, __n);
         __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
         __storage_type __b = *__first.__seg_ & __m;
         if (__b)
-            return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
+            return _It(__first.__seg_, static_cast<unsigned>(_CUDA_VSTD::__LIBCUDACXX_ctz(__b)));
         if (__n == __dn)
             return __first + __n;
         __n -= __dn;
@@ -199,20 +199,20 @@ __find_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
     // do middle whole words
     for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
         if (*__first.__seg_)
-            return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(*__first.__seg_)));
+            return _It(__first.__seg_, static_cast<unsigned>(_CUDA_VSTD::__LIBCUDACXX_ctz(*__first.__seg_)));
     // do last partial word
     if (__n > 0)
     {
         __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
         __storage_type __b = *__first.__seg_ & __m;
         if (__b)
-            return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
+            return _It(__first.__seg_, static_cast<unsigned>(_CUDA_VSTD::__LIBCUDACXX_ctz(__b)));
     }
     return _It(__first.__seg_, static_cast<unsigned>(__n));
 }
 
 template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, _IsConst>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, _IsConst>
 __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type __n)
 {
     typedef __bit_iterator<_Cp, _IsConst> _It;
@@ -222,11 +222,11 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
     if (__first.__ctz_ != 0)
     {
         __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
-        __storage_type __dn = _VSTD::min(__clz_f, __n);
+        __storage_type __dn = _CUDA_VSTD::min(__clz_f, __n);
         __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
         __storage_type __b = ~*__first.__seg_ & __m;
         if (__b)
-            return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
+            return _It(__first.__seg_, static_cast<unsigned>(_CUDA_VSTD::__LIBCUDACXX_ctz(__b)));
         if (__n == __dn)
             return __first + __n;
         __n -= __dn;
@@ -237,7 +237,7 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
     {
         __storage_type __b = ~*__first.__seg_;
         if (__b)
-            return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
+            return _It(__first.__seg_, static_cast<unsigned>(_CUDA_VSTD::__LIBCUDACXX_ctz(__b)));
     }
     // do last partial word
     if (__n > 0)
@@ -245,19 +245,19 @@ __find_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
         __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
         __storage_type __b = ~*__first.__seg_ & __m;
         if (__b)
-            return _It(__first.__seg_, static_cast<unsigned>(_VSTD::__libcpp_ctz(__b)));
+            return _It(__first.__seg_, static_cast<unsigned>(_CUDA_VSTD::__LIBCUDACXX_ctz(__b)));
     }
     return _It(__first.__seg_, static_cast<unsigned>(__n));
 }
 
 template <class _Cp, bool _IsConst, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __bit_iterator<_Cp, _IsConst>
 find(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value)
 {
     if (static_cast<bool>(__value))
-        return _VSTD::__find_bool_true(__first, static_cast<typename _Cp::size_type>(__last - __first));
-    return _VSTD::__find_bool_false(__first, static_cast<typename _Cp::size_type>(__last - __first));
+        return _CUDA_VSTD::__find_bool_true(__first, static_cast<typename _Cp::size_type>(__last - __first));
+    return _CUDA_VSTD::__find_bool_false(__first, static_cast<typename _Cp::size_type>(__last - __first));
 }
 
 // count
@@ -275,20 +275,20 @@ __count_bool_true(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_type
     if (__first.__ctz_ != 0)
     {
         __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
-        __storage_type __dn = _VSTD::min(__clz_f, __n);
+        __storage_type __dn = _CUDA_VSTD::min(__clz_f, __n);
         __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
-        __r = _VSTD::__libcpp_popcount(*__first.__seg_ & __m);
+        __r = _CUDA_VSTD::__LIBCUDACXX_popcount(*__first.__seg_ & __m);
         __n -= __dn;
         ++__first.__seg_;
     }
     // do middle whole words
     for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
-        __r += _VSTD::__libcpp_popcount(*__first.__seg_);
+        __r += _CUDA_VSTD::__LIBCUDACXX_popcount(*__first.__seg_);
     // do last partial word
     if (__n > 0)
     {
         __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
-        __r += _VSTD::__libcpp_popcount(*__first.__seg_ & __m);
+        __r += _CUDA_VSTD::__LIBCUDACXX_popcount(*__first.__seg_ & __m);
     }
     return __r;
 }
@@ -306,38 +306,38 @@ __count_bool_false(__bit_iterator<_Cp, _IsConst> __first, typename _Cp::size_typ
     if (__first.__ctz_ != 0)
     {
         __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
-        __storage_type __dn = _VSTD::min(__clz_f, __n);
+        __storage_type __dn = _CUDA_VSTD::min(__clz_f, __n);
         __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
-        __r = _VSTD::__libcpp_popcount(~*__first.__seg_ & __m);
+        __r = _CUDA_VSTD::__LIBCUDACXX_popcount(~*__first.__seg_ & __m);
         __n -= __dn;
         ++__first.__seg_;
     }
     // do middle whole words
     for (; __n >= __bits_per_word; ++__first.__seg_, __n -= __bits_per_word)
-        __r += _VSTD::__libcpp_popcount(~*__first.__seg_);
+        __r += _CUDA_VSTD::__LIBCUDACXX_popcount(~*__first.__seg_);
     // do last partial word
     if (__n > 0)
     {
         __storage_type __m = ~__storage_type(0) >> (__bits_per_word - __n);
-        __r += _VSTD::__libcpp_popcount(~*__first.__seg_ & __m);
+        __r += _CUDA_VSTD::__LIBCUDACXX_popcount(~*__first.__seg_ & __m);
     }
     return __r;
 }
 
 template <class _Cp, bool _IsConst, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename __bit_iterator<_Cp, _IsConst>::
diff erence_type
 count(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, const _Tp& __value)
 {
     if (static_cast<bool>(__value))
-        return _VSTD::__count_bool_true(__first, static_cast<typename _Cp::size_type>(__last - __first));
-    return _VSTD::__count_bool_false(__first, static_cast<typename _Cp::size_type>(__last - __first));
+        return _CUDA_VSTD::__count_bool_true(__first, static_cast<typename _Cp::size_type>(__last - __first));
+    return _CUDA_VSTD::__count_bool_false(__first, static_cast<typename _Cp::size_type>(__last - __first));
 }
 
 // fill_n
 
 template <class _Cp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 __fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
 {
     typedef __bit_iterator<_Cp, false> _It;
@@ -347,7 +347,7 @@ __fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
     if (__first.__ctz_ != 0)
     {
         __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
-        __storage_type __dn = _VSTD::min(__clz_f, __n);
+        __storage_type __dn = _CUDA_VSTD::min(__clz_f, __n);
         __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
         *__first.__seg_ &= ~__m;
         __n -= __dn;
@@ -367,7 +367,7 @@ __fill_n_false(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
 }
 
 template <class _Cp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 __fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
 {
     typedef __bit_iterator<_Cp, false> _It;
@@ -377,7 +377,7 @@ __fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
     if (__first.__ctz_ != 0)
     {
         __storage_type __clz_f = static_cast<__storage_type>(__bits_per_word - __first.__ctz_);
-        __storage_type __dn = _VSTD::min(__clz_f, __n);
+        __storage_type __dn = _CUDA_VSTD::min(__clz_f, __n);
         __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
         *__first.__seg_ |= __m;
         __n -= __dn;
@@ -398,33 +398,33 @@ __fill_n_true(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n)
 }
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 fill_n(__bit_iterator<_Cp, false> __first, typename _Cp::size_type __n, bool __value)
 {
     if (__n > 0)
     {
         if (__value)
-            _VSTD::__fill_n_true(__first, __n);
+            _CUDA_VSTD::__fill_n_true(__first, __n);
         else
-            _VSTD::__fill_n_false(__first, __n);
+            _CUDA_VSTD::__fill_n_false(__first, __n);
     }
 }
 
 // fill
 
 template <class _Cp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 fill(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __last, bool __value)
 {
-    _VSTD::fill_n(__first, static_cast<typename _Cp::size_type>(__last - __first), __value);
+    _CUDA_VSTD::fill_n(__first, static_cast<typename _Cp::size_type>(__last - __first), __value);
 }
 
 // copy
 
 template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __bit_iterator<_Cp, false>
 __copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
                                                      __bit_iterator<_Cp, false> __result)
@@ -440,7 +440,7 @@ __copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsCon
         if (__first.__ctz_ != 0)
         {
             unsigned __clz = __bits_per_word - __first.__ctz_;
-            
diff erence_type __dn = _VSTD::min(static_cast<
diff erence_type>(__clz), __n);
+            
diff erence_type __dn = _CUDA_VSTD::min(static_cast<
diff erence_type>(__clz), __n);
             __n -= __dn;
             __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz - __dn));
             __storage_type __b = *__first.__seg_ & __m;
@@ -472,7 +472,7 @@ __copy_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsCon
 }
 
 template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __bit_iterator<_Cp, false>
 __copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
                                                        __bit_iterator<_Cp, false> __result)
@@ -488,12 +488,12 @@ __copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsC
         if (__first.__ctz_ != 0)
         {
             unsigned __clz_f = __bits_per_word - __first.__ctz_;
-            
diff erence_type __dn = _VSTD::min(static_cast<
diff erence_type>(__clz_f), __n);
+            
diff erence_type __dn = _CUDA_VSTD::min(static_cast<
diff erence_type>(__clz_f), __n);
             __n -= __dn;
             __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
             __storage_type __b = *__first.__seg_ & __m;
             unsigned __clz_r = __bits_per_word - __result.__ctz_;
-            __storage_type __ddn = _VSTD::min<__storage_type>(__dn, __clz_r);
+            __storage_type __ddn = _CUDA_VSTD::min<__storage_type>(__dn, __clz_r);
             __m = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn));
             *__result.__seg_ &= ~__m;
             if (__result.__ctz_ > __first.__ctz_)
@@ -531,7 +531,7 @@ __copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsC
         {
             __m = ~__storage_type(0) >> (__bits_per_word - __n);
             __storage_type __b = *__first.__seg_ & __m;
-            __storage_type __dn = _VSTD::min(__n, static_cast<
diff erence_type>(__clz_r));
+            __storage_type __dn = _CUDA_VSTD::min(__n, static_cast<
diff erence_type>(__clz_r));
             __m = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __dn));
             *__result.__seg_ &= ~__m;
             *__result.__seg_ |= __b << __result.__ctz_;
@@ -551,19 +551,19 @@ __copy_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsC
 }
 
 template <class _Cp, bool _IsConst>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __bit_iterator<_Cp, false>
 copy(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result)
 {
     if (__first.__ctz_ == __result.__ctz_)
-        return _VSTD::__copy_aligned(__first, __last, __result);
-    return _VSTD::__copy_unaligned(__first, __last, __result);
+        return _CUDA_VSTD::__copy_aligned(__first, __last, __result);
+    return _CUDA_VSTD::__copy_unaligned(__first, __last, __result);
 }
 
 // copy_backward
 
 template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
 __copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
                                                      __bit_iterator<_Cp, false> __result)
 {
@@ -577,7 +577,7 @@ __copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_C
         // do first word
         if (__last.__ctz_ != 0)
         {
-            
diff erence_type __dn = _VSTD::min(static_cast<
diff erence_type>(__last.__ctz_), __n);
+            
diff erence_type __dn = _CUDA_VSTD::min(static_cast<
diff erence_type>(__last.__ctz_), __n);
             __n -= __dn;
             unsigned __clz = __bits_per_word - __last.__ctz_;
             __storage_type __m = (~__storage_type(0) << (__last.__ctz_ - __dn)) & (~__storage_type(0) >> __clz);
@@ -610,7 +610,7 @@ __copy_backward_aligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_C
 }
 
 template <class _Cp, bool _IsConst>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
 __copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last,
                                                        __bit_iterator<_Cp, false> __result)
 {
@@ -624,13 +624,13 @@ __copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<
         // do first word
         if (__last.__ctz_ != 0)
         {
-            
diff erence_type __dn = _VSTD::min(static_cast<
diff erence_type>(__last.__ctz_), __n);
+            
diff erence_type __dn = _CUDA_VSTD::min(static_cast<
diff erence_type>(__last.__ctz_), __n);
             __n -= __dn;
             unsigned __clz_l = __bits_per_word - __last.__ctz_;
             __storage_type __m = (~__storage_type(0) << (__last.__ctz_ - __dn)) & (~__storage_type(0) >> __clz_l);
             __storage_type __b = *__last.__seg_ & __m;
             unsigned __clz_r = __bits_per_word - __result.__ctz_;
-            __storage_type __ddn = _VSTD::min(__dn, static_cast<
diff erence_type>(__result.__ctz_));
+            __storage_type __ddn = _CUDA_VSTD::min(__dn, static_cast<
diff erence_type>(__result.__ctz_));
             if (__ddn > 0)
             {
                 __m = (~__storage_type(0) << (__result.__ctz_ - __ddn)) & (~__storage_type(0) >> __clz_r);
@@ -674,7 +674,7 @@ __copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<
             __m = ~__storage_type(0) << (__bits_per_word - __n);
             __storage_type __b = *--__last.__seg_ & __m;
             __clz_r = __bits_per_word - __result.__ctz_;
-            __storage_type __dn = _VSTD::min(__n, static_cast<
diff erence_type>(__result.__ctz_));
+            __storage_type __dn = _CUDA_VSTD::min(__n, static_cast<
diff erence_type>(__result.__ctz_));
             __m = (~__storage_type(0) << (__result.__ctz_ - __dn)) & (~__storage_type(0) >> __clz_r);
             *__result.__seg_ &= ~__m;
             *__result.__seg_ |= __b >> (__bits_per_word - __result.__ctz_);
@@ -696,33 +696,33 @@ __copy_backward_unaligned(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<
 }
 
 template <class _Cp, bool _IsConst>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __bit_iterator<_Cp, false>
 copy_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result)
 {
     if (__last.__ctz_ == __result.__ctz_)
-        return _VSTD::__copy_backward_aligned(__first, __last, __result);
-    return _VSTD::__copy_backward_unaligned(__first, __last, __result);
+        return _CUDA_VSTD::__copy_backward_aligned(__first, __last, __result);
+    return _CUDA_VSTD::__copy_backward_unaligned(__first, __last, __result);
 }
 
 // move
 
 template <class _Cp, bool _IsConst>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __bit_iterator<_Cp, false>
 move(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result)
 {
-    return _VSTD::copy(__first, __last, __result);
+    return _CUDA_VSTD::copy(__first, __last, __result);
 }
 
 // move_backward
 
 template <class _Cp, bool _IsConst>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __bit_iterator<_Cp, false>
 move_backward(__bit_iterator<_Cp, _IsConst> __first, __bit_iterator<_Cp, _IsConst> __last, __bit_iterator<_Cp, false> __result)
 {
-    return _VSTD::copy_backward(__first, __last, __result);
+    return _CUDA_VSTD::copy_backward(__first, __last, __result);
 }
 
 // swap_ranges
@@ -743,7 +743,7 @@ __swap_ranges_aligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1,
         if (__first.__ctz_ != 0)
         {
             unsigned __clz = __bits_per_word - __first.__ctz_;
-            
diff erence_type __dn = _VSTD::min(static_cast<
diff erence_type>(__clz), __n);
+            
diff erence_type __dn = _CUDA_VSTD::min(static_cast<
diff erence_type>(__clz), __n);
             __n -= __dn;
             __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz - __dn));
             __storage_type __b1 = *__first.__seg_ & __m;
@@ -793,13 +793,13 @@ __swap_ranges_unaligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1
         if (__first.__ctz_ != 0)
         {
             unsigned __clz_f = __bits_per_word - __first.__ctz_;
-            
diff erence_type __dn = _VSTD::min(static_cast<
diff erence_type>(__clz_f), __n);
+            
diff erence_type __dn = _CUDA_VSTD::min(static_cast<
diff erence_type>(__clz_f), __n);
             __n -= __dn;
             __storage_type __m = (~__storage_type(0) << __first.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
             __storage_type __b1 = *__first.__seg_ & __m;
             *__first.__seg_ &= ~__m;
             unsigned __clz_r = __bits_per_word - __result.__ctz_;
-            __storage_type __ddn = _VSTD::min<__storage_type>(__dn, __clz_r);
+            __storage_type __ddn = _CUDA_VSTD::min<__storage_type>(__dn, __clz_r);
             __m = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn));
             __storage_type __b2 = *__result.__seg_ & __m;
             *__result.__seg_ &= ~__m;
@@ -854,7 +854,7 @@ __swap_ranges_unaligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1
             __m = ~__storage_type(0) >> (__bits_per_word - __n);
             __storage_type __b1 = *__first.__seg_ & __m;
             *__first.__seg_ &= ~__m;
-            __storage_type __dn = _VSTD::min<__storage_type>(__n, __clz_r);
+            __storage_type __dn = _CUDA_VSTD::min<__storage_type>(__n, __clz_r);
             __m = (~__storage_type(0) << __result.__ctz_) & (~__storage_type(0) >> (__clz_r - __dn));
             __storage_type __b2 = *__result.__seg_ & __m;
             *__result.__seg_ &= ~__m;
@@ -878,14 +878,14 @@ __swap_ranges_unaligned(__bit_iterator<__C1, false> __first, __bit_iterator<__C1
 }
 
 template <class __C1, class __C2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __bit_iterator<__C2, false>
 swap_ranges(__bit_iterator<__C1, false> __first1, __bit_iterator<__C1, false> __last1,
             __bit_iterator<__C2, false> __first2)
 {
     if (__first1.__ctz_ == __first2.__ctz_)
-        return _VSTD::__swap_ranges_aligned(__first1, __last1, __first2);
-    return _VSTD::__swap_ranges_unaligned(__first1, __last1, __first2);
+        return _CUDA_VSTD::__swap_ranges_aligned(__first1, __last1, __first2);
+    return _CUDA_VSTD::__swap_ranges_unaligned(__first1, __last1, __first2);
 }
 
 // rotate
@@ -903,19 +903,19 @@ struct __bit_array
     
diff erence_type __size_;
     __storage_type __word_[_Np];
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 static 
diff erence_type capacity()
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 static 
diff erence_type capacity()
         {return static_cast<
diff erence_type>(_Np * __bits_per_word);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit __bit_array(
diff erence_type __s) : __size_(__s) {
-        if (__libcpp_is_constant_evaluated()) {
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit __bit_array(
diff erence_type __s) : __size_(__s) {
+        if (__LIBCUDACXX_is_constant_evaluated()) {
             for (size_t __i = 0; __i != __bit_array<_Cp>::_Np; ++__i)
                 std::__construct_at(__word_ + __i, 0);
         }
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator begin()
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator begin()
     {
         return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]), 0);
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator end()
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator end()
     {
         return iterator(pointer_traits<__storage_pointer>::pointer_to(__word_[0]) + __size_ / __bits_per_word,
                                                   static_cast<unsigned>(__size_ % __bits_per_word));
@@ -923,7 +923,7 @@ struct __bit_array
 };
 
 template <class _Cp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator<_Cp, false>
 rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle, __bit_iterator<_Cp, false> __last)
 {
     typedef __bit_iterator<_Cp, false> _I1;
@@ -938,13 +938,13 @@ rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle,
             if (__d1 <= __bit_array<_Cp>::capacity())
             {
                 __bit_array<_Cp> __b(__d1);
-                _VSTD::copy(__first, __middle, __b.begin());
-                _VSTD::copy(__b.begin(), __b.end(), _VSTD::copy(__middle, __last, __first));
+                _CUDA_VSTD::copy(__first, __middle, __b.begin());
+                _CUDA_VSTD::copy(__b.begin(), __b.end(), _CUDA_VSTD::copy(__middle, __last, __first));
                 break;
             }
             else
             {
-                __bit_iterator<_Cp, false> __mp = _VSTD::swap_ranges(__first, __middle, __middle);
+                __bit_iterator<_Cp, false> __mp = _CUDA_VSTD::swap_ranges(__first, __middle, __middle);
                 __first = __middle;
                 __middle = __mp;
                 __d2 -= __d1;
@@ -955,14 +955,14 @@ rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle,
             if (__d2 <= __bit_array<_Cp>::capacity())
             {
                 __bit_array<_Cp> __b(__d2);
-                _VSTD::copy(__middle, __last, __b.begin());
-                _VSTD::copy_backward(__b.begin(), __b.end(), _VSTD::copy_backward(__first, __middle, __last));
+                _CUDA_VSTD::copy(__middle, __last, __b.begin());
+                _CUDA_VSTD::copy_backward(__b.begin(), __b.end(), _CUDA_VSTD::copy_backward(__first, __middle, __last));
                 break;
             }
             else
             {
                 __bit_iterator<_Cp, false> __mp = __first + __d2;
-                _VSTD::swap_ranges(__first, __mp, __middle);
+                _CUDA_VSTD::swap_ranges(__first, __mp, __middle);
                 __first = __mp;
                 __d1 -= __d2;
             }
@@ -974,7 +974,7 @@ rotate(__bit_iterator<_Cp, false> __first, __bit_iterator<_Cp, false> __middle,
 // equal
 
 template <class _Cp, bool _IC1, bool _IC2>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 __equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1,
                   __bit_iterator<_Cp, _IC2> __first2)
 {
@@ -989,12 +989,12 @@ __equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1>
         if (__first1.__ctz_ != 0)
         {
             unsigned __clz_f = __bits_per_word - __first1.__ctz_;
-            
diff erence_type __dn = _VSTD::min(static_cast<
diff erence_type>(__clz_f), __n);
+            
diff erence_type __dn = _CUDA_VSTD::min(static_cast<
diff erence_type>(__clz_f), __n);
             __n -= __dn;
             __storage_type __m = (~__storage_type(0) << __first1.__ctz_) & (~__storage_type(0) >> (__clz_f - __dn));
             __storage_type __b = *__first1.__seg_ & __m;
             unsigned __clz_r = __bits_per_word - __first2.__ctz_;
-            __storage_type __ddn = _VSTD::min<__storage_type>(__dn, __clz_r);
+            __storage_type __ddn = _CUDA_VSTD::min<__storage_type>(__dn, __clz_r);
             __m = (~__storage_type(0) << __first2.__ctz_) & (~__storage_type(0) >> (__clz_r - __ddn));
             if (__first2.__ctz_ > __first1.__ctz_)
             {
@@ -1037,7 +1037,7 @@ __equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1>
         {
             __m = ~__storage_type(0) >> (__bits_per_word - __n);
             __storage_type __b = *__first1.__seg_ & __m;
-            __storage_type __dn = _VSTD::min(__n, static_cast<
diff erence_type>(__clz_r));
+            __storage_type __dn = _CUDA_VSTD::min(__n, static_cast<
diff erence_type>(__clz_r));
             __m = (~__storage_type(0) << __first2.__ctz_) & (~__storage_type(0) >> (__clz_r - __dn));
             if ((*__first2.__seg_ & __m) != (__b << __first2.__ctz_))
                 return false;
@@ -1056,7 +1056,7 @@ __equal_unaligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1>
 }
 
 template <class _Cp, bool _IC1, bool _IC2>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 __equal_aligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1,
                 __bit_iterator<_Cp, _IC2> __first2)
 {
@@ -1071,7 +1071,7 @@ __equal_aligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __
         if (__first1.__ctz_ != 0)
         {
             unsigned __clz = __bits_per_word - __first1.__ctz_;
-            
diff erence_type __dn = _VSTD::min(static_cast<
diff erence_type>(__clz), __n);
+            
diff erence_type __dn = _CUDA_VSTD::min(static_cast<
diff erence_type>(__clz), __n);
             __n -= __dn;
             __storage_type __m = (~__storage_type(0) << __first1.__ctz_) & (~__storage_type(0) >> (__clz - __dn));
             if ((*__first2.__seg_ & __m) != (*__first1.__seg_ & __m))
@@ -1099,13 +1099,13 @@ __equal_aligned(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __
 }
 
 template <class _Cp, bool _IC1, bool _IC2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 equal(__bit_iterator<_Cp, _IC1> __first1, __bit_iterator<_Cp, _IC1> __last1, __bit_iterator<_Cp, _IC2> __first2)
 {
     if (__first1.__ctz_ == __first2.__ctz_)
-        return _VSTD::__equal_aligned(__first1, __last1, __first2);
-    return _VSTD::__equal_unaligned(__first1, __last1, __first2);
+        return _CUDA_VSTD::__equal_aligned(__first1, __last1, __first2);
+    return _CUDA_VSTD::__equal_unaligned(__first1, __last1, __first2);
 }
 
 template <class _Cp, bool _IsConst,
@@ -1116,7 +1116,7 @@ public:
     typedef typename _Cp::
diff erence_type                                                          
diff erence_type;
     typedef bool                                                                                  value_type;
     typedef __bit_iterator                                                                        pointer;
-#ifndef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
+#ifndef _LIBCUDACXX_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
     typedef typename conditional<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >::type reference;
 #else
     using reference = typename conditional<_IsConst, bool, __bit_reference<_Cp> >::type;
@@ -1133,8 +1133,8 @@ private:
     unsigned          __ctz_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator() _NOEXCEPT
-#if _LIBCPP_STD_VER > 11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator() _NOEXCEPT
+#if _LIBCUDACXX_STD_VER > 11
     : __seg_(nullptr), __ctz_(0)
 #endif
     {}
@@ -1144,7 +1144,7 @@ public:
     // When _IsConst=true, this is a converting constructor;
     // the copy and move constructors are implicitly generated
     // and trivial.
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __bit_iterator(const __bit_iterator<_Cp, false>& __it) _NOEXCEPT
         : __seg_(__it.__seg_), __ctz_(__it.__ctz_) {}
 
@@ -1153,19 +1153,19 @@ public:
     // the implicit generation of a defaulted one is deprecated.
     // When _IsConst=true, the assignment operators are
     // implicitly generated and trivial.
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __bit_iterator& operator=(const _If<_IsConst, struct __private_nat, __bit_iterator>& __it) {
         __seg_ = __it.__seg_;
         __ctz_ = __it.__ctz_;
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference operator*() const _NOEXCEPT {
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 reference operator*() const _NOEXCEPT {
         return typename conditional<_IsConst, __bit_const_reference<_Cp>, __bit_reference<_Cp> >
                 ::type(__seg_, __storage_type(1) << __ctz_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator++()
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator++()
     {
         if (__ctz_ != __bits_per_word-1)
             ++__ctz_;
@@ -1177,14 +1177,14 @@ public:
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator++(int)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator operator++(int)
     {
         __bit_iterator __tmp = *this;
         ++(*this);
         return __tmp;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator--()
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator--()
     {
         if (__ctz_ != 0)
             --__ctz_;
@@ -1196,14 +1196,14 @@ public:
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator--(int)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator operator--(int)
     {
         __bit_iterator __tmp = *this;
         --(*this);
         return __tmp;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator+=(
diff erence_type __n)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator+=(
diff erence_type __n)
     {
         if (__n >= 0)
             __seg_ += (__n + __ctz_) / __bits_per_word;
@@ -1215,54 +1215,54 @@ public:
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator-=(
diff erence_type __n)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator& operator-=(
diff erence_type __n)
     {
         return *this += -__n;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator+(
diff erence_type __n) const
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator operator+(
diff erence_type __n) const
     {
         __bit_iterator __t(*this);
         __t += __n;
         return __t;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 __bit_iterator operator-(
diff erence_type __n) const
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __bit_iterator operator-(
diff erence_type __n) const
     {
         __bit_iterator __t(*this);
         __t -= __n;
         return __t;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend __bit_iterator operator+(
diff erence_type __n, const __bit_iterator& __it) {return __it + __n;}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend 
diff erence_type operator-(const __bit_iterator& __x, const __bit_iterator& __y)
         {return (__x.__seg_ - __y.__seg_) * __bits_per_word + __x.__ctz_ - __y.__ctz_;}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference operator[](
diff erence_type __n) const {return *(*this + __n);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 reference operator[](
diff erence_type __n) const {return *(*this + __n);}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator==(const __bit_iterator& __x, const __bit_iterator& __y)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 friend bool operator==(const __bit_iterator& __x, const __bit_iterator& __y)
         {return __x.__seg_ == __y.__seg_ && __x.__ctz_ == __y.__ctz_;}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator!=(const __bit_iterator& __x, const __bit_iterator& __y)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 friend bool operator!=(const __bit_iterator& __x, const __bit_iterator& __y)
         {return !(__x == __y);}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator<(const __bit_iterator& __x, const __bit_iterator& __y)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 friend bool operator<(const __bit_iterator& __x, const __bit_iterator& __y)
         {return __x.__seg_ < __y.__seg_ || (__x.__seg_ == __y.__seg_ && __x.__ctz_ < __y.__ctz_);}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator>(const __bit_iterator& __x, const __bit_iterator& __y)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 friend bool operator>(const __bit_iterator& __x, const __bit_iterator& __y)
         {return __y < __x;}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator<=(const __bit_iterator& __x, const __bit_iterator& __y)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 friend bool operator<=(const __bit_iterator& __x, const __bit_iterator& __y)
         {return !(__y < __x);}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 friend bool operator>=(const __bit_iterator& __x, const __bit_iterator& __y)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 friend bool operator>=(const __bit_iterator& __x, const __bit_iterator& __y)
         {return !(__x < __y);}
 
 private:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     explicit __bit_iterator(__storage_pointer __s, unsigned __ctz) _NOEXCEPT
         : __seg_(__s), __ctz_(__ctz) {}
 
@@ -1273,40 +1273,40 @@ private:
     friend class __bit_iterator<_Cp, true>;
     template <class _Dp> friend struct __bit_array;
     template <class _Dp>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend void __fill_n_false(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n);
 
     template <class _Dp>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend void __fill_n_true(__bit_iterator<_Dp, false> __first, typename _Dp::size_type __n);
 
     template <class _Dp, bool _IC>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend __bit_iterator<_Dp, false> __copy_aligned(__bit_iterator<_Dp, _IC> __first,
                                                      __bit_iterator<_Dp, _IC> __last,
                                                      __bit_iterator<_Dp, false> __result);
     template <class _Dp, bool _IC>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend __bit_iterator<_Dp, false> __copy_unaligned(__bit_iterator<_Dp, _IC> __first,
                                                        __bit_iterator<_Dp, _IC> __last,
                                                        __bit_iterator<_Dp, false> __result);
     template <class _Dp, bool _IC>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend __bit_iterator<_Dp, false> copy(__bit_iterator<_Dp, _IC> __first,
                                            __bit_iterator<_Dp, _IC> __last,
                                            __bit_iterator<_Dp, false> __result);
     template <class _Dp, bool _IC>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend __bit_iterator<_Dp, false> __copy_backward_aligned(__bit_iterator<_Dp, _IC> __first,
                                                               __bit_iterator<_Dp, _IC> __last,
                                                               __bit_iterator<_Dp, false> __result);
     template <class _Dp, bool _IC>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend __bit_iterator<_Dp, false> __copy_backward_unaligned(__bit_iterator<_Dp, _IC> __first,
                                                                 __bit_iterator<_Dp, _IC> __last,
                                                                 __bit_iterator<_Dp, false> __result);
     template <class _Dp, bool _IC>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend __bit_iterator<_Dp, false> copy_backward(__bit_iterator<_Dp, _IC> __first,
                                                     __bit_iterator<_Dp, _IC> __last,
                                                     __bit_iterator<_Dp, false> __result);
@@ -1320,30 +1320,30 @@ private:
                                                                                  __bit_iterator<__C1, false>,
                                                                                  __bit_iterator<__C2, false>);
     template <class _Dp>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend __bit_iterator<_Dp, false> rotate(__bit_iterator<_Dp, false>,
                                              __bit_iterator<_Dp, false>,
                                              __bit_iterator<_Dp, false>);
     template <class _Dp, bool _IC1, bool _IC2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend bool __equal_aligned(__bit_iterator<_Dp, _IC1>,
                                 __bit_iterator<_Dp, _IC1>,
                                 __bit_iterator<_Dp, _IC2>);
     template <class _Dp, bool _IC1, bool _IC2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend bool __equal_unaligned(__bit_iterator<_Dp, _IC1>,
                                   __bit_iterator<_Dp, _IC1>,
                                   __bit_iterator<_Dp, _IC2>);
     template <class _Dp, bool _IC1, bool _IC2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend bool equal(__bit_iterator<_Dp, _IC1>,
                       __bit_iterator<_Dp, _IC1>,
                       __bit_iterator<_Dp, _IC2>);
     template <class _Dp, bool _IC>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend __bit_iterator<_Dp, _IC> __find_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
     template <class _Dp, bool _IC>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     friend __bit_iterator<_Dp, _IC> __find_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
     template <class _Dp, bool _IC> friend typename __bit_iterator<_Dp, _IC>::
diff erence_type
                    __count_bool_true(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
@@ -1351,8 +1351,8 @@ private:
                    __count_bool_false(__bit_iterator<_Dp, _IC>, typename _Dp::size_type);
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___BIT_REFERENCE
+#endif // _LIBCUDACXX___BIT_REFERENCE

diff  --git a/libcxx/include/__bits b/libcxx/include/__bits
index 92ef5c0a7b49..d30cae2512d3 100644
--- a/libcxx/include/__bits
+++ b/libcxx/include/__bits
@@ -7,45 +7,45 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___BITS
-#define _LIBCPP___BITS
+#ifndef _LIBCUDACXX___BITS
+#define _LIBCUDACXX___BITS
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_COMPILER_MSVC
+#ifndef _LIBCUDACXX_COMPILER_MSVC
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-int __libcpp_ctz(unsigned __x)           _NOEXCEPT { return __builtin_ctz(__x); }
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+int __LIBCUDACXX_ctz(unsigned __x)           _NOEXCEPT { return __builtin_ctz(__x); }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-int __libcpp_ctz(unsigned long __x)      _NOEXCEPT { return __builtin_ctzl(__x); }
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+int __LIBCUDACXX_ctz(unsigned long __x)      _NOEXCEPT { return __builtin_ctzl(__x); }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-int __libcpp_ctz(unsigned long long __x) _NOEXCEPT { return __builtin_ctzll(__x); }
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+int __LIBCUDACXX_ctz(unsigned long long __x) _NOEXCEPT { return __builtin_ctzll(__x); }
 
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-int __libcpp_clz(unsigned __x)           _NOEXCEPT { return __builtin_clz(__x); }
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+int __LIBCUDACXX_clz(unsigned __x)           _NOEXCEPT { return __builtin_clz(__x); }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-int __libcpp_clz(unsigned long __x)      _NOEXCEPT { return __builtin_clzl(__x); }
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+int __LIBCUDACXX_clz(unsigned long __x)      _NOEXCEPT { return __builtin_clzl(__x); }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-int __libcpp_clz(unsigned long long __x) _NOEXCEPT { return __builtin_clzll(__x); }
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+int __LIBCUDACXX_clz(unsigned long long __x) _NOEXCEPT { return __builtin_clzll(__x); }
 
-#  ifndef _LIBCPP_HAS_NO_INT128
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-int __libcpp_clz(__uint128_t __x) _NOEXCEPT {
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+int __LIBCUDACXX_clz(__uint128_t __x) _NOEXCEPT {
   // The function is written in this form due to C++ constexpr limitations.
   // The algorithm:
   // - Test whether any bit in the high 64-bits is set
@@ -61,20 +61,20 @@ int __libcpp_clz(__uint128_t __x) _NOEXCEPT {
 }
 #  endif
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-int __libcpp_popcount(unsigned __x)           _NOEXCEPT { return __builtin_popcount(__x); }
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+int __LIBCUDACXX_popcount(unsigned __x)           _NOEXCEPT { return __builtin_popcount(__x); }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-int __libcpp_popcount(unsigned long __x)      _NOEXCEPT { return __builtin_popcountl(__x); }
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+int __LIBCUDACXX_popcount(unsigned long __x)      _NOEXCEPT { return __builtin_popcountl(__x); }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-int __libcpp_popcount(unsigned long long __x) _NOEXCEPT { return __builtin_popcountll(__x); }
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+int __LIBCUDACXX_popcount(unsigned long long __x) _NOEXCEPT { return __builtin_popcountll(__x); }
 
-#else  // _LIBCPP_COMPILER_MSVC
+#else  // _LIBCUDACXX_COMPILER_MSVC
 
 // Precondition:  __x != 0
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_ctz(unsigned __x) {
+inline _LIBCUDACXX_INLINE_VISIBILITY
+int __LIBCUDACXX_ctz(unsigned __x) {
   static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
   static_assert(sizeof(unsigned long) == 4, "");
   unsigned long __where;
@@ -83,16 +83,16 @@ int __libcpp_ctz(unsigned __x) {
   return 32;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_ctz(unsigned long __x) {
+inline _LIBCUDACXX_INLINE_VISIBILITY
+int __LIBCUDACXX_ctz(unsigned long __x) {
     static_assert(sizeof(unsigned long) == sizeof(unsigned), "");
     return __ctz(static_cast<unsigned>(__x));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_ctz(unsigned long long __x) {
+inline _LIBCUDACXX_INLINE_VISIBILITY
+int __LIBCUDACXX_ctz(unsigned long long __x) {
     unsigned long __where;
-#if defined(_LIBCPP_HAS_BITSCAN64)
+#if defined(_LIBCUDACXX_HAS_BITSCAN64)
   if (_BitScanForward64(&__where, __x))
     return static_cast<int>(__where);
 #else
@@ -106,8 +106,8 @@ int __libcpp_ctz(unsigned long long __x) {
 }
 
 // Precondition:  __x != 0
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_clz(unsigned __x) {
+inline _LIBCUDACXX_INLINE_VISIBILITY
+int __LIBCUDACXX_clz(unsigned __x) {
   static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
   static_assert(sizeof(unsigned long) == 4, "");
   unsigned long __where;
@@ -116,16 +116,16 @@ int __libcpp_clz(unsigned __x) {
   return 32; // Undefined Behavior.
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_clz(unsigned long __x) {
+inline _LIBCUDACXX_INLINE_VISIBILITY
+int __LIBCUDACXX_clz(unsigned long __x) {
     static_assert(sizeof(unsigned) == sizeof(unsigned long), "");
-    return __libcpp_clz(static_cast<unsigned>(__x));
+    return __LIBCUDACXX_clz(static_cast<unsigned>(__x));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_clz(unsigned long long __x) {
+inline _LIBCUDACXX_INLINE_VISIBILITY
+int __LIBCUDACXX_clz(unsigned long long __x) {
   unsigned long __where;
-#if defined(_LIBCPP_HAS_BITSCAN64)
+#if defined(_LIBCUDACXX_HAS_BITSCAN64)
   if (_BitScanReverse64(&__where, __x))
     return static_cast<int>(63 - __where);
 #else
@@ -138,25 +138,25 @@ int __libcpp_clz(unsigned long long __x) {
   return 64; // Undefined Behavior.
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned __x) {
+inline _LIBCUDACXX_INLINE_VISIBILITY int __LIBCUDACXX_popcount(unsigned __x) {
   static_assert(sizeof(unsigned) == 4, "");
   return __popcnt(__x);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long __x) {
+inline _LIBCUDACXX_INLINE_VISIBILITY int __LIBCUDACXX_popcount(unsigned long __x) {
   static_assert(sizeof(unsigned long) == 4, "");
   return __popcnt(__x);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY int __libcpp_popcount(unsigned long long __x) {
+inline _LIBCUDACXX_INLINE_VISIBILITY int __LIBCUDACXX_popcount(unsigned long long __x) {
   static_assert(sizeof(unsigned long long) == 8, "");
   return __popcnt64(__x);
 }
 
-#endif // _LIBCPP_COMPILER_MSVC
+#endif // _LIBCUDACXX_COMPILER_MSVC
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___BITS
+#endif // _LIBCUDACXX___BITS

diff  --git a/libcxx/include/__bsd_locale_defaults.h b/libcxx/include/__bsd_locale_defaults.h
index 4d990482d4a3..ecd4f71e626e 100644
--- a/libcxx/include/__bsd_locale_defaults.h
+++ b/libcxx/include/__bsd_locale_defaults.h
@@ -11,26 +11,26 @@
 // we will define the mapping from an internal macro to the real BSD symbol.
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___BSD_LOCALE_DEFAULTS_H
-#define _LIBCPP___BSD_LOCALE_DEFAULTS_H
+#ifndef _LIBCUDACXX___BSD_LOCALE_DEFAULTS_H
+#define _LIBCUDACXX___BSD_LOCALE_DEFAULTS_H
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#define __libcpp_mb_cur_max_l(loc)                          MB_CUR_MAX_L(loc)
-#define __libcpp_btowc_l(ch, loc)                           btowc_l(ch, loc)
-#define __libcpp_wctob_l(wch, loc)                          wctob_l(wch, loc)
-#define __libcpp_wcsnrtombs_l(dst, src, nwc, len, ps, loc)  wcsnrtombs_l(dst, src, nwc, len, ps, loc)
-#define __libcpp_wcrtomb_l(src, wc, ps, loc)                wcrtomb_l(src, wc, ps, loc)
-#define __libcpp_mbsnrtowcs_l(dst, src, nms, len, ps, loc)  mbsnrtowcs_l(dst, src, nms, len, ps, loc)
-#define __libcpp_mbrtowc_l(pwc, s, n, ps, l)                mbrtowc_l(pwc, s, n, ps, l)
-#define __libcpp_mbtowc_l(pwc, pmb, max, l)                 mbtowc_l(pwc, pmb, max, l)
-#define __libcpp_mbrlen_l(s, n, ps, l)                      mbrlen_l(s, n, ps, l)
-#define __libcpp_localeconv_l(l)                            localeconv_l(l)
-#define __libcpp_mbsrtowcs_l(dest, src, len, ps, l)         mbsrtowcs_l(dest, src, len, ps, l)
-#define __libcpp_snprintf_l(...)                            snprintf_l(__VA_ARGS__)
-#define __libcpp_asprintf_l(...)                            asprintf_l(__VA_ARGS__)
-#define __libcpp_sscanf_l(...)                              sscanf_l(__VA_ARGS__)
+#define __LIBCUDACXX_mb_cur_max_l(loc)                          MB_CUR_MAX_L(loc)
+#define __LIBCUDACXX_btowc_l(ch, loc)                           btowc_l(ch, loc)
+#define __LIBCUDACXX_wctob_l(wch, loc)                          wctob_l(wch, loc)
+#define __LIBCUDACXX_wcsnrtombs_l(dst, src, nwc, len, ps, loc)  wcsnrtombs_l(dst, src, nwc, len, ps, loc)
+#define __LIBCUDACXX_wcrtomb_l(src, wc, ps, loc)                wcrtomb_l(src, wc, ps, loc)
+#define __LIBCUDACXX_mbsnrtowcs_l(dst, src, nms, len, ps, loc)  mbsnrtowcs_l(dst, src, nms, len, ps, loc)
+#define __LIBCUDACXX_mbrtowc_l(pwc, s, n, ps, l)                mbrtowc_l(pwc, s, n, ps, l)
+#define __LIBCUDACXX_mbtowc_l(pwc, pmb, max, l)                 mbtowc_l(pwc, pmb, max, l)
+#define __LIBCUDACXX_mbrlen_l(s, n, ps, l)                      mbrlen_l(s, n, ps, l)
+#define __LIBCUDACXX_localeconv_l(l)                            localeconv_l(l)
+#define __LIBCUDACXX_mbsrtowcs_l(dest, src, len, ps, l)         mbsrtowcs_l(dest, src, len, ps, l)
+#define __LIBCUDACXX_snprintf_l(...)                            snprintf_l(__VA_ARGS__)
+#define __LIBCUDACXX_asprintf_l(...)                            asprintf_l(__VA_ARGS__)
+#define __LIBCUDACXX_sscanf_l(...)                              sscanf_l(__VA_ARGS__)
 
-#endif // _LIBCPP___BSD_LOCALE_DEFAULTS_H
+#endif // _LIBCUDACXX___BSD_LOCALE_DEFAULTS_H

diff  --git a/libcxx/include/__bsd_locale_fallbacks.h b/libcxx/include/__bsd_locale_fallbacks.h
index 3d5b78574480..efabb8979ab3 100644
--- a/libcxx/include/__bsd_locale_fallbacks.h
+++ b/libcxx/include/__bsd_locale_fallbacks.h
@@ -10,134 +10,134 @@
 // of those functions for non-BSD platforms.
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___BSD_LOCALE_FALLBACKS_H
-#define _LIBCPP___BSD_LOCALE_FALLBACKS_H
+#ifndef _LIBCUDACXX___BSD_LOCALE_FALLBACKS_H
+#define _LIBCUDACXX___BSD_LOCALE_FALLBACKS_H
 
 #include <memory>
 #include <stdarg.h>
 #include <stdlib.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-inline _LIBCPP_INLINE_VISIBILITY
-decltype(MB_CUR_MAX) __libcpp_mb_cur_max_l(locale_t __l)
+inline _LIBCUDACXX_INLINE_VISIBILITY
+decltype(MB_CUR_MAX) __LIBCUDACXX_mb_cur_max_l(locale_t __l)
 {
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     return MB_CUR_MAX;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-inline _LIBCPP_INLINE_VISIBILITY
-wint_t __libcpp_btowc_l(int __c, locale_t __l)
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+inline _LIBCUDACXX_INLINE_VISIBILITY
+wint_t __LIBCUDACXX_btowc_l(int __c, locale_t __l)
 {
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     return btowc(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_wctob_l(wint_t __c, locale_t __l)
+inline _LIBCUDACXX_INLINE_VISIBILITY
+int __LIBCUDACXX_wctob_l(wint_t __c, locale_t __l)
 {
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     return wctob(__c);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-size_t __libcpp_wcsnrtombs_l(char *__dest, const wchar_t **__src, size_t __nwc,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+size_t __LIBCUDACXX_wcsnrtombs_l(char *__dest, const wchar_t **__src, size_t __nwc,
                          size_t __len, mbstate_t *__ps, locale_t __l)
 {
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     return wcsnrtombs(__dest, __src, __nwc, __len, __ps);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-size_t __libcpp_wcrtomb_l(char *__s, wchar_t __wc, mbstate_t *__ps, locale_t __l)
+inline _LIBCUDACXX_INLINE_VISIBILITY
+size_t __LIBCUDACXX_wcrtomb_l(char *__s, wchar_t __wc, mbstate_t *__ps, locale_t __l)
 {
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     return wcrtomb(__s, __wc, __ps);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-size_t __libcpp_mbsnrtowcs_l(wchar_t * __dest, const char **__src, size_t __nms,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+size_t __LIBCUDACXX_mbsnrtowcs_l(wchar_t * __dest, const char **__src, size_t __nms,
                       size_t __len, mbstate_t *__ps, locale_t __l)
 {
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     return mbsnrtowcs(__dest, __src, __nms, __len, __ps);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-size_t __libcpp_mbrtowc_l(wchar_t *__pwc, const char *__s, size_t __n,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+size_t __LIBCUDACXX_mbrtowc_l(wchar_t *__pwc, const char *__s, size_t __n,
                    mbstate_t *__ps, locale_t __l)
 {
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     return mbrtowc(__pwc, __s, __n, __ps);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-int __libcpp_mbtowc_l(wchar_t *__pwc, const char *__pmb, size_t __max, locale_t __l)
+inline _LIBCUDACXX_INLINE_VISIBILITY
+int __LIBCUDACXX_mbtowc_l(wchar_t *__pwc, const char *__pmb, size_t __max, locale_t __l)
 {
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     return mbtowc(__pwc, __pmb, __max);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-size_t __libcpp_mbrlen_l(const char *__s, size_t __n, mbstate_t *__ps, locale_t __l)
+inline _LIBCUDACXX_INLINE_VISIBILITY
+size_t __LIBCUDACXX_mbrlen_l(const char *__s, size_t __n, mbstate_t *__ps, locale_t __l)
 {
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     return mbrlen(__s, __n, __ps);
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-inline _LIBCPP_INLINE_VISIBILITY
-lconv *__libcpp_localeconv_l(locale_t __l)
+inline _LIBCUDACXX_INLINE_VISIBILITY
+lconv *__LIBCUDACXX_localeconv_l(locale_t __l)
 {
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     return localeconv();
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-inline _LIBCPP_INLINE_VISIBILITY
-size_t __libcpp_mbsrtowcs_l(wchar_t *__dest, const char **__src, size_t __len,
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+inline _LIBCUDACXX_INLINE_VISIBILITY
+size_t __LIBCUDACXX_mbsrtowcs_l(wchar_t *__dest, const char **__src, size_t __len,
                      mbstate_t *__ps, locale_t __l)
 {
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     return mbsrtowcs(__dest, __src, __len, __ps);
 }
 #endif
 
-inline _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 4, 5)
-int __libcpp_snprintf_l(char *__s, size_t __n, locale_t __l, const char *__format, ...) {
+inline _LIBCUDACXX_ATTRIBUTE_FORMAT(__printf__, 4, 5)
+int __LIBCUDACXX_snprintf_l(char *__s, size_t __n, locale_t __l, const char *__format, ...) {
     va_list __va;
     va_start(__va, __format);
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     int __res = vsnprintf(__s, __n, __format, __va);
     va_end(__va);
     return __res;
 }
 
-inline _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 3, 4)
-int __libcpp_asprintf_l(char **__s, locale_t __l, const char *__format, ...) {
+inline _LIBCUDACXX_ATTRIBUTE_FORMAT(__printf__, 3, 4)
+int __LIBCUDACXX_asprintf_l(char **__s, locale_t __l, const char *__format, ...) {
     va_list __va;
     va_start(__va, __format);
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     int __res = vasprintf(__s, __format, __va);
     va_end(__va);
     return __res;
 }
 
-inline _LIBCPP_ATTRIBUTE_FORMAT(__scanf__, 3, 4)
-int __libcpp_sscanf_l(const char *__s, locale_t __l, const char *__format, ...) {
+inline _LIBCUDACXX_ATTRIBUTE_FORMAT(__scanf__, 3, 4)
+int __LIBCUDACXX_sscanf_l(const char *__s, locale_t __l, const char *__format, ...) {
     va_list __va;
     va_start(__va, __format);
-    __libcpp_locale_guard __current(__l);
+    __LIBCUDACXX_locale_guard __current(__l);
     int __res = vsscanf(__s, __format, __va);
     va_end(__va);
     return __res;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___BSD_LOCALE_FALLBACKS_H
+#endif // _LIBCUDACXX___BSD_LOCALE_FALLBACKS_H

diff  --git a/libcxx/include/__charconv/chars_format.h b/libcxx/include/__charconv/chars_format.h
index 0875079e6c7a..2fa6db54ed91 100644
--- a/libcxx/include/__charconv/chars_format.h
+++ b/libcxx/include/__charconv/chars_format.h
@@ -7,21 +7,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHARCONV_CHARS_FORMAT_H
-#define _LIBCPP___CHARCONV_CHARS_FORMAT_H
+#ifndef _LIBCUDACXX___CHARCONV_CHARS_FORMAT_H
+#define _LIBCUDACXX___CHARCONV_CHARS_FORMAT_H
 
 #include <__config>
 #include <__utility/to_underlying.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-enum class _LIBCPP_ENUM_VIS chars_format
+enum class _LIBCUDACXX_ENUM_VIS chars_format
 {
     scientific = 0x1,
     fixed = 0x2,
@@ -29,49 +29,49 @@ enum class _LIBCPP_ENUM_VIS chars_format
     general = fixed | scientific
 };
 
-inline _LIBCPP_INLINE_VISIBILITY constexpr chars_format
+inline _LIBCUDACXX_INLINE_VISIBILITY constexpr chars_format
 operator~(chars_format __x) {
-  return chars_format(~_VSTD::__to_underlying(__x));
+  return chars_format(~_CUDA_VSTD::__to_underlying(__x));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY constexpr chars_format
+inline _LIBCUDACXX_INLINE_VISIBILITY constexpr chars_format
 operator&(chars_format __x, chars_format __y) {
-  return chars_format(_VSTD::__to_underlying(__x) &
-                      _VSTD::__to_underlying(__y));
+  return chars_format(_CUDA_VSTD::__to_underlying(__x) &
+                      _CUDA_VSTD::__to_underlying(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY constexpr chars_format
+inline _LIBCUDACXX_INLINE_VISIBILITY constexpr chars_format
 operator|(chars_format __x, chars_format __y) {
-  return chars_format(_VSTD::__to_underlying(__x) |
-                      _VSTD::__to_underlying(__y));
+  return chars_format(_CUDA_VSTD::__to_underlying(__x) |
+                      _CUDA_VSTD::__to_underlying(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY constexpr chars_format
+inline _LIBCUDACXX_INLINE_VISIBILITY constexpr chars_format
 operator^(chars_format __x, chars_format __y) {
-  return chars_format(_VSTD::__to_underlying(__x) ^
-                      _VSTD::__to_underlying(__y));
+  return chars_format(_CUDA_VSTD::__to_underlying(__x) ^
+                      _CUDA_VSTD::__to_underlying(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 chars_format&
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 chars_format&
 operator&=(chars_format& __x, chars_format __y) {
   __x = __x & __y;
   return __x;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 chars_format&
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 chars_format&
 operator|=(chars_format& __x, chars_format __y) {
   __x = __x | __y;
   return __x;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 chars_format&
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 chars_format&
 operator^=(chars_format& __x, chars_format __y) {
   __x = __x ^ __y;
   return __x;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CHARCONV_CHARS_FORMAT_H
+#endif // _LIBCUDACXX___CHARCONV_CHARS_FORMAT_H

diff  --git a/libcxx/include/__charconv/from_chars_result.h b/libcxx/include/__charconv/from_chars_result.h
index 2cc3c11ef64f..9f0b412a0bed 100644
--- a/libcxx/include/__charconv/from_chars_result.h
+++ b/libcxx/include/__charconv/from_chars_result.h
@@ -7,31 +7,31 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHARCONV_FROM_CHARS_RESULT_H
-#define _LIBCPP___CHARCONV_FROM_CHARS_RESULT_H
+#ifndef _LIBCUDACXX___CHARCONV_FROM_CHARS_RESULT_H
+#define _LIBCUDACXX___CHARCONV_FROM_CHARS_RESULT_H
 
 #include <__config>
 #include <__errc>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-struct _LIBCPP_TYPE_VIS from_chars_result
+struct _LIBCUDACXX_TYPE_VIS from_chars_result
 {
     const char* ptr;
     errc ec;
-#  if _LIBCPP_STD_VER > 17
-    _LIBCPP_HIDE_FROM_ABI friend bool operator==(const from_chars_result&, const from_chars_result&) = default;
+#  if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_HIDE_FROM_ABI friend bool operator==(const from_chars_result&, const from_chars_result&) = default;
 #  endif
 };
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CHARCONV_FROM_CHARS_RESULT_H
+#endif // _LIBCUDACXX___CHARCONV_FROM_CHARS_RESULT_H

diff  --git a/libcxx/include/__charconv/tables.h b/libcxx/include/__charconv/tables.h
index 83f39e6fd2ef..511fafd01530 100644
--- a/libcxx/include/__charconv/tables.h
+++ b/libcxx/include/__charconv/tables.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHARCONV_TABLES
-#define _LIBCPP___CHARCONV_TABLES
+#ifndef _LIBCUDACXX___CHARCONV_TABLES
+#define _LIBCUDACXX___CHARCONV_TABLES
 
 #include <__config>
 #include <cstdint>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 namespace __itoa {
 
@@ -35,7 +35,7 @@ struct __table {
 
   static const uint32_t __pow10_32[10];
   static const uint64_t __pow10_64[20];
-#  ifndef _LIBCPP_HAS_NO_INT128
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
   // TODO FMT Reduce the number of entries in this table.
   static const __uint128_t __pow10_128[40];
   static const int __pow10_128_offset = 0;
@@ -111,7 +111,7 @@ const uint64_t __table<_Tp>::__pow10_64[20] = {UINT64_C(0),
                                                UINT64_C(1000000000000000000),
                                                UINT64_C(10000000000000000000)};
 
-#  ifndef _LIBCPP_HAS_NO_INT128
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
 template <class _Tp>
 const __uint128_t __table<_Tp>::__pow10_128[40] = {
     UINT64_C(0),
@@ -173,8 +173,8 @@ const char __table<_Tp>::__digits_base_10[200] = {
 
 } // namespace __itoa
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CHARCONV_TABLES
+#endif // _LIBCUDACXX___CHARCONV_TABLES

diff  --git a/libcxx/include/__charconv/to_chars_base_10.h b/libcxx/include/__charconv/to_chars_base_10.h
index d25deffc592f..5a8bf1412672 100644
--- a/libcxx/include/__charconv/to_chars_base_10.h
+++ b/libcxx/include/__charconv/to_chars_base_10.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHARCONV_TO_CHARS_BASE_10_H
-#define _LIBCPP___CHARCONV_TO_CHARS_BASE_10_H
+#ifndef _LIBCUDACXX___CHARCONV_TO_CHARS_BASE_10_H
+#define _LIBCUDACXX___CHARCONV_TO_CHARS_BASE_10_H
 
 #include <__algorithm/copy_n.h>
 #include <__charconv/tables.h>
@@ -16,63 +16,63 @@
 #include <cstdint>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 namespace __itoa {
 
-_LIBCPP_HIDE_FROM_ABI inline char* __append1(char* __first, uint32_t __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __append1(char* __first, uint32_t __value) noexcept {
   *__first = '0' + static_cast<char>(__value);
   return __first + 1;
 }
 
-_LIBCPP_HIDE_FROM_ABI inline char* __append2(char* __first, uint32_t __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __append2(char* __first, uint32_t __value) noexcept {
   return std::copy_n(&__table<>::__digits_base_10[__value * 2], 2, __first);
 }
 
-_LIBCPP_HIDE_FROM_ABI inline char* __append3(char* __first, uint32_t __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __append3(char* __first, uint32_t __value) noexcept {
   return __itoa::__append2(__itoa::__append1(__first, __value / 100), __value % 100);
 }
 
-_LIBCPP_HIDE_FROM_ABI inline char* __append4(char* __first, uint32_t __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __append4(char* __first, uint32_t __value) noexcept {
   return __itoa::__append2(__itoa::__append2(__first, __value / 100), __value % 100);
 }
 
-_LIBCPP_HIDE_FROM_ABI inline char* __append5(char* __first, uint32_t __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __append5(char* __first, uint32_t __value) noexcept {
   return __itoa::__append4(__itoa::__append1(__first, __value / 10000), __value % 10000);
 }
 
-_LIBCPP_HIDE_FROM_ABI inline char* __append6(char* __first, uint32_t __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __append6(char* __first, uint32_t __value) noexcept {
   return __itoa::__append4(__itoa::__append2(__first, __value / 10000), __value % 10000);
 }
 
-_LIBCPP_HIDE_FROM_ABI inline char* __append7(char* __first, uint32_t __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __append7(char* __first, uint32_t __value) noexcept {
   return __itoa::__append6(__itoa::__append1(__first, __value / 1000000), __value % 1000000);
 }
 
-_LIBCPP_HIDE_FROM_ABI inline char* __append8(char* __first, uint32_t __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __append8(char* __first, uint32_t __value) noexcept {
   return __itoa::__append6(__itoa::__append2(__first, __value / 1000000), __value % 1000000);
 }
 
-_LIBCPP_HIDE_FROM_ABI inline char* __append9(char* __first, uint32_t __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __append9(char* __first, uint32_t __value) noexcept {
   return __itoa::__append8(__itoa::__append1(__first, __value / 100000000), __value % 100000000);
 }
 
 template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI char* __append10(char* __first, _Tp __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI char* __append10(char* __first, _Tp __value) noexcept {
   return __itoa::__append8(__itoa::__append2(__first, static_cast<uint32_t>(__value / 100000000)),
                            static_cast<uint32_t>(__value % 100000000));
 }
 
-_LIBCPP_HIDE_FROM_ABI inline char* __base_10_u32(char* __first, uint32_t __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __base_10_u32(char* __first, uint32_t __value) noexcept {
   if (__value < 1000000) {
     if (__value < 10000) {
       if (__value < 100) {
@@ -107,7 +107,7 @@ _LIBCPP_HIDE_FROM_ABI inline char* __base_10_u32(char* __first, uint32_t __value
   return __itoa::__append10(__first, __value);
 }
 
-_LIBCPP_HIDE_FROM_ABI inline char* __base_10_u64(char* __buffer, uint64_t __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __base_10_u64(char* __buffer, uint64_t __value) noexcept {
   if (__value <= UINT32_MAX)
     return __itoa::__base_10_u32(__buffer, static_cast<uint32_t>(__value));
 
@@ -121,7 +121,7 @@ _LIBCPP_HIDE_FROM_ABI inline char* __base_10_u64(char* __buffer, uint64_t __valu
   return __itoa::__append10(__buffer, __value);
 }
 
-#  ifndef _LIBCPP_HAS_NO_INT128
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
 /// \returns 10^\a exp
 ///
 /// \pre \a exp [19, 39]
@@ -129,13 +129,13 @@ _LIBCPP_HIDE_FROM_ABI inline char* __base_10_u64(char* __buffer, uint64_t __valu
 /// \note The lookup table contains a partial set of exponents limiting the
 /// range that can be used. However the range is sufficient for
 /// \ref __base_10_u128.
-_LIBCPP_HIDE_FROM_ABI inline __uint128_t __pow_10(int __exp) noexcept {
-  _LIBCPP_ASSERT(__exp >= __table<>::__pow10_128_offset, "Index out of bounds");
+_LIBCUDACXX_HIDE_FROM_ABI inline __uint128_t __pow_10(int __exp) noexcept {
+  _LIBCUDACXX_ASSERT(__exp >= __table<>::__pow10_128_offset, "Index out of bounds");
   return __table<>::__pow10_128[__exp - __table<>::__pow10_128_offset];
 }
 
-_LIBCPP_HIDE_FROM_ABI inline char* __base_10_u128(char* __buffer, __uint128_t __value) noexcept {
-  _LIBCPP_ASSERT(
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __base_10_u128(char* __buffer, __uint128_t __value) noexcept {
+  _LIBCUDACXX_ASSERT(
       __value > numeric_limits<uint64_t>::max(), "The optimizations for this algorithm fail when this isn't true.");
 
   // Unlike the 64 to 32 bit case the 128 bit case the "upper half" can't be
@@ -176,10 +176,10 @@ _LIBCPP_HIDE_FROM_ABI inline char* __base_10_u128(char* __buffer, __uint128_t __
 #  endif
 } // namespace __itoa
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___CHARCONV_TO_CHARS_BASE_10_H
+#endif // _LIBCUDACXX___CHARCONV_TO_CHARS_BASE_10_H

diff  --git a/libcxx/include/__charconv/to_chars_result.h b/libcxx/include/__charconv/to_chars_result.h
index b4bc6ac2635b..e9531a2fb4aa 100644
--- a/libcxx/include/__charconv/to_chars_result.h
+++ b/libcxx/include/__charconv/to_chars_result.h
@@ -7,31 +7,31 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHARCONV_TO_CHARS_RESULT_H
-#define _LIBCPP___CHARCONV_TO_CHARS_RESULT_H
+#ifndef _LIBCUDACXX___CHARCONV_TO_CHARS_RESULT_H
+#define _LIBCUDACXX___CHARCONV_TO_CHARS_RESULT_H
 
 #include <__config>
 #include <__errc>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-struct _LIBCPP_TYPE_VIS to_chars_result
+struct _LIBCUDACXX_TYPE_VIS to_chars_result
 {
     char* ptr;
     errc ec;
-#  if _LIBCPP_STD_VER > 17
-    _LIBCPP_HIDE_FROM_ABI friend bool operator==(const to_chars_result&, const to_chars_result&) = default;
+#  if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_HIDE_FROM_ABI friend bool operator==(const to_chars_result&, const to_chars_result&) = default;
 #  endif
 };
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CHARCONV_TO_CHARS_RESULT_H
+#endif // _LIBCUDACXX___CHARCONV_TO_CHARS_RESULT_H

diff  --git a/libcxx/include/__chrono/calendar.h b/libcxx/include/__chrono/calendar.h
index d3762a631c91..23b96ed1823a 100644
--- a/libcxx/include/__chrono/calendar.h
+++ b/libcxx/include/__chrono/calendar.h
@@ -7,20 +7,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_CALENDAR_H
-#define _LIBCPP___CHRONO_CALENDAR_H
+#ifndef _LIBCUDACXX___CHRONO_CALENDAR_H
+#define _LIBCUDACXX___CHRONO_CALENDAR_H
 
 #include <__chrono/duration.h>
 #include <__chrono/time_point.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -31,14 +31,14 @@ using local_time  = time_point<local_t, Duration>;
 using local_seconds = local_time<seconds>;
 using local_days    = local_time<days>;
 
-struct last_spec { _LIBCPP_HIDE_FROM_ABI explicit last_spec() = default; };
+struct last_spec { _LIBCUDACXX_HIDE_FROM_ABI explicit last_spec() = default; };
 inline constexpr last_spec last{};
 
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___CHRONO_CALENDAR_H
+#endif // _LIBCUDACXX___CHRONO_CALENDAR_H

diff  --git a/libcxx/include/__chrono/convert_to_timespec.h b/libcxx/include/__chrono/convert_to_timespec.h
index e8631d135fee..9b377e17d49f 100644
--- a/libcxx/include/__chrono/convert_to_timespec.h
+++ b/libcxx/include/__chrono/convert_to_timespec.h
@@ -6,26 +6,26 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___CHRONO_CONVERT_TO_TIMESPEC_H
-#define _LIBCPP___CHRONO_CONVERT_TO_TIMESPEC_H
+#ifndef _LIBCUDACXX___CHRONO_CONVERT_TO_TIMESPEC_H
+#define _LIBCUDACXX___CHRONO_CONVERT_TO_TIMESPEC_H
 
 #include <__chrono/duration.h>
 #include <__config>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Convert a nanoseconds duration to the given TimeSpec type, which must have
 // the same properties as std::timespec.
 template <class _TimeSpec>
-_LIBCPP_HIDE_FROM_ABI inline
+_LIBCUDACXX_HIDE_FROM_ABI inline
 _TimeSpec __convert_to_timespec(const chrono::nanoseconds& __ns)
 {
   using namespace chrono;
@@ -48,8 +48,8 @@ _TimeSpec __convert_to_timespec(const chrono::nanoseconds& __ns)
   return __ts;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___CHRONO_CONVERT_TO_TIMESPEC_H
+#endif // _LIBCUDACXX___CHRONO_CONVERT_TO_TIMESPEC_H

diff  --git a/libcxx/include/__chrono/day.h b/libcxx/include/__chrono/day.h
index d9fa4ffbc45e..7f9cdf247a4d 100644
--- a/libcxx/include/__chrono/day.h
+++ b/libcxx/include/__chrono/day.h
@@ -7,20 +7,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_DAY_H
-#define _LIBCPP___CHRONO_DAY_H
+#ifndef _LIBCUDACXX___CHRONO_DAY_H
+#define _LIBCUDACXX___CHRONO_DAY_H
 
 #include <__chrono/duration.h>
 #include <__config>
 #include <compare>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -29,56 +29,56 @@ class day {
 private:
     unsigned char __d;
 public:
-    _LIBCPP_HIDE_FROM_ABI day() = default;
-    _LIBCPP_HIDE_FROM_ABI explicit inline constexpr day(unsigned __val) noexcept : __d(static_cast<unsigned char>(__val)) {}
-    _LIBCPP_HIDE_FROM_ABI inline constexpr day& operator++()    noexcept { ++__d; return *this; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr day  operator++(int) noexcept { day __tmp = *this; ++(*this); return __tmp; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr day& operator--()    noexcept { --__d; return *this; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr day  operator--(int) noexcept { day __tmp = *this; --(*this); return __tmp; }
-    _LIBCPP_HIDE_FROM_ABI        constexpr day& operator+=(const days& __dd) noexcept;
-    _LIBCPP_HIDE_FROM_ABI        constexpr day& operator-=(const days& __dd) noexcept;
-    _LIBCPP_HIDE_FROM_ABI explicit inline constexpr operator unsigned() const noexcept { return __d; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __d >= 1 && __d <= 31; }
+    _LIBCUDACXX_HIDE_FROM_ABI day() = default;
+    _LIBCUDACXX_HIDE_FROM_ABI explicit inline constexpr day(unsigned __val) noexcept : __d(static_cast<unsigned char>(__val)) {}
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr day& operator++()    noexcept { ++__d; return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr day  operator++(int) noexcept { day __tmp = *this; ++(*this); return __tmp; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr day& operator--()    noexcept { --__d; return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr day  operator--(int) noexcept { day __tmp = *this; --(*this); return __tmp; }
+    _LIBCUDACXX_HIDE_FROM_ABI        constexpr day& operator+=(const days& __dd) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI        constexpr day& operator-=(const days& __dd) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI explicit inline constexpr operator unsigned() const noexcept { return __d; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __d >= 1 && __d <= 31; }
   };
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const day& __lhs, const day& __rhs) noexcept
 { return static_cast<unsigned>(__lhs) == static_cast<unsigned>(__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI constexpr strong_ordering operator<=>(const day& __lhs, const day& __rhs) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr strong_ordering operator<=>(const day& __lhs, const day& __rhs) noexcept {
   return static_cast<unsigned>(__lhs) <=> static_cast<unsigned>(__rhs);
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 day operator+ (const day& __lhs, const days& __rhs) noexcept
 { return day(static_cast<unsigned>(__lhs) + __rhs.count()); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 day operator+ (const days& __lhs, const day& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 day operator- (const day& __lhs, const days& __rhs) noexcept
 { return __lhs + -__rhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 days operator-(const day& __lhs, const day& __rhs) noexcept
 { return days(static_cast<int>(static_cast<unsigned>(__lhs)) -
               static_cast<int>(static_cast<unsigned>(__rhs))); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 day& day::operator+=(const days& __dd) noexcept
 { *this = *this + __dd; return *this; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 day& day::operator-=(const days& __dd) noexcept
 { *this = *this - __dd; return *this; }
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___CHRONO_DAY_H
+#endif // _LIBCUDACXX___CHRONO_DAY_H

diff  --git a/libcxx/include/__chrono/duration.h b/libcxx/include/__chrono/duration.h
index c502574fb267..8cde90f0652a 100644
--- a/libcxx/include/__chrono/duration.h
+++ b/libcxx/include/__chrono/duration.h
@@ -7,27 +7,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_DURATION_H
-#define _LIBCPP___CHRONO_DURATION_H
+#ifndef _LIBCUDACXX___CHRONO_DURATION_H
+#define _LIBCUDACXX___CHRONO_DURATION_H
 
 #include <__config>
 #include <limits>
 #include <ratio>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
 
-template <class _Rep, class _Period = ratio<1> > class _LIBCPP_TEMPLATE_VIS duration;
+template <class _Rep, class _Period = ratio<1> > class _LIBCUDACXX_TEMPLATE_VIS duration;
 
 template <class _Tp>
 struct __is_duration : false_type {};
@@ -47,7 +47,7 @@ struct __is_duration<const volatile duration<_Rep, _Period> > : true_type  {};
 } // namespace chrono
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-struct _LIBCPP_TEMPLATE_VIS common_type<chrono::duration<_Rep1, _Period1>,
+struct _LIBCUDACXX_TEMPLATE_VIS common_type<chrono::duration<_Rep1, _Period1>,
                                          chrono::duration<_Rep2, _Period2> >
 {
     typedef chrono::duration<typename common_type<_Rep1, _Rep2>::type,
@@ -67,7 +67,7 @@ struct __duration_cast;
 template <class _FromDuration, class _ToDuration, class _Period>
 struct __duration_cast<_FromDuration, _ToDuration, _Period, true, true>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     _ToDuration operator()(const _FromDuration& __fd) const
     {
         return _ToDuration(static_cast<typename _ToDuration::rep>(__fd.count()));
@@ -77,7 +77,7 @@ struct __duration_cast<_FromDuration, _ToDuration, _Period, true, true>
 template <class _FromDuration, class _ToDuration, class _Period>
 struct __duration_cast<_FromDuration, _ToDuration, _Period, true, false>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     _ToDuration operator()(const _FromDuration& __fd) const
     {
         typedef typename common_type<typename _ToDuration::rep, typename _FromDuration::rep, intmax_t>::type _Ct;
@@ -89,7 +89,7 @@ struct __duration_cast<_FromDuration, _ToDuration, _Period, true, false>
 template <class _FromDuration, class _ToDuration, class _Period>
 struct __duration_cast<_FromDuration, _ToDuration, _Period, false, true>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     _ToDuration operator()(const _FromDuration& __fd) const
     {
         typedef typename common_type<typename _ToDuration::rep, typename _FromDuration::rep, intmax_t>::type _Ct;
@@ -101,7 +101,7 @@ struct __duration_cast<_FromDuration, _ToDuration, _Period, false, true>
 template <class _FromDuration, class _ToDuration, class _Period>
 struct __duration_cast<_FromDuration, _ToDuration, _Period, false, false>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     _ToDuration operator()(const _FromDuration& __fd) const
     {
         typedef typename common_type<typename _ToDuration::rep, typename _FromDuration::rep, intmax_t>::type _Ct;
@@ -112,8 +112,8 @@ struct __duration_cast<_FromDuration, _ToDuration, _Period, false, false>
 };
 
 template <class _ToDuration, class _Rep, class _Period>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     __is_duration<_ToDuration>::value,
@@ -125,25 +125,25 @@ duration_cast(const duration<_Rep, _Period>& __fd)
 }
 
 template <class _Rep>
-struct _LIBCPP_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {};
+struct _LIBCUDACXX_TEMPLATE_VIS treat_as_floating_point : is_floating_point<_Rep> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Rep>
 inline constexpr bool treat_as_floating_point_v = treat_as_floating_point<_Rep>::value;
 #endif
 
 template <class _Rep>
-struct _LIBCPP_TEMPLATE_VIS duration_values
+struct _LIBCUDACXX_TEMPLATE_VIS duration_values
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR _Rep zero() _NOEXCEPT {return _Rep(0);}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR _Rep max()  _NOEXCEPT {return numeric_limits<_Rep>::max();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR _Rep min()  _NOEXCEPT {return numeric_limits<_Rep>::lowest();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR _Rep zero() _NOEXCEPT {return _Rep(0);}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR _Rep max()  _NOEXCEPT {return numeric_limits<_Rep>::max();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR _Rep min()  _NOEXCEPT {return numeric_limits<_Rep>::lowest();}
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _ToDuration, class _Rep, class _Period>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     __is_duration<_ToDuration>::value,
@@ -158,7 +158,7 @@ floor(const duration<_Rep, _Period>& __d)
 }
 
 template <class _ToDuration, class _Rep, class _Period>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     __is_duration<_ToDuration>::value,
@@ -173,7 +173,7 @@ ceil(const duration<_Rep, _Period>& __d)
 }
 
 template <class _ToDuration, class _Rep, class _Period>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     __is_duration<_ToDuration>::value,
@@ -196,7 +196,7 @@ round(const duration<_Rep, _Period>& __d)
 // duration
 
 template <class _Rep, class _Period>
-class _LIBCPP_TEMPLATE_VIS duration
+class _LIBCUDACXX_TEMPLATE_VIS duration
 {
     static_assert(!__is_duration<_Rep>::value, "A duration representation can not be a duration");
     static_assert(__is_ratio<_Period>::value, "Second template parameter of duration must be a std::ratio");
@@ -239,15 +239,15 @@ class _LIBCPP_TEMPLATE_VIS duration
     rep __rep_;
 public:
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-#ifndef _LIBCPP_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+#ifndef _LIBCUDACXX_CXX03_LANG
         duration() = default;
 #else
         duration() {}
 #endif
 
     template <class _Rep2>
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
         explicit duration(const _Rep2& __r,
             typename enable_if
             <
@@ -259,7 +259,7 @@ class _LIBCPP_TEMPLATE_VIS duration
 
     // conversions
     template <class _Rep2, class _Period2>
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
         duration(const duration<_Rep2, _Period2>& __d,
             typename enable_if
             <
@@ -272,30 +272,30 @@ class _LIBCPP_TEMPLATE_VIS duration
 
     // observer
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR rep count() const {return __rep_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR rep count() const {return __rep_;}
 
     // arithmetic
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator+() const {return typename common_type<duration>::type(*this);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename common_type<duration>::type operator-() const {return typename common_type<duration>::type(-__rep_);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator++()      {++__rep_; return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration  operator++(int)   {return duration(__rep_++);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator--()      {--__rep_; return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration  operator--(int)   {return duration(__rep_--);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR typename common_type<duration>::type operator+() const {return typename common_type<duration>::type(*this);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR typename common_type<duration>::type operator-() const {return typename common_type<duration>::type(-__rep_);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 duration& operator++()      {++__rep_; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 duration  operator++(int)   {return duration(__rep_++);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 duration& operator--()      {--__rep_; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 duration  operator--(int)   {return duration(__rep_--);}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 duration& operator+=(const duration& __d) {__rep_ += __d.count(); return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 duration& operator-=(const duration& __d) {__rep_ -= __d.count(); return *this;}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator*=(const rep& __rhs) {__rep_ *= __rhs; return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator/=(const rep& __rhs) {__rep_ /= __rhs; return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const rep& __rhs) {__rep_ %= __rhs; return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 duration& operator%=(const duration& __rhs) {__rep_ %= __rhs.count(); return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 duration& operator*=(const rep& __rhs) {__rep_ *= __rhs; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 duration& operator/=(const rep& __rhs) {__rep_ /= __rhs; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 duration& operator%=(const rep& __rhs) {__rep_ %= __rhs; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 duration& operator%=(const duration& __rhs) {__rep_ %= __rhs.count(); return *this;}
 
     // special values
 
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR duration zero() _NOEXCEPT {return duration(duration_values<rep>::zero());}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR duration min()  _NOEXCEPT {return duration(duration_values<rep>::min());}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR duration max()  _NOEXCEPT {return duration(duration_values<rep>::max());}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR duration zero() _NOEXCEPT {return duration(duration_values<rep>::zero());}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR duration min()  _NOEXCEPT {return duration(duration_values<rep>::min());}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR duration max()  _NOEXCEPT {return duration(duration_values<rep>::max());}
 };
 
 typedef duration<long long,         nano> nanoseconds;
@@ -304,7 +304,7 @@ typedef duration<long long,        milli> milliseconds;
 typedef duration<long long              > seconds;
 typedef duration<     long, ratio<  60> > minutes;
 typedef duration<     long, ratio<3600> > hours;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 typedef duration<     int, ratio_multiply<ratio<24>, hours::period>>         days;
 typedef duration<     int, ratio_multiply<ratio<7>,   days::period>>         weeks;
 typedef duration<     int, ratio_multiply<ratio<146097, 400>, days::period>> years;
@@ -315,7 +315,7 @@ typedef duration<     int, ratio_divide<years::period, ratio<12>>>           mon
 template <class _LhsDuration, class _RhsDuration>
 struct __duration_eq
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs) const
         {
             typedef typename common_type<_LhsDuration, _RhsDuration>::type _Ct;
@@ -326,14 +326,14 @@ struct __duration_eq
 template <class _LhsDuration>
 struct __duration_eq<_LhsDuration, _LhsDuration>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs) const
         {return __lhs.count() == __rhs.count();}
 };
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 bool
 operator==(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -343,8 +343,8 @@ operator==(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period
 // Duration !=
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 bool
 operator!=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -356,7 +356,7 @@ operator!=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period
 template <class _LhsDuration, class _RhsDuration>
 struct __duration_lt
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     bool operator()(const _LhsDuration& __lhs, const _RhsDuration& __rhs) const
         {
             typedef typename common_type<_LhsDuration, _RhsDuration>::type _Ct;
@@ -367,14 +367,14 @@ struct __duration_lt
 template <class _LhsDuration>
 struct __duration_lt<_LhsDuration, _LhsDuration>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     bool operator()(const _LhsDuration& __lhs, const _LhsDuration& __rhs) const
         {return __lhs.count() < __rhs.count();}
 };
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 bool
 operator< (const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -384,8 +384,8 @@ operator< (const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period
 // Duration >
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 bool
 operator> (const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -395,8 +395,8 @@ operator> (const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period
 // Duration <=
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 bool
 operator<=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -406,8 +406,8 @@ operator<=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period
 // Duration >=
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 bool
 operator>=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -417,8 +417,8 @@ operator>=(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period
 // Duration +
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
 operator+(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -429,8 +429,8 @@ operator+(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
 // Duration -
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
 operator-(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -441,8 +441,8 @@ operator-(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
 // Duration *
 
 template <class _Rep1, class _Period, class _Rep2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     is_convertible<_Rep2, typename common_type<_Rep1, _Rep2>::type>::value,
@@ -456,8 +456,8 @@ operator*(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
 }
 
 template <class _Rep1, class _Period, class _Rep2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     is_convertible<_Rep1, typename common_type<_Rep1, _Rep2>::type>::value,
@@ -471,8 +471,8 @@ operator*(const _Rep1& __s, const duration<_Rep2, _Period>& __d)
 // Duration /
 
 template <class _Rep1, class _Period, class _Rep2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     !__is_duration<_Rep2>::value &&
@@ -487,8 +487,8 @@ operator/(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
 }
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 typename common_type<_Rep1, _Rep2>::type
 operator/(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -499,8 +499,8 @@ operator/(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
 // Duration %
 
 template <class _Rep1, class _Period, class _Rep2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     !__is_duration<_Rep2>::value &&
@@ -515,8 +515,8 @@ operator%(const duration<_Rep1, _Period>& __d, const _Rep2& __s)
 }
 
 template <class _Rep1, class _Period1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 typename common_type<duration<_Rep1, _Period1>, duration<_Rep2, _Period2> >::type
 operator%(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -527,7 +527,7 @@ operator%(const duration<_Rep1, _Period1>& __lhs, const duration<_Rep2, _Period2
 
 } // namespace chrono
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 // Suffixes for duration literals [time.duration.literals]
 inline namespace literals
 {
@@ -606,10 +606,10 @@ namespace chrono { // hoist the literals into namespace std::chrono
    using namespace literals::chrono_literals;
 } // namespace chrono
 
-#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER > 11
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___CHRONO_DURATION_H
+#endif // _LIBCUDACXX___CHRONO_DURATION_H

diff  --git a/libcxx/include/__chrono/file_clock.h b/libcxx/include/__chrono/file_clock.h
index b8e08e78ba72..7845cdf73306 100644
--- a/libcxx/include/__chrono/file_clock.h
+++ b/libcxx/include/__chrono/file_clock.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_FILE_CLOCK_H
-#define _LIBCPP___CHRONO_FILE_CLOCK_H
+#ifndef _LIBCUDACXX___CHRONO_FILE_CLOCK_H
+#define _LIBCUDACXX___CHRONO_FILE_CLOCK_H
 
 #include <__availability>
 #include <__chrono/duration.h>
@@ -17,19 +17,19 @@
 #include <__config>
 #include <ratio>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+#ifndef _LIBCUDACXX_CXX03_LANG
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 struct _FilesystemClock;
-_LIBCPP_END_NAMESPACE_FILESYSTEM
-#endif // !_LIBCPP_CXX03_LANG
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
+#endif // !_LIBCUDACXX_CXX03_LANG
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -42,14 +42,14 @@ using file_time = time_point<file_clock, _Duration>;
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#ifndef _LIBCPP_CXX03_LANG
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+#ifndef _LIBCUDACXX_CXX03_LANG
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 struct _FilesystemClock {
-#if !defined(_LIBCPP_HAS_NO_INT128)
+#if !defined(_LIBCUDACXX_HAS_NO_INT128)
   typedef __int128_t rep;
   typedef nano period;
 #else
@@ -60,26 +60,26 @@ struct _FilesystemClock {
   typedef chrono::duration<rep, period> duration;
   typedef chrono::time_point<_FilesystemClock> time_point;
 
-  _LIBCPP_EXPORTED_FROM_ABI
-  static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = false;
+  _LIBCUDACXX_EXPORTED_FROM_ABI
+  static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 const bool is_steady = false;
 
-  _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_FUNC_VIS static time_point now() noexcept;
+  _LIBCUDACXX_AVAILABILITY_FILESYSTEM _LIBCUDACXX_FUNC_VIS static time_point now() noexcept;
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
   template <class _Duration>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static chrono::sys_time<_Duration> to_sys(const chrono::file_time<_Duration>& __t) {
     return chrono::sys_time<_Duration>(__t.time_since_epoch());
   }
 
   template <class _Duration>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static chrono::file_time<_Duration> from_sys(const chrono::sys_time<_Duration>& __t) {
     return chrono::file_time<_Duration>(__t.time_since_epoch());
   }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 };
-_LIBCPP_END_NAMESPACE_FILESYSTEM
-#endif // !_LIBCPP_CXX03_LANG
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
+#endif // !_LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___CHRONO_FILE_CLOCK_H
+#endif // _LIBCUDACXX___CHRONO_FILE_CLOCK_H

diff  --git a/libcxx/include/__chrono/hh_mm_ss.h b/libcxx/include/__chrono/hh_mm_ss.h
index 6b3c5c09e68e..c8582c73bd41 100644
--- a/libcxx/include/__chrono/hh_mm_ss.h
+++ b/libcxx/include/__chrono/hh_mm_ss.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_HH_MM_SS_H
-#define _LIBCPP___CHRONO_HH_MM_SS_H
+#ifndef _LIBCUDACXX___CHRONO_HH_MM_SS_H
+#define _LIBCUDACXX___CHRONO_HH_MM_SS_H
 
 #include <__chrono/duration.h>
 #include <__chrono/time_point.h>
@@ -16,13 +16,13 @@
 #include <ratio>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -34,7 +34,7 @@ class hh_mm_ss
     static_assert(__is_duration<_Duration>::value, "template parameter of hh_mm_ss must be a std::chrono::duration");
     using __CommonType = common_type_t<_Duration, chrono::seconds>;
 
-    _LIBCPP_HIDE_FROM_ABI static constexpr uint64_t __pow10(unsigned __exp)
+    _LIBCUDACXX_HIDE_FROM_ABI static constexpr uint64_t __pow10(unsigned __exp)
     {
         uint64_t __ret = 1;
         for (unsigned __i = 0; __i < __exp; ++__i)
@@ -42,7 +42,7 @@ class hh_mm_ss
         return __ret;
     }
 
-    _LIBCPP_HIDE_FROM_ABI static constexpr unsigned __width(uint64_t __n, uint64_t __d = 10, unsigned __w = 0)
+    _LIBCUDACXX_HIDE_FROM_ABI static constexpr unsigned __width(uint64_t __n, uint64_t __d = 10, unsigned __w = 0)
     {
         if (__n >= 2 && __d != 0 && __w < 19)
             return 1 + __width(__n, __d % __n * 10, __w+1);
@@ -50,13 +50,13 @@ class hh_mm_ss
     }
 
 public:
-    _LIBCPP_HIDE_FROM_ABI static unsigned constexpr fractional_width = __width(__CommonType::period::den) < 19 ?
+    _LIBCUDACXX_HIDE_FROM_ABI static unsigned constexpr fractional_width = __width(__CommonType::period::den) < 19 ?
                                                  __width(__CommonType::period::den) : 6u;
     using precision = duration<typename __CommonType::rep, ratio<1, __pow10(fractional_width)>>;
 
-    _LIBCPP_HIDE_FROM_ABI constexpr hh_mm_ss() noexcept : hh_mm_ss{_Duration::zero()} {}
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr hh_mm_ss() noexcept : hh_mm_ss{_Duration::zero()} {}
 
-    _LIBCPP_HIDE_FROM_ABI constexpr explicit hh_mm_ss(_Duration __d) noexcept :
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr explicit hh_mm_ss(_Duration __d) noexcept :
         __is_neg(__d < _Duration(0)),
         __h(duration_cast<chrono::hours>  (abs(__d))),
         __m(duration_cast<chrono::minutes>(abs(__d) - hours())),
@@ -64,19 +64,19 @@ class hh_mm_ss
         __f(duration_cast<precision>      (abs(__d) - hours() - minutes() - seconds()))
         {}
 
-    _LIBCPP_HIDE_FROM_ABI constexpr bool is_negative()        const noexcept { return __is_neg; }
-    _LIBCPP_HIDE_FROM_ABI constexpr chrono::hours hours()     const noexcept { return __h; }
-    _LIBCPP_HIDE_FROM_ABI constexpr chrono::minutes minutes() const noexcept { return __m; }
-    _LIBCPP_HIDE_FROM_ABI constexpr chrono::seconds seconds() const noexcept { return __s; }
-    _LIBCPP_HIDE_FROM_ABI constexpr precision subseconds()    const noexcept { return __f; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr bool is_negative()        const noexcept { return __is_neg; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr chrono::hours hours()     const noexcept { return __h; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr chrono::minutes minutes() const noexcept { return __m; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr chrono::seconds seconds() const noexcept { return __s; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr precision subseconds()    const noexcept { return __f; }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr precision to_duration() const noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr precision to_duration() const noexcept
     {
         auto __dur = __h + __m + __s + __f;
         return __is_neg ? -__dur : __dur;
     }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr explicit operator precision() const noexcept { return to_duration(); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr explicit operator precision() const noexcept { return to_duration(); }
 
 private:
     bool            __is_neg;
@@ -86,17 +86,17 @@ class hh_mm_ss
     precision       __f;
 };
 
-_LIBCPP_HIDE_FROM_ABI constexpr bool is_am(const hours& __h) noexcept { return __h >= hours( 0) && __h < hours(12); }
-_LIBCPP_HIDE_FROM_ABI constexpr bool is_pm(const hours& __h) noexcept { return __h >= hours(12) && __h < hours(24); }
+_LIBCUDACXX_HIDE_FROM_ABI constexpr bool is_am(const hours& __h) noexcept { return __h >= hours( 0) && __h < hours(12); }
+_LIBCUDACXX_HIDE_FROM_ABI constexpr bool is_pm(const hours& __h) noexcept { return __h >= hours(12) && __h < hours(24); }
 
-_LIBCPP_HIDE_FROM_ABI constexpr hours make12(const hours& __h) noexcept
+_LIBCUDACXX_HIDE_FROM_ABI constexpr hours make12(const hours& __h) noexcept
 {
     if      (__h == hours( 0)) return hours(12);
     else if (__h <= hours(12)) return __h;
     else                       return __h - hours(12);
 }
 
-_LIBCPP_HIDE_FROM_ABI constexpr hours make24(const hours& __h, bool __is_pm) noexcept
+_LIBCUDACXX_HIDE_FROM_ABI constexpr hours make24(const hours& __h, bool __is_pm) noexcept
 {
     if (__is_pm)
         return __h == hours(12) ? __h : __h + hours(12);
@@ -105,8 +105,8 @@ _LIBCPP_HIDE_FROM_ABI constexpr hours make24(const hours& __h, bool __is_pm) noe
 }
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___CHRONO_HH_MM_SS_H
+#endif // _LIBCUDACXX___CHRONO_HH_MM_SS_H

diff  --git a/libcxx/include/__chrono/high_resolution_clock.h b/libcxx/include/__chrono/high_resolution_clock.h
index 778ff44f3d09..e177b8d5dc79 100644
--- a/libcxx/include/__chrono/high_resolution_clock.h
+++ b/libcxx/include/__chrono/high_resolution_clock.h
@@ -7,23 +7,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_HIGH_RESOLUTION_CLOCK_H
-#define _LIBCPP___CHRONO_HIGH_RESOLUTION_CLOCK_H
+#ifndef _LIBCUDACXX___CHRONO_HIGH_RESOLUTION_CLOCK_H
+#define _LIBCUDACXX___CHRONO_HIGH_RESOLUTION_CLOCK_H
 
 #include <__chrono/steady_clock.h>
 #include <__chrono/system_clock.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
 
-#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
+#ifndef _LIBCUDACXX_HAS_NO_MONOTONIC_CLOCK
 typedef steady_clock high_resolution_clock;
 #else
 typedef system_clock high_resolution_clock;
@@ -31,6 +31,6 @@ typedef system_clock high_resolution_clock;
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CHRONO_HIGH_RESOLUTION_CLOCK_H
+#endif // _LIBCUDACXX___CHRONO_HIGH_RESOLUTION_CLOCK_H

diff  --git a/libcxx/include/__chrono/literals.h b/libcxx/include/__chrono/literals.h
index 50529bd44ad1..4ee4f5973ef5 100644
--- a/libcxx/include/__chrono/literals.h
+++ b/libcxx/include/__chrono/literals.h
@@ -7,31 +7,31 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_LITERALS_H
-#define _LIBCPP___CHRONO_LITERALS_H
+#ifndef _LIBCUDACXX___CHRONO_LITERALS_H
+#define _LIBCUDACXX___CHRONO_LITERALS_H
 
 #include <__chrono/day.h>
 #include <__chrono/year.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 inline namespace literals
 {
   inline namespace chrono_literals
   {
-    _LIBCPP_HIDE_FROM_ABI constexpr chrono::day operator ""d(unsigned long long __d) noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr chrono::day operator ""d(unsigned long long __d) noexcept
     {
         return chrono::day(static_cast<unsigned>(__d));
     }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr chrono::year operator ""y(unsigned long long __y) noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr chrono::year operator ""y(unsigned long long __y) noexcept
     {
         return chrono::year(static_cast<int>(__y));
     }
@@ -42,8 +42,8 @@ namespace chrono { // hoist the literals into namespace std::chrono
    using namespace literals::chrono_literals;
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___CHRONO_LITERALS_H
+#endif // _LIBCUDACXX___CHRONO_LITERALS_H

diff  --git a/libcxx/include/__chrono/month.h b/libcxx/include/__chrono/month.h
index 5aeb5b397182..aa1a719648f1 100644
--- a/libcxx/include/__chrono/month.h
+++ b/libcxx/include/__chrono/month.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_MONTH_H
-#define _LIBCPP___CHRONO_MONTH_H
+#ifndef _LIBCUDACXX___CHRONO_MONTH_H
+#define _LIBCUDACXX___CHRONO_MONTH_H
 
 #include <__chrono/duration.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -28,44 +28,44 @@ class month {
 private:
     unsigned char __m;
 public:
-    _LIBCPP_HIDE_FROM_ABI month() = default;
-    _LIBCPP_HIDE_FROM_ABI explicit inline constexpr month(unsigned __val) noexcept : __m(static_cast<unsigned char>(__val)) {}
-    _LIBCPP_HIDE_FROM_ABI inline constexpr month& operator++()    noexcept { ++__m; return *this; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr month  operator++(int) noexcept { month __tmp = *this; ++(*this); return __tmp; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr month& operator--()    noexcept { --__m; return *this; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr month  operator--(int) noexcept { month __tmp = *this; --(*this); return __tmp; }
-    _LIBCPP_HIDE_FROM_ABI        constexpr month& operator+=(const months& __m1) noexcept;
-    _LIBCPP_HIDE_FROM_ABI        constexpr month& operator-=(const months& __m1) noexcept;
-    _LIBCPP_HIDE_FROM_ABI explicit inline constexpr operator unsigned() const noexcept { return __m; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m >= 1 && __m <= 12; }
+    _LIBCUDACXX_HIDE_FROM_ABI month() = default;
+    _LIBCUDACXX_HIDE_FROM_ABI explicit inline constexpr month(unsigned __val) noexcept : __m(static_cast<unsigned char>(__val)) {}
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr month& operator++()    noexcept { ++__m; return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr month  operator++(int) noexcept { month __tmp = *this; ++(*this); return __tmp; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr month& operator--()    noexcept { --__m; return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr month  operator--(int) noexcept { month __tmp = *this; --(*this); return __tmp; }
+    _LIBCUDACXX_HIDE_FROM_ABI        constexpr month& operator+=(const months& __m1) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI        constexpr month& operator-=(const months& __m1) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI explicit inline constexpr operator unsigned() const noexcept { return __m; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m >= 1 && __m <= 12; }
 };
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const month& __lhs, const month& __rhs) noexcept
 { return static_cast<unsigned>(__lhs) == static_cast<unsigned>(__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const month& __lhs, const month& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator< (const month& __lhs, const month& __rhs) noexcept
 { return static_cast<unsigned>(__lhs)  < static_cast<unsigned>(__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator> (const month& __lhs, const month& __rhs) noexcept
 { return __rhs < __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator<=(const month& __lhs, const month& __rhs) noexcept
 { return !(__rhs < __lhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator>=(const month& __lhs, const month& __rhs) noexcept
 { return !(__lhs < __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month operator+ (const month& __lhs, const months& __rhs) noexcept
 {
     auto const __mu = static_cast<long long>(static_cast<unsigned>(__lhs)) + (__rhs.count() - 1);
@@ -73,26 +73,26 @@ month operator+ (const month& __lhs, const months& __rhs) noexcept
     return month{static_cast<unsigned>(__mu - __yr * 12 + 1)};
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month operator+ (const months& __lhs, const month& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month operator- (const month& __lhs, const months& __rhs) noexcept
 { return __lhs + -__rhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 months operator-(const month& __lhs, const month& __rhs) noexcept
 {
     auto const __dm = static_cast<unsigned>(__lhs) - static_cast<unsigned>(__rhs);
     return months(__dm <= 11 ? __dm : __dm + 12);
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month& month::operator+=(const months& __dm) noexcept
 { *this = *this + __dm; return *this; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month& month::operator-=(const months& __dm) noexcept
 { *this = *this - __dm; return *this; }
 
@@ -111,8 +111,8 @@ inline constexpr month December{12};
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___CHRONO_MONTH_H
+#endif // _LIBCUDACXX___CHRONO_MONTH_H

diff  --git a/libcxx/include/__chrono/month_weekday.h b/libcxx/include/__chrono/month_weekday.h
index 270051397017..a360dc7fbd91 100644
--- a/libcxx/include/__chrono/month_weekday.h
+++ b/libcxx/include/__chrono/month_weekday.h
@@ -7,20 +7,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_MONTH_WEEKDAY_H
-#define _LIBCPP___CHRONO_MONTH_WEEKDAY_H
+#ifndef _LIBCUDACXX___CHRONO_MONTH_WEEKDAY_H
+#define _LIBCUDACXX___CHRONO_MONTH_WEEKDAY_H
 
 #include <__chrono/month.h>
 #include <__chrono/weekday.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -30,34 +30,34 @@ class month_weekday {
     chrono::month __m;
     chrono::weekday_indexed __wdi;
 public:
-    _LIBCPP_HIDE_FROM_ABI constexpr month_weekday(const chrono::month& __mval, const chrono::weekday_indexed& __wdival) noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr month_weekday(const chrono::month& __mval, const chrono::weekday_indexed& __wdival) noexcept
         : __m{__mval}, __wdi{__wdival} {}
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month                     month() const noexcept { return __m; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_indexed weekday_indexed() const noexcept { return __wdi; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr bool                                 ok() const noexcept { return __m.ok() && __wdi.ok(); }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::month                     month() const noexcept { return __m; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::weekday_indexed weekday_indexed() const noexcept { return __wdi; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool                                 ok() const noexcept { return __m.ok() && __wdi.ok(); }
 };
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const month_weekday& __lhs, const month_weekday& __rhs) noexcept
 { return __lhs.month() == __rhs.month() && __lhs.weekday_indexed() == __rhs.weekday_indexed(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const month_weekday& __lhs, const month_weekday& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_weekday operator/(const month& __lhs, const weekday_indexed& __rhs) noexcept
 { return month_weekday{__lhs, __rhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_weekday operator/(int __lhs, const weekday_indexed& __rhs) noexcept
 { return month_weekday{month(__lhs), __rhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_weekday operator/(const weekday_indexed& __lhs, const month& __rhs) noexcept
 { return month_weekday{__rhs, __lhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_weekday operator/(const weekday_indexed& __lhs, int __rhs) noexcept
 { return month_weekday{month(__rhs), __lhs}; }
 
@@ -66,41 +66,41 @@ class month_weekday_last {
     chrono::month        __m;
     chrono::weekday_last __wdl;
   public:
-    _LIBCPP_HIDE_FROM_ABI constexpr month_weekday_last(const chrono::month& __mval, const chrono::weekday_last& __wdlval) noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr month_weekday_last(const chrono::month& __mval, const chrono::weekday_last& __wdlval) noexcept
         : __m{__mval}, __wdl{__wdlval} {}
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month               month() const noexcept { return __m; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_last weekday_last() const noexcept { return __wdl; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr bool                           ok() const noexcept { return __m.ok() && __wdl.ok(); }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::month               month() const noexcept { return __m; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::weekday_last weekday_last() const noexcept { return __wdl; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool                           ok() const noexcept { return __m.ok() && __wdl.ok(); }
 };
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const month_weekday_last& __lhs, const month_weekday_last& __rhs) noexcept
 { return __lhs.month() == __rhs.month() && __lhs.weekday_last() == __rhs.weekday_last(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const month_weekday_last& __lhs, const month_weekday_last& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_weekday_last operator/(const month& __lhs, const weekday_last& __rhs) noexcept
 { return month_weekday_last{__lhs, __rhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_weekday_last operator/(int __lhs, const weekday_last& __rhs) noexcept
 { return month_weekday_last{month(__lhs), __rhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_weekday_last operator/(const weekday_last& __lhs, const month& __rhs) noexcept
 { return month_weekday_last{__rhs, __lhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_weekday_last operator/(const weekday_last& __lhs, int __rhs) noexcept
 { return month_weekday_last{month(__rhs), __lhs}; }
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___CHRONO_MONTH_WEEKDAY_H
+#endif // _LIBCUDACXX___CHRONO_MONTH_WEEKDAY_H

diff  --git a/libcxx/include/__chrono/monthday.h b/libcxx/include/__chrono/monthday.h
index 485f0d4299b5..f9572661bcc8 100644
--- a/libcxx/include/__chrono/monthday.h
+++ b/libcxx/include/__chrono/monthday.h
@@ -7,21 +7,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_MONTHDAY_H
-#define _LIBCPP___CHRONO_MONTHDAY_H
+#ifndef _LIBCUDACXX___CHRONO_MONTHDAY_H
+#define _LIBCUDACXX___CHRONO_MONTHDAY_H
 
 #include <__chrono/calendar.h>
 #include <__chrono/day.h>
 #include <__chrono/month.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -31,15 +31,15 @@ class month_day {
    chrono::month __m;
    chrono::day   __d;
 public:
-    _LIBCPP_HIDE_FROM_ABI month_day() = default;
-    _LIBCPP_HIDE_FROM_ABI constexpr month_day(const chrono::month& __mval, const chrono::day& __dval) noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI month_day() = default;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr month_day(const chrono::month& __mval, const chrono::day& __dval) noexcept
         : __m{__mval}, __d{__dval} {}
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::day   day()   const noexcept { return __d; }
-    _LIBCPP_HIDE_FROM_ABI constexpr bool ok() const noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::day   day()   const noexcept { return __d; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr bool ok() const noexcept;
 };
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool month_day::ok() const noexcept
 {
     if (!__m.ok()) return false;
@@ -54,48 +54,48 @@ bool month_day::ok() const noexcept
     return true;
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const month_day& __lhs, const month_day& __rhs) noexcept
 { return __lhs.month() == __rhs.month() && __lhs.day() == __rhs.day(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const month_day& __lhs, const month_day& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_day operator/(const month& __lhs, const day& __rhs) noexcept
 { return month_day{__lhs, __rhs}; }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 month_day operator/(const day& __lhs, const month& __rhs) noexcept
 { return __rhs / __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_day operator/(const month& __lhs, int __rhs) noexcept
 { return __lhs / day(__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 month_day operator/(int __lhs, const day& __rhs) noexcept
 { return month(__lhs) / __rhs; }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 month_day operator/(const day& __lhs, int __rhs) noexcept
 { return month(__rhs) / __lhs; }
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator< (const month_day& __lhs, const month_day& __rhs) noexcept
 { return __lhs.month() != __rhs.month() ? __lhs.month() < __rhs.month() : __lhs.day() < __rhs.day(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator> (const month_day& __lhs, const month_day& __rhs) noexcept
 { return __rhs < __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator<=(const month_day& __lhs, const month_day& __rhs) noexcept
 { return !(__rhs < __lhs);}
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator>=(const month_day& __lhs, const month_day& __rhs) noexcept
 { return !(__lhs < __rhs); }
 
@@ -105,56 +105,56 @@ class month_day_last {
 private:
     chrono::month __m;
 public:
-    _LIBCPP_HIDE_FROM_ABI explicit constexpr month_day_last(const chrono::month& __val) noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI explicit constexpr month_day_last(const chrono::month& __val) noexcept
         : __m{__val} {}
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m.ok(); }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __m.ok(); }
 };
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
 { return __lhs.month() == __rhs.month(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator< (const month_day_last& __lhs, const month_day_last& __rhs) noexcept
 { return __lhs.month() < __rhs.month(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator> (const month_day_last& __lhs, const month_day_last& __rhs) noexcept
 { return __rhs < __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator<=(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
 { return !(__rhs < __lhs);}
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator>=(const month_day_last& __lhs, const month_day_last& __rhs) noexcept
 { return !(__lhs < __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_day_last operator/(const month& __lhs, last_spec) noexcept
 { return month_day_last{__lhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_day_last operator/(last_spec, const month& __rhs) noexcept
 { return month_day_last{__rhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_day_last operator/(int __lhs, last_spec) noexcept
 { return month_day_last{month(__lhs)}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 month_day_last operator/(last_spec, int __rhs) noexcept
 { return month_day_last{month(__rhs)}; }
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___CHRONO_MONTHDAY_H
+#endif // _LIBCUDACXX___CHRONO_MONTHDAY_H

diff  --git a/libcxx/include/__chrono/steady_clock.h b/libcxx/include/__chrono/steady_clock.h
index 657e5eef6c37..f115ec2a1298 100644
--- a/libcxx/include/__chrono/steady_clock.h
+++ b/libcxx/include/__chrono/steady_clock.h
@@ -7,31 +7,31 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_STEADY_CLOCK_H
-#define _LIBCPP___CHRONO_STEADY_CLOCK_H
+#ifndef _LIBCUDACXX___CHRONO_STEADY_CLOCK_H
+#define _LIBCUDACXX___CHRONO_STEADY_CLOCK_H
 
 #include <__chrono/duration.h>
 #include <__chrono/time_point.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
 
-#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
-class _LIBCPP_TYPE_VIS steady_clock
+#ifndef _LIBCUDACXX_HAS_NO_MONOTONIC_CLOCK
+class _LIBCUDACXX_TYPE_VIS steady_clock
 {
 public:
     typedef nanoseconds                                   duration;
     typedef duration::rep                                 rep;
     typedef duration::period                              period;
     typedef chrono::time_point<steady_clock, duration>    time_point;
-    static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = true;
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 const bool is_steady = true;
 
     static time_point now() _NOEXCEPT;
 };
@@ -39,6 +39,6 @@ class _LIBCPP_TYPE_VIS steady_clock
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CHRONO_STEADY_CLOCK_H
+#endif // _LIBCUDACXX___CHRONO_STEADY_CLOCK_H

diff  --git a/libcxx/include/__chrono/system_clock.h b/libcxx/include/__chrono/system_clock.h
index 2922b78a74cb..dd6bd9436e4f 100644
--- a/libcxx/include/__chrono/system_clock.h
+++ b/libcxx/include/__chrono/system_clock.h
@@ -7,38 +7,38 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_SYSTEM_CLOCK_H
-#define _LIBCPP___CHRONO_SYSTEM_CLOCK_H
+#ifndef _LIBCUDACXX___CHRONO_SYSTEM_CLOCK_H
+#define _LIBCUDACXX___CHRONO_SYSTEM_CLOCK_H
 
 #include <__chrono/duration.h>
 #include <__chrono/time_point.h>
 #include <__config>
 #include <ctime>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
 
-class _LIBCPP_TYPE_VIS system_clock
+class _LIBCUDACXX_TYPE_VIS system_clock
 {
 public:
     typedef microseconds                     duration;
     typedef duration::rep                    rep;
     typedef duration::period                 period;
     typedef chrono::time_point<system_clock> time_point;
-    static _LIBCPP_CONSTEXPR_AFTER_CXX11 const bool is_steady = false;
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 const bool is_steady = false;
 
     static time_point now() _NOEXCEPT;
     static time_t     to_time_t  (const time_point& __t) _NOEXCEPT;
     static time_point from_time_t(time_t __t) _NOEXCEPT;
 };
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _Duration>
 using sys_time    = time_point<system_clock, _Duration>;
@@ -49,6 +49,6 @@ using sys_days    = sys_time<days>;
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CHRONO_SYSTEM_CLOCK_H
+#endif // _LIBCUDACXX___CHRONO_SYSTEM_CLOCK_H

diff  --git a/libcxx/include/__chrono/time_point.h b/libcxx/include/__chrono/time_point.h
index 63d67d77dd05..f6270062a89c 100644
--- a/libcxx/include/__chrono/time_point.h
+++ b/libcxx/include/__chrono/time_point.h
@@ -7,28 +7,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_TIME_POINT_H
-#define _LIBCPP___CHRONO_TIME_POINT_H
+#ifndef _LIBCUDACXX___CHRONO_TIME_POINT_H
+#define _LIBCUDACXX___CHRONO_TIME_POINT_H
 
 #include <__chrono/duration.h>
 #include <__config>
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
 
 template <class _Clock, class _Duration = typename _Clock::duration>
-class _LIBCPP_TEMPLATE_VIS time_point
+class _LIBCUDACXX_TEMPLATE_VIS time_point
 {
     static_assert(__is_duration<_Duration>::value,
                   "Second template parameter of time_point must be a std::chrono::duration");
@@ -41,12 +41,12 @@ class _LIBCPP_TEMPLATE_VIS time_point
     duration __d_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 time_point() : __d_(duration::zero()) {}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit time_point(const duration& __d) : __d_(__d) {}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 time_point() : __d_(duration::zero()) {}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 explicit time_point(const duration& __d) : __d_(__d) {}
 
     // conversions
     template <class _Duration2>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     time_point(const time_point<clock, _Duration2>& __t,
         typename enable_if
         <
@@ -56,23 +56,23 @@ class _LIBCPP_TEMPLATE_VIS time_point
 
     // observer
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 duration time_since_epoch() const {return __d_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 duration time_since_epoch() const {return __d_;}
 
     // arithmetic
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 time_point& operator+=(const duration& __d) {__d_ += __d; return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 time_point& operator+=(const duration& __d) {__d_ += __d; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 time_point& operator-=(const duration& __d) {__d_ -= __d; return *this;}
 
     // special values
 
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR time_point min() _NOEXCEPT {return time_point(duration::min());}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR time_point max() _NOEXCEPT {return time_point(duration::max());}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR time_point min() _NOEXCEPT {return time_point(duration::min());}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR time_point max() _NOEXCEPT {return time_point(duration::max());}
 };
 
 } // namespace chrono
 
 template <class _Clock, class _Duration1, class _Duration2>
-struct _LIBCPP_TEMPLATE_VIS common_type<chrono::time_point<_Clock, _Duration1>,
+struct _LIBCUDACXX_TEMPLATE_VIS common_type<chrono::time_point<_Clock, _Duration1>,
                                          chrono::time_point<_Clock, _Duration2> >
 {
     typedef chrono::time_point<_Clock, typename common_type<_Duration1, _Duration2>::type> type;
@@ -81,16 +81,16 @@ struct _LIBCPP_TEMPLATE_VIS common_type<chrono::time_point<_Clock, _Duration1>,
 namespace chrono {
 
 template <class _ToDuration, class _Clock, class _Duration>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 time_point<_Clock, _ToDuration>
 time_point_cast(const time_point<_Clock, _Duration>& __t)
 {
     return time_point<_Clock, _ToDuration>(chrono::duration_cast<_ToDuration>(__t.time_since_epoch()));
 }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _ToDuration, class _Clock, class _Duration>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     __is_duration<_ToDuration>::value,
@@ -102,7 +102,7 @@ floor(const time_point<_Clock, _Duration>& __t)
 }
 
 template <class _ToDuration, class _Clock, class _Duration>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     __is_duration<_ToDuration>::value,
@@ -114,7 +114,7 @@ ceil(const time_point<_Clock, _Duration>& __t)
 }
 
 template <class _ToDuration, class _Clock, class _Duration>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     __is_duration<_ToDuration>::value,
@@ -126,7 +126,7 @@ round(const time_point<_Clock, _Duration>& __t)
 }
 
 template <class _Rep, class _Period>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename enable_if
 <
     numeric_limits<_Rep>::is_signed,
@@ -136,12 +136,12 @@ abs(duration<_Rep, _Period> __d)
 {
     return __d >= __d.zero() ? +__d : -__d;
 }
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
 // time_point ==
 
 template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator==(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
 {
@@ -151,7 +151,7 @@ operator==(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
 // time_point !=
 
 template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator!=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
 {
@@ -161,7 +161,7 @@ operator!=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
 // time_point <
 
 template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator<(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
 {
@@ -171,7 +171,7 @@ operator<(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
 // time_point >
 
 template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator>(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
 {
@@ -181,7 +181,7 @@ operator>(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
 // time_point <=
 
 template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator<=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
 {
@@ -191,7 +191,7 @@ operator<=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
 // time_point >=
 
 template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator>=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
 {
@@ -201,7 +201,7 @@ operator>=(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
 // time_point operator+(time_point x, duration y);
 
 template <class _Clock, class _Duration1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
 operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -212,7 +212,7 @@ operator+(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Pe
 // time_point operator+(duration x, time_point y);
 
 template <class _Rep1, class _Period1, class _Clock, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 time_point<_Clock, typename common_type<duration<_Rep1, _Period1>, _Duration2>::type>
 operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
 {
@@ -222,7 +222,7 @@ operator+(const duration<_Rep1, _Period1>& __lhs, const time_point<_Clock, _Dura
 // time_point operator-(time_point x, duration y);
 
 template <class _Clock, class _Duration1, class _Rep2, class _Period2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 time_point<_Clock, typename common_type<_Duration1, duration<_Rep2, _Period2> >::type>
 operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Period2>& __rhs)
 {
@@ -233,7 +233,7 @@ operator-(const time_point<_Clock, _Duration1>& __lhs, const duration<_Rep2, _Pe
 // duration operator-(time_point x, time_point y);
 
 template <class _Clock, class _Duration1, class _Duration2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 typename common_type<_Duration1, _Duration2>::type
 operator-(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock, _Duration2>& __rhs)
 {
@@ -242,8 +242,8 @@ operator-(const time_point<_Clock, _Duration1>& __lhs, const time_point<_Clock,
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___CHRONO_TIME_POINT_H
+#endif // _LIBCUDACXX___CHRONO_TIME_POINT_H

diff  --git a/libcxx/include/__chrono/weekday.h b/libcxx/include/__chrono/weekday.h
index bad6781110f1..e87a0b180767 100644
--- a/libcxx/include/__chrono/weekday.h
+++ b/libcxx/include/__chrono/weekday.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_WEEKDAY_H
-#define _LIBCPP___CHRONO_WEEKDAY_H
+#ifndef _LIBCUDACXX___CHRONO_WEEKDAY_H
+#define _LIBCUDACXX___CHRONO_WEEKDAY_H
 
 #include <__chrono/calendar.h>
 #include <__chrono/duration.h>
@@ -16,13 +16,13 @@
 #include <__chrono/time_point.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -33,31 +33,31 @@ class weekday_last;
 class weekday {
 private:
     unsigned char __wd;
-    _LIBCPP_HIDE_FROM_ABI static constexpr unsigned char __weekday_from_days(int __days) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI static constexpr unsigned char __weekday_from_days(int __days) noexcept;
 public:
-  _LIBCPP_HIDE_FROM_ABI weekday() = default;
-  _LIBCPP_HIDE_FROM_ABI inline explicit constexpr weekday(unsigned __val) noexcept : __wd(static_cast<unsigned char>(__val == 7 ? 0 : __val)) {}
-  _LIBCPP_HIDE_FROM_ABI inline constexpr          weekday(const sys_days& __sysd) noexcept
+  _LIBCUDACXX_HIDE_FROM_ABI weekday() = default;
+  _LIBCUDACXX_HIDE_FROM_ABI inline explicit constexpr weekday(unsigned __val) noexcept : __wd(static_cast<unsigned char>(__val == 7 ? 0 : __val)) {}
+  _LIBCUDACXX_HIDE_FROM_ABI inline constexpr          weekday(const sys_days& __sysd) noexcept
           : __wd(__weekday_from_days(__sysd.time_since_epoch().count())) {}
-  _LIBCPP_HIDE_FROM_ABI inline explicit constexpr weekday(const local_days& __locd) noexcept
+  _LIBCUDACXX_HIDE_FROM_ABI inline explicit constexpr weekday(const local_days& __locd) noexcept
           : __wd(__weekday_from_days(__locd.time_since_epoch().count())) {}
 
-  _LIBCPP_HIDE_FROM_ABI inline constexpr weekday& operator++()    noexcept { __wd = (__wd == 6 ? 0 : __wd + 1); return *this; }
-  _LIBCPP_HIDE_FROM_ABI inline constexpr weekday  operator++(int) noexcept { weekday __tmp = *this; ++(*this); return __tmp; }
-  _LIBCPP_HIDE_FROM_ABI inline constexpr weekday& operator--()    noexcept { __wd = (__wd == 0 ? 6 : __wd - 1); return *this; }
-  _LIBCPP_HIDE_FROM_ABI inline constexpr weekday  operator--(int) noexcept { weekday __tmp = *this; --(*this); return __tmp; }
-  _LIBCPP_HIDE_FROM_ABI        constexpr weekday& operator+=(const days& __dd) noexcept;
-  _LIBCPP_HIDE_FROM_ABI        constexpr weekday& operator-=(const days& __dd) noexcept;
-  _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned c_encoding()   const noexcept { return __wd; }
-  _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned iso_encoding() const noexcept { return __wd == 0u ? 7 : __wd; }
-  _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __wd <= 6; }
-  _LIBCPP_HIDE_FROM_ABI        constexpr weekday_indexed operator[](unsigned __index) const noexcept;
-  _LIBCPP_HIDE_FROM_ABI        constexpr weekday_last    operator[](last_spec) const noexcept;
+  _LIBCUDACXX_HIDE_FROM_ABI inline constexpr weekday& operator++()    noexcept { __wd = (__wd == 6 ? 0 : __wd + 1); return *this; }
+  _LIBCUDACXX_HIDE_FROM_ABI inline constexpr weekday  operator++(int) noexcept { weekday __tmp = *this; ++(*this); return __tmp; }
+  _LIBCUDACXX_HIDE_FROM_ABI inline constexpr weekday& operator--()    noexcept { __wd = (__wd == 0 ? 6 : __wd - 1); return *this; }
+  _LIBCUDACXX_HIDE_FROM_ABI inline constexpr weekday  operator--(int) noexcept { weekday __tmp = *this; --(*this); return __tmp; }
+  _LIBCUDACXX_HIDE_FROM_ABI        constexpr weekday& operator+=(const days& __dd) noexcept;
+  _LIBCUDACXX_HIDE_FROM_ABI        constexpr weekday& operator-=(const days& __dd) noexcept;
+  _LIBCUDACXX_HIDE_FROM_ABI inline constexpr unsigned c_encoding()   const noexcept { return __wd; }
+  _LIBCUDACXX_HIDE_FROM_ABI inline constexpr unsigned iso_encoding() const noexcept { return __wd == 0u ? 7 : __wd; }
+  _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __wd <= 6; }
+  _LIBCUDACXX_HIDE_FROM_ABI        constexpr weekday_indexed operator[](unsigned __index) const noexcept;
+  _LIBCUDACXX_HIDE_FROM_ABI        constexpr weekday_last    operator[](last_spec) const noexcept;
 };
 
 
 // https://howardhinnant.github.io/date_algorithms.html#weekday_from_days
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 unsigned char weekday::__weekday_from_days(int __days) noexcept
 {
     return static_cast<unsigned char>(
@@ -65,31 +65,31 @@ unsigned char weekday::__weekday_from_days(int __days) noexcept
            );
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const weekday& __lhs, const weekday& __rhs) noexcept
 { return __lhs.c_encoding() == __rhs.c_encoding(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const weekday& __lhs, const weekday& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator< (const weekday& __lhs, const weekday& __rhs) noexcept
 { return __lhs.c_encoding() < __rhs.c_encoding(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator> (const weekday& __lhs, const weekday& __rhs) noexcept
 { return __rhs < __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator<=(const weekday& __lhs, const weekday& __rhs) noexcept
 { return !(__rhs < __lhs);}
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator>=(const weekday& __lhs, const weekday& __rhs) noexcept
 { return !(__lhs < __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 weekday operator+(const weekday& __lhs, const days& __rhs) noexcept
 {
     auto const __mu = static_cast<long long>(__lhs.c_encoding()) + __rhs.count();
@@ -97,15 +97,15 @@ weekday operator+(const weekday& __lhs, const days& __rhs) noexcept
     return weekday{static_cast<unsigned>(__mu - __yr * 7)};
 }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 weekday operator+(const days& __lhs, const weekday& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 weekday operator-(const weekday& __lhs, const days& __rhs) noexcept
 { return __lhs + -__rhs; }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 days operator-(const weekday& __lhs, const weekday& __rhs) noexcept
 {
     const int __wdu = __lhs.c_encoding() - __rhs.c_encoding();
@@ -113,11 +113,11 @@ days operator-(const weekday& __lhs, const weekday& __rhs) noexcept
     return days{__wdu - __wk * 7};
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 weekday& weekday::operator+=(const days& __dd) noexcept
 { *this = *this + __dd; return *this; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 weekday& weekday::operator-=(const days& __dd) noexcept
 { *this = *this - __dd; return *this; }
 
@@ -126,19 +126,19 @@ class weekday_indexed {
     chrono::weekday __wd;
     unsigned char   __idx;
 public:
-    _LIBCPP_HIDE_FROM_ABI weekday_indexed() = default;
-    _LIBCPP_HIDE_FROM_ABI inline constexpr weekday_indexed(const chrono::weekday& __wdval, unsigned __idxval) noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI weekday_indexed() = default;
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr weekday_indexed(const chrono::weekday& __wdval, unsigned __idxval) noexcept
         : __wd{__wdval}, __idx(__idxval) {}
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday weekday() const noexcept { return __wd; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned                 index() const noexcept { return __idx; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __wd.ok() && __idx >= 1 && __idx <= 5; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::weekday weekday() const noexcept { return __wd; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr unsigned                 index() const noexcept { return __idx; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __wd.ok() && __idx >= 1 && __idx <= 5; }
 };
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const weekday_indexed& __lhs, const weekday_indexed& __rhs) noexcept
 { return __lhs.weekday() == __rhs.weekday() && __lhs.index() == __rhs.index(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const weekday_indexed& __lhs, const weekday_indexed& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
@@ -147,24 +147,24 @@ class weekday_last {
 private:
     chrono::weekday __wd;
 public:
-    _LIBCPP_HIDE_FROM_ABI explicit constexpr weekday_last(const chrono::weekday& __val) noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI explicit constexpr weekday_last(const chrono::weekday& __val) noexcept
         : __wd{__val} {}
-    _LIBCPP_HIDE_FROM_ABI constexpr chrono::weekday weekday() const noexcept { return __wd; }
-    _LIBCPP_HIDE_FROM_ABI constexpr bool ok() const noexcept { return __wd.ok(); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr chrono::weekday weekday() const noexcept { return __wd; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr bool ok() const noexcept { return __wd.ok(); }
 };
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const weekday_last& __lhs, const weekday_last& __rhs) noexcept
 { return __lhs.weekday() == __rhs.weekday(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const weekday_last& __lhs, const weekday_last& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 weekday_indexed weekday::operator[](unsigned __index) const noexcept { return weekday_indexed{*this, __index}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 weekday_last weekday::operator[](last_spec) const noexcept { return weekday_last{*this}; }
 
 
@@ -178,8 +178,8 @@ inline constexpr weekday   Saturday{6};
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___CHRONO_WEEKDAY_H
+#endif // _LIBCUDACXX___CHRONO_WEEKDAY_H

diff  --git a/libcxx/include/__chrono/year.h b/libcxx/include/__chrono/year.h
index c7f0027eba7b..ac983e8ea0f8 100644
--- a/libcxx/include/__chrono/year.h
+++ b/libcxx/include/__chrono/year.h
@@ -7,23 +7,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_YEAR_H
-#define _LIBCPP___CHRONO_YEAR_H
+#ifndef _LIBCUDACXX___CHRONO_YEAR_H
+#define _LIBCUDACXX___CHRONO_YEAR_H
 
 #include <__chrono/duration.h>
 #include <__config>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -32,86 +32,86 @@ class year {
 private:
     short __y;
 public:
-    _LIBCPP_HIDE_FROM_ABI year() = default;
-    _LIBCPP_HIDE_FROM_ABI explicit inline constexpr year(int __val) noexcept : __y(static_cast<short>(__val)) {}
-
-    _LIBCPP_HIDE_FROM_ABI inline constexpr year& operator++()    noexcept { ++__y; return *this; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr year  operator++(int) noexcept { year __tmp = *this; ++(*this); return __tmp; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr year& operator--()    noexcept { --__y; return *this; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr year  operator--(int) noexcept { year __tmp = *this; --(*this); return __tmp; }
-    _LIBCPP_HIDE_FROM_ABI        constexpr year& operator+=(const years& __dy) noexcept;
-    _LIBCPP_HIDE_FROM_ABI        constexpr year& operator-=(const years& __dy) noexcept;
-    _LIBCPP_HIDE_FROM_ABI inline constexpr year operator+() const noexcept { return *this; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr year operator-() const noexcept { return year{-__y}; }
-
-    _LIBCPP_HIDE_FROM_ABI inline constexpr bool is_leap() const noexcept { return __y % 4 == 0 && (__y % 100 != 0 || __y % 400 == 0); }
-    _LIBCPP_HIDE_FROM_ABI explicit inline constexpr operator int() const noexcept { return __y; }
-    _LIBCPP_HIDE_FROM_ABI        constexpr bool ok() const noexcept;
-    _LIBCPP_HIDE_FROM_ABI static inline constexpr year min() noexcept { return year{-32767}; }
-    _LIBCPP_HIDE_FROM_ABI static inline constexpr year max() noexcept { return year{ 32767}; }
+    _LIBCUDACXX_HIDE_FROM_ABI year() = default;
+    _LIBCUDACXX_HIDE_FROM_ABI explicit inline constexpr year(int __val) noexcept : __y(static_cast<short>(__val)) {}
+
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year& operator++()    noexcept { ++__y; return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year  operator++(int) noexcept { year __tmp = *this; ++(*this); return __tmp; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year& operator--()    noexcept { --__y; return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year  operator--(int) noexcept { year __tmp = *this; --(*this); return __tmp; }
+    _LIBCUDACXX_HIDE_FROM_ABI        constexpr year& operator+=(const years& __dy) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI        constexpr year& operator-=(const years& __dy) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year operator+() const noexcept { return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year operator-() const noexcept { return year{-__y}; }
+
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool is_leap() const noexcept { return __y % 4 == 0 && (__y % 100 != 0 || __y % 400 == 0); }
+    _LIBCUDACXX_HIDE_FROM_ABI explicit inline constexpr operator int() const noexcept { return __y; }
+    _LIBCUDACXX_HIDE_FROM_ABI        constexpr bool ok() const noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI static inline constexpr year min() noexcept { return year{-32767}; }
+    _LIBCUDACXX_HIDE_FROM_ABI static inline constexpr year max() noexcept { return year{ 32767}; }
 };
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const year& __lhs, const year& __rhs) noexcept
 { return static_cast<int>(__lhs) == static_cast<int>(__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const year& __lhs, const year& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator< (const year& __lhs, const year& __rhs) noexcept
 { return static_cast<int>(__lhs)  < static_cast<int>(__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator> (const year& __lhs, const year& __rhs) noexcept
 { return __rhs < __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator<=(const year& __lhs, const year& __rhs) noexcept
 { return !(__rhs < __lhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator>=(const year& __lhs, const year& __rhs) noexcept
 { return !(__lhs < __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year operator+ (const year& __lhs, const years& __rhs) noexcept
 { return year(static_cast<int>(__lhs) + __rhs.count()); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year operator+ (const years& __lhs, const year& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year operator- (const year& __lhs, const years& __rhs) noexcept
 { return __lhs + -__rhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 years operator-(const year& __lhs, const year& __rhs) noexcept
 { return years{static_cast<int>(__lhs) - static_cast<int>(__rhs)}; }
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year& year::operator+=(const years& __dy) noexcept
 { *this = *this + __dy; return *this; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year& year::operator-=(const years& __dy) noexcept
 { *this = *this - __dy; return *this; }
 
-_LIBCPP_HIDE_FROM_ABI constexpr bool year::ok() const noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr bool year::ok() const noexcept {
   static_assert(static_cast<int>(std::numeric_limits<decltype(__y)>::max()) == static_cast<int>(max()));
   return static_cast<int>(min()) <= __y;
 }
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___CHRONO_YEAR_H
+#endif // _LIBCUDACXX___CHRONO_YEAR_H

diff  --git a/libcxx/include/__chrono/year_month.h b/libcxx/include/__chrono/year_month.h
index 51b19caa1124..b674e898f408 100644
--- a/libcxx/include/__chrono/year_month.h
+++ b/libcxx/include/__chrono/year_month.h
@@ -7,21 +7,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_YEAR_MONTH_H
-#define _LIBCPP___CHRONO_YEAR_MONTH_H
+#ifndef _LIBCUDACXX___CHRONO_YEAR_MONTH_H
+#define _LIBCUDACXX___CHRONO_YEAR_MONTH_H
 
 #include <__chrono/duration.h>
 #include <__chrono/month.h>
 #include <__chrono/year.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -30,49 +30,49 @@ class year_month {
     chrono::year  __y;
     chrono::month __m;
 public:
-    _LIBCPP_HIDE_FROM_ABI year_month() = default;
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month(const chrono::year& __yval, const chrono::month& __mval) noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI year_month() = default;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month(const chrono::year& __yval, const chrono::month& __mval) noexcept
         : __y{__yval}, __m{__mval} {}
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year  year()  const noexcept { return __y; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator+=(const months& __dm) noexcept { this->__m += __dm; return *this; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator-=(const months& __dm) noexcept { this->__m -= __dm; return *this; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator+=(const years& __dy)  noexcept { this->__y += __dy; return *this; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr year_month& operator-=(const years& __dy)  noexcept { this->__y -= __dy; return *this; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok(); }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::year  year()  const noexcept { return __y; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month& operator+=(const months& __dm) noexcept { this->__m += __dm; return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month& operator-=(const months& __dm) noexcept { this->__m -= __dm; return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month& operator+=(const years& __dy)  noexcept { this->__y += __dy; return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month& operator-=(const years& __dy)  noexcept { this->__y -= __dy; return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok(); }
 };
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month operator/(const year& __y, const month& __m) noexcept { return year_month{__y, __m}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month operator/(const year& __y, int __m) noexcept { return year_month{__y, month(__m)}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const year_month& __lhs, const year_month& __rhs) noexcept
 { return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const year_month& __lhs, const year_month& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator< (const year_month& __lhs, const year_month& __rhs) noexcept
 { return __lhs.year() != __rhs.year() ? __lhs.year() < __rhs.year() : __lhs.month() < __rhs.month(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator> (const year_month& __lhs, const year_month& __rhs) noexcept
 { return __rhs < __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator<=(const year_month& __lhs, const year_month& __rhs) noexcept
 { return !(__rhs < __lhs);}
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator>=(const year_month& __lhs, const year_month& __rhs) noexcept
 { return !(__lhs < __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 year_month operator+(const year_month& __lhs, const months& __rhs) noexcept
 {
     int __dmi = static_cast<int>(static_cast<unsigned>(__lhs.month())) - 1 + __rhs.count();
@@ -81,34 +81,34 @@ year_month operator+(const year_month& __lhs, const months& __rhs) noexcept
     return (__lhs.year() + years(__dy)) / month(static_cast<unsigned>(__dmi));
 }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 year_month operator+(const months& __lhs, const year_month& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 year_month operator+(const year_month& __lhs, const years& __rhs) noexcept
 { return (__lhs.year() + __rhs) / __lhs.month(); }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 year_month operator+(const years& __lhs, const year_month& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 months operator-(const year_month& __lhs, const year_month& __rhs) noexcept
 { return (__lhs.year() - __rhs.year()) + months(static_cast<unsigned>(__lhs.month()) - static_cast<unsigned>(__rhs.month())); }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 year_month operator-(const year_month& __lhs, const months& __rhs) noexcept
 { return __lhs + -__rhs; }
 
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 year_month operator-(const year_month& __lhs, const years& __rhs) noexcept
 { return __lhs + -__rhs; }
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___CHRONO_YEAR_MONTH_H
+#endif // _LIBCUDACXX___CHRONO_YEAR_MONTH_H

diff  --git a/libcxx/include/__chrono/year_month_day.h b/libcxx/include/__chrono/year_month_day.h
index 957716aab690..5ad621e951bf 100644
--- a/libcxx/include/__chrono/year_month_day.h
+++ b/libcxx/include/__chrono/year_month_day.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_YEAR_MONTH_DAY_H
-#define _LIBCPP___CHRONO_YEAR_MONTH_DAY_H
+#ifndef _LIBCUDACXX___CHRONO_YEAR_MONTH_DAY_H
+#define _LIBCUDACXX___CHRONO_YEAR_MONTH_DAY_H
 
 #include <__chrono/calendar.h>
 #include <__chrono/day.h>
@@ -22,13 +22,13 @@
 #include <__config>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -41,36 +41,36 @@ class year_month_day {
     chrono::month __m;
     chrono::day   __d;
 public:
-     _LIBCPP_HIDE_FROM_ABI year_month_day() = default;
-     _LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day(
+     _LIBCUDACXX_HIDE_FROM_ABI year_month_day() = default;
+     _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_day(
             const chrono::year& __yval, const chrono::month& __mval, const chrono::day& __dval) noexcept
             : __y{__yval}, __m{__mval}, __d{__dval} {}
-     _LIBCPP_HIDE_FROM_ABI        constexpr year_month_day(const year_month_day_last& __ymdl) noexcept;
-     _LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day(const sys_days& __sysd) noexcept
+     _LIBCUDACXX_HIDE_FROM_ABI        constexpr year_month_day(const year_month_day_last& __ymdl) noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_day(const sys_days& __sysd) noexcept
             : year_month_day(__from_days(__sysd.time_since_epoch())) {}
-     _LIBCPP_HIDE_FROM_ABI inline explicit constexpr year_month_day(const local_days& __locd) noexcept
+     _LIBCUDACXX_HIDE_FROM_ABI inline explicit constexpr year_month_day(const local_days& __locd) noexcept
             : year_month_day(__from_days(__locd.time_since_epoch())) {}
 
-     _LIBCPP_HIDE_FROM_ABI        constexpr year_month_day& operator+=(const months& __dm) noexcept;
-     _LIBCPP_HIDE_FROM_ABI        constexpr year_month_day& operator-=(const months& __dm) noexcept;
-     _LIBCPP_HIDE_FROM_ABI        constexpr year_month_day& operator+=(const years& __dy)  noexcept;
-     _LIBCPP_HIDE_FROM_ABI        constexpr year_month_day& operator-=(const years& __dy)  noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI        constexpr year_month_day& operator+=(const months& __dm) noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI        constexpr year_month_day& operator-=(const months& __dm) noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI        constexpr year_month_day& operator+=(const years& __dy)  noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI        constexpr year_month_day& operator-=(const years& __dy)  noexcept;
 
-     _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year   year() const noexcept { return __y; }
-     _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
-     _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::day     day() const noexcept { return __d; }
-     _LIBCPP_HIDE_FROM_ABI inline constexpr operator   sys_days() const noexcept          { return   sys_days{__to_days()}; }
-     _LIBCPP_HIDE_FROM_ABI inline explicit constexpr operator local_days() const noexcept { return local_days{__to_days()}; }
+     _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::year   year() const noexcept { return __y; }
+     _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::month month() const noexcept { return __m; }
+     _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::day     day() const noexcept { return __d; }
+     _LIBCUDACXX_HIDE_FROM_ABI inline constexpr operator   sys_days() const noexcept          { return   sys_days{__to_days()}; }
+     _LIBCUDACXX_HIDE_FROM_ABI inline explicit constexpr operator local_days() const noexcept { return local_days{__to_days()}; }
 
-     _LIBCPP_HIDE_FROM_ABI        constexpr bool             ok() const noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI        constexpr bool             ok() const noexcept;
 
-     _LIBCPP_HIDE_FROM_ABI static constexpr year_month_day __from_days(days __d) noexcept;
-     _LIBCPP_HIDE_FROM_ABI constexpr days __to_days() const noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI static constexpr year_month_day __from_days(days __d) noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI constexpr days __to_days() const noexcept;
 };
 
 
 // https://howardhinnant.github.io/date_algorithms.html#civil_from_days
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day year_month_day::__from_days(days __d) noexcept
 {
     static_assert(numeric_limits<unsigned>::digits >= 18, "");
@@ -88,7 +88,7 @@ year_month_day year_month_day::__from_days(days __d) noexcept
 }
 
 // https://howardhinnant.github.io/date_algorithms.html#days_from_civil
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 days year_month_day::__to_days() const noexcept
 {
     static_assert(numeric_limits<unsigned>::digits >= 18, "");
@@ -105,15 +105,15 @@ days year_month_day::__to_days() const noexcept
     return days{__era * 146097 + static_cast<int>(__doe) - 719468};
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
 { return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month() && __lhs.day() == __rhs.day(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator< (const year_month_day& __lhs, const year_month_day& __rhs) noexcept
 {
     if (__lhs.year() < __rhs.year()) return true;
@@ -123,95 +123,95 @@ bool operator< (const year_month_day& __lhs, const year_month_day& __rhs) noexce
     return __lhs.day() < __rhs.day();
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator> (const year_month_day& __lhs, const year_month_day& __rhs) noexcept
 { return __rhs < __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator<=(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
 { return !(__rhs < __lhs);}
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator>=(const year_month_day& __lhs, const year_month_day& __rhs) noexcept
 { return !(__lhs < __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator/(const year_month& __lhs, const day& __rhs) noexcept
 { return year_month_day{__lhs.year(), __lhs.month(), __rhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator/(const year_month& __lhs, int __rhs) noexcept
 { return __lhs / day(__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator/(const year& __lhs, const month_day& __rhs) noexcept
 { return __lhs / __rhs.month() / __rhs.day(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator/(int __lhs, const month_day& __rhs) noexcept
 { return year(__lhs) / __rhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator/(const month_day& __lhs, const year& __rhs) noexcept
 { return __rhs / __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator/(const month_day& __lhs, int __rhs) noexcept
 { return year(__rhs) / __lhs; }
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator+(const year_month_day& __lhs, const months& __rhs) noexcept
 { return (__lhs.year()/__lhs.month() + __rhs)/__lhs.day(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator+(const months& __lhs, const year_month_day& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator-(const year_month_day& __lhs, const months& __rhs) noexcept
 { return __lhs + -__rhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator+(const year_month_day& __lhs, const years& __rhs) noexcept
 { return (__lhs.year() + __rhs) / __lhs.month() / __lhs.day(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator+(const years& __lhs, const year_month_day& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day operator-(const year_month_day& __lhs, const years& __rhs) noexcept
 { return __lhs + -__rhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day& year_month_day::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day& year_month_day::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day& year_month_day::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day& year_month_day::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_day& year_month_day::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_day& year_month_day::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_day& year_month_day::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_day& year_month_day::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
 
 class year_month_day_last {
 private:
     chrono::year           __y;
     chrono::month_day_last __mdl;
 public:
-     _LIBCPP_HIDE_FROM_ABI constexpr year_month_day_last(const year& __yval, const month_day_last& __mdlval) noexcept
+     _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_day_last(const year& __yval, const month_day_last& __mdlval) noexcept
         : __y{__yval}, __mdl{__mdlval} {}
 
-     _LIBCPP_HIDE_FROM_ABI constexpr year_month_day_last& operator+=(const months& __m) noexcept;
-     _LIBCPP_HIDE_FROM_ABI constexpr year_month_day_last& operator-=(const months& __m) noexcept;
-     _LIBCPP_HIDE_FROM_ABI constexpr year_month_day_last& operator+=(const years& __y)  noexcept;
-     _LIBCPP_HIDE_FROM_ABI constexpr year_month_day_last& operator-=(const years& __y)  noexcept;
-
-     _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year                     year() const noexcept { return __y; }
-     _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month                   month() const noexcept { return __mdl.month(); }
-     _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month_day_last month_day_last() const noexcept { return __mdl; }
-     _LIBCPP_HIDE_FROM_ABI        constexpr chrono::day                       day() const noexcept;
-     _LIBCPP_HIDE_FROM_ABI inline constexpr operator                     sys_days() const noexcept { return   sys_days{year()/month()/day()}; }
-     _LIBCPP_HIDE_FROM_ABI inline explicit constexpr operator          local_days() const noexcept { return local_days{year()/month()/day()}; }
-     _LIBCPP_HIDE_FROM_ABI inline constexpr bool                               ok() const noexcept { return __y.ok() && __mdl.ok(); }
+     _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_day_last& operator+=(const months& __m) noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_day_last& operator-=(const months& __m) noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_day_last& operator+=(const years& __y)  noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_day_last& operator-=(const years& __y)  noexcept;
+
+     _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::year                     year() const noexcept { return __y; }
+     _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::month                   month() const noexcept { return __mdl.month(); }
+     _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::month_day_last month_day_last() const noexcept { return __mdl; }
+     _LIBCUDACXX_HIDE_FROM_ABI        constexpr chrono::day                       day() const noexcept;
+     _LIBCUDACXX_HIDE_FROM_ABI inline constexpr operator                     sys_days() const noexcept { return   sys_days{year()/month()/day()}; }
+     _LIBCUDACXX_HIDE_FROM_ABI inline explicit constexpr operator          local_days() const noexcept { return local_days{year()/month()/day()}; }
+     _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool                               ok() const noexcept { return __y.ok() && __mdl.ok(); }
 };
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 chrono::day year_month_day_last::day() const noexcept
 {
     constexpr chrono::day __d[] =
@@ -225,15 +225,15 @@ chrono::day year_month_day_last::day() const noexcept
         __d[static_cast<unsigned>(month()) - 1] : chrono::day{29};
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
 { return __lhs.year() == __rhs.year() && __lhs.month_day_last() == __rhs.month_day_last(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator< (const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
 {
     if (__lhs.year() < __rhs.year()) return true;
@@ -241,73 +241,73 @@ bool operator< (const year_month_day_last& __lhs, const year_month_day_last& __r
     return __lhs.month_day_last() < __rhs.month_day_last();
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator> (const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
 { return __rhs < __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator<=(const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
 { return !(__rhs < __lhs);}
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator>=(const year_month_day_last& __lhs, const year_month_day_last& __rhs) noexcept
 { return !(__lhs < __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day_last operator/(const year_month& __lhs, last_spec) noexcept
 { return year_month_day_last{__lhs.year(), month_day_last{__lhs.month()}}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day_last operator/(const year& __lhs, const month_day_last& __rhs) noexcept
 { return year_month_day_last{__lhs, __rhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day_last operator/(int __lhs, const month_day_last& __rhs) noexcept
 { return year_month_day_last{year{__lhs}, __rhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day_last
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_day_last
 operator/(const month_day_last& __lhs, const year& __rhs) noexcept
 { return __rhs / __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day_last operator/(const month_day_last& __lhs, int __rhs) noexcept
 { return year{__rhs} / __lhs; }
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day_last operator+(const year_month_day_last& __lhs, const months& __rhs) noexcept
 { return (__lhs.year() / __lhs.month() + __rhs) / last; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day_last operator+(const months& __lhs, const year_month_day_last& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day_last operator-(const year_month_day_last& __lhs, const months& __rhs) noexcept
 { return __lhs + (-__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day_last operator+(const year_month_day_last& __lhs, const years& __rhs) noexcept
 { return year_month_day_last{__lhs.year() + __rhs, __lhs.month_day_last()}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day_last operator+(const years& __lhs, const year_month_day_last& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day_last operator-(const year_month_day_last& __lhs, const years& __rhs) noexcept
 { return __lhs + (-__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day_last& year_month_day_last::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day_last& year_month_day_last::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day_last& year_month_day_last::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_day_last& year_month_day_last::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_day_last& year_month_day_last::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_day_last& year_month_day_last::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_day_last& year_month_day_last::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_day_last& year_month_day_last::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_day::year_month_day(const year_month_day_last& __ymdl) noexcept
     : __y{__ymdl.year()}, __m{__ymdl.month()}, __d{__ymdl.day()} {}
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool year_month_day::ok() const noexcept
 {
     if (!__y.ok() || !__m.ok()) return false;
@@ -316,8 +316,8 @@ bool year_month_day::ok() const noexcept
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___CHRONO_YEAR_MONTH_DAY_H
+#endif // _LIBCUDACXX___CHRONO_YEAR_MONTH_DAY_H

diff  --git a/libcxx/include/__chrono/year_month_weekday.h b/libcxx/include/__chrono/year_month_weekday.h
index b69b77152fb1..3f441e6a2234 100644
--- a/libcxx/include/__chrono/year_month_weekday.h
+++ b/libcxx/include/__chrono/year_month_weekday.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CHRONO_YEAR_MONTH_WEEKDAY_H
-#define _LIBCPP___CHRONO_YEAR_MONTH_WEEKDAY_H
+#ifndef _LIBCUDACXX___CHRONO_YEAR_MONTH_WEEKDAY_H
+#define _LIBCUDACXX___CHRONO_YEAR_MONTH_WEEKDAY_H
 
 #include <__chrono/calendar.h>
 #include <__chrono/day.h>
@@ -23,13 +23,13 @@
 #include <__chrono/year_month_day.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -39,28 +39,28 @@ class year_month_weekday {
     chrono::month           __m;
     chrono::weekday_indexed __wdi;
 public:
-    _LIBCPP_HIDE_FROM_ABI year_month_weekday() = default;
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday(const chrono::year& __yval, const chrono::month& __mval,
+    _LIBCUDACXX_HIDE_FROM_ABI year_month_weekday() = default;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_weekday(const chrono::year& __yval, const chrono::month& __mval,
                                const chrono::weekday_indexed& __wdival) noexcept
         : __y{__yval}, __m{__mval}, __wdi{__wdival} {}
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday(const sys_days& __sysd) noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_weekday(const sys_days& __sysd) noexcept
             : year_month_weekday(__from_days(__sysd.time_since_epoch())) {}
-    _LIBCPP_HIDE_FROM_ABI inline explicit constexpr year_month_weekday(const local_days& __locd) noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI inline explicit constexpr year_month_weekday(const local_days& __locd) noexcept
             : year_month_weekday(__from_days(__locd.time_since_epoch())) {}
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator+=(const months&) noexcept;
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator-=(const months&) noexcept;
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator+=(const years&)  noexcept;
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday& operator-=(const years&)  noexcept;
-
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year                       year() const noexcept { return __y; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month                     month() const noexcept { return __m; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday                 weekday() const noexcept { return __wdi.weekday(); }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr unsigned                          index() const noexcept { return __wdi.index(); }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_indexed weekday_indexed() const noexcept { return __wdi; }
-
-    _LIBCPP_HIDE_FROM_ABI inline constexpr                       operator sys_days() const noexcept { return   sys_days{__to_days()}; }
-    _LIBCPP_HIDE_FROM_ABI inline explicit constexpr operator            local_days() const noexcept { return local_days{__to_days()}; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_weekday& operator+=(const months&) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_weekday& operator-=(const months&) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_weekday& operator+=(const years&)  noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_weekday& operator-=(const years&)  noexcept;
+
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::year                       year() const noexcept { return __y; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::month                     month() const noexcept { return __m; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::weekday                 weekday() const noexcept { return __wdi.weekday(); }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr unsigned                          index() const noexcept { return __wdi.index(); }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::weekday_indexed weekday_indexed() const noexcept { return __wdi; }
+
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr                       operator sys_days() const noexcept { return   sys_days{__to_days()}; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline explicit constexpr operator            local_days() const noexcept { return local_days{__to_days()}; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool ok() const noexcept
     {
         if (!__y.ok() || !__m.ok() || !__wdi.ok()) return false;
         if (__wdi.index() <= 4) return true;
@@ -72,11 +72,11 @@ class year_month_weekday {
                static_cast<unsigned>((__y / __m / last).day());
     }
 
-    _LIBCPP_HIDE_FROM_ABI static constexpr year_month_weekday __from_days(days __d) noexcept;
-    _LIBCPP_HIDE_FROM_ABI constexpr days __to_days() const noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI static constexpr year_month_weekday __from_days(days __d) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr days __to_days() const noexcept;
 };
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday year_month_weekday::__from_days(days __d) noexcept
 {
     const sys_days      __sysd{__d};
@@ -86,7 +86,7 @@ year_month_weekday year_month_weekday::__from_days(days __d) noexcept
                               __wd[(static_cast<unsigned>(__ymd.day())-1)/7+1]};
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 days year_month_weekday::__to_days() const noexcept
 {
     const sys_days __sysd = sys_days(__y/__m/1);
@@ -94,64 +94,64 @@ days year_month_weekday::__to_days() const noexcept
                 .time_since_epoch();
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const year_month_weekday& __lhs, const year_month_weekday& __rhs) noexcept
 { return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month() && __lhs.weekday_indexed() == __rhs.weekday_indexed(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const year_month_weekday& __lhs, const year_month_weekday& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday operator/(const year_month& __lhs, const weekday_indexed& __rhs) noexcept
 { return year_month_weekday{__lhs.year(), __lhs.month(), __rhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday operator/(const year& __lhs, const month_weekday& __rhs) noexcept
 { return year_month_weekday{__lhs, __rhs.month(), __rhs.weekday_indexed()}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday operator/(int __lhs, const month_weekday& __rhs) noexcept
 { return year(__lhs) / __rhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday operator/(const month_weekday& __lhs, const year& __rhs) noexcept
 { return __rhs / __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday operator/(const month_weekday& __lhs, int __rhs) noexcept
 { return year(__rhs) / __lhs; }
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday operator+(const year_month_weekday& __lhs, const months& __rhs) noexcept
 { return (__lhs.year() / __lhs.month() + __rhs) / __lhs.weekday_indexed(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday operator+(const months& __lhs, const year_month_weekday& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday operator-(const year_month_weekday& __lhs, const months& __rhs) noexcept
 { return __lhs + (-__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday operator+(const year_month_weekday& __lhs, const years& __rhs) noexcept
 { return year_month_weekday{__lhs.year() + __rhs, __lhs.month(), __lhs.weekday_indexed()}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday operator+(const years& __lhs, const year_month_weekday& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday operator-(const year_month_weekday& __lhs, const years& __rhs) noexcept
 { return __lhs + (-__rhs); }
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_weekday& year_month_weekday::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_weekday& year_month_weekday::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_weekday& year_month_weekday::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_weekday& year_month_weekday::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_weekday& year_month_weekday::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_weekday& year_month_weekday::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_weekday& year_month_weekday::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_weekday& year_month_weekday::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
 
 class year_month_weekday_last {
 private:
@@ -159,27 +159,27 @@ class year_month_weekday_last {
     chrono::month        __m;
     chrono::weekday_last __wdl;
 public:
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday_last(const chrono::year& __yval, const chrono::month& __mval,
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_weekday_last(const chrono::year& __yval, const chrono::month& __mval,
                                       const chrono::weekday_last& __wdlval) noexcept
                 : __y{__yval}, __m{__mval}, __wdl{__wdlval} {}
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday_last& operator+=(const months& __dm) noexcept;
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday_last& operator-=(const months& __dm) noexcept;
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday_last& operator+=(const years& __dy)  noexcept;
-    _LIBCPP_HIDE_FROM_ABI constexpr year_month_weekday_last& operator-=(const years& __dy)  noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_weekday_last& operator+=(const months& __dm) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_weekday_last& operator-=(const months& __dm) noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_weekday_last& operator+=(const years& __dy)  noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr year_month_weekday_last& operator-=(const years& __dy)  noexcept;
 
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::year                 year() const noexcept { return __y; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::month               month() const noexcept { return __m; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday           weekday() const noexcept { return __wdl.weekday(); }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr chrono::weekday_last weekday_last() const noexcept { return __wdl; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr operator                 sys_days() const noexcept { return   sys_days{__to_days()}; }
-    _LIBCPP_HIDE_FROM_ABI inline explicit constexpr operator      local_days() const noexcept { return local_days{__to_days()}; }
-    _LIBCPP_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok() && __wdl.ok(); }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::year                 year() const noexcept { return __y; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::month               month() const noexcept { return __m; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::weekday           weekday() const noexcept { return __wdl.weekday(); }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr chrono::weekday_last weekday_last() const noexcept { return __wdl; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr operator                 sys_days() const noexcept { return   sys_days{__to_days()}; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline explicit constexpr operator      local_days() const noexcept { return local_days{__to_days()}; }
+    _LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool ok() const noexcept { return __y.ok() && __m.ok() && __wdl.ok(); }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr days __to_days() const noexcept;
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr days __to_days() const noexcept;
 
 };
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 days year_month_weekday_last::__to_days() const noexcept
 {
     const sys_days __last = sys_days{__y/__m/last};
@@ -187,69 +187,69 @@ days year_month_weekday_last::__to_days() const noexcept
 
 }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator==(const year_month_weekday_last& __lhs, const year_month_weekday_last& __rhs) noexcept
 { return __lhs.year() == __rhs.year() && __lhs.month() == __rhs.month() && __lhs.weekday_last() == __rhs.weekday_last(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 bool operator!=(const year_month_weekday_last& __lhs, const year_month_weekday_last& __rhs) noexcept
 { return !(__lhs == __rhs); }
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday_last operator/(const year_month& __lhs, const weekday_last& __rhs) noexcept
 { return year_month_weekday_last{__lhs.year(), __lhs.month(), __rhs}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday_last operator/(const year& __lhs, const month_weekday_last& __rhs) noexcept
 { return year_month_weekday_last{__lhs, __rhs.month(), __rhs.weekday_last()}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday_last operator/(int __lhs, const month_weekday_last& __rhs) noexcept
 { return year(__lhs) / __rhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday_last operator/(const month_weekday_last& __lhs, const year& __rhs) noexcept
 { return __rhs / __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday_last operator/(const month_weekday_last& __lhs, int __rhs) noexcept
 { return year(__rhs) / __lhs; }
 
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday_last operator+(const year_month_weekday_last& __lhs, const months& __rhs) noexcept
 { return (__lhs.year() / __lhs.month() + __rhs) / __lhs.weekday_last(); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday_last operator+(const months& __lhs, const year_month_weekday_last& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday_last operator-(const year_month_weekday_last& __lhs, const months& __rhs) noexcept
 { return __lhs + (-__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday_last operator+(const year_month_weekday_last& __lhs, const years& __rhs) noexcept
 { return year_month_weekday_last{__lhs.year() + __rhs, __lhs.month(), __lhs.weekday_last()}; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday_last operator+(const years& __lhs, const year_month_weekday_last& __rhs) noexcept
 { return __rhs + __lhs; }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr
 year_month_weekday_last operator-(const year_month_weekday_last& __lhs, const years& __rhs) noexcept
 { return __lhs + (-__rhs); }
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_weekday_last& year_month_weekday_last::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_weekday_last& year_month_weekday_last::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_weekday_last& year_month_weekday_last::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr year_month_weekday_last& year_month_weekday_last::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_weekday_last& year_month_weekday_last::operator+=(const months& __dm) noexcept { *this = *this + __dm; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_weekday_last& year_month_weekday_last::operator-=(const months& __dm) noexcept { *this = *this - __dm; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_weekday_last& year_month_weekday_last::operator+=(const years& __dy)  noexcept { *this = *this + __dy; return *this; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr year_month_weekday_last& year_month_weekday_last::operator-=(const years& __dy)  noexcept { *this = *this - __dy; return *this; }
 
 } // namespace chrono
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP___CHRONO_YEAR_MONTH_WEEKDAY_H
+#endif // _LIBCUDACXX___CHRONO_YEAR_MONTH_WEEKDAY_H

diff  --git a/libcxx/include/__compare/common_comparison_category.h b/libcxx/include/__compare/common_comparison_category.h
index deab171846e2..462e75702188 100644
--- a/libcxx/include/__compare/common_comparison_category.h
+++ b/libcxx/include/__compare/common_comparison_category.h
@@ -6,20 +6,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_COMMON_COMPARISON_CATEGORY_H
-#define _LIBCPP___COMPARE_COMMON_COMPARISON_CATEGORY_H
+#ifndef _LIBCUDACXX___COMPARE_COMMON_COMPARISON_CATEGORY_H
+#define _LIBCUDACXX___COMPARE_COMMON_COMPARISON_CATEGORY_H
 
 #include <__compare/ordering.h>
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __comp_detail {
 
@@ -32,7 +32,7 @@ enum _ClassifyCompCategory : unsigned {
 };
 
 template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr _ClassifyCompCategory __type_to_enum() noexcept {
   if (is_same_v<_Tp, partial_ordering>)
     return _PartialOrd;
@@ -44,7 +44,7 @@ constexpr _ClassifyCompCategory __type_to_enum() noexcept {
 }
 
 template <size_t _Size>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr _ClassifyCompCategory
 __compute_comp_type(const _ClassifyCompCategory (&__types)[_Size]) {
   int __seen[_CCC_Size] = {};
@@ -60,7 +60,7 @@ __compute_comp_type(const _ClassifyCompCategory (&__types)[_Size]) {
 }
 
 template <class ..._Ts, bool _False = false>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr auto __get_comp_type() {
   using _CCC = _ClassifyCompCategory;
   constexpr _CCC __type_kinds[] = {_StrongOrd, __type_to_enum<_Ts>()...};
@@ -80,15 +80,15 @@ constexpr auto __get_comp_type() {
 
 // [cmp.common], common comparison category type
 template<class... _Ts>
-struct _LIBCPP_TEMPLATE_VIS common_comparison_category {
+struct _LIBCUDACXX_TEMPLATE_VIS common_comparison_category {
   using type = decltype(__comp_detail::__get_comp_type<_Ts...>());
 };
 
 template<class... _Ts>
 using common_comparison_category_t = typename common_comparison_category<_Ts...>::type;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_COMMON_COMPARISON_CATEGORY_H
+#endif // _LIBCUDACXX___COMPARE_COMMON_COMPARISON_CATEGORY_H

diff  --git a/libcxx/include/__compare/compare_partial_order_fallback.h b/libcxx/include/__compare/compare_partial_order_fallback.h
index ba746d6c7d9c..5b532bfac574 100644
--- a/libcxx/include/__compare/compare_partial_order_fallback.h
+++ b/libcxx/include/__compare/compare_partial_order_fallback.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_COMPARE_PARTIAL_ORDER_FALLBACK
-#define _LIBCPP___COMPARE_COMPARE_PARTIAL_ORDER_FALLBACK
+#ifndef _LIBCUDACXX___COMPARE_COMPARE_PARTIAL_ORDER_FALLBACK
+#define _LIBCUDACXX___COMPARE_COMPARE_PARTIAL_ORDER_FALLBACK
 
 #include <__compare/ordering.h>
 #include <__compare/partial_order.h>
@@ -16,49 +16,49 @@
 #include <__utility/priority_tag.h>
 #include <type_traits>
 
-#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+#ifndef _LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [cmp.alg]
 namespace __compare_partial_order_fallback {
     struct __fn {
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
-            noexcept(noexcept(_VSTD::partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
-            -> decltype(      _VSTD::partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))
-            { return          _VSTD::partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); }
+            noexcept(noexcept(_CUDA_VSTD::partial_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
+            -> decltype(      _CUDA_VSTD::partial_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)))
+            { return          _CUDA_VSTD::partial_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)); }
 
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
-                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less :
-                              _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
+            noexcept(noexcept(_CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
+                              _CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u) ? partial_ordering::less :
+                              _CUDA_VSTD::forward<_Up>(__u) < _CUDA_VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
                               partial_ordering::unordered))
-            -> decltype(      _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
-                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less :
-                              _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
+            -> decltype(      _CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
+                              _CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u) ? partial_ordering::less :
+                              _CUDA_VSTD::forward<_Up>(__u) < _CUDA_VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
                               partial_ordering::unordered)
         {
-            return            _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
-                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? partial_ordering::less :
-                              _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
+            return            _CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u) ? partial_ordering::equivalent :
+                              _CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u) ? partial_ordering::less :
+                              _CUDA_VSTD::forward<_Up>(__u) < _CUDA_VSTD::forward<_Tp>(__t) ? partial_ordering::greater :
                               partial_ordering::unordered;
         }
 
         template<class _Tp, class _Up>
-        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
-            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>())))
-            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()))
-            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()); }
+        _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
+            noexcept(noexcept(__go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<1>())))
+            -> decltype(      __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<1>()))
+            { return          __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<1>()); }
     };
 } // namespace __compare_partial_order_fallback
 
@@ -66,8 +66,8 @@ inline namespace __cpo {
     inline constexpr auto compare_partial_order_fallback = __compare_partial_order_fallback::__fn{};
 } // namespace __cpo
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_COMPARE_PARTIAL_ORDER_FALLBACK
+#endif // _LIBCUDACXX___COMPARE_COMPARE_PARTIAL_ORDER_FALLBACK

diff  --git a/libcxx/include/__compare/compare_strong_order_fallback.h b/libcxx/include/__compare/compare_strong_order_fallback.h
index 312a08ef7e90..f28715af8421 100644
--- a/libcxx/include/__compare/compare_strong_order_fallback.h
+++ b/libcxx/include/__compare/compare_strong_order_fallback.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_COMPARE_STRONG_ORDER_FALLBACK
-#define _LIBCPP___COMPARE_COMPARE_STRONG_ORDER_FALLBACK
+#ifndef _LIBCUDACXX___COMPARE_COMPARE_STRONG_ORDER_FALLBACK
+#define _LIBCUDACXX___COMPARE_COMPARE_STRONG_ORDER_FALLBACK
 
 #include <__compare/ordering.h>
 #include <__compare/strong_order.h>
@@ -16,46 +16,46 @@
 #include <__utility/priority_tag.h>
 #include <type_traits>
 
-#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+#ifndef _LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [cmp.alg]
 namespace __compare_strong_order_fallback {
     struct __fn {
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
-            noexcept(noexcept(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
-            -> decltype(      _VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))
-            { return          _VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); }
+            noexcept(noexcept(_CUDA_VSTD::strong_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
+            -> decltype(      _CUDA_VSTD::strong_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)))
+            { return          _CUDA_VSTD::strong_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)); }
 
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? strong_ordering::equal :
-                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? strong_ordering::less :
+            noexcept(noexcept(_CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u) ? strong_ordering::equal :
+                              _CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u) ? strong_ordering::less :
                               strong_ordering::greater))
-            -> decltype(      _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? strong_ordering::equal :
-                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? strong_ordering::less :
+            -> decltype(      _CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u) ? strong_ordering::equal :
+                              _CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u) ? strong_ordering::less :
                               strong_ordering::greater)
         {
-            return            _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? strong_ordering::equal :
-                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? strong_ordering::less :
+            return            _CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u) ? strong_ordering::equal :
+                              _CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u) ? strong_ordering::less :
                               strong_ordering::greater;
         }
 
         template<class _Tp, class _Up>
-        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
-            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>())))
-            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()))
-            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()); }
+        _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
+            noexcept(noexcept(__go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<1>())))
+            -> decltype(      __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<1>()))
+            { return          __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<1>()); }
     };
 } // namespace __compare_strong_order_fallback
 
@@ -63,8 +63,8 @@ inline namespace __cpo {
     inline constexpr auto compare_strong_order_fallback = __compare_strong_order_fallback::__fn{};
 } // namespace __cpo
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_COMPARE_STRONG_ORDER_FALLBACK
+#endif // _LIBCUDACXX___COMPARE_COMPARE_STRONG_ORDER_FALLBACK

diff  --git a/libcxx/include/__compare/compare_three_way.h b/libcxx/include/__compare/compare_three_way.h
index fdbba04a78e6..587f1192afe4 100644
--- a/libcxx/include/__compare/compare_three_way.h
+++ b/libcxx/include/__compare/compare_three_way.h
@@ -7,35 +7,35 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_COMPARE_THREE_WAY_H
-#define _LIBCPP___COMPARE_COMPARE_THREE_WAY_H
+#ifndef _LIBCUDACXX___COMPARE_COMPARE_THREE_WAY_H
+#define _LIBCUDACXX___COMPARE_COMPARE_THREE_WAY_H
 
 #include <__compare/three_way_comparable.h>
 #include <__config>
 #include <__utility/forward.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-struct _LIBCPP_TEMPLATE_VIS compare_three_way
+struct _LIBCUDACXX_TEMPLATE_VIS compare_three_way
 {
     template<class _T1, class _T2>
         requires three_way_comparable_with<_T1, _T2>
-    constexpr _LIBCPP_HIDE_FROM_ABI
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) <=> _VSTD::forward<_T2>(__u)))
-        { return          _VSTD::forward<_T1>(__t) <=> _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) <=> _CUDA_VSTD::forward<_T2>(__u)))
+        { return          _CUDA_VSTD::forward<_T1>(__t) <=> _CUDA_VSTD::forward<_T2>(__u); }
 
     using is_transparent = void;
 };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_COMPARE_THREE_WAY_H
+#endif // _LIBCUDACXX___COMPARE_COMPARE_THREE_WAY_H

diff  --git a/libcxx/include/__compare/compare_three_way_result.h b/libcxx/include/__compare/compare_three_way_result.h
index 7b03597ab1c1..aab4a69b91d9 100644
--- a/libcxx/include/__compare/compare_three_way_result.h
+++ b/libcxx/include/__compare/compare_three_way_result.h
@@ -6,38 +6,38 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_COMPARE_THREE_WAY_RESULT_H
-#define _LIBCPP___COMPARE_COMPARE_THREE_WAY_RESULT_H
+#ifndef _LIBCUDACXX___COMPARE_COMPARE_THREE_WAY_RESULT_H
+#define _LIBCUDACXX___COMPARE_COMPARE_THREE_WAY_RESULT_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template<class, class, class>
-struct _LIBCPP_HIDE_FROM_ABI __compare_three_way_result { };
+struct _LIBCUDACXX_HIDE_FROM_ABI __compare_three_way_result { };
 
 template<class _Tp, class _Up>
-struct _LIBCPP_HIDE_FROM_ABI __compare_three_way_result<_Tp, _Up, decltype(
+struct _LIBCUDACXX_HIDE_FROM_ABI __compare_three_way_result<_Tp, _Up, decltype(
   declval<__make_const_lvalue_ref<_Tp>>() <=> declval<__make_const_lvalue_ref<_Up>>(), void()
 )> {
     using type = decltype(declval<__make_const_lvalue_ref<_Tp>>() <=> declval<__make_const_lvalue_ref<_Up>>());
 };
 
 template<class _Tp, class _Up = _Tp>
-struct _LIBCPP_TEMPLATE_VIS compare_three_way_result : __compare_three_way_result<_Tp, _Up, void> { };
+struct _LIBCUDACXX_TEMPLATE_VIS compare_three_way_result : __compare_three_way_result<_Tp, _Up, void> { };
 
 template<class _Tp, class _Up = _Tp>
 using compare_three_way_result_t = typename compare_three_way_result<_Tp, _Up>::type;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_COMPARE_THREE_WAY_RESULT_H
+#endif // _LIBCUDACXX___COMPARE_COMPARE_THREE_WAY_RESULT_H

diff  --git a/libcxx/include/__compare/compare_weak_order_fallback.h b/libcxx/include/__compare/compare_weak_order_fallback.h
index 844d67608703..00c0a824d5da 100644
--- a/libcxx/include/__compare/compare_weak_order_fallback.h
+++ b/libcxx/include/__compare/compare_weak_order_fallback.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_COMPARE_WEAK_ORDER_FALLBACK
-#define _LIBCPP___COMPARE_COMPARE_WEAK_ORDER_FALLBACK
+#ifndef _LIBCUDACXX___COMPARE_COMPARE_WEAK_ORDER_FALLBACK
+#define _LIBCUDACXX___COMPARE_COMPARE_WEAK_ORDER_FALLBACK
 
 #include <__compare/ordering.h>
 #include <__compare/weak_order.h>
@@ -16,46 +16,46 @@
 #include <__utility/priority_tag.h>
 #include <type_traits>
 
-#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+#ifndef _LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [cmp.alg]
 namespace __compare_weak_order_fallback {
     struct __fn {
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
-            noexcept(noexcept(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
-            -> decltype(      _VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))
-            { return          _VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)); }
+            noexcept(noexcept(_CUDA_VSTD::weak_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
+            -> decltype(      _CUDA_VSTD::weak_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)))
+            { return          _CUDA_VSTD::weak_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)); }
 
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
-                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? weak_ordering::less :
+            noexcept(noexcept(_CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
+                              _CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u) ? weak_ordering::less :
                               weak_ordering::greater))
-            -> decltype(      _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
-                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? weak_ordering::less :
+            -> decltype(      _CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
+                              _CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u) ? weak_ordering::less :
                               weak_ordering::greater)
         {
-            return            _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
-                              _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u) ? weak_ordering::less :
+            return            _CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u) ? weak_ordering::equivalent :
+                              _CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u) ? weak_ordering::less :
                               weak_ordering::greater;
         }
 
         template<class _Tp, class _Up>
-        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
-            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>())))
-            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()))
-            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<1>()); }
+        _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
+            noexcept(noexcept(__go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<1>())))
+            -> decltype(      __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<1>()))
+            { return          __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<1>()); }
     };
 } // namespace __compare_weak_order_fallback
 
@@ -63,8 +63,8 @@ inline namespace __cpo {
     inline constexpr auto compare_weak_order_fallback = __compare_weak_order_fallback::__fn{};
 } // namespace __cpo
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_COMPARE_WEAK_ORDER_FALLBACK
+#endif // _LIBCUDACXX___COMPARE_COMPARE_WEAK_ORDER_FALLBACK

diff  --git a/libcxx/include/__compare/is_eq.h b/libcxx/include/__compare/is_eq.h
index 49648924e81f..5d0f9262962c 100644
--- a/libcxx/include/__compare/is_eq.h
+++ b/libcxx/include/__compare/is_eq.h
@@ -6,29 +6,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_IS_EQ_H
-#define _LIBCPP___COMPARE_IS_EQ_H
+#ifndef _LIBCUDACXX___COMPARE_IS_EQ_H
+#define _LIBCUDACXX___COMPARE_IS_EQ_H
 
 #include <__compare/ordering.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_eq(partial_ordering __c) noexcept { return __c == 0; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_neq(partial_ordering __c) noexcept { return __c != 0; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_lt(partial_ordering __c) noexcept { return __c < 0; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_lteq(partial_ordering __c) noexcept { return __c <= 0; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_gt(partial_ordering __c) noexcept { return __c > 0; }
-_LIBCPP_HIDE_FROM_ABI inline constexpr bool is_gteq(partial_ordering __c) noexcept { return __c >= 0; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool is_eq(partial_ordering __c) noexcept { return __c == 0; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool is_neq(partial_ordering __c) noexcept { return __c != 0; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool is_lt(partial_ordering __c) noexcept { return __c < 0; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool is_lteq(partial_ordering __c) noexcept { return __c <= 0; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool is_gt(partial_ordering __c) noexcept { return __c > 0; }
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr bool is_gteq(partial_ordering __c) noexcept { return __c >= 0; }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_IS_EQ_H
+#endif // _LIBCUDACXX___COMPARE_IS_EQ_H

diff  --git a/libcxx/include/__compare/ordering.h b/libcxx/include/__compare/ordering.h
index 1d466d669eec..5f4c59ca6028 100644
--- a/libcxx/include/__compare/ordering.h
+++ b/libcxx/include/__compare/ordering.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_ORDERING_H
-#define _LIBCPP___COMPARE_ORDERING_H
+#ifndef _LIBCUDACXX___COMPARE_ORDERING_H
+#define _LIBCUDACXX___COMPARE_ORDERING_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // exposition only
-enum class _LIBCPP_ENUM_VIS _OrdResult : signed char {
+enum class _LIBCUDACXX_ENUM_VIS _OrdResult : signed char {
   __less = -1,
   __equiv = 0,
   __greater = 1
 };
 
-enum class _LIBCPP_ENUM_VIS _NCmpResult : signed char {
+enum class _LIBCUDACXX_ENUM_VIS _NCmpResult : signed char {
   __unordered = -127
 };
 
@@ -39,7 +39,7 @@ template<class _Tp, class... _Args>
 inline constexpr bool __one_of_v = (is_same_v<_Tp, _Args> || ...);
 
 struct _CmpUnspecifiedParam {
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEVAL
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEVAL
   _CmpUnspecifiedParam(int _CmpUnspecifiedParam::*) noexcept {}
 
   template<class _Tp, class = enable_if_t<!__one_of_v<_Tp, int, partial_ordering, weak_ordering, strong_ordering>>>
@@ -49,15 +49,15 @@ struct _CmpUnspecifiedParam {
 class partial_ordering {
   using _ValueT = signed char;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   explicit constexpr partial_ordering(_OrdResult __v) noexcept
       : __value_(_ValueT(__v)) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   explicit constexpr partial_ordering(_NCmpResult __v) noexcept
       : __value_(_ValueT(__v)) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr bool __is_ordered() const noexcept {
     return __value_ != _ValueT(_NCmpResult::__unordered);
   }
@@ -69,60 +69,60 @@ class partial_ordering {
   static const partial_ordering unordered;
 
   // comparisons
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(partial_ordering, partial_ordering) noexcept = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(partial_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__is_ordered() && __v.__value_ == 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator< (partial_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__is_ordered() && __v.__value_ < 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator<=(partial_ordering __v, _CmpUnspecifiedParam) noexcept  {
     return __v.__is_ordered() && __v.__value_ <= 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator> (partial_ordering __v, _CmpUnspecifiedParam) noexcept  {
     return __v.__is_ordered() && __v.__value_ > 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator>=(partial_ordering __v, _CmpUnspecifiedParam) noexcept  {
     return __v.__is_ordered() && __v.__value_ >= 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator< (_CmpUnspecifiedParam, partial_ordering __v) noexcept  {
     return __v.__is_ordered() && 0 < __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator<=(_CmpUnspecifiedParam, partial_ordering __v) noexcept  {
     return __v.__is_ordered() && 0 <= __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator> (_CmpUnspecifiedParam, partial_ordering __v) noexcept  {
     return __v.__is_ordered() && 0 > __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator>=(_CmpUnspecifiedParam, partial_ordering __v) noexcept  {
     return __v.__is_ordered() && 0 >= __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr partial_ordering operator<=>(partial_ordering __v, _CmpUnspecifiedParam) noexcept  {
     return __v;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr partial_ordering operator<=>(_CmpUnspecifiedParam, partial_ordering __v) noexcept  {
     return __v < 0 ? partial_ordering::greater : (__v > 0 ? partial_ordering::less : __v);
   }
@@ -138,7 +138,7 @@ inline constexpr partial_ordering partial_ordering::unordered(_NCmpResult ::__un
 class weak_ordering {
   using _ValueT = signed char;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   explicit constexpr weak_ordering(_OrdResult __v) noexcept : __value_(_ValueT(__v)) {}
 
 public:
@@ -146,67 +146,67 @@ class weak_ordering {
   static const weak_ordering equivalent;
   static const weak_ordering greater;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr operator partial_ordering() const noexcept {
     return __value_ == 0 ? partial_ordering::equivalent
         : (__value_ < 0 ? partial_ordering::less : partial_ordering::greater);
   }
 
   // comparisons
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(weak_ordering, weak_ordering) noexcept = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(weak_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__value_ == 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator< (weak_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__value_ < 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator<=(weak_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__value_ <= 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator> (weak_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__value_ > 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator>=(weak_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__value_ >= 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator< (_CmpUnspecifiedParam, weak_ordering __v) noexcept {
     return 0 < __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator<=(_CmpUnspecifiedParam, weak_ordering __v) noexcept {
     return 0 <= __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator> (_CmpUnspecifiedParam, weak_ordering __v) noexcept {
     return 0 > __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator>=(_CmpUnspecifiedParam, weak_ordering __v) noexcept {
     return 0 >= __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr weak_ordering operator<=>(weak_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr weak_ordering operator<=>(_CmpUnspecifiedParam, weak_ordering __v) noexcept {
     return __v < 0 ? weak_ordering::greater : (__v > 0 ? weak_ordering::less : __v);
   }
@@ -222,7 +222,7 @@ inline constexpr weak_ordering weak_ordering::greater(_OrdResult::__greater);
 class strong_ordering {
   using _ValueT = signed char;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   explicit constexpr strong_ordering(_OrdResult __v) noexcept : __value_(_ValueT(__v)) {}
 
 public:
@@ -232,73 +232,73 @@ class strong_ordering {
   static const strong_ordering greater;
 
   // conversions
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr operator partial_ordering() const noexcept {
     return __value_ == 0 ? partial_ordering::equivalent
         : (__value_ < 0 ? partial_ordering::less : partial_ordering::greater);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr operator weak_ordering() const noexcept {
     return __value_ == 0 ? weak_ordering::equivalent
         : (__value_ < 0 ? weak_ordering::less : weak_ordering::greater);
   }
 
   // comparisons
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(strong_ordering, strong_ordering) noexcept = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(strong_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__value_ == 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator< (strong_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__value_ < 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator<=(strong_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__value_ <= 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator> (strong_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__value_ > 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator>=(strong_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v.__value_ >= 0;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator< (_CmpUnspecifiedParam, strong_ordering __v) noexcept {
     return 0 < __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator<=(_CmpUnspecifiedParam, strong_ordering __v) noexcept {
     return 0 <= __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator> (_CmpUnspecifiedParam, strong_ordering __v) noexcept {
     return 0 > __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator>=(_CmpUnspecifiedParam, strong_ordering __v) noexcept {
     return 0 >= __v.__value_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr strong_ordering operator<=>(strong_ordering __v, _CmpUnspecifiedParam) noexcept {
     return __v;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr strong_ordering operator<=>(_CmpUnspecifiedParam, strong_ordering __v) noexcept {
     return __v < 0 ? strong_ordering::greater : (__v > 0 ? strong_ordering::less : __v);
   }
@@ -312,8 +312,8 @@ inline constexpr strong_ordering strong_ordering::equal(_OrdResult::__equiv);
 inline constexpr strong_ordering strong_ordering::equivalent(_OrdResult::__equiv);
 inline constexpr strong_ordering strong_ordering::greater(_OrdResult::__greater);
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_ORDERING_H
+#endif // _LIBCUDACXX___COMPARE_ORDERING_H

diff  --git a/libcxx/include/__compare/partial_order.h b/libcxx/include/__compare/partial_order.h
index 970f01b3f1b0..c860e5584bc7 100644
--- a/libcxx/include/__compare/partial_order.h
+++ b/libcxx/include/__compare/partial_order.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_PARTIAL_ORDER
-#define _LIBCPP___COMPARE_PARTIAL_ORDER
+#ifndef _LIBCUDACXX___COMPARE_PARTIAL_ORDER
+#define _LIBCUDACXX___COMPARE_PARTIAL_ORDER
 
 #include <__compare/compare_three_way.h>
 #include <__compare/ordering.h>
@@ -17,46 +17,46 @@
 #include <__utility/priority_tag.h>
 #include <type_traits>
 
-#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+#ifndef _LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [cmp.alg]
 namespace __partial_order {
     struct __fn {
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<2>)
-            noexcept(noexcept(partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
-            -> decltype(      partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
-            { return          partial_ordering(partial_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
+            noexcept(noexcept(partial_ordering(partial_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)))))
+            -> decltype(      partial_ordering(partial_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
+            { return          partial_ordering(partial_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))); }
 
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
-            noexcept(noexcept(partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
-            -> decltype(      partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
-            { return          partial_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
+            noexcept(noexcept(partial_ordering(compare_three_way()(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)))))
+            -> decltype(      partial_ordering(compare_three_way()(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
+            { return          partial_ordering(compare_three_way()(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))); }
 
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
-            -> decltype(      partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
-            { return          partial_ordering(_VSTD::weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
+            noexcept(noexcept(partial_ordering(_CUDA_VSTD::weak_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)))))
+            -> decltype(      partial_ordering(_CUDA_VSTD::weak_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
+            { return          partial_ordering(_CUDA_VSTD::weak_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))); }
 
         template<class _Tp, class _Up>
-        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
-            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>())))
-            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()))
-            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()); }
+        _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
+            noexcept(noexcept(__go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<2>())))
+            -> decltype(      __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<2>()))
+            { return          __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<2>()); }
     };
 } // namespace __partial_order
 
@@ -64,8 +64,8 @@ inline namespace __cpo {
     inline constexpr auto partial_order = __partial_order::__fn{};
 } // namespace __cpo
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_PARTIAL_ORDER
+#endif // _LIBCUDACXX___COMPARE_PARTIAL_ORDER

diff  --git a/libcxx/include/__compare/strong_order.h b/libcxx/include/__compare/strong_order.h
index 67c7b2910bd5..e73a6056ae4f 100644
--- a/libcxx/include/__compare/strong_order.h
+++ b/libcxx/include/__compare/strong_order.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_STRONG_ORDER
-#define _LIBCPP___COMPARE_STRONG_ORDER
+#ifndef _LIBCUDACXX___COMPARE_STRONG_ORDER
+#define _LIBCUDACXX___COMPARE_STRONG_ORDER
 
 #include <__bit/bit_cast.h>
 #include <__compare/compare_three_way.h>
@@ -20,42 +20,42 @@
 #include <limits>
 #include <type_traits>
 
-#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+#ifndef _LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [cmp.alg]
 namespace __strong_order {
     struct __fn {
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<2>)
-            noexcept(noexcept(strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
-            -> decltype(      strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
-            { return          strong_ordering(strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
+            noexcept(noexcept(strong_ordering(strong_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)))))
+            -> decltype(      strong_ordering(strong_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
+            { return          strong_ordering(strong_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))); }
 
         template<class _Tp, class _Up, class _Dp = decay_t<_Tp>>
             requires is_same_v<_Dp, decay_t<_Up>> && is_floating_point_v<_Dp>
-        _LIBCPP_HIDE_FROM_ABI static constexpr strong_ordering
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr strong_ordering
         __go(_Tp&& __t, _Up&& __u, __priority_tag<1>) noexcept
         {
             if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int32_t)) {
-                int32_t __rx = _VSTD::bit_cast<int32_t>(__t);
-                int32_t __ry = _VSTD::bit_cast<int32_t>(__u);
+                int32_t __rx = _CUDA_VSTD::bit_cast<int32_t>(__t);
+                int32_t __ry = _CUDA_VSTD::bit_cast<int32_t>(__u);
                 __rx = (__rx < 0) ? (numeric_limits<int32_t>::min() - __rx - 1) : __rx;
                 __ry = (__ry < 0) ? (numeric_limits<int32_t>::min() - __ry - 1) : __ry;
                 return (__rx <=> __ry);
             } else if constexpr (numeric_limits<_Dp>::is_iec559 && sizeof(_Dp) == sizeof(int64_t)) {
-                int64_t __rx = _VSTD::bit_cast<int64_t>(__t);
-                int64_t __ry = _VSTD::bit_cast<int64_t>(__u);
+                int64_t __rx = _CUDA_VSTD::bit_cast<int64_t>(__t);
+                int64_t __ry = _CUDA_VSTD::bit_cast<int64_t>(__u);
                 __rx = (__rx < 0) ? (numeric_limits<int64_t>::min() - __rx - 1) : __rx;
                 __ry = (__ry < 0) ? (numeric_limits<int64_t>::min() - __ry - 1) : __ry;
                 return (__rx <=> __ry);
@@ -65,27 +65,27 @@ namespace __strong_order {
                 return strong_ordering::greater;
             } else if (__t == __u) {
                 if constexpr (numeric_limits<_Dp>::radix == 2) {
-                    return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
+                    return _CUDA_VSTD::signbit(__u) <=> _CUDA_VSTD::signbit(__t);
                 } else {
                     // This is bullet 3 of the IEEE754 algorithm, relevant
                     // only for decimal floating-point;
                     // see https://stackoverflow.com/questions/69068075/
-                    if (__t == 0 || _VSTD::isinf(__t)) {
-                        return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
+                    if (__t == 0 || _CUDA_VSTD::isinf(__t)) {
+                        return _CUDA_VSTD::signbit(__u) <=> _CUDA_VSTD::signbit(__t);
                     } else {
                         int __texp, __uexp;
-                        (void)_VSTD::frexp(__t, &__texp);
-                        (void)_VSTD::frexp(__u, &__uexp);
+                        (void)_CUDA_VSTD::frexp(__t, &__texp);
+                        (void)_CUDA_VSTD::frexp(__u, &__uexp);
                         return (__t < 0) ? (__texp <=> __uexp) : (__uexp <=> __texp);
                     }
                 }
             } else {
                 // They're unordered, so one of them must be a NAN.
                 // The order is -QNAN, -SNAN, numbers, +SNAN, +QNAN.
-                bool __t_is_nan = _VSTD::isnan(__t);
-                bool __u_is_nan = _VSTD::isnan(__u);
-                bool __t_is_negative = _VSTD::signbit(__t);
-                bool __u_is_negative = _VSTD::signbit(__u);
+                bool __t_is_nan = _CUDA_VSTD::isnan(__t);
+                bool __u_is_nan = _CUDA_VSTD::isnan(__u);
+                bool __t_is_negative = _CUDA_VSTD::signbit(__t);
+                bool __u_is_negative = _CUDA_VSTD::signbit(__u);
                 using _IntType = conditional_t<
                     sizeof(__t) == sizeof(int32_t), int32_t, conditional_t<
                     sizeof(__t) == sizeof(int64_t), int64_t, void>
@@ -97,7 +97,7 @@ namespace __strong_order {
                     if (__t_is_negative != __u_is_negative) {
                         return (__u_is_negative <=> __t_is_negative);
                     } else {
-                        return _VSTD::bit_cast<_IntType>(__t) <=> _VSTD::bit_cast<_IntType>(__u);
+                        return _CUDA_VSTD::bit_cast<_IntType>(__t) <=> _CUDA_VSTD::bit_cast<_IntType>(__u);
                     }
                 } else if (__t_is_nan) {
                     return __t_is_negative ? strong_ordering::less : strong_ordering::greater;
@@ -109,17 +109,17 @@ namespace __strong_order {
 
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
-            -> decltype(      strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
-            { return          strong_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
+            noexcept(noexcept(strong_ordering(compare_three_way()(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)))))
+            -> decltype(      strong_ordering(compare_three_way()(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
+            { return          strong_ordering(compare_three_way()(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))); }
 
         template<class _Tp, class _Up>
-        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
-            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>())))
-            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()))
-            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<2>()); }
+        _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
+            noexcept(noexcept(__go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<2>())))
+            -> decltype(      __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<2>()))
+            { return          __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<2>()); }
     };
 } // namespace __strong_order
 
@@ -127,10 +127,10 @@ inline namespace __cpo {
     inline constexpr auto strong_order = __strong_order::__fn{};
 } // namespace __cpo
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___COMPARE_STRONG_ORDER
+#endif // _LIBCUDACXX___COMPARE_STRONG_ORDER

diff  --git a/libcxx/include/__compare/synth_three_way.h b/libcxx/include/__compare/synth_three_way.h
index fa8cbda79ba2..43eb2a2b95b8 100644
--- a/libcxx/include/__compare/synth_three_way.h
+++ b/libcxx/include/__compare/synth_three_way.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_SYNTH_THREE_WAY_H
-#define _LIBCPP___COMPARE_SYNTH_THREE_WAY_H
+#ifndef _LIBCUDACXX___COMPARE_SYNTH_THREE_WAY_H
+#define _LIBCUDACXX___COMPARE_SYNTH_THREE_WAY_H
 
 #include <__compare/ordering.h>
 #include <__compare/three_way_comparable.h>
@@ -15,17 +15,17 @@
 #include <__config>
 #include <__utility/declval.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [expos.only.func]
 
-_LIBCPP_HIDE_FROM_ABI inline constexpr auto __synth_three_way =
+_LIBCUDACXX_HIDE_FROM_ABI inline constexpr auto __synth_three_way =
   []<class _Tp, class _Up>(const _Tp& __t, const _Up& __u)
     requires requires {
       { __t < __u } -> __boolean_testable;
@@ -44,8 +44,8 @@ _LIBCPP_HIDE_FROM_ABI inline constexpr auto __synth_three_way =
 template <class _Tp, class _Up = _Tp>
 using __synth_three_way_result = decltype(std::__synth_three_way(declval<_Tp&>(), declval<_Up&>()));
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_SYNTH_THREE_WAY_H
+#endif // _LIBCUDACXX___COMPARE_SYNTH_THREE_WAY_H

diff  --git a/libcxx/include/__compare/three_way_comparable.h b/libcxx/include/__compare/three_way_comparable.h
index b317d750590e..f3a825ca5a19 100644
--- a/libcxx/include/__compare/three_way_comparable.h
+++ b/libcxx/include/__compare/three_way_comparable.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_THREE_WAY_COMPARABLE_H
-#define _LIBCPP___COMPARE_THREE_WAY_COMPARABLE_H
+#ifndef _LIBCUDACXX___COMPARE_THREE_WAY_COMPARABLE_H
+#define _LIBCUDACXX___COMPARE_THREE_WAY_COMPARABLE_H
 
 #include <__compare/common_comparison_category.h>
 #include <__compare/ordering.h>
@@ -18,13 +18,13 @@
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template<class _Tp, class _Cat>
 concept __compares_as =
@@ -51,8 +51,8 @@ concept three_way_comparable_with =
     { __u <=> __t } -> __compares_as<_Cat>;
   };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_THREE_WAY_COMPARABLE_H
+#endif // _LIBCUDACXX___COMPARE_THREE_WAY_COMPARABLE_H

diff  --git a/libcxx/include/__compare/weak_order.h b/libcxx/include/__compare/weak_order.h
index c2fae1a98deb..59c7363ca652 100644
--- a/libcxx/include/__compare/weak_order.h
+++ b/libcxx/include/__compare/weak_order.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COMPARE_WEAK_ORDER
-#define _LIBCPP___COMPARE_WEAK_ORDER
+#ifndef _LIBCUDACXX___COMPARE_WEAK_ORDER
+#define _LIBCUDACXX___COMPARE_WEAK_ORDER
 
 #include <__compare/compare_three_way.h>
 #include <__compare/ordering.h>
@@ -18,28 +18,28 @@
 #include <cmath>
 #include <type_traits>
 
-#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+#ifndef _LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [cmp.alg]
 namespace __weak_order {
     struct __fn {
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<3>)
-            noexcept(noexcept(weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
-            -> decltype(      weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
-            { return          weak_ordering(weak_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
+            noexcept(noexcept(weak_ordering(weak_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)))))
+            -> decltype(      weak_ordering(weak_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
+            { return          weak_ordering(weak_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))); }
 
         template<class _Tp, class _Up, class _Dp = decay_t<_Tp>>
             requires is_same_v<_Dp, decay_t<_Up>> && is_floating_point_v<_Dp>
-        _LIBCPP_HIDE_FROM_ABI static constexpr weak_ordering
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr weak_ordering
         __go(_Tp&& __t, _Up&& __u, __priority_tag<2>) noexcept
         {
             partial_ordering __po = (__t <=> __u);
@@ -51,10 +51,10 @@ namespace __weak_order {
                 return weak_ordering::greater;
             } else {
                 // Otherwise, at least one of them is a NaN.
-                bool __t_is_nan = _VSTD::isnan(__t);
-                bool __u_is_nan = _VSTD::isnan(__u);
-                bool __t_is_negative = _VSTD::signbit(__t);
-                bool __u_is_negative = _VSTD::signbit(__u);
+                bool __t_is_nan = _CUDA_VSTD::isnan(__t);
+                bool __u_is_nan = _CUDA_VSTD::isnan(__u);
+                bool __t_is_negative = _CUDA_VSTD::signbit(__t);
+                bool __u_is_negative = _CUDA_VSTD::signbit(__u);
                 if (__t_is_nan && __u_is_nan) {
                     return (__u_is_negative <=> __t_is_negative);
                 } else if (__t_is_nan) {
@@ -67,25 +67,25 @@ namespace __weak_order {
 
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<1>)
-            noexcept(noexcept(weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
-            -> decltype(      weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
-            { return          weak_ordering(compare_three_way()(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
+            noexcept(noexcept(weak_ordering(compare_three_way()(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)))))
+            -> decltype(      weak_ordering(compare_three_way()(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
+            { return          weak_ordering(compare_three_way()(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))); }
 
         template<class _Tp, class _Up>
             requires is_same_v<decay_t<_Tp>, decay_t<_Up>>
-        _LIBCPP_HIDE_FROM_ABI static constexpr auto
+        _LIBCUDACXX_HIDE_FROM_ABI static constexpr auto
         __go(_Tp&& __t, _Up&& __u, __priority_tag<0>)
-            noexcept(noexcept(weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u)))))
-            -> decltype(      weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
-            { return          weak_ordering(_VSTD::strong_order(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))); }
+            noexcept(noexcept(weak_ordering(_CUDA_VSTD::strong_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u)))))
+            -> decltype(      weak_ordering(_CUDA_VSTD::strong_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
+            { return          weak_ordering(_CUDA_VSTD::strong_order(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))); }
 
         template<class _Tp, class _Up>
-        _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
-            noexcept(noexcept(__go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>())))
-            -> decltype(      __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>()))
-            { return          __go(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u), __priority_tag<3>()); }
+        _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t, _Up&& __u) const
+            noexcept(noexcept(__go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<3>())))
+            -> decltype(      __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<3>()))
+            { return          __go(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u), __priority_tag<3>()); }
     };
 } // namespace __weak_order
 
@@ -93,8 +93,8 @@ inline namespace __cpo {
     inline constexpr auto weak_order = __weak_order::__fn{};
 } // namespace __cpo
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___COMPARE_WEAK_ORDER
+#endif // _LIBCUDACXX___COMPARE_WEAK_ORDER

diff  --git a/libcxx/include/__concepts/arithmetic.h b/libcxx/include/__concepts/arithmetic.h
index d91570f02b8b..f4adc0949aff 100644
--- a/libcxx/include/__concepts/arithmetic.h
+++ b/libcxx/include/__concepts/arithmetic.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_ARITHMETIC_H
-#define _LIBCPP___CONCEPTS_ARITHMETIC_H
+#ifndef _LIBCUDACXX___CONCEPTS_ARITHMETIC_H
+#define _LIBCUDACXX___CONCEPTS_ARITHMETIC_H
 
 #include <__config>
 #include <__type_traits/is_signed_integer.h>
 #include <__type_traits/is_unsigned_integer.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concepts.arithmetic], arithmetic concepts
 
@@ -39,12 +39,12 @@ concept floating_point = is_floating_point_v<_Tp>;
 // Concept helpers for the internal type traits for the fundamental types.
 
 template <class _Tp>
-concept __libcpp_unsigned_integer = __libcpp_is_unsigned_integer<_Tp>::value;
+concept __LIBCUDACXX_unsigned_integer = __LIBCUDACXX_is_unsigned_integer<_Tp>::value;
 template <class _Tp>
-concept __libcpp_signed_integer = __libcpp_is_signed_integer<_Tp>::value;
+concept __LIBCUDACXX_signed_integer = __LIBCUDACXX_is_signed_integer<_Tp>::value;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_ARITHMETIC_H
+#endif // _LIBCUDACXX___CONCEPTS_ARITHMETIC_H

diff  --git a/libcxx/include/__concepts/assignable.h b/libcxx/include/__concepts/assignable.h
index 7f187a39f8f8..8c691767a001 100644
--- a/libcxx/include/__concepts/assignable.h
+++ b/libcxx/include/__concepts/assignable.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_ASSIGNABLE_H
-#define _LIBCPP___CONCEPTS_ASSIGNABLE_H
+#ifndef _LIBCUDACXX___CONCEPTS_ASSIGNABLE_H
+#define _LIBCUDACXX___CONCEPTS_ASSIGNABLE_H
 
 #include <__concepts/common_reference_with.h>
 #include <__concepts/same_as.h>
@@ -15,13 +15,13 @@
 #include <__utility/forward.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.assignable]
 
@@ -30,11 +30,11 @@ concept assignable_from =
   is_lvalue_reference_v<_Lhs> &&
   common_reference_with<__make_const_lvalue_ref<_Lhs>, __make_const_lvalue_ref<_Rhs>> &&
   requires (_Lhs __lhs, _Rhs&& __rhs) {
-    { __lhs = _VSTD::forward<_Rhs>(__rhs) } -> same_as<_Lhs>;
+    { __lhs = _CUDA_VSTD::forward<_Rhs>(__rhs) } -> same_as<_Lhs>;
   };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_ASSIGNABLE_H
+#endif // _LIBCUDACXX___CONCEPTS_ASSIGNABLE_H

diff  --git a/libcxx/include/__concepts/boolean_testable.h b/libcxx/include/__concepts/boolean_testable.h
index a96bde711749..8ca1078fc2c3 100644
--- a/libcxx/include/__concepts/boolean_testable.h
+++ b/libcxx/include/__concepts/boolean_testable.h
@@ -6,20 +6,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_BOOLEAN_TESTABLE_H
-#define _LIBCPP___CONCEPTS_BOOLEAN_TESTABLE_H
+#ifndef _LIBCUDACXX___CONCEPTS_BOOLEAN_TESTABLE_H
+#define _LIBCUDACXX___CONCEPTS_BOOLEAN_TESTABLE_H
 
 #include <__concepts/convertible_to.h>
 #include <__config>
 #include <__utility/forward.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concepts.booleantestable]
 
@@ -28,11 +28,11 @@ concept __boolean_testable_impl = convertible_to<_Tp, bool>;
 
 template<class _Tp>
 concept __boolean_testable = __boolean_testable_impl<_Tp> && requires(_Tp&& __t) {
-  { !_VSTD::forward<_Tp>(__t) } -> __boolean_testable_impl;
+  { !_CUDA_VSTD::forward<_Tp>(__t) } -> __boolean_testable_impl;
 };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_BOOLEAN_TESTABLE_H
+#endif // _LIBCUDACXX___CONCEPTS_BOOLEAN_TESTABLE_H

diff  --git a/libcxx/include/__concepts/class_or_enum.h b/libcxx/include/__concepts/class_or_enum.h
index 9fd62ba89243..a3a237f61850 100644
--- a/libcxx/include/__concepts/class_or_enum.h
+++ b/libcxx/include/__concepts/class_or_enum.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_CLASS_OR_ENUM_H
-#define _LIBCPP___CONCEPTS_CLASS_OR_ENUM_H
+#ifndef _LIBCUDACXX___CONCEPTS_CLASS_OR_ENUM_H
+#define _LIBCUDACXX___CONCEPTS_CLASS_OR_ENUM_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // Whether a type is a class type or enumeration type according to the Core wording.
 
@@ -30,8 +30,8 @@ concept __class_or_enum = is_class_v<_Tp> || is_union_v<_Tp> || is_enum_v<_Tp>;
 template<class _Tp>
 concept __workaround_52970 = is_class_v<__uncvref_t<_Tp>> || is_union_v<__uncvref_t<_Tp>>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_CLASS_OR_ENUM_H
+#endif // _LIBCUDACXX___CONCEPTS_CLASS_OR_ENUM_H

diff  --git a/libcxx/include/__concepts/common_reference_with.h b/libcxx/include/__concepts/common_reference_with.h
index cae2f5bccce0..cfdb07a6e843 100644
--- a/libcxx/include/__concepts/common_reference_with.h
+++ b/libcxx/include/__concepts/common_reference_with.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_COMMON_REFERENCE_WITH_H
-#define _LIBCPP___CONCEPTS_COMMON_REFERENCE_WITH_H
+#ifndef _LIBCUDACXX___CONCEPTS_COMMON_REFERENCE_WITH_H
+#define _LIBCUDACXX___CONCEPTS_COMMON_REFERENCE_WITH_H
 
 #include <__concepts/convertible_to.h>
 #include <__concepts/same_as.h>
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.commonref]
 
@@ -30,8 +30,8 @@ concept common_reference_with =
   convertible_to<_Tp, common_reference_t<_Tp, _Up>> &&
   convertible_to<_Up, common_reference_t<_Tp, _Up>>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_COMMON_REFERENCE_WITH_H
+#endif // _LIBCUDACXX___CONCEPTS_COMMON_REFERENCE_WITH_H

diff  --git a/libcxx/include/__concepts/common_with.h b/libcxx/include/__concepts/common_with.h
index 1b5f4da4af9a..8ddfbc89ba32 100644
--- a/libcxx/include/__concepts/common_with.h
+++ b/libcxx/include/__concepts/common_with.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_COMMON_WITH_H
-#define _LIBCPP___CONCEPTS_COMMON_WITH_H
+#ifndef _LIBCUDACXX___CONCEPTS_COMMON_WITH_H
+#define _LIBCUDACXX___CONCEPTS_COMMON_WITH_H
 
 #include <__concepts/common_reference_with.h>
 #include <__concepts/same_as.h>
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.common]
 
@@ -40,8 +40,8 @@ concept common_with =
       add_lvalue_reference_t<const _Tp>,
       add_lvalue_reference_t<const _Up>>>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_COMMON_WITH_H
+#endif // _LIBCUDACXX___CONCEPTS_COMMON_WITH_H

diff  --git a/libcxx/include/__concepts/constructible.h b/libcxx/include/__concepts/constructible.h
index aaf515417e4c..1b1a967505ff 100644
--- a/libcxx/include/__concepts/constructible.h
+++ b/libcxx/include/__concepts/constructible.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_CONSTRUCTIBLE_H
-#define _LIBCPP___CONCEPTS_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___CONCEPTS_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___CONCEPTS_CONSTRUCTIBLE_H
 
 #include <__concepts/convertible_to.h>
 #include <__concepts/destructible.h>
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.constructible]
 template<class _Tp, class... _Args>
@@ -49,8 +49,8 @@ concept copy_constructible =
   constructible_from<_Tp, const _Tp&> && convertible_to<const _Tp&, _Tp> &&
   constructible_from<_Tp, const _Tp> && convertible_to<const _Tp, _Tp>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___CONCEPTS_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__concepts/convertible_to.h b/libcxx/include/__concepts/convertible_to.h
index 5d9d43710421..65f373613402 100644
--- a/libcxx/include/__concepts/convertible_to.h
+++ b/libcxx/include/__concepts/convertible_to.h
@@ -6,20 +6,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_CONVERTIBLE_TO_H
-#define _LIBCPP___CONCEPTS_CONVERTIBLE_TO_H
+#ifndef _LIBCUDACXX___CONCEPTS_CONVERTIBLE_TO_H
+#define _LIBCUDACXX___CONCEPTS_CONVERTIBLE_TO_H
 
 #include <__config>
 #include <__utility/declval.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.convertible]
 
@@ -30,8 +30,8 @@ concept convertible_to =
     static_cast<_To>(declval<_From>());
   };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_CONVERTIBLE_TO_H
+#endif // _LIBCUDACXX___CONCEPTS_CONVERTIBLE_TO_H

diff  --git a/libcxx/include/__concepts/copyable.h b/libcxx/include/__concepts/copyable.h
index c5d8a80b9dad..cd88c65f4a28 100644
--- a/libcxx/include/__concepts/copyable.h
+++ b/libcxx/include/__concepts/copyable.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_COPYABLE_H
-#define _LIBCPP___CONCEPTS_COPYABLE_H
+#ifndef _LIBCUDACXX___CONCEPTS_COPYABLE_H
+#define _LIBCUDACXX___CONCEPTS_COPYABLE_H
 
 #include <__concepts/assignable.h>
 #include <__concepts/constructible.h>
 #include <__concepts/movable.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concepts.object]
 
@@ -32,8 +32,8 @@ concept copyable =
   assignable_from<_Tp&, const _Tp&> &&
   assignable_from<_Tp&, const _Tp>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_COPYABLE_H
+#endif // _LIBCUDACXX___CONCEPTS_COPYABLE_H

diff  --git a/libcxx/include/__concepts/derived_from.h b/libcxx/include/__concepts/derived_from.h
index 4b2914794735..99d387529530 100644
--- a/libcxx/include/__concepts/derived_from.h
+++ b/libcxx/include/__concepts/derived_from.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_DERIVED_FROM_H
-#define _LIBCPP___CONCEPTS_DERIVED_FROM_H
+#ifndef _LIBCUDACXX___CONCEPTS_DERIVED_FROM_H
+#define _LIBCUDACXX___CONCEPTS_DERIVED_FROM_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.derived]
 
@@ -27,8 +27,8 @@ concept derived_from =
   is_base_of_v<_Bp, _Dp> &&
   is_convertible_v<const volatile _Dp*, const volatile _Bp*>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_DERIVED_FROM_H
+#endif // _LIBCUDACXX___CONCEPTS_DERIVED_FROM_H

diff  --git a/libcxx/include/__concepts/destructible.h b/libcxx/include/__concepts/destructible.h
index 90a043d314c2..4ad449b36280 100644
--- a/libcxx/include/__concepts/destructible.h
+++ b/libcxx/include/__concepts/destructible.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_DESTRUCTIBLE_H
-#define _LIBCPP___CONCEPTS_DESTRUCTIBLE_H
+#ifndef _LIBCUDACXX___CONCEPTS_DESTRUCTIBLE_H
+#define _LIBCUDACXX___CONCEPTS_DESTRUCTIBLE_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.destructible]
 
 template<class _Tp>
 concept destructible = is_nothrow_destructible_v<_Tp>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_DESTRUCTIBLE_H
+#endif // _LIBCUDACXX___CONCEPTS_DESTRUCTIBLE_H

diff  --git a/libcxx/include/__concepts/
diff erent_from.h b/libcxx/include/__concepts/
diff erent_from.h
index 3066372e8683..4308546175e5 100644
--- a/libcxx/include/__concepts/
diff erent_from.h
+++ b/libcxx/include/__concepts/
diff erent_from.h
@@ -6,26 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_DIFFERENT_FROM_H
-#define _LIBCPP___CONCEPTS_DIFFERENT_FROM_H
+#ifndef _LIBCUDACXX___CONCEPTS_DIFFERENT_FROM_H
+#define _LIBCUDACXX___CONCEPTS_DIFFERENT_FROM_H
 
 #include <__concepts/same_as.h>
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template<class _Tp, class _Up>
 concept __
diff erent_from = !same_as<remove_cvref_t<_Tp>, remove_cvref_t<_Up>>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_DIFFERENT_FROM_H
+#endif // _LIBCUDACXX___CONCEPTS_DIFFERENT_FROM_H

diff  --git a/libcxx/include/__concepts/equality_comparable.h b/libcxx/include/__concepts/equality_comparable.h
index 7c750c5937b5..b57f207d7aae 100644
--- a/libcxx/include/__concepts/equality_comparable.h
+++ b/libcxx/include/__concepts/equality_comparable.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_EQUALITY_COMPARABLE_H
-#define _LIBCPP___CONCEPTS_EQUALITY_COMPARABLE_H
+#ifndef _LIBCUDACXX___CONCEPTS_EQUALITY_COMPARABLE_H
+#define _LIBCUDACXX___CONCEPTS_EQUALITY_COMPARABLE_H
 
 #include <__concepts/boolean_testable.h>
 #include <__concepts/common_reference_with.h>
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.equalitycomparable]
 
@@ -46,8 +46,8 @@ concept equality_comparable_with =
       __make_const_lvalue_ref<_Up>>> &&
   __weakly_equality_comparable_with<_Tp, _Up>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_EQUALITY_COMPARABLE_H
+#endif // _LIBCUDACXX___CONCEPTS_EQUALITY_COMPARABLE_H

diff  --git a/libcxx/include/__concepts/invocable.h b/libcxx/include/__concepts/invocable.h
index d90389e97f3b..51e6b18c6469 100644
--- a/libcxx/include/__concepts/invocable.h
+++ b/libcxx/include/__concepts/invocable.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_INVOCABLE_H
-#define _LIBCPP___CONCEPTS_INVOCABLE_H
+#ifndef _LIBCUDACXX___CONCEPTS_INVOCABLE_H
+#define _LIBCUDACXX___CONCEPTS_INVOCABLE_H
 
 #include <__config>
 #include <__functional/invoke.h>
 #include <__utility/forward.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.invocable]
 
 template<class _Fn, class... _Args>
 concept invocable = requires(_Fn&& __fn, _Args&&... __args) {
-  _VSTD::invoke(_VSTD::forward<_Fn>(__fn), _VSTD::forward<_Args>(__args)...); // not required to be equality preserving
+  _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fn>(__fn), _CUDA_VSTD::forward<_Args>(__args)...); // not required to be equality preserving
 };
 
 // [concept.regular.invocable]
@@ -34,8 +34,8 @@ concept invocable = requires(_Fn&& __fn, _Args&&... __args) {
 template<class _Fn, class... _Args>
 concept regular_invocable = invocable<_Fn, _Args...>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_INVOCABLE_H
+#endif // _LIBCUDACXX___CONCEPTS_INVOCABLE_H

diff  --git a/libcxx/include/__concepts/movable.h b/libcxx/include/__concepts/movable.h
index 639219ed6b48..61d3041ed474 100644
--- a/libcxx/include/__concepts/movable.h
+++ b/libcxx/include/__concepts/movable.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_MOVABLE_H
-#define _LIBCPP___CONCEPTS_MOVABLE_H
+#ifndef _LIBCUDACXX___CONCEPTS_MOVABLE_H
+#define _LIBCUDACXX___CONCEPTS_MOVABLE_H
 
 #include <__concepts/assignable.h>
 #include <__concepts/constructible.h>
@@ -15,13 +15,13 @@
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concepts.object]
 
@@ -32,8 +32,8 @@ concept movable =
   assignable_from<_Tp&, _Tp> &&
   swappable<_Tp>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_MOVABLE_H
+#endif // _LIBCUDACXX___CONCEPTS_MOVABLE_H

diff  --git a/libcxx/include/__concepts/predicate.h b/libcxx/include/__concepts/predicate.h
index cb239752309f..7ea7dc8d7886 100644
--- a/libcxx/include/__concepts/predicate.h
+++ b/libcxx/include/__concepts/predicate.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_PREDICATE_H
-#define _LIBCPP___CONCEPTS_PREDICATE_H
+#ifndef _LIBCUDACXX___CONCEPTS_PREDICATE_H
+#define _LIBCUDACXX___CONCEPTS_PREDICATE_H
 
 #include <__concepts/boolean_testable.h>
 #include <__concepts/invocable.h>
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.predicate]
 
@@ -28,8 +28,8 @@ template<class _Fn, class... _Args>
 concept predicate =
   regular_invocable<_Fn, _Args...> && __boolean_testable<invoke_result_t<_Fn, _Args...>>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_PREDICATE_H
+#endif // _LIBCUDACXX___CONCEPTS_PREDICATE_H

diff  --git a/libcxx/include/__concepts/regular.h b/libcxx/include/__concepts/regular.h
index d15728d298bd..b2e3fcef0a05 100644
--- a/libcxx/include/__concepts/regular.h
+++ b/libcxx/include/__concepts/regular.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_REGULAR_H
-#define _LIBCPP___CONCEPTS_REGULAR_H
+#ifndef _LIBCUDACXX___CONCEPTS_REGULAR_H
+#define _LIBCUDACXX___CONCEPTS_REGULAR_H
 
 #include <__concepts/equality_comparable.h>
 #include <__concepts/semiregular.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.object]
 
 template<class _Tp>
 concept regular = semiregular<_Tp> && equality_comparable<_Tp>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_REGULAR_H
+#endif // _LIBCUDACXX___CONCEPTS_REGULAR_H

diff  --git a/libcxx/include/__concepts/relation.h b/libcxx/include/__concepts/relation.h
index 7d5141cac74c..5952e6833268 100644
--- a/libcxx/include/__concepts/relation.h
+++ b/libcxx/include/__concepts/relation.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_RELATION_H
-#define _LIBCPP___CONCEPTS_RELATION_H
+#ifndef _LIBCUDACXX___CONCEPTS_RELATION_H
+#define _LIBCUDACXX___CONCEPTS_RELATION_H
 
 #include <__concepts/predicate.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.relation]
 
@@ -37,8 +37,8 @@ concept equivalence_relation = relation<_Rp, _Tp, _Up>;
 template<class _Rp, class _Tp, class _Up>
 concept strict_weak_order = relation<_Rp, _Tp, _Up>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_RELATION_H
+#endif // _LIBCUDACXX___CONCEPTS_RELATION_H

diff  --git a/libcxx/include/__concepts/same_as.h b/libcxx/include/__concepts/same_as.h
index 765490661148..82567a675cd1 100644
--- a/libcxx/include/__concepts/same_as.h
+++ b/libcxx/include/__concepts/same_as.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_SAME_AS_H
-#define _LIBCPP___CONCEPTS_SAME_AS_H
+#ifndef _LIBCUDACXX___CONCEPTS_SAME_AS_H
+#define _LIBCUDACXX___CONCEPTS_SAME_AS_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.same]
 
@@ -28,8 +28,8 @@ concept __same_as_impl = _IsSame<_Tp, _Up>::value;
 template<class _Tp, class _Up>
 concept same_as = __same_as_impl<_Tp, _Up> && __same_as_impl<_Up, _Tp>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_SAME_AS_H
+#endif // _LIBCUDACXX___CONCEPTS_SAME_AS_H

diff  --git a/libcxx/include/__concepts/semiregular.h b/libcxx/include/__concepts/semiregular.h
index d15bb3ba42ba..a0edcd7969d9 100644
--- a/libcxx/include/__concepts/semiregular.h
+++ b/libcxx/include/__concepts/semiregular.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_SEMIREGULAR_H
-#define _LIBCPP___CONCEPTS_SEMIREGULAR_H
+#ifndef _LIBCUDACXX___CONCEPTS_SEMIREGULAR_H
+#define _LIBCUDACXX___CONCEPTS_SEMIREGULAR_H
 
 #include <__concepts/constructible.h>
 #include <__concepts/copyable.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.object]
 
 template<class _Tp>
 concept semiregular = copyable<_Tp> && default_initializable<_Tp>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_SEMIREGULAR_H
+#endif // _LIBCUDACXX___CONCEPTS_SEMIREGULAR_H

diff  --git a/libcxx/include/__concepts/swappable.h b/libcxx/include/__concepts/swappable.h
index fef940f21fed..1bcce696da4d 100644
--- a/libcxx/include/__concepts/swappable.h
+++ b/libcxx/include/__concepts/swappable.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_SWAPPABLE_H
-#define _LIBCPP___CONCEPTS_SWAPPABLE_H
+#ifndef _LIBCUDACXX___CONCEPTS_SWAPPABLE_H
+#define _LIBCUDACXX___CONCEPTS_SWAPPABLE_H
 
 #include <__concepts/assignable.h>
 #include <__concepts/class_or_enum.h>
@@ -19,13 +19,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.swappable]
 
@@ -39,7 +39,7 @@ namespace __swap {
   concept __unqualified_swappable_with =
     (__class_or_enum<remove_cvref_t<_Tp>> || __class_or_enum<remove_cvref_t<_Up>>) &&
     requires(_Tp&& __t, _Up&& __u) {
-      swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u));
+      swap(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u));
     };
 
   struct __fn;
@@ -64,9 +64,9 @@ namespace __swap {
     template<class _Tp, class _Up>
       requires __unqualified_swappable_with<_Tp, _Up>
     constexpr void operator()(_Tp&& __t, _Up&& __u) const
-      noexcept(noexcept(swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u))))
+      noexcept(noexcept(swap(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u))))
     {
-      swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u));
+      swap(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u));
     }
 
     // 2.2   Otherwise, if `E1` and `E2` are lvalues of array types with equal extent and...
@@ -86,7 +86,7 @@ namespace __swap {
     constexpr void operator()(_Tp& __x, _Tp& __y) const
       noexcept(is_nothrow_move_constructible_v<_Tp> && is_nothrow_move_assignable_v<_Tp>)
     {
-      __y = _VSTD::exchange(__x, _VSTD::move(__y));
+      __y = _CUDA_VSTD::exchange(__x, _CUDA_VSTD::move(__y));
     }
   };
 } // namespace __swap
@@ -103,14 +103,14 @@ template<class _Tp, class _Up>
 concept swappable_with =
   common_reference_with<_Tp, _Up> &&
   requires(_Tp&& __t, _Up&& __u) {
-    ranges::swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Tp>(__t));
-    ranges::swap(_VSTD::forward<_Up>(__u), _VSTD::forward<_Up>(__u));
-    ranges::swap(_VSTD::forward<_Tp>(__t), _VSTD::forward<_Up>(__u));
-    ranges::swap(_VSTD::forward<_Up>(__u), _VSTD::forward<_Tp>(__t));
+    ranges::swap(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Tp>(__t));
+    ranges::swap(_CUDA_VSTD::forward<_Up>(__u), _CUDA_VSTD::forward<_Up>(__u));
+    ranges::swap(_CUDA_VSTD::forward<_Tp>(__t), _CUDA_VSTD::forward<_Up>(__u));
+    ranges::swap(_CUDA_VSTD::forward<_Up>(__u), _CUDA_VSTD::forward<_Tp>(__t));
   };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_SWAPPABLE_H
+#endif // _LIBCUDACXX___CONCEPTS_SWAPPABLE_H

diff  --git a/libcxx/include/__concepts/totally_ordered.h b/libcxx/include/__concepts/totally_ordered.h
index 25347790de07..8453d97449cd 100644
--- a/libcxx/include/__concepts/totally_ordered.h
+++ b/libcxx/include/__concepts/totally_ordered.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONCEPTS_TOTALLY_ORDERED_H
-#define _LIBCPP___CONCEPTS_TOTALLY_ORDERED_H
+#ifndef _LIBCUDACXX___CONCEPTS_TOTALLY_ORDERED_H
+#define _LIBCUDACXX___CONCEPTS_TOTALLY_ORDERED_H
 
 #include <__concepts/boolean_testable.h>
 #include <__concepts/equality_comparable.h>
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [concept.totallyordered]
 
@@ -50,8 +50,8 @@ concept totally_ordered_with =
       __make_const_lvalue_ref<_Up>>> &&
   __partially_ordered_with<_Tp, _Up>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___CONCEPTS_TOTALLY_ORDERED_H
+#endif // _LIBCUDACXX___CONCEPTS_TOTALLY_ORDERED_H

diff  --git a/libcxx/include/__config b/libcxx/include/__config
index 8c2f7614af53..1f6b1f65d9b4 100644
--- a/libcxx/include/__config
+++ b/libcxx/include/__config
@@ -7,125 +7,125 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONFIG
-#define _LIBCPP___CONFIG
+#ifndef _LIBCUDACXX___CONFIG
+#define _LIBCUDACXX___CONFIG
 
 #include <__config_site>
 
 #if defined(_MSC_VER) && !defined(__clang__)
-#  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
-#    define _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+#  if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#    define _LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER
 #  endif
 #endif
 
-#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+#ifndef _LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER
 #  pragma GCC system_header
 #endif
 
 #ifdef __cplusplus
 
-#  define _LIBCPP_VERSION 15000
+#  define _LIBCUDACXX_VERSION 15000
 
-#  define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y
-#  define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y)
+#  define _LIBCUDACXX_CONCAT_IMPL(_X, _Y) _X##_Y
+#  define _LIBCUDACXX_CONCAT(_X, _Y) _LIBCUDACXX_CONCAT_IMPL(_X, _Y)
 
 // Valid C++ identifier that revs with every libc++ version. This can be used to
 // generate identifiers that must be unique for every released libc++ version.
-#  define _LIBCPP_VERSIONED_IDENTIFIER _LIBCPP_CONCAT(v, _LIBCPP_VERSION)
+#  define _LIBCUDACXX_VERSIONED_IDENTIFIER _LIBCUDACXX_CONCAT(v, _LIBCUDACXX_VERSION)
 
 #  if __STDC_HOSTED__ == 0
-#    define _LIBCPP_FREESTANDING
+#    define _LIBCUDACXX_FREESTANDING
 #  endif
 
-#  ifndef _LIBCPP_STD_VER
+#  ifndef _LIBCUDACXX_STD_VER
 #    if __cplusplus <= 201103L
-#      define _LIBCPP_STD_VER 11
+#      define _LIBCUDACXX_STD_VER 11
 #    elif __cplusplus <= 201402L
-#      define _LIBCPP_STD_VER 14
+#      define _LIBCUDACXX_STD_VER 14
 #    elif __cplusplus <= 201703L
-#      define _LIBCPP_STD_VER 17
+#      define _LIBCUDACXX_STD_VER 17
 #    elif __cplusplus <= 202002L
-#      define _LIBCPP_STD_VER 20
+#      define _LIBCUDACXX_STD_VER 20
 #    else
-#      define _LIBCPP_STD_VER 22 // current year, or date of c++2b ratification
+#      define _LIBCUDACXX_STD_VER 22 // current year, or date of c++2b ratification
 #    endif
-#  endif // _LIBCPP_STD_VER
+#  endif // _LIBCUDACXX_STD_VER
 
 #  if defined(__ELF__)
-#    define _LIBCPP_OBJECT_FORMAT_ELF 1
+#    define _LIBCUDACXX_OBJECT_FORMAT_ELF 1
 #  elif defined(__MACH__)
-#    define _LIBCPP_OBJECT_FORMAT_MACHO 1
+#    define _LIBCUDACXX_OBJECT_FORMAT_MACHO 1
 #  elif defined(_WIN32)
-#    define _LIBCPP_OBJECT_FORMAT_COFF 1
+#    define _LIBCUDACXX_OBJECT_FORMAT_COFF 1
 #  elif defined(__wasm__)
-#    define _LIBCPP_OBJECT_FORMAT_WASM 1
+#    define _LIBCUDACXX_OBJECT_FORMAT_WASM 1
 #  elif defined(_AIX)
-#    define _LIBCPP_OBJECT_FORMAT_XCOFF 1
+#    define _LIBCUDACXX_OBJECT_FORMAT_XCOFF 1
 #  else
 // ... add new file formats here ...
 #  endif
 
-#  if _LIBCPP_ABI_VERSION >= 2
+#  if _LIBCUDACXX_ABI_VERSION >= 2
 // Change short string representation so that string data starts at offset 0,
 // improving its alignment in some cases.
-#    define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
+#    define _LIBCUDACXX_ABI_ALTERNATE_STRING_LAYOUT
 // Fix deque iterator type in order to support incomplete types.
-#    define _LIBCPP_ABI_INCOMPLETE_TYPES_IN_DEQUE
+#    define _LIBCUDACXX_ABI_INCOMPLETE_TYPES_IN_DEQUE
 // Fix undefined behavior in how std::list stores its linked nodes.
-#    define _LIBCPP_ABI_LIST_REMOVE_NODE_POINTER_UB
+#    define _LIBCUDACXX_ABI_LIST_REMOVE_NODE_POINTER_UB
 // Fix undefined behavior in  how __tree stores its end and parent nodes.
-#    define _LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB
+#    define _LIBCUDACXX_ABI_TREE_REMOVE_NODE_POINTER_UB
 // Fix undefined behavior in how __hash_table stores its pointer types.
-#    define _LIBCPP_ABI_FIX_UNORDERED_NODE_POINTER_UB
-#    define _LIBCPP_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB
-#    define _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
+#    define _LIBCUDACXX_ABI_FIX_UNORDERED_NODE_POINTER_UB
+#    define _LIBCUDACXX_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB
+#    define _LIBCUDACXX_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
 // Define a key function for `bad_function_call` in the library, to centralize
 // its vtable and typeinfo to libc++ rather than having all other libraries
 // using that class define their own copies.
-#    define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
+#    define _LIBCUDACXX_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
 // Override the default return value of exception::what() for
 // bad_function_call::what() with a string that is specific to
 // bad_function_call (see http://wg21.link/LWG2233). This is an ABI break
 // because it changes the vtable layout of bad_function_call.
-#    define _LIBCPP_ABI_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE
+#    define _LIBCUDACXX_ABI_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE
 // Enable optimized version of __do_get_(un)signed which avoids redundant copies.
-#    define _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
+#    define _LIBCUDACXX_ABI_OPTIMIZED_LOCALE_NUM_GET
 // Give reverse_iterator<T> one data member of type T, not two.
 // Also, in C++17 and later, don't derive iterator types from std::iterator.
-#    define _LIBCPP_ABI_NO_ITERATOR_BASES
+#    define _LIBCUDACXX_ABI_NO_ITERATOR_BASES
 // Use the smallest possible integer type to represent the index of the variant.
 // Previously libc++ used "unsigned int" exclusively.
-#    define _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
+#    define _LIBCUDACXX_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
 // Unstable attempt to provide a more optimized std::function
-#    define _LIBCPP_ABI_OPTIMIZED_FUNCTION
+#    define _LIBCUDACXX_ABI_OPTIMIZED_FUNCTION
 // All the regex constants must be distinct and nonzero.
-#    define _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO
+#    define _LIBCUDACXX_ABI_REGEX_CONSTANTS_NONZERO
 // Re-worked external template instantiations for std::string with a focus on
 // performance and fast-path inlining.
-#    define _LIBCPP_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION
+#    define _LIBCUDACXX_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION
 // Enable clang::trivial_abi on std::unique_ptr.
-#    define _LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI
+#    define _LIBCUDACXX_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI
 // Enable clang::trivial_abi on std::shared_ptr and std::weak_ptr
-#    define _LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI
+#    define _LIBCUDACXX_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI
 // std::random_device holds some state when it uses an implementation that gets
-// entropy from a file (see _LIBCPP_USING_DEV_RANDOM). When switching from this
+// entropy from a file (see _LIBCUDACXX_USING_DEV_RANDOM). When switching from this
 // implementation to another one on a platform that has already shipped
 // std::random_device, one needs to retain the same object layout to remain ABI
 // compatible. This switch removes these workarounds for platforms that don't care
 // about ABI compatibility.
-#    define _LIBCPP_ABI_NO_RANDOM_DEVICE_COMPATIBILITY_LAYOUT
+#    define _LIBCUDACXX_ABI_NO_RANDOM_DEVICE_COMPATIBILITY_LAYOUT
 // Don't export the legacy __basic_string_common class and its methods from the built library.
-#    define _LIBCPP_ABI_DO_NOT_EXPORT_BASIC_STRING_COMMON
+#    define _LIBCUDACXX_ABI_DO_NOT_EXPORT_BASIC_STRING_COMMON
 // Don't export the legacy __vector_base_common class and its methods from the built library.
-#    define _LIBCPP_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
+#    define _LIBCUDACXX_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
 // According to the Standard, `bitset::operator[] const` returns bool
-#    define _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
+#    define _LIBCUDACXX_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
 // Remove the base 10 implementation of std::to_chars from the dylib.
 // The implementation moved to the header, but we still export the symbols from
 // the dylib for backwards compatibility.
-#    define _LIBCPP_ABI_DO_NOT_EXPORT_TO_CHARS_BASE_10
-#  elif _LIBCPP_ABI_VERSION == 1
-#    if !(defined(_LIBCPP_OBJECT_FORMAT_COFF) || defined(_LIBCPP_OBJECT_FORMAT_XCOFF))
+#    define _LIBCUDACXX_ABI_DO_NOT_EXPORT_TO_CHARS_BASE_10
+#  elif _LIBCUDACXX_ABI_VERSION == 1
+#    if !(defined(_LIBCUDACXX_OBJECT_FORMAT_COFF) || defined(_LIBCUDACXX_OBJECT_FORMAT_XCOFF))
 // Enable compiling copies of now inline methods into the dylib to support
 // applications compiled against older libraries. This is unnecessary with
 // COFF dllexport semantics, since dllexport forces a non-inline definition
@@ -134,32 +134,32 @@
 // the linker will take issue with the symbols in the shared object if the
 // weak inline methods get visibility (such as from -fvisibility-inlines-hidden),
 // so disable it.
-#      define _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
+#      define _LIBCUDACXX_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
 #    endif
 // Feature macros for disabling pre ABI v1 features. All of these options
 // are deprecated.
 #    if defined(__FreeBSD__)
-#      define _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
+#      define _LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
 #    endif
 #  endif
 
-#  if defined(_LIBCPP_BUILDING_LIBRARY) || _LIBCPP_ABI_VERSION >= 2
+#  if defined(_LIBCUDACXX_BUILDING_LIBRARY) || _LIBCUDACXX_ABI_VERSION >= 2
 // Enable additional explicit instantiations of iostreams components. This
 // reduces the number of weak definitions generated in programs that use
 // iostreams by providing a single strong definition in the shared library.
-#    define _LIBCPP_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1
+#    define _LIBCUDACXX_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1
 
 // Define a key function for `bad_function_call` in the library, to centralize
 // its vtable and typeinfo to libc++ rather than having all other libraries
 // using that class define their own copies.
-#    define _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
+#    define _LIBCUDACXX_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
 #  endif
 
-#  define _LIBCPP_TOSTRING2(x) #  x
-#  define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)
+#  define _LIBCUDACXX_TOSTRING2(x) #  x
+#  define _LIBCUDACXX_TOSTRING(x) _LIBCUDACXX_TOSTRING2(x)
 
 #  if __cplusplus < 201103L
-#    define _LIBCPP_CXX03_LANG
+#    define _LIBCUDACXX_CXX03_LANG
 #  endif
 
 #  ifndef __has_attribute
@@ -199,22 +199,22 @@
 #  endif
 
 #  if defined(__apple_build_version__)
-#    define _LIBCPP_COMPILER_CLANG_BASED
-#    define _LIBCPP_APPLE_CLANG_VER (__apple_build_version__ / 10000)
+#    define _LIBCUDACXX_COMPILER_CLANG_BASED
+#    define _LIBCUDACXX_APPLE_CLANG_VER (__apple_build_version__ / 10000)
 #  elif defined(__clang__)
-#    define _LIBCPP_COMPILER_CLANG_BASED
-#    define _LIBCPP_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
+#    define _LIBCUDACXX_COMPILER_CLANG_BASED
+#    define _LIBCUDACXX_CLANG_VER (__clang_major__ * 100 + __clang_minor__)
 #  elif defined(__GNUC__)
-#    define _LIBCPP_COMPILER_GCC
+#    define _LIBCUDACXX_COMPILER_GCC
 #  elif defined(_MSC_VER)
-#    define _LIBCPP_COMPILER_MSVC
+#    define _LIBCUDACXX_COMPILER_MSVC
 #  endif
 
-#  if !defined(_LIBCPP_COMPILER_CLANG_BASED) && __cplusplus < 201103L
+#  if !defined(_LIBCUDACXX_COMPILER_CLANG_BASED) && __cplusplus < 201103L
 #    error "libc++ only supports C++03 with Clang-based compilers. Please enable C++11"
 #  endif
 
-#  ifdef _LIBCPP_COMPILER_MSVC
+#  ifdef _LIBCUDACXX_COMPILER_MSVC
 #    error If you successfully use libc++ with MSVC please tell the libc++ developers and consider upstreaming your \
 changes. We are not aware of anybody using this configuration and know that at least some code is currently broken. \
 If there are users of this configuration we are happy to provide support.
@@ -225,44 +225,44 @@ If there are users of this configuration we are happy to provide support.
 // that Windows compilers pretending to be MSVC++ target the Microsoft ABI,
 // and allow the user to explicitly specify the ABI to handle cases where this
 // heuristic falls short.
-#  if defined(_LIBCPP_ABI_FORCE_ITANIUM) && defined(_LIBCPP_ABI_FORCE_MICROSOFT)
-#    error "Only one of _LIBCPP_ABI_FORCE_ITANIUM and _LIBCPP_ABI_FORCE_MICROSOFT can be defined"
-#  elif defined(_LIBCPP_ABI_FORCE_ITANIUM)
-#    define _LIBCPP_ABI_ITANIUM
-#  elif defined(_LIBCPP_ABI_FORCE_MICROSOFT)
-#    define _LIBCPP_ABI_MICROSOFT
+#  if defined(_LIBCUDACXX_ABI_FORCE_ITANIUM) && defined(_LIBCUDACXX_ABI_FORCE_MICROSOFT)
+#    error "Only one of _LIBCUDACXX_ABI_FORCE_ITANIUM and _LIBCUDACXX_ABI_FORCE_MICROSOFT can be defined"
+#  elif defined(_LIBCUDACXX_ABI_FORCE_ITANIUM)
+#    define _LIBCUDACXX_ABI_ITANIUM
+#  elif defined(_LIBCUDACXX_ABI_FORCE_MICROSOFT)
+#    define _LIBCUDACXX_ABI_MICROSOFT
 #  else
 #    if defined(_WIN32) && defined(_MSC_VER)
-#      define _LIBCPP_ABI_MICROSOFT
+#      define _LIBCUDACXX_ABI_MICROSOFT
 #    else
-#      define _LIBCPP_ABI_ITANIUM
+#      define _LIBCUDACXX_ABI_ITANIUM
 #    endif
 #  endif
 
-#  if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_NO_VCRUNTIME)
-#    define _LIBCPP_ABI_VCRUNTIME
+#  if defined(_LIBCUDACXX_ABI_MICROSOFT) && !defined(_LIBCUDACXX_NO_VCRUNTIME)
+#    define _LIBCUDACXX_ABI_VCRUNTIME
 #  endif
 
 #  if __has_feature(experimental_library)
-#    ifndef _LIBCPP_ENABLE_EXPERIMENTAL
-#      define _LIBCPP_ENABLE_EXPERIMENTAL
+#    ifndef _LIBCUDACXX_ENABLE_EXPERIMENTAL
+#      define _LIBCUDACXX_ENABLE_EXPERIMENTAL
 #    endif
 #  endif
 
 // Incomplete features get their own specific disabling flags. This makes it
 // easier to grep for target specific flags once the feature is complete.
-#  if !defined(_LIBCPP_ENABLE_EXPERIMENTAL) && !defined(_LIBCPP_BUILDING_LIBRARY)
-#    define _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
-#    define _LIBCPP_HAS_NO_INCOMPLETE_RANGES
+#  if !defined(_LIBCUDACXX_ENABLE_EXPERIMENTAL) && !defined(_LIBCUDACXX_BUILDING_LIBRARY)
+#    define _LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT
+#    define _LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES
 #  endif
 
 // Need to detect which libc we're using if we're on Linux.
 #  if defined(__linux__)
 #    include <features.h>
 #    if defined(__GLIBC_PREREQ)
-#      define _LIBCPP_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
+#      define _LIBCUDACXX_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b)
 #    else
-#      define _LIBCPP_GLIBC_PREREQ(a, b) 0
+#      define _LIBCUDACXX_GLIBC_PREREQ(a, b) 0
 #    endif // defined(__GLIBC_PREREQ)
 #  endif   // defined(__linux__)
 
@@ -272,21 +272,21 @@ If there are users of this configuration we are happy to provide support.
 
 #  ifdef __LITTLE_ENDIAN__
 #    if __LITTLE_ENDIAN__
-#      define _LIBCPP_LITTLE_ENDIAN
+#      define _LIBCUDACXX_LITTLE_ENDIAN
 #    endif // __LITTLE_ENDIAN__
 #  endif   // __LITTLE_ENDIAN__
 
 #  ifdef __BIG_ENDIAN__
 #    if __BIG_ENDIAN__
-#      define _LIBCPP_BIG_ENDIAN
+#      define _LIBCUDACXX_BIG_ENDIAN
 #    endif // __BIG_ENDIAN__
 #  endif   // __BIG_ENDIAN__
 
 #  ifdef __BYTE_ORDER__
 #    if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
-#      define _LIBCPP_LITTLE_ENDIAN
+#      define _LIBCUDACXX_LITTLE_ENDIAN
 #    elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
-#      define _LIBCPP_BIG_ENDIAN
+#      define _LIBCUDACXX_BIG_ENDIAN
 #    endif // __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
 #  endif   // __BYTE_ORDER__
 
@@ -294,138 +294,138 @@ If there are users of this configuration we are happy to provide support.
 #    include <sys/endian.h>
 #    include <osreldate.h>
 #    if _BYTE_ORDER == _LITTLE_ENDIAN
-#      define _LIBCPP_LITTLE_ENDIAN
+#      define _LIBCUDACXX_LITTLE_ENDIAN
 #    else // _BYTE_ORDER == _LITTLE_ENDIAN
-#      define _LIBCPP_BIG_ENDIAN
+#      define _LIBCUDACXX_BIG_ENDIAN
 #    endif // _BYTE_ORDER == _LITTLE_ENDIAN
 #  endif   // __FreeBSD__
 
 #  if defined(__NetBSD__) || defined(__OpenBSD__)
 #    include <sys/endian.h>
 #    if _BYTE_ORDER == _LITTLE_ENDIAN
-#      define _LIBCPP_LITTLE_ENDIAN
+#      define _LIBCUDACXX_LITTLE_ENDIAN
 #    else // _BYTE_ORDER == _LITTLE_ENDIAN
-#      define _LIBCPP_BIG_ENDIAN
+#      define _LIBCUDACXX_BIG_ENDIAN
 #    endif // _BYTE_ORDER == _LITTLE_ENDIAN
 #  endif   // defined(__NetBSD__) || defined(__OpenBSD__)
 
 #  if defined(_WIN32)
-#    define _LIBCPP_WIN32API
-#    define _LIBCPP_LITTLE_ENDIAN
-#    define _LIBCPP_SHORT_WCHAR 1
+#    define _LIBCUDACXX_WIN32API
+#    define _LIBCUDACXX_LITTLE_ENDIAN
+#    define _LIBCUDACXX_SHORT_WCHAR 1
 // Both MinGW and native MSVC provide a "MSVC"-like environment
-#    define _LIBCPP_MSVCRT_LIKE
+#    define _LIBCUDACXX_MSVCRT_LIKE
 // If mingw not explicitly detected, assume using MS C runtime only if
 // a MS compatibility version is specified.
 #    if defined(_MSC_VER) && !defined(__MINGW32__)
-#      define _LIBCPP_MSVCRT // Using Microsoft's C Runtime library
+#      define _LIBCUDACXX_MSVCRT // Using Microsoft's C Runtime library
 #    endif
 #    if (defined(_M_AMD64) || defined(__x86_64__)) || (defined(_M_ARM) || defined(__arm__))
-#      define _LIBCPP_HAS_BITSCAN64
+#      define _LIBCUDACXX_HAS_BITSCAN64
 #    endif
-#    define _LIBCPP_HAS_OPEN_WITH_WCHAR
+#    define _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
 #  endif // defined(_WIN32)
 
 #  ifdef __sun__
 #    include <sys/isa_defs.h>
 #    ifdef _LITTLE_ENDIAN
-#      define _LIBCPP_LITTLE_ENDIAN
+#      define _LIBCUDACXX_LITTLE_ENDIAN
 #    else
-#      define _LIBCPP_BIG_ENDIAN
+#      define _LIBCUDACXX_BIG_ENDIAN
 #    endif
 #  endif // __sun__
 
 #  if defined(_AIX) && !defined(__64BIT__)
 // The size of wchar is 2 byte on 32-bit mode on AIX.
-#    define _LIBCPP_SHORT_WCHAR 1
+#    define _LIBCUDACXX_SHORT_WCHAR 1
 #  endif
 
 // Libc++ supports various implementations of std::random_device.
 //
-// _LIBCPP_USING_DEV_RANDOM
+// _LIBCUDACXX_USING_DEV_RANDOM
 //      Read entropy from the given file, by default `/dev/urandom`.
 //      If a token is provided, it is assumed to be the path to a file
 //      to read entropy from. This is the default behavior if nothing
 //      else is specified. This implementation requires storing state
 //      inside `std::random_device`.
 //
-// _LIBCPP_USING_ARC4_RANDOM
+// _LIBCUDACXX_USING_ARC4_RANDOM
 //      Use arc4random(). This allows obtaining random data even when
 //      using sandboxing mechanisms. On some platforms like Apple, this
 //      is the recommended source of entropy for user-space programs.
 //      When this option is used, the token passed to `std::random_device`'s
 //      constructor *must* be "/dev/urandom" -- anything else is an error.
 //
-// _LIBCPP_USING_GETENTROPY
+// _LIBCUDACXX_USING_GETENTROPY
 //      Use getentropy().
 //      When this option is used, the token passed to `std::random_device`'s
 //      constructor *must* be "/dev/urandom" -- anything else is an error.
 //
-// _LIBCPP_USING_FUCHSIA_CPRNG
+// _LIBCUDACXX_USING_FUCHSIA_CPRNG
 //      Use Fuchsia's zx_cprng_draw() system call, which is specified to
 //      deliver high-quality entropy and cannot fail.
 //      When this option is used, the token passed to `std::random_device`'s
 //      constructor *must* be "/dev/urandom" -- anything else is an error.
 //
-// _LIBCPP_USING_NACL_RANDOM
+// _LIBCUDACXX_USING_NACL_RANDOM
 //      NaCl's sandbox (which PNaCl also runs in) doesn't allow filesystem access,
 //      including accesses to the special files under `/dev`. This implementation
 //      uses the NaCL syscall `nacl_secure_random_init()` to get entropy.
 //      When this option is used, the token passed to `std::random_device`'s
 //      constructor *must* be "/dev/urandom" -- anything else is an error.
 //
-// _LIBCPP_USING_WIN32_RANDOM
+// _LIBCUDACXX_USING_WIN32_RANDOM
 //      Use rand_s(), for use on Windows.
 //      When this option is used, the token passed to `std::random_device`'s
 //      constructor *must* be "/dev/urandom" -- anything else is an error.
 #  if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ||                     \
       defined(__DragonFly__) || defined(__sun__)
-#    define _LIBCPP_USING_ARC4_RANDOM
+#    define _LIBCUDACXX_USING_ARC4_RANDOM
 #  elif defined(__wasi__) || defined(__EMSCRIPTEN__)
-#    define _LIBCPP_USING_GETENTROPY
+#    define _LIBCUDACXX_USING_GETENTROPY
 #  elif defined(__Fuchsia__)
-#    define _LIBCPP_USING_FUCHSIA_CPRNG
+#    define _LIBCUDACXX_USING_FUCHSIA_CPRNG
 #  elif defined(__native_client__)
-#    define _LIBCPP_USING_NACL_RANDOM
-#  elif defined(_LIBCPP_WIN32API)
-#    define _LIBCPP_USING_WIN32_RANDOM
+#    define _LIBCUDACXX_USING_NACL_RANDOM
+#  elif defined(_LIBCUDACXX_WIN32API)
+#    define _LIBCUDACXX_USING_WIN32_RANDOM
 #  else
-#    define _LIBCPP_USING_DEV_RANDOM
+#    define _LIBCUDACXX_USING_DEV_RANDOM
 #  endif
 
-#  if !defined(_LIBCPP_LITTLE_ENDIAN) && !defined(_LIBCPP_BIG_ENDIAN)
+#  if !defined(_LIBCUDACXX_LITTLE_ENDIAN) && !defined(_LIBCUDACXX_BIG_ENDIAN)
 #    include <endian.h>
 #    if __BYTE_ORDER == __LITTLE_ENDIAN
-#      define _LIBCPP_LITTLE_ENDIAN
+#      define _LIBCUDACXX_LITTLE_ENDIAN
 #    elif __BYTE_ORDER == __BIG_ENDIAN
-#      define _LIBCPP_BIG_ENDIAN
+#      define _LIBCUDACXX_BIG_ENDIAN
 #    else // __BYTE_ORDER == __BIG_ENDIAN
 #      error unable to determine endian
 #    endif
-#  endif // !defined(_LIBCPP_LITTLE_ENDIAN) && !defined(_LIBCPP_BIG_ENDIAN)
+#  endif // !defined(_LIBCUDACXX_LITTLE_ENDIAN) && !defined(_LIBCUDACXX_BIG_ENDIAN)
 
-#  if __has_attribute(__no_sanitize__) && !defined(_LIBCPP_COMPILER_GCC)
-#    define _LIBCPP_NO_CFI __attribute__((__no_sanitize__("cfi")))
+#  if __has_attribute(__no_sanitize__) && !defined(_LIBCUDACXX_COMPILER_GCC)
+#    define _LIBCUDACXX_NO_CFI __attribute__((__no_sanitize__("cfi")))
 #  else
-#    define _LIBCPP_NO_CFI
+#    define _LIBCUDACXX_NO_CFI
 #  endif
 
-#  ifndef _LIBCPP_CXX03_LANG
+#  ifndef _LIBCUDACXX_CXX03_LANG
 
-#    define _LIBCPP_ALIGNOF(_Tp) alignof(_Tp)
+#    define _LIBCUDACXX_ALIGNOF(_Tp) alignof(_Tp)
 #    define _ALIGNAS_TYPE(x) alignas(x)
 #    define _ALIGNAS(x) alignas(x)
-#    define _LIBCPP_NORETURN [[noreturn]]
+#    define _LIBCUDACXX_NORETURN [[noreturn]]
 #    define _NOEXCEPT noexcept
 #    define _NOEXCEPT_(x) noexcept(x)
 
 #  else
 
-#    define _LIBCPP_ALIGNOF(_Tp) _Alignof(_Tp)
-#    define _ALIGNAS_TYPE(x) __attribute__((__aligned__(_LIBCPP_ALIGNOF(x))))
+#    define _LIBCUDACXX_ALIGNOF(_Tp) _Alignof(_Tp)
+#    define _ALIGNAS_TYPE(x) __attribute__((__aligned__(_LIBCUDACXX_ALIGNOF(x))))
 #    define _ALIGNAS(x) __attribute__((__aligned__(x)))
-#    define _LIBCPP_NORETURN __attribute__((noreturn))
-#    define _LIBCPP_HAS_NO_NOEXCEPT
+#    define _LIBCUDACXX_NORETURN __attribute__((noreturn))
+#    define _LIBCUDACXX_HAS_NO_NOEXCEPT
 #    define nullptr __nullptr
 #    define _NOEXCEPT throw()
 #    define _NOEXCEPT_(x)
@@ -436,175 +436,175 @@ typedef __char32_t char32_t;
 #  endif
 
 #  if !defined(__cpp_exceptions) || __cpp_exceptions < 199711L
-#    define _LIBCPP_NO_EXCEPTIONS
+#    define _LIBCUDACXX_NO_EXCEPTIONS
 #  endif
 
-#  define _LIBCPP_PREFERRED_ALIGNOF(_Tp) __alignof(_Tp)
+#  define _LIBCUDACXX_PREFERRED_ALIGNOF(_Tp) __alignof(_Tp)
 
-#  if defined(_LIBCPP_COMPILER_CLANG_BASED)
+#  if defined(_LIBCUDACXX_COMPILER_CLANG_BASED)
 
 #    if defined(__APPLE__) && !defined(__i386__) && !defined(__x86_64__) && (!defined(__arm__) || __ARM_ARCH_7K__ >= 2)
-#      define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
+#      define _LIBCUDACXX_ABI_ALTERNATE_STRING_LAYOUT
 #    endif
 
 // Objective-C++ features (opt-in)
 #    if __has_feature(objc_arc)
-#      define _LIBCPP_HAS_OBJC_ARC
+#      define _LIBCUDACXX_HAS_OBJC_ARC
 #    endif
 
 #    if __has_feature(objc_arc_weak)
-#      define _LIBCPP_HAS_OBJC_ARC_WEAK
+#      define _LIBCUDACXX_HAS_OBJC_ARC_WEAK
 #    endif
 
 #    if __has_extension(blocks)
-#      define _LIBCPP_HAS_EXTENSION_BLOCKS
+#      define _LIBCUDACXX_HAS_EXTENSION_BLOCKS
 #    endif
 
-#    if defined(_LIBCPP_HAS_EXTENSION_BLOCKS) && defined(__APPLE__)
-#      define _LIBCPP_HAS_BLOCKS_RUNTIME
+#    if defined(_LIBCUDACXX_HAS_EXTENSION_BLOCKS) && defined(__APPLE__)
+#      define _LIBCUDACXX_HAS_BLOCKS_RUNTIME
 #    endif
 
 #    if !__has_feature(address_sanitizer)
-#      define _LIBCPP_HAS_NO_ASAN
+#      define _LIBCUDACXX_HAS_NO_ASAN
 #    endif
 
 // Allow for build-time disabling of unsigned integer sanitization
 #    if __has_attribute(no_sanitize)
-#      define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow")))
+#      define _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK __attribute__((__no_sanitize__("unsigned-integer-overflow")))
 #    endif
 
-#    define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__))
+#    define _LIBCUDACXX_ALWAYS_INLINE __attribute__((__always_inline__))
 
-#    define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__
+#    define _LIBCUDACXX_DISABLE_EXTENSION_WARNING __extension__
 
-#  elif defined(_LIBCPP_COMPILER_GCC)
+#  elif defined(_LIBCUDACXX_COMPILER_GCC)
 
 #    if !defined(__SANITIZE_ADDRESS__)
-#      define _LIBCPP_HAS_NO_ASAN
+#      define _LIBCUDACXX_HAS_NO_ASAN
 #    endif
 
-#    define _LIBCPP_ALWAYS_INLINE __attribute__((__always_inline__))
+#    define _LIBCUDACXX_ALWAYS_INLINE __attribute__((__always_inline__))
 
-#    define _LIBCPP_DISABLE_EXTENSION_WARNING __extension__
+#    define _LIBCUDACXX_DISABLE_EXTENSION_WARNING __extension__
 
-#  elif defined(_LIBCPP_COMPILER_MSVC)
+#  elif defined(_LIBCUDACXX_COMPILER_MSVC)
 
-#    define _LIBCPP_WARNING(x) __pragma(message(__FILE__ "(" _LIBCPP_TOSTRING(__LINE__) ") : warning note: " x))
+#    define _LIBCUDACXX_WARNING(x) __pragma(message(__FILE__ "(" _LIBCUDACXX_TOSTRING(__LINE__) ") : warning note: " x))
 
 #    if _MSC_VER < 1900
 #      error "MSVC versions prior to Visual Studio 2015 are not supported"
 #    endif
 
-#    define _LIBCPP_NORETURN __declspec(noreturn)
+#    define _LIBCUDACXX_NORETURN __declspec(noreturn)
 
-#    define _LIBCPP_WEAK
+#    define _LIBCUDACXX_WEAK
 
-#    define _LIBCPP_HAS_NO_ASAN
+#    define _LIBCUDACXX_HAS_NO_ASAN
 
-#    define _LIBCPP_ALWAYS_INLINE __forceinline
+#    define _LIBCUDACXX_ALWAYS_INLINE __forceinline
 
-#    define _LIBCPP_HAS_NO_VECTOR_EXTENSION
+#    define _LIBCUDACXX_HAS_NO_VECTOR_EXTENSION
 
-#    define _LIBCPP_DISABLE_EXTENSION_WARNING
+#    define _LIBCUDACXX_DISABLE_EXTENSION_WARNING
 
-#  endif // _LIBCPP_COMPILER_[CLANG|GCC|MSVC]
+#  endif // _LIBCUDACXX_COMPILER_[CLANG|GCC|MSVC]
 
-#  if defined(_LIBCPP_OBJECT_FORMAT_COFF)
+#  if defined(_LIBCUDACXX_OBJECT_FORMAT_COFF)
 
 #    ifdef _DLL
-#      define _LIBCPP_CRT_FUNC __declspec(dllimport)
+#      define _LIBCUDACXX_CRT_FUNC __declspec(dllimport)
 #    else
-#      define _LIBCPP_CRT_FUNC
+#      define _LIBCUDACXX_CRT_FUNC
 #    endif
 
-#    if defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) || (defined(__MINGW32__) && !defined(_LIBCPP_BUILDING_LIBRARY))
-#      define _LIBCPP_DLL_VIS
-#      define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
-#      define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
-#      define _LIBCPP_OVERRIDABLE_FUNC_VIS
-#      define _LIBCPP_EXPORTED_FROM_ABI
-#    elif defined(_LIBCPP_BUILDING_LIBRARY)
-#      define _LIBCPP_DLL_VIS __declspec(dllexport)
+#    if defined(_LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS) || (defined(__MINGW32__) && !defined(_LIBCUDACXX_BUILDING_LIBRARY))
+#      define _LIBCUDACXX_DLL_VIS
+#      define _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS
+#      define _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS
+#      define _LIBCUDACXX_OVERRIDABLE_FUNC_VIS
+#      define _LIBCUDACXX_EXPORTED_FROM_ABI
+#    elif defined(_LIBCUDACXX_BUILDING_LIBRARY)
+#      define _LIBCUDACXX_DLL_VIS __declspec(dllexport)
 #      if defined(__MINGW32__)
-#        define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_DLL_VIS
-#        define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
+#        define _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS _LIBCUDACXX_DLL_VIS
+#        define _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS
 #      else
-#        define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS
-#        define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS _LIBCPP_DLL_VIS
+#        define _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS
+#        define _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS _LIBCUDACXX_DLL_VIS
 #      endif
-#      define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_DLL_VIS
-#      define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllexport)
+#      define _LIBCUDACXX_OVERRIDABLE_FUNC_VIS _LIBCUDACXX_DLL_VIS
+#      define _LIBCUDACXX_EXPORTED_FROM_ABI __declspec(dllexport)
 #    else
-#      define _LIBCPP_DLL_VIS __declspec(dllimport)
-#      define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_DLL_VIS
-#      define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
-#      define _LIBCPP_OVERRIDABLE_FUNC_VIS
-#      define _LIBCPP_EXPORTED_FROM_ABI __declspec(dllimport)
+#      define _LIBCUDACXX_DLL_VIS __declspec(dllimport)
+#      define _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS _LIBCUDACXX_DLL_VIS
+#      define _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS
+#      define _LIBCUDACXX_OVERRIDABLE_FUNC_VIS
+#      define _LIBCUDACXX_EXPORTED_FROM_ABI __declspec(dllimport)
 #    endif
 
-#    define _LIBCPP_TYPE_VIS _LIBCPP_DLL_VIS
-#    define _LIBCPP_FUNC_VIS _LIBCPP_DLL_VIS
-#    define _LIBCPP_EXCEPTION_ABI _LIBCPP_DLL_VIS
-#    define _LIBCPP_HIDDEN
-#    define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
-#    define _LIBCPP_TEMPLATE_VIS
-#    define _LIBCPP_TEMPLATE_DATA_VIS
-#    define _LIBCPP_ENUM_VIS
+#    define _LIBCUDACXX_TYPE_VIS _LIBCUDACXX_DLL_VIS
+#    define _LIBCUDACXX_FUNC_VIS _LIBCUDACXX_DLL_VIS
+#    define _LIBCUDACXX_EXCEPTION_ABI _LIBCUDACXX_DLL_VIS
+#    define _LIBCUDACXX_HIDDEN
+#    define _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+#    define _LIBCUDACXX_TEMPLATE_VIS
+#    define _LIBCUDACXX_TEMPLATE_DATA_VIS
+#    define _LIBCUDACXX_ENUM_VIS
 
 #  else
 
-#    if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
-#      define _LIBCPP_VISIBILITY(vis) __attribute__((__visibility__(vis)))
+#    if !defined(_LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS)
+#      define _LIBCUDACXX_VISIBILITY(vis) __attribute__((__visibility__(vis)))
 #    else
-#      define _LIBCPP_VISIBILITY(vis)
+#      define _LIBCUDACXX_VISIBILITY(vis)
 #    endif
 
-#    define _LIBCPP_HIDDEN _LIBCPP_VISIBILITY("hidden")
-#    define _LIBCPP_FUNC_VIS _LIBCPP_VISIBILITY("default")
-#    define _LIBCPP_TYPE_VIS _LIBCPP_VISIBILITY("default")
-#    define _LIBCPP_TEMPLATE_DATA_VIS _LIBCPP_VISIBILITY("default")
-#    define _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_VISIBILITY("default")
-#    define _LIBCPP_EXCEPTION_ABI _LIBCPP_VISIBILITY("default")
-#    define _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS _LIBCPP_VISIBILITY("default")
-#    define _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS
+#    define _LIBCUDACXX_HIDDEN _LIBCUDACXX_VISIBILITY("hidden")
+#    define _LIBCUDACXX_FUNC_VIS _LIBCUDACXX_VISIBILITY("default")
+#    define _LIBCUDACXX_TYPE_VIS _LIBCUDACXX_VISIBILITY("default")
+#    define _LIBCUDACXX_TEMPLATE_DATA_VIS _LIBCUDACXX_VISIBILITY("default")
+#    define _LIBCUDACXX_EXPORTED_FROM_ABI _LIBCUDACXX_VISIBILITY("default")
+#    define _LIBCUDACXX_EXCEPTION_ABI _LIBCUDACXX_VISIBILITY("default")
+#    define _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS _LIBCUDACXX_VISIBILITY("default")
+#    define _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS
 
 // TODO: Make this a proper customization point or remove the option to override it.
-#    ifndef _LIBCPP_OVERRIDABLE_FUNC_VIS
-#      define _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_VISIBILITY("default")
+#    ifndef _LIBCUDACXX_OVERRIDABLE_FUNC_VIS
+#      define _LIBCUDACXX_OVERRIDABLE_FUNC_VIS _LIBCUDACXX_VISIBILITY("default")
 #    endif
 
-#    if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
+#    if !defined(_LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS)
 // The inline should be removed once PR32114 is resolved
-#      define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS inline _LIBCPP_HIDDEN
+#      define _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS inline _LIBCUDACXX_HIDDEN
 #    else
-#      define _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+#      define _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
 #    endif
 
-#    if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
+#    if !defined(_LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS)
 #      if __has_attribute(__type_visibility__)
-#        define _LIBCPP_TEMPLATE_VIS __attribute__((__type_visibility__("default")))
+#        define _LIBCUDACXX_TEMPLATE_VIS __attribute__((__type_visibility__("default")))
 #      else
-#        define _LIBCPP_TEMPLATE_VIS __attribute__((__visibility__("default")))
+#        define _LIBCUDACXX_TEMPLATE_VIS __attribute__((__visibility__("default")))
 #      endif
 #    else
-#      define _LIBCPP_TEMPLATE_VIS
+#      define _LIBCUDACXX_TEMPLATE_VIS
 #    endif
 
-#    if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__)
-#      define _LIBCPP_ENUM_VIS __attribute__((__type_visibility__("default")))
+#    if !defined(_LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__)
+#      define _LIBCUDACXX_ENUM_VIS __attribute__((__type_visibility__("default")))
 #    else
-#      define _LIBCPP_ENUM_VIS
+#      define _LIBCUDACXX_ENUM_VIS
 #    endif
 
-#  endif // defined(_LIBCPP_OBJECT_FORMAT_COFF)
+#  endif // defined(_LIBCUDACXX_OBJECT_FORMAT_COFF)
 
 #  if __has_attribute(exclude_from_explicit_instantiation)
-#    define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION __attribute__((__exclude_from_explicit_instantiation__))
+#    define _LIBCUDACXX_EXCLUDE_FROM_EXPLICIT_INSTANTIATION __attribute__((__exclude_from_explicit_instantiation__))
 #  else
 // Try to approximate the effect of exclude_from_explicit_instantiation
 // (which is that entities are not assumed to be provided by explicit
 // template instantiations in the dylib) by always inlining those entities.
-#    define _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION _LIBCPP_ALWAYS_INLINE
+#    define _LIBCUDACXX_EXCLUDE_FROM_EXPLICIT_INSTANTIATION _LIBCUDACXX_ALWAYS_INLINE
 #  endif
 
 // This macro marks a symbol as being hidden from libc++'s ABI. This is achieved
@@ -624,112 +624,112 @@ typedef __char32_t char32_t;
 //    all functions or giving internal linkage to all functions. Both these (previous) solutions
 //    suffer from drawbacks that lead notably to code bloat.
 //
-// Note that we use _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION to ensure that we don't depend
-// on _LIBCPP_HIDE_FROM_ABI methods of classes explicitly instantiated in the dynamic library.
+// Note that we use _LIBCUDACXX_EXCLUDE_FROM_EXPLICIT_INSTANTIATION to ensure that we don't depend
+// on _LIBCUDACXX_HIDE_FROM_ABI methods of classes explicitly instantiated in the dynamic library.
 //
-// TODO: We provide a escape hatch with _LIBCPP_NO_ABI_TAG for folks who want to avoid increasing
+// TODO: We provide a escape hatch with _LIBCUDACXX_NO_ABI_TAG for folks who want to avoid increasing
 //       the length of symbols with an ABI tag. In practice, we should remove the escape hatch and
 //       use compression mangling instead, see https://github.com/itanium-cxx-abi/cxx-abi/issues/70.
-#  ifndef _LIBCPP_NO_ABI_TAG
-#    define _LIBCPP_HIDE_FROM_ABI                                                                                      \
-      _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION                                                       \
-          __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_VERSIONED_IDENTIFIER))))
+#  ifndef _LIBCUDACXX_NO_ABI_TAG
+#    define _LIBCUDACXX_HIDE_FROM_ABI                                                                                      \
+      _LIBCUDACXX_HIDDEN _LIBCUDACXX_EXCLUDE_FROM_EXPLICIT_INSTANTIATION                                                       \
+          __attribute__((__abi_tag__(_LIBCUDACXX_TOSTRING(_LIBCUDACXX_VERSIONED_IDENTIFIER))))
 #  else
-#    define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION
+#    define _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_HIDDEN _LIBCUDACXX_EXCLUDE_FROM_EXPLICIT_INSTANTIATION
 #  endif
 
-#  ifdef _LIBCPP_BUILDING_LIBRARY
-#    if _LIBCPP_ABI_VERSION > 1
-#      define _LIBCPP_HIDE_FROM_ABI_AFTER_V1 _LIBCPP_HIDE_FROM_ABI
+#  ifdef _LIBCUDACXX_BUILDING_LIBRARY
+#    if _LIBCUDACXX_ABI_VERSION > 1
+#      define _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1 _LIBCUDACXX_HIDE_FROM_ABI
 #    else
-#      define _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+#      define _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
 #    endif
 #  else
-#    define _LIBCPP_HIDE_FROM_ABI_AFTER_V1 _LIBCPP_HIDE_FROM_ABI
+#    define _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1 _LIBCUDACXX_HIDE_FROM_ABI
 #  endif
 
 // Just so we can migrate to the new macros gradually.
-#  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
+#  define _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_HIDE_FROM_ABI
 
 // Inline namespaces are available in Clang/GCC/MSVC regardless of C++ dialect.
 // clang-format off
-#  define _LIBCPP_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCPP_ABI_NAMESPACE {
-#  define _LIBCPP_END_NAMESPACE_STD }}
-#  define _VSTD std
+#  define _LIBCUDACXX_BEGIN_NAMESPACE_STD namespace std { inline namespace _LIBCUDACXX_ABI_NAMESPACE {
+#  define _LIBCUDACXX_END_NAMESPACE_STD }}
+#  define _CUDA_VSTD std
 
-_LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD _LIBCUDACXX_END_NAMESPACE_STD
 
-#  if _LIBCPP_STD_VER > 14
-#    define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM                                                                         \
-       _LIBCPP_BEGIN_NAMESPACE_STD inline namespace __fs { namespace filesystem {
+#  if _LIBCUDACXX_STD_VER > 14
+#    define _LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM                                                                         \
+       _LIBCUDACXX_BEGIN_NAMESPACE_STD inline namespace __fs { namespace filesystem {
 #  else
-#    define _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM                                                                         \
-      _LIBCPP_BEGIN_NAMESPACE_STD namespace __fs { namespace filesystem {
+#    define _LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM                                                                         \
+      _LIBCUDACXX_BEGIN_NAMESPACE_STD namespace __fs { namespace filesystem {
 #  endif
 
-#  define _LIBCPP_END_NAMESPACE_FILESYSTEM _LIBCPP_END_NAMESPACE_STD }}
+#  define _LIBCUDACXX_END_NAMESPACE_FILESYSTEM _LIBCUDACXX_END_NAMESPACE_STD }}
 // clang-format on
 
 #  define _VSTD_FS std::__fs::filesystem
 
 #  if __has_attribute(__enable_if__)
-#    define _LIBCPP_PREFERRED_OVERLOAD __attribute__((__enable_if__(true, "")))
+#    define _LIBCUDACXX_PREFERRED_OVERLOAD __attribute__((__enable_if__(true, "")))
 #  endif
 
 #  ifndef __SIZEOF_INT128__
-#    define _LIBCPP_HAS_NO_INT128
+#    define _LIBCUDACXX_HAS_NO_INT128
 #  endif
 
-#  ifdef _LIBCPP_CXX03_LANG
+#  ifdef _LIBCUDACXX_CXX03_LANG
 #    define static_assert(...) _Static_assert(__VA_ARGS__)
 #    define decltype(...) __decltype(__VA_ARGS__)
-#  endif // _LIBCPP_CXX03_LANG
+#  endif // _LIBCUDACXX_CXX03_LANG
 
-#  ifdef _LIBCPP_CXX03_LANG
-#    define _LIBCPP_CONSTEXPR
+#  ifdef _LIBCUDACXX_CXX03_LANG
+#    define _LIBCUDACXX_CONSTEXPR
 #  else
-#    define _LIBCPP_CONSTEXPR constexpr
+#    define _LIBCUDACXX_CONSTEXPR constexpr
 #  endif
 
 #  ifndef __cpp_consteval
-#    define _LIBCPP_CONSTEVAL _LIBCPP_CONSTEXPR
+#    define _LIBCUDACXX_CONSTEVAL _LIBCUDACXX_CONSTEXPR
 #  else
-#    define _LIBCPP_CONSTEVAL consteval
+#    define _LIBCUDACXX_CONSTEVAL consteval
 #  endif
 
 #  ifdef __GNUC__
-#    define _LIBCPP_NOALIAS __attribute__((__malloc__))
+#    define _LIBCUDACXX_NOALIAS __attribute__((__malloc__))
 #  else
-#    define _LIBCPP_NOALIAS
+#    define _LIBCUDACXX_NOALIAS
 #  endif
 
 #  if __has_attribute(using_if_exists)
-#    define _LIBCPP_USING_IF_EXISTS __attribute__((using_if_exists))
+#    define _LIBCUDACXX_USING_IF_EXISTS __attribute__((using_if_exists))
 #  else
-#    define _LIBCPP_USING_IF_EXISTS
+#    define _LIBCUDACXX_USING_IF_EXISTS
 #  endif
 
-#  ifdef _LIBCPP_CXX03_LANG
-#    define _LIBCPP_DECLARE_STRONG_ENUM(x)                                                                             \
-      struct _LIBCPP_TYPE_VIS x {                                                                                      \
+#  ifdef _LIBCUDACXX_CXX03_LANG
+#    define _LIBCUDACXX_DECLARE_STRONG_ENUM(x)                                                                             \
+      struct _LIBCUDACXX_TYPE_VIS x {                                                                                      \
         enum __lx
 // clang-format off
-#    define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)                                                                      \
+#    define _LIBCUDACXX_DECLARE_STRONG_ENUM_EPILOG(x)                                                                      \
       __lx __v_;                                                                                                       \
-      _LIBCPP_INLINE_VISIBILITY x(__lx __v) : __v_(__v) {}                                                             \
-      _LIBCPP_INLINE_VISIBILITY explicit x(int __v) : __v_(static_cast<__lx>(__v)) {}                                  \
-      _LIBCPP_INLINE_VISIBILITY operator int() const { return __v_; }                                                  \
+      _LIBCUDACXX_INLINE_VISIBILITY x(__lx __v) : __v_(__v) {}                                                             \
+      _LIBCUDACXX_INLINE_VISIBILITY explicit x(int __v) : __v_(static_cast<__lx>(__v)) {}                                  \
+      _LIBCUDACXX_INLINE_VISIBILITY operator int() const { return __v_; }                                                  \
       };
 // clang-format on
 
-#  else // _LIBCPP_CXX03_LANG
-#    define _LIBCPP_DECLARE_STRONG_ENUM(x) enum class _LIBCPP_ENUM_VIS x
-#    define _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(x)
-#  endif // _LIBCPP_CXX03_LANG
+#  else // _LIBCUDACXX_CXX03_LANG
+#    define _LIBCUDACXX_DECLARE_STRONG_ENUM(x) enum class _LIBCUDACXX_ENUM_VIS x
+#    define _LIBCUDACXX_DECLARE_STRONG_ENUM_EPILOG(x)
+#  endif // _LIBCUDACXX_CXX03_LANG
 
-#  if defined(__APPLE__) || defined(__FreeBSD__) || defined(_LIBCPP_MSVCRT_LIKE) || defined(__sun__) ||                \
+#  if defined(__APPLE__) || defined(__FreeBSD__) || defined(_LIBCUDACXX_MSVCRT_LIKE) || defined(__sun__) ||                \
       defined(__NetBSD__)
-#    define _LIBCPP_LOCALE__L_EXTENSIONS 1
+#    define _LIBCUDACXX_LOCALE__L_EXTENSIONS 1
 #  endif
 
 #  ifdef __FreeBSD__
@@ -738,168 +738,168 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
 
 // If we are getting operator new from the MSVC CRT, then allocation overloads
 // for align_val_t were added in 19.12, aka VS 2017 version 15.3.
-#  if defined(_LIBCPP_MSVCRT) && defined(_MSC_VER) && _MSC_VER < 1912
-#    define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
-#  elif defined(_LIBCPP_ABI_VCRUNTIME) && !defined(__cpp_aligned_new)
+#  if defined(_LIBCUDACXX_MSVCRT) && defined(_MSC_VER) && _MSC_VER < 1912
+#    define _LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
+#  elif defined(_LIBCUDACXX_ABI_VCRUNTIME) && !defined(__cpp_aligned_new)
 // We're deferring to Microsoft's STL to provide aligned new et al. We don't
 // have it unless the language feature test macro is defined.
-#    define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
+#    define _LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
 #  elif defined(__MVS__)
-#    define _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
+#    define _LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
 #  endif
 
-#  if defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) || (!defined(__cpp_aligned_new) || __cpp_aligned_new < 201606)
-#    define _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
+#  if defined(_LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) || (!defined(__cpp_aligned_new) || __cpp_aligned_new < 201606)
+#    define _LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION
 #  endif
 
 #  if defined(__APPLE__) || defined(__FreeBSD__)
-#    define _LIBCPP_HAS_DEFAULTRUNELOCALE
+#    define _LIBCUDACXX_HAS_DEFAULTRUNELOCALE
 #  endif
 
 #  if defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun__)
-#    define _LIBCPP_WCTYPE_IS_MASK
+#    define _LIBCUDACXX_WCTYPE_IS_MASK
 #  endif
 
-#  if _LIBCPP_STD_VER <= 17 || !defined(__cpp_char8_t)
-#    define _LIBCPP_HAS_NO_CHAR8_T
+#  if _LIBCUDACXX_STD_VER <= 17 || !defined(__cpp_char8_t)
+#    define _LIBCUDACXX_HAS_NO_CHAR8_T
 #  endif
 
 // Deprecation macros.
 //
 // Deprecations warnings are always enabled, except when users explicitly opt-out
-// by defining _LIBCPP_DISABLE_DEPRECATION_WARNINGS.
-#  if !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
+// by defining _LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS.
+#  if !defined(_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS)
 #    if __has_attribute(deprecated)
-#      define _LIBCPP_DEPRECATED __attribute__((deprecated))
-#      define _LIBCPP_DEPRECATED_(m) __attribute__((deprected(m)))
-#    elif _LIBCPP_STD_VER > 11
-#      define _LIBCPP_DEPRECATED [[deprecated]]
-#      define _LIBCPP_DEPRECATED_(m) [[deprecated(m)]]
+#      define _LIBCUDACXX_DEPRECATED __attribute__((deprecated))
+#      define _LIBCUDACXX_DEPRECATED_(m) __attribute__((deprected(m)))
+#    elif _LIBCUDACXX_STD_VER > 11
+#      define _LIBCUDACXX_DEPRECATED [[deprecated]]
+#      define _LIBCUDACXX_DEPRECATED_(m) [[deprecated(m)]]
 #    else
-#      define _LIBCPP_DEPRECATED
-#      define _LIBCPP_DEPRECATED_(m)
+#      define _LIBCUDACXX_DEPRECATED
+#      define _LIBCUDACXX_DEPRECATED_(m)
 #    endif
 #  else
-#    define _LIBCPP_DEPRECATED
-#    define _LIBCPP_DEPRECATED_(m)
+#    define _LIBCUDACXX_DEPRECATED
+#    define _LIBCUDACXX_DEPRECATED_(m)
 #  endif
 
-#  if !defined(_LIBCPP_CXX03_LANG)
-#    define _LIBCPP_DEPRECATED_IN_CXX11 _LIBCPP_DEPRECATED
+#  if !defined(_LIBCUDACXX_CXX03_LANG)
+#    define _LIBCUDACXX_DEPRECATED_IN_CXX11 _LIBCUDACXX_DEPRECATED
 #  else
-#    define _LIBCPP_DEPRECATED_IN_CXX11
+#    define _LIBCUDACXX_DEPRECATED_IN_CXX11
 #  endif
 
-#  if _LIBCPP_STD_VER > 11
-#    define _LIBCPP_DEPRECATED_IN_CXX14 _LIBCPP_DEPRECATED
+#  if _LIBCUDACXX_STD_VER > 11
+#    define _LIBCUDACXX_DEPRECATED_IN_CXX14 _LIBCUDACXX_DEPRECATED
 #  else
-#    define _LIBCPP_DEPRECATED_IN_CXX14
+#    define _LIBCUDACXX_DEPRECATED_IN_CXX14
 #  endif
 
-#  if _LIBCPP_STD_VER > 14
-#    define _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_DEPRECATED
+#  if _LIBCUDACXX_STD_VER > 14
+#    define _LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_DEPRECATED
 #  else
-#    define _LIBCPP_DEPRECATED_IN_CXX17
+#    define _LIBCUDACXX_DEPRECATED_IN_CXX17
 #  endif
 
-#  if _LIBCPP_STD_VER > 17
-#    define _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_DEPRECATED
+#  if _LIBCUDACXX_STD_VER > 17
+#    define _LIBCUDACXX_DEPRECATED_IN_CXX20 _LIBCUDACXX_DEPRECATED
 #  else
-#    define _LIBCPP_DEPRECATED_IN_CXX20
+#    define _LIBCUDACXX_DEPRECATED_IN_CXX20
 #  endif
 
-#  if !defined(_LIBCPP_HAS_NO_CHAR8_T)
-#    define _LIBCPP_DEPRECATED_WITH_CHAR8_T _LIBCPP_DEPRECATED
+#  if !defined(_LIBCUDACXX_HAS_NO_CHAR8_T)
+#    define _LIBCUDACXX_DEPRECATED_WITH_CHAR8_T _LIBCUDACXX_DEPRECATED
 #  else
-#    define _LIBCPP_DEPRECATED_WITH_CHAR8_T
+#    define _LIBCUDACXX_DEPRECATED_WITH_CHAR8_T
 #  endif
 
 // Macros to enter and leave a state where deprecation warnings are suppressed.
-#  if defined(_LIBCPP_COMPILER_CLANG_BASED) || defined(_LIBCPP_COMPILER_GCC)
-#    define _LIBCPP_SUPPRESS_DEPRECATED_PUSH                                                                           \
+#  if defined(_LIBCUDACXX_COMPILER_CLANG_BASED) || defined(_LIBCUDACXX_COMPILER_GCC)
+#    define _LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH                                                                           \
       _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wdeprecated\"")                                \
           _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
-#    define _LIBCPP_SUPPRESS_DEPRECATED_POP _Pragma("GCC diagnostic pop")
+#    define _LIBCUDACXX_SUPPRESS_DEPRECATED_POP _Pragma("GCC diagnostic pop")
 #  else
-#    define _LIBCPP_SUPPRESS_DEPRECATED_PUSH
-#    define _LIBCPP_SUPPRESS_DEPRECATED_POP
+#    define _LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
+#    define _LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 #  endif
 
-#  if _LIBCPP_STD_VER <= 11
-#    define _LIBCPP_EXPLICIT_AFTER_CXX11
+#  if _LIBCUDACXX_STD_VER <= 11
+#    define _LIBCUDACXX_EXPLICIT_AFTER_CXX11
 #  else
-#    define _LIBCPP_EXPLICIT_AFTER_CXX11 explicit
+#    define _LIBCUDACXX_EXPLICIT_AFTER_CXX11 explicit
 #  endif
 
-#  if _LIBCPP_STD_VER > 11
-#    define _LIBCPP_CONSTEXPR_AFTER_CXX11 constexpr
+#  if _LIBCUDACXX_STD_VER > 11
+#    define _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 constexpr
 #  else
-#    define _LIBCPP_CONSTEXPR_AFTER_CXX11
+#    define _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 #  endif
 
-#  if _LIBCPP_STD_VER > 14
-#    define _LIBCPP_CONSTEXPR_AFTER_CXX14 constexpr
+#  if _LIBCUDACXX_STD_VER > 14
+#    define _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 constexpr
 #  else
-#    define _LIBCPP_CONSTEXPR_AFTER_CXX14
+#    define _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 #  endif
 
-#  if _LIBCPP_STD_VER > 17
-#    define _LIBCPP_CONSTEXPR_AFTER_CXX17 constexpr
+#  if _LIBCUDACXX_STD_VER > 17
+#    define _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 constexpr
 #  else
-#    define _LIBCPP_CONSTEXPR_AFTER_CXX17
+#    define _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 #  endif
 
-#  if __has_cpp_attribute(nodiscard) || defined(_LIBCPP_COMPILER_MSVC)
-#    define _LIBCPP_NODISCARD [[nodiscard]]
-#  elif defined(_LIBCPP_COMPILER_CLANG_BASED) && !defined(_LIBCPP_CXX03_LANG)
-#    define _LIBCPP_NODISCARD [[clang::warn_unused_result]]
+#  if __has_cpp_attribute(nodiscard) || defined(_LIBCUDACXX_COMPILER_MSVC)
+#    define _LIBCUDACXX_NODISCARD [[nodiscard]]
+#  elif defined(_LIBCUDACXX_COMPILER_CLANG_BASED) && !defined(_LIBCUDACXX_CXX03_LANG)
+#    define _LIBCUDACXX_NODISCARD [[clang::warn_unused_result]]
 #  else
 // We can't use GCC's [[gnu::warn_unused_result]] and
 // __attribute__((warn_unused_result)), because GCC does not silence them via
 // (void) cast.
-#    define _LIBCPP_NODISCARD
+#    define _LIBCUDACXX_NODISCARD
 #  endif
 
-// _LIBCPP_NODISCARD_EXT may be used to apply [[nodiscard]] to entities not
+// _LIBCUDACXX_NODISCARD_EXT may be used to apply [[nodiscard]] to entities not
 // specified as such as an extension.
-#  if defined(_LIBCPP_ENABLE_NODISCARD) && !defined(_LIBCPP_DISABLE_NODISCARD_EXT)
-#    define _LIBCPP_NODISCARD_EXT _LIBCPP_NODISCARD
+#  if defined(_LIBCUDACXX_ENABLE_NODISCARD) && !defined(_LIBCUDACXX_DISABLE_NODISCARD_EXT)
+#    define _LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_NODISCARD
 #  else
-#    define _LIBCPP_NODISCARD_EXT
+#    define _LIBCUDACXX_NODISCARD_EXT
 #  endif
 
-#  if !defined(_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17) && (_LIBCPP_STD_VER > 17 || defined(_LIBCPP_ENABLE_NODISCARD))
-#    define _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_NODISCARD
+#  if !defined(_LIBCUDACXX_DISABLE_NODISCARD_AFTER_CXX17) && (_LIBCUDACXX_STD_VER > 17 || defined(_LIBCUDACXX_ENABLE_NODISCARD))
+#    define _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_NODISCARD
 #  else
-#    define _LIBCPP_NODISCARD_AFTER_CXX17
+#    define _LIBCUDACXX_NODISCARD_AFTER_CXX17
 #  endif
 
 #  if __has_attribute(no_destroy)
-#    define _LIBCPP_NO_DESTROY __attribute__((__no_destroy__))
+#    define _LIBCUDACXX_NO_DESTROY __attribute__((__no_destroy__))
 #  else
-#    define _LIBCPP_NO_DESTROY
+#    define _LIBCUDACXX_NO_DESTROY
 #  endif
 
-#  ifndef _LIBCPP_HAS_NO_ASAN
-    extern "C" _LIBCPP_FUNC_VIS void
+#  ifndef _LIBCUDACXX_HAS_NO_ASAN
+    extern "C" _LIBCUDACXX_FUNC_VIS void
     __sanitizer_annotate_contiguous_container(const void*, const void*, const void*, const void*);
 #  endif
 
 // Try to find out if RTTI is disabled.
 #  if !defined(__cpp_rtti) || __cpp_rtti < 199711L
-#    define _LIBCPP_NO_RTTI
+#    define _LIBCUDACXX_NO_RTTI
 #  endif
 
-#  ifndef _LIBCPP_WEAK
-#    define _LIBCPP_WEAK __attribute__((__weak__))
+#  ifndef _LIBCUDACXX_WEAK
+#    define _LIBCUDACXX_WEAK __attribute__((__weak__))
 #  endif
 
 // Thread API
 // clang-format off
-#  if !defined(_LIBCPP_HAS_NO_THREADS) &&                                                                              \
-      !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) &&                                                                      \
-      !defined(_LIBCPP_HAS_THREAD_API_WIN32) &&                                                                        \
-      !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
+#  if !defined(_LIBCUDACXX_HAS_NO_THREADS) &&                                                                              \
+      !defined(_LIBCUDACXX_HAS_THREAD_API_PTHREAD) &&                                                                      \
+      !defined(_LIBCUDACXX_HAS_THREAD_API_WIN32) &&                                                                        \
+      !defined(_LIBCUDACXX_HAS_THREAD_API_EXTERNAL)
 
 #    if defined(__FreeBSD__) ||                                                                                        \
         defined(__wasi__) ||                                                                                           \
@@ -914,43 +914,43 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
         defined(_AIX) ||                                                                                               \
         defined(__EMSCRIPTEN__)
 // clang-format on
-#      define _LIBCPP_HAS_THREAD_API_PTHREAD
+#      define _LIBCUDACXX_HAS_THREAD_API_PTHREAD
 #    elif defined(__Fuchsia__)
 // TODO(44575): Switch to C11 thread API when possible.
-#      define _LIBCPP_HAS_THREAD_API_PTHREAD
-#    elif defined(_LIBCPP_WIN32API)
-#      define _LIBCPP_HAS_THREAD_API_WIN32
+#      define _LIBCUDACXX_HAS_THREAD_API_PTHREAD
+#    elif defined(_LIBCUDACXX_WIN32API)
+#      define _LIBCUDACXX_HAS_THREAD_API_WIN32
 #    else
 #      error "No thread API"
-#    endif // _LIBCPP_HAS_THREAD_API
-#  endif   // _LIBCPP_HAS_NO_THREADS
+#    endif // _LIBCUDACXX_HAS_THREAD_API
+#  endif   // _LIBCUDACXX_HAS_NO_THREADS
 
-#  if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+#  if defined(_LIBCUDACXX_HAS_THREAD_API_PTHREAD)
 #    if defined(__ANDROID__) && __ANDROID_API__ >= 30
-#      define _LIBCPP_HAS_COND_CLOCKWAIT
-#    elif defined(_LIBCPP_GLIBC_PREREQ)
-#      if _LIBCPP_GLIBC_PREREQ(2, 30)
-#        define _LIBCPP_HAS_COND_CLOCKWAIT
+#      define _LIBCUDACXX_HAS_COND_CLOCKWAIT
+#    elif defined(_LIBCUDACXX_GLIBC_PREREQ)
+#      if _LIBCUDACXX_GLIBC_PREREQ(2, 30)
+#        define _LIBCUDACXX_HAS_COND_CLOCKWAIT
 #      endif
 #    endif
 #  endif
 
-#  if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
-#    error _LIBCPP_HAS_THREAD_API_PTHREAD may only be defined when \
-       _LIBCPP_HAS_NO_THREADS is not defined.
+#  if defined(_LIBCUDACXX_HAS_NO_THREADS) && defined(_LIBCUDACXX_HAS_THREAD_API_PTHREAD)
+#    error _LIBCUDACXX_HAS_THREAD_API_PTHREAD may only be defined when \
+       _LIBCUDACXX_HAS_NO_THREADS is not defined.
 #  endif
 
-#  if defined(_LIBCPP_HAS_NO_THREADS) && defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
-#    error _LIBCPP_HAS_THREAD_API_EXTERNAL may not be defined when \
-       _LIBCPP_HAS_NO_THREADS is defined.
+#  if defined(_LIBCUDACXX_HAS_NO_THREADS) && defined(_LIBCUDACXX_HAS_THREAD_API_EXTERNAL)
+#    error _LIBCUDACXX_HAS_THREAD_API_EXTERNAL may not be defined when \
+       _LIBCUDACXX_HAS_NO_THREADS is defined.
 #  endif
 
-#  if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCPP_HAS_NO_THREADS)
-#    error _LIBCPP_HAS_NO_MONOTONIC_CLOCK may only be defined when \
-       _LIBCPP_HAS_NO_THREADS is defined.
+#  if defined(_LIBCUDACXX_HAS_NO_MONOTONIC_CLOCK) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
+#    error _LIBCUDACXX_HAS_NO_MONOTONIC_CLOCK may only be defined when \
+       _LIBCUDACXX_HAS_NO_THREADS is defined.
 #  endif
 
-#  if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(__STDCPP_THREADS__)
+#  if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(__STDCPP_THREADS__)
 #    define __STDCPP_THREADS__ 1
 #  endif
 
@@ -965,11 +965,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
 // TODO(EricWF): Enable this optimization on Bionic after speaking to their
 //               respective stakeholders.
 // clang-format off
-#  if (defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && defined(__GLIBC__)) ||                                               \
-      (defined(_LIBCPP_HAS_THREAD_API_C11) && defined(__Fuchsia__)) ||                                                 \
-       defined(_LIBCPP_HAS_THREAD_API_WIN32)
+#  if (defined(_LIBCUDACXX_HAS_THREAD_API_PTHREAD) && defined(__GLIBC__)) ||                                               \
+      (defined(_LIBCUDACXX_HAS_THREAD_API_C11) && defined(__Fuchsia__)) ||                                                 \
+       defined(_LIBCUDACXX_HAS_THREAD_API_WIN32)
 // clang-format on
-#    define _LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION
+#    define _LIBCUDACXX_HAS_TRIVIAL_MUTEX_DESTRUCTION
 #  endif
 
 // Destroying a condvar is a nop on Windows.
@@ -980,152 +980,152 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
 //
 // TODO(EricWF): This is potentially true for some pthread implementations
 // as well.
-#  if (defined(_LIBCPP_HAS_THREAD_API_C11) && defined(__Fuchsia__)) || defined(_LIBCPP_HAS_THREAD_API_WIN32)
-#    define _LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION
+#  if (defined(_LIBCUDACXX_HAS_THREAD_API_C11) && defined(__Fuchsia__)) || defined(_LIBCUDACXX_HAS_THREAD_API_WIN32)
+#    define _LIBCUDACXX_HAS_TRIVIAL_CONDVAR_DESTRUCTION
 #  endif
 
 // Some systems do not provide gets() in their C library, for security reasons.
-#  if defined(_LIBCPP_MSVCRT) || (defined(__FreeBSD_version) && __FreeBSD_version >= 1300043) || defined(__OpenBSD__)
-#    define _LIBCPP_C_HAS_NO_GETS
+#  if defined(_LIBCUDACXX_MSVCRT) || (defined(__FreeBSD_version) && __FreeBSD_version >= 1300043) || defined(__OpenBSD__)
+#    define _LIBCUDACXX_C_HAS_NO_GETS
 #  endif
 
 #  if defined(__BIONIC__) || defined(__NuttX__) || defined(__Fuchsia__) || defined(__wasi__) ||                        \
-      defined(_LIBCPP_HAS_MUSL_LIBC) || defined(__OpenBSD__)
-#    define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
+      defined(_LIBCUDACXX_HAS_MUSL_LIBC) || defined(__OpenBSD__)
+#    define _LIBCUDACXX_PROVIDES_DEFAULT_RUNE_TABLE
 #  endif
 
 #  if __has_feature(cxx_atomic) || __has_extension(c_atomic) || __has_keyword(_Atomic)
-#    define _LIBCPP_HAS_C_ATOMIC_IMP
-#  elif defined(_LIBCPP_COMPILER_GCC)
-#    define _LIBCPP_HAS_GCC_ATOMIC_IMP
+#    define _LIBCUDACXX_HAS_C_ATOMIC_IMP
+#  elif defined(_LIBCUDACXX_COMPILER_GCC)
+#    define _LIBCUDACXX_HAS_GCC_ATOMIC_IMP
 #  endif
 
-#  if !defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) &&                                    \
-      !defined(_LIBCPP_HAS_EXTERNAL_ATOMIC_IMP)
-#    define _LIBCPP_HAS_NO_ATOMIC_HEADER
+#  if !defined(_LIBCUDACXX_HAS_C_ATOMIC_IMP) && !defined(_LIBCUDACXX_HAS_GCC_ATOMIC_IMP) &&                                    \
+      !defined(_LIBCUDACXX_HAS_EXTERNAL_ATOMIC_IMP)
+#    define _LIBCUDACXX_HAS_NO_ATOMIC_HEADER
 #  else
-#    ifndef _LIBCPP_ATOMIC_FLAG_TYPE
-#      define _LIBCPP_ATOMIC_FLAG_TYPE bool
+#    ifndef _LIBCUDACXX_ATOMIC_FLAG_TYPE
+#      define _LIBCUDACXX_ATOMIC_FLAG_TYPE bool
 #    endif
-#    ifdef _LIBCPP_FREESTANDING
-#      define _LIBCPP_ATOMIC_ONLY_USE_BUILTINS
+#    ifdef _LIBCUDACXX_FREESTANDING
+#      define _LIBCUDACXX_ATOMIC_ONLY_USE_BUILTINS
 #    endif
 #  endif
 
-#  ifndef _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
-#    define _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+#  ifndef _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+#    define _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
 #  endif
 
-#  if defined(_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS)
+#  if defined(_LIBCUDACXX_ENABLE_THREAD_SAFETY_ANNOTATIONS)
 #    if defined(__clang__) && __has_attribute(acquire_capability)
 // Work around the attribute handling in clang.  When both __declspec and
 // __attribute__ are present, the processing goes awry preventing the definition
 // of the types. In MinGW mode, __declspec evaluates to __attribute__, and thus
 // combining the two does work.
 #      if !defined(_MSC_VER)
-#        define _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
+#        define _LIBCUDACXX_HAS_THREAD_SAFETY_ANNOTATIONS
 #      endif
 #    endif
 #  endif
 
-#  ifdef _LIBCPP_HAS_THREAD_SAFETY_ANNOTATIONS
-#    define _LIBCPP_THREAD_SAFETY_ANNOTATION(x) __attribute__((x))
+#  ifdef _LIBCUDACXX_HAS_THREAD_SAFETY_ANNOTATIONS
+#    define _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(x) __attribute__((x))
 #  else
-#    define _LIBCPP_THREAD_SAFETY_ANNOTATION(x)
+#    define _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(x)
 #  endif
 
-#  if _LIBCPP_STD_VER > 17
-#    define _LIBCPP_CONSTINIT constinit
+#  if _LIBCUDACXX_STD_VER > 17
+#    define _LIBCUDACXX_CONSTINIT constinit
 #  elif __has_attribute(require_constant_initialization)
-#    define _LIBCPP_CONSTINIT __attribute__((__require_constant_initialization__))
+#    define _LIBCUDACXX_CONSTINIT __attribute__((__require_constant_initialization__))
 #  else
-#    define _LIBCPP_CONSTINIT
+#    define _LIBCUDACXX_CONSTINIT
 #  endif
 
-#  if __has_attribute(diagnose_if) && !defined(_LIBCPP_DISABLE_ADDITIONAL_DIAGNOSTICS)
-#    define _LIBCPP_DIAGNOSE_WARNING(...) __attribute__((diagnose_if(__VA_ARGS__, "warning")))
-#    define _LIBCPP_DIAGNOSE_ERROR(...) __attribute__((diagnose_if(__VA_ARGS__, "error")))
+#  if __has_attribute(diagnose_if) && !defined(_LIBCUDACXX_DISABLE_ADDITIONAL_DIAGNOSTICS)
+#    define _LIBCUDACXX_DIAGNOSE_WARNING(...) __attribute__((diagnose_if(__VA_ARGS__, "warning")))
+#    define _LIBCUDACXX_DIAGNOSE_ERROR(...) __attribute__((diagnose_if(__VA_ARGS__, "error")))
 #  else
-#    define _LIBCPP_DIAGNOSE_WARNING(...)
-#    define _LIBCPP_DIAGNOSE_ERROR(...)
+#    define _LIBCUDACXX_DIAGNOSE_WARNING(...)
+#    define _LIBCUDACXX_DIAGNOSE_ERROR(...)
 #  endif
 
 // Use a function like macro to imply that it must be followed by a semicolon
 #  if __has_cpp_attribute(fallthrough)
-#    define _LIBCPP_FALLTHROUGH() [[fallthrough]]
+#    define _LIBCUDACXX_FALLTHROUGH() [[fallthrough]]
 #  elif __has_attribute(__fallthrough__)
-#    define _LIBCPP_FALLTHROUGH() __attribute__((__fallthrough__))
+#    define _LIBCUDACXX_FALLTHROUGH() __attribute__((__fallthrough__))
 #  else
-#    define _LIBCPP_FALLTHROUGH() ((void)0)
+#    define _LIBCUDACXX_FALLTHROUGH() ((void)0)
 #  endif
 
 #  if __has_attribute(__nodebug__)
-#    define _LIBCPP_NODEBUG __attribute__((__nodebug__))
+#    define _LIBCUDACXX_NODEBUG __attribute__((__nodebug__))
 #  else
-#    define _LIBCPP_NODEBUG
+#    define _LIBCUDACXX_NODEBUG
 #  endif
 
 #  if __has_attribute(__standalone_debug__)
-#    define _LIBCPP_STANDALONE_DEBUG __attribute__((__standalone_debug__))
+#    define _LIBCUDACXX_STANDALONE_DEBUG __attribute__((__standalone_debug__))
 #  else
-#    define _LIBCPP_STANDALONE_DEBUG
+#    define _LIBCUDACXX_STANDALONE_DEBUG
 #  endif
 
 #  if __has_attribute(__preferred_name__)
-#    define _LIBCPP_PREFERRED_NAME(x) __attribute__((__preferred_name__(x)))
+#    define _LIBCUDACXX_PREFERRED_NAME(x) __attribute__((__preferred_name__(x)))
 #  else
-#    define _LIBCPP_PREFERRED_NAME(x)
+#    define _LIBCUDACXX_PREFERRED_NAME(x)
 #  endif
 
 // We often repeat things just for handling wide characters in the library.
 // When wide characters are disabled, it can be useful to have a quick way of
 // disabling it without having to resort to #if-#endif, which has a larger
 // impact on readability.
-#  if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
-#    define _LIBCPP_IF_WIDE_CHARACTERS(...)
+#  if defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
+#    define _LIBCUDACXX_IF_WIDE_CHARACTERS(...)
 #  else
-#    define _LIBCPP_IF_WIDE_CHARACTERS(...) __VA_ARGS__
+#    define _LIBCUDACXX_IF_WIDE_CHARACTERS(...) __VA_ARGS__
 #  endif
 
-#  if defined(_LIBCPP_ABI_MICROSOFT) && (defined(_LIBCPP_COMPILER_MSVC) || __has_declspec_attribute(empty_bases))
-#    define _LIBCPP_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
+#  if defined(_LIBCUDACXX_ABI_MICROSOFT) && (defined(_LIBCUDACXX_COMPILER_MSVC) || __has_declspec_attribute(empty_bases))
+#    define _LIBCUDACXX_DECLSPEC_EMPTY_BASES __declspec(empty_bases)
 #  else
-#    define _LIBCPP_DECLSPEC_EMPTY_BASES
-#  endif
-
-#  if defined(_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES)
-#    define _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
-#    define _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
-#    define _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
-#    define _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
-#    define _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION
-#  endif // _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
-
-#  if defined(_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES)
-#    define _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
-#    define _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION
-#    define _LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
-#    define _LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
-#    define _LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
-#    define _LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
-#  endif // _LIBCPP_ENABLE_CXX20_REMOVED_FEATURES
+#    define _LIBCUDACXX_DECLSPEC_EMPTY_BASES
+#  endif
+
+#  if defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_FEATURES)
+#    define _LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR
+#    define _LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS
+#    define _LIBCUDACXX_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
+#    define _LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+#    define _LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION
+#  endif // _LIBCUDACXX_ENABLE_CXX17_REMOVED_FEATURES
+
+#  if defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_FEATURES)
+#    define _LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+#    define _LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION
+#    define _LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
+#    define _LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS
+#    define _LIBCUDACXX_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
+#    define _LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS
+#  endif // _LIBCUDACXX_ENABLE_CXX20_REMOVED_FEATURES
 
 #  if !defined(__cpp_impl_coroutine) || __cpp_impl_coroutine < 201902L
-#    define _LIBCPP_HAS_NO_CXX20_COROUTINES
+#    define _LIBCUDACXX_HAS_NO_CXX20_COROUTINES
 #  endif
 
-#  define _LIBCPP_PUSH_MACROS _Pragma("push_macro(\"min\")") _Pragma("push_macro(\"max\")")
-#  define _LIBCPP_POP_MACROS _Pragma("pop_macro(\"min\")") _Pragma("pop_macro(\"max\")")
+#  define _LIBCUDACXX_PUSH_MACROS _Pragma("push_macro(\"min\")") _Pragma("push_macro(\"max\")")
+#  define _LIBCUDACXX_POP_MACROS _Pragma("pop_macro(\"min\")") _Pragma("pop_macro(\"max\")")
 
-#  ifndef _LIBCPP_NO_AUTO_LINK
-#    if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_BUILDING_LIBRARY)
-#      if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
+#  ifndef _LIBCUDACXX_NO_AUTO_LINK
+#    if defined(_LIBCUDACXX_ABI_MICROSOFT) && !defined(_LIBCUDACXX_BUILDING_LIBRARY)
+#      if !defined(_LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS)
 #        pragma comment(lib, "c++.lib")
 #      else
 #        pragma comment(lib, "libc++.lib")
 #      endif
-#    endif // defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_BUILDING_LIBRARY)
-#  endif   // _LIBCPP_NO_AUTO_LINK
+#    endif // defined(_LIBCUDACXX_ABI_MICROSOFT) && !defined(_LIBCUDACXX_BUILDING_LIBRARY)
+#  endif   // _LIBCUDACXX_NO_AUTO_LINK
 
 // Configures the fopen close-on-exec mode character, if any. This string will
 // be appended to any mode string used by fstream for fopen/fdopen.
@@ -1133,37 +1133,37 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
 // Not all platforms support this, but it helps avoid fd-leaks on platforms that
 // do.
 #  if defined(__BIONIC__)
-#    define _LIBCPP_FOPEN_CLOEXEC_MODE "e"
+#    define _LIBCUDACXX_FOPEN_CLOEXEC_MODE "e"
 #  else
-#    define _LIBCPP_FOPEN_CLOEXEC_MODE
+#    define _LIBCUDACXX_FOPEN_CLOEXEC_MODE
 #  endif
 
 // Support for _FILE_OFFSET_BITS=64 landed gradually in Android, so the full set
 // of functions used in cstdio may not be available for low API levels when
 // using 64-bit file offsets on LP32.
 #  if defined(__BIONIC__) && defined(__USE_FILE_OFFSET64) && __ANDROID_API__ < 24
-#    define _LIBCPP_HAS_NO_FGETPOS_FSETPOS
+#    define _LIBCUDACXX_HAS_NO_FGETPOS_FSETPOS
 #  endif
 
 #  if __has_attribute(init_priority)
 // TODO: Remove this once we drop support for building libc++ with old Clangs
-#    if (defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER < 1200) ||                                                    \
+#    if (defined(_LIBCUDACXX_CLANG_VER) && _LIBCUDACXX_CLANG_VER < 1200) ||                                                    \
         (defined(__apple_build_version__) && __apple_build_version__ < 13000000)
-#      define _LIBCPP_INIT_PRIORITY_MAX __attribute__((init_priority(101)))
+#      define _LIBCUDACXX_INIT_PRIORITY_MAX __attribute__((init_priority(101)))
 #    else
-#      define _LIBCPP_INIT_PRIORITY_MAX __attribute__((init_priority(100)))
+#      define _LIBCUDACXX_INIT_PRIORITY_MAX __attribute__((init_priority(100)))
 #    endif
 #  else
-#    define _LIBCPP_INIT_PRIORITY_MAX
+#    define _LIBCUDACXX_INIT_PRIORITY_MAX
 #  endif
 
 #  if defined(__GNUC__) || defined(__clang__)
 // The attribute uses 1-based indices for ordinary and static member functions.
 // The attribute uses 2-based indices for non-static member functions.
-#    define _LIBCPP_ATTRIBUTE_FORMAT(archetype, format_string_index, first_format_arg_index)                           \
+#    define _LIBCUDACXX_ATTRIBUTE_FORMAT(archetype, format_string_index, first_format_arg_index)                           \
       __attribute__((__format__(archetype, format_string_index, first_format_arg_index)))
 #  else
-#    define _LIBCPP_ATTRIBUTE_FORMAT(archetype, format_string_index, first_format_arg_index) /* nothing */
+#    define _LIBCUDACXX_ATTRIBUTE_FORMAT(archetype, format_string_index, first_format_arg_index) /* nothing */
 #  endif
 
 #  if __has_cpp_attribute(msvc::no_unique_address)
@@ -1175,11 +1175,11 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
 // Clang-cl does not yet (14.0) implement either [[no_unique_address]] or
 // [[msvc::no_unique_address]] though. If/when it does implement
 // [[msvc::no_unique_address]], this should be preferred though.
-#    define _LIBCPP_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
+#    define _LIBCUDACXX_NO_UNIQUE_ADDRESS [[msvc::no_unique_address]]
 #  elif __has_cpp_attribute(no_unique_address)
-#    define _LIBCPP_NO_UNIQUE_ADDRESS [[no_unique_address]]
+#    define _LIBCUDACXX_NO_UNIQUE_ADDRESS [[no_unique_address]]
 #  else
-#    define _LIBCPP_NO_UNIQUE_ADDRESS /* nothing */
+#    define _LIBCUDACXX_NO_UNIQUE_ADDRESS /* nothing */
 // Note that this can be replaced by #error as soon as clang-cl
 // implements msvc::no_unique_address, since there should be no C++20
 // compiler that doesn't support one of the two attributes at that point.
@@ -1188,37 +1188,37 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD
 // the ABI inconsistent.
 #  endif
 
-#  ifdef _LIBCPP_COMPILER_CLANG_BASED
-#    define _LIBCPP_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push")
-#    define _LIBCPP_DIAGNOSTIC_POP _Pragma("clang diagnostic pop")
-#    define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(str) _Pragma(_LIBCPP_TOSTRING(clang diagnostic ignored str))
-#    define _LIBCPP_GCC_DIAGNOSTIC_IGNORED(str)
-#  elif defined(_LIBCPP_COMPILER_GCC)
-#    define _LIBCPP_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push")
-#    define _LIBCPP_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
-#    define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(str)
-#    define _LIBCPP_GCC_DIAGNOSTIC_IGNORED(str) _Pragma(_LIBCPP_TOSTRING(GCC diagnostic ignored str))
+#  ifdef _LIBCUDACXX_COMPILER_CLANG_BASED
+#    define _LIBCUDACXX_DIAGNOSTIC_PUSH _Pragma("clang diagnostic push")
+#    define _LIBCUDACXX_DIAGNOSTIC_POP _Pragma("clang diagnostic pop")
+#    define _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED(str) _Pragma(_LIBCUDACXX_TOSTRING(clang diagnostic ignored str))
+#    define _LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED(str)
+#  elif defined(_LIBCUDACXX_COMPILER_GCC)
+#    define _LIBCUDACXX_DIAGNOSTIC_PUSH _Pragma("GCC diagnostic push")
+#    define _LIBCUDACXX_DIAGNOSTIC_POP _Pragma("GCC diagnostic pop")
+#    define _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED(str)
+#    define _LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED(str) _Pragma(_LIBCUDACXX_TOSTRING(GCC diagnostic ignored str))
 #  else
-#    define _LIBCPP_DIAGNOSTIC_PUSH
-#    define _LIBCPP_DIAGNOSTIC_POP
-#    define _LIBCPP_CLANG_DIAGNOSTIC_IGNORED(str)
-#    define _LIBCPP_GCC_DIAGNOSTIC_IGNORED(str)
+#    define _LIBCUDACXX_DIAGNOSTIC_PUSH
+#    define _LIBCUDACXX_DIAGNOSTIC_POP
+#    define _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED(str)
+#    define _LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED(str)
 #  endif
 
-#  if defined(_AIX) && !defined(_LIBCPP_COMPILER_GCC)
-#    define _LIBCPP_PACKED_BYTE_FOR_AIX _Pragma("pack(1)")
-#    define _LIBCPP_PACKED_BYTE_FOR_AIX_END _Pragma("pack(pop)")
+#  if defined(_AIX) && !defined(_LIBCUDACXX_COMPILER_GCC)
+#    define _LIBCUDACXX_PACKED_BYTE_FOR_AIX _Pragma("pack(1)")
+#    define _LIBCUDACXX_PACKED_BYTE_FOR_AIX_END _Pragma("pack(pop)")
 #  else
-#    define _LIBCPP_PACKED_BYTE_FOR_AIX     /* empty */
-#    define _LIBCPP_PACKED_BYTE_FOR_AIX_END /* empty */
+#    define _LIBCUDACXX_PACKED_BYTE_FOR_AIX     /* empty */
+#    define _LIBCUDACXX_PACKED_BYTE_FOR_AIX_END /* empty */
 #  endif
 
 #  if __has_attribute(__packed__)
-#    define _LIBCPP_PACKED __attribute__((__packed__))
+#    define _LIBCUDACXX_PACKED __attribute__((__packed__))
 #  else
-#    define _LIBCPP_PACKED
+#    define _LIBCUDACXX_PACKED
 #  endif
 
 #endif // __cplusplus
 
-#endif // _LIBCPP___CONFIG
+#endif // _LIBCUDACXX___CONFIG

diff  --git a/libcxx/include/__config_site.in b/libcxx/include/__config_site.in
index 7c11fae98619..a1ea902f2f24 100644
--- a/libcxx/include/__config_site.in
+++ b/libcxx/include/__config_site.in
@@ -6,31 +6,31 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___CONFIG_SITE
-#define _LIBCPP___CONFIG_SITE
+#ifndef _LIBCUDACXX___CONFIG_SITE
+#define _LIBCUDACXX___CONFIG_SITE
 
-#cmakedefine _LIBCPP_ABI_VERSION @_LIBCPP_ABI_VERSION@
-#cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@
-#cmakedefine _LIBCPP_ABI_FORCE_ITANIUM
-#cmakedefine _LIBCPP_ABI_FORCE_MICROSOFT
-#cmakedefine _LIBCPP_HAS_NO_THREADS
-#cmakedefine _LIBCPP_HAS_NO_MONOTONIC_CLOCK
-#cmakedefine _LIBCPP_HAS_MUSL_LIBC
-#cmakedefine _LIBCPP_HAS_THREAD_API_PTHREAD
-#cmakedefine _LIBCPP_HAS_THREAD_API_EXTERNAL
-#cmakedefine _LIBCPP_HAS_THREAD_API_WIN32
-#cmakedefine _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL
-#cmakedefine _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS
-#cmakedefine _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
-#cmakedefine _LIBCPP_NO_VCRUNTIME
-#cmakedefine _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION @_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION@
-#cmakedefine _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
-#cmakedefine _LIBCPP_HAS_PARALLEL_ALGORITHMS
-#cmakedefine _LIBCPP_HAS_NO_RANDOM_DEVICE
-#cmakedefine _LIBCPP_HAS_NO_LOCALIZATION
-#cmakedefine _LIBCPP_HAS_NO_WIDE_CHARACTERS
-#cmakedefine01 _LIBCPP_ENABLE_ASSERTIONS_DEFAULT
-#cmakedefine _LIBCPP_ENABLE_DEBUG_MODE
+#cmakedefine _LIBCUDACXX_ABI_VERSION @_LIBCUDACXX_ABI_VERSION@
+#cmakedefine _LIBCUDACXX_ABI_NAMESPACE @_LIBCUDACXX_ABI_NAMESPACE@
+#cmakedefine _LIBCUDACXX_ABI_FORCE_ITANIUM
+#cmakedefine _LIBCUDACXX_ABI_FORCE_MICROSOFT
+#cmakedefine _LIBCUDACXX_HAS_NO_THREADS
+#cmakedefine _LIBCUDACXX_HAS_NO_MONOTONIC_CLOCK
+#cmakedefine _LIBCUDACXX_HAS_MUSL_LIBC
+#cmakedefine _LIBCUDACXX_HAS_THREAD_API_PTHREAD
+#cmakedefine _LIBCUDACXX_HAS_THREAD_API_EXTERNAL
+#cmakedefine _LIBCUDACXX_HAS_THREAD_API_WIN32
+#cmakedefine _LIBCUDACXX_HAS_THREAD_LIBRARY_EXTERNAL
+#cmakedefine _LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS
+#cmakedefine _LIBCUDACXX_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
+#cmakedefine _LIBCUDACXX_NO_VCRUNTIME
+#cmakedefine _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION @_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION@
+#cmakedefine _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY
+#cmakedefine _LIBCUDACXX_HAS_PARALLEL_ALGORITHMS
+#cmakedefine _LIBCUDACXX_HAS_NO_RANDOM_DEVICE
+#cmakedefine _LIBCUDACXX_HAS_NO_LOCALIZATION
+#cmakedefine _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+#cmakedefine01 _LIBCUDACXX_ENABLE_ASSERTIONS_DEFAULT
+#cmakedefine _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 // __USE_MINGW_ANSI_STDIO gets redefined on MinGW
 #ifdef __clang__
@@ -38,11 +38,11 @@
 #  pragma clang diagnostic ignored "-Wmacro-redefined"
 #endif
 
- at _LIBCPP_ABI_DEFINES@
- at _LIBCPP_EXTRA_SITE_DEFINES@
+ at _LIBCUDACXX_ABI_DEFINES@
+ at _LIBCUDACXX_EXTRA_SITE_DEFINES@
 
 #ifdef __clang__
 #  pragma clang diagnostic pop
 #endif
 
-#endif // _LIBCPP___CONFIG_SITE
+#endif // _LIBCUDACXX___CONFIG_SITE

diff  --git a/libcxx/include/__coroutine/coroutine_handle.h b/libcxx/include/__coroutine/coroutine_handle.h
index 4bf323789217..0a733bffb505 100644
--- a/libcxx/include/__coroutine/coroutine_handle.h
+++ b/libcxx/include/__coroutine/coroutine_handle.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COROUTINE_COROUTINE_HANDLE_H
-#define _LIBCPP___COROUTINE_COROUTINE_HANDLE_H
+#ifndef _LIBCUDACXX___COROUTINE_COROUTINE_HANDLE_H
+#define _LIBCUDACXX___COROUTINE_COROUTINE_HANDLE_H
 
 #include <__assert>
 #include <__config>
@@ -16,39 +16,39 @@
 #include <compare>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_CXX20_COROUTINES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // [coroutine.handle]
 template <class _Promise = void>
-struct _LIBCPP_TEMPLATE_VIS coroutine_handle;
+struct _LIBCUDACXX_TEMPLATE_VIS coroutine_handle;
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS coroutine_handle<void> {
+struct _LIBCUDACXX_TEMPLATE_VIS coroutine_handle<void> {
 public:
     // [coroutine.handle.con], construct/reset
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr coroutine_handle() noexcept = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr coroutine_handle(nullptr_t) noexcept {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     coroutine_handle& operator=(nullptr_t) noexcept {
         __handle_ = nullptr;
         return *this;
     }
 
     // [coroutine.handle.export.import], export/import
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void* address() const noexcept { return __handle_; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     static constexpr coroutine_handle from_address(void* __addr) noexcept {
         coroutine_handle __tmp;
         __tmp.__handle_ = __addr;
@@ -56,31 +56,31 @@ struct _LIBCPP_TEMPLATE_VIS coroutine_handle<void> {
     }
 
     // [coroutine.handle.observers], observers
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit operator bool() const noexcept {
         return __handle_ != nullptr;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     bool done() const {
-        _LIBCPP_ASSERT(__is_suspended(), "done() can be called only on suspended coroutines");
+        _LIBCUDACXX_ASSERT(__is_suspended(), "done() can be called only on suspended coroutines");
         return __builtin_coro_done(__handle_);
     }
 
     // [coroutine.handle.resumption], resumption
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void operator()() const { resume(); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void resume() const {
-        _LIBCPP_ASSERT(__is_suspended(), "resume() can be called only on suspended coroutines");
-        _LIBCPP_ASSERT(!done(), "resume() has undefined behavior when the coroutine is done");
+        _LIBCUDACXX_ASSERT(__is_suspended(), "resume() can be called only on suspended coroutines");
+        _LIBCUDACXX_ASSERT(!done(), "resume() has undefined behavior when the coroutine is done");
         __builtin_coro_resume(__handle_);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void destroy() const {
-        _LIBCPP_ASSERT(__is_suspended(), "destroy() can be called only on suspended coroutines");
+        _LIBCUDACXX_ASSERT(__is_suspended(), "destroy() can be called only on suspended coroutines");
         __builtin_coro_destroy(__handle_);
     }
 
@@ -94,45 +94,45 @@ struct _LIBCPP_TEMPLATE_VIS coroutine_handle<void> {
 };
 
 // [coroutine.handle.compare]
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 constexpr bool operator==(coroutine_handle<> __x, coroutine_handle<> __y) noexcept {
     return __x.address() == __y.address();
 }
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 constexpr strong_ordering operator<=>(coroutine_handle<> __x, coroutine_handle<> __y) noexcept {
     return compare_three_way()(__x.address(), __y.address());
 }
 
 template <class _Promise>
-struct _LIBCPP_TEMPLATE_VIS coroutine_handle {
+struct _LIBCUDACXX_TEMPLATE_VIS coroutine_handle {
 public:
     // [coroutine.handle.con], construct/reset
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr coroutine_handle() noexcept = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr coroutine_handle(nullptr_t) noexcept {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     static coroutine_handle from_promise(_Promise& __promise) {
         using _RawPromise = typename remove_cv<_Promise>::type;
         coroutine_handle __tmp;
         __tmp.__handle_ =
-            __builtin_coro_promise(_VSTD::addressof(const_cast<_RawPromise&>(__promise)), alignof(_Promise), true);
+            __builtin_coro_promise(_CUDA_VSTD::addressof(const_cast<_RawPromise&>(__promise)), alignof(_Promise), true);
         return __tmp;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     coroutine_handle& operator=(nullptr_t) noexcept {
         __handle_ = nullptr;
         return *this;
     }
 
     // [coroutine.handle.export.import], export/import
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void* address() const noexcept { return __handle_; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     static constexpr coroutine_handle from_address(void* __addr) noexcept {
         coroutine_handle __tmp;
         __tmp.__handle_ = __addr;
@@ -140,42 +140,42 @@ struct _LIBCPP_TEMPLATE_VIS coroutine_handle {
     }
 
     // [coroutine.handle.conv], conversion
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr operator coroutine_handle<>() const noexcept {
         return coroutine_handle<>::from_address(address());
     }
 
     // [coroutine.handle.observers], observers
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit operator bool() const noexcept {
         return __handle_ != nullptr;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     bool done() const {
-        _LIBCPP_ASSERT(__is_suspended(), "done() can be called only on suspended coroutines");
+        _LIBCUDACXX_ASSERT(__is_suspended(), "done() can be called only on suspended coroutines");
         return __builtin_coro_done(__handle_);
     }
 
     // [coroutine.handle.resumption], resumption
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void operator()() const { resume(); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void resume() const {
-        _LIBCPP_ASSERT(__is_suspended(), "resume() can be called only on suspended coroutines");
-        _LIBCPP_ASSERT(!done(), "resume() has undefined behavior when the coroutine is done");
+        _LIBCUDACXX_ASSERT(__is_suspended(), "resume() can be called only on suspended coroutines");
+        _LIBCUDACXX_ASSERT(!done(), "resume() has undefined behavior when the coroutine is done");
         __builtin_coro_resume(__handle_);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void destroy() const {
-        _LIBCPP_ASSERT(__is_suspended(), "destroy() can be called only on suspended coroutines");
+        _LIBCUDACXX_ASSERT(__is_suspended(), "destroy() can be called only on suspended coroutines");
         __builtin_coro_destroy(__handle_);
     }
 
     // [coroutine.handle.promise], promise access
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     _Promise& promise() const {
         return *static_cast<_Promise*>(__builtin_coro_promise(this->__handle_, alignof(_Promise), false));
     }
@@ -191,12 +191,12 @@ struct _LIBCPP_TEMPLATE_VIS coroutine_handle {
 // [coroutine.handle.hash]
 template <class _Tp>
 struct hash<coroutine_handle<_Tp>> {
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     size_t operator()(const coroutine_handle<_Tp>& __v) const noexcept { return hash<void*>()(__v.address()); }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_CXX20_COROUTINES)
 
-#endif // _LIBCPP___COROUTINE_COROUTINE_HANDLE_H
+#endif // _LIBCUDACXX___COROUTINE_COROUTINE_HANDLE_H

diff  --git a/libcxx/include/__coroutine/coroutine_traits.h b/libcxx/include/__coroutine/coroutine_traits.h
index 0a5229b45945..d2cdc2269566 100644
--- a/libcxx/include/__coroutine/coroutine_traits.h
+++ b/libcxx/include/__coroutine/coroutine_traits.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COROUTINE_COROUTINE_TRAITS_H
-#define _LIBCPP___COROUTINE_COROUTINE_TRAITS_H
+#ifndef _LIBCUDACXX___COROUTINE_COROUTINE_TRAITS_H
+#define _LIBCUDACXX___COROUTINE_COROUTINE_TRAITS_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_CXX20_COROUTINES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // [coroutine.traits]
 // [coroutine.traits.primary]
@@ -46,8 +46,8 @@ struct coroutine_traits
 {
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_CXX20_COROUTINES)
 
-#endif // _LIBCPP___COROUTINE_COROUTINE_TRAITS_H
+#endif // _LIBCUDACXX___COROUTINE_COROUTINE_TRAITS_H

diff  --git a/libcxx/include/__coroutine/noop_coroutine_handle.h b/libcxx/include/__coroutine/noop_coroutine_handle.h
index 7a2c672057cb..882280793d70 100644
--- a/libcxx/include/__coroutine/noop_coroutine_handle.h
+++ b/libcxx/include/__coroutine/noop_coroutine_handle.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___COROUTINE_NOOP_COROUTINE_HANDLE_H
-#define _LIBCPP___COROUTINE_NOOP_COROUTINE_HANDLE_H
+#ifndef _LIBCUDACXX___COROUTINE_NOOP_COROUTINE_HANDLE_H
+#define _LIBCUDACXX___COROUTINE_NOOP_COROUTINE_HANDLE_H
 
 #include <__config>
 #include <__coroutine/coroutine_handle.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_CXX20_COROUTINES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if __has_builtin(__builtin_coro_noop) || defined(_LIBCPP_COMPILER_GCC)
+#if __has_builtin(__builtin_coro_noop) || defined(_LIBCUDACXX_COMPILER_GCC)
 
 // [coroutine.noop]
 // [coroutine.promise.noop]
@@ -28,51 +28,51 @@ struct noop_coroutine_promise {};
 
 // [coroutine.handle.noop]
 template <>
-struct _LIBCPP_TEMPLATE_VIS coroutine_handle<noop_coroutine_promise> {
+struct _LIBCUDACXX_TEMPLATE_VIS coroutine_handle<noop_coroutine_promise> {
 public:
     // [coroutine.handle.noop.conv], conversion
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr operator coroutine_handle<>() const noexcept {
         return coroutine_handle<>::from_address(address());
     }
 
     // [coroutine.handle.noop.observers], observers
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit operator bool() const noexcept { return true; }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr bool done() const noexcept { return false; }
 
     // [coroutine.handle.noop.resumption], resumption
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void operator()() const noexcept {}
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void resume() const noexcept {}
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void destroy() const noexcept {}
 
     // [coroutine.handle.noop.promise], promise access
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     noop_coroutine_promise& promise() const noexcept {
         return *static_cast<noop_coroutine_promise*>(
             __builtin_coro_promise(this->__handle_, alignof(noop_coroutine_promise), false));
     }
 
     // [coroutine.handle.noop.address], address
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void* address() const noexcept { return __handle_; }
 
 private:
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend coroutine_handle<noop_coroutine_promise> noop_coroutine() noexcept;
 
 #if __has_builtin(__builtin_coro_noop)
-    _LIBCPP_HIDE_FROM_ABI coroutine_handle() noexcept {
+    _LIBCUDACXX_HIDE_FROM_ABI coroutine_handle() noexcept {
         this->__handle_ = __builtin_coro_noop();
     }
 
     void* __handle_ = nullptr;
 
-#elif defined(_LIBCPP_COMPILER_GCC)
+#elif defined(_LIBCUDACXX_COMPILER_GCC)
     // GCC doesn't implement __builtin_coro_noop().
     // Construct the coroutine frame manually instead.
     struct __noop_coroutine_frame_ty_ {
@@ -87,26 +87,26 @@ struct _LIBCPP_TEMPLATE_VIS coroutine_handle<noop_coroutine_promise> {
 
     void* __handle_ = &__noop_coroutine_frame_;
 
-    _LIBCPP_HIDE_FROM_ABI coroutine_handle() noexcept = default;
+    _LIBCUDACXX_HIDE_FROM_ABI coroutine_handle() noexcept = default;
 
 #endif // __has_builtin(__builtin_coro_noop)
 };
 
 using noop_coroutine_handle = coroutine_handle<noop_coroutine_promise>;
 
-#if defined(_LIBCPP_COMPILER_GCC)
+#if defined(_LIBCUDACXX_COMPILER_GCC)
 inline noop_coroutine_handle::__noop_coroutine_frame_ty_
     noop_coroutine_handle::__noop_coroutine_frame_{};
 #endif
 
 // [coroutine.noop.coroutine]
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 noop_coroutine_handle noop_coroutine() noexcept { return noop_coroutine_handle(); }
 
-#endif // __has_builtin(__builtin_coro_noop) || defined(_LIBCPP_COMPILER_GCC)
+#endif // __has_builtin(__builtin_coro_noop) || defined(_LIBCUDACXX_COMPILER_GCC)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_CXX20_COROUTINES)
 
-#endif // _LIBCPP___COROUTINE_NOOP_COROUTINE_HANDLE_H
+#endif // _LIBCUDACXX___COROUTINE_NOOP_COROUTINE_HANDLE_H

diff  --git a/libcxx/include/__coroutine/trivial_awaitables.h b/libcxx/include/__coroutine/trivial_awaitables.h
index 31399ab29a00..566a94539e85 100644
--- a/libcxx/include/__coroutine/trivial_awaitables.h
+++ b/libcxx/include/__coroutine/trivial_awaitables.h
@@ -6,41 +6,41 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LIBCPP___COROUTINE_TRIVIAL_AWAITABLES_H
-#define __LIBCPP___COROUTINE_TRIVIAL_AWAITABLES_H
+#ifndef __LIBCUDACXX___COROUTINE_TRIVIAL_AWAITABLES_H
+#define __LIBCUDACXX___COROUTINE_TRIVIAL_AWAITABLES_H
 
 #include <__config>
 #include <__coroutine/coroutine_handle.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_CXX20_COROUTINES)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // [coroutine.trivial.awaitables]
 struct suspend_never {
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr bool await_ready() const noexcept { return true; }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void await_suspend(coroutine_handle<>) const noexcept {}
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void await_resume() const noexcept {}
 };
 
 struct suspend_always {
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr bool await_ready() const noexcept { return false; }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void await_suspend(coroutine_handle<>) const noexcept {}
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void await_resume() const noexcept {}
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // __LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_CXX20_COROUTINES)
+#endif // __LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_CXX20_COROUTINES)
 
-#endif // __LIBCPP___COROUTINE_TRIVIAL_AWAITABLES_H
+#endif // __LIBCUDACXX___COROUTINE_TRIVIAL_AWAITABLES_H

diff  --git a/libcxx/include/__debug b/libcxx/include/__debug
index 59e85cb7d1bc..1a87725af97d 100644
--- a/libcxx/include/__debug
+++ b/libcxx/include/__debug
@@ -7,40 +7,40 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___DEBUG
-#define _LIBCPP___DEBUG
+#ifndef _LIBCUDACXX___DEBUG
+#define _LIBCUDACXX___DEBUG
 
 #include <__assert>
 #include <__config>
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-// Catch invalid uses of the legacy _LIBCPP_DEBUG toggle.
-#if defined(_LIBCPP_DEBUG) && _LIBCPP_DEBUG != 0 && !defined(_LIBCPP_ENABLE_DEBUG_MODE)
+// Catch invalid uses of the legacy _LIBCUDACXX_DEBUG toggle.
+#if defined(_LIBCUDACXX_DEBUG) && _LIBCUDACXX_DEBUG != 0 && !defined(_LIBCUDACXX_ENABLE_DEBUG_MODE)
 #   error "Enabling the debug mode now requires having configured the library with support for the debug mode"
 #endif
 
-#if defined(_LIBCPP_ENABLE_DEBUG_MODE) && !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY)
-# define _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
+#if defined(_LIBCUDACXX_ENABLE_DEBUG_MODE) && !defined(_LIBCUDACXX_CXX03_LANG) && !defined(_LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY)
+# define _LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
 #endif
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-#   define _LIBCPP_DEBUG_ASSERT(x, m) _LIBCPP_ASSERT(::std::__libcpp_is_constant_evaluated() || (x), m)
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+#   define _LIBCUDACXX_DEBUG_ASSERT(x, m) _LIBCUDACXX_ASSERT(::std::__LIBCUDACXX_is_constant_evaluated() || (x), m)
 #else
-#   define _LIBCPP_DEBUG_ASSERT(x, m) ((void)0)
+#   define _LIBCUDACXX_DEBUG_ASSERT(x, m) ((void)0)
 #endif
 
-#if defined(_LIBCPP_ENABLE_DEBUG_MODE) || defined(_LIBCPP_BUILDING_LIBRARY)
+#if defined(_LIBCUDACXX_ENABLE_DEBUG_MODE) || defined(_LIBCUDACXX_BUILDING_LIBRARY)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-struct _LIBCPP_TYPE_VIS __c_node;
+struct _LIBCUDACXX_TYPE_VIS __c_node;
 
-struct _LIBCPP_TYPE_VIS __i_node
+struct _LIBCUDACXX_TYPE_VIS __i_node
 {
     void* __i_;
     __i_node* __next_;
@@ -49,13 +49,13 @@ struct _LIBCPP_TYPE_VIS __i_node
     __i_node(const __i_node&) = delete;
     __i_node& operator=(const __i_node&) = delete;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __i_node(void* __i, __i_node* __next, __c_node* __c)
         : __i_(__i), __next_(__next), __c_(__c) {}
     ~__i_node();
 };
 
-struct _LIBCPP_TYPE_VIS __c_node
+struct _LIBCUDACXX_TYPE_VIS __c_node
 {
     void* __c_;
     __c_node* __next_;
@@ -66,7 +66,7 @@ struct _LIBCPP_TYPE_VIS __c_node
     __c_node(const __c_node&) = delete;
     __c_node& operator=(const __c_node&) = delete;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __c_node(void* __c, __c_node* __next)
         : __c_(__c), __next_(__next), beg_(nullptr), end_(nullptr), cap_(nullptr) {}
     virtual ~__c_node();
@@ -77,7 +77,7 @@ struct _LIBCPP_TYPE_VIS __c_node
     virtual bool __subscriptable(const void*, ptr
diff _t) const = 0;
 
     void __add(__i_node* __i);
-    _LIBCPP_HIDDEN void __remove(__i_node* __i);
+    _LIBCUDACXX_HIDDEN void __remove(__i_node* __i);
 };
 
 template <class _Cont>
@@ -133,7 +133,7 @@ _C_node<_Cont>::__subscriptable(const void* __i, ptr
diff _t __n) const
     return _Cp->__subscriptable(__j, __n);
 }
 
-class _LIBCPP_TYPE_VIS __libcpp_db
+class _LIBCUDACXX_TYPE_VIS __LIBCUDACXX_db
 {
     __c_node** __cbeg_;
     __c_node** __cend_;
@@ -142,12 +142,12 @@ class _LIBCPP_TYPE_VIS __libcpp_db
     __i_node** __iend_;
     size_t   __isz_;
 
-    explicit __libcpp_db();
+    explicit __LIBCUDACXX_db();
 public:
-    __libcpp_db(const __libcpp_db&) = delete;
-    __libcpp_db& operator=(const __libcpp_db&) = delete;
+    __LIBCUDACXX_db(const __LIBCUDACXX_db&) = delete;
+    __LIBCUDACXX_db& operator=(const __LIBCUDACXX_db&) = delete;
 
-    ~__libcpp_db();
+    ~__LIBCUDACXX_db();
 
     class __db_c_iterator;
     class __db_c_const_iterator;
@@ -160,12 +160,12 @@ public:
     typedef __c_node*(_InsertConstruct)(void*, void*, __c_node*);
 
     template <class _Cont>
-    _LIBCPP_INLINE_VISIBILITY static __c_node* __create_C_node(void *__mem, void *__c, __c_node *__next) {
+    _LIBCUDACXX_INLINE_VISIBILITY static __c_node* __create_C_node(void *__mem, void *__c, __c_node *__next) {
         return ::new (__mem) _C_node<_Cont>(__c, __next);
     }
 
     template <class _Cont>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __insert_c(_Cont* __c)
     {
         __insert_c(static_cast<void*>(__c), &__create_C_node<_Cont>);
@@ -194,27 +194,27 @@ public:
     bool __subscriptable(const void* __i, ptr
diff _t __n) const;
     bool __less_than_comparable(const void* __i, const void* __j) const;
 private:
-    _LIBCPP_HIDDEN
+    _LIBCUDACXX_HIDDEN
     __i_node* __insert_iterator(void* __i);
-    _LIBCPP_HIDDEN
+    _LIBCUDACXX_HIDDEN
     __i_node* __find_iterator(const void* __i) const;
 
-    friend _LIBCPP_FUNC_VIS __libcpp_db* __get_db();
+    friend _LIBCUDACXX_FUNC_VIS __LIBCUDACXX_db* __get_db();
 };
 
-_LIBCPP_FUNC_VIS __libcpp_db* __get_db();
-_LIBCPP_FUNC_VIS const __libcpp_db* __get_const_db();
+_LIBCUDACXX_FUNC_VIS __LIBCUDACXX_db* __get_db();
+_LIBCUDACXX_FUNC_VIS const __LIBCUDACXX_db* __get_const_db();
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // defined(_LIBCPP_ENABLE_DEBUG_MODE) || defined(_LIBCPP_BUILDING_LIBRARY)
+#endif // defined(_LIBCUDACXX_ENABLE_DEBUG_MODE) || defined(_LIBCUDACXX_BUILDING_LIBRARY)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_insert_c(_Tp* __c) {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    if (!__libcpp_is_constant_evaluated())
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 inline void __debug_db_insert_c(_Tp* __c) {
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    if (!__LIBCUDACXX_is_constant_evaluated())
         __get_db()->__insert_c(__c);
 #else
     (void)(__c);
@@ -222,9 +222,9 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_inser
 }
 
 template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_insert_i(_Tp* __i) {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    if (!__libcpp_is_constant_evaluated())
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 inline void __debug_db_insert_i(_Tp* __i) {
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    if (!__LIBCUDACXX_is_constant_evaluated())
         __get_db()->__insert_i(__i);
 #else
     (void)(__i);
@@ -232,9 +232,9 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_inser
 }
 
 template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_erase_c(_Tp* __c) {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    if (!__libcpp_is_constant_evaluated())
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 inline void __debug_db_erase_c(_Tp* __c) {
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    if (!__LIBCUDACXX_is_constant_evaluated())
         __get_db()->__erase_c(__c);
 #else
     (void)(__c);
@@ -242,9 +242,9 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_erase
 }
 
 template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_swap(_Tp* __lhs, _Tp* __rhs) {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    if (!__libcpp_is_constant_evaluated())
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 inline void __debug_db_swap(_Tp* __lhs, _Tp* __rhs) {
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    if (!__LIBCUDACXX_is_constant_evaluated())
         __get_db()->swap(__lhs, __rhs);
 #else
     (void)(__lhs);
@@ -253,15 +253,15 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_swap(
 }
 
 template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 inline void __debug_db_invalidate_all(_Tp* __c) {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    if (!__libcpp_is_constant_evaluated())
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 inline void __debug_db_invalidate_all(_Tp* __c) {
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    if (!__LIBCUDACXX_is_constant_evaluated())
         __get_db()->__invalidate_all(__c);
 #else
     (void)(__c);
 #endif
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___DEBUG
+#endif // _LIBCUDACXX___DEBUG

diff  --git a/libcxx/include/__debug_utils/randomize_range.h b/libcxx/include/__debug_utils/randomize_range.h
index 9843709019d4..123221dc2aa2 100644
--- a/libcxx/include/__debug_utils/randomize_range.h
+++ b/libcxx/include/__debug_utils/randomize_range.h
@@ -6,38 +6,38 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___LIBCXX_DEBUG_RANDOMIZE_RANGE_H
-#define _LIBCPP___LIBCXX_DEBUG_RANDOMIZE_RANGE_H
+#ifndef _LIBCUDACXX___LIBCXX_DEBUG_RANDOMIZE_RANGE_H
+#define _LIBCUDACXX___LIBCXX_DEBUG_RANDOMIZE_RANGE_H
 
 #include <__config>
 
-#ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
+#ifdef _LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
 #  include <__algorithm/shuffle.h>
 #  include <__type_traits/is_constant_evaluated.h>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _AlgPolicy, class _Iterator, class _Sentinel>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void __debug_randomize_range(_Iterator __first, _Sentinel __last) {
-#ifdef _LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
-#  ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
+#  ifdef _LIBCUDACXX_CXX03_LANG
 #    error Support for unspecified stability is only for C++11 and higher
 #  endif
 
-  if (!__libcpp_is_constant_evaluated())
-    std::__shuffle<_AlgPolicy>(__first, __last, __libcpp_debug_randomizer());
+  if (!__LIBCUDACXX_is_constant_evaluated())
+    std::__shuffle<_AlgPolicy>(__first, __last, __LIBCUDACXX_debug_randomizer());
 #else
   (void)__first;
   (void)__last;
 #endif
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___LIBCXX_DEBUG_RANDOMIZE_RANGE_H
+#endif // _LIBCUDACXX___LIBCXX_DEBUG_RANDOMIZE_RANGE_H

diff  --git a/libcxx/include/__errc b/libcxx/include/__errc
index 17bbe0e2afce..73339bbb8df5 100644
--- a/libcxx/include/__errc
+++ b/libcxx/include/__errc
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ERRC
-#define _LIBCPP___ERRC
+#ifndef _LIBCUDACXX___ERRC
+#define _LIBCUDACXX___ERRC
 
 /*
     system_error synopsis
@@ -103,17 +103,17 @@ enum class errc
 #include <__config>
 #include <cerrno>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Some error codes are not present on all platforms, so we provide equivalents
 // for them:
 
 //enum class errc
-_LIBCPP_DECLARE_STRONG_ENUM(errc)
+_LIBCUDACXX_DECLARE_STRONG_ENUM(errc)
 {
     address_family_not_supported        = EAFNOSUPPORT,
     address_in_use                      = EADDRINUSE,
@@ -210,8 +210,8 @@ _LIBCPP_DECLARE_STRONG_ENUM(errc)
     value_too_large                     = EOVERFLOW,
     wrong_protocol_type                 = EPROTOTYPE
 };
-_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(errc)
+_LIBCUDACXX_DECLARE_STRONG_ENUM_EPILOG(errc)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ERRC
+#endif // _LIBCUDACXX___ERRC

diff  --git a/libcxx/include/__filesystem/copy_options.h b/libcxx/include/__filesystem/copy_options.h
index 96c7535812e2..141cc29eb0f5 100644
--- a/libcxx/include/__filesystem/copy_options.h
+++ b/libcxx/include/__filesystem/copy_options.h
@@ -7,23 +7,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_COPY_OPTIONS_H
-#define _LIBCPP___FILESYSTEM_COPY_OPTIONS_H
+#ifndef _LIBCUDACXX___FILESYSTEM_COPY_OPTIONS_H
+#define _LIBCUDACXX___FILESYSTEM_COPY_OPTIONS_H
 
 #include <__availability>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
-enum class _LIBCPP_ENUM_VIS copy_options : unsigned short {
+enum class _LIBCUDACXX_ENUM_VIS copy_options : unsigned short {
   none = 0,
   skip_existing = 1,
   overwrite_existing = 2,
@@ -37,48 +37,48 @@ enum class _LIBCPP_ENUM_VIS copy_options : unsigned short {
   __in_recursive_copy = 512,
 };
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr copy_options operator&(copy_options __lhs, copy_options __rhs) {
   return static_cast<copy_options>(static_cast<unsigned short>(__lhs) &
                                    static_cast<unsigned short>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr copy_options operator|(copy_options __lhs, copy_options __rhs) {
   return static_cast<copy_options>(static_cast<unsigned short>(__lhs) |
                                    static_cast<unsigned short>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr copy_options operator^(copy_options __lhs, copy_options __rhs) {
   return static_cast<copy_options>(static_cast<unsigned short>(__lhs) ^
                                    static_cast<unsigned short>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr copy_options operator~(copy_options __lhs) {
   return static_cast<copy_options>(~static_cast<unsigned short>(__lhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline copy_options& operator&=(copy_options& __lhs, copy_options __rhs) {
   return __lhs = __lhs & __rhs;
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline copy_options& operator|=(copy_options& __lhs, copy_options __rhs) {
   return __lhs = __lhs | __rhs;
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline copy_options& operator^=(copy_options& __lhs, copy_options __rhs) {
   return __lhs = __lhs ^ __rhs;
 }
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_COPY_OPTIONS_H
+#endif // _LIBCUDACXX___FILESYSTEM_COPY_OPTIONS_H

diff  --git a/libcxx/include/__filesystem/directory_entry.h b/libcxx/include/__filesystem/directory_entry.h
index 5ba3ef96de48..86aa0daaf72d 100644
--- a/libcxx/include/__filesystem/directory_entry.h
+++ b/libcxx/include/__filesystem/directory_entry.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_DIRECTORY_ENTRY_H
-#define _LIBCPP___FILESYSTEM_DIRECTORY_ENTRY_H
+#ifndef _LIBCUDACXX___FILESYSTEM_DIRECTORY_ENTRY_H
+#define _LIBCUDACXX___FILESYSTEM_DIRECTORY_ENTRY_H
 
 #include <__availability>
 #include <__chrono/time_point.h>
@@ -27,18 +27,18 @@
 #include <iosfwd>
 #include <system_error>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
 
 class directory_entry {
@@ -50,13 +50,13 @@ class directory_entry {
   directory_entry(directory_entry const&) = default;
   directory_entry(directory_entry&&) noexcept = default;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   explicit directory_entry(_Path const& __p) : __p_(__p) {
     error_code __ec;
     __refresh(&__ec);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   directory_entry(_Path const& __p, error_code& __ec) : __p_(__p) {
     __refresh(&__ec);
   }
@@ -66,187 +66,187 @@ class directory_entry {
   directory_entry& operator=(directory_entry const&) = default;
   directory_entry& operator=(directory_entry&&) noexcept = default;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void assign(_Path const& __p) {
     __p_ = __p;
     error_code __ec;
     __refresh(&__ec);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void assign(_Path const& __p, error_code& __ec) {
     __p_ = __p;
     __refresh(&__ec);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void replace_filename(_Path const& __p) {
     __p_.replace_filename(__p);
     error_code __ec;
     __refresh(&__ec);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void replace_filename(_Path const& __p, error_code& __ec) {
     __p_ = __p_.parent_path() / __p;
     __refresh(&__ec);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void refresh() { __refresh(); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void refresh(error_code& __ec) noexcept { __refresh(&__ec); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   _Path const& path() const noexcept { return __p_; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   operator const _Path&() const noexcept { return __p_; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool exists() const { return _VSTD_FS::exists(file_status{__get_ft()}); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool exists(error_code& __ec) const noexcept {
     return _VSTD_FS::exists(file_status{__get_ft(&__ec)});
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_block_file() const { return __get_ft() == file_type::block; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_block_file(error_code& __ec) const noexcept {
     return __get_ft(&__ec) == file_type::block;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_character_file() const { return __get_ft() == file_type::character; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_character_file(error_code& __ec) const noexcept {
     return __get_ft(&__ec) == file_type::character;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_directory() const { return __get_ft() == file_type::directory; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_directory(error_code& __ec) const noexcept {
     return __get_ft(&__ec) == file_type::directory;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_fifo() const { return __get_ft() == file_type::fifo; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_fifo(error_code& __ec) const noexcept {
     return __get_ft(&__ec) == file_type::fifo;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_other() const { return _VSTD_FS::is_other(file_status{__get_ft()}); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_other(error_code& __ec) const noexcept {
     return _VSTD_FS::is_other(file_status{__get_ft(&__ec)});
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_regular_file() const { return __get_ft() == file_type::regular; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_regular_file(error_code& __ec) const noexcept {
     return __get_ft(&__ec) == file_type::regular;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_socket() const { return __get_ft() == file_type::socket; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_socket(error_code& __ec) const noexcept {
     return __get_ft(&__ec) == file_type::socket;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_symlink() const { return __get_sym_ft() == file_type::symlink; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool is_symlink(error_code& __ec) const noexcept {
     return __get_sym_ft(&__ec) == file_type::symlink;
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   uintmax_t file_size() const { return __get_size(); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   uintmax_t file_size(error_code& __ec) const noexcept {
     return __get_size(&__ec);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   uintmax_t hard_link_count() const { return __get_nlink(); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   uintmax_t hard_link_count(error_code& __ec) const noexcept {
     return __get_nlink(&__ec);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_time_type last_write_time() const { return __get_write_time(); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_time_type last_write_time(error_code& __ec) const noexcept {
     return __get_write_time(&__ec);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_status status() const { return __get_status(); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_status status(error_code& __ec) const noexcept {
     return __get_status(&__ec);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_status symlink_status() const { return __get_symlink_status(); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_status symlink_status(error_code& __ec) const noexcept {
     return __get_symlink_status(&__ec);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool operator<(directory_entry const& __rhs) const noexcept {
     return __p_ < __rhs.__p_;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool operator==(directory_entry const& __rhs) const noexcept {
     return __p_ == __rhs.__p_;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool operator!=(directory_entry const& __rhs) const noexcept {
     return __p_ != __rhs.__p_;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool operator<=(directory_entry const& __rhs) const noexcept {
     return __p_ <= __rhs.__p_;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool operator>(directory_entry const& __rhs) const noexcept {
     return __p_ > __rhs.__p_;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool operator>=(directory_entry const& __rhs) const noexcept {
     return __p_ >= __rhs.__p_;
   }
 
   template <class _CharT, class _Traits>
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   friend basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, const directory_entry& __d) {
     return __os << __d.path();
   }
@@ -254,7 +254,7 @@ class directory_entry {
 private:
   friend class directory_iterator;
   friend class recursive_directory_iterator;
-  friend class _LIBCPP_HIDDEN __dir_stream;
+  friend class _LIBCUDACXX_HIDDEN __dir_stream;
 
   enum _CacheType : unsigned char {
     _Empty,
@@ -274,10 +274,10 @@ class directory_entry {
     file_type __type_;
     _CacheType __cache_type_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __cached_data() noexcept { __reset(); }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __reset() {
       __cache_type_ = _Empty;
       __type_ = file_type::none;
@@ -287,7 +287,7 @@ class directory_entry {
     }
   };
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __cached_data __create_iter_result(file_type __ft) {
     __cached_data __data;
     __data.__type_ = __ft;
@@ -304,16 +304,16 @@ class directory_entry {
     return __data;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void __assign_iter_entry(_Path&& __p, __cached_data __dt) {
-    __p_ = _VSTD::move(__p);
+    __p_ = _CUDA_VSTD::move(__p);
     __data_ = __dt;
   }
 
-  _LIBCPP_FUNC_VIS
+  _LIBCUDACXX_FUNC_VIS
   error_code __do_refresh() noexcept;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static bool __is_dne_error(error_code const& __ec) {
     if (!__ec)
       return true;
@@ -326,7 +326,7 @@ class directory_entry {
     }
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void __handle_error(const char* __msg, error_code* __dest_ec,
                       error_code const& __ec, bool __allow_dne = false) const {
     if (__dest_ec) {
@@ -337,13 +337,13 @@ class directory_entry {
       __throw_filesystem_error(__msg, __p_, __ec);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void __refresh(error_code* __ec = nullptr) {
     __handle_error("in directory_entry::refresh", __ec, __do_refresh(),
                    /*allow_dne*/ true);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_type __get_sym_ft(error_code* __ec = nullptr) const {
     switch (__data_.__cache_type_) {
     case _Empty:
@@ -363,10 +363,10 @@ class directory_entry {
         __ec->clear();
       return __data_.__type_;
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_type __get_ft(error_code* __ec = nullptr) const {
     switch (__data_.__cache_type_) {
     case _Empty:
@@ -384,10 +384,10 @@ class directory_entry {
       return __data_.__type_;
     }
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_status __get_status(error_code* __ec = nullptr) const {
     switch (__data_.__cache_type_) {
     case _Empty:
@@ -399,10 +399,10 @@ class directory_entry {
     case _RefreshSymlink:
       return file_status(__get_ft(__ec), __data_.__non_sym_perms_);
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_status __get_symlink_status(error_code* __ec = nullptr) const {
     switch (__data_.__cache_type_) {
     case _Empty:
@@ -415,10 +415,10 @@ class directory_entry {
     case _RefreshSymlinkUnresolved:
       return file_status(__get_sym_ft(__ec), __data_.__sym_perms_);
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   uintmax_t __get_size(error_code* __ec = nullptr) const {
     switch (__data_.__cache_type_) {
     case _Empty:
@@ -440,10 +440,10 @@ class directory_entry {
       return __data_.__size_;
     }
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   uintmax_t __get_nlink(error_code* __ec = nullptr) const {
     switch (__data_.__cache_type_) {
     case _Empty:
@@ -459,10 +459,10 @@ class directory_entry {
       return __data_.__nlink_;
     }
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_time_type __get_write_time(error_code* __ec = nullptr) const {
     switch (__data_.__cache_type_) {
     case _Empty:
@@ -482,7 +482,7 @@ class directory_entry {
       return __data_.__write_time_;
     }
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
 private:
@@ -492,8 +492,8 @@ class directory_entry {
 
 class __dir_element_proxy {
 public:
-  inline _LIBCPP_INLINE_VISIBILITY directory_entry operator*() {
-    return _VSTD::move(__elem_);
+  inline _LIBCUDACXX_INLINE_VISIBILITY directory_entry operator*() {
+    return _CUDA_VSTD::move(__elem_);
   }
 
 private:
@@ -501,16 +501,16 @@ class __dir_element_proxy {
   friend class recursive_directory_iterator;
   explicit __dir_element_proxy(directory_entry const& __e) : __elem_(__e) {}
   __dir_element_proxy(__dir_element_proxy&& __o)
-      : __elem_(_VSTD::move(__o.__elem_)) {}
+      : __elem_(_CUDA_VSTD::move(__o.__elem_)) {}
   directory_entry __elem_;
 };
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___FILESYSTEM_DIRECTORY_ENTRY_H
+#endif // _LIBCUDACXX___FILESYSTEM_DIRECTORY_ENTRY_H

diff  --git a/libcxx/include/__filesystem/directory_iterator.h b/libcxx/include/__filesystem/directory_iterator.h
index 5ff2f01ac7b2..686d2d09994f 100644
--- a/libcxx/include/__filesystem/directory_iterator.h
+++ b/libcxx/include/__filesystem/directory_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_DIRECTORY_ITERATOR_H
-#define _LIBCPP___FILESYSTEM_DIRECTORY_ITERATOR_H
+#ifndef _LIBCUDACXX___FILESYSTEM_DIRECTORY_ITERATOR_H
+#define _LIBCUDACXX___FILESYSTEM_DIRECTORY_ITERATOR_H
 
 #include <__assert>
 #include <__availability>
@@ -23,17 +23,17 @@
 #include <cstddef>
 #include <system_error>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
-class _LIBCPP_HIDDEN __dir_stream;
+class _LIBCUDACXX_HIDDEN __dir_stream;
 class directory_iterator {
 public:
   typedef directory_entry value_type;
@@ -44,122 +44,122 @@ class directory_iterator {
 
 public:
   //ctor & dtor
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   directory_iterator() noexcept {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   explicit directory_iterator(const path& __p)
       : directory_iterator(__p, nullptr) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   directory_iterator(const path& __p, directory_options __opts)
       : directory_iterator(__p, nullptr, __opts) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   directory_iterator(const path& __p, error_code& __ec)
       : directory_iterator(__p, &__ec) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   directory_iterator(const path& __p, directory_options __opts,
                      error_code& __ec)
       : directory_iterator(__p, &__ec, __opts) {}
 
-  _LIBCPP_HIDE_FROM_ABI directory_iterator(const directory_iterator&) = default;
-  _LIBCPP_HIDE_FROM_ABI directory_iterator(directory_iterator&&) = default;
-  _LIBCPP_HIDE_FROM_ABI directory_iterator& operator=(const directory_iterator&) = default;
+  _LIBCUDACXX_HIDE_FROM_ABI directory_iterator(const directory_iterator&) = default;
+  _LIBCUDACXX_HIDE_FROM_ABI directory_iterator(directory_iterator&&) = default;
+  _LIBCUDACXX_HIDE_FROM_ABI directory_iterator& operator=(const directory_iterator&) = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   directory_iterator& operator=(directory_iterator&& __o) noexcept {
     // non-default implementation provided to support self-move assign.
     if (this != &__o) {
-      __imp_ = _VSTD::move(__o.__imp_);
+      __imp_ = _CUDA_VSTD::move(__o.__imp_);
     }
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI ~directory_iterator() = default;
+  _LIBCUDACXX_HIDE_FROM_ABI ~directory_iterator() = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   const directory_entry& operator*() const {
-    _LIBCPP_ASSERT(__imp_, "The end iterator cannot be dereferenced");
+    _LIBCUDACXX_ASSERT(__imp_, "The end iterator cannot be dereferenced");
     return __dereference();
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   const directory_entry* operator->() const { return &**this; }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   directory_iterator& operator++() { return __increment(); }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   __dir_element_proxy operator++(int) {
     __dir_element_proxy __p(**this);
     __increment();
     return __p;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   directory_iterator& increment(error_code& __ec) { return __increment(&__ec); }
 
 private:
-  inline _LIBCPP_HIDE_FROM_ABI friend bool
+  inline _LIBCUDACXX_HIDE_FROM_ABI friend bool
   operator==(const directory_iterator& __lhs,
              const directory_iterator& __rhs) noexcept;
 
   // construct the dir_stream
-  _LIBCPP_FUNC_VIS
+  _LIBCUDACXX_FUNC_VIS
   directory_iterator(const path&, error_code*,
                      directory_options = directory_options::none);
 
-  _LIBCPP_FUNC_VIS
+  _LIBCUDACXX_FUNC_VIS
   directory_iterator& __increment(error_code* __ec = nullptr);
 
-  _LIBCPP_FUNC_VIS
+  _LIBCUDACXX_FUNC_VIS
   const directory_entry& __dereference() const;
 
 private:
   shared_ptr<__dir_stream> __imp_;
 };
 
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCUDACXX_HIDE_FROM_ABI bool
 operator==(const directory_iterator& __lhs,
            const directory_iterator& __rhs) noexcept {
   return __lhs.__imp_ == __rhs.__imp_;
 }
 
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCUDACXX_HIDE_FROM_ABI bool
 operator!=(const directory_iterator& __lhs,
            const directory_iterator& __rhs) noexcept {
   return !(__lhs == __rhs);
 }
 
 // enable directory_iterator range-based for statements
-inline _LIBCPP_HIDE_FROM_ABI directory_iterator
+inline _LIBCUDACXX_HIDE_FROM_ABI directory_iterator
 begin(directory_iterator __iter) noexcept {
   return __iter;
 }
 
-inline _LIBCPP_HIDE_FROM_ABI directory_iterator
+inline _LIBCUDACXX_HIDE_FROM_ABI directory_iterator
 end(directory_iterator) noexcept {
   return directory_iterator();
 }
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
-inline constexpr bool _VSTD::ranges::enable_borrowed_range<_VSTD_FS::directory_iterator> = true;
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM
+inline constexpr bool _CUDA_VSTD::ranges::enable_borrowed_range<_VSTD_FS::directory_iterator> = true;
 
 template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
-inline constexpr bool _VSTD::ranges::enable_view<_VSTD_FS::directory_iterator> = true;
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM
+inline constexpr bool _CUDA_VSTD::ranges::enable_view<_VSTD_FS::directory_iterator> = true;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_DIRECTORY_ITERATOR_H
+#endif // _LIBCUDACXX___FILESYSTEM_DIRECTORY_ITERATOR_H

diff  --git a/libcxx/include/__filesystem/directory_options.h b/libcxx/include/__filesystem/directory_options.h
index c5c031a567cf..5c8ccf28d15c 100644
--- a/libcxx/include/__filesystem/directory_options.h
+++ b/libcxx/include/__filesystem/directory_options.h
@@ -7,76 +7,76 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_DIRECTORY_OPTIONS_H
-#define _LIBCPP___FILESYSTEM_DIRECTORY_OPTIONS_H
+#ifndef _LIBCUDACXX___FILESYSTEM_DIRECTORY_OPTIONS_H
+#define _LIBCUDACXX___FILESYSTEM_DIRECTORY_OPTIONS_H
 
 #include <__availability>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
-enum class _LIBCPP_ENUM_VIS directory_options : unsigned char {
+enum class _LIBCUDACXX_ENUM_VIS directory_options : unsigned char {
   none = 0,
   follow_directory_symlink = 1,
   skip_permission_denied = 2
 };
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr directory_options operator&(directory_options __lhs,
                                              directory_options __rhs) {
   return static_cast<directory_options>(static_cast<unsigned char>(__lhs) &
                                         static_cast<unsigned char>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr directory_options operator|(directory_options __lhs,
                                              directory_options __rhs) {
   return static_cast<directory_options>(static_cast<unsigned char>(__lhs) |
                                         static_cast<unsigned char>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr directory_options operator^(directory_options __lhs,
                                              directory_options __rhs) {
   return static_cast<directory_options>(static_cast<unsigned char>(__lhs) ^
                                         static_cast<unsigned char>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr directory_options operator~(directory_options __lhs) {
   return static_cast<directory_options>(~static_cast<unsigned char>(__lhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline directory_options& operator&=(directory_options& __lhs,
                                      directory_options __rhs) {
   return __lhs = __lhs & __rhs;
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline directory_options& operator|=(directory_options& __lhs,
                                      directory_options __rhs) {
   return __lhs = __lhs | __rhs;
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline directory_options& operator^=(directory_options& __lhs,
                                      directory_options __rhs) {
   return __lhs = __lhs ^ __rhs;
 }
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_DIRECTORY_OPTIONS_H
+#endif // _LIBCUDACXX___FILESYSTEM_DIRECTORY_OPTIONS_H

diff  --git a/libcxx/include/__filesystem/file_status.h b/libcxx/include/__filesystem/file_status.h
index ac3f6cbed9d7..3b1abbdbea94 100644
--- a/libcxx/include/__filesystem/file_status.h
+++ b/libcxx/include/__filesystem/file_status.h
@@ -7,30 +7,30 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_FILE_STATUS_H
-#define _LIBCPP___FILESYSTEM_FILE_STATUS_H
+#ifndef _LIBCUDACXX___FILESYSTEM_FILE_STATUS_H
+#define _LIBCUDACXX___FILESYSTEM_FILE_STATUS_H
 
 #include <__availability>
 #include <__config>
 #include <__filesystem/file_type.h>
 #include <__filesystem/perms.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
-class _LIBCPP_TYPE_VIS file_status {
+class _LIBCUDACXX_TYPE_VIS file_status {
 public:
   // constructors
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_status() noexcept : file_status(file_type::none) {}
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   explicit file_status(file_type __ft, perms __prms = perms::unknown) noexcept
       : __ft_(__ft),
         __prms_(__prms) {}
@@ -38,24 +38,24 @@ class _LIBCPP_TYPE_VIS file_status {
   file_status(const file_status&) noexcept = default;
   file_status(file_status&&) noexcept = default;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   ~file_status() {}
 
   file_status& operator=(const file_status&) noexcept = default;
   file_status& operator=(file_status&&) noexcept = default;
 
   // observers
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   file_type type() const noexcept { return __ft_; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   perms permissions() const noexcept { return __prms_; }
 
   // modifiers
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void type(file_type __ft) noexcept { __ft_ = __ft; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void permissions(perms __p) noexcept { __prms_ = __p; }
 
 private:
@@ -63,10 +63,10 @@ class _LIBCPP_TYPE_VIS file_status {
   perms __prms_;
 };
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_FILE_STATUS_H
+#endif // _LIBCUDACXX___FILESYSTEM_FILE_STATUS_H

diff  --git a/libcxx/include/__filesystem/file_time_type.h b/libcxx/include/__filesystem/file_time_type.h
index 7c4932e603bc..335e29cd2144 100644
--- a/libcxx/include/__filesystem/file_time_type.h
+++ b/libcxx/include/__filesystem/file_time_type.h
@@ -7,26 +7,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_FILE_TIME_TYPE_H
-#define _LIBCPP___FILESYSTEM_FILE_TIME_TYPE_H
+#ifndef _LIBCUDACXX___FILESYSTEM_FILE_TIME_TYPE_H
+#define _LIBCUDACXX___FILESYSTEM_FILE_TIME_TYPE_H
 
 #include <__availability>
 #include <__chrono/file_clock.h>
 #include <__chrono/time_point.h>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
 typedef chrono::time_point<_FilesystemClock> file_time_type;
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_FILE_TIME_TYPE_H
+#endif // _LIBCUDACXX___FILESYSTEM_FILE_TIME_TYPE_H

diff  --git a/libcxx/include/__filesystem/file_type.h b/libcxx/include/__filesystem/file_type.h
index c756a05c848b..ee33d740ddec 100644
--- a/libcxx/include/__filesystem/file_type.h
+++ b/libcxx/include/__filesystem/file_type.h
@@ -7,23 +7,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_FILE_TYPE_H
-#define _LIBCPP___FILESYSTEM_FILE_TYPE_H
+#ifndef _LIBCUDACXX___FILESYSTEM_FILE_TYPE_H
+#define _LIBCUDACXX___FILESYSTEM_FILE_TYPE_H
 
 #include <__availability>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
 // On Windows, the library never identifies files as block, character, fifo
 // or socket.
-enum class _LIBCPP_ENUM_VIS file_type : signed char {
+enum class _LIBCUDACXX_ENUM_VIS file_type : signed char {
   none = 0,
   not_found = -1,
   regular = 1,
@@ -36,8 +36,8 @@ enum class _LIBCPP_ENUM_VIS file_type : signed char {
   unknown = 8
 };
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_FILE_TYPE_H
+#endif // _LIBCUDACXX___FILESYSTEM_FILE_TYPE_H

diff  --git a/libcxx/include/__filesystem/filesystem_error.h b/libcxx/include/__filesystem/filesystem_error.h
index e32b14c1b7bf..88c596fe85f9 100644
--- a/libcxx/include/__filesystem/filesystem_error.h
+++ b/libcxx/include/__filesystem/filesystem_error.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_FILESYSTEM_ERROR_H
-#define _LIBCPP___FILESYSTEM_FILESYSTEM_ERROR_H
+#ifndef _LIBCUDACXX___FILESYSTEM_FILESYSTEM_ERROR_H
+#define _LIBCUDACXX___FILESYSTEM_FILESYSTEM_ERROR_H
 
 #include <__availability>
 #include <__config>
@@ -19,31 +19,31 @@
 #include <system_error>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-class _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_EXCEPTION_ABI filesystem_error : public system_error {
+class _LIBCUDACXX_AVAILABILITY_FILESYSTEM _LIBCUDACXX_EXCEPTION_ABI filesystem_error : public system_error {
 public:
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   filesystem_error(const string& __what, error_code __ec)
       : system_error(__ec, __what),
         __storage_(make_shared<_Storage>(path(), path())) {
     __create_what(0);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   filesystem_error(const string& __what, const path& __p1, error_code __ec)
       : system_error(__ec, __what),
         __storage_(make_shared<_Storage>(__p1, path())) {
     __create_what(1);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   filesystem_error(const string& __what, const path& __p1, const path& __p2,
                    error_code __ec)
       : system_error(__ec, __what),
@@ -51,16 +51,16 @@ class _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_EXCEPTION_ABI filesystem_error : p
     __create_what(2);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   const path& path1() const noexcept { return __storage_->__p1_; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   const path& path2() const noexcept { return __storage_->__p2_; }
 
   filesystem_error(const filesystem_error&) = default;
   ~filesystem_error() override; // key function
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   const char* what() const noexcept override {
     return __storage_->__what_.c_str();
   }
@@ -68,8 +68,8 @@ class _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_EXCEPTION_ABI filesystem_error : p
   void __create_what(int __num_paths);
 
 private:
-  struct _LIBCPP_HIDDEN _Storage {
-    _LIBCPP_INLINE_VISIBILITY
+  struct _LIBCUDACXX_HIDDEN _Storage {
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Storage(const path& __p1, const path& __p2) : __p1_(__p1), __p2_(__p2) {}
 
     path __p1_;
@@ -81,23 +81,23 @@ class _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_EXCEPTION_ABI filesystem_error : p
 
 // TODO(ldionne): We need to pop the pragma and push it again after
 //                filesystem_error to work around PR41078.
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
 template <class... _Args>
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
-#ifndef _LIBCPP_NO_EXCEPTIONS
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
 void __throw_filesystem_error(_Args&&... __args) {
-  throw filesystem_error(_VSTD::forward<_Args>(__args)...);
+  throw filesystem_error(_CUDA_VSTD::forward<_Args>(__args)...);
 }
 #else
 void __throw_filesystem_error(_Args&&...) {
-  _VSTD::abort();
+  _CUDA_VSTD::abort();
 }
 #endif
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_FILESYSTEM_ERROR_H
+#endif // _LIBCUDACXX___FILESYSTEM_FILESYSTEM_ERROR_H

diff  --git a/libcxx/include/__filesystem/operations.h b/libcxx/include/__filesystem/operations.h
index f48d301d090c..c27e272991d7 100644
--- a/libcxx/include/__filesystem/operations.h
+++ b/libcxx/include/__filesystem/operations.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_OPERATIONS_H
-#define _LIBCPP___FILESYSTEM_OPERATIONS_H
+#ifndef _LIBCUDACXX___FILESYSTEM_OPERATIONS_H
+#define _LIBCUDACXX___FILESYSTEM_OPERATIONS_H
 
 #include <__availability>
 #include <__chrono/time_point.h>
@@ -24,128 +24,128 @@
 #include <cstdint>
 #include <system_error>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
-
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
-
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
-
-_LIBCPP_FUNC_VIS path __absolute(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __canonical(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __copy_file(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __copy_symlink(const path& __existing_symlink, const path& __new_symlink, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __copy(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __create_directories(const path&, error_code* = nullptr);
-_LIBCPP_FUNC_VIS void __create_directory_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __create_directory(const path&, error_code* = nullptr);
-_LIBCPP_FUNC_VIS bool __create_directory(const path&, const path& __attributes, error_code* = nullptr);
-_LIBCPP_FUNC_VIS void __create_hard_link(const path& __to, const path& __new_hard_link, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __create_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __current_path(error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __current_path(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __equivalent(const path&, const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS file_status __status(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS uintmax_t __file_size(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS uintmax_t __hard_link_count(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS file_status __symlink_status(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS file_time_type __last_write_time(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __last_write_time(const path&, file_time_type __new_time, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __weakly_canonical(path const& __p, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS path __read_symlink(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS uintmax_t __remove_all(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS bool __remove(const path&, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __rename(const path& __from, const path& __to, error_code* __ec = nullptr);
-_LIBCPP_FUNC_VIS void __resize_file(const path&, uintmax_t __size, error_code* = nullptr);
-_LIBCPP_FUNC_VIS path __temp_directory_path(error_code* __ec = nullptr);
-
-inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p) { return __absolute(__p); }
-inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p, error_code& __ec) { return __absolute(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI path canonical(const path& __p)                   { return __canonical(__p); }
-inline _LIBCPP_HIDE_FROM_ABI path canonical(const path& __p, error_code& __ec) { return __canonical(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to) { return __copy_file(__from, __to, copy_options::none); }
-inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, error_code& __ec) { return __copy_file(__from, __to, copy_options::none, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, copy_options __opt) { return __copy_file(__from, __to, __opt); }
-inline _LIBCPP_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, copy_options __opt, error_code& __ec) { return __copy_file(__from, __to, __opt, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void copy_symlink(const path& __from, const path& __to) { __copy_symlink(__from, __to); }
-inline _LIBCPP_HIDE_FROM_ABI void copy_symlink(const path& __from, const path& __to, error_code& __ec) noexcept { __copy_symlink(__from, __to, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to) { __copy(__from, __to, copy_options::none); }
-inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, error_code& __ec) { __copy(__from, __to, copy_options::none, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, copy_options __opt) { __copy(__from, __to, __opt); }
-inline _LIBCPP_HIDE_FROM_ABI void copy(const path& __from, const path& __to, copy_options __opt, error_code& __ec) { __copy(__from, __to, __opt, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI bool create_directories(const path& __p) { return __create_directories(__p); }
-inline _LIBCPP_HIDE_FROM_ABI bool create_directories(const path& __p, error_code& __ec) { return __create_directories(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void create_directory_symlink(const path& __target, const path& __link) { __create_directory_symlink(__target, __link); }
-inline _LIBCPP_HIDE_FROM_ABI void create_directory_symlink(const path& __target, const path& __link, error_code& __ec) noexcept { __create_directory_symlink(__target, __link, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p) { return __create_directory(__p); }
-inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, error_code& __ec) noexcept { return __create_directory(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, const path& __attrs) { return __create_directory(__p, __attrs); }
-inline _LIBCPP_HIDE_FROM_ABI bool create_directory(const path& __p, const path& __attrs, error_code& __ec) noexcept { return __create_directory(__p, __attrs, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void create_hard_link(const path& __target, const path& __link) { __create_hard_link(__target, __link); }
-inline _LIBCPP_HIDE_FROM_ABI void create_hard_link(const path& __target, const path& __link, error_code& __ec) noexcept { __create_hard_link(__target, __link, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void create_symlink(const path& __target, const path& __link) { __create_symlink(__target, __link); }
-inline _LIBCPP_HIDE_FROM_ABI void create_symlink(const path& __target, const path& __link, error_code& __ec) noexcept { return __create_symlink(__target, __link, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI path current_path() { return __current_path(); }
-inline _LIBCPP_HIDE_FROM_ABI path current_path(error_code& __ec) { return __current_path(&__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void current_path(const path& __p) { __current_path(__p); }
-inline _LIBCPP_HIDE_FROM_ABI void current_path(const path& __p, error_code& __ec) noexcept { __current_path(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI bool equivalent(const path& __p1, const path& __p2) { return __equivalent(__p1, __p2); }
-inline _LIBCPP_HIDE_FROM_ABI bool equivalent(const path& __p1, const path& __p2, error_code& __ec) noexcept { return __equivalent(__p1, __p2, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI bool status_known(file_status __s) noexcept { return __s.type() != file_type::none; }
-inline _LIBCPP_HIDE_FROM_ABI bool exists(file_status __s) noexcept { return status_known(__s) && __s.type() != file_type::not_found; }
-inline _LIBCPP_HIDE_FROM_ABI bool exists(const path& __p) { return exists(__status(__p)); }
-
-inline _LIBCPP_INLINE_VISIBILITY bool exists(const path& __p, error_code& __ec) noexcept {
+#ifndef _LIBCUDACXX_CXX03_LANG
+
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
+
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
+
+_LIBCUDACXX_FUNC_VIS path __absolute(const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS path __canonical(const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS bool __copy_file(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS void __copy_symlink(const path& __existing_symlink, const path& __new_symlink, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS void __copy(const path& __from, const path& __to, copy_options __opt, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS bool __create_directories(const path&, error_code* = nullptr);
+_LIBCUDACXX_FUNC_VIS void __create_directory_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS bool __create_directory(const path&, error_code* = nullptr);
+_LIBCUDACXX_FUNC_VIS bool __create_directory(const path&, const path& __attributes, error_code* = nullptr);
+_LIBCUDACXX_FUNC_VIS void __create_hard_link(const path& __to, const path& __new_hard_link, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS void __create_symlink(const path& __to, const path& __new_symlink, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS path __current_path(error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS void __current_path(const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS bool __equivalent(const path&, const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS file_status __status(const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS uintmax_t __file_size(const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS uintmax_t __hard_link_count(const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS file_status __symlink_status(const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS file_time_type __last_write_time(const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS void __last_write_time(const path&, file_time_type __new_time, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS path __weakly_canonical(path const& __p, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS path __read_symlink(const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS uintmax_t __remove_all(const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS bool __remove(const path&, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS void __rename(const path& __from, const path& __to, error_code* __ec = nullptr);
+_LIBCUDACXX_FUNC_VIS void __resize_file(const path&, uintmax_t __size, error_code* = nullptr);
+_LIBCUDACXX_FUNC_VIS path __temp_directory_path(error_code* __ec = nullptr);
+
+inline _LIBCUDACXX_HIDE_FROM_ABI path absolute(const path& __p) { return __absolute(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path absolute(const path& __p, error_code& __ec) { return __absolute(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path canonical(const path& __p)                   { return __canonical(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path canonical(const path& __p, error_code& __ec) { return __canonical(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to) { return __copy_file(__from, __to, copy_options::none); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, error_code& __ec) { return __copy_file(__from, __to, copy_options::none, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, copy_options __opt) { return __copy_file(__from, __to, __opt); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool copy_file(const path& __from, const path& __to, copy_options __opt, error_code& __ec) { return __copy_file(__from, __to, __opt, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void copy_symlink(const path& __from, const path& __to) { __copy_symlink(__from, __to); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void copy_symlink(const path& __from, const path& __to, error_code& __ec) noexcept { __copy_symlink(__from, __to, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void copy(const path& __from, const path& __to) { __copy(__from, __to, copy_options::none); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void copy(const path& __from, const path& __to, error_code& __ec) { __copy(__from, __to, copy_options::none, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void copy(const path& __from, const path& __to, copy_options __opt) { __copy(__from, __to, __opt); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void copy(const path& __from, const path& __to, copy_options __opt, error_code& __ec) { __copy(__from, __to, __opt, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool create_directories(const path& __p) { return __create_directories(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool create_directories(const path& __p, error_code& __ec) { return __create_directories(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void create_directory_symlink(const path& __target, const path& __link) { __create_directory_symlink(__target, __link); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void create_directory_symlink(const path& __target, const path& __link, error_code& __ec) noexcept { __create_directory_symlink(__target, __link, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool create_directory(const path& __p) { return __create_directory(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool create_directory(const path& __p, error_code& __ec) noexcept { return __create_directory(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool create_directory(const path& __p, const path& __attrs) { return __create_directory(__p, __attrs); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool create_directory(const path& __p, const path& __attrs, error_code& __ec) noexcept { return __create_directory(__p, __attrs, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void create_hard_link(const path& __target, const path& __link) { __create_hard_link(__target, __link); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void create_hard_link(const path& __target, const path& __link, error_code& __ec) noexcept { __create_hard_link(__target, __link, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void create_symlink(const path& __target, const path& __link) { __create_symlink(__target, __link); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void create_symlink(const path& __target, const path& __link, error_code& __ec) noexcept { return __create_symlink(__target, __link, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path current_path() { return __current_path(); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path current_path(error_code& __ec) { return __current_path(&__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void current_path(const path& __p) { __current_path(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void current_path(const path& __p, error_code& __ec) noexcept { __current_path(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool equivalent(const path& __p1, const path& __p2) { return __equivalent(__p1, __p2); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool equivalent(const path& __p1, const path& __p2, error_code& __ec) noexcept { return __equivalent(__p1, __p2, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool status_known(file_status __s) noexcept { return __s.type() != file_type::none; }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool exists(file_status __s) noexcept { return status_known(__s) && __s.type() != file_type::not_found; }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool exists(const path& __p) { return exists(__status(__p)); }
+
+inline _LIBCUDACXX_INLINE_VISIBILITY bool exists(const path& __p, error_code& __ec) noexcept {
   auto __s = __status(__p, &__ec);
   if (status_known(__s))
     __ec.clear();
   return exists(__s);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI uintmax_t file_size(const path& __p) { return __file_size(__p); }
-inline _LIBCPP_HIDE_FROM_ABI uintmax_t file_size(const path& __p, error_code& __ec) noexcept { return __file_size(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count(const path& __p) { return __hard_link_count(__p); }
-inline _LIBCPP_HIDE_FROM_ABI uintmax_t hard_link_count(const path& __p, error_code& __ec) noexcept { return __hard_link_count(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(file_status __s) noexcept { return __s.type() == file_type::block; }
-inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(const path& __p) { return is_block_file(__status(__p)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_block_file(const path& __p, error_code& __ec) noexcept { return is_block_file(__status(__p, &__ec)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(file_status __s) noexcept { return __s.type() == file_type::character; }
-inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(const path& __p) { return is_character_file(__status(__p)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_character_file(const path& __p, error_code& __ec) noexcept { return is_character_file(__status(__p, &__ec)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_directory(file_status __s) noexcept { return __s.type() == file_type::directory; }
-inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p) { return is_directory(__status(__p)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_directory(const path& __p, error_code& __ec) noexcept { return is_directory(__status(__p, &__ec)); }
-_LIBCPP_FUNC_VIS bool __fs_is_empty(const path& __p, error_code* __ec = nullptr);
-inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p) { return __fs_is_empty(__p); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_empty(const path& __p, error_code& __ec) { return __fs_is_empty(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(file_status __s) noexcept { return __s.type() == file_type::fifo; }
-inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(const path& __p) { return is_fifo(__status(__p)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_fifo(const path& __p, error_code& __ec) noexcept { return is_fifo(__status(__p, &__ec)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(file_status __s) noexcept { return __s.type() == file_type::regular; }
-inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(const path& __p) { return is_regular_file(__status(__p)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_regular_file(const path& __p, error_code& __ec) noexcept { return is_regular_file(__status(__p, &__ec)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(file_status __s) noexcept { return __s.type() == file_type::symlink; }
-inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(const path& __p) { return is_symlink(__symlink_status(__p)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_symlink(const path& __p, error_code& __ec) noexcept { return is_symlink(__symlink_status(__p, &__ec)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_other(file_status __s) noexcept { return exists(__s) && !is_regular_file(__s) && !is_directory(__s) && !is_symlink(__s); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_other(const path& __p) { return is_other(__status(__p)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_other(const path& __p, error_code& __ec) noexcept { return is_other(__status(__p, &__ec)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_socket(file_status __s) noexcept { return __s.type() == file_type::socket; }
-inline _LIBCPP_HIDE_FROM_ABI bool is_socket(const path& __p) { return is_socket(__status(__p)); }
-inline _LIBCPP_HIDE_FROM_ABI bool is_socket(const path& __p, error_code& __ec) noexcept { return is_socket(__status(__p, &__ec)); }
-inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p) { return __last_write_time(__p); }
-inline _LIBCPP_HIDE_FROM_ABI file_time_type last_write_time(const path& __p, error_code& __ec) noexcept { return __last_write_time(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t) { __last_write_time(__p, __t); }
-inline _LIBCPP_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t, error_code& __ec) noexcept { __last_write_time(__p, __t, &__ec); }
-_LIBCPP_FUNC_VIS void __permissions(const path&, perms, perm_options, error_code* = nullptr);
-inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts = perm_options::replace) { __permissions(__p, __prms, __opts); }
-inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, error_code& __ec) noexcept { __permissions(__p, __prms, perm_options::replace, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts, error_code& __ec) { __permissions(__p, __prms, __opts, &__ec); }
-
-inline _LIBCPP_INLINE_VISIBILITY path proximate(const path& __p, const path& __base, error_code& __ec) {
+inline _LIBCUDACXX_HIDE_FROM_ABI uintmax_t file_size(const path& __p) { return __file_size(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI uintmax_t file_size(const path& __p, error_code& __ec) noexcept { return __file_size(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI uintmax_t hard_link_count(const path& __p) { return __hard_link_count(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI uintmax_t hard_link_count(const path& __p, error_code& __ec) noexcept { return __hard_link_count(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_block_file(file_status __s) noexcept { return __s.type() == file_type::block; }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_block_file(const path& __p) { return is_block_file(__status(__p)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_block_file(const path& __p, error_code& __ec) noexcept { return is_block_file(__status(__p, &__ec)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_character_file(file_status __s) noexcept { return __s.type() == file_type::character; }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_character_file(const path& __p) { return is_character_file(__status(__p)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_character_file(const path& __p, error_code& __ec) noexcept { return is_character_file(__status(__p, &__ec)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_directory(file_status __s) noexcept { return __s.type() == file_type::directory; }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_directory(const path& __p) { return is_directory(__status(__p)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_directory(const path& __p, error_code& __ec) noexcept { return is_directory(__status(__p, &__ec)); }
+_LIBCUDACXX_FUNC_VIS bool __fs_is_empty(const path& __p, error_code* __ec = nullptr);
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_empty(const path& __p) { return __fs_is_empty(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_empty(const path& __p, error_code& __ec) { return __fs_is_empty(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_fifo(file_status __s) noexcept { return __s.type() == file_type::fifo; }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_fifo(const path& __p) { return is_fifo(__status(__p)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_fifo(const path& __p, error_code& __ec) noexcept { return is_fifo(__status(__p, &__ec)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_regular_file(file_status __s) noexcept { return __s.type() == file_type::regular; }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_regular_file(const path& __p) { return is_regular_file(__status(__p)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_regular_file(const path& __p, error_code& __ec) noexcept { return is_regular_file(__status(__p, &__ec)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_symlink(file_status __s) noexcept { return __s.type() == file_type::symlink; }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_symlink(const path& __p) { return is_symlink(__symlink_status(__p)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_symlink(const path& __p, error_code& __ec) noexcept { return is_symlink(__symlink_status(__p, &__ec)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_other(file_status __s) noexcept { return exists(__s) && !is_regular_file(__s) && !is_directory(__s) && !is_symlink(__s); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_other(const path& __p) { return is_other(__status(__p)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_other(const path& __p, error_code& __ec) noexcept { return is_other(__status(__p, &__ec)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_socket(file_status __s) noexcept { return __s.type() == file_type::socket; }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_socket(const path& __p) { return is_socket(__status(__p)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool is_socket(const path& __p, error_code& __ec) noexcept { return is_socket(__status(__p, &__ec)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI file_time_type last_write_time(const path& __p) { return __last_write_time(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI file_time_type last_write_time(const path& __p, error_code& __ec) noexcept { return __last_write_time(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t) { __last_write_time(__p, __t); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void last_write_time(const path& __p, file_time_type __t, error_code& __ec) noexcept { __last_write_time(__p, __t, &__ec); }
+_LIBCUDACXX_FUNC_VIS void __permissions(const path&, perms, perm_options, error_code* = nullptr);
+inline _LIBCUDACXX_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts = perm_options::replace) { __permissions(__p, __prms, __opts); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, error_code& __ec) noexcept { __permissions(__p, __prms, perm_options::replace, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void permissions(const path& __p, perms __prms, perm_options __opts, error_code& __ec) { __permissions(__p, __prms, __opts, &__ec); }
+
+inline _LIBCUDACXX_INLINE_VISIBILITY path proximate(const path& __p, const path& __base, error_code& __ec) {
   path __tmp = __weakly_canonical(__p, &__ec);
   if (__ec)
     return {};
@@ -155,12 +155,12 @@ inline _LIBCPP_INLINE_VISIBILITY path proximate(const path& __p, const path& __b
   return __tmp.lexically_proximate(__tmp_base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI path proximate(const path& __p, error_code& __ec) { return proximate(__p, current_path(), __ec); }
-inline _LIBCPP_HIDE_FROM_ABI path proximate(const path& __p, const path& __base = current_path()) { return __weakly_canonical(__p).lexically_proximate(__weakly_canonical(__base)); }
-inline _LIBCPP_HIDE_FROM_ABI path read_symlink(const path& __p) { return __read_symlink(__p); }
-inline _LIBCPP_HIDE_FROM_ABI path read_symlink(const path& __p, error_code& __ec) { return __read_symlink(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path proximate(const path& __p, error_code& __ec) { return proximate(__p, current_path(), __ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path proximate(const path& __p, const path& __base = current_path()) { return __weakly_canonical(__p).lexically_proximate(__weakly_canonical(__base)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path read_symlink(const path& __p) { return __read_symlink(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path read_symlink(const path& __p, error_code& __ec) { return __read_symlink(__p, &__ec); }
 
-inline _LIBCPP_INLINE_VISIBILITY path relative(const path& __p, const path& __base, error_code& __ec) {
+inline _LIBCUDACXX_INLINE_VISIBILITY path relative(const path& __p, const path& __base, error_code& __ec) {
   path __tmp = __weakly_canonical(__p, &__ec);
   if (__ec)
     return path();
@@ -170,32 +170,32 @@ inline _LIBCPP_INLINE_VISIBILITY path relative(const path& __p, const path& __ba
   return __tmp.lexically_relative(__tmpbase);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI path relative(const path& __p, error_code& __ec) { return relative(__p, current_path(), __ec); }
-inline _LIBCPP_HIDE_FROM_ABI path relative(const path& __p, const path& __base = current_path()) { return __weakly_canonical(__p).lexically_relative(__weakly_canonical(__base)); }
-inline _LIBCPP_HIDE_FROM_ABI uintmax_t remove_all(const path& __p) { return __remove_all(__p); }
-inline _LIBCPP_HIDE_FROM_ABI uintmax_t remove_all(const path& __p, error_code& __ec) { return __remove_all(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI bool remove(const path& __p) { return __remove(__p); }
-inline _LIBCPP_HIDE_FROM_ABI bool remove(const path& __p, error_code& __ec) noexcept { return __remove(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to) { return __rename(__from, __to); }
-inline _LIBCPP_HIDE_FROM_ABI void rename(const path& __from, const path& __to, error_code& __ec) noexcept { return __rename(__from, __to, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns) { return __resize_file(__p, __ns); }
-inline _LIBCPP_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns, error_code& __ec) noexcept { return __resize_file(__p, __ns, &__ec); }
-_LIBCPP_FUNC_VIS space_info __space(const path&, error_code* __ec = nullptr);
-inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p) { return __space(__p); }
-inline _LIBCPP_HIDE_FROM_ABI space_info space(const path& __p, error_code& __ec) noexcept { return __space(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI file_status status(const path& __p) { return __status(__p); }
-inline _LIBCPP_HIDE_FROM_ABI file_status status(const path& __p, error_code& __ec) noexcept { return __status(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI file_status symlink_status(const path& __p) { return __symlink_status(__p); }
-inline _LIBCPP_HIDE_FROM_ABI file_status symlink_status(const path& __p, error_code& __ec) noexcept { return __symlink_status(__p, &__ec); }
-inline _LIBCPP_HIDE_FROM_ABI path temp_directory_path() { return __temp_directory_path(); }
-inline _LIBCPP_HIDE_FROM_ABI path temp_directory_path(error_code& __ec) { return __temp_directory_path(&__ec); }
-inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p) { return __weakly_canonical(__p); }
-inline _LIBCPP_HIDE_FROM_ABI path weakly_canonical(path const& __p, error_code& __ec) { return __weakly_canonical(__p, &__ec); }
-
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
-
-_LIBCPP_END_NAMESPACE_FILESYSTEM
-
-#endif // _LIBCPP_CXX03_LANG
-
-#endif // _LIBCPP___FILESYSTEM_OPERATIONS_H
+inline _LIBCUDACXX_HIDE_FROM_ABI path relative(const path& __p, error_code& __ec) { return relative(__p, current_path(), __ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path relative(const path& __p, const path& __base = current_path()) { return __weakly_canonical(__p).lexically_relative(__weakly_canonical(__base)); }
+inline _LIBCUDACXX_HIDE_FROM_ABI uintmax_t remove_all(const path& __p) { return __remove_all(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI uintmax_t remove_all(const path& __p, error_code& __ec) { return __remove_all(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool remove(const path& __p) { return __remove(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI bool remove(const path& __p, error_code& __ec) noexcept { return __remove(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void rename(const path& __from, const path& __to) { return __rename(__from, __to); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void rename(const path& __from, const path& __to, error_code& __ec) noexcept { return __rename(__from, __to, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns) { return __resize_file(__p, __ns); }
+inline _LIBCUDACXX_HIDE_FROM_ABI void resize_file(const path& __p, uintmax_t __ns, error_code& __ec) noexcept { return __resize_file(__p, __ns, &__ec); }
+_LIBCUDACXX_FUNC_VIS space_info __space(const path&, error_code* __ec = nullptr);
+inline _LIBCUDACXX_HIDE_FROM_ABI space_info space(const path& __p) { return __space(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI space_info space(const path& __p, error_code& __ec) noexcept { return __space(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI file_status status(const path& __p) { return __status(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI file_status status(const path& __p, error_code& __ec) noexcept { return __status(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI file_status symlink_status(const path& __p) { return __symlink_status(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI file_status symlink_status(const path& __p, error_code& __ec) noexcept { return __symlink_status(__p, &__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path temp_directory_path() { return __temp_directory_path(); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path temp_directory_path(error_code& __ec) { return __temp_directory_path(&__ec); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path weakly_canonical(path const& __p) { return __weakly_canonical(__p); }
+inline _LIBCUDACXX_HIDE_FROM_ABI path weakly_canonical(path const& __p, error_code& __ec) { return __weakly_canonical(__p, &__ec); }
+
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
+
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
+
+#endif // _LIBCUDACXX_CXX03_LANG
+
+#endif // _LIBCUDACXX___FILESYSTEM_OPERATIONS_H

diff  --git a/libcxx/include/__filesystem/path.h b/libcxx/include/__filesystem/path.h
index 8fafd72c7e4f..5e29b613774f 100644
--- a/libcxx/include/__filesystem/path.h
+++ b/libcxx/include/__filesystem/path.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_PATH_H
-#define _LIBCPP___FILESYSTEM_PATH_H
+#ifndef _LIBCUDACXX___FILESYSTEM_PATH_H
+#define _LIBCUDACXX___FILESYSTEM_PATH_H
 
 #include <__algorithm/replace.h>
 #include <__algorithm/replace_copy.h>
@@ -21,20 +21,20 @@
 #include <string_view>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 # include <iomanip> // for quoted
 # include <locale>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
 template <class _Tp>
 struct __can_convert_char {
@@ -52,7 +52,7 @@ struct __can_convert_char<wchar_t> {
   static const bool value = true;
   using __char_type = wchar_t;
 };
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 template <>
 struct __can_convert_char<char8_t> {
   static const bool value = true;
@@ -71,17 +71,17 @@ struct __can_convert_char<char32_t> {
 };
 
 template <class _ECharT>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 typename enable_if<__can_convert_char<_ECharT>::value, bool>::type
 __is_separator(_ECharT __e) {
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
   return __e == _ECharT('/') || __e == _ECharT('\\');
 #else
   return __e == _ECharT('/');
 #endif
 }
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 typedef u8string __u8_string;
 #else
 typedef string __u8_string;
@@ -103,15 +103,15 @@ struct __is_pathable_string<
   using _Str = basic_string<_ECharT, _Traits, _Alloc>;
   using _Base = __can_convert_char<_ECharT>;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _ECharT const* __range_begin(_Str const& __s) { return __s.data(); }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _ECharT const* __range_end(_Str const& __s) {
     return __s.data() + __s.length();
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _ECharT __first_or_null(_Str const& __s) {
     return __s.empty() ? _ECharT{} : __s[0];
   }
@@ -125,15 +125,15 @@ struct __is_pathable_string<
   using _Str = basic_string_view<_ECharT, _Traits>;
   using _Base = __can_convert_char<_ECharT>;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _ECharT const* __range_begin(_Str const& __s) { return __s.data(); }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _ECharT const* __range_end(_Str const& __s) {
     return __s.data() + __s.length();
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _ECharT __first_or_null(_Str const& __s) {
     return __s.empty() ? _ECharT{} : __s[0];
   }
@@ -151,10 +151,10 @@ struct __is_pathable_char_array<_Source, _ECharT*, _UPtr, true>
     : __can_convert_char<typename remove_const<_ECharT>::type> {
   using _Base = __can_convert_char<typename remove_const<_ECharT>::type>;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _ECharT const* __range_begin(const _ECharT* __b) { return __b; }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _ECharT const* __range_end(const _ECharT* __b) {
     using _Iter = const _ECharT*;
     const _ECharT __sentinel = _ECharT{};
@@ -164,7 +164,7 @@ struct __is_pathable_char_array<_Source, _ECharT*, _UPtr, true>
     return __e;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _ECharT __first_or_null(const _ECharT* __b) { return *__b; }
 };
 
@@ -181,13 +181,13 @@ struct __is_pathable_iter<
   using _ECharT = typename iterator_traits<_Iter>::value_type;
   using _Base = __can_convert_char<_ECharT>;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _Iter __range_begin(_Iter __b) { return __b; }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _NullSentinel __range_end(_Iter) { return _NullSentinel{}; }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static _ECharT __first_or_null(_Iter __b) { return *__b; }
 };
 
@@ -208,7 +208,7 @@ struct __is_pathable<_Tp, false, true, false> : __is_pathable_char_array<_Tp> {
 template <class _Tp>
 struct __is_pathable<_Tp, false, false, true> : __is_pathable_iter<_Tp> {};
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 typedef wstring __path_string;
 typedef wchar_t __path_value;
 #else
@@ -216,31 +216,31 @@ typedef string __path_string;
 typedef char __path_value;
 #endif
 
-#if defined(_LIBCPP_WIN32API)
-_LIBCPP_FUNC_VIS
+#if defined(_LIBCUDACXX_WIN32API)
+_LIBCUDACXX_FUNC_VIS
 size_t __wide_to_char(const wstring&, char*, size_t);
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 size_t __char_to_wide(const string&, wchar_t*, size_t);
 #endif
 
 template <class _ECharT>
 struct _PathCVT;
 
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 template <class _ECharT>
 struct _PathCVT {
   static_assert(__can_convert_char<_ECharT>::value,
                 "Char type not convertible");
 
   typedef __narrow_to_utf8<sizeof(_ECharT) * __CHAR_BIT__> _Narrower;
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
   typedef __widen_from_utf8<sizeof(wchar_t) * __CHAR_BIT__> _Widener;
 #endif
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append_range(__path_string& __dest, _ECharT const* __b,
                              _ECharT const* __e) {
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
     string __utf8;
     _Narrower()(back_inserter(__utf8), __b, __e);
     _Widener()(back_inserter(__dest), __utf8.data(), __utf8.data() + __utf8.size());
@@ -250,13 +250,13 @@ struct _PathCVT {
   }
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append_range(__path_string& __dest, _Iter __b, _Iter __e) {
     static_assert(!is_same<_Iter, _ECharT*>::value, "Call const overload");
     if (__b == __e)
       return;
     basic_string<_ECharT> __tmp(__b, __e);
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
     string __utf8;
     _Narrower()(back_inserter(__utf8), __tmp.data(),
                 __tmp.data() + __tmp.length());
@@ -268,7 +268,7 @@ struct _PathCVT {
   }
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append_range(__path_string& __dest, _Iter __b, _NullSentinel) {
     static_assert(!is_same<_Iter, _ECharT*>::value, "Call const overload");
     const _ECharT __sentinel = _ECharT{};
@@ -277,7 +277,7 @@ struct _PathCVT {
     basic_string<_ECharT> __tmp;
     for (; *__b != __sentinel; ++__b)
       __tmp.push_back(*__b);
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
     string __utf8;
     _Narrower()(back_inserter(__utf8), __tmp.data(),
                 __tmp.data() + __tmp.length());
@@ -289,20 +289,20 @@ struct _PathCVT {
   }
 
   template <class _Source>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append_source(__path_string& __dest, _Source const& __s) {
     using _Traits = __is_pathable<_Source>;
     __append_range(__dest, _Traits::__range_begin(__s),
                    _Traits::__range_end(__s));
   }
 };
-#endif // !_LIBCPP_HAS_NO_LOCALIZATION
+#endif // !_LIBCUDACXX_HAS_NO_LOCALIZATION
 
 template <>
 struct _PathCVT<__path_value> {
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static typename enable_if<__is_exactly_cpp17_input_iterator<_Iter>::value>::type
   __append_range(__path_string& __dest, _Iter __b, _Iter __e) {
     for (; __b != __e; ++__b)
@@ -310,14 +310,14 @@ struct _PathCVT<__path_value> {
   }
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static typename enable_if<__is_cpp17_forward_iterator<_Iter>::value>::type
   __append_range(__path_string& __dest, _Iter __b, _Iter __e) {
     __dest.append(__b, __e);
   }
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append_range(__path_string& __dest, _Iter __b, _NullSentinel) {
     const char __sentinel = char{};
     for (; *__b != __sentinel; ++__b)
@@ -325,7 +325,7 @@ struct _PathCVT<__path_value> {
   }
 
   template <class _Source>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append_source(__path_string& __dest, _Source const& __s) {
     using _Traits = __is_pathable<_Source>;
     __append_range(__dest, _Traits::__range_begin(__s),
@@ -333,11 +333,11 @@ struct _PathCVT<__path_value> {
   }
 };
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 template <>
 struct _PathCVT<char> {
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void
   __append_string(__path_string& __dest, const basic_string<char> &__str) {
       size_t __size = __char_to_wide(__str, nullptr, 0);
@@ -347,7 +347,7 @@ struct _PathCVT<char> {
   }
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static typename enable_if<__is_exactly_cpp17_input_iterator<_Iter>::value>::type
   __append_range(__path_string& __dest, _Iter __b, _Iter __e) {
     basic_string<char> __tmp(__b, __e);
@@ -355,7 +355,7 @@ struct _PathCVT<char> {
   }
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static typename enable_if<__is_cpp17_forward_iterator<_Iter>::value>::type
   __append_range(__path_string& __dest, _Iter __b, _Iter __e) {
     basic_string<char> __tmp(__b, __e);
@@ -363,7 +363,7 @@ struct _PathCVT<char> {
   }
 
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append_range(__path_string& __dest, _Iter __b, _NullSentinel) {
     const char __sentinel = char{};
     basic_string<char> __tmp;
@@ -373,7 +373,7 @@ struct _PathCVT<char> {
   }
 
   template <class _Source>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append_source(__path_string& __dest, _Source const& __s) {
     using _Traits = __is_pathable<_Source>;
     __append_range(__dest, _Traits::__range_begin(__s),
@@ -387,7 +387,7 @@ struct _PathExport {
   typedef __widen_from_utf8<sizeof(_ECharT) * __CHAR_BIT__> _Widener;
 
   template <class _Str>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append(_Str& __dest, const __path_string& __src) {
     string __utf8;
     _Narrower()(back_inserter(__utf8), __src.data(), __src.data() + __src.size());
@@ -398,7 +398,7 @@ struct _PathExport {
 template <>
 struct _PathExport<char> {
   template <class _Str>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append(_Str& __dest, const __path_string& __src) {
     size_t __size = __wide_to_char(__src, nullptr, 0);
     size_t __pos = __dest.size();
@@ -410,7 +410,7 @@ struct _PathExport<char> {
 template <>
 struct _PathExport<wchar_t> {
   template <class _Str>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append(_Str& __dest, const __path_string& __src) {
     __dest.append(__src.begin(), __src.end());
   }
@@ -419,27 +419,27 @@ struct _PathExport<wchar_t> {
 template <>
 struct _PathExport<char16_t> {
   template <class _Str>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append(_Str& __dest, const __path_string& __src) {
     __dest.append(__src.begin(), __src.end());
   }
 };
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 template <>
 struct _PathExport<char8_t> {
   typedef __narrow_to_utf8<sizeof(wchar_t) * __CHAR_BIT__> _Narrower;
 
   template <class _Str>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static void __append(_Str& __dest, const __path_string& __src) {
     _Narrower()(back_inserter(__dest), __src.data(), __src.data() + __src.size());
   }
 };
-#endif /* !_LIBCPP_HAS_NO_CHAR8_T */
-#endif /* _LIBCPP_WIN32API */
+#endif /* !_LIBCUDACXX_HAS_NO_CHAR8_T */
+#endif /* _LIBCUDACXX_WIN32API */
 
-class _LIBCPP_TYPE_VIS path {
+class _LIBCUDACXX_TYPE_VIS path {
   template <class _SourceOrIter, class _Tp = path&>
   using _EnableIfPathable =
       typename enable_if<__is_pathable<_SourceOrIter>::value, _Tp>::type;
@@ -451,7 +451,7 @@ class _LIBCPP_TYPE_VIS path {
   using _SourceCVT = _PathCVT<_SourceChar<_Tp> >;
 
 public:
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
   typedef wchar_t value_type;
   static constexpr value_type preferred_separator = L'\\';
 #else
@@ -461,37 +461,37 @@ class _LIBCPP_TYPE_VIS path {
   typedef basic_string<value_type> string_type;
   typedef basic_string_view<value_type> __string_view;
 
-  enum _LIBCPP_ENUM_VIS format : unsigned char {
+  enum _LIBCUDACXX_ENUM_VIS format : unsigned char {
     auto_format,
     native_format,
     generic_format
   };
 
   // constructors and destructor
-  _LIBCPP_HIDE_FROM_ABI path() noexcept {}
-  _LIBCPP_HIDE_FROM_ABI path(const path& __p) : __pn_(__p.__pn_) {}
-  _LIBCPP_HIDE_FROM_ABI path(path&& __p) noexcept
-      : __pn_(_VSTD::move(__p.__pn_)) {}
+  _LIBCUDACXX_HIDE_FROM_ABI path() noexcept {}
+  _LIBCUDACXX_HIDE_FROM_ABI path(const path& __p) : __pn_(__p.__pn_) {}
+  _LIBCUDACXX_HIDE_FROM_ABI path(path&& __p) noexcept
+      : __pn_(_CUDA_VSTD::move(__p.__pn_)) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path(string_type&& __s, format = format::auto_format) noexcept
-      : __pn_(_VSTD::move(__s)) {}
+      : __pn_(_CUDA_VSTD::move(__s)) {}
 
   template <class _Source, class = _EnableIfPathable<_Source, void> >
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path(const _Source& __src, format = format::auto_format) {
     _SourceCVT<_Source>::__append_source(__pn_, __src);
   }
 
   template <class _InputIt>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path(_InputIt __first, _InputIt __last, format = format::auto_format) {
     typedef typename iterator_traits<_InputIt>::value_type _ItVal;
     _PathCVT<_ItVal>::__append_range(__pn_, __first, __last);
   }
 
 /*
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
   // TODO Implement locale conversions.
   template <class _Source, class = _EnableIfPathable<_Source, void> >
   path(const _Source& __src, const locale& __loc, format = format::auto_format);
@@ -501,42 +501,42 @@ class _LIBCPP_TYPE_VIS path {
 #endif
 */
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   ~path() = default;
 
   // assignments
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& operator=(const path& __p) {
     __pn_ = __p.__pn_;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& operator=(path&& __p) noexcept {
-    __pn_ = _VSTD::move(__p.__pn_);
+    __pn_ = _CUDA_VSTD::move(__p.__pn_);
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& operator=(string_type&& __s) noexcept {
-    __pn_ = _VSTD::move(__s);
+    __pn_ = _CUDA_VSTD::move(__s);
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& assign(string_type&& __s) noexcept {
-    __pn_ = _VSTD::move(__s);
+    __pn_ = _CUDA_VSTD::move(__s);
     return *this;
   }
 
   template <class _Source>
-  _LIBCPP_HIDE_FROM_ABI _EnableIfPathable<_Source>
+  _LIBCUDACXX_HIDE_FROM_ABI _EnableIfPathable<_Source>
   operator=(const _Source& __src) {
     return this->assign(__src);
   }
 
   template <class _Source>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   _EnableIfPathable<_Source> assign(const _Source& __src) {
     __pn_.clear();
     _SourceCVT<_Source>::__append_source(__pn_, __src);
@@ -544,7 +544,7 @@ class _LIBCPP_TYPE_VIS path {
   }
 
   template <class _InputIt>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& assign(_InputIt __first, _InputIt __last) {
     typedef typename iterator_traits<_InputIt>::value_type _ItVal;
     __pn_.clear();
@@ -554,8 +554,8 @@ class _LIBCPP_TYPE_VIS path {
 
 public:
   // appends
-#if defined(_LIBCPP_WIN32API)
-  _LIBCPP_HIDE_FROM_ABI
+#if defined(_LIBCUDACXX_WIN32API)
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& operator/=(const path& __p) {
     auto __p_root_name = __p.__root_name();
     auto __p_root_name_size = __p_root_name.size();
@@ -576,24 +576,24 @@ class _LIBCPP_TYPE_VIS path {
     return *this;
   }
   template <class _Source>
-  _LIBCPP_INLINE_VISIBILITY _EnableIfPathable<_Source>
+  _LIBCUDACXX_INLINE_VISIBILITY _EnableIfPathable<_Source>
   operator/=(const _Source& __src) {
     return operator/=(path(__src));
   }
 
   template <class _Source>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   _EnableIfPathable<_Source> append(const _Source& __src) {
     return operator/=(path(__src));
   }
 
   template <class _InputIt>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& append(_InputIt __first, _InputIt __last) {
     return operator/=(path(__first, __last));
   }
 #else
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& operator/=(const path& __p) {
     if (__p.is_absolute()) {
       __pn_ = __p.__pn_;
@@ -605,17 +605,17 @@ class _LIBCPP_TYPE_VIS path {
     return *this;
   }
 
-  // FIXME: Use _LIBCPP_DIAGNOSE_WARNING to produce a diagnostic when __src
+  // FIXME: Use _LIBCUDACXX_DIAGNOSE_WARNING to produce a diagnostic when __src
   // is known at compile time to be "/' since the user almost certainly intended
   // to append a separator instead of overwriting the path with "/"
   template <class _Source>
-  _LIBCPP_HIDE_FROM_ABI _EnableIfPathable<_Source>
+  _LIBCUDACXX_HIDE_FROM_ABI _EnableIfPathable<_Source>
   operator/=(const _Source& __src) {
     return this->append(__src);
   }
 
   template <class _Source>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   _EnableIfPathable<_Source> append(const _Source& __src) {
     using _Traits = __is_pathable<_Source>;
     using _CVT = _PathCVT<_SourceChar<_Source> >;
@@ -629,7 +629,7 @@ class _LIBCPP_TYPE_VIS path {
   }
 
   template <class _InputIt>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& append(_InputIt __first, _InputIt __last) {
     typedef typename iterator_traits<_InputIt>::value_type _ItVal;
     static_assert(__can_convert_char<_ItVal>::value, "Must convertible");
@@ -644,38 +644,38 @@ class _LIBCPP_TYPE_VIS path {
 #endif
 
   // concatenation
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& operator+=(const path& __x) {
     __pn_ += __x.__pn_;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& operator+=(const string_type& __x) {
     __pn_ += __x;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& operator+=(__string_view __x) {
     __pn_ += __x;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& operator+=(const value_type* __x) {
     __pn_ += __x;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& operator+=(value_type __x) {
     __pn_ += __x;
     return *this;
   }
 
   template <class _ECharT>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   typename enable_if<__can_convert_char<_ECharT>::value, path&>::type
   operator+=(_ECharT __x) {
     _PathCVT<_ECharT>::__append_source(__pn_,
@@ -684,20 +684,20 @@ class _LIBCPP_TYPE_VIS path {
   }
 
   template <class _Source>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   _EnableIfPathable<_Source> operator+=(const _Source& __x) {
     return this->concat(__x);
   }
 
   template <class _Source>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   _EnableIfPathable<_Source> concat(const _Source& __x) {
     _SourceCVT<_Source>::__append_source(__pn_, __x);
     return *this;
   }
 
   template <class _InputIt>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& concat(_InputIt __first, _InputIt __last) {
     typedef typename iterator_traits<_InputIt>::value_type _ItVal;
     _PathCVT<_ItVal>::__append_range(__pn_, __first, __last);
@@ -705,18 +705,18 @@ class _LIBCPP_TYPE_VIS path {
   }
 
   // modifiers
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   void clear() noexcept { __pn_.clear(); }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& make_preferred() {
-#if defined(_LIBCPP_WIN32API)
-    _VSTD::replace(__pn_.begin(), __pn_.end(), L'/', L'\\');
+#if defined(_LIBCUDACXX_WIN32API)
+    _CUDA_VSTD::replace(__pn_.begin(), __pn_.end(), L'/', L'\\');
 #endif
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& remove_filename() {
     auto __fname = __filename();
     if (!__fname.empty())
@@ -724,7 +724,7 @@ class _LIBCPP_TYPE_VIS path {
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   path& replace_filename(const path& __replacement) {
     remove_filename();
     return (*this /= __replacement);
@@ -732,37 +732,37 @@ class _LIBCPP_TYPE_VIS path {
 
   path& replace_extension(const path& __replacement = path());
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   void swap(path& __rhs) noexcept { __pn_.swap(__rhs.__pn_); }
 
   // private helper to allow reserving memory in the path
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   void __reserve(size_t __s) { __pn_.reserve(__s); }
 
   // native format observers
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   const string_type& native() const noexcept { return __pn_; }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   const value_type* c_str() const noexcept { return __pn_.c_str(); }
 
-  _LIBCPP_HIDE_FROM_ABI operator string_type() const { return __pn_; }
+  _LIBCUDACXX_HIDE_FROM_ABI operator string_type() const { return __pn_; }
 
-#if defined(_LIBCPP_WIN32API)
-  _LIBCPP_HIDE_FROM_ABI _VSTD::wstring wstring() const { return __pn_; }
+#if defined(_LIBCUDACXX_WIN32API)
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::wstring wstring() const { return __pn_; }
 
-  _LIBCPP_HIDE_FROM_ABI
-  _VSTD::wstring generic_wstring() const {
-    _VSTD::wstring __s;
+  _LIBCUDACXX_HIDE_FROM_ABI
+  _CUDA_VSTD::wstring generic_wstring() const {
+    _CUDA_VSTD::wstring __s;
     __s.resize(__pn_.size());
-    _VSTD::replace_copy(__pn_.begin(), __pn_.end(), __s.begin(), '\\', '/');
+    _CUDA_VSTD::replace_copy(__pn_.begin(), __pn_.end(), __s.begin(), '\\', '/');
     return __s;
   }
 
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
   template <class _ECharT, class _Traits = char_traits<_ECharT>,
             class _Allocator = allocator<_ECharT> >
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   basic_string<_ECharT, _Traits, _Allocator>
   string(const _Allocator& __a = _Allocator()) const {
     using _Str = basic_string<_ECharT, _Traits, _Allocator>;
@@ -772,10 +772,10 @@ class _LIBCPP_TYPE_VIS path {
     return __s;
   }
 
-  _LIBCPP_HIDE_FROM_ABI _VSTD::string string() const {
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::string string() const {
     return string<char>();
   }
-  _LIBCPP_HIDE_FROM_ABI __u8_string u8string() const {
+  _LIBCUDACXX_HIDE_FROM_ABI __u8_string u8string() const {
     using _CVT = __narrow_to_utf8<sizeof(wchar_t) * __CHAR_BIT__>;
     __u8_string __s;
     __s.reserve(__pn_.size());
@@ -783,17 +783,17 @@ class _LIBCPP_TYPE_VIS path {
     return __s;
   }
 
-  _LIBCPP_HIDE_FROM_ABI _VSTD::u16string u16string() const {
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::u16string u16string() const {
     return string<char16_t>();
   }
-  _LIBCPP_HIDE_FROM_ABI _VSTD::u32string u32string() const {
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::u32string u32string() const {
     return string<char32_t>();
   }
 
   // generic format observers
   template <class _ECharT, class _Traits = char_traits<_ECharT>,
             class _Allocator = allocator<_ECharT> >
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   basic_string<_ECharT, _Traits, _Allocator>
   generic_string(const _Allocator& __a = _Allocator()) const {
     using _Str = basic_string<_ECharT, _Traits, _Allocator>;
@@ -801,34 +801,34 @@ class _LIBCPP_TYPE_VIS path {
     // Note: This (and generic_u8string below) is slightly suboptimal as
     // it iterates twice over the string; once to convert it to the right
     // character type, and once to replace path delimiters.
-    _VSTD::replace(__s.begin(), __s.end(),
+    _CUDA_VSTD::replace(__s.begin(), __s.end(),
                    static_cast<_ECharT>('\\'), static_cast<_ECharT>('/'));
     return __s;
   }
 
-  _LIBCPP_HIDE_FROM_ABI _VSTD::string generic_string() const { return generic_string<char>(); }
-  _LIBCPP_HIDE_FROM_ABI _VSTD::u16string generic_u16string() const { return generic_string<char16_t>(); }
-  _LIBCPP_HIDE_FROM_ABI _VSTD::u32string generic_u32string() const { return generic_string<char32_t>(); }
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::string generic_string() const { return generic_string<char>(); }
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::u16string generic_u16string() const { return generic_string<char16_t>(); }
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::u32string generic_u32string() const { return generic_string<char32_t>(); }
+  _LIBCUDACXX_HIDE_FROM_ABI
   __u8_string generic_u8string() const {
     __u8_string __s = u8string();
-    _VSTD::replace(__s.begin(), __s.end(), '\\', '/');
+    _CUDA_VSTD::replace(__s.begin(), __s.end(), '\\', '/');
     return __s;
   }
-#endif /* !_LIBCPP_HAS_NO_LOCALIZATION */
-#else /* _LIBCPP_WIN32API */
+#endif /* !_LIBCUDACXX_HAS_NO_LOCALIZATION */
+#else /* _LIBCUDACXX_WIN32API */
 
-  _LIBCPP_HIDE_FROM_ABI _VSTD::string string() const { return __pn_; }
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-  _LIBCPP_HIDE_FROM_ABI _VSTD::u8string u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); }
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::string string() const { return __pn_; }
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::u8string u8string() const { return _CUDA_VSTD::u8string(__pn_.begin(), __pn_.end()); }
 #else
-  _LIBCPP_HIDE_FROM_ABI _VSTD::string u8string() const { return __pn_; }
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::string u8string() const { return __pn_; }
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
   template <class _ECharT, class _Traits = char_traits<_ECharT>,
             class _Allocator = allocator<_ECharT> >
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   basic_string<_ECharT, _Traits, _Allocator>
   string(const _Allocator& __a = _Allocator()) const {
     using _CVT = __widen_from_utf8<sizeof(_ECharT) * __CHAR_BIT__>;
@@ -839,43 +839,43 @@ class _LIBCPP_TYPE_VIS path {
     return __s;
   }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-  _LIBCPP_HIDE_FROM_ABI _VSTD::wstring wstring() const {
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::wstring wstring() const {
     return string<wchar_t>();
   }
 #endif
-  _LIBCPP_HIDE_FROM_ABI _VSTD::u16string u16string() const {
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::u16string u16string() const {
     return string<char16_t>();
   }
-  _LIBCPP_HIDE_FROM_ABI _VSTD::u32string u32string() const {
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::u32string u32string() const {
     return string<char32_t>();
   }
-#endif /* !_LIBCPP_HAS_NO_LOCALIZATION */
+#endif /* !_LIBCUDACXX_HAS_NO_LOCALIZATION */
 
   // generic format observers
-  _LIBCPP_HIDE_FROM_ABI _VSTD::string generic_string() const { return __pn_; }
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-  _LIBCPP_HIDE_FROM_ABI _VSTD::u8string generic_u8string() const { return _VSTD::u8string(__pn_.begin(), __pn_.end()); }
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::string generic_string() const { return __pn_; }
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::u8string generic_u8string() const { return _CUDA_VSTD::u8string(__pn_.begin(), __pn_.end()); }
 #else
-  _LIBCPP_HIDE_FROM_ABI _VSTD::string generic_u8string() const { return __pn_; }
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::string generic_u8string() const { return __pn_; }
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
   template <class _ECharT, class _Traits = char_traits<_ECharT>,
             class _Allocator = allocator<_ECharT> >
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   basic_string<_ECharT, _Traits, _Allocator>
   generic_string(const _Allocator& __a = _Allocator()) const {
     return string<_ECharT, _Traits, _Allocator>(__a);
   }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-  _LIBCPP_HIDE_FROM_ABI _VSTD::wstring generic_wstring() const { return string<wchar_t>(); }
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::wstring generic_wstring() const { return string<wchar_t>(); }
 #endif
-  _LIBCPP_HIDE_FROM_ABI _VSTD::u16string generic_u16string() const { return string<char16_t>(); }
-  _LIBCPP_HIDE_FROM_ABI _VSTD::u32string generic_u32string() const { return string<char32_t>(); }
-#endif /* !_LIBCPP_HAS_NO_LOCALIZATION */
-#endif /* !_LIBCPP_WIN32API */
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::u16string generic_u16string() const { return string<char16_t>(); }
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::u32string generic_u32string() const { return string<char32_t>(); }
+#endif /* !_LIBCUDACXX_HAS_NO_LOCALIZATION */
+#endif /* !_LIBCUDACXX_WIN32API */
 
 private:
   int __compare(__string_view) const;
@@ -890,78 +890,78 @@ class _LIBCPP_TYPE_VIS path {
 
 public:
   // compare
-  _LIBCPP_HIDE_FROM_ABI int compare(const path& __p) const noexcept {
+  _LIBCUDACXX_HIDE_FROM_ABI int compare(const path& __p) const noexcept {
     return __compare(__p.__pn_);
   }
-  _LIBCPP_HIDE_FROM_ABI int compare(const string_type& __s) const {
+  _LIBCUDACXX_HIDE_FROM_ABI int compare(const string_type& __s) const {
     return __compare(__s);
   }
-  _LIBCPP_HIDE_FROM_ABI int compare(__string_view __s) const {
+  _LIBCUDACXX_HIDE_FROM_ABI int compare(__string_view __s) const {
     return __compare(__s);
   }
-  _LIBCPP_HIDE_FROM_ABI int compare(const value_type* __s) const {
+  _LIBCUDACXX_HIDE_FROM_ABI int compare(const value_type* __s) const {
     return __compare(__s);
   }
 
   // decomposition
-  _LIBCPP_HIDE_FROM_ABI path root_name() const {
+  _LIBCUDACXX_HIDE_FROM_ABI path root_name() const {
     return string_type(__root_name());
   }
-  _LIBCPP_HIDE_FROM_ABI path root_directory() const {
+  _LIBCUDACXX_HIDE_FROM_ABI path root_directory() const {
     return string_type(__root_directory());
   }
-  _LIBCPP_HIDE_FROM_ABI path root_path() const {
-#if defined(_LIBCPP_WIN32API)
+  _LIBCUDACXX_HIDE_FROM_ABI path root_path() const {
+#if defined(_LIBCUDACXX_WIN32API)
     return string_type(__root_path_raw());
 #else
     return root_name().append(string_type(__root_directory()));
 #endif
   }
-  _LIBCPP_HIDE_FROM_ABI path relative_path() const {
+  _LIBCUDACXX_HIDE_FROM_ABI path relative_path() const {
     return string_type(__relative_path());
   }
-  _LIBCPP_HIDE_FROM_ABI path parent_path() const {
+  _LIBCUDACXX_HIDE_FROM_ABI path parent_path() const {
     return string_type(__parent_path());
   }
-  _LIBCPP_HIDE_FROM_ABI path filename() const {
+  _LIBCUDACXX_HIDE_FROM_ABI path filename() const {
     return string_type(__filename());
   }
-  _LIBCPP_HIDE_FROM_ABI path stem() const { return string_type(__stem()); }
-  _LIBCPP_HIDE_FROM_ABI path extension() const {
+  _LIBCUDACXX_HIDE_FROM_ABI path stem() const { return string_type(__stem()); }
+  _LIBCUDACXX_HIDE_FROM_ABI path extension() const {
     return string_type(__extension());
   }
 
   // query
-  _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI bool
+  _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI bool
   empty() const noexcept {
     return __pn_.empty();
   }
 
-  _LIBCPP_HIDE_FROM_ABI bool has_root_name() const {
+  _LIBCUDACXX_HIDE_FROM_ABI bool has_root_name() const {
     return !__root_name().empty();
   }
-  _LIBCPP_HIDE_FROM_ABI bool has_root_directory() const {
+  _LIBCUDACXX_HIDE_FROM_ABI bool has_root_directory() const {
     return !__root_directory().empty();
   }
-  _LIBCPP_HIDE_FROM_ABI bool has_root_path() const {
+  _LIBCUDACXX_HIDE_FROM_ABI bool has_root_path() const {
     return !__root_path_raw().empty();
   }
-  _LIBCPP_HIDE_FROM_ABI bool has_relative_path() const {
+  _LIBCUDACXX_HIDE_FROM_ABI bool has_relative_path() const {
     return !__relative_path().empty();
   }
-  _LIBCPP_HIDE_FROM_ABI bool has_parent_path() const {
+  _LIBCUDACXX_HIDE_FROM_ABI bool has_parent_path() const {
     return !__parent_path().empty();
   }
-  _LIBCPP_HIDE_FROM_ABI bool has_filename() const {
+  _LIBCUDACXX_HIDE_FROM_ABI bool has_filename() const {
     return !__filename().empty();
   }
-  _LIBCPP_HIDE_FROM_ABI bool has_stem() const { return !__stem().empty(); }
-  _LIBCPP_HIDE_FROM_ABI bool has_extension() const {
+  _LIBCUDACXX_HIDE_FROM_ABI bool has_stem() const { return !__stem().empty(); }
+  _LIBCUDACXX_HIDE_FROM_ABI bool has_extension() const {
     return !__extension().empty();
   }
 
-  _LIBCPP_HIDE_FROM_ABI bool is_absolute() const {
-#if defined(_LIBCPP_WIN32API)
+  _LIBCUDACXX_HIDE_FROM_ABI bool is_absolute() const {
+#if defined(_LIBCUDACXX_WIN32API)
     __string_view __root_name_str = __root_name();
     __string_view __root_dir = __root_directory();
     if (__root_name_str.size() == 2 && __root_name_str[1] == ':') {
@@ -984,13 +984,13 @@ class _LIBCPP_TYPE_VIS path {
     return has_root_directory();
 #endif
   }
-  _LIBCPP_HIDE_FROM_ABI bool is_relative() const { return !is_absolute(); }
+  _LIBCUDACXX_HIDE_FROM_ABI bool is_relative() const { return !is_absolute(); }
 
   // relative paths
   path lexically_normal() const;
   path lexically_relative(const path& __base) const;
 
-  _LIBCPP_HIDE_FROM_ABI path lexically_proximate(const path& __base) const {
+  _LIBCUDACXX_HIDE_FROM_ABI path lexically_proximate(const path& __base) const {
     path __result = this->lexically_relative(__base);
     if (__result.native().empty())
       return *this;
@@ -998,69 +998,69 @@ class _LIBCPP_TYPE_VIS path {
   }
 
   // iterators
-  class _LIBCPP_TYPE_VIS iterator;
+  class _LIBCUDACXX_TYPE_VIS iterator;
   typedef iterator const_iterator;
 
   iterator begin() const;
   iterator end() const;
 
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
   template <class _CharT, class _Traits>
-  _LIBCPP_HIDE_FROM_ABI friend
+  _LIBCUDACXX_HIDE_FROM_ABI friend
       typename enable_if<is_same<_CharT, value_type>::value &&
                              is_same<_Traits, char_traits<value_type> >::value,
                          basic_ostream<_CharT, _Traits>&>::type
       operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) {
-    __os << _VSTD::__quoted(__p.native());
+    __os << _CUDA_VSTD::__quoted(__p.native());
     return __os;
   }
 
   template <class _CharT, class _Traits>
-  _LIBCPP_HIDE_FROM_ABI friend
+  _LIBCUDACXX_HIDE_FROM_ABI friend
       typename enable_if<!is_same<_CharT, value_type>::value ||
                              !is_same<_Traits, char_traits<value_type> >::value,
                          basic_ostream<_CharT, _Traits>&>::type
       operator<<(basic_ostream<_CharT, _Traits>& __os, const path& __p) {
-    __os << _VSTD::__quoted(__p.string<_CharT, _Traits>());
+    __os << _CUDA_VSTD::__quoted(__p.string<_CharT, _Traits>());
     return __os;
   }
 
   template <class _CharT, class _Traits>
-  _LIBCPP_HIDE_FROM_ABI friend basic_istream<_CharT, _Traits>&
+  _LIBCUDACXX_HIDE_FROM_ABI friend basic_istream<_CharT, _Traits>&
   operator>>(basic_istream<_CharT, _Traits>& __is, path& __p) {
     basic_string<_CharT, _Traits> __tmp;
-    __is >> _VSTD::__quoted(__tmp);
+    __is >> _CUDA_VSTD::__quoted(__tmp);
     __p = __tmp;
     return __is;
   }
-#endif // !_LIBCPP_HAS_NO_LOCALIZATION
+#endif // !_LIBCUDACXX_HAS_NO_LOCALIZATION
 
-  friend _LIBCPP_HIDE_FROM_ABI bool operator==(const path& __lhs, const path& __rhs) noexcept {
+  friend _LIBCUDACXX_HIDE_FROM_ABI bool operator==(const path& __lhs, const path& __rhs) noexcept {
     return __lhs.__compare(__rhs.__pn_) == 0;
   }
-  friend _LIBCPP_HIDE_FROM_ABI bool operator!=(const path& __lhs, const path& __rhs) noexcept {
+  friend _LIBCUDACXX_HIDE_FROM_ABI bool operator!=(const path& __lhs, const path& __rhs) noexcept {
     return __lhs.__compare(__rhs.__pn_) != 0;
   }
-  friend _LIBCPP_HIDE_FROM_ABI bool operator<(const path& __lhs, const path& __rhs) noexcept {
+  friend _LIBCUDACXX_HIDE_FROM_ABI bool operator<(const path& __lhs, const path& __rhs) noexcept {
     return __lhs.__compare(__rhs.__pn_) < 0;
   }
-  friend _LIBCPP_HIDE_FROM_ABI bool operator<=(const path& __lhs, const path& __rhs) noexcept {
+  friend _LIBCUDACXX_HIDE_FROM_ABI bool operator<=(const path& __lhs, const path& __rhs) noexcept {
     return __lhs.__compare(__rhs.__pn_) <= 0;
   }
-  friend _LIBCPP_HIDE_FROM_ABI bool operator>(const path& __lhs, const path& __rhs) noexcept {
+  friend _LIBCUDACXX_HIDE_FROM_ABI bool operator>(const path& __lhs, const path& __rhs) noexcept {
     return __lhs.__compare(__rhs.__pn_) > 0;
   }
-  friend _LIBCPP_HIDE_FROM_ABI bool operator>=(const path& __lhs, const path& __rhs) noexcept {
+  friend _LIBCUDACXX_HIDE_FROM_ABI bool operator>=(const path& __lhs, const path& __rhs) noexcept {
     return __lhs.__compare(__rhs.__pn_) >= 0;
   }
 
-  friend _LIBCPP_HIDE_FROM_ABI path operator/(const path& __lhs, const path& __rhs) {
+  friend _LIBCUDACXX_HIDE_FROM_ABI path operator/(const path& __lhs, const path& __rhs) {
     path __result(__lhs);
     __result /= __rhs;
     return __result;
   }
 private:
-  inline _LIBCPP_HIDE_FROM_ABI path&
+  inline _LIBCUDACXX_HIDE_FROM_ABI path&
   __assign_view(__string_view const& __s) noexcept {
     __pn_ = string_type(__s);
     return *this;
@@ -1068,17 +1068,17 @@ class _LIBCPP_TYPE_VIS path {
   string_type __pn_;
 };
 
-inline _LIBCPP_HIDE_FROM_ABI void swap(path& __lhs, path& __rhs) noexcept {
+inline _LIBCUDACXX_HIDE_FROM_ABI void swap(path& __lhs, path& __rhs) noexcept {
   __lhs.swap(__rhs);
 }
 
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 size_t hash_value(const path& __p) noexcept;
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_PATH_H
+#endif // _LIBCUDACXX___FILESYSTEM_PATH_H

diff  --git a/libcxx/include/__filesystem/path_iterator.h b/libcxx/include/__filesystem/path_iterator.h
index 6f2baf8f7a29..835ae975ea2f 100644
--- a/libcxx/include/__filesystem/path_iterator.h
+++ b/libcxx/include/__filesystem/path_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_PATH_ITERATOR_H
-#define _LIBCPP___FILESYSTEM_PATH_ITERATOR_H
+#ifndef _LIBCUDACXX___FILESYSTEM_PATH_ITERATOR_H
+#define _LIBCUDACXX___FILESYSTEM_PATH_ITERATOR_H
 
 #include <__assert>
 #include <__availability>
@@ -19,17 +19,17 @@
 #include <string>
 #include <string_view>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
-class _LIBCPP_TYPE_VIS path::iterator {
+class _LIBCUDACXX_TYPE_VIS path::iterator {
 public:
   enum _ParserState : unsigned char {
     _Singular,
@@ -51,7 +51,7 @@ class _LIBCPP_TYPE_VIS path::iterator {
   typedef path reference;
 
 public:
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   iterator()
       : __stashed_elem_(), __path_ptr_(nullptr), __entry_(),
         __state_(_Singular) {}
@@ -61,38 +61,38 @@ class _LIBCPP_TYPE_VIS path::iterator {
 
   iterator& operator=(const iterator&) = default;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   reference operator*() const { return __stashed_elem_; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   pointer operator->() const { return &__stashed_elem_; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   iterator& operator++() {
-    _LIBCPP_ASSERT(__state_ != _Singular,
+    _LIBCUDACXX_ASSERT(__state_ != _Singular,
                    "attempting to increment a singular iterator");
-    _LIBCPP_ASSERT(__state_ != _AtEnd,
+    _LIBCUDACXX_ASSERT(__state_ != _AtEnd,
                    "attempting to increment the end iterator");
     return __increment();
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   iterator operator++(int) {
     iterator __it(*this);
     this->operator++();
     return __it;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   iterator& operator--() {
-    _LIBCPP_ASSERT(__state_ != _Singular,
+    _LIBCUDACXX_ASSERT(__state_ != _Singular,
                    "attempting to decrement a singular iterator");
-    _LIBCPP_ASSERT(__entry_.data() != __path_ptr_->native().data(),
+    _LIBCUDACXX_ASSERT(__entry_.data() != __path_ptr_->native().data(),
                    "attempting to decrement the begin iterator");
     return __decrement();
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   iterator operator--(int) {
     iterator __it(*this);
     this->operator--();
@@ -102,7 +102,7 @@ class _LIBCPP_TYPE_VIS path::iterator {
 private:
   friend class path;
 
-  inline _LIBCPP_INLINE_VISIBILITY friend bool operator==(const iterator&,
+  inline _LIBCUDACXX_INLINE_VISIBILITY friend bool operator==(const iterator&,
                                                           const iterator&);
 
   iterator& __increment();
@@ -114,21 +114,21 @@ class _LIBCPP_TYPE_VIS path::iterator {
   _ParserState __state_;
 };
 
-inline _LIBCPP_INLINE_VISIBILITY bool operator==(const path::iterator& __lhs,
+inline _LIBCUDACXX_INLINE_VISIBILITY bool operator==(const path::iterator& __lhs,
                                                  const path::iterator& __rhs) {
   return __lhs.__path_ptr_ == __rhs.__path_ptr_ &&
          __lhs.__entry_.data() == __rhs.__entry_.data();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY bool operator!=(const path::iterator& __lhs,
+inline _LIBCUDACXX_INLINE_VISIBILITY bool operator!=(const path::iterator& __lhs,
                                                  const path::iterator& __rhs) {
   return !(__lhs == __rhs);
 }
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_PATH_ITERATOR_H
+#endif // _LIBCUDACXX___FILESYSTEM_PATH_ITERATOR_H

diff  --git a/libcxx/include/__filesystem/perm_options.h b/libcxx/include/__filesystem/perm_options.h
index 4aba302edfbe..8a7f9ccf960c 100644
--- a/libcxx/include/__filesystem/perm_options.h
+++ b/libcxx/include/__filesystem/perm_options.h
@@ -7,71 +7,71 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_PERM_OPTIONS_H
-#define _LIBCPP___FILESYSTEM_PERM_OPTIONS_H
+#ifndef _LIBCUDACXX___FILESYSTEM_PERM_OPTIONS_H
+#define _LIBCUDACXX___FILESYSTEM_PERM_OPTIONS_H
 
 #include <__availability>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
-enum class _LIBCPP_ENUM_VIS perm_options : unsigned char {
+enum class _LIBCUDACXX_ENUM_VIS perm_options : unsigned char {
   replace = 1,
   add = 2,
   remove = 4,
   nofollow = 8
 };
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr perm_options operator&(perm_options __lhs, perm_options __rhs) {
   return static_cast<perm_options>(static_cast<unsigned>(__lhs) &
                                    static_cast<unsigned>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr perm_options operator|(perm_options __lhs, perm_options __rhs) {
   return static_cast<perm_options>(static_cast<unsigned>(__lhs) |
                                    static_cast<unsigned>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr perm_options operator^(perm_options __lhs, perm_options __rhs) {
   return static_cast<perm_options>(static_cast<unsigned>(__lhs) ^
                                    static_cast<unsigned>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr perm_options operator~(perm_options __lhs) {
   return static_cast<perm_options>(~static_cast<unsigned>(__lhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline perm_options& operator&=(perm_options& __lhs, perm_options __rhs) {
   return __lhs = __lhs & __rhs;
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline perm_options& operator|=(perm_options& __lhs, perm_options __rhs) {
   return __lhs = __lhs | __rhs;
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline perm_options& operator^=(perm_options& __lhs, perm_options __rhs) {
   return __lhs = __lhs ^ __rhs;
 }
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_PERM_OPTIONS_H
+#endif // _LIBCUDACXX___FILESYSTEM_PERM_OPTIONS_H

diff  --git a/libcxx/include/__filesystem/perms.h b/libcxx/include/__filesystem/perms.h
index df4590057ee1..b3054678cd9a 100644
--- a/libcxx/include/__filesystem/perms.h
+++ b/libcxx/include/__filesystem/perms.h
@@ -7,27 +7,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_PERMS_H
-#define _LIBCPP___FILESYSTEM_PERMS_H
+#ifndef _LIBCUDACXX___FILESYSTEM_PERMS_H
+#define _LIBCUDACXX___FILESYSTEM_PERMS_H
 
 #include <__availability>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
 // On Windows, these permission bits map to one single readonly flag per
 // file, and the executable bit is always returned as set. When setting
 // permissions, as long as the write bit is set for either owner, group or
 // others, the readonly flag is cleared.
-enum class _LIBCPP_ENUM_VIS perms : unsigned {
+enum class _LIBCUDACXX_ENUM_VIS perms : unsigned {
   none = 0,
 
   owner_read = 0400,
@@ -54,42 +54,42 @@ enum class _LIBCPP_ENUM_VIS perms : unsigned {
   unknown = 0xFFFF,
 };
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr perms operator&(perms __lhs, perms __rhs) {
   return static_cast<perms>(static_cast<unsigned>(__lhs) &
                             static_cast<unsigned>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr perms operator|(perms __lhs, perms __rhs) {
   return static_cast<perms>(static_cast<unsigned>(__lhs) |
                             static_cast<unsigned>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr perms operator^(perms __lhs, perms __rhs) {
   return static_cast<perms>(static_cast<unsigned>(__lhs) ^
                             static_cast<unsigned>(__rhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr perms operator~(perms __lhs) {
   return static_cast<perms>(~static_cast<unsigned>(__lhs));
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline perms& operator&=(perms& __lhs, perms __rhs) { return __lhs = __lhs & __rhs; }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline perms& operator|=(perms& __lhs, perms __rhs) { return __lhs = __lhs | __rhs; }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline perms& operator^=(perms& __lhs, perms __rhs) { return __lhs = __lhs ^ __rhs; }
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_PERMS_H
+#endif // _LIBCUDACXX___FILESYSTEM_PERMS_H

diff  --git a/libcxx/include/__filesystem/recursive_directory_iterator.h b/libcxx/include/__filesystem/recursive_directory_iterator.h
index b20d201f5836..0fc2a613393b 100644
--- a/libcxx/include/__filesystem/recursive_directory_iterator.h
+++ b/libcxx/include/__filesystem/recursive_directory_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_RECURSIVE_DIRECTORY_ITERATOR_H
-#define _LIBCPP___FILESYSTEM_RECURSIVE_DIRECTORY_ITERATOR_H
+#ifndef _LIBCUDACXX___FILESYSTEM_RECURSIVE_DIRECTORY_ITERATOR_H
+#define _LIBCUDACXX___FILESYSTEM_RECURSIVE_DIRECTORY_ITERATOR_H
 
 #include <__availability>
 #include <__config>
@@ -22,15 +22,15 @@
 #include <cstddef>
 #include <system_error>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
 class recursive_directory_iterator {
 public:
@@ -42,20 +42,20 @@ class recursive_directory_iterator {
 
 public:
   // constructors and destructor
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   recursive_directory_iterator() noexcept : __rec_(false) {}
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   explicit recursive_directory_iterator(
       const path& __p, directory_options __xoptions = directory_options::none)
       : recursive_directory_iterator(__p, __xoptions, nullptr) {}
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   recursive_directory_iterator(const path& __p, directory_options __xoptions,
                                error_code& __ec)
       : recursive_directory_iterator(__p, __xoptions, &__ec) {}
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   recursive_directory_iterator(const path& __p, error_code& __ec)
       : recursive_directory_iterator(__p, directory_options::none, &__ec) {}
 
@@ -65,12 +65,12 @@ class recursive_directory_iterator {
   recursive_directory_iterator&
   operator=(const recursive_directory_iterator&) = default;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   recursive_directory_iterator&
   operator=(recursive_directory_iterator&& __o) noexcept {
     // non-default implementation provided to support self-move assign.
     if (this != &__o) {
-      __imp_ = _VSTD::move(__o.__imp_);
+      __imp_ = _CUDA_VSTD::move(__o.__imp_);
       __rec_ = __o.__rec_;
     }
     return *this;
@@ -78,108 +78,108 @@ class recursive_directory_iterator {
 
   ~recursive_directory_iterator() = default;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   const directory_entry& operator*() const { return __dereference(); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   const directory_entry* operator->() const { return &__dereference(); }
 
   recursive_directory_iterator& operator++() { return __increment(); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   __dir_element_proxy operator++(int) {
     __dir_element_proxy __p(**this);
     __increment();
     return __p;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   recursive_directory_iterator& increment(error_code& __ec) {
     return __increment(&__ec);
   }
 
-  _LIBCPP_FUNC_VIS directory_options options() const;
-  _LIBCPP_FUNC_VIS int depth() const;
+  _LIBCUDACXX_FUNC_VIS directory_options options() const;
+  _LIBCUDACXX_FUNC_VIS int depth() const;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void pop() { __pop(); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void pop(error_code& __ec) { __pop(&__ec); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool recursion_pending() const { return __rec_; }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void disable_recursion_pending() { __rec_ = false; }
 
 private:
-  _LIBCPP_FUNC_VIS
+  _LIBCUDACXX_FUNC_VIS
   recursive_directory_iterator(const path& __p, directory_options __opt,
                                error_code* __ec);
 
-  _LIBCPP_FUNC_VIS
+  _LIBCUDACXX_FUNC_VIS
   const directory_entry& __dereference() const;
 
-  _LIBCPP_FUNC_VIS
+  _LIBCUDACXX_FUNC_VIS
   bool __try_recursion(error_code* __ec);
 
-  _LIBCPP_FUNC_VIS
+  _LIBCUDACXX_FUNC_VIS
   void __advance(error_code* __ec = nullptr);
 
-  _LIBCPP_FUNC_VIS
+  _LIBCUDACXX_FUNC_VIS
   recursive_directory_iterator& __increment(error_code* __ec = nullptr);
 
-  _LIBCPP_FUNC_VIS
+  _LIBCUDACXX_FUNC_VIS
   void __pop(error_code* __ec = nullptr);
 
-  inline _LIBCPP_INLINE_VISIBILITY friend bool
+  inline _LIBCUDACXX_INLINE_VISIBILITY friend bool
   operator==(const recursive_directory_iterator&,
              const recursive_directory_iterator&) noexcept;
 
-  struct _LIBCPP_HIDDEN __shared_imp;
+  struct _LIBCUDACXX_HIDDEN __shared_imp;
   shared_ptr<__shared_imp> __imp_;
   bool __rec_;
 }; // class recursive_directory_iterator
 
-inline _LIBCPP_INLINE_VISIBILITY bool
+inline _LIBCUDACXX_INLINE_VISIBILITY bool
 operator==(const recursive_directory_iterator& __lhs,
            const recursive_directory_iterator& __rhs) noexcept {
   return __lhs.__imp_ == __rhs.__imp_;
 }
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline bool operator!=(const recursive_directory_iterator& __lhs,
                        const recursive_directory_iterator& __rhs) noexcept {
   return !(__lhs == __rhs);
 }
 // enable recursive_directory_iterator range-based for statements
-inline _LIBCPP_INLINE_VISIBILITY recursive_directory_iterator
+inline _LIBCUDACXX_INLINE_VISIBILITY recursive_directory_iterator
 begin(recursive_directory_iterator __iter) noexcept {
   return __iter;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY recursive_directory_iterator
+inline _LIBCUDACXX_INLINE_VISIBILITY recursive_directory_iterator
 end(recursive_directory_iterator) noexcept {
   return recursive_directory_iterator();
 }
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
-inline constexpr bool _VSTD::ranges::enable_borrowed_range<_VSTD_FS::recursive_directory_iterator> = true;
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM
+inline constexpr bool _CUDA_VSTD::ranges::enable_borrowed_range<_VSTD_FS::recursive_directory_iterator> = true;
 
 template <>
-_LIBCPP_AVAILABILITY_FILESYSTEM
-inline constexpr bool _VSTD::ranges::enable_view<_VSTD_FS::recursive_directory_iterator> = true;
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM
+inline constexpr bool _CUDA_VSTD::ranges::enable_view<_VSTD_FS::recursive_directory_iterator> = true;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_RECURSIVE_DIRECTORY_ITERATOR_H
+#endif // _LIBCUDACXX___FILESYSTEM_RECURSIVE_DIRECTORY_ITERATOR_H

diff  --git a/libcxx/include/__filesystem/space_info.h b/libcxx/include/__filesystem/space_info.h
index d7dc03af75a7..1d0c395545e6 100644
--- a/libcxx/include/__filesystem/space_info.h
+++ b/libcxx/include/__filesystem/space_info.h
@@ -7,33 +7,33 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_SPACE_INFO_H
-#define _LIBCPP___FILESYSTEM_SPACE_INFO_H
+#ifndef _LIBCUDACXX___FILESYSTEM_SPACE_INFO_H
+#define _LIBCUDACXX___FILESYSTEM_SPACE_INFO_H
 
 #include <__availability>
 #include <__config>
 #include <cstdint>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
-struct _LIBCPP_TYPE_VIS space_info {
+struct _LIBCUDACXX_TYPE_VIS space_info {
   uintmax_t capacity;
   uintmax_t free;
   uintmax_t available;
 };
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_SPACE_INFO_H
+#endif // _LIBCUDACXX___FILESYSTEM_SPACE_INFO_H

diff  --git a/libcxx/include/__filesystem/u8path.h b/libcxx/include/__filesystem/u8path.h
index d35faa14bb8a..66a33dfbdc02 100644
--- a/libcxx/include/__filesystem/u8path.h
+++ b/libcxx/include/__filesystem/u8path.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FILESYSTEM_U8PATH_H
-#define _LIBCPP___FILESYSTEM_U8PATH_H
+#ifndef _LIBCUDACXX___FILESYSTEM_U8PATH_H
+#define _LIBCUDACXX___FILESYSTEM_U8PATH_H
 
 #include <__algorithm/unwrap_iter.h>
 #include <__availability>
@@ -19,50 +19,50 @@
 
 // Only required on Windows for __widen_from_utf8, and included conservatively
 // because it requires support for localization.
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 # include <locale>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_PUSH
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_PUSH
 
 template <class _InputIt>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_DEPRECATED_WITH_CHAR8_T
     typename enable_if<__is_pathable<_InputIt>::value, path>::type
     u8path(_InputIt __f, _InputIt __l) {
   static_assert(
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
       is_same<typename __is_pathable<_InputIt>::__char_type, char8_t>::value ||
 #endif
       is_same<typename __is_pathable<_InputIt>::__char_type, char>::value,
       "u8path(Iter, Iter) requires Iter have a value_type of type 'char'"
       " or 'char8_t'");
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
   string __tmp(__f, __l);
   using _CVT = __widen_from_utf8<sizeof(wchar_t) * __CHAR_BIT__>;
-  _VSTD::wstring __w;
+  _CUDA_VSTD::wstring __w;
   __w.reserve(__tmp.size());
   _CVT()(back_inserter(__w), __tmp.data(), __tmp.data() + __tmp.size());
   return path(__w);
 #else
   return path(__f, __l);
-#endif /* !_LIBCPP_WIN32API */
+#endif /* !_LIBCUDACXX_WIN32API */
 }
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 template <class _InputIt>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_DEPRECATED_WITH_CHAR8_T
     typename enable_if<__is_pathable<_InputIt>::value, path>::type
     u8path(_InputIt __f, _NullSentinel) {
   static_assert(
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
       is_same<typename __is_pathable<_InputIt>::__char_type, char8_t>::value ||
 #endif
       is_same<typename __is_pathable<_InputIt>::__char_type, char>::value,
@@ -73,36 +73,36 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
   for (; *__f != __sentinel; ++__f)
     __tmp.push_back(*__f);
   using _CVT = __widen_from_utf8<sizeof(wchar_t) * __CHAR_BIT__>;
-  _VSTD::wstring __w;
+  _CUDA_VSTD::wstring __w;
   __w.reserve(__tmp.size());
   _CVT()(back_inserter(__w), __tmp.data(), __tmp.data() + __tmp.size());
   return path(__w);
 }
-#endif /* _LIBCPP_WIN32API */
+#endif /* _LIBCUDACXX_WIN32API */
 
 template <class _Source>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_WITH_CHAR8_T
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_DEPRECATED_WITH_CHAR8_T
     typename enable_if<__is_pathable<_Source>::value, path>::type
     u8path(const _Source& __s) {
   static_assert(
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
       is_same<typename __is_pathable<_Source>::__char_type, char8_t>::value ||
 #endif
       is_same<typename __is_pathable<_Source>::__char_type, char>::value,
       "u8path(Source const&) requires Source have a character type of type "
       "'char' or 'char8_t'");
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
   using _Traits = __is_pathable<_Source>;
-  return u8path(_VSTD::__unwrap_iter(_Traits::__range_begin(__s)), _VSTD::__unwrap_iter(_Traits::__range_end(__s)));
+  return u8path(_CUDA_VSTD::__unwrap_iter(_Traits::__range_begin(__s)), _CUDA_VSTD::__unwrap_iter(_Traits::__range_end(__s)));
 #else
   return path(__s);
 #endif
 }
 
-_LIBCPP_AVAILABILITY_FILESYSTEM_POP
+_LIBCUDACXX_AVAILABILITY_FILESYSTEM_POP
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP___FILESYSTEM_U8PATH_H
+#endif // _LIBCUDACXX___FILESYSTEM_U8PATH_H

diff  --git a/libcxx/include/__format/buffer.h b/libcxx/include/__format/buffer.h
index d9b08064dfb3..58acd2ae9369 100644
--- a/libcxx/include/__format/buffer.h
+++ b/libcxx/include/__format/buffer.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_BUFFER_H
-#define _LIBCPP___FORMAT_BUFFER_H
+#ifndef _LIBCUDACXX___FORMAT_BUFFER_H
+#define _LIBCUDACXX___FORMAT_BUFFER_H
 
 #include <__algorithm/copy_n.h>
 #include <__algorithm/max.h>
@@ -28,16 +28,16 @@
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __format {
 
@@ -47,12 +47,12 @@ namespace __format {
 /// type-erasure for the formatting functions. This reduces the number to
 /// template instantiations.
 template <__formatter::__char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __output_buffer {
+class _LIBCUDACXX_TEMPLATE_VIS __output_buffer {
 public:
   using value_type = _CharT;
 
   template <class _Tp>
-  _LIBCPP_HIDE_FROM_ABI explicit __output_buffer(_CharT* __ptr,
+  _LIBCUDACXX_HIDE_FROM_ABI explicit __output_buffer(_CharT* __ptr,
                                                  size_t __capacity, _Tp* __obj)
       : __ptr_(__ptr), __capacity_(__capacity),
         __flush_([](_CharT* __p, size_t __size, void* __o) {
@@ -60,18 +60,18 @@ class _LIBCPP_TEMPLATE_VIS __output_buffer {
         }),
         __obj_(__obj) {}
 
-  _LIBCPP_HIDE_FROM_ABI void reset(_CharT* __ptr, size_t __capacity) {
+  _LIBCUDACXX_HIDE_FROM_ABI void reset(_CharT* __ptr, size_t __capacity) {
     __ptr_ = __ptr;
     __capacity_ = __capacity;
   }
 
-  _LIBCPP_HIDE_FROM_ABI auto make_output_iterator() {
+  _LIBCUDACXX_HIDE_FROM_ABI auto make_output_iterator() {
     return back_insert_iterator{*this};
   }
 
   // TODO FMT It would be nice to have an overload taking a
   // basic_string_view<_CharT> and append it directly.
-  _LIBCPP_HIDE_FROM_ABI void push_back(_CharT __c) {
+  _LIBCUDACXX_HIDE_FROM_ABI void push_back(_CharT __c) {
     __ptr_[__size_++] = __c;
 
     // Profiling showed flushing after adding is more efficient than flushing
@@ -80,7 +80,7 @@ class _LIBCPP_TEMPLATE_VIS __output_buffer {
       flush();
   }
 
-  _LIBCPP_HIDE_FROM_ABI void flush() {
+  _LIBCUDACXX_HIDE_FROM_ABI void flush() {
     __flush_(__ptr_, __size_, __obj_);
     __size_ = 0;
   }
@@ -98,9 +98,9 @@ class _LIBCPP_TEMPLATE_VIS __output_buffer {
 /// This storage is used when writing a single element to the output iterator
 /// is expensive.
 template <__formatter::__char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __internal_storage {
+class _LIBCUDACXX_TEMPLATE_VIS __internal_storage {
 public:
-  _LIBCPP_HIDE_FROM_ABI _CharT* begin() { return __buffer_; }
+  _LIBCUDACXX_HIDE_FROM_ABI _CharT* begin() { return __buffer_; }
 
   static constexpr size_t __buffer_size = 256 / sizeof(_CharT);
 
@@ -114,26 +114,26 @@ class _LIBCPP_TEMPLATE_VIS __internal_storage {
 /// Since the output is directly written to the underlying storage this class
 /// is just an empty class.
 template <__formatter::__char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __direct_storage {};
+class _LIBCUDACXX_TEMPLATE_VIS __direct_storage {};
 
 template <class _OutIt, class _CharT>
 concept __enable_direct_output = __formatter::__char_type<_CharT> &&
     (same_as<_OutIt, _CharT*>
-#ifndef _LIBCPP_ENABLE_DEBUG_MODE
+#ifndef _LIBCUDACXX_ENABLE_DEBUG_MODE
      || same_as<_OutIt, __wrap_iter<_CharT*>>
 #endif
     );
 
 /// Write policy for directly writing to the underlying output.
 template <class _OutIt, __formatter::__char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __writer_direct {
+class _LIBCUDACXX_TEMPLATE_VIS __writer_direct {
 public:
-  _LIBCPP_HIDE_FROM_ABI explicit __writer_direct(_OutIt __out_it)
+  _LIBCUDACXX_HIDE_FROM_ABI explicit __writer_direct(_OutIt __out_it)
       : __out_it_(__out_it) {}
 
-  _LIBCPP_HIDE_FROM_ABI auto out() { return __out_it_; }
+  _LIBCUDACXX_HIDE_FROM_ABI auto out() { return __out_it_; }
 
-  _LIBCPP_HIDE_FROM_ABI void flush(_CharT*, size_t __size) {
+  _LIBCUDACXX_HIDE_FROM_ABI void flush(_CharT*, size_t __size) {
     // _OutIt can be a __wrap_iter<CharT*>. Therefore the original iterator
     // is adjusted.
     __out_it_ += __size;
@@ -145,15 +145,15 @@ class _LIBCPP_TEMPLATE_VIS __writer_direct {
 
 /// Write policy for copying the buffer to the output.
 template <class _OutIt, __formatter::__char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __writer_iterator {
+class _LIBCUDACXX_TEMPLATE_VIS __writer_iterator {
 public:
-  _LIBCPP_HIDE_FROM_ABI explicit __writer_iterator(_OutIt __out_it)
-      : __out_it_{_VSTD::move(__out_it)} {}
+  _LIBCUDACXX_HIDE_FROM_ABI explicit __writer_iterator(_OutIt __out_it)
+      : __out_it_{_CUDA_VSTD::move(__out_it)} {}
 
-  _LIBCPP_HIDE_FROM_ABI auto out() { return __out_it_; }
+  _LIBCUDACXX_HIDE_FROM_ABI auto out() { return __out_it_; }
 
-  _LIBCPP_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
-    __out_it_ = _VSTD::copy_n(__ptr, __size, _VSTD::move(__out_it_));
+  _LIBCUDACXX_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
+    __out_it_ = _CUDA_VSTD::copy_n(__ptr, __size, _CUDA_VSTD::move(__out_it_));
   }
 
 private:
@@ -175,27 +175,27 @@ concept __insertable =
 
 /// Extract the container type of a \ref back_insert_iterator.
 template <class _It>
-struct _LIBCPP_TEMPLATE_VIS __back_insert_iterator_container {
+struct _LIBCUDACXX_TEMPLATE_VIS __back_insert_iterator_container {
   using type = void;
 };
 
 template <__insertable _Container>
-struct _LIBCPP_TEMPLATE_VIS __back_insert_iterator_container<back_insert_iterator<_Container>> {
+struct _LIBCUDACXX_TEMPLATE_VIS __back_insert_iterator_container<back_insert_iterator<_Container>> {
   using type = _Container;
 };
 
 /// Write policy for inserting the buffer in a container.
 template <class _Container>
-class _LIBCPP_TEMPLATE_VIS __writer_container {
+class _LIBCUDACXX_TEMPLATE_VIS __writer_container {
 public:
   using _CharT = typename _Container::value_type;
 
-  _LIBCPP_HIDE_FROM_ABI explicit __writer_container(back_insert_iterator<_Container> __out_it)
+  _LIBCUDACXX_HIDE_FROM_ABI explicit __writer_container(back_insert_iterator<_Container> __out_it)
       : __container_{__out_it.__get_container()} {}
 
-  _LIBCPP_HIDE_FROM_ABI auto out() { return back_inserter(*__container_); }
+  _LIBCUDACXX_HIDE_FROM_ABI auto out() { return back_inserter(*__container_); }
 
-  _LIBCPP_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
+  _LIBCUDACXX_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
     __container_->insert(__container_->end(), __ptr, __ptr + __size);
   }
 
@@ -205,7 +205,7 @@ class _LIBCPP_TEMPLATE_VIS __writer_container {
 
 /// Selects the type of the writer used for the output iterator.
 template <class _OutIt, class _CharT>
-class _LIBCPP_TEMPLATE_VIS __writer_selector {
+class _LIBCUDACXX_TEMPLATE_VIS __writer_selector {
   using _Container = typename __back_insert_iterator_container<_OutIt>::type;
 
 public:
@@ -216,37 +216,37 @@ class _LIBCPP_TEMPLATE_VIS __writer_selector {
 
 /// The generic formatting buffer.
 template <class _OutIt, __formatter::__char_type _CharT>
-requires(output_iterator<_OutIt, const _CharT&>) class _LIBCPP_TEMPLATE_VIS
+requires(output_iterator<_OutIt, const _CharT&>) class _LIBCUDACXX_TEMPLATE_VIS
     __format_buffer {
   using _Storage =
       conditional_t<__enable_direct_output<_OutIt, _CharT>,
                     __direct_storage<_CharT>, __internal_storage<_CharT>>;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it)
+  _LIBCUDACXX_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it)
     requires(same_as<_Storage, __internal_storage<_CharT>>)
-  : __output_(__storage_.begin(), __storage_.__buffer_size, this), __writer_(_VSTD::move(__out_it)) {}
+  : __output_(__storage_.begin(), __storage_.__buffer_size, this), __writer_(_CUDA_VSTD::move(__out_it)) {}
 
-  _LIBCPP_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it) requires(
+  _LIBCUDACXX_HIDE_FROM_ABI explicit __format_buffer(_OutIt __out_it) requires(
       same_as<_Storage, __direct_storage<_CharT>>)
-      : __output_(_VSTD::__unwrap_iter(__out_it), size_t(-1), this),
-        __writer_(_VSTD::move(__out_it)) {}
+      : __output_(_CUDA_VSTD::__unwrap_iter(__out_it), size_t(-1), this),
+        __writer_(_CUDA_VSTD::move(__out_it)) {}
 
-  _LIBCPP_HIDE_FROM_ABI auto make_output_iterator() {
+  _LIBCUDACXX_HIDE_FROM_ABI auto make_output_iterator() {
     return __output_.make_output_iterator();
   }
 
-  _LIBCPP_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
+  _LIBCUDACXX_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
     __writer_.flush(__ptr, __size);
   }
 
-  _LIBCPP_HIDE_FROM_ABI _OutIt out() && {
+  _LIBCUDACXX_HIDE_FROM_ABI _OutIt out() && {
     __output_.flush();
-    return _VSTD::move(__writer_).out();
+    return _CUDA_VSTD::move(__writer_).out();
   }
 
 private:
-  _LIBCPP_NO_UNIQUE_ADDRESS _Storage __storage_;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _Storage __storage_;
   __output_buffer<_CharT> __output_;
   typename __writer_selector<_OutIt, _CharT>::type __writer_;
 };
@@ -256,13 +256,13 @@ requires(output_iterator<_OutIt, const _CharT&>) class _LIBCPP_TEMPLATE_VIS
 /// Since \ref formatted_size only needs to know the size, the output itself is
 /// discarded.
 template <__formatter::__char_type _CharT>
-class _LIBCPP_TEMPLATE_VIS __formatted_size_buffer {
+class _LIBCUDACXX_TEMPLATE_VIS __formatted_size_buffer {
 public:
-  _LIBCPP_HIDE_FROM_ABI auto make_output_iterator() { return __output_.make_output_iterator(); }
+  _LIBCUDACXX_HIDE_FROM_ABI auto make_output_iterator() { return __output_.make_output_iterator(); }
 
-  _LIBCPP_HIDE_FROM_ABI void flush(const _CharT*, size_t __size) { __size_ += __size; }
+  _LIBCUDACXX_HIDE_FROM_ABI void flush(const _CharT*, size_t __size) { __size_ += __size; }
 
-  _LIBCPP_HIDE_FROM_ABI size_t result() && {
+  _LIBCUDACXX_HIDE_FROM_ABI size_t result() && {
     __output_.flush();
     return __size_;
   }
@@ -276,16 +276,16 @@ class _LIBCPP_TEMPLATE_VIS __formatted_size_buffer {
 /// The base of a buffer that counts and limits the number of insertions.
 template <class _OutIt, __formatter::__char_type _CharT, bool>
   requires(output_iterator<_OutIt, const _CharT&>)
-struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base {
+struct _LIBCUDACXX_TEMPLATE_VIS __format_to_n_buffer_base {
   using _Size = iter_
diff erence_t<_OutIt>;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __n)
-      : __writer_(_VSTD::move(__out_it)), __n_(_VSTD::max(_Size(0), __n)) {}
+  _LIBCUDACXX_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __n)
+      : __writer_(_CUDA_VSTD::move(__out_it)), __n_(_CUDA_VSTD::max(_Size(0), __n)) {}
 
-  _LIBCPP_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
+  _LIBCUDACXX_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
     if (_Size(__size_) <= __n_)
-      __writer_.flush(__ptr, _VSTD::min(_Size(__size), __n_ - __size_));
+      __writer_.flush(__ptr, _CUDA_VSTD::min(_Size(__size), __n_ - __size_));
     __size_ += __size;
   }
 
@@ -306,17 +306,17 @@ struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base {
 /// exceed the maximum number of code units.
 template <class _OutIt, __formatter::__char_type _CharT>
   requires(output_iterator<_OutIt, const _CharT&>)
-class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> {
+class _LIBCUDACXX_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> {
   using _Size = iter_
diff erence_t<_OutIt>;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __n)
-      : __output_(_VSTD::__unwrap_iter(__out_it), __n, this), __writer_(_VSTD::move(__out_it)) {
+  _LIBCUDACXX_HIDE_FROM_ABI explicit __format_to_n_buffer_base(_OutIt __out_it, _Size __n)
+      : __output_(_CUDA_VSTD::__unwrap_iter(__out_it), __n, this), __writer_(_CUDA_VSTD::move(__out_it)) {
     if (__n <= 0) [[unlikely]]
       __output_.reset(__storage_.begin(), __storage_.__buffer_size);
   }
 
-  _LIBCPP_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
+  _LIBCUDACXX_HIDE_FROM_ABI void flush(_CharT* __ptr, size_t __size) {
     // A flush to the direct writer happens in two occasions:
     // - The format function has written the maximum number of allowed code
     //   units. At this point it's no longer valid to write to this writer. So
@@ -344,26 +344,26 @@ class _LIBCPP_TEMPLATE_VIS __format_to_n_buffer_base<_OutIt, _CharT, true> {
 /// The buffer that counts and limits the number of insertions.
 template <class _OutIt, __formatter::__char_type _CharT>
   requires(output_iterator<_OutIt, const _CharT&>)
-struct _LIBCPP_TEMPLATE_VIS __format_to_n_buffer final
+struct _LIBCUDACXX_TEMPLATE_VIS __format_to_n_buffer final
     : public __format_to_n_buffer_base< _OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>> {
   using _Base = __format_to_n_buffer_base<_OutIt, _CharT, __enable_direct_output<_OutIt, _CharT>>;
   using _Size = iter_
diff erence_t<_OutIt>;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI explicit __format_to_n_buffer(_OutIt __out_it, _Size __n) : _Base(_VSTD::move(__out_it), __n) {}
-  _LIBCPP_HIDE_FROM_ABI auto make_output_iterator() { return this->__output_.make_output_iterator(); }
+  _LIBCUDACXX_HIDE_FROM_ABI explicit __format_to_n_buffer(_OutIt __out_it, _Size __n) : _Base(_CUDA_VSTD::move(__out_it), __n) {}
+  _LIBCUDACXX_HIDE_FROM_ABI auto make_output_iterator() { return this->__output_.make_output_iterator(); }
 
-  _LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> result() && {
+  _LIBCUDACXX_HIDE_FROM_ABI format_to_n_result<_OutIt> result() && {
     this->__output_.flush();
-    return {_VSTD::move(this->__writer_).out(), this->__size_};
+    return {_CUDA_VSTD::move(this->__writer_).out(), this->__size_};
   }
 };
 } // namespace __format
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___FORMAT_BUFFER_H
+#endif // _LIBCUDACXX___FORMAT_BUFFER_H

diff  --git a/libcxx/include/__format/concepts.h b/libcxx/include/__format/concepts.h
index 8df6493b0aed..07b95e33b383 100644
--- a/libcxx/include/__format/concepts.h
+++ b/libcxx/include/__format/concepts.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_CONCEPTS_H
-#define _LIBCPP___FORMAT_CONCEPTS_H
+#ifndef _LIBCUDACXX___FORMAT_CONCEPTS_H
+#define _LIBCUDACXX___FORMAT_CONCEPTS_H
 
 #include <__concepts/same_as.h>
 #include <__concepts/semiregular.h>
@@ -17,13 +17,13 @@
 #include <__format/format_parse_context.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // The output iterator isn't specified. A formatter should accept any
 // output_iterator. This iterator is a minimal iterator to test the concept.
@@ -46,8 +46,8 @@ concept __formattable = (semiregular<formatter<remove_cvref_t<_Tp>, _CharT>>) &&
                           { __cf.format(__t, __fc) } -> same_as<__fmt_iter_for<_CharT>>;
                         };
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_CONCEPTS_H
+#endif // _LIBCUDACXX___FORMAT_CONCEPTS_H

diff  --git a/libcxx/include/__format/enable_insertable.h b/libcxx/include/__format/enable_insertable.h
index 71b4252930de..289ee513dd80 100644
--- a/libcxx/include/__format/enable_insertable.h
+++ b/libcxx/include/__format/enable_insertable.h
@@ -7,18 +7,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_ENABLE_INSERTABLE_H
-#define _LIBCPP___FORMAT_ENABLE_INSERTABLE_H
+#ifndef _LIBCUDACXX___FORMAT_ENABLE_INSERTABLE_H
+#define _LIBCUDACXX___FORMAT_ENABLE_INSERTABLE_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __format {
 
@@ -28,8 +28,8 @@ inline constexpr bool __enable_insertable = false;
 
 } // namespace __format
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_ENABLE_INSERTABLE_H
+#endif // _LIBCUDACXX___FORMAT_ENABLE_INSERTABLE_H

diff  --git a/libcxx/include/__format/extended_grapheme_cluster_table.h b/libcxx/include/__format/extended_grapheme_cluster_table.h
index 00cd0e91cd15..27645e21f05a 100644
--- a/libcxx/include/__format/extended_grapheme_cluster_table.h
+++ b/libcxx/include/__format/extended_grapheme_cluster_table.h
@@ -58,8 +58,8 @@
 // use or other dealings in these Data Files or Software without prior
 // written authorization of the copyright holder.
 
-#ifndef _LIBCPP___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
-#define _LIBCPP___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
+#ifndef _LIBCUDACXX___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
+#define _LIBCUDACXX___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
 
 #include <__algorithm/upper_bound.h>
 #include <__config>
@@ -67,13 +67,13 @@
 #include <cstddef>
 #include <cstdint>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __extended_grapheme_custer_property_boundary {
 
@@ -292,7 +292,7 @@ inline constexpr uint32_t __entries[1480] = {
     0x707387f1, 0x707787f1, 0x707b87f1, 0x707f80f1};
 
 /// Returns the extended grapheme cluster bondary property of a code point.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __property __get_property(const char32_t __code_point) noexcept {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr __property __get_property(const char32_t __code_point) noexcept {
   // TODO FMT use std::ranges::upper_bound.
 
   // The algorithm searches for the upper bound of the range and, when found,
@@ -325,8 +325,8 @@ inline constexpr uint32_t __entries[1480] = {
 
 } // namespace __extended_grapheme_custer_property_boundary
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
+#endif // _LIBCUDACXX___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H

diff  --git a/libcxx/include/__format/format_arg.h b/libcxx/include/__format/format_arg.h
index 4f93024b7c69..c3e87a571a73 100644
--- a/libcxx/include/__format/format_arg.h
+++ b/libcxx/include/__format/format_arg.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMAT_ARG_H
-#define _LIBCPP___FORMAT_FORMAT_ARG_H
+#ifndef _LIBCUDACXX___FORMAT_FORMAT_ARG_H
+#define _LIBCUDACXX___FORMAT_FORMAT_ARG_H
 
 #include <__assert>
 #include <__concepts/arithmetic.h>
@@ -24,13 +24,13 @@
 #include <string>
 #include <string_view>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __format {
 /// The type stored in @ref basic_format_arg.
@@ -45,7 +45,7 @@ namespace __format {
 /// It could be packed in 4-bits but that means a new type directly becomes an
 /// ABI break. The packed type is 64-bit so this reduces the maximum number of
 /// packed elements from 16 to 12.
-enum class _LIBCPP_ENUM_VIS __arg_t : uint8_t {
+enum class _LIBCUDACXX_ENUM_VIS __arg_t : uint8_t {
   __none,
   __boolean,
   __char_type,
@@ -70,12 +70,12 @@ inline constexpr uint8_t __packed_arg_t_mask = 0x1f;
 inline constexpr unsigned __packed_types_storage_bits = 64;
 inline constexpr unsigned __packed_types_max = __packed_types_storage_bits / __packed_arg_t_bits;
 
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr bool __use_packed_format_arg_store(size_t __size) { return __size <= __packed_types_max; }
 
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr __arg_t __get_packed_type(uint64_t __types, size_t __id) {
-  _LIBCPP_ASSERT(__id <= __packed_types_max, "");
+  _LIBCUDACXX_ASSERT(__id <= __packed_types_max, "");
 
   if (__id > 0)
     __types >>= __id * __packed_arg_t_bits;
@@ -86,53 +86,53 @@ constexpr __arg_t __get_packed_type(uint64_t __types, size_t __id) {
 } // namespace __format
 
 template <class _Visitor, class _Context>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT decltype(auto) visit_format_arg(_Visitor&& __vis,
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT decltype(auto) visit_format_arg(_Visitor&& __vis,
                                                                                   basic_format_arg<_Context> __arg) {
   switch (__arg.__type_) {
   case __format::__arg_t::__none:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__monostate_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__monostate_);
   case __format::__arg_t::__boolean:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__boolean_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__boolean_);
   case __format::__arg_t::__char_type:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__char_type_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__char_type_);
   case __format::__arg_t::__int:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__int_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__int_);
   case __format::__arg_t::__long_long:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__long_long_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__long_long_);
   case __format::__arg_t::__i128:
-#  ifndef _LIBCPP_HAS_NO_INT128
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__i128_);
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__i128_);
 #  else
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
 #  endif
   case __format::__arg_t::__unsigned:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__unsigned_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__unsigned_);
   case __format::__arg_t::__unsigned_long_long:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__unsigned_long_long_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__unsigned_long_long_);
   case __format::__arg_t::__u128:
-#  ifndef _LIBCPP_HAS_NO_INT128
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__u128_);
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__u128_);
 #  else
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
 #  endif
   case __format::__arg_t::__float:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__float_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__float_);
   case __format::__arg_t::__double:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__double_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__double_);
   case __format::__arg_t::__long_double:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__long_double_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__long_double_);
   case __format::__arg_t::__const_char_type_ptr:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__const_char_type_ptr_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__const_char_type_ptr_);
   case __format::__arg_t::__string_view:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__string_view_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__string_view_);
   case __format::__arg_t::__ptr:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis), __arg.__value_.__ptr_);
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis), __arg.__value_.__ptr_);
   case __format::__arg_t::__handle:
-    return _VSTD::invoke(_VSTD::forward<_Visitor>(__vis),
+    return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Visitor>(__vis),
                          typename basic_format_arg<_Context>::handle{__arg.__value_.__handle_});
   }
 
-  __libcpp_unreachable();
+  __LIBCUDACXX_unreachable();
 }
 
 /// Contains the values used in basic_format_arg.
@@ -147,8 +147,8 @@ class __basic_format_arg_value {
   /// Contains the implementation for basic_format_arg::handle.
   struct __handle {
     template <class _Tp>
-    _LIBCPP_HIDE_FROM_ABI explicit __handle(_Tp&& __v) noexcept
-        : __ptr_(_VSTD::addressof(__v)),
+    _LIBCUDACXX_HIDE_FROM_ABI explicit __handle(_Tp&& __v) noexcept
+        : __ptr_(_CUDA_VSTD::addressof(__v)),
           __format_([](basic_format_parse_context<_CharT>& __parse_ctx, _Context& __ctx, const void* __ptr) {
             using _Dp = remove_cvref_t<_Tp>;
             using _Formatter = typename _Context::template formatter_type<_Dp>;
@@ -175,7 +175,7 @@ class __basic_format_arg_value {
     unsigned __unsigned_;
     long long __long_long_;
     unsigned long long __unsigned_long_long_;
-#  ifndef _LIBCPP_HAS_NO_INT128
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
     __int128_t __i128_;
     __uint128_t __u128_;
 #  endif
@@ -191,39 +191,39 @@ class __basic_format_arg_value {
   // These constructors contain the exact storage type used. If adjustments are
   // required, these will be done in __create_format_arg.
 
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value() noexcept : __monostate_() {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(bool __value) noexcept : __boolean_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(_CharT __value) noexcept : __char_type_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(int __value) noexcept : __int_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(unsigned __value) noexcept : __unsigned_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(long long __value) noexcept : __long_long_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(unsigned long long __value) noexcept
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value() noexcept : __monostate_() {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(bool __value) noexcept : __boolean_(__value) {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(_CharT __value) noexcept : __char_type_(__value) {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(int __value) noexcept : __int_(__value) {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(unsigned __value) noexcept : __unsigned_(__value) {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(long long __value) noexcept : __long_long_(__value) {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(unsigned long long __value) noexcept
       : __unsigned_long_long_(__value) {}
-#  ifndef _LIBCPP_HAS_NO_INT128
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(__int128_t __value) noexcept : __i128_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(__uint128_t __value) noexcept : __u128_(__value) {}
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(__int128_t __value) noexcept : __i128_(__value) {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(__uint128_t __value) noexcept : __u128_(__value) {}
 #  endif
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(float __value) noexcept : __float_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(double __value) noexcept : __double_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(long double __value) noexcept : __long_double_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(const _CharT* __value) noexcept : __const_char_type_ptr_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(basic_string_view<_CharT> __value) noexcept
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(float __value) noexcept : __float_(__value) {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(double __value) noexcept : __double_(__value) {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(long double __value) noexcept : __long_double_(__value) {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(const _CharT* __value) noexcept : __const_char_type_ptr_(__value) {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(basic_string_view<_CharT> __value) noexcept
       : __string_view_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(const void* __value) noexcept : __ptr_(__value) {}
-  _LIBCPP_HIDE_FROM_ABI __basic_format_arg_value(__handle __value) noexcept
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(const void* __value) noexcept : __ptr_(__value) {}
+  _LIBCUDACXX_HIDE_FROM_ABI __basic_format_arg_value(__handle __value) noexcept
       // TODO FMT Investigate why it doesn't work without the forward.
       : __handle_(std::forward<__handle>(__value)) {}
 };
 
 template <class _Context>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_arg {
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT basic_format_arg {
 public:
-  class _LIBCPP_TEMPLATE_VIS handle;
+  class _LIBCUDACXX_TEMPLATE_VIS handle;
 
-  _LIBCPP_HIDE_FROM_ABI basic_format_arg() noexcept
+  _LIBCUDACXX_HIDE_FROM_ABI basic_format_arg() noexcept
       : __type_{__format::__arg_t::__none} {}
 
-  _LIBCPP_HIDE_FROM_ABI explicit operator bool() const noexcept {
+  _LIBCUDACXX_HIDE_FROM_ABI explicit operator bool() const noexcept {
     return __type_ != __format::__arg_t::__none;
   }
 
@@ -245,28 +245,28 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_arg {
   __basic_format_arg_value<_Context> __value_;
   __format::__arg_t __type_;
 
-  _LIBCPP_HIDE_FROM_ABI explicit basic_format_arg(__format::__arg_t __type,
+  _LIBCUDACXX_HIDE_FROM_ABI explicit basic_format_arg(__format::__arg_t __type,
                                                   __basic_format_arg_value<_Context> __value) noexcept
       : __value_(__value), __type_(__type) {}
 };
 
 template <class _Context>
-class _LIBCPP_TEMPLATE_VIS basic_format_arg<_Context>::handle {
+class _LIBCUDACXX_TEMPLATE_VIS basic_format_arg<_Context>::handle {
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   void format(basic_format_parse_context<char_type>& __parse_ctx, _Context& __ctx) const {
     __handle_.__format_(__parse_ctx, __ctx, __handle_.__ptr_);
   }
 
-  _LIBCPP_HIDE_FROM_ABI explicit handle(typename __basic_format_arg_value<_Context>::__handle& __handle) noexcept
+  _LIBCUDACXX_HIDE_FROM_ABI explicit handle(typename __basic_format_arg_value<_Context>::__handle& __handle) noexcept
       : __handle_(__handle) {}
 
 private:
   typename __basic_format_arg_value<_Context>::__handle& __handle_;
 };
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMAT_ARG_H
+#endif // _LIBCUDACXX___FORMAT_FORMAT_ARG_H

diff  --git a/libcxx/include/__format/format_arg_store.h b/libcxx/include/__format/format_arg_store.h
index 26a5e71b93af..c29df9ffbe32 100644
--- a/libcxx/include/__format/format_arg_store.h
+++ b/libcxx/include/__format/format_arg_store.h
@@ -7,10 +7,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMAT_ARG_STORE_H
-#define _LIBCPP___FORMAT_FORMAT_ARG_STORE_H
+#ifndef _LIBCUDACXX___FORMAT_FORMAT_ARG_STORE_H
+#define _LIBCUDACXX___FORMAT_FORMAT_ARG_STORE_H
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -24,9 +24,9 @@
 #include <string_view>
 #include <type_traits>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __format {
 
@@ -47,7 +47,7 @@ template <class _Context, same_as<typename _Context::char_type> _Tp>
 consteval __arg_t __determine_arg_t() {
   return __arg_t::__char_type;
 }
-#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#  ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class _Context, class _CharT>
   requires(same_as<typename _Context::char_type, wchar_t> && same_as<_CharT, char>)
 consteval __arg_t __determine_arg_t() {
@@ -56,13 +56,13 @@ consteval __arg_t __determine_arg_t() {
 #  endif
 
 // Signed integers
-template <class, __libcpp_signed_integer _Tp>
+template <class, __LIBCUDACXX_signed_integer _Tp>
 consteval __arg_t __determine_arg_t() {
   if constexpr (sizeof(_Tp) <= sizeof(int))
     return __arg_t::__int;
   else if constexpr (sizeof(_Tp) <= sizeof(long long))
     return __arg_t::__long_long;
-#  ifndef _LIBCPP_HAS_NO_INT128
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
   else if constexpr (sizeof(_Tp) == sizeof(__int128_t))
     return __arg_t::__i128;
 #  endif
@@ -71,13 +71,13 @@ consteval __arg_t __determine_arg_t() {
 }
 
 // Unsigned integers
-template <class, __libcpp_unsigned_integer _Tp>
+template <class, __LIBCUDACXX_unsigned_integer _Tp>
 consteval __arg_t __determine_arg_t() {
   if constexpr (sizeof(_Tp) <= sizeof(unsigned))
     return __arg_t::__unsigned;
   else if constexpr (sizeof(_Tp) <= sizeof(unsigned long long))
     return __arg_t::__unsigned_long_long;
-#  ifndef _LIBCPP_HAS_NO_INT128
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
   else if constexpr (sizeof(_Tp) == sizeof(__uint128_t))
     return __arg_t::__u128;
 #  endif
@@ -153,7 +153,7 @@ template <class _Context, class _Tp>
 consteval __arg_t __determine_arg_t() = delete;
 
 template <class _Context, class _Tp>
-_LIBCPP_HIDE_FROM_ABI basic_format_arg<_Context> __create_format_arg(_Tp&& __value) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI basic_format_arg<_Context> __create_format_arg(_Tp&& __value) noexcept {
   constexpr __arg_t __arg = __determine_arg_t<_Context, remove_cvref_t<_Tp>>();
   static_assert(__arg != __arg_t::__none);
 
@@ -186,13 +186,13 @@ _LIBCPP_HIDE_FROM_ABI basic_format_arg<_Context> __create_format_arg(_Tp&& __val
     return basic_format_arg<_Context>{__arg, static_cast<const void*>(__value)};
   else if constexpr (__arg == __arg_t::__handle)
     return basic_format_arg<_Context>{
-        __arg, typename __basic_format_arg_value<_Context>::__handle{_VSTD::forward<_Tp>(__value)}};
+        __arg, typename __basic_format_arg_value<_Context>::__handle{_CUDA_VSTD::forward<_Tp>(__value)}};
   else
     return basic_format_arg<_Context>{__arg, __value};
 }
 
 template <class _Context, class... _Args>
-_LIBCPP_HIDE_FROM_ABI void __create_packed_storage(uint64_t& __types, __basic_format_arg_value<_Context>* __values,
+_LIBCUDACXX_HIDE_FROM_ABI void __create_packed_storage(uint64_t& __types, __basic_format_arg_value<_Context>* __values,
                                                    _Args&&... __args) noexcept {
   int __shift = 0;
   (
@@ -210,7 +210,7 @@ _LIBCPP_HIDE_FROM_ABI void __create_packed_storage(uint64_t& __types, __basic_fo
 }
 
 template <class _Context, class... _Args>
-_LIBCPP_HIDE_FROM_ABI void __store_basic_format_arg(basic_format_arg<_Context>* __data, _Args&&... __args) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI void __store_basic_format_arg(basic_format_arg<_Context>* __data, _Args&&... __args) noexcept {
   ([&] { *__data++ = __create_format_arg<_Context>(__args); }(), ...);
 }
 
@@ -228,8 +228,8 @@ struct __unpacked_format_arg_store {
 } // namespace __format
 
 template <class _Context, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS __format_arg_store {
-  _LIBCPP_HIDE_FROM_ABI
+struct _LIBCUDACXX_TEMPLATE_VIS __format_arg_store {
+  _LIBCUDACXX_HIDE_FROM_ABI
   __format_arg_store(_Args&... __args) noexcept {
     if constexpr (sizeof...(_Args) != 0) {
       if constexpr (__format::__use_packed_format_arg_store(sizeof...(_Args)))
@@ -246,8 +246,8 @@ struct _LIBCPP_TEMPLATE_VIS __format_arg_store {
   _Storage __storage;
 };
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMAT_ARG_STORE_H
+#endif // _LIBCUDACXX___FORMAT_FORMAT_ARG_STORE_H

diff  --git a/libcxx/include/__format/format_args.h b/libcxx/include/__format/format_args.h
index d90dc50acbd1..ee4a7541f6e7 100644
--- a/libcxx/include/__format/format_args.h
+++ b/libcxx/include/__format/format_args.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMAT_ARGS_H
-#define _LIBCPP___FORMAT_FORMAT_ARGS_H
+#ifndef _LIBCUDACXX___FORMAT_FORMAT_ARGS_H
+#define _LIBCUDACXX___FORMAT_FORMAT_ARGS_H
 
 #include <__availability>
 #include <__config>
@@ -18,21 +18,21 @@
 #include <cstddef>
 #include <cstdint>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _Context>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_args {
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT basic_format_args {
 public:
-  _LIBCPP_HIDE_FROM_ABI basic_format_args() noexcept = default;
+  _LIBCUDACXX_HIDE_FROM_ABI basic_format_args() noexcept = default;
 
   template <class... _Args>
-  _LIBCPP_HIDE_FROM_ABI basic_format_args(const __format_arg_store<_Context, _Args...>& __store) noexcept
+  _LIBCUDACXX_HIDE_FROM_ABI basic_format_args(const __format_arg_store<_Context, _Args...>& __store) noexcept
       : __size_(sizeof...(_Args)) {
     if constexpr (sizeof...(_Args) != 0) {
       if constexpr (__format::__use_packed_format_arg_store(sizeof...(_Args))) {
@@ -43,7 +43,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_args {
     }
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   basic_format_arg<_Context> get(size_t __id) const noexcept {
     if (__id >= __size_)
       return basic_format_arg<_Context>{};
@@ -54,7 +54,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_args {
     return __args_[__id];
   }
 
-  _LIBCPP_HIDE_FROM_ABI size_t __size() const noexcept { return __size_; }
+  _LIBCUDACXX_HIDE_FROM_ABI size_t __size() const noexcept { return __size_; }
 
 private:
   size_t __size_{0};
@@ -72,8 +72,8 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_args {
   };
 };
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMAT_ARGS_H
+#endif // _LIBCUDACXX___FORMAT_FORMAT_ARGS_H

diff  --git a/libcxx/include/__format/format_context.h b/libcxx/include/__format/format_context.h
index b9a41db05d51..272632941054 100644
--- a/libcxx/include/__format/format_context.h
+++ b/libcxx/include/__format/format_context.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMAT_CONTEXT_H
-#define _LIBCPP___FORMAT_FORMAT_CONTEXT_H
+#ifndef _LIBCUDACXX___FORMAT_FORMAT_CONTEXT_H
+#define _LIBCUDACXX___FORMAT_FORMAT_CONTEXT_H
 
 #include <__availability>
 #include <__config>
@@ -21,52 +21,52 @@
 #include <concepts>
 #include <cstddef>
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 #include <locale>
 #include <optional>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _OutIt, class _CharT>
 requires output_iterator<_OutIt, const _CharT&>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_context;
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT basic_format_context;
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 /**
  * Helper to create a basic_format_context.
  *
  * This is needed since the constructor is private.
  */
 template <class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI basic_format_context<_OutIt, _CharT>
+_LIBCUDACXX_HIDE_FROM_ABI basic_format_context<_OutIt, _CharT>
 __format_context_create(
     _OutIt __out_it,
     basic_format_args<basic_format_context<_OutIt, _CharT>> __args,
-    optional<_VSTD::locale>&& __loc = nullopt) {
-  return _VSTD::basic_format_context(_VSTD::move(__out_it), __args,
-                                     _VSTD::move(__loc));
+    optional<_CUDA_VSTD::locale>&& __loc = nullopt) {
+  return _CUDA_VSTD::basic_format_context(_CUDA_VSTD::move(__out_it), __args,
+                                     _CUDA_VSTD::move(__loc));
 }
 #else
 template <class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI basic_format_context<_OutIt, _CharT>
+_LIBCUDACXX_HIDE_FROM_ABI basic_format_context<_OutIt, _CharT>
 __format_context_create(
     _OutIt __out_it,
     basic_format_args<basic_format_context<_OutIt, _CharT>> __args) {
-  return _VSTD::basic_format_context(_VSTD::move(__out_it), __args);
+  return _CUDA_VSTD::basic_format_context(_CUDA_VSTD::move(__out_it), __args);
 }
 #endif
 
 using format_context =
     basic_format_context<back_insert_iterator<__format::__output_buffer<char>>,
                          char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 using wformat_context = basic_format_context<
     back_insert_iterator<__format::__output_buffer<wchar_t>>, wchar_t>;
 #endif
@@ -75,10 +75,10 @@ template <class _OutIt, class _CharT>
 requires output_iterator<_OutIt, const _CharT&>
 class
     // clang-format off
-    _LIBCPP_TEMPLATE_VIS
-    _LIBCPP_AVAILABILITY_FORMAT
-    _LIBCPP_PREFERRED_NAME(format_context)
-    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wformat_context))
+    _LIBCUDACXX_TEMPLATE_VIS
+    _LIBCUDACXX_AVAILABILITY_FORMAT
+    _LIBCUDACXX_PREFERRED_NAME(format_context)
+    _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wformat_context))
     // clang-format on
     basic_format_context {
 public:
@@ -90,24 +90,24 @@ class
   basic_format_context(const basic_format_context&) = delete;
   basic_format_context& operator=(const basic_format_context&) = delete;
 
-  _LIBCPP_HIDE_FROM_ABI basic_format_arg<basic_format_context>
+  _LIBCUDACXX_HIDE_FROM_ABI basic_format_arg<basic_format_context>
   arg(size_t __id) const noexcept {
     return __args_.get(__id);
   }
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
-  _LIBCPP_HIDE_FROM_ABI _VSTD::locale locale() {
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
+  _LIBCUDACXX_HIDE_FROM_ABI _CUDA_VSTD::locale locale() {
     if (!__loc_)
-      __loc_ = _VSTD::locale{};
+      __loc_ = _CUDA_VSTD::locale{};
     return *__loc_;
   }
 #endif
-  _LIBCPP_HIDE_FROM_ABI iterator out() { return __out_it_; }
-  _LIBCPP_HIDE_FROM_ABI void advance_to(iterator __it) { __out_it_ = __it; }
+  _LIBCUDACXX_HIDE_FROM_ABI iterator out() { return __out_it_; }
+  _LIBCUDACXX_HIDE_FROM_ABI void advance_to(iterator __it) { __out_it_ = __it; }
 
 private:
   iterator __out_it_;
   basic_format_args<basic_format_context> __args_;
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 
   // The Standard doesn't specify how the locale is stored.
   // [format.context]/6
@@ -118,34 +118,34 @@ class
   // locale() is called and the optional has no value the value will be created.
   // This allows the implementation to lazily create the locale.
   // TODO FMT Validate whether lazy creation is the best solution.
-  optional<_VSTD::locale> __loc_;
+  optional<_CUDA_VSTD::locale> __loc_;
 
   template <class __OutIt, class __CharT>
-  friend _LIBCPP_HIDE_FROM_ABI basic_format_context<__OutIt, __CharT>
+  friend _LIBCUDACXX_HIDE_FROM_ABI basic_format_context<__OutIt, __CharT>
   __format_context_create(__OutIt, basic_format_args<basic_format_context<__OutIt, __CharT>>,
-                          optional<_VSTD::locale>&&);
+                          optional<_CUDA_VSTD::locale>&&);
 
   // Note: the Standard doesn't specify the required constructors.
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   explicit basic_format_context(_OutIt __out_it,
                                 basic_format_args<basic_format_context> __args,
-                                optional<_VSTD::locale>&& __loc)
-      : __out_it_(_VSTD::move(__out_it)), __args_(__args),
-        __loc_(_VSTD::move(__loc)) {}
+                                optional<_CUDA_VSTD::locale>&& __loc)
+      : __out_it_(_CUDA_VSTD::move(__out_it)), __args_(__args),
+        __loc_(_CUDA_VSTD::move(__loc)) {}
 #else
   template <class __OutIt, class __CharT>
-  friend _LIBCPP_HIDE_FROM_ABI basic_format_context<__OutIt, __CharT>
+  friend _LIBCUDACXX_HIDE_FROM_ABI basic_format_context<__OutIt, __CharT>
       __format_context_create(__OutIt, basic_format_args<basic_format_context<__OutIt, __CharT>>);
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   explicit basic_format_context(_OutIt __out_it,
                                 basic_format_args<basic_format_context> __args)
-      : __out_it_(_VSTD::move(__out_it)), __args_(__args) {}
+      : __out_it_(_CUDA_VSTD::move(__out_it)), __args_(__args) {}
 #endif
 };
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMAT_CONTEXT_H
+#endif // _LIBCUDACXX___FORMAT_FORMAT_CONTEXT_H

diff  --git a/libcxx/include/__format/format_error.h b/libcxx/include/__format/format_error.h
index 67ff41cbc3d8..d96a095d972e 100644
--- a/libcxx/include/__format/format_error.h
+++ b/libcxx/include/__format/format_error.h
@@ -7,45 +7,45 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMAT_ERROR_H
-#define _LIBCPP___FORMAT_FORMAT_ERROR_H
+#ifndef _LIBCUDACXX___FORMAT_FORMAT_ERROR_H
+#define _LIBCUDACXX___FORMAT_FORMAT_ERROR_H
 
 #include <__config>
 #include <stdexcept>
 
-#ifdef _LIBCPP_NO_EXCEPTIONS
+#ifdef _LIBCUDACXX_NO_EXCEPTIONS
 #include <cstdlib>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-class _LIBCPP_EXCEPTION_ABI format_error : public runtime_error {
+class _LIBCUDACXX_EXCEPTION_ABI format_error : public runtime_error {
 public:
-  _LIBCPP_HIDE_FROM_ABI explicit format_error(const string& __s)
+  _LIBCUDACXX_HIDE_FROM_ABI explicit format_error(const string& __s)
       : runtime_error(__s) {}
-  _LIBCPP_HIDE_FROM_ABI explicit format_error(const char* __s)
+  _LIBCUDACXX_HIDE_FROM_ABI explicit format_error(const char* __s)
       : runtime_error(__s) {}
   virtual ~format_error() noexcept;
 };
 
-_LIBCPP_NORETURN inline _LIBCPP_HIDE_FROM_ABI void
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_HIDE_FROM_ABI void
 __throw_format_error(const char* __s) {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   throw format_error(__s);
 #else
   (void)__s;
-  _VSTD::abort();
+  _CUDA_VSTD::abort();
 #endif
 }
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMAT_ERROR_H
+#endif // _LIBCUDACXX___FORMAT_FORMAT_ERROR_H

diff  --git a/libcxx/include/__format/format_fwd.h b/libcxx/include/__format/format_fwd.h
index f7c72e21211a..8b146d64743b 100644
--- a/libcxx/include/__format/format_fwd.h
+++ b/libcxx/include/__format/format_fwd.h
@@ -7,33 +7,33 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMAT_FWD_H
-#define _LIBCPP___FORMAT_FORMAT_FWD_H
+#ifndef _LIBCUDACXX___FORMAT_FORMAT_FWD_H
+#define _LIBCUDACXX___FORMAT_FORMAT_FWD_H
 
 #include <__availability>
 #include <__config>
 #include <__iterator/concepts.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _Context>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_arg;
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT basic_format_arg;
 
 template <class _OutIt, class _CharT>
   requires output_iterator<_OutIt, const _CharT&>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_context;
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT basic_format_context;
 
 template <class _Tp, class _CharT = char>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter;
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter;
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMAT_FWD_H
+#endif // _LIBCUDACXX___FORMAT_FORMAT_FWD_H

diff  --git a/libcxx/include/__format/format_parse_context.h b/libcxx/include/__format/format_parse_context.h
index 272b615d1048..8274225d8bf8 100644
--- a/libcxx/include/__format/format_parse_context.h
+++ b/libcxx/include/__format/format_parse_context.h
@@ -7,29 +7,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMAT_PARSE_CONTEXT_H
-#define _LIBCPP___FORMAT_FORMAT_PARSE_CONTEXT_H
+#ifndef _LIBCUDACXX___FORMAT_FORMAT_PARSE_CONTEXT_H
+#define _LIBCUDACXX___FORMAT_FORMAT_PARSE_CONTEXT_H
 
 #include <__config>
 #include <__format/format_error.h>
 #include <string_view>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_parse_context {
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT basic_format_parse_context {
 public:
   using char_type = _CharT;
   using const_iterator = typename basic_string_view<_CharT>::const_iterator;
   using iterator = const_iterator;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr explicit basic_format_parse_context(basic_string_view<_CharT> __fmt,
                                                 size_t __num_args = 0) noexcept
       : __begin_(__fmt.begin()),
@@ -42,17 +42,17 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_parse_contex
   basic_format_parse_context&
   operator=(const basic_format_parse_context&) = delete;
 
-  _LIBCPP_HIDE_FROM_ABI constexpr const_iterator begin() const noexcept {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr const_iterator begin() const noexcept {
     return __begin_;
   }
-  _LIBCPP_HIDE_FROM_ABI constexpr const_iterator end() const noexcept {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr const_iterator end() const noexcept {
     return __end_;
   }
-  _LIBCPP_HIDE_FROM_ABI constexpr void advance_to(const_iterator __it) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr void advance_to(const_iterator __it) {
     __begin_ = __it;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr size_t next_arg_id() {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr size_t next_arg_id() {
     if (__indexing_ == __manual)
       __throw_format_error("Using automatic argument numbering in manual "
                            "argument numbering mode");
@@ -61,7 +61,7 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_parse_contex
       __indexing_ = __automatic;
     return __next_arg_id_++;
   }
-  _LIBCPP_HIDE_FROM_ABI constexpr void check_arg_id(size_t __id) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr void check_arg_id(size_t __id) {
     if (__indexing_ == __automatic)
       __throw_format_error("Using manual argument numbering in automatic "
                            "argument numbering mode");
@@ -90,12 +90,12 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT basic_format_parse_contex
 };
 
 using format_parse_context = basic_format_parse_context<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 using wformat_parse_context = basic_format_parse_context<wchar_t>;
 #endif
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMAT_PARSE_CONTEXT_H
+#endif // _LIBCUDACXX___FORMAT_FORMAT_PARSE_CONTEXT_H

diff  --git a/libcxx/include/__format/format_string.h b/libcxx/include/__format/format_string.h
index 51c3c7a1a6d8..7a8820bc7daf 100644
--- a/libcxx/include/__format/format_string.h
+++ b/libcxx/include/__format/format_string.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMAT_STRING_H
-#define _LIBCPP___FORMAT_FORMAT_STRING_H
+#ifndef _LIBCUDACXX___FORMAT_FORMAT_STRING_H
+#define _LIBCUDACXX___FORMAT_FORMAT_STRING_H
 
 #include <__assert>
 #include <__config>
@@ -16,24 +16,24 @@
 #include <cstddef>
 #include <cstdint>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __format {
 
 template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __parse_number_result {
+struct _LIBCUDACXX_TEMPLATE_VIS __parse_number_result {
   const _CharT* __ptr;
   uint32_t __value;
 };
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
 __parse_number(const _CharT* __begin, const _CharT* __end);
 
 /**
@@ -51,24 +51,24 @@ inline constexpr uint32_t __number_max = INT32_MAX;
 
 namespace __detail {
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
 __parse_zero(const _CharT* __begin, const _CharT*, auto& __parse_ctx) {
   __parse_ctx.check_arg_id(0);
   return {++__begin, 0}; // can never be larger than the maximum.
 }
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
 __parse_automatic(const _CharT* __begin, const _CharT*, auto& __parse_ctx) {
   size_t __value = __parse_ctx.next_arg_id();
-  _LIBCPP_ASSERT(__value <= __number_max,
+  _LIBCUDACXX_ASSERT(__value <= __number_max,
                  "Compilers don't support this number of arguments");
 
   return {__begin, uint32_t(__value)};
 }
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
 __parse_manual(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
   __parse_number_result<_CharT> __r = __parse_number(__begin, __end);
   __parse_ctx.check_arg_id(__r.__value);
@@ -84,7 +84,7 @@ __parse_manual(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
  * allows a maximum value of 2147483647.
  */
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
 __parse_number(const _CharT* __begin, const _CharT* __end_input) {
   static_assert(__format::__number_max == INT32_MAX,
                 "The algorithm is implemented based on this value.");
@@ -132,7 +132,7 @@ __parse_number(const _CharT* __begin, const _CharT* __end_input) {
  * should be the closing '}' of the arg-id.
  */
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __parse_number_result<_CharT>
 __parse_arg_id(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
   switch (*__begin) {
   case _CharT('0'):
@@ -154,8 +154,8 @@ __parse_arg_id(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
 
 } // namespace __format
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMAT_STRING_H
+#endif // _LIBCUDACXX___FORMAT_FORMAT_STRING_H

diff  --git a/libcxx/include/__format/format_to_n_result.h b/libcxx/include/__format/format_to_n_result.h
index 25caa1c9e98d..4e1c2344f977 100644
--- a/libcxx/include/__format/format_to_n_result.h
+++ b/libcxx/include/__format/format_to_n_result.h
@@ -7,28 +7,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMAT_TO_N_RESULT_H
-#define _LIBCPP___FORMAT_FORMAT_TO_N_RESULT_H
+#ifndef _LIBCUDACXX___FORMAT_FORMAT_TO_N_RESULT_H
+#define _LIBCUDACXX___FORMAT_FORMAT_TO_N_RESULT_H
 
 #include <__config>
 #include <__iterator/incrementable_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _OutIt>
-struct _LIBCPP_TEMPLATE_VIS format_to_n_result {
+struct _LIBCUDACXX_TEMPLATE_VIS format_to_n_result {
   _OutIt out;
   iter_
diff erence_t<_OutIt> size;
 };
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMAT_TO_N_RESULT_H
+#endif // _LIBCUDACXX___FORMAT_FORMAT_TO_N_RESULT_H

diff  --git a/libcxx/include/__format/formatter.h b/libcxx/include/__format/formatter.h
index 4816f961c445..3a42fac01d11 100644
--- a/libcxx/include/__format/formatter.h
+++ b/libcxx/include/__format/formatter.h
@@ -7,21 +7,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMATTER_H
-#define _LIBCPP___FORMAT_FORMATTER_H
+#ifndef _LIBCUDACXX___FORMAT_FORMATTER_H
+#define _LIBCUDACXX___FORMAT_FORMATTER_H
 
 #include <__availability>
 #include <__concepts/same_as.h>
 #include <__config>
 #include <__format/format_fwd.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 /// The default formatter template.
 ///
@@ -33,7 +33,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 /// - is_copy_assignable<F>, and
 /// - is_move_assignable<F>.
 template <class _Tp, class _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter {
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter {
   formatter() = delete;
   formatter(const formatter&) = delete;
   formatter& operator=(const formatter&) = delete;
@@ -47,8 +47,8 @@ concept __char_type = same_as<_CharT, char> || same_as<_CharT, wchar_t>;
 
 } // namespace __formatter
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMATTER_H
+#endif // _LIBCUDACXX___FORMAT_FORMATTER_H

diff  --git a/libcxx/include/__format/formatter_bool.h b/libcxx/include/__format/formatter_bool.h
index cdb0631f87d4..66bd7310961a 100644
--- a/libcxx/include/__format/formatter_bool.h
+++ b/libcxx/include/__format/formatter_bool.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMATTER_BOOL_H
-#define _LIBCPP___FORMAT_FORMATTER_BOOL_H
+#ifndef _LIBCUDACXX___FORMAT_FORMATTER_BOOL_H
+#define _LIBCUDACXX___FORMAT_FORMATTER_BOOL_H
 
 #include <__algorithm/copy.h>
 #include <__availability>
@@ -23,29 +23,29 @@
 #include <__utility/unreachable.h>
 #include <string_view>
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 #  include <locale>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<bool, _CharT> {
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<bool, _CharT> {
 public:
-  _LIBCPP_HIDE_FROM_ABI constexpr auto
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto
   parse(basic_format_parse_context<_CharT>& __parse_ctx) -> decltype(__parse_ctx.begin()) {
     auto __result = __parser_.__parse(__parse_ctx, __format_spec::__fields_integral);
     __format_spec::__process_parsed_bool(__parser_);
     return __result;
   }
 
-  _LIBCPP_HIDE_FROM_ABI auto format(bool __value, auto& __ctx) const -> decltype(__ctx.out()) {
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(bool __value, auto& __ctx) const -> decltype(__ctx.out()) {
     switch (__parser_.__type_) {
     case __format_spec::__type::__default:
     case __format_spec::__type::__string:
@@ -63,16 +63,16 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<bool, _CharT>
           static_cast<unsigned>(__value), __ctx, __parser_.__get_parsed_std_specifications(__ctx));
 
     default:
-      _LIBCPP_ASSERT(false, "The parse function should have validated the type");
-      __libcpp_unreachable();
+      _LIBCUDACXX_ASSERT(false, "The parse function should have validated the type");
+      __LIBCUDACXX_unreachable();
     }
   }
 
   __format_spec::__parser<_CharT> __parser_;
 };
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMATTER_BOOL_H
+#endif // _LIBCUDACXX___FORMAT_FORMATTER_BOOL_H

diff  --git a/libcxx/include/__format/formatter_char.h b/libcxx/include/__format/formatter_char.h
index a3ca36ec0a62..cffa9806a88d 100644
--- a/libcxx/include/__format/formatter_char.h
+++ b/libcxx/include/__format/formatter_char.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMATTER_CHAR_H
-#define _LIBCPP___FORMAT_FORMATTER_CHAR_H
+#ifndef _LIBCUDACXX___FORMAT_FORMATTER_CHAR_H
+#define _LIBCUDACXX___FORMAT_FORMATTER_CHAR_H
 
 #include <__availability>
 #include <__concepts/same_as.h>
@@ -22,25 +22,25 @@
 #include <__type_traits/conditional.h>
 #include <__type_traits/is_signed.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_char {
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT __formatter_char {
 public:
-  _LIBCPP_HIDE_FROM_ABI constexpr auto
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto
   parse(basic_format_parse_context<_CharT>& __parse_ctx) -> decltype(__parse_ctx.begin()) {
     auto __result = __parser_.__parse(__parse_ctx, __format_spec::__fields_integral);
     __format_spec::__process_parsed_char(__parser_);
     return __result;
   }
 
-  _LIBCPP_HIDE_FROM_ABI auto format(_CharT __value, auto& __ctx) const -> decltype(__ctx.out()) {
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(_CharT __value, auto& __ctx) const -> decltype(__ctx.out()) {
     if (__parser_.__type_ == __format_spec::__type::__default || __parser_.__type_ == __format_spec::__type::__char)
       return __formatter::__format_char(__value, __ctx.out(), __parser_.__get_parsed_std_specifications(__ctx));
 
@@ -55,7 +55,7 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_char {
       return __formatter::__format_integer(__value, __ctx, __parser_.__get_parsed_std_specifications(__ctx));
   }
 
-  _LIBCPP_HIDE_FROM_ABI auto format(char __value, auto& __ctx) const -> decltype(__ctx.out())
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(char __value, auto& __ctx) const -> decltype(__ctx.out())
     requires(same_as<_CharT, wchar_t>)
   {
     return format(static_cast<wchar_t>(__value), __ctx);
@@ -65,20 +65,20 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_char {
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<char, char> : public __formatter_char<char> {};
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<char, char> : public __formatter_char<char> {};
 
-#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#  ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<char, wchar_t> : public __formatter_char<wchar_t> {};
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<char, wchar_t> : public __formatter_char<wchar_t> {};
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<wchar_t, wchar_t> : public __formatter_char<wchar_t> {
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<wchar_t, wchar_t> : public __formatter_char<wchar_t> {
 };
 
-#  endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#  endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMATTER_CHAR_H
+#endif // _LIBCUDACXX___FORMAT_FORMATTER_CHAR_H

diff  --git a/libcxx/include/__format/formatter_floating_point.h b/libcxx/include/__format/formatter_floating_point.h
index 90a76193196e..41d91619bb49 100644
--- a/libcxx/include/__format/formatter_floating_point.h
+++ b/libcxx/include/__format/formatter_floating_point.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMATTER_FLOATING_POINT_H
-#define _LIBCPP___FORMAT_FORMATTER_FLOATING_POINT_H
+#ifndef _LIBCUDACXX___FORMAT_FORMATTER_FLOATING_POINT_H
+#define _LIBCUDACXX___FORMAT_FORMATTER_FLOATING_POINT_H
 
 #include <__algorithm/copy.h>
 #include <__algorithm/copy_n.h>
@@ -31,41 +31,41 @@
 #include <__utility/unreachable.h>
 #include <charconv>
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 #  include <locale>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __formatter {
 
 template <floating_point _Tp>
-_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value) {
-  to_chars_result __r = _VSTD::to_chars(__first, __last, __value);
-  _LIBCPP_ASSERT(__r.ec == errc(0), "Internal buffer too small");
+_LIBCUDACXX_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value) {
+  to_chars_result __r = _CUDA_VSTD::to_chars(__first, __last, __value);
+  _LIBCUDACXX_ASSERT(__r.ec == errc(0), "Internal buffer too small");
   return __r.ptr;
 }
 
 template <floating_point _Tp>
-_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, chars_format __fmt) {
-  to_chars_result __r = _VSTD::to_chars(__first, __last, __value, __fmt);
-  _LIBCPP_ASSERT(__r.ec == errc(0), "Internal buffer too small");
+_LIBCUDACXX_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, chars_format __fmt) {
+  to_chars_result __r = _CUDA_VSTD::to_chars(__first, __last, __value, __fmt);
+  _LIBCUDACXX_ASSERT(__r.ec == errc(0), "Internal buffer too small");
   return __r.ptr;
 }
 
 template <floating_point _Tp>
-_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, chars_format __fmt, int __precision) {
-  to_chars_result __r = _VSTD::to_chars(__first, __last, __value, __fmt, __precision);
-  _LIBCPP_ASSERT(__r.ec == errc(0), "Internal buffer too small");
+_LIBCUDACXX_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, chars_format __fmt, int __precision) {
+  to_chars_result __r = _CUDA_VSTD::to_chars(__first, __last, __value, __fmt, __precision);
+  _LIBCUDACXX_ASSERT(__r.ec == errc(0), "Internal buffer too small");
   return __r.ptr;
 }
 
@@ -133,7 +133,7 @@ struct __traits<double> {
 /// Depending on the maxium size required for a value, the buffer is allocated
 /// on the stack or the heap.
 template <floating_point _Fp>
-class _LIBCPP_TEMPLATE_VIS __float_buffer {
+class _LIBCUDACXX_TEMPLATE_VIS __float_buffer {
   using _Traits = __traits<_Fp>;
 
 public:
@@ -145,7 +145,7 @@ class _LIBCPP_TEMPLATE_VIS __float_buffer {
   // When supporting long doubles the __max_integral part becomes 4932 which
   // may be too much for some platforms. For these cases a better estimate is
   // required.
-  explicit _LIBCPP_HIDE_FROM_ABI __float_buffer(int __precision)
+  explicit _LIBCUDACXX_HIDE_FROM_ABI __float_buffer(int __precision)
       : __precision_(__precision != -1 ? __precision : _Traits::__max_fractional) {
 
     // When the precision is larger than _Traits::__max_fractional the digits in
@@ -170,19 +170,19 @@ class _LIBCPP_TEMPLATE_VIS __float_buffer {
       __begin_ = __buffer_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI ~__float_buffer() {
+  _LIBCUDACXX_HIDE_FROM_ABI ~__float_buffer() {
     if (__size_ > _Traits::__stack_buffer_size)
       allocator<char>{}.deallocate(__begin_, __size_);
   }
-  _LIBCPP_HIDE_FROM_ABI __float_buffer(const __float_buffer&) = delete;
-  _LIBCPP_HIDE_FROM_ABI __float_buffer& operator=(const __float_buffer&) = delete;
+  _LIBCUDACXX_HIDE_FROM_ABI __float_buffer(const __float_buffer&) = delete;
+  _LIBCUDACXX_HIDE_FROM_ABI __float_buffer& operator=(const __float_buffer&) = delete;
 
-  _LIBCPP_HIDE_FROM_ABI char* begin() const { return __begin_; }
-  _LIBCPP_HIDE_FROM_ABI char* end() const { return __begin_ + __size_; }
+  _LIBCUDACXX_HIDE_FROM_ABI char* begin() const { return __begin_; }
+  _LIBCUDACXX_HIDE_FROM_ABI char* end() const { return __begin_ + __size_; }
 
-  _LIBCPP_HIDE_FROM_ABI int __precision() const { return __precision_; }
-  _LIBCPP_HIDE_FROM_ABI int __num_trailing_zeros() const { return __num_trailing_zeros_; }
-  _LIBCPP_HIDE_FROM_ABI void __remove_trailing_zeros() { __num_trailing_zeros_ = 0; }
+  _LIBCUDACXX_HIDE_FROM_ABI int __precision() const { return __precision_; }
+  _LIBCUDACXX_HIDE_FROM_ABI int __num_trailing_zeros() const { return __num_trailing_zeros_; }
+  _LIBCUDACXX_HIDE_FROM_ABI void __remove_trailing_zeros() { __num_trailing_zeros_ = 0; }
 
 private:
   int __precision_;
@@ -214,10 +214,10 @@ struct __float_result {
 /// eSdd and eSdddd (S = sign, d = digit)
 ///
 /// \returns a pointer to the exponent or __last when not found.
-constexpr inline _LIBCPP_HIDE_FROM_ABI char* __find_exponent(char* __first, char* __last) {
+constexpr inline _LIBCUDACXX_HIDE_FROM_ABI char* __find_exponent(char* __first, char* __last) {
   ptr
diff _t __size = __last - __first;
   if (__size > 4) {
-    __first = __last - _VSTD::min(__size, ptr
diff _t(6));
+    __first = __last - _CUDA_VSTD::min(__size, ptr
diff _t(6));
     for (; __first != __last - 3; ++__first) {
       if (*__first == 'e')
         return __first;
@@ -227,7 +227,7 @@ constexpr inline _LIBCPP_HIDE_FROM_ABI char* __find_exponent(char* __first, char
 }
 
 template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_default(const __float_buffer<_Fp>& __buffer, _Tp __value,
+_LIBCUDACXX_HIDE_FROM_ABI __float_result __format_buffer_default(const __float_buffer<_Fp>& __buffer, _Tp __value,
                                                              char* __integral) {
   __float_result __result;
   __result.__integral = __integral;
@@ -238,7 +238,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_default(const __float_buffe
   // Constrains:
   // - There's at least one decimal digit before the radix point.
   // - The radix point, when present, is placed before the exponent.
-  __result.__radix_point = _VSTD::find(__result.__integral + 1, __result.__exponent, '.');
+  __result.__radix_point = _CUDA_VSTD::find(__result.__integral + 1, __result.__exponent, '.');
 
   // When the radix point isn't found its position is the exponent instead of
   // __result.__last.
@@ -246,7 +246,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_default(const __float_buffe
     __result.__radix_point = __result.__last;
 
   // clang-format off
-  _LIBCPP_ASSERT((__result.__integral != __result.__last) &&
+  _LIBCUDACXX_ASSERT((__result.__integral != __result.__last) &&
                  (__result.__radix_point == __result.__last || *__result.__radix_point == '.') &&
                  (__result.__exponent == __result.__last || *__result.__exponent == 'e'),
                  "Post-condition failure.");
@@ -256,7 +256,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_default(const __float_buffe
 }
 
 template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_lower_case(const __float_buffer<_Fp>& __buffer,
+_LIBCUDACXX_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_lower_case(const __float_buffer<_Fp>& __buffer,
                                                                             _Tp __value, int __precision,
                                                                             char* __integral) {
   __float_result __result;
@@ -292,14 +292,14 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_lower_case(cons
 
     char* __last = __result.__last - 2;
     __first = __last - __traits<_Fp>::__hex_precision_digits;
-    __result.__exponent = _VSTD::find(__first, __last, 'p');
+    __result.__exponent = _CUDA_VSTD::find(__first, __last, 'p');
   } else {
     __result.__radix_point = __result.__last;
     __result.__exponent = __first;
   }
 
   // clang-format off
-  _LIBCPP_ASSERT((__result.__integral != __result.__last) &&
+  _LIBCUDACXX_ASSERT((__result.__integral != __result.__last) &&
                  (__result.__radix_point == __result.__last || *__result.__radix_point == '.') &&
                  (__result.__exponent != __result.__last && *__result.__exponent == 'p'),
                  "Post-condition failure.");
@@ -309,18 +309,18 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_lower_case(cons
 }
 
 template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_upper_case(const __float_buffer<_Fp>& __buffer,
+_LIBCUDACXX_HIDE_FROM_ABI __float_result __format_buffer_hexadecimal_upper_case(const __float_buffer<_Fp>& __buffer,
                                                                             _Tp __value, int __precision,
                                                                             char* __integral) {
   __float_result __result =
       __formatter::__format_buffer_hexadecimal_lower_case(__buffer, __value, __precision, __integral);
-  _VSTD::transform(__result.__integral, __result.__exponent, __result.__integral, __hex_to_upper);
+  _CUDA_VSTD::transform(__result.__integral, __result.__exponent, __result.__integral, __hex_to_upper);
   *__result.__exponent = 'P';
   return __result;
 }
 
 template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_scientific_lower_case(const __float_buffer<_Fp>& __buffer,
+_LIBCUDACXX_HIDE_FROM_ABI __float_result __format_buffer_scientific_lower_case(const __float_buffer<_Fp>& __buffer,
                                                                            _Tp __value, int __precision,
                                                                            char* __integral) {
   __float_result __result;
@@ -329,7 +329,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_scientific_lower_case(const
       __formatter::__to_buffer(__integral, __buffer.end(), __value, chars_format::scientific, __precision);
 
   char* __first = __integral + 1;
-  _LIBCPP_ASSERT(__first != __result.__last, "No exponent present");
+  _LIBCUDACXX_ASSERT(__first != __result.__last, "No exponent present");
   if (*__first == '.') {
     __result.__radix_point = __first;
     __result.__exponent    = __formatter::__find_exponent(__first + 1, __result.__last);
@@ -339,7 +339,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_scientific_lower_case(const
   }
 
   // clang-format off
-  _LIBCPP_ASSERT((__result.__integral != __result.__last) &&
+  _LIBCUDACXX_ASSERT((__result.__integral != __result.__last) &&
                  (__result.__radix_point == __result.__last || *__result.__radix_point == '.') &&
                  (__result.__exponent != __result.__last && *__result.__exponent == 'e'),
                  "Post-condition failure.");
@@ -348,7 +348,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_scientific_lower_case(const
 }
 
 template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_scientific_upper_case(const __float_buffer<_Fp>& __buffer,
+_LIBCUDACXX_HIDE_FROM_ABI __float_result __format_buffer_scientific_upper_case(const __float_buffer<_Fp>& __buffer,
                                                                            _Tp __value, int __precision,
                                                                            char* __integral) {
   __float_result __result =
@@ -358,7 +358,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_scientific_upper_case(const
 }
 
 template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_fixed(const __float_buffer<_Fp>& __buffer, _Tp __value,
+_LIBCUDACXX_HIDE_FROM_ABI __float_result __format_buffer_fixed(const __float_buffer<_Fp>& __buffer, _Tp __value,
                                                            int __precision, char* __integral) {
   __float_result __result;
   __result.__integral = __integral;
@@ -372,7 +372,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_fixed(const __float_buffer<
   __result.__exponent = __result.__last;
 
   // clang-format off
-  _LIBCPP_ASSERT((__result.__integral != __result.__last) &&
+  _LIBCUDACXX_ASSERT((__result.__integral != __result.__last) &&
                  (__result.__radix_point == __result.__last || *__result.__radix_point == '.') &&
                  (__result.__exponent == __result.__last),
                  "Post-condition failure.");
@@ -381,7 +381,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_fixed(const __float_buffer<
 }
 
 template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_general_lower_case(__float_buffer<_Fp>& __buffer, _Tp __value,
+_LIBCUDACXX_HIDE_FROM_ABI __float_result __format_buffer_general_lower_case(__float_buffer<_Fp>& __buffer, _Tp __value,
                                                                         int __precision, char* __integral) {
 
   __buffer.__remove_trailing_zeros();
@@ -404,12 +404,12 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_general_lower_case(__float_
       // In fixed mode the algorithm truncates trailing spaces and possibly the
       // radix point. There's no good guess for the position of the radix point
       // therefore scan the output after the first digit.
-      __result.__radix_point = _VSTD::find(__first, __result.__last, '.');
+      __result.__radix_point = _CUDA_VSTD::find(__first, __result.__last, '.');
     }
   }
 
   // clang-format off
-  _LIBCPP_ASSERT((__result.__integral != __result.__last) &&
+  _LIBCUDACXX_ASSERT((__result.__integral != __result.__last) &&
                  (__result.__radix_point == __result.__last || *__result.__radix_point == '.') &&
                  (__result.__exponent == __result.__last || *__result.__exponent == 'e'),
                  "Post-condition failure.");
@@ -419,7 +419,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_general_lower_case(__float_
 }
 
 template <class _Fp, class _Tp>
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_general_upper_case(__float_buffer<_Fp>& __buffer, _Tp __value,
+_LIBCUDACXX_HIDE_FROM_ABI __float_result __format_buffer_general_upper_case(__float_buffer<_Fp>& __buffer, _Tp __value,
                                                                         int __precision, char* __integral) {
   __float_result __result = __formatter::__format_buffer_general_lower_case(__buffer, __value, __precision, __integral);
   if (__result.__exponent != __result.__last)
@@ -444,7 +444,7 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer_general_upper_case(__float_
 /// - localization needs to do grouping in the integral part.
 template <class _Fp, class _Tp>
 // TODO FMT _Fp should just be _Tp when to_chars has proper long double support.
-_LIBCPP_HIDE_FROM_ABI __float_result __format_buffer(
+_LIBCUDACXX_HIDE_FROM_ABI __float_result __format_buffer(
     __float_buffer<_Fp>& __buffer,
     _Tp __value,
     bool __negative,
@@ -481,24 +481,24 @@ _LIBCPP_HIDE_FROM_ABI __float_result __format_buffer(
     return __formatter::__format_buffer_general_upper_case(__buffer, __value, __buffer.__precision(), __first);
 
   default:
-    _LIBCPP_ASSERT(false, "The parser should have validated the type");
-    __libcpp_unreachable();
+    _LIBCUDACXX_ASSERT(false, "The parser should have validated the type");
+    __LIBCUDACXX_unreachable();
   }
 }
 
-#  ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#  ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 template <class _OutIt, class _Fp, class _CharT>
-_LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
+_LIBCUDACXX_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
     _OutIt __out_it,
     const __float_buffer<_Fp>& __buffer,
     const __float_result& __result,
-    _VSTD::locale __loc,
+    _CUDA_VSTD::locale __loc,
     __format_spec::__parsed_specifications<_CharT> __specs) {
   const auto& __np = use_facet<numpunct<_CharT>>(__loc);
   string __grouping = __np.grouping();
   char* __first = __result.__integral;
   // When no radix point or exponent are present __last will be __result.__last.
-  char* __last = _VSTD::min(__result.__radix_point, __result.__exponent);
+  char* __last = _CUDA_VSTD::min(__result.__radix_point, __result.__exponent);
 
   ptr
diff _t __digits = __last - __first;
   if (!__grouping.empty()) {
@@ -528,13 +528,13 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
   // sign and (zero padding or alignment)
   if (__zero_padding && __first != __buffer.begin())
     *__out_it++ = *__buffer.begin();
-  __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
+  __out_it = _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
   if (!__zero_padding && __first != __buffer.begin())
     *__out_it++ = *__buffer.begin();
 
   // integral part
   if (__grouping.empty()) {
-    __out_it = _VSTD::copy_n(__first, __digits, _VSTD::move(__out_it));
+    __out_it = _CUDA_VSTD::copy_n(__first, __digits, _CUDA_VSTD::move(__out_it));
   } else {
     auto __r = __grouping.rbegin();
     auto __e = __grouping.rend() - 1;
@@ -546,7 +546,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
     // This loop achieves that process by testing the termination condition
     // midway in the loop.
     while (true) {
-      __out_it = _VSTD::copy_n(__first, *__r, _VSTD::move(__out_it));
+      __out_it = _CUDA_VSTD::copy_n(__first, *__r, _CUDA_VSTD::move(__out_it));
       __first += *__r;
 
       if (__r == __e)
@@ -560,21 +560,21 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_locale_specific_form(
   // fractional part
   if (__result.__radix_point != __result.__last) {
     *__out_it++ = __np.decimal_point();
-    __out_it = _VSTD::copy(__result.__radix_point + 1, __result.__exponent, _VSTD::move(__out_it));
-    __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __buffer.__num_trailing_zeros(), _CharT('0'));
+    __out_it = _CUDA_VSTD::copy(__result.__radix_point + 1, __result.__exponent, _CUDA_VSTD::move(__out_it));
+    __out_it = _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __buffer.__num_trailing_zeros(), _CharT('0'));
   }
 
   // exponent
   if (__result.__exponent != __result.__last)
-    __out_it = _VSTD::copy(__result.__exponent, __result.__last, _VSTD::move(__out_it));
+    __out_it = _CUDA_VSTD::copy(__result.__exponent, __result.__last, _CUDA_VSTD::move(__out_it));
 
   // alignment
-  return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
+  return _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
 }
-#  endif // _LIBCPP_HAS_NO_LOCALIZATION
+#  endif // _LIBCUDACXX_HAS_NO_LOCALIZATION
 
 template <class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI _OutIt __format_floating_point_non_finite(
+_LIBCUDACXX_HIDE_FROM_ABI _OutIt __format_floating_point_non_finite(
     _OutIt __out_it, __format_spec::__parsed_specifications<_CharT> __specs, bool __negative, bool __isnan) {
   char __buffer[4];
   char* __last = __formatter::__insert_sign(__buffer, __negative, __specs.__std_.__sign_);
@@ -587,7 +587,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_floating_point_non_finite(
       __specs.__std_.__type_ == __format_spec::__type::__scientific_upper_case ||
       __specs.__std_.__type_ == __format_spec::__type::__fixed_upper_case ||
       __specs.__std_.__type_ == __format_spec::__type::__general_upper_case;
-  __last = _VSTD::copy_n(&("infnanINFNAN"[6 * __upper_case + 3 * __isnan]), 3, __last);
+  __last = _CUDA_VSTD::copy_n(&("infnanINFNAN"[6 * __upper_case + 3 * __isnan]), 3, __last);
 
   // [format.string.std]/13
   // A zero (0) character preceding the width field pads the field with
@@ -596,17 +596,17 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __format_floating_point_non_finite(
   if (__specs.__alignment_ == __format_spec::__alignment::__zero_padding)
     __specs.__alignment_ = __format_spec::__alignment::__right;
 
-  return __formatter::__write(__buffer, __last, _VSTD::move(__out_it), __specs);
+  return __formatter::__write(__buffer, __last, _CUDA_VSTD::move(__out_it), __specs);
 }
 
 template <floating_point _Tp, class _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
+_LIBCUDACXX_HIDE_FROM_ABI auto
 __format_floating_point(_Tp __value, auto& __ctx, __format_spec::__parsed_specifications<_CharT> __specs)
     -> decltype(__ctx.out()) {
-  bool __negative = _VSTD::signbit(__value);
+  bool __negative = _CUDA_VSTD::signbit(__value);
 
-  if (!_VSTD::isfinite(__value)) [[unlikely]]
-    return __formatter::__format_floating_point_non_finite(__ctx.out(), __specs, __negative, _VSTD::isnan(__value));
+  if (!_CUDA_VSTD::isfinite(__value)) [[unlikely]]
+    return __formatter::__format_floating_point_non_finite(__ctx.out(), __specs, __negative, _CUDA_VSTD::isnan(__value));
 
   // Depending on the std-format-spec string the sign and the value
   // might not be outputted together:
@@ -631,7 +631,7 @@ __format_floating_point(_Tp __value, auto& __ctx, __format_spec::__parsed_specif
     // When there is an exponent the point needs to be moved before the
     // exponent. When there's no exponent the rotate does nothing. Since
     // rotate tests whether the operation is a nop, call it unconditionally.
-    _VSTD::rotate(__result.__exponent, __result.__last - 1, __result.__last);
+    _CUDA_VSTD::rotate(__result.__exponent, __result.__last - 1, __result.__last);
     __result.__radix_point = __result.__exponent;
 
     // The radix point is always placed before the exponent.
@@ -641,7 +641,7 @@ __format_floating_point(_Tp __value, auto& __ctx, __format_spec::__parsed_specif
     ++__result.__exponent;
   }
 
-#  ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#  ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
   if (__specs.__std_.__locale_specific_form_)
     return __formatter::__format_locale_specific_form(__ctx.out(), __buffer, __result, __ctx.locale(), __specs);
 #  endif
@@ -651,14 +651,14 @@ __format_floating_point(_Tp __value, auto& __ctx, __format_spec::__parsed_specif
   if (__size + __num_trailing_zeros >= __specs.__width_) {
     if (__num_trailing_zeros && __result.__exponent != __result.__last)
       // Insert trailing zeros before exponent character.
-      return _VSTD::copy(
+      return _CUDA_VSTD::copy(
           __result.__exponent,
           __result.__last,
-          _VSTD::fill_n(
-              _VSTD::copy(__buffer.begin(), __result.__exponent, __ctx.out()), __num_trailing_zeros, _CharT('0')));
+          _CUDA_VSTD::fill_n(
+              _CUDA_VSTD::copy(__buffer.begin(), __result.__exponent, __ctx.out()), __num_trailing_zeros, _CharT('0')));
 
-    return _VSTD::fill_n(
-        _VSTD::copy(__buffer.begin(), __result.__last, __ctx.out()), __num_trailing_zeros, _CharT('0'));
+    return _CUDA_VSTD::fill_n(
+        _CUDA_VSTD::copy(__buffer.begin(), __result.__last, __ctx.out()), __num_trailing_zeros, _CharT('0'));
   }
 
   auto __out_it = __ctx.out();
@@ -677,17 +677,17 @@ __format_floating_point(_Tp __value, auto& __ctx, __format_spec::__parsed_specif
 
   if (__num_trailing_zeros)
     return __formatter::__write_using_trailing_zeros(
-        __first, __result.__last, _VSTD::move(__out_it), __specs, __size, __result.__exponent, __num_trailing_zeros);
+        __first, __result.__last, _CUDA_VSTD::move(__out_it), __specs, __size, __result.__exponent, __num_trailing_zeros);
 
-  return __formatter::__write(__first, __result.__last, _VSTD::move(__out_it), __specs, __size);
+  return __formatter::__write(__first, __result.__last, _CUDA_VSTD::move(__out_it), __specs, __size);
 }
 
 } // namespace __formatter
 
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS __formatter_floating_point {
+struct _LIBCUDACXX_TEMPLATE_VIS __formatter_floating_point {
 public:
-  _LIBCPP_HIDE_FROM_ABI constexpr auto
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto
   parse(basic_format_parse_context<_CharT>& __parse_ctx) -> decltype(__parse_ctx.begin()) {
     auto __result = __parser_.__parse(__parse_ctx, __format_spec::__fields_floating_point);
     __format_spec::__process_parsed_floating_point(__parser_);
@@ -695,7 +695,7 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_floating_point {
   }
 
   template <floating_point _Tp>
-  _LIBCPP_HIDE_FROM_ABI auto format(_Tp __value, auto& __ctx) const -> decltype(__ctx.out()) {
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(_Tp __value, auto& __ctx) const -> decltype(__ctx.out()) {
     return __formatter::__format_floating_point(__value, __ctx, __parser_.__get_parsed_std_specifications(__ctx));
   }
 
@@ -703,19 +703,19 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_floating_point {
 };
 
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<float, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<float, _CharT>
     : public __formatter_floating_point<_CharT> {};
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<double, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<double, _CharT>
     : public __formatter_floating_point<_CharT> {};
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<long double, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<long double, _CharT>
     : public __formatter_floating_point<_CharT> {};
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___FORMAT_FORMATTER_FLOATING_POINT_H
+#endif // _LIBCUDACXX___FORMAT_FORMATTER_FLOATING_POINT_H

diff  --git a/libcxx/include/__format/formatter_integer.h b/libcxx/include/__format/formatter_integer.h
index 3139c9efdf80..ac32331295dc 100644
--- a/libcxx/include/__format/formatter_integer.h
+++ b/libcxx/include/__format/formatter_integer.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMATTER_INTEGER_H
-#define _LIBCPP___FORMAT_FORMATTER_INTEGER_H
+#ifndef _LIBCUDACXX___FORMAT_FORMATTER_INTEGER_H
+#define _LIBCUDACXX___FORMAT_FORMATTER_INTEGER_H
 
 #include <__availability>
 #include <__concepts/arithmetic.h>
@@ -22,19 +22,19 @@
 #include <__type_traits/make_32_64_or_128_bit.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-    _LIBCPP_BEGIN_NAMESPACE_STD
+    _LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
     template <__formatter::__char_type _CharT>
-    struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT __formatter_integer {
+    struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT __formatter_integer {
 
 public:
-  _LIBCPP_HIDE_FROM_ABI constexpr auto
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto
   parse(basic_format_parse_context<_CharT>& __parse_ctx) -> decltype(__parse_ctx.begin()) {
     auto __result = __parser_.__parse(__parse_ctx, __format_spec::__fields_integral);
     __format_spec::__process_parsed_integer(__parser_);
@@ -42,7 +42,7 @@
   }
 
   template <integral _Tp>
-  _LIBCPP_HIDE_FROM_ABI auto format(_Tp __value, auto& __ctx) const -> decltype(__ctx.out()) {
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(_Tp __value, auto& __ctx) const -> decltype(__ctx.out()) {
     __format_spec::__parsed_specifications<_CharT> __specs = __parser_.__get_parsed_std_specifications(__ctx);
 
     if (__specs.__std_.__type_ == __format_spec::__type::__char)
@@ -60,48 +60,48 @@
 
 // Signed integral types.
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<signed char, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<signed char, _CharT>
     : public __formatter_integer<_CharT> {};
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<short, _CharT> : public __formatter_integer<_CharT> {
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<short, _CharT> : public __formatter_integer<_CharT> {
 };
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<int, _CharT> : public __formatter_integer<_CharT> {};
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<int, _CharT> : public __formatter_integer<_CharT> {};
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<long, _CharT> : public __formatter_integer<_CharT> {};
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<long, _CharT> : public __formatter_integer<_CharT> {};
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<long long, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<long long, _CharT>
     : public __formatter_integer<_CharT> {};
-#  ifndef _LIBCPP_HAS_NO_INT128
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<__int128_t, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<__int128_t, _CharT>
     : public __formatter_integer<_CharT> {};
 #  endif
 
 // Unsigned integral types.
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned char, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<unsigned char, _CharT>
     : public __formatter_integer<_CharT> {};
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned short, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<unsigned short, _CharT>
     : public __formatter_integer<_CharT> {};
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<unsigned, _CharT>
     : public __formatter_integer<_CharT> {};
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned long, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<unsigned long, _CharT>
     : public __formatter_integer<_CharT> {};
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<unsigned long long, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<unsigned long long, _CharT>
     : public __formatter_integer<_CharT> {};
-#  ifndef _LIBCPP_HAS_NO_INT128
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<__uint128_t, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<__uint128_t, _CharT>
     : public __formatter_integer<_CharT> {};
 #  endif
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMATTER_INTEGER_H
+#endif // _LIBCUDACXX___FORMAT_FORMATTER_INTEGER_H

diff  --git a/libcxx/include/__format/formatter_integral.h b/libcxx/include/__format/formatter_integral.h
index b9ed5fe80f7f..efd3da835c3d 100644
--- a/libcxx/include/__format/formatter_integral.h
+++ b/libcxx/include/__format/formatter_integral.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMATTER_INTEGRAL_H
-#define _LIBCPP___FORMAT_FORMATTER_INTEGRAL_H
+#ifndef _LIBCUDACXX___FORMAT_FORMATTER_INTEGRAL_H
+#define _LIBCUDACXX___FORMAT_FORMATTER_INTEGRAL_H
 
 #include <__concepts/arithmetic.h>
 #include <__concepts/same_as.h>
@@ -22,20 +22,20 @@
 #include <limits>
 #include <string>
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 #  include <locale>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __formatter {
 
@@ -43,7 +43,7 @@ namespace __formatter {
 // Generic
 //
 
-_LIBCPP_HIDE_FROM_ABI inline char* __insert_sign(char* __buf, bool __negative, __format_spec::__sign __sign) {
+_LIBCUDACXX_HIDE_FROM_ABI inline char* __insert_sign(char* __buf, bool __negative, __format_spec::__sign __sign) {
   if (__negative)
     *__buf++ = '-';
   else
@@ -78,8 +78,8 @@ _LIBCPP_HIDE_FROM_ABI inline char* __insert_sign(char* __buf, bool __negative, _
  * @note The grouping field of the locale is always a @c std::string,
  * regardless whether the @c std::numpunct's type is @c char or @c wchar_t.
  */
-_LIBCPP_HIDE_FROM_ABI inline string __determine_grouping(ptr
diff _t __size, const string& __grouping) {
-  _LIBCPP_ASSERT(!__grouping.empty() && __size > __grouping[0],
+_LIBCUDACXX_HIDE_FROM_ABI inline string __determine_grouping(ptr
diff _t __size, const string& __grouping) {
+  _LIBCUDACXX_ASSERT(!__grouping.empty() && __size > __grouping[0],
                  "The slow grouping formatting is used while there will be no "
                  "separators written");
   string __r;
@@ -105,7 +105,7 @@ _LIBCPP_HIDE_FROM_ABI inline string __determine_grouping(ptr
diff _t __size, const
     }
   }
 
-  __libcpp_unreachable();
+  __LIBCUDACXX_unreachable();
 }
 
 //
@@ -113,7 +113,7 @@ _LIBCPP_HIDE_FROM_ABI inline string __determine_grouping(ptr
diff _t __size, const
 //
 
 template <__formatter::__char_type _CharT>
-_LIBCPP_HIDE_FROM_ABI auto __format_char(
+_LIBCUDACXX_HIDE_FROM_ABI auto __format_char(
     integral auto __value,
     output_iterator<const _CharT&> auto __out_it,
     __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
@@ -135,7 +135,7 @@ _LIBCPP_HIDE_FROM_ABI auto __format_char(
   }
 
   const auto __c = static_cast<_CharT>(__value);
-  return __formatter::__write(_VSTD::addressof(__c), _VSTD::addressof(__c) + 1, _VSTD::move(__out_it), __specs);
+  return __formatter::__write(_CUDA_VSTD::addressof(__c), _CUDA_VSTD::addressof(__c) + 1, _CUDA_VSTD::move(__out_it), __specs);
 }
 
 //
@@ -144,11 +144,11 @@ _LIBCPP_HIDE_FROM_ABI auto __format_char(
 
 /** Wrapper around @ref to_chars, returning the output pointer. */
 template <integral _Tp>
-_LIBCPP_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, int __base) {
+_LIBCUDACXX_HIDE_FROM_ABI char* __to_buffer(char* __first, char* __last, _Tp __value, int __base) {
   // TODO FMT Evaluate code overhead due to not calling the internal function
   // directly. (Should be zero overhead.)
-  to_chars_result __r = _VSTD::to_chars(__first, __last, __value, __base);
-  _LIBCPP_ASSERT(__r.ec == errc(0), "Internal buffer too small");
+  to_chars_result __r = _CUDA_VSTD::to_chars(__first, __last, __value, __base);
+  _LIBCUDACXX_ASSERT(__r.ec == errc(0), "Internal buffer too small");
   return __r.ptr;
 }
 
@@ -198,7 +198,7 @@ consteval size_t __buffer_size() noexcept
 }
 
 template <unsigned_integral _Tp, class _CharT>
-_LIBCPP_HIDE_FROM_ABI auto __format_integer(
+_LIBCUDACXX_HIDE_FROM_ABI auto __format_integer(
     _Tp __value,
     auto& __ctx,
     __format_spec::__parsed_specifications<_CharT> __specs,
@@ -214,7 +214,7 @@ _LIBCPP_HIDE_FROM_ABI auto __format_integer(
 
   char* __last = __formatter::__to_buffer(__first, __end, __value, __base);
 
-#  ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#  ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
   if (__specs.__std_.__locale_specific_form_) {
     const auto& __np  = use_facet<numpunct<_CharT>>(__ctx.locale());
     string __grouping = __np.grouping();
@@ -243,12 +243,12 @@ _LIBCPP_HIDE_FROM_ABI auto __format_integer(
     // The zero padding is done like:
     // - Write [sign][prefix]
     // - Write data right aligned with '0' as fill character.
-    __out_it             = _VSTD::copy(__begin, __first, _VSTD::move(__out_it));
+    __out_it             = _CUDA_VSTD::copy(__begin, __first, _CUDA_VSTD::move(__out_it));
     __specs.__alignment_ = __format_spec::__alignment::__right;
     __specs.__fill_      = _CharT('0');
     int32_t __size       = __first - __begin;
 
-    __specs.__width_ -= _VSTD::min(__size, __specs.__width_);
+    __specs.__width_ -= _CUDA_VSTD::min(__size, __specs.__width_);
   }
 
   if (__specs.__std_.__type_ != __format_spec::__type::__hexadecimal_upper_case) [[likely]]
@@ -258,7 +258,7 @@ _LIBCPP_HIDE_FROM_ABI auto __format_integer(
 }
 
 template <unsigned_integral _Tp, class _CharT>
-_LIBCPP_HIDE_FROM_ABI auto __format_integer(
+_LIBCUDACXX_HIDE_FROM_ABI auto __format_integer(
     _Tp __value, auto& __ctx, __format_spec::__parsed_specifications<_CharT> __specs, bool __negative = false)
     -> decltype(__ctx.out()) {
   switch (__specs.__std_.__type_) {
@@ -291,13 +291,13 @@ _LIBCPP_HIDE_FROM_ABI auto __format_integer(
     return __formatter::__format_integer(__value, __ctx, __specs, __negative, __array.begin(), __array.end(), "0X", 16);
   }
   default:
-    _LIBCPP_ASSERT(false, "The parse function should have validated the type");
-    __libcpp_unreachable();
+    _LIBCUDACXX_ASSERT(false, "The parse function should have validated the type");
+    __LIBCUDACXX_unreachable();
   }
 }
 
 template <signed_integral _Tp, class _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
+_LIBCUDACXX_HIDE_FROM_ABI auto
 __format_integer(_Tp __value, auto& __ctx, __format_spec::__parsed_specifications<_CharT> __specs)
     -> decltype(__ctx.out()) {
   // Depending on the std-format-spec string the sign and the value
@@ -319,27 +319,27 @@ __format_integer(_Tp __value, auto& __ctx, __format_spec::__parsed_specification
 //
 
 template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __bool_strings;
+struct _LIBCUDACXX_TEMPLATE_VIS __bool_strings;
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS __bool_strings<char> {
+struct _LIBCUDACXX_TEMPLATE_VIS __bool_strings<char> {
   static constexpr string_view __true{"true"};
   static constexpr string_view __false{"false"};
 };
 
-#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#  ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-struct _LIBCPP_TEMPLATE_VIS __bool_strings<wchar_t> {
+struct _LIBCUDACXX_TEMPLATE_VIS __bool_strings<wchar_t> {
   static constexpr wstring_view __true{L"true"};
   static constexpr wstring_view __false{L"false"};
 };
 #  endif
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI auto
+_LIBCUDACXX_HIDE_FROM_ABI auto
 __format_bool(bool __value, auto& __ctx, __format_spec::__parsed_specifications<_CharT> __specs)
     -> decltype(__ctx.out()) {
-#  ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#  ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
   if (__specs.__std_.__locale_specific_form_) {
     const auto& __np           = use_facet<numpunct<_CharT>>(__ctx.locale());
     basic_string<_CharT> __str = __value ? __np.truename() : __np.falsename();
@@ -353,10 +353,10 @@ __format_bool(bool __value, auto& __ctx, __format_spec::__parsed_specifications<
 
 } // namespace __formatter
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___FORMAT_FORMATTER_INTEGRAL_H
+#endif // _LIBCUDACXX___FORMAT_FORMATTER_INTEGRAL_H

diff  --git a/libcxx/include/__format/formatter_output.h b/libcxx/include/__format/formatter_output.h
index e09534c41dff..5db352fc7ca9 100644
--- a/libcxx/include/__format/formatter_output.h
+++ b/libcxx/include/__format/formatter_output.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMATTER_OUTPUT_H
-#define _LIBCPP___FORMAT_FORMATTER_OUTPUT_H
+#ifndef _LIBCUDACXX___FORMAT_FORMATTER_OUTPUT_H
+#define _LIBCUDACXX___FORMAT_FORMATTER_OUTPUT_H
 
 #include <__algorithm/copy.h>
 #include <__algorithm/copy_n.h>
@@ -24,17 +24,17 @@
 #include <string>
 #include <string_view>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __formatter {
 
-_LIBCPP_HIDE_FROM_ABI constexpr char __hex_to_upper(char __c) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr char __hex_to_upper(char __c) {
   switch (__c) {
   case 'a':
     return 'A';
@@ -52,21 +52,21 @@ _LIBCPP_HIDE_FROM_ABI constexpr char __hex_to_upper(char __c) {
   return __c;
 }
 
-struct _LIBCPP_TYPE_VIS __padding_size_result {
+struct _LIBCUDACXX_TYPE_VIS __padding_size_result {
   size_t __before_;
   size_t __after_;
 };
 
-_LIBCPP_HIDE_FROM_ABI constexpr __padding_size_result
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __padding_size_result
 __padding_size(size_t __size, size_t __width, __format_spec::__alignment __align) {
-  _LIBCPP_ASSERT(__width > __size, "don't call this function when no padding is required");
-  _LIBCPP_ASSERT(
+  _LIBCUDACXX_ASSERT(__width > __size, "don't call this function when no padding is required");
+  _LIBCUDACXX_ASSERT(
       __align != __format_spec::__alignment::__zero_padding, "the caller should have handled the zero-padding");
 
   size_t __fill = __width - __size;
   switch (__align) {
   case __format_spec::__alignment::__zero_padding:
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
 
   case __format_spec::__alignment::__left:
     return {0, __fill};
@@ -83,11 +83,11 @@ __padding_size(size_t __size, size_t __width, __format_spec::__alignment __align
   case __format_spec::__alignment::__right:
     return {__fill, 0};
   }
-  __libcpp_unreachable();
+  __LIBCUDACXX_unreachable();
 }
 
 template <class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, const char* __begin, const char* __first,
+_LIBCUDACXX_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, const char* __begin, const char* __first,
                                                               const char* __last, string&& __grouping, _CharT __sep,
                                                               __format_spec::__parsed_specifications<_CharT> __specs) {
   int __size = (__first - __begin) +    // [sign][prefix]
@@ -97,27 +97,27 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
   __padding_size_result __padding = {0, 0};
   if (__specs.__alignment_ == __format_spec::__alignment::__zero_padding) {
     // Write [sign][prefix].
-    __out_it = _VSTD::copy(__begin, __first, _VSTD::move(__out_it));
+    __out_it = _CUDA_VSTD::copy(__begin, __first, _CUDA_VSTD::move(__out_it));
 
     if (__specs.__width_ > __size) {
       // Write zero padding.
       __padding.__before_ = __specs.__width_ - __size;
-      __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __specs.__width_ - __size, _CharT('0'));
+      __out_it = _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __specs.__width_ - __size, _CharT('0'));
     }
   } else {
     if (__specs.__width_ > __size) {
       // Determine padding and write padding.
       __padding = __padding_size(__size, __specs.__width_, __specs.__alignment_);
 
-      __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
+      __out_it = _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
     }
     // Write [sign][prefix].
-    __out_it = _VSTD::copy(__begin, __first, _VSTD::move(__out_it));
+    __out_it = _CUDA_VSTD::copy(__begin, __first, _CUDA_VSTD::move(__out_it));
   }
 
   auto __r = __grouping.rbegin();
   auto __e = __grouping.rend() - 1;
-  _LIBCPP_ASSERT(__r != __e, "The slow grouping formatting is used while "
+  _LIBCUDACXX_ASSERT(__r != __e, "The slow grouping formatting is used while "
                              "there will be no separators written.");
   // The output is divided in small groups of numbers to write:
   // - A group before the first separator.
@@ -133,10 +133,10 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
   while (true) {
     if (__specs.__std_.__type_ == __format_spec::__type::__hexadecimal_upper_case) {
       __last = __first + *__r;
-      __out_it = _VSTD::transform(__first, __last, _VSTD::move(__out_it), __hex_to_upper);
+      __out_it = _CUDA_VSTD::transform(__first, __last, _CUDA_VSTD::move(__out_it), __hex_to_upper);
       __first = __last;
     } else {
-      __out_it = _VSTD::copy_n(__first, *__r, _VSTD::move(__out_it));
+      __out_it = _CUDA_VSTD::copy_n(__first, *__r, _CUDA_VSTD::move(__out_it));
       __first += *__r;
     }
 
@@ -147,7 +147,7 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
     *__out_it++ = __sep;
   }
 
-  return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
+  return _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
 }
 
 /// Writes the input to the output with the required padding.
@@ -174,48 +174,48 @@ _LIBCPP_HIDE_FROM_ABI _OutIt __write_using_decimal_separators(_OutIt __out_it, c
 /// conversion, which means the [\a __first, \a __last) always contains elements
 /// of the type \c char.
 template <class _CharT, class _ParserCharT>
-_LIBCPP_HIDE_FROM_ABI auto __write(
+_LIBCUDACXX_HIDE_FROM_ABI auto __write(
     const _CharT* __first,
     const _CharT* __last,
     output_iterator<const _CharT&> auto __out_it,
     __format_spec::__parsed_specifications<_ParserCharT> __specs,
     ptr
diff _t __size) -> decltype(__out_it) {
-  _LIBCPP_ASSERT(__first <= __last, "Not a valid range");
+  _LIBCUDACXX_ASSERT(__first <= __last, "Not a valid range");
 
   if (__size >= __specs.__width_)
-    return _VSTD::copy(__first, __last, _VSTD::move(__out_it));
+    return _CUDA_VSTD::copy(__first, __last, _CUDA_VSTD::move(__out_it));
 
   __padding_size_result __padding = __formatter::__padding_size(__size, __specs.__width_, __specs.__std_.__alignment_);
-  __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
-  __out_it = _VSTD::copy(__first, __last, _VSTD::move(__out_it));
-  return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
+  __out_it = _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
+  __out_it = _CUDA_VSTD::copy(__first, __last, _CUDA_VSTD::move(__out_it));
+  return _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
 }
 
 /// \overload
 ///
 /// Calls the function above where \a __size = \a __last - \a __first.
 template <class _CharT, class _ParserCharT>
-_LIBCPP_HIDE_FROM_ABI auto __write(const _CharT* __first, const _CharT* __last,
+_LIBCUDACXX_HIDE_FROM_ABI auto __write(const _CharT* __first, const _CharT* __last,
                                    output_iterator<const _CharT&> auto __out_it,
                                    __format_spec::__parsed_specifications<_ParserCharT> __specs) -> decltype(__out_it) {
-  return __write(__first, __last, _VSTD::move(__out_it), __specs, __last - __first);
+  return __write(__first, __last, _CUDA_VSTD::move(__out_it), __specs, __last - __first);
 }
 
 template <class _CharT, class _ParserCharT, class _UnaryOperation>
-_LIBCPP_HIDE_FROM_ABI auto __write_transformed(const _CharT* __first, const _CharT* __last,
+_LIBCUDACXX_HIDE_FROM_ABI auto __write_transformed(const _CharT* __first, const _CharT* __last,
                                                output_iterator<const _CharT&> auto __out_it,
                                                __format_spec::__parsed_specifications<_ParserCharT> __specs,
                                                _UnaryOperation __op) -> decltype(__out_it) {
-  _LIBCPP_ASSERT(__first <= __last, "Not a valid range");
+  _LIBCUDACXX_ASSERT(__first <= __last, "Not a valid range");
 
   ptr
diff _t __size = __last - __first;
   if (__size >= __specs.__width_)
-    return _VSTD::transform(__first, __last, _VSTD::move(__out_it), __op);
+    return _CUDA_VSTD::transform(__first, __last, _CUDA_VSTD::move(__out_it), __op);
 
   __padding_size_result __padding = __padding_size(__size, __specs.__width_, __specs.__alignment_);
-  __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
-  __out_it = _VSTD::transform(__first, __last, _VSTD::move(__out_it), __op);
-  return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
+  __out_it = _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
+  __out_it = _CUDA_VSTD::transform(__first, __last, _CUDA_VSTD::move(__out_it), __op);
+  return _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
 }
 
 /// Writes additional zero's for the precision before the exponent.
@@ -227,7 +227,7 @@ _LIBCPP_HIDE_FROM_ABI auto __write_transformed(const _CharT* __first, const _Cha
 /// \param __num_trailing_zeros The number of 0's to write before the exponent
 ///                             character.
 template <class _CharT, class _ParserCharT>
-_LIBCPP_HIDE_FROM_ABI auto __write_using_trailing_zeros(
+_LIBCUDACXX_HIDE_FROM_ABI auto __write_using_trailing_zeros(
     const _CharT* __first,
     const _CharT* __last,
     output_iterator<const _CharT&> auto __out_it,
@@ -235,34 +235,34 @@ _LIBCPP_HIDE_FROM_ABI auto __write_using_trailing_zeros(
     size_t __size,
     const _CharT* __exponent,
     size_t __num_trailing_zeros) -> decltype(__out_it) {
-  _LIBCPP_ASSERT(__first <= __last, "Not a valid range");
-  _LIBCPP_ASSERT(__num_trailing_zeros > 0, "The overload not writing trailing zeros should have been used");
+  _LIBCUDACXX_ASSERT(__first <= __last, "Not a valid range");
+  _LIBCUDACXX_ASSERT(__num_trailing_zeros > 0, "The overload not writing trailing zeros should have been used");
 
   __padding_size_result __padding =
       __padding_size(__size + __num_trailing_zeros, __specs.__width_, __specs.__alignment_);
-  __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
-  __out_it = _VSTD::copy(__first, __exponent, _VSTD::move(__out_it));
-  __out_it = _VSTD::fill_n(_VSTD::move(__out_it), __num_trailing_zeros, _CharT('0'));
-  __out_it = _VSTD::copy(__exponent, __last, _VSTD::move(__out_it));
-  return _VSTD::fill_n(_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
+  __out_it = _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __padding.__before_, __specs.__fill_);
+  __out_it = _CUDA_VSTD::copy(__first, __exponent, _CUDA_VSTD::move(__out_it));
+  __out_it = _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __num_trailing_zeros, _CharT('0'));
+  __out_it = _CUDA_VSTD::copy(__exponent, __last, _CUDA_VSTD::move(__out_it));
+  return _CUDA_VSTD::fill_n(_CUDA_VSTD::move(__out_it), __padding.__after_, __specs.__fill_);
 }
 
 /// Writes a string using format's width estimation algorithm.
 ///
 /// \pre !__specs.__has_precision()
 ///
-/// \note When \c _LIBCPP_HAS_NO_UNICODE is defined the function assumes the
+/// \note When \c _LIBCUDACXX_HAS_NO_UNICODE is defined the function assumes the
 /// input is ASCII.
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI auto __write_string_no_precision(
+_LIBCUDACXX_HIDE_FROM_ABI auto __write_string_no_precision(
     basic_string_view<_CharT> __str,
     output_iterator<const _CharT&> auto __out_it,
     __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
-  _LIBCPP_ASSERT(!__specs.__has_precision(), "use __write_string");
+  _LIBCUDACXX_ASSERT(!__specs.__has_precision(), "use __write_string");
 
   // No padding -> copy the string
   if (!__specs.__has_width())
-    return _VSTD::copy(__str.begin(), __str.end(), _VSTD::move(__out_it));
+    return _CUDA_VSTD::copy(__str.begin(), __str.end(), _CUDA_VSTD::move(__out_it));
 
   // Note when the estimated width is larger than size there's no padding. So
   // there's no reason to get the real size when the estimate is larger than or
@@ -271,11 +271,11 @@ _LIBCPP_HIDE_FROM_ABI auto __write_string_no_precision(
       __format_spec::__estimate_column_width(__str, __specs.__width_, __format_spec::__column_width_rounding::__up)
           .__width_;
 
-  return __formatter::__write(__str.begin(), __str.end(), _VSTD::move(__out_it), __specs, __size);
+  return __formatter::__write(__str.begin(), __str.end(), _CUDA_VSTD::move(__out_it), __specs, __size);
 }
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI int __truncate(basic_string_view<_CharT>& __str, int __precision) {
+_LIBCUDACXX_HIDE_FROM_ABI int __truncate(basic_string_view<_CharT>& __str, int __precision) {
   __format_spec::__column_width_result<_CharT> __result =
       __format_spec::__estimate_column_width(__str, __precision, __format_spec::__column_width_rounding::__down);
   __str = basic_string_view<_CharT>{__str.begin(), __result.__last_};
@@ -284,25 +284,25 @@ _LIBCPP_HIDE_FROM_ABI int __truncate(basic_string_view<_CharT>& __str, int __pre
 
 /// Writes a string using format's width estimation algorithm.
 ///
-/// \note When \c _LIBCPP_HAS_NO_UNICODE is defined the function assumes the
+/// \note When \c _LIBCUDACXX_HAS_NO_UNICODE is defined the function assumes the
 /// input is ASCII.
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI auto __write_string(
+_LIBCUDACXX_HIDE_FROM_ABI auto __write_string(
     basic_string_view<_CharT> __str,
     output_iterator<const _CharT&> auto __out_it,
     __format_spec::__parsed_specifications<_CharT> __specs) -> decltype(__out_it) {
   if (!__specs.__has_precision())
-    return __formatter::__write_string_no_precision(__str, _VSTD::move(__out_it), __specs);
+    return __formatter::__write_string_no_precision(__str, _CUDA_VSTD::move(__out_it), __specs);
 
   int __size = __formatter::__truncate(__str, __specs.__precision_);
 
-  return __write(__str.begin(), __str.end(), _VSTD::move(__out_it), __specs, __size);
+  return __write(__str.begin(), __str.end(), _CUDA_VSTD::move(__out_it), __specs, __size);
 }
 
 } // namespace __formatter
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMATTER_OUTPUT_H
+#endif // _LIBCUDACXX___FORMAT_FORMATTER_OUTPUT_H

diff  --git a/libcxx/include/__format/formatter_pointer.h b/libcxx/include/__format/formatter_pointer.h
index 3cd4c9bba960..e4926e8acc03 100644
--- a/libcxx/include/__format/formatter_pointer.h
+++ b/libcxx/include/__format/formatter_pointer.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMATTER_POINTER_H
-#define _LIBCPP___FORMAT_FORMATTER_POINTER_H
+#ifndef _LIBCUDACXX___FORMAT_FORMATTER_POINTER_H
+#define _LIBCUDACXX___FORMAT_FORMATTER_POINTER_H
 
 #include <__availability>
 #include <__config>
@@ -21,27 +21,27 @@
 #include <cstddef>
 #include <cstdint>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS __formatter_pointer {
+struct _LIBCUDACXX_TEMPLATE_VIS __formatter_pointer {
 public:
   constexpr __formatter_pointer() { __parser_.__alignment_ = __format_spec::__alignment::__right; }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr auto
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto
   parse(basic_format_parse_context<_CharT>& __parse_ctx) -> decltype(__parse_ctx.begin()) {
     auto __result = __parser_.__parse(__parse_ctx, __format_spec::__fields_pointer);
     __format_spec::__process_display_type_pointer(__parser_.__type_);
     return __result;
   }
 
-  _LIBCPP_HIDE_FROM_ABI auto format(const void* __ptr, auto& __ctx) const -> decltype(__ctx.out()) {
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(const void* __ptr, auto& __ctx) const -> decltype(__ctx.out()) {
     __format_spec::__parsed_specifications<_CharT> __specs = __parser_.__get_parsed_std_specifications(__ctx);
     __specs.__std_.__alternate_form_                       = true;
     __specs.__std_.__type_                                 = __format_spec::__type::__hexadecimal_lower_case;
@@ -57,17 +57,17 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_pointer {
 // - template<> struct formatter<void*, charT>;
 // - template<> struct formatter<const void*, charT>;
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<nullptr_t, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<nullptr_t, _CharT>
     : public __formatter_pointer<_CharT> {};
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<void*, _CharT> : public __formatter_pointer<_CharT> {
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<void*, _CharT> : public __formatter_pointer<_CharT> {
 };
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const void*, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<const void*, _CharT>
     : public __formatter_pointer<_CharT> {};
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMATTER_POINTER_H
+#endif // _LIBCUDACXX___FORMAT_FORMATTER_POINTER_H

diff  --git a/libcxx/include/__format/formatter_string.h b/libcxx/include/__format/formatter_string.h
index 71bda4fcded1..12be748e047a 100644
--- a/libcxx/include/__format/formatter_string.h
+++ b/libcxx/include/__format/formatter_string.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_FORMATTER_STRING_H
-#define _LIBCPP___FORMAT_FORMATTER_STRING_H
+#ifndef _LIBCUDACXX___FORMAT_FORMATTER_STRING_H
+#define _LIBCUDACXX___FORMAT_FORMATTER_STRING_H
 
 #include <__availability>
 #include <__config>
@@ -21,25 +21,25 @@
 #include <string>
 #include <string_view>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS __formatter_string {
+struct _LIBCUDACXX_TEMPLATE_VIS __formatter_string {
 public:
-  _LIBCPP_HIDE_FROM_ABI constexpr auto parse(basic_format_parse_context<_CharT>& __parse_ctx)
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto parse(basic_format_parse_context<_CharT>& __parse_ctx)
       -> decltype(__parse_ctx.begin()) {
     auto __result = __parser_.__parse(__parse_ctx, __format_spec::__fields_string);
     __format_spec::__process_display_type_string(__parser_.__type_);
     return __result;
   }
 
-  _LIBCPP_HIDE_FROM_ABI auto format(basic_string_view<_CharT> __str, auto& __ctx) const -> decltype(__ctx.out()) {
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(basic_string_view<_CharT> __str, auto& __ctx) const -> decltype(__ctx.out()) {
     return __formatter::__write_string(__str, __ctx.out(), __parser_.__get_parsed_std_specifications(__ctx));
   }
 
@@ -48,12 +48,12 @@ struct _LIBCPP_TEMPLATE_VIS __formatter_string {
 
 // Formatter const char*.
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT*, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<const _CharT*, _CharT>
     : public __formatter_string<_CharT> {
   using _Base = __formatter_string<_CharT>;
 
-  _LIBCPP_HIDE_FROM_ABI auto format(const _CharT* __str, auto& __ctx) const -> decltype(__ctx.out()) {
-    _LIBCPP_ASSERT(__str, "The basic_format_arg constructor should have "
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(const _CharT* __str, auto& __ctx) const -> decltype(__ctx.out()) {
+    _LIBCUDACXX_ASSERT(__str, "The basic_format_arg constructor should have "
                           "prevented an invalid pointer.");
 
     // When using a center or right alignment and the width option the length
@@ -81,44 +81,44 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT*,
 
 // Formatter char*.
 template <__formatter::__char_type _CharT>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<_CharT*, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<_CharT*, _CharT>
     : public formatter<const _CharT*, _CharT> {
   using _Base = formatter<const _CharT*, _CharT>;
 
-  _LIBCPP_HIDE_FROM_ABI auto format(_CharT* __str, auto& __ctx) const -> decltype(__ctx.out()) {
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(_CharT* __str, auto& __ctx) const -> decltype(__ctx.out()) {
     return _Base::format(__str, __ctx);
   }
 };
 
 // Formatter char[].
 template <__formatter::__char_type _CharT, size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<_CharT[_Size], _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<_CharT[_Size], _CharT>
     : public __formatter_string<_CharT> {
   using _Base = __formatter_string<_CharT>;
 
-  _LIBCPP_HIDE_FROM_ABI auto format(_CharT __str[_Size], auto& __ctx) const -> decltype(__ctx.out()) {
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(_CharT __str[_Size], auto& __ctx) const -> decltype(__ctx.out()) {
     return _Base::format(basic_string_view<_CharT>(__str, _Size), __ctx);
   }
 };
 
 // Formatter const char[].
 template <__formatter::__char_type _CharT, size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<const _CharT[_Size], _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<const _CharT[_Size], _CharT>
     : public __formatter_string<_CharT> {
   using _Base = __formatter_string<_CharT>;
 
-  _LIBCPP_HIDE_FROM_ABI auto format(const _CharT __str[_Size], auto& __ctx) const -> decltype(__ctx.out()) {
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(const _CharT __str[_Size], auto& __ctx) const -> decltype(__ctx.out()) {
     return _Base::format(basic_string_view<_CharT>(__str, _Size), __ctx);
   }
 };
 
 // Formatter std::string.
 template <__formatter::__char_type _CharT, class _Traits, class _Allocator>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string<_CharT, _Traits, _Allocator>, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<basic_string<_CharT, _Traits, _Allocator>, _CharT>
     : public __formatter_string<_CharT> {
   using _Base = __formatter_string<_CharT>;
 
-  _LIBCPP_HIDE_FROM_ABI auto format(const basic_string<_CharT, _Traits, _Allocator>& __str, auto& __ctx) const
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(const basic_string<_CharT, _Traits, _Allocator>& __str, auto& __ctx) const
       -> decltype(__ctx.out()) {
     // Drop _Traits and _Allocator to have one std::basic_string formatter.
     return _Base::format(basic_string_view<_CharT>(__str.data(), __str.size()), __ctx);
@@ -127,19 +127,19 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string<_
 
 // Formatter std::string_view.
 template <__formatter::__char_type _CharT, class _Traits>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FORMAT formatter<basic_string_view<_CharT, _Traits>, _CharT>
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FORMAT formatter<basic_string_view<_CharT, _Traits>, _CharT>
     : public __formatter_string<_CharT> {
   using _Base = __formatter_string<_CharT>;
 
-  _LIBCPP_HIDE_FROM_ABI auto format(basic_string_view<_CharT, _Traits> __str, auto& __ctx) const
+  _LIBCUDACXX_HIDE_FROM_ABI auto format(basic_string_view<_CharT, _Traits> __str, auto& __ctx) const
       -> decltype(__ctx.out()) {
     // Drop _Traits to have one std::basic_string_view formatter.
     return _Base::format(basic_string_view<_CharT>(__str.data(), __str.size()), __ctx);
   }
 };
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_FORMATTER_STRING_H
+#endif // _LIBCUDACXX___FORMAT_FORMATTER_STRING_H

diff  --git a/libcxx/include/__format/parser_std_format_spec.h b/libcxx/include/__format/parser_std_format_spec.h
index 1425a953ebaa..eaa6185f03dc 100644
--- a/libcxx/include/__format/parser_std_format_spec.h
+++ b/libcxx/include/__format/parser_std_format_spec.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_PARSER_STD_FORMAT_SPEC_H
-#define _LIBCPP___FORMAT_PARSER_STD_FORMAT_SPEC_H
+#ifndef _LIBCUDACXX___FORMAT_PARSER_STD_FORMAT_SPEC_H
+#define _LIBCUDACXX___FORMAT_PARSER_STD_FORMAT_SPEC_H
 
 /// \file Contains the std-format-spec parser.
 ///
@@ -33,21 +33,21 @@
 #include <string_view>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __format_spec {
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr __format::__parse_number_result< _CharT>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __format::__parse_number_result< _CharT>
 __parse_arg_id(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
   // This function is a wrapper to call the real parser. But it does the
   // validation for the pre-conditions and post-conditions.
@@ -65,7 +65,7 @@ __parse_arg_id(const _CharT* __begin, const _CharT* __end, auto& __parse_ctx) {
 }
 
 template <class _Context>
-_LIBCPP_HIDE_FROM_ABI constexpr uint32_t
+_LIBCUDACXX_HIDE_FROM_ABI constexpr uint32_t
 __substitute_arg_id(basic_format_arg<_Context> __format_arg) {
   return visit_format_arg(
       [](auto __arg) -> uint32_t {
@@ -124,7 +124,7 @@ inline constexpr __fields __fields_floating_point{
 inline constexpr __fields __fields_string{.__precision_ = true, .__type_ = true};
 inline constexpr __fields __fields_pointer{.__type_ = true};
 
-enum class _LIBCPP_ENUM_VIS __alignment : uint8_t {
+enum class _LIBCUDACXX_ENUM_VIS __alignment : uint8_t {
   /// No alignment is set in the format string.
   __default,
   __left,
@@ -133,7 +133,7 @@ enum class _LIBCPP_ENUM_VIS __alignment : uint8_t {
   __zero_padding
 };
 
-enum class _LIBCPP_ENUM_VIS __sign : uint8_t {
+enum class _LIBCUDACXX_ENUM_VIS __sign : uint8_t {
   /// No sign is set in the format string.
   ///
   /// The sign isn't allowed for certain format-types. By using this value
@@ -145,7 +145,7 @@ enum class _LIBCPP_ENUM_VIS __sign : uint8_t {
   __space
 };
 
-enum class _LIBCPP_ENUM_VIS __type : uint8_t {
+enum class _LIBCUDACXX_ENUM_VIS __type : uint8_t {
   __default,
   __string,
   __binary_lower_case,
@@ -217,16 +217,16 @@ struct __parsed_specifications {
 
   _CharT __fill_;
 
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __has_width() const { return __width_ > 0; }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __has_width() const { return __width_ > 0; }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __has_precision() const { return __precision_ >= 0; }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __has_precision() const { return __precision_ >= 0; }
 };
 
 // Validate the struct is small and cheap to copy since the struct is passed by
 // value in formatting functions.
 static_assert(sizeof(__parsed_specifications<char>) == 16);
 static_assert(is_trivially_copyable_v<__parsed_specifications<char>>);
-#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#  ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 static_assert(sizeof(__parsed_specifications<wchar_t>) == 16);
 static_assert(is_trivially_copyable_v<__parsed_specifications<wchar_t>>);
 #  endif
@@ -240,9 +240,9 @@ static_assert(is_trivially_copyable_v<__parsed_specifications<wchar_t>>);
 /// set to zero. That way they can be repurposed if a future revision of the
 /// Standards adds new fields to std-format-spec.
 template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS __parser {
+class _LIBCUDACXX_TEMPLATE_VIS __parser {
 public:
-  _LIBCPP_HIDE_FROM_ABI constexpr auto __parse(basic_format_parse_context<_CharT>& __parse_ctx, __fields __fields)
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto __parse(basic_format_parse_context<_CharT>& __parse_ctx, __fields __fields)
       -> decltype(__parse_ctx.begin()) {
 
     const _CharT* __begin = __parse_ctx.begin();
@@ -285,7 +285,7 @@ class _LIBCPP_TEMPLATE_VIS __parser {
   }
 
   /// \returns the `__parsed_specifications` with the resolved dynamic sizes..
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   __parsed_specifications<_CharT> __get_parsed_std_specifications(auto& __ctx) const {
     return __parsed_specifications<_CharT>{
         .__std_ =
@@ -331,7 +331,7 @@ class _LIBCPP_TEMPLATE_VIS __parser {
   _CharT __fill_{_CharT(' ')};
 
 private:
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_alignment(_CharT __c) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __parse_alignment(_CharT __c) {
     switch (__c) {
     case _CharT('<'):
       __alignment_ = __alignment::__left;
@@ -348,8 +348,8 @@ class _LIBCPP_TEMPLATE_VIS __parser {
     return false;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_fill_align(const _CharT*& __begin, const _CharT* __end) {
-    _LIBCPP_ASSERT(__begin != __end, "when called with an empty input the function will cause "
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __parse_fill_align(const _CharT*& __begin, const _CharT* __end) {
+    _LIBCUDACXX_ASSERT(__begin != __end, "when called with an empty input the function will cause "
                                      "undefined behavior by evaluating data not in the input");
     if (__begin + 1 != __end) {
       if (__parse_alignment(*(__begin + 1))) {
@@ -369,7 +369,7 @@ class _LIBCPP_TEMPLATE_VIS __parser {
     return true;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_sign(const _CharT*& __begin) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __parse_sign(const _CharT*& __begin) {
     switch (*__begin) {
     case _CharT('-'):
       __sign_ = __sign::__minus;
@@ -387,7 +387,7 @@ class _LIBCPP_TEMPLATE_VIS __parser {
     return true;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_alternate_form(const _CharT*& __begin) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __parse_alternate_form(const _CharT*& __begin) {
     if (*__begin != _CharT('#'))
       return false;
 
@@ -396,7 +396,7 @@ class _LIBCPP_TEMPLATE_VIS __parser {
     return true;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_zero_padding(const _CharT*& __begin) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __parse_zero_padding(const _CharT*& __begin) {
     if (*__begin != _CharT('0'))
       return false;
 
@@ -406,7 +406,7 @@ class _LIBCPP_TEMPLATE_VIS __parser {
     return true;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_width(const _CharT*& __begin, const _CharT* __end, auto& __parse_ctx) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __parse_width(const _CharT*& __begin, const _CharT* __end, auto& __parse_ctx) {
     if (*__begin == _CharT('0'))
       __throw_format_error("A format-spec width field shouldn't have a leading zero");
 
@@ -423,13 +423,13 @@ class _LIBCPP_TEMPLATE_VIS __parser {
 
     __format::__parse_number_result __r = __format::__parse_number(__begin, __end);
     __width_ = __r.__value;
-    _LIBCPP_ASSERT(__width_ != 0, "A zero value isn't allowed and should be impossible, "
+    _LIBCUDACXX_ASSERT(__width_ != 0, "A zero value isn't allowed and should be impossible, "
                                   "due to validations in this function");
     __begin = __r.__ptr;
     return true;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_precision(const _CharT*& __begin, const _CharT* __end,
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __parse_precision(const _CharT*& __begin, const _CharT* __end,
                                                          auto& __parse_ctx) {
     if (*__begin != _CharT('.'))
       return false;
@@ -456,7 +456,7 @@ class _LIBCPP_TEMPLATE_VIS __parser {
     return true;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __parse_locale_specific_form(const _CharT*& __begin) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __parse_locale_specific_form(const _CharT*& __begin) {
     if (*__begin != _CharT('L'))
       return false;
 
@@ -465,7 +465,7 @@ class _LIBCPP_TEMPLATE_VIS __parser {
     return true;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr void __parse_type(const _CharT*& __begin) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr void __parse_type(const _CharT*& __begin) {
     // Determines the type. It does not validate whether the selected type is
     // valid. Most formatters have optional fields that are only allowed for
     // certain types. These parsers need to do validation after the type has
@@ -529,7 +529,7 @@ class _LIBCPP_TEMPLATE_VIS __parser {
     ++__begin;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   int32_t __get_width(auto& __ctx) const {
     if (!__width_as_arg_)
       return __width_;
@@ -540,7 +540,7 @@ class _LIBCPP_TEMPLATE_VIS __parser {
     return __result;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   int32_t __get_precision(auto& __ctx) const {
     if (!__precision_as_arg_)
       return __precision_;
@@ -551,11 +551,11 @@ class _LIBCPP_TEMPLATE_VIS __parser {
 
 // Validates whether the reserved bitfields don't change the size.
 static_assert(sizeof(__parser<char>) == 16);
-#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#  ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 static_assert(sizeof(__parser<wchar_t>) == 16);
 #  endif
 
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_string(__format_spec::__type __type) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void __process_display_type_string(__format_spec::__type __type) {
   switch (__type) {
   case __format_spec::__type::__default:
   case __format_spec::__type::__string:
@@ -567,7 +567,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_string(__format_spec
 }
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_bool_string(__parser<_CharT>& __parser) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void __process_display_type_bool_string(__parser<_CharT>& __parser) {
   if (__parser.__sign_ != __sign::__default)
     std::__throw_format_error("A sign field isn't allowed in this format-spec");
 
@@ -582,12 +582,12 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_bool_string(__parser
 }
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_char(__parser<_CharT>& __parser) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void __process_display_type_char(__parser<_CharT>& __parser) {
   __format_spec::__process_display_type_bool_string(__parser);
 }
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_bool(__parser<_CharT>& __parser) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void __process_parsed_bool(__parser<_CharT>& __parser) {
   switch (__parser.__type_) {
   case __format_spec::__type::__default:
   case __format_spec::__type::__string:
@@ -608,7 +608,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_bool(__parser<_CharT>& __p
 }
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_char(__parser<_CharT>& __parser) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void __process_parsed_char(__parser<_CharT>& __parser) {
   switch (__parser.__type_) {
   case __format_spec::__type::__default:
   case __format_spec::__type::__char:
@@ -629,7 +629,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_char(__parser<_CharT>& __p
 }
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_integer(__parser<_CharT>& __parser) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void __process_parsed_integer(__parser<_CharT>& __parser) {
   switch (__parser.__type_) {
   case __format_spec::__type::__default:
   case __format_spec::__type::__binary_lower_case:
@@ -650,7 +650,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_integer(__parser<_CharT>&
 }
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_floating_point(__parser<_CharT>& __parser) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void __process_parsed_floating_point(__parser<_CharT>& __parser) {
   switch (__parser.__type_) {
   case __format_spec::__type::__default:
     // When no precision specified then it keeps default since that
@@ -678,7 +678,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __process_parsed_floating_point(__parser<_C
   }
 }
 
-_LIBCPP_HIDE_FROM_ABI constexpr void __process_display_type_pointer(__format_spec::__type __type) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void __process_display_type_pointer(__format_spec::__type __type) {
   switch (__type) {
   case __format_spec::__type::__default:
   case __format_spec::__type::__pointer:
@@ -710,7 +710,7 @@ struct __column_width_result {
 ///   "rounded up".
 enum class __column_width_rounding { __down, __up };
 
-#  ifndef _LIBCPP_HAS_NO_UNICODE
+#  ifndef _LIBCUDACXX_HAS_NO_UNICODE
 
 namespace __detail {
 
@@ -720,8 +720,8 @@ namespace __detail {
 ///
 /// This version expects a value less than 0x1'0000, which is a 3-byte UTF-8
 /// character.
-_LIBCPP_HIDE_FROM_ABI constexpr int __column_width_3(uint32_t __c) noexcept {
-  _LIBCPP_ASSERT(__c < 0x10000, "Use __column_width_4 or __column_width for larger values");
+_LIBCUDACXX_HIDE_FROM_ABI constexpr int __column_width_3(uint32_t __c) noexcept {
+  _LIBCUDACXX_ASSERT(__c < 0x10000, "Use __column_width_4 or __column_width for larger values");
 
   // clang-format off
   return 1 + (__c >= 0x1100 && (__c <= 0x115f ||
@@ -742,8 +742,8 @@ _LIBCPP_HIDE_FROM_ABI constexpr int __column_width_3(uint32_t __c) noexcept {
 ///
 /// This version expects a value greater than or equal to 0x1'0000, which is a
 /// 4-byte UTF-8 character.
-_LIBCPP_HIDE_FROM_ABI constexpr int __column_width_4(uint32_t __c) noexcept {
-  _LIBCPP_ASSERT(__c >= 0x10000, "Use __column_width_3 or __column_width for smaller values");
+_LIBCUDACXX_HIDE_FROM_ABI constexpr int __column_width_4(uint32_t __c) noexcept {
+  _LIBCUDACXX_ASSERT(__c >= 0x10000, "Use __column_width_3 or __column_width for smaller values");
 
   // clang-format off
   return 1 + (__c >= 0x1'f300 && (__c <= 0x1'f64f ||
@@ -757,7 +757,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr int __column_width_4(uint32_t __c) noexcept {
 /// @overload
 ///
 /// The general case, accepting all values.
-_LIBCPP_HIDE_FROM_ABI constexpr int __column_width(uint32_t __c) noexcept {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr int __column_width(uint32_t __c) noexcept {
   if (__c < 0x10000)
     return __detail::__column_width_3(__c);
 
@@ -765,7 +765,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr int __column_width(uint32_t __c) noexcept {
 }
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_CharT> __estimate_column_width_grapheme_clustering(
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __column_width_result<_CharT> __estimate_column_width_grapheme_clustering(
     const _CharT* __first, const _CharT* __last, size_t __maximum, __column_width_rounding __rounding) noexcept {
   __unicode::__extended_grapheme_cluster_view<_CharT> __view{__first, __last};
 
@@ -820,7 +820,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_CharT> __estimate_column_
 // - https://en.wikipedia.org/wiki/UTF-8#Encoding
 // - https://en.wikipedia.org/wiki/UTF-16#U+D800_to_U+DFFF
 
-_LIBCPP_HIDE_FROM_ABI constexpr bool __is_ascii(char32_t __c) { return __c < 0x80; }
+_LIBCUDACXX_HIDE_FROM_ABI constexpr bool __is_ascii(char32_t __c) { return __c < 0x80; }
 
 /// Determines the number of output columns needed to render the input.
 ///
@@ -837,7 +837,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __is_ascii(char32_t __c) { return __c < 0x8
 ///                   \c __down result.__width_ <= __maximum
 ///                   \c __up result.__width_ <= __maximum + 1
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_CharT> __estimate_column_width(
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __column_width_result<_CharT> __estimate_column_width(
     basic_string_view<_CharT> __str, size_t __maximum, __column_width_rounding __rounding) noexcept {
   // The width estimation is done in two steps:
   // - Quickly process for the ASCII part. ASCII has the following properties
@@ -882,25 +882,25 @@ _LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_CharT> __estimate_column_
   __result.__width_ += __ascii_size;
   return __result;
 }
-#  else // !defined(_LIBCPP_HAS_NO_UNICODE)
+#  else // !defined(_LIBCUDACXX_HAS_NO_UNICODE)
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr __column_width_result<_CharT>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __column_width_result<_CharT>
 __estimate_column_width(basic_string_view<_CharT> __str, size_t __maximum, __column_width_rounding) noexcept {
   // When Unicode isn't supported assume ASCII and every code unit is one code
   // point. In ASCII the estimated column width is always one. Thus there's no
   // need for rounding.
-  size_t __width_ = _VSTD::min(__str.size(), __maximum);
+  size_t __width_ = _CUDA_VSTD::min(__str.size(), __maximum);
   return {__width_, __str.begin() + __width_};
 }
 
-#  endif // !defined(_LIBCPP_HAS_NO_UNICODE)
+#  endif // !defined(_LIBCUDACXX_HAS_NO_UNICODE)
 
 } // namespace __format_spec
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___FORMAT_PARSER_STD_FORMAT_SPEC_H
+#endif // _LIBCUDACXX___FORMAT_PARSER_STD_FORMAT_SPEC_H

diff  --git a/libcxx/include/__format/unicode.h b/libcxx/include/__format/unicode.h
index 3316217f4a1e..280d9912fc5a 100644
--- a/libcxx/include/__format/unicode.h
+++ b/libcxx/include/__format/unicode.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FORMAT_UNICODE_H
-#define _LIBCPP___FORMAT_UNICODE_H
+#ifndef _LIBCUDACXX___FORMAT_UNICODE_H
+#define _LIBCUDACXX___FORMAT_UNICODE_H
 
 #include <__assert>
 #include <__config>
@@ -16,15 +16,15 @@
 #include <__utility/unreachable.h>
 #include <bit>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-#  ifndef _LIBCPP_HAS_NO_UNICODE
+#  ifndef _LIBCUDACXX_HAS_NO_UNICODE
 
 /// Implements the grapheme cluster boundary rules
 ///
@@ -43,7 +43,7 @@ namespace __unicode {
 
 inline constexpr char32_t __replacement_character = U'\ufffd';
 
-_LIBCPP_HIDE_FROM_ABI constexpr bool __is_continuation(const char* __char, int __count) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr bool __is_continuation(const char* __char, int __count) {
   do {
     if ((*__char & 0b1000'0000) != 0b1000'0000)
       return false;
@@ -64,19 +64,19 @@ class __code_point_view;
 template <>
 class __code_point_view<char> {
 public:
-  _LIBCPP_HIDE_FROM_ABI constexpr explicit __code_point_view(const char* __first, const char* __last)
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr explicit __code_point_view(const char* __first, const char* __last)
       : __first_(__first), __last_(__last) {}
 
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __at_end() const noexcept { return __first_ == __last_; }
-  _LIBCPP_HIDE_FROM_ABI constexpr const char* __position() const noexcept { return __first_; }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __at_end() const noexcept { return __first_ == __last_; }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr const char* __position() const noexcept { return __first_; }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr char32_t __consume() noexcept {
-    _LIBCPP_ASSERT(__first_ != __last_, "can't move beyond the end of input");
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr char32_t __consume() noexcept {
+    _LIBCUDACXX_ASSERT(__first_ != __last_, "can't move beyond the end of input");
 
     // Based on the number of leading 1 bits the number of code units in the
     // code point can be determined. See
     // https://en.wikipedia.org/wiki/UTF-8#Encoding
-    switch (_VSTD::countl_one(static_cast<unsigned char>(*__first_))) {
+    switch (_CUDA_VSTD::countl_one(static_cast<unsigned char>(*__first_))) {
     case 0:
       return *__first_++;
 
@@ -135,14 +135,14 @@ class __code_point_view<char> {
 template <>
 class __code_point_view<wchar_t> {
 public:
-  _LIBCPP_HIDE_FROM_ABI constexpr explicit __code_point_view(const wchar_t* __first, const wchar_t* __last)
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr explicit __code_point_view(const wchar_t* __first, const wchar_t* __last)
       : __first_(__first), __last_(__last) {}
 
-  _LIBCPP_HIDE_FROM_ABI constexpr const wchar_t* __position() const noexcept { return __first_; }
-  _LIBCPP_HIDE_FROM_ABI constexpr bool __at_end() const noexcept { return __first_ == __last_; }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr const wchar_t* __position() const noexcept { return __first_; }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __at_end() const noexcept { return __first_ == __last_; }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr char32_t __consume() noexcept {
-    _LIBCPP_ASSERT(__first_ != __last_, "can't move beyond the end of input");
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr char32_t __consume() noexcept {
+    _LIBCUDACXX_ASSERT(__first_ != __last_, "can't move beyond the end of input");
 
     if constexpr (sizeof(wchar_t) == 2) {
       char32_t __result = *__first_++;
@@ -167,8 +167,8 @@ class __code_point_view<wchar_t> {
       return __result;
     } else {
       // TODO FMT P2593R0 Use static_assert(false, "sizeof(wchar_t) has a not implemented value");
-      _LIBCPP_ASSERT(sizeof(wchar_t) == 0, "sizeof(wchar_t) has a not implemented value");
-      __libcpp_unreachable();
+      _LIBCUDACXX_ASSERT(sizeof(wchar_t) == 0, "sizeof(wchar_t) has a not implemented value");
+      __LIBCUDACXX_unreachable();
     }
   }
 
@@ -178,7 +178,7 @@ class __code_point_view<wchar_t> {
 };
 #    endif
 
-_LIBCPP_HIDE_FROM_ABI constexpr bool __at_extended_grapheme_cluster_break(
+_LIBCUDACXX_HIDE_FROM_ABI constexpr bool __at_extended_grapheme_cluster_break(
     bool& __ri_break_allowed,
     bool __has_extened_pictographic,
     __extended_grapheme_custer_property_boundary::__property __prev,
@@ -191,8 +191,8 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __at_extended_grapheme_cluster_break(
 
   // *** Break at the start and end of text, unless the text is empty. ***
 
-  _LIBCPP_ASSERT(__prev != __property::__sot, "should be handled in the constructor"); // GB1
-  _LIBCPP_ASSERT(__prev != __property::__eot, "should be handled by our caller");      // GB2
+  _LIBCUDACXX_ASSERT(__prev != __property::__sot, "should be handled in the constructor"); // GB1
+  _LIBCUDACXX_ASSERT(__prev != __property::__eot, "should be handled by our caller");      // GB2
 
   // *** Do not break between a CR and LF. Otherwise, break before and after controls. ***
   if (__prev == __property::__CR && __next == __property::__LF) // GB3
@@ -269,7 +269,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __at_extended_grapheme_cluster_break(
 template <class _CharT>
 class __extended_grapheme_cluster_view {
 public:
-  _LIBCPP_HIDE_FROM_ABI constexpr explicit __extended_grapheme_cluster_view(const _CharT* __first, const _CharT* __last)
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr explicit __extended_grapheme_cluster_view(const _CharT* __first, const _CharT* __last)
       : __code_point_view_(__first, __last),
         __next_code_point_(__code_point_view_.__consume()),
         __next_prop_(__extended_grapheme_custer_property_boundary::__get_property(__next_code_point_)) {}
@@ -288,8 +288,8 @@ class __extended_grapheme_cluster_view {
     const _CharT* __last_;
   };
 
-  _LIBCPP_HIDE_FROM_ABI constexpr __cluster __consume() {
-    _LIBCPP_ASSERT(
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __cluster __consume() {
+    _LIBCUDACXX_ASSERT(
         __next_prop_ != __extended_grapheme_custer_property_boundary::__property::__eot,
         "can't move beyond the end of input");
     char32_t __code_point = __next_code_point_;
@@ -306,7 +306,7 @@ class __extended_grapheme_cluster_view {
   char32_t __next_code_point_;
   __extended_grapheme_custer_property_boundary::__property __next_prop_;
 
-  _LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __get_break() {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr const _CharT* __get_break() {
     bool __ri_break_allowed         = true;
     bool __has_extened_pictographic = false;
     while (true) {
@@ -330,10 +330,10 @@ class __extended_grapheme_cluster_view {
 
 } // namespace __unicode
 
-#  endif //  _LIBCPP_HAS_NO_UNICODE
+#  endif //  _LIBCUDACXX_HAS_NO_UNICODE
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_UNICODE_H
+#endif // _LIBCUDACXX___FORMAT_UNICODE_H

diff  --git a/libcxx/include/__functional/binary_function.h b/libcxx/include/__functional/binary_function.h
index fdedb8b177da..3ee21f151ba8 100644
--- a/libcxx/include/__functional/binary_function.h
+++ b/libcxx/include/__functional/binary_function.h
@@ -7,48 +7,48 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H
-#define _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_BINARY_FUNCTION_H
+#define _LIBCUDACXX___FUNCTIONAL_BINARY_FUNCTION_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
 
 template <class _Arg1, class _Arg2, class _Result>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binary_function
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 binary_function
 {
     typedef _Arg1   first_argument_type;
     typedef _Arg2   second_argument_type;
     typedef _Result result_type;
 };
 
-#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
+#endif // _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
 
 template <class _Arg1, class _Arg2, class _Result> struct __binary_function_keep_layout_base {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-  using first_argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg1;
-  using second_argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg2;
-  using result_type _LIBCPP_DEPRECATED_IN_CXX17 = _Result;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+  using first_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Arg1;
+  using second_argument_type _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Arg2;
+  using result_type _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Result;
 #endif
 };
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
-_LIBCPP_DIAGNOSTIC_PUSH
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
+_LIBCUDACXX_DIAGNOSTIC_PUSH
+_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
 template <class _Arg1, class _Arg2, class _Result>
 using __binary_function = binary_function<_Arg1, _Arg2, _Result>;
-_LIBCPP_DIAGNOSTIC_POP
+_LIBCUDACXX_DIAGNOSTIC_POP
 #else
 template <class _Arg1, class _Arg2, class _Result>
 using __binary_function = __binary_function_keep_layout_base<_Arg1, _Arg2, _Result>;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_BINARY_FUNCTION_H
+#endif // _LIBCUDACXX___FUNCTIONAL_BINARY_FUNCTION_H

diff  --git a/libcxx/include/__functional/binary_negate.h b/libcxx/include/__functional/binary_negate.h
index c4977f4ebe12..18023dbef5b5 100644
--- a/libcxx/include/__functional/binary_negate.h
+++ b/libcxx/include/__functional/binary_negate.h
@@ -7,44 +7,44 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_BINARY_NEGATE_H
-#define _LIBCPP___FUNCTIONAL_BINARY_NEGATE_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_BINARY_NEGATE_H
+#define _LIBCUDACXX___FUNCTIONAL_BINARY_NEGATE_H
 
 #include <__config>
 #include <__functional/binary_function.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS)
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS)
 
 template <class _Predicate>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 binary_negate
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 binary_negate
     : public __binary_function<typename _Predicate::first_argument_type,
                                typename _Predicate::second_argument_type,
                                bool>
 {
     _Predicate __pred_;
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY explicit _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     binary_negate(const _Predicate& __pred) : __pred_(__pred) {}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const typename _Predicate::first_argument_type& __x,
                     const typename _Predicate::second_argument_type& __y) const
         {return !__pred_(__x, __y);}
 };
 
 template <class _Predicate>
-_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX17 inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 binary_negate<_Predicate>
 not2(const _Predicate& __pred) {return binary_negate<_Predicate>(__pred);}
 
-#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS)
+#endif // _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_BINARY_NEGATE_H
+#endif // _LIBCUDACXX___FUNCTIONAL_BINARY_NEGATE_H

diff  --git a/libcxx/include/__functional/bind.h b/libcxx/include/__functional/bind.h
index d1cbbb3d916e..cba2682eff0c 100644
--- a/libcxx/include/__functional/bind.h
+++ b/libcxx/include/__functional/bind.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_BIND_H
-#define _LIBCPP___FUNCTIONAL_BIND_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_BIND_H
+#define _LIBCUDACXX___FUNCTIONAL_BIND_H
 
 #include <__config>
 #include <__functional/invoke.h>
@@ -17,11 +17,11 @@
 #include <tuple>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _Tp>
 struct is_bind_expression : _If<
@@ -30,7 +30,7 @@ struct is_bind_expression : _If<
     is_bind_expression<__uncvref_t<_Tp> >
 > {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr size_t is_bind_expression_v = is_bind_expression<_Tp>::value;
 #endif
@@ -42,7 +42,7 @@ struct is_placeholder : _If<
     is_placeholder<__uncvref_t<_Tp> >
 > {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr size_t is_placeholder_v = is_placeholder<_Tp>::value;
 #endif
@@ -52,17 +52,17 @@ namespace placeholders
 
 template <int _Np> struct __ph {};
 
-#if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY)
-_LIBCPP_FUNC_VIS extern const __ph<1>   _1;
-_LIBCPP_FUNC_VIS extern const __ph<2>   _2;
-_LIBCPP_FUNC_VIS extern const __ph<3>   _3;
-_LIBCPP_FUNC_VIS extern const __ph<4>   _4;
-_LIBCPP_FUNC_VIS extern const __ph<5>   _5;
-_LIBCPP_FUNC_VIS extern const __ph<6>   _6;
-_LIBCPP_FUNC_VIS extern const __ph<7>   _7;
-_LIBCPP_FUNC_VIS extern const __ph<8>   _8;
-_LIBCPP_FUNC_VIS extern const __ph<9>   _9;
-_LIBCPP_FUNC_VIS extern const __ph<10> _10;
+#if defined(_LIBCUDACXX_CXX03_LANG) || defined(_LIBCUDACXX_BUILDING_LIBRARY)
+_LIBCUDACXX_FUNC_VIS extern const __ph<1>   _1;
+_LIBCUDACXX_FUNC_VIS extern const __ph<2>   _2;
+_LIBCUDACXX_FUNC_VIS extern const __ph<3>   _3;
+_LIBCUDACXX_FUNC_VIS extern const __ph<4>   _4;
+_LIBCUDACXX_FUNC_VIS extern const __ph<5>   _5;
+_LIBCUDACXX_FUNC_VIS extern const __ph<6>   _6;
+_LIBCUDACXX_FUNC_VIS extern const __ph<7>   _7;
+_LIBCUDACXX_FUNC_VIS extern const __ph<8>   _8;
+_LIBCUDACXX_FUNC_VIS extern const __ph<9>   _9;
+_LIBCUDACXX_FUNC_VIS extern const __ph<10> _10;
 #else
 /* inline */ constexpr __ph<1>   _1{};
 /* inline */ constexpr __ph<2>   _2{};
@@ -74,7 +74,7 @@ _LIBCPP_FUNC_VIS extern const __ph<10> _10;
 /* inline */ constexpr __ph<8>   _8{};
 /* inline */ constexpr __ph<9>   _9{};
 /* inline */ constexpr __ph<10> _10{};
-#endif // defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY)
+#endif // defined(_LIBCUDACXX_CXX03_LANG) || defined(_LIBCUDACXX_BUILDING_LIBRARY)
 
 } // namespace placeholders
 
@@ -83,10 +83,10 @@ struct is_placeholder<placeholders::__ph<_Np> >
     : public integral_constant<int, _Np> {};
 
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Uj>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _Tp&
 __mu(reference_wrapper<_Tp> __t, _Uj&)
 {
@@ -94,15 +94,15 @@ __mu(reference_wrapper<_Tp> __t, _Uj&)
 }
 
 template <class _Ti, class ..._Uj, size_t ..._Indx>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename __invoke_of<_Ti&, _Uj...>::type
 __mu_expand(_Ti& __ti, tuple<_Uj...>& __uj, __tuple_indices<_Indx...>)
 {
-    return __ti(_VSTD::forward<_Uj>(_VSTD::get<_Indx>(__uj))...);
+    return __ti(_CUDA_VSTD::forward<_Uj>(_CUDA_VSTD::get<_Indx>(__uj))...);
 }
 
 template <class _Ti, class ..._Uj>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename __enable_if_t
 <
     is_bind_expression<_Ti>::value,
@@ -111,7 +111,7 @@ typename __enable_if_t
 __mu(_Ti& __ti, tuple<_Uj...>& __uj)
 {
     typedef typename __make_tuple_indices<sizeof...(_Uj)>::type __indices;
-    return _VSTD::__mu_expand(__ti, __uj, __indices());
+    return _CUDA_VSTD::__mu_expand(__ti, __uj, __indices());
 }
 
 template <bool IsPh, class _Ti, class _Uj>
@@ -124,7 +124,7 @@ struct __mu_return2<true, _Ti, _Uj>
 };
 
 template <class _Ti, class _Uj>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     0 < is_placeholder<_Ti>::value,
@@ -133,11 +133,11 @@ typename enable_if
 __mu(_Ti&, _Uj& __uj)
 {
     const size_t _Indx = is_placeholder<_Ti>::value - 1;
-    return _VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(_VSTD::get<_Indx>(__uj));
+    return _CUDA_VSTD::forward<typename tuple_element<_Indx, _Uj>::type>(_CUDA_VSTD::get<_Indx>(__uj));
 }
 
 template <class _Ti, class _Uj>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     !is_bind_expression<_Ti>::value &&
@@ -255,12 +255,12 @@ struct __bind_return<_Fp, const tuple<_BoundArgs...>, _TupleUj, true>
 };
 
 template <class _Fp, class _BoundArgs, size_t ..._Indx, class _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename __bind_return<_Fp, _BoundArgs, _Args>::type
 __apply_functor(_Fp& __f, _BoundArgs& __bound_args, __tuple_indices<_Indx...>,
                 _Args&& __args)
 {
-    return _VSTD::__invoke(__f, _VSTD::__mu(_VSTD::get<_Indx>(__bound_args), __args)...);
+    return _CUDA_VSTD::__invoke(__f, _CUDA_VSTD::__mu(_CUDA_VSTD::get<_Indx>(__bound_args), __args)...);
 }
 
 template<class _Fp, class ..._BoundArgs>
@@ -282,27 +282,27 @@ class __bind : public __weak_result_type<typename decay<_Fp>::type>
                                   !is_same<typename remove_reference<_Gp>::type,
                                            __bind>::value
                                >::type>
-      _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+      _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
       explicit __bind(_Gp&& __f, _BA&& ...__bound_args)
-        : __f_(_VSTD::forward<_Gp>(__f)),
-          __bound_args_(_VSTD::forward<_BA>(__bound_args)...) {}
+        : __f_(_CUDA_VSTD::forward<_Gp>(__f)),
+          __bound_args_(_CUDA_VSTD::forward<_BA>(__bound_args)...) {}
 
     template <class ..._Args>
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type
         operator()(_Args&& ...__args)
         {
-            return _VSTD::__apply_functor(__f_, __bound_args_, __indices(),
-                                  tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...));
+            return _CUDA_VSTD::__apply_functor(__f_, __bound_args_, __indices(),
+                                  tuple<_Args&&...>(_CUDA_VSTD::forward<_Args>(__args)...));
         }
 
     template <class ..._Args>
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type
         operator()(_Args&& ...__args) const
         {
-            return _VSTD::__apply_functor(__f_, __bound_args_, __indices(),
-                                   tuple<_Args&&...>(_VSTD::forward<_Args>(__args)...));
+            return _CUDA_VSTD::__apply_functor(__f_, __bound_args_, __indices(),
+                                   tuple<_Args&&...>(_CUDA_VSTD::forward<_Args>(__args)...));
         }
 };
 
@@ -327,13 +327,13 @@ class __bind_r
                                   !is_same<typename remove_reference<_Gp>::type,
                                            __bind_r>::value
                                >::type>
-      _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+      _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
       explicit __bind_r(_Gp&& __f, _BA&& ...__bound_args)
-        : base(_VSTD::forward<_Gp>(__f),
-               _VSTD::forward<_BA>(__bound_args)...) {}
+        : base(_CUDA_VSTD::forward<_Gp>(__f),
+               _CUDA_VSTD::forward<_BA>(__bound_args)...) {}
 
     template <class ..._Args>
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         typename enable_if
         <
             is_convertible<typename __bind_return<_Fd, _Td, tuple<_Args&&...> >::type,
@@ -343,11 +343,11 @@ class __bind_r
         operator()(_Args&& ...__args)
         {
             typedef __invoke_void_return_wrapper<_Rp> _Invoker;
-            return _Invoker::__call(static_cast<base&>(*this), _VSTD::forward<_Args>(__args)...);
+            return _Invoker::__call(static_cast<base&>(*this), _CUDA_VSTD::forward<_Args>(__args)...);
         }
 
     template <class ..._Args>
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         typename enable_if
         <
             is_convertible<typename __bind_return<const _Fd, const _Td, tuple<_Args&&...> >::type,
@@ -357,7 +357,7 @@ class __bind_r
         operator()(_Args&& ...__args) const
         {
             typedef __invoke_void_return_wrapper<_Rp> _Invoker;
-            return _Invoker::__call(static_cast<base const&>(*this), _VSTD::forward<_Args>(__args)...);
+            return _Invoker::__call(static_cast<base const&>(*this), _CUDA_VSTD::forward<_Args>(__args)...);
         }
 };
 
@@ -365,25 +365,25 @@ template<class _Rp, class _Fp, class ..._BoundArgs>
 struct is_bind_expression<__bind_r<_Rp, _Fp, _BoundArgs...> > : public true_type {};
 
 template<class _Fp, class ..._BoundArgs>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __bind<_Fp, _BoundArgs...>
 bind(_Fp&& __f, _BoundArgs&&... __bound_args)
 {
     typedef __bind<_Fp, _BoundArgs...> type;
-    return type(_VSTD::forward<_Fp>(__f), _VSTD::forward<_BoundArgs>(__bound_args)...);
+    return type(_CUDA_VSTD::forward<_Fp>(__f), _CUDA_VSTD::forward<_BoundArgs>(__bound_args)...);
 }
 
 template<class _Rp, class _Fp, class ..._BoundArgs>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __bind_r<_Rp, _Fp, _BoundArgs...>
 bind(_Fp&& __f, _BoundArgs&&... __bound_args)
 {
     typedef __bind_r<_Rp, _Fp, _BoundArgs...> type;
-    return type(_VSTD::forward<_Fp>(__f), _VSTD::forward<_BoundArgs>(__bound_args)...);
+    return type(_CUDA_VSTD::forward<_Fp>(__f), _CUDA_VSTD::forward<_BoundArgs>(__bound_args)...);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_BIND_H
+#endif // _LIBCUDACXX___FUNCTIONAL_BIND_H

diff  --git a/libcxx/include/__functional/bind_back.h b/libcxx/include/__functional/bind_back.h
index f0a6e49875a3..5f0e58d2fc97 100644
--- a/libcxx/include/__functional/bind_back.h
+++ b/libcxx/include/__functional/bind_back.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_BIND_BACK_H
-#define _LIBCPP___FUNCTIONAL_BIND_BACK_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_BIND_BACK_H
+#define _LIBCUDACXX___FUNCTIONAL_BIND_BACK_H
 
 #include <__config>
 #include <__functional/invoke.h>
@@ -18,13 +18,13 @@
 #include <tuple>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <size_t _NBound, class = make_index_sequence<_NBound>>
 struct __bind_back_op;
@@ -32,10 +32,10 @@ struct __bind_back_op;
 template <size_t _NBound, size_t ..._Ip>
 struct __bind_back_op<_NBound, index_sequence<_Ip...>> {
     template <class _Fn, class _BoundArgs, class... _Args>
-    _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Fn&& __f, _BoundArgs&& __bound_args, _Args&&... __args) const
-        noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_BoundArgs>(__bound_args))...)))
-        -> decltype(      _VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_BoundArgs>(__bound_args))...))
-        { return          _VSTD::invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)..., _VSTD::get<_Ip>(_VSTD::forward<_BoundArgs>(__bound_args))...); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Fn&& __f, _BoundArgs&& __bound_args, _Args&&... __args) const
+        noexcept(noexcept(_CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fn>(__f), _CUDA_VSTD::forward<_Args>(__args)..., _CUDA_VSTD::get<_Ip>(_CUDA_VSTD::forward<_BoundArgs>(__bound_args))...)))
+        -> decltype(      _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fn>(__f), _CUDA_VSTD::forward<_Args>(__args)..., _CUDA_VSTD::get<_Ip>(_CUDA_VSTD::forward<_BoundArgs>(__bound_args))...))
+        { return          _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fn>(__f), _CUDA_VSTD::forward<_Args>(__args)..., _CUDA_VSTD::get<_Ip>(_CUDA_VSTD::forward<_BoundArgs>(__bound_args))...); }
 };
 
 template <class _Fn, class _BoundArgs>
@@ -51,14 +51,14 @@ template <class _Fn, class ..._Args, class = enable_if_t<
         is_move_constructible<decay_t<_Args>>...
     >::value
 >>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr auto __bind_back(_Fn&& __f, _Args&&... __args)
-    noexcept(noexcept(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...))))
-    -> decltype(      __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)))
-    { return          __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_VSTD::forward<_Fn>(__f), _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)); }
+    noexcept(noexcept(__bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_CUDA_VSTD::forward<_Fn>(__f), _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Args>(__args)...))))
+    -> decltype(      __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_CUDA_VSTD::forward<_Fn>(__f), _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Args>(__args)...)))
+    { return          __bind_back_t<decay_t<_Fn>, tuple<decay_t<_Args>...>>(_CUDA_VSTD::forward<_Fn>(__f), _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Args>(__args)...)); }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_BIND_BACK_H
+#endif // _LIBCUDACXX___FUNCTIONAL_BIND_BACK_H

diff  --git a/libcxx/include/__functional/bind_front.h b/libcxx/include/__functional/bind_front.h
index 22fb3a69dc75..48065079dfba 100644
--- a/libcxx/include/__functional/bind_front.h
+++ b/libcxx/include/__functional/bind_front.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_BIND_FRONT_H
-#define _LIBCPP___FUNCTIONAL_BIND_FRONT_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_BIND_FRONT_H
+#define _LIBCUDACXX___FUNCTIONAL_BIND_FRONT_H
 
 #include <__config>
 #include <__functional/invoke.h>
@@ -16,21 +16,21 @@
 #include <__utility/forward.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 struct __bind_front_op {
     template <class ..._Args>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Args&& ...__args) const
-        noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Args>(__args)...)))
-        -> decltype(      _VSTD::invoke(_VSTD::forward<_Args>(__args)...))
-        { return          _VSTD::invoke(_VSTD::forward<_Args>(__args)...); }
+        noexcept(noexcept(_CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Args>(__args)...)))
+        -> decltype(      _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Args>(__args)...))
+        { return          _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Args>(__args)...); }
 };
 
 template <class _Fn, class ..._BoundArgs>
@@ -46,13 +46,13 @@ template <class _Fn, class... _Args, class = enable_if_t<
         is_move_constructible<decay_t<_Args>>...
     >::value
 >>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr auto bind_front(_Fn&& __f, _Args&&... __args) {
-    return __bind_front_t<decay_t<_Fn>, decay_t<_Args>...>(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...);
+    return __bind_front_t<decay_t<_Fn>, decay_t<_Args>...>(_CUDA_VSTD::forward<_Fn>(__f), _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_BIND_FRONT_H
+#endif // _LIBCUDACXX___FUNCTIONAL_BIND_FRONT_H

diff  --git a/libcxx/include/__functional/binder1st.h b/libcxx/include/__functional/binder1st.h
index dea22c70e1f2..7fc0606bfcb8 100644
--- a/libcxx/include/__functional/binder1st.h
+++ b/libcxx/include/__functional/binder1st.h
@@ -7,47 +7,47 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_BINDER1ST_H
-#define _LIBCPP___FUNCTIONAL_BINDER1ST_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_BINDER1ST_H
+#define _LIBCUDACXX___FUNCTIONAL_BINDER1ST_H
 
 #include <__config>
 #include <__functional/unary_function.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)
 
 template <class __Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder1st
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 binder1st
     : public __unary_function<typename __Operation::second_argument_type, typename __Operation::result_type>
 {
 protected:
     __Operation                               op;
     typename __Operation::first_argument_type value;
 public:
-    _LIBCPP_INLINE_VISIBILITY binder1st(const __Operation& __x,
+    _LIBCUDACXX_INLINE_VISIBILITY binder1st(const __Operation& __x,
                                const typename __Operation::first_argument_type __y)
         : op(__x), value(__y) {}
-    _LIBCPP_INLINE_VISIBILITY typename __Operation::result_type operator()
+    _LIBCUDACXX_INLINE_VISIBILITY typename __Operation::result_type operator()
         (typename __Operation::second_argument_type& __x) const
             {return op(value, __x);}
-    _LIBCPP_INLINE_VISIBILITY typename __Operation::result_type operator()
+    _LIBCUDACXX_INLINE_VISIBILITY typename __Operation::result_type operator()
         (const typename __Operation::second_argument_type& __x) const
             {return op(value, __x);}
 };
 
 template <class __Operation, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 binder1st<__Operation>
 bind1st(const __Operation& __op, const _Tp& __x)
     {return binder1st<__Operation>(__op, __x);}
 
-#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
+#endif // _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_BINDER1ST_H
+#endif // _LIBCUDACXX___FUNCTIONAL_BINDER1ST_H

diff  --git a/libcxx/include/__functional/binder2nd.h b/libcxx/include/__functional/binder2nd.h
index c98a146b6a66..eacebf4b1001 100644
--- a/libcxx/include/__functional/binder2nd.h
+++ b/libcxx/include/__functional/binder2nd.h
@@ -7,47 +7,47 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_BINDER2ND_H
-#define _LIBCPP___FUNCTIONAL_BINDER2ND_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_BINDER2ND_H
+#define _LIBCUDACXX___FUNCTIONAL_BINDER2ND_H
 
 #include <__config>
 #include <__functional/unary_function.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)
 
 template <class __Operation>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 binder2nd
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 binder2nd
     : public __unary_function<typename __Operation::first_argument_type, typename __Operation::result_type>
 {
 protected:
     __Operation                                op;
     typename __Operation::second_argument_type value;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     binder2nd(const __Operation& __x, const typename __Operation::second_argument_type __y)
         : op(__x), value(__y) {}
-    _LIBCPP_INLINE_VISIBILITY typename __Operation::result_type operator()
+    _LIBCUDACXX_INLINE_VISIBILITY typename __Operation::result_type operator()
         (      typename __Operation::first_argument_type& __x) const
             {return op(__x, value);}
-    _LIBCPP_INLINE_VISIBILITY typename __Operation::result_type operator()
+    _LIBCUDACXX_INLINE_VISIBILITY typename __Operation::result_type operator()
         (const typename __Operation::first_argument_type& __x) const
             {return op(__x, value);}
 };
 
 template <class __Operation, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 binder2nd<__Operation>
 bind2nd(const __Operation& __op, const _Tp& __x)
     {return binder2nd<__Operation>(__op, __x);}
 
-#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
+#endif // _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_BINDER2ND_H
+#endif // _LIBCUDACXX___FUNCTIONAL_BINDER2ND_H

diff  --git a/libcxx/include/__functional/boyer_moore_searcher.h b/libcxx/include/__functional/boyer_moore_searcher.h
index 20e554408ff0..33eb5a9acb19 100644
--- a/libcxx/include/__functional/boyer_moore_searcher.h
+++ b/libcxx/include/__functional/boyer_moore_searcher.h
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_BOYER_MOORE_SEARCHER_H
-#define _LIBCPP___FUNCTIONAL_BOYER_MOORE_SEARCHER_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_BOYER_MOORE_SEARCHER_H
+#define _LIBCUDACXX___FUNCTIONAL_BOYER_MOORE_SEARCHER_H
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -25,12 +25,12 @@
 #include <unordered_map>
 #include <vector>
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Key,
           class _Value,
@@ -53,16 +53,16 @@ class _BMSkipTable<_Key, _Value, _Hash, _BinaryPredicate, false> {
   unordered_map<_Key, _Value, _Hash, _BinaryPredicate> __table_;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   explicit _BMSkipTable(size_t __sz, value_type __default_value, _Hash __hash, _BinaryPredicate __pred)
       : __default_value_(__default_value),
         __table_(__sz, __hash, __pred) {}
 
-  _LIBCPP_HIDE_FROM_ABI void insert(const key_type& __key, value_type __val) {
+  _LIBCUDACXX_HIDE_FROM_ABI void insert(const key_type& __key, value_type __val) {
     __table_[__key] = __val;
   }
 
-  _LIBCPP_HIDE_FROM_ABI value_type operator[](const key_type& __key) const {
+  _LIBCUDACXX_HIDE_FROM_ABI value_type operator[](const key_type& __key) const {
     auto __it = __table_.find(__key);
     return __it == __table_.end() ? __default_value_ : __it->second;
   }
@@ -83,15 +83,15 @@ class _BMSkipTable<_Key, _Value, _Hash, _BinaryPredicate, true> {
   static_assert(numeric_limits<unsigned_key_type>::max() < 256);
 
 public:
-  _LIBCPP_HIDE_FROM_ABI explicit _BMSkipTable(size_t, value_type __default_value, _Hash, _BinaryPredicate) {
+  _LIBCUDACXX_HIDE_FROM_ABI explicit _BMSkipTable(size_t, value_type __default_value, _Hash, _BinaryPredicate) {
     std::fill_n(__table_.data(), __table_.size(), __default_value);
   }
 
-  _LIBCPP_HIDE_FROM_ABI void insert(key_type __key, value_type __val) {
+  _LIBCUDACXX_HIDE_FROM_ABI void insert(key_type __key, value_type __val) {
     __table_[static_cast<unsigned_key_type>(__key)] = __val;
   }
 
-  _LIBCPP_HIDE_FROM_ABI value_type operator[](key_type __key) const {
+  _LIBCUDACXX_HIDE_FROM_ABI value_type operator[](key_type __key) const {
     return __table_[static_cast<unsigned_key_type>(__key)];
   }
 };
@@ -99,7 +99,7 @@ class _BMSkipTable<_Key, _Value, _Hash, _BinaryPredicate, true> {
 template <class _RandomAccessIterator1,
           class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
           class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TEMPLATE_VIS boyer_moore_searcher {
+class _LIBCUDACXX_TEMPLATE_VIS boyer_moore_searcher {
 private:
   using 
diff erence_type = typename std::iterator_traits<_RandomAccessIterator1>::
diff erence_type;
   using value_type = typename std::iterator_traits<_RandomAccessIterator1>::value_type;
@@ -227,7 +227,7 @@ class _LIBCPP_TEMPLATE_VIS boyer_moore_searcher {
 template <class _RandomAccessIterator1,
           class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
           class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TEMPLATE_VIS boyer_moore_horspool_searcher {
+class _LIBCUDACXX_TEMPLATE_VIS boyer_moore_horspool_searcher {
 private:
   using 
diff erence_type = typename iterator_traits<_RandomAccessIterator1>::
diff erence_type;
   using value_type = typename iterator_traits<_RandomAccessIterator1>::value_type;
@@ -304,10 +304,10 @@ class _LIBCPP_TEMPLATE_VIS boyer_moore_horspool_searcher {
   }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-#endif // _LIBCPP___FUNCTIONAL_BOYER_MOORE_SEARCHER_H
+#endif // _LIBCUDACXX___FUNCTIONAL_BOYER_MOORE_SEARCHER_H

diff  --git a/libcxx/include/__functional/compose.h b/libcxx/include/__functional/compose.h
index 25213f28b1f2..960bc7cde506 100644
--- a/libcxx/include/__functional/compose.h
+++ b/libcxx/include/__functional/compose.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_COMPOSE_H
-#define _LIBCPP___FUNCTIONAL_COMPOSE_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_COMPOSE_H
+#define _LIBCUDACXX___FUNCTIONAL_COMPOSE_H
 
 #include <__config>
 #include <__functional/invoke.h>
@@ -16,21 +16,21 @@
 #include <__utility/forward.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 struct __compose_op {
     template<class _Fn1, class _Fn2, class ..._Args>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Fn1&& __f1, _Fn2&& __f2, _Args&&... __args) const
-        noexcept(noexcept(_VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...))))
-        -> decltype(      _VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...)))
-        { return          _VSTD::invoke(_VSTD::forward<_Fn1>(__f1), _VSTD::invoke(_VSTD::forward<_Fn2>(__f2), _VSTD::forward<_Args>(__args)...)); }
+        noexcept(noexcept(_CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fn1>(__f1), _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fn2>(__f2), _CUDA_VSTD::forward<_Args>(__args)...))))
+        -> decltype(      _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fn1>(__f1), _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fn2>(__f2), _CUDA_VSTD::forward<_Args>(__args)...)))
+        { return          _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fn1>(__f1), _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fn2>(__f2), _CUDA_VSTD::forward<_Args>(__args)...)); }
 };
 
 template <class _Fn1, class _Fn2>
@@ -39,14 +39,14 @@ struct __compose_t : __perfect_forward<__compose_op, _Fn1, _Fn2> {
 };
 
 template <class _Fn1, class _Fn2>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr auto __compose(_Fn1&& __f1, _Fn2&& __f2)
-    noexcept(noexcept(__compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2))))
-    -> decltype(      __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2)))
-    { return          __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_VSTD::forward<_Fn1>(__f1), _VSTD::forward<_Fn2>(__f2)); }
+    noexcept(noexcept(__compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_CUDA_VSTD::forward<_Fn1>(__f1), _CUDA_VSTD::forward<_Fn2>(__f2))))
+    -> decltype(      __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_CUDA_VSTD::forward<_Fn1>(__f1), _CUDA_VSTD::forward<_Fn2>(__f2)))
+    { return          __compose_t<decay_t<_Fn1>, decay_t<_Fn2>>(_CUDA_VSTD::forward<_Fn1>(__f1), _CUDA_VSTD::forward<_Fn2>(__f2)); }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_COMPOSE_H
+#endif // _LIBCUDACXX___FUNCTIONAL_COMPOSE_H

diff  --git a/libcxx/include/__functional/default_searcher.h b/libcxx/include/__functional/default_searcher.h
index 8e37082b6bed..505699a1806a 100644
--- a/libcxx/include/__functional/default_searcher.h
+++ b/libcxx/include/__functional/default_searcher.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_DEFAULT_SEARCHER_H
-#define _LIBCPP___FUNCTIONAL_DEFAULT_SEARCHER_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_DEFAULT_SEARCHER_H
+#define _LIBCUDACXX___FUNCTIONAL_DEFAULT_SEARCHER_H
 
 #include <__algorithm/search.h>
 #include <__config>
@@ -17,25 +17,25 @@
 #include <__iterator/iterator_traits.h>
 #include <__utility/pair.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 // default searcher
 template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
-class _LIBCPP_TEMPLATE_VIS default_searcher {
+class _LIBCUDACXX_TEMPLATE_VIS default_searcher {
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     default_searcher(_ForwardIterator __f, _ForwardIterator __l,
                        _BinaryPredicate __p = _BinaryPredicate())
         : __first_(__f), __last_(__l), __pred_(__p) {}
 
     template <typename _ForwardIterator2>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     pair<_ForwardIterator2, _ForwardIterator2>
     operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const
     {
@@ -49,8 +49,8 @@ class _LIBCPP_TEMPLATE_VIS default_searcher {
     _BinaryPredicate __pred_;
 };
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_DEFAULT_SEARCHER_H
+#endif // _LIBCUDACXX___FUNCTIONAL_DEFAULT_SEARCHER_H

diff  --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index db3af6e24101..fa6d26639469 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_FUNCTION_H
-#define _LIBCPP___FUNCTIONAL_FUNCTION_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_FUNCTION_H
+#define _LIBCUDACXX___FUNCTIONAL_FUNCTION_H
 
 #include <__assert>
 #include <__config>
@@ -27,53 +27,53 @@
 #include <memory> // TODO: replace with <__memory/__builtin_new_allocator.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // bad_function_call
 
-_LIBCPP_DIAGNOSTIC_PUSH
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
-class _LIBCPP_EXCEPTION_ABI bad_function_call
+_LIBCUDACXX_DIAGNOSTIC_PUSH
+_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
+class _LIBCUDACXX_EXCEPTION_ABI bad_function_call
     : public exception
 {
 public:
 // Note that when a key function is not used, every translation unit that uses
 // bad_function_call will end up containing a weak definition of the vtable and
 // typeinfo.
-#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
+#ifdef _LIBCUDACXX_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
     virtual ~bad_function_call() _NOEXCEPT;
 #else
     virtual ~bad_function_call() _NOEXCEPT {}
 #endif
 
-#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE
+#ifdef _LIBCUDACXX_ABI_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE
     virtual const char* what() const _NOEXCEPT;
 #endif
 };
-_LIBCPP_DIAGNOSTIC_POP
+_LIBCUDACXX_DIAGNOSTIC_POP
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_bad_function_call()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw bad_function_call();
 #else
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-#if defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS) && __has_attribute(deprecated)
-#   define _LIBCPP_DEPRECATED_CXX03_FUNCTION \
+#if defined(_LIBCUDACXX_CXX03_LANG) && !defined(_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS) && __has_attribute(deprecated)
+#   define _LIBCUDACXX_DEPRECATED_CXX03_FUNCTION \
         __attribute__((deprecated("Using std::function in C++03 is not supported anymore. Please upgrade to C++11 or later, or use a 
diff erent type")))
 #else
-#   define _LIBCPP_DEPRECATED_CXX03_FUNCTION /* nothing */
+#   define _LIBCUDACXX_DEPRECATED_CXX03_FUNCTION /* nothing */
 #endif
 
-template<class _Fp> class _LIBCPP_DEPRECATED_CXX03_FUNCTION _LIBCPP_TEMPLATE_VIS function; // undefined
+template<class _Fp> class _LIBCUDACXX_DEPRECATED_CXX03_FUNCTION _LIBCUDACXX_TEMPLATE_VIS function; // undefined
 
 namespace __function
 {
@@ -101,30 +101,30 @@ struct __maybe_derive_from_binary_function<_Rp(_A1, _A2)>
 };
 
 template <class _Fp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __not_null(_Fp const&) { return true; }
 
 template <class _Fp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __not_null(_Fp* __ptr) { return __ptr; }
 
 template <class _Ret, class _Class>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __not_null(_Ret _Class::*__ptr) { return __ptr; }
 
 template <class _Fp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __not_null(function<_Fp> const& __f) { return !!__f; }
 
-#ifdef _LIBCPP_HAS_EXTENSION_BLOCKS
+#ifdef _LIBCUDACXX_HAS_EXTENSION_BLOCKS
 template <class _Rp, class ..._Args>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __not_null(_Rp (^__p)(_Args...)) { return __p; }
 #endif
 
 } // namespace __function
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 namespace __function {
 
@@ -140,53 +140,53 @@ class __alloc_func<_Fp, _Ap, _Rp(_ArgTypes...)>
     __compressed_pair<_Fp, _Ap> __f_;
 
   public:
-    typedef _LIBCPP_NODEBUG _Fp _Target;
-    typedef _LIBCPP_NODEBUG _Ap _Alloc;
+    typedef _LIBCUDACXX_NODEBUG _Fp _Target;
+    typedef _LIBCUDACXX_NODEBUG _Ap _Alloc;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Target& __target() const { return __f_.first(); }
 
     // WIN32 APIs may define __allocator, so use __get_allocator instead.
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Alloc& __get_allocator() const { return __f_.second(); }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __alloc_func(_Target&& __f)
-        : __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
-               _VSTD::forward_as_tuple())
+        : __f_(piecewise_construct, _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::move(__f)),
+               _CUDA_VSTD::forward_as_tuple())
     {
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __alloc_func(const _Target& __f, const _Alloc& __a)
-        : __f_(piecewise_construct, _VSTD::forward_as_tuple(__f),
-               _VSTD::forward_as_tuple(__a))
+        : __f_(piecewise_construct, _CUDA_VSTD::forward_as_tuple(__f),
+               _CUDA_VSTD::forward_as_tuple(__a))
     {
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __alloc_func(const _Target& __f, _Alloc&& __a)
-        : __f_(piecewise_construct, _VSTD::forward_as_tuple(__f),
-               _VSTD::forward_as_tuple(_VSTD::move(__a)))
+        : __f_(piecewise_construct, _CUDA_VSTD::forward_as_tuple(__f),
+               _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::move(__a)))
     {
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __alloc_func(_Target&& __f, _Alloc&& __a)
-        : __f_(piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__f)),
-               _VSTD::forward_as_tuple(_VSTD::move(__a)))
+        : __f_(piecewise_construct, _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::move(__f)),
+               _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::move(__a)))
     {
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Rp operator()(_ArgTypes&&... __arg)
     {
         typedef __invoke_void_return_wrapper<_Rp> _Invoker;
         return _Invoker::__call(__f_.first(),
-                                _VSTD::forward<_ArgTypes>(__arg)...);
+                                _CUDA_VSTD::forward<_ArgTypes>(__arg)...);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __alloc_func* __clone() const
     {
         typedef allocator_traits<_Alloc> __alloc_traits;
@@ -200,7 +200,7 @@ class __alloc_func<_Fp, _Ap, _Rp(_ArgTypes...)>
         return __hold.release();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void destroy() _NOEXCEPT { __f_.~__compressed_pair<_Target, _Alloc>(); }
 
     static void __destroy_and_delete(__alloc_func* __f) {
@@ -218,24 +218,24 @@ class __default_alloc_func<_Fp, _Rp(_ArgTypes...)> {
   _Fp __f_;
 
 public:
-  typedef _LIBCPP_NODEBUG _Fp _Target;
+  typedef _LIBCUDACXX_NODEBUG _Fp _Target;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   const _Target& __target() const { return __f_; }
 
-  _LIBCPP_INLINE_VISIBILITY
-  explicit __default_alloc_func(_Target&& __f) : __f_(_VSTD::move(__f)) {}
+  _LIBCUDACXX_INLINE_VISIBILITY
+  explicit __default_alloc_func(_Target&& __f) : __f_(_CUDA_VSTD::move(__f)) {}
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   explicit __default_alloc_func(const _Target& __f) : __f_(__f) {}
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   _Rp operator()(_ArgTypes&&... __arg) {
     typedef __invoke_void_return_wrapper<_Rp> _Invoker;
-    return _Invoker::__call(__f_, _VSTD::forward<_ArgTypes>(__arg)...);
+    return _Invoker::__call(__f_, _CUDA_VSTD::forward<_ArgTypes>(__arg)...);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   __default_alloc_func* __clone() const {
       __builtin_new_allocator::__holder_t __hold =
         __builtin_new_allocator::__allocate_type<__default_alloc_func>(1);
@@ -245,7 +245,7 @@ class __default_alloc_func<_Fp, _Rp(_ArgTypes...)> {
     return __res;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void destroy() _NOEXCEPT { __f_.~_Target(); }
 
   static void __destroy_and_delete(__default_alloc_func* __f) {
@@ -256,7 +256,7 @@ class __default_alloc_func<_Fp, _Rp(_ArgTypes...)> {
 
 // __base provides an abstract interface for copyable functors.
 
-template<class _Fp> class _LIBCPP_TEMPLATE_VIS __base;
+template<class _Fp> class _LIBCUDACXX_TEMPLATE_VIS __base;
 
 template<class _Rp, class ..._ArgTypes>
 class __base<_Rp(_ArgTypes...)>
@@ -264,17 +264,17 @@ class __base<_Rp(_ArgTypes...)>
     __base(const __base&);
     __base& operator=(const __base&);
 public:
-    _LIBCPP_INLINE_VISIBILITY __base() {}
-    _LIBCPP_INLINE_VISIBILITY virtual ~__base() {}
+    _LIBCUDACXX_INLINE_VISIBILITY __base() {}
+    _LIBCUDACXX_INLINE_VISIBILITY virtual ~__base() {}
     virtual __base* __clone() const = 0;
     virtual void __clone(__base*) const = 0;
     virtual void destroy() _NOEXCEPT = 0;
     virtual void destroy_deallocate() _NOEXCEPT = 0;
     virtual _Rp operator()(_ArgTypes&& ...) = 0;
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* target(const type_info&) const _NOEXCEPT = 0;
     virtual const std::type_info& target_type() const _NOEXCEPT = 0;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 // __func implements __base for a given functor type.
@@ -287,31 +287,31 @@ class __func<_Fp, _Alloc, _Rp(_ArgTypes...)>
 {
     __alloc_func<_Fp, _Alloc, _Rp(_ArgTypes...)> __f_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __func(_Fp&& __f)
-        : __f_(_VSTD::move(__f)) {}
+        : __f_(_CUDA_VSTD::move(__f)) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __func(const _Fp& __f, const _Alloc& __a)
         : __f_(__f, __a) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __func(const _Fp& __f, _Alloc&& __a)
-        : __f_(__f, _VSTD::move(__a)) {}
+        : __f_(__f, _CUDA_VSTD::move(__a)) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __func(_Fp&& __f, _Alloc&& __a)
-        : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
+        : __f_(_CUDA_VSTD::move(__f), _CUDA_VSTD::move(__a)) {}
 
     virtual __base<_Rp(_ArgTypes...)>* __clone() const;
     virtual void __clone(__base<_Rp(_ArgTypes...)>*) const;
     virtual void destroy() _NOEXCEPT;
     virtual void destroy_deallocate() _NOEXCEPT;
     virtual _Rp operator()(_ArgTypes&&... __arg);
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* target(const type_info&) const _NOEXCEPT;
     virtual const std::type_info& target_type() const _NOEXCEPT;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
@@ -356,17 +356,17 @@ template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
 _Rp
 __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::operator()(_ArgTypes&& ... __arg)
 {
-    return __f_(_VSTD::forward<_ArgTypes>(__arg)...);
+    return __f_(_CUDA_VSTD::forward<_ArgTypes>(__arg)...);
 }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
 const void*
 __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target(const type_info& __ti) const _NOEXCEPT
 {
     if (__ti == typeid(_Fp))
-        return _VSTD::addressof(__f_.__target());
+        return _CUDA_VSTD::addressof(__f_.__target());
     return nullptr;
 }
 
@@ -377,7 +377,7 @@ __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target_type() const _NOEXCEPT
     return typeid(_Fp);
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 // __value_func creates a value-type from a __func.
 
@@ -390,17 +390,17 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
     typedef __base<_Rp(_ArgTypes...)> __func;
     __func* __f_;
 
-    _LIBCPP_NO_CFI static __func* __as_base(void* __p)
+    _LIBCUDACXX_NO_CFI static __func* __as_base(void* __p)
     {
         return reinterpret_cast<__func*>(__p);
     }
 
   public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __value_func() _NOEXCEPT : __f_(nullptr) {}
 
     template <class _Fp, class _Alloc>
-    _LIBCPP_INLINE_VISIBILITY __value_func(_Fp&& __f, const _Alloc& __a)
+    _LIBCUDACXX_INLINE_VISIBILITY __value_func(_Fp&& __f, const _Alloc& __a)
         : __f_(nullptr)
     {
         typedef allocator_traits<_Alloc> __alloc_traits;
@@ -416,13 +416,13 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
                 is_nothrow_copy_constructible<_FunAlloc>::value)
             {
                 __f_ =
-                    ::new ((void*)&__buf_) _Fun(_VSTD::move(__f), _Alloc(__af));
+                    ::new ((void*)&__buf_) _Fun(_CUDA_VSTD::move(__f), _Alloc(__af));
             }
             else
             {
                 typedef __allocator_destructor<_FunAlloc> _Dp;
                 unique_ptr<__func, _Dp> __hold(__af.allocate(1), _Dp(__af, 1));
-                ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f), _Alloc(__a));
+                ::new ((void*)__hold.get()) _Fun(_CUDA_VSTD::move(__f), _Alloc(__a));
                 __f_ = __hold.release();
             }
         }
@@ -430,10 +430,10 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
 
     template <class _Fp,
         class = typename enable_if<!is_same<typename decay<_Fp>::type, __value_func>::value>::type>
-    _LIBCPP_INLINE_VISIBILITY explicit __value_func(_Fp&& __f)
-        : __value_func(_VSTD::forward<_Fp>(__f), allocator<_Fp>()) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit __value_func(_Fp&& __f)
+        : __value_func(_CUDA_VSTD::forward<_Fp>(__f), allocator<_Fp>()) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __value_func(const __value_func& __f)
     {
         if (__f.__f_ == nullptr)
@@ -447,7 +447,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
             __f_ = __f.__f_->__clone();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __value_func(__value_func&& __f) _NOEXCEPT
     {
         if (__f.__f_ == nullptr)
@@ -464,7 +464,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
         }
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~__value_func()
     {
         if ((void*)__f_ == &__buf_)
@@ -473,7 +473,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
             __f_->destroy_deallocate();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __value_func& operator=(__value_func&& __f)
     {
         *this = nullptr;
@@ -492,7 +492,7 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __value_func& operator=(nullptr_t)
     {
         __func* __f = __f_;
@@ -504,15 +504,15 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Rp operator()(_ArgTypes&&... __args) const
     {
         if (__f_ == nullptr)
             __throw_bad_function_call();
-        return (*__f_)(_VSTD::forward<_ArgTypes>(__args)...);
+        return (*__f_)(_CUDA_VSTD::forward<_ArgTypes>(__args)...);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(__value_func& __f) _NOEXCEPT
     {
         if (&__f == this)
@@ -547,14 +547,14 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
             __f_ = __as_base(&__buf_);
         }
         else
-            _VSTD::swap(__f_, __f.__f_);
+            _CUDA_VSTD::swap(__f_, __f.__f_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit operator bool() const _NOEXCEPT { return __f_ != nullptr; }
 
-#ifndef _LIBCPP_NO_RTTI
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_NO_RTTI
+    _LIBCUDACXX_INLINE_VISIBILITY
     const std::type_info& target_type() const _NOEXCEPT
     {
         if (__f_ == nullptr)
@@ -563,13 +563,13 @@ template <class _Rp, class... _ArgTypes> class __value_func<_Rp(_ArgTypes...)>
     }
 
     template <typename _Tp>
-    _LIBCPP_INLINE_VISIBILITY const _Tp* target() const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY const _Tp* target() const _NOEXCEPT
     {
         if (__f_ == nullptr)
             return nullptr;
         return (const _Tp*)__f_->target(typeid(_Tp));
     }
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 // Storage for a functor object, to be used with __policy to manage copy and
@@ -585,7 +585,7 @@ template <typename _Fun>
 struct __use_small_storage
     : public integral_constant<
           bool, sizeof(_Fun) <= sizeof(__policy_storage) &&
-                    _LIBCPP_ALIGNOF(_Fun) <= _LIBCPP_ALIGNOF(__policy_storage) &&
+                    _LIBCUDACXX_ALIGNOF(_Fun) <= _LIBCUDACXX_ALIGNOF(__policy_storage) &&
                     is_trivially_copy_constructible<_Fun>::value &&
                     is_trivially_destructible<_Fun>::value> {};
 
@@ -606,17 +606,17 @@ struct __policy
     // Returns a pointer to a static policy object suitable for the functor
     // type.
     template <typename _Fun>
-    _LIBCPP_INLINE_VISIBILITY static const __policy* __create()
+    _LIBCUDACXX_INLINE_VISIBILITY static const __policy* __create()
     {
         return __choose_policy<_Fun>(__use_small_storage<_Fun>());
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static const __policy* __create_empty()
     {
-        static const _LIBCPP_CONSTEXPR __policy __policy_ = {nullptr, nullptr,
+        static const _LIBCUDACXX_CONSTEXPR __policy __policy_ = {nullptr, nullptr,
                                                              true,
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
                                                              &typeid(void)
 #else
                                                              nullptr
@@ -638,11 +638,11 @@ struct __policy
     }
 
     template <typename _Fun>
-    _LIBCPP_INLINE_VISIBILITY static const __policy*
+    _LIBCUDACXX_INLINE_VISIBILITY static const __policy*
     __choose_policy(/* is_small = */ false_type) {
-      static const _LIBCPP_CONSTEXPR __policy __policy_ = {
+      static const _LIBCUDACXX_CONSTEXPR __policy __policy_ = {
           &__large_clone<_Fun>, &__large_destroy<_Fun>, false,
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
           &typeid(typename _Fun::_Target)
 #else
           nullptr
@@ -652,12 +652,12 @@ struct __policy
     }
 
     template <typename _Fun>
-    _LIBCPP_INLINE_VISIBILITY static const __policy*
+    _LIBCUDACXX_INLINE_VISIBILITY static const __policy*
         __choose_policy(/* is_small = */ true_type)
     {
-        static const _LIBCPP_CONSTEXPR __policy __policy_ = {
+        static const _LIBCUDACXX_CONSTEXPR __policy __policy_ = {
             nullptr, nullptr, false,
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
             &typeid(typename _Fun::_Target)
 #else
             nullptr
@@ -686,18 +686,18 @@ struct __policy_invoker<_Rp(_ArgTypes...)>
     __Call __call_;
 
     // Creates an invoker that throws bad_function_call.
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __policy_invoker() : __call_(&__call_empty) {}
 
     // Creates an invoker that calls the given instance of __func.
     template <typename _Fun>
-    _LIBCPP_INLINE_VISIBILITY static __policy_invoker __create()
+    _LIBCUDACXX_INLINE_VISIBILITY static __policy_invoker __create()
     {
         return __policy_invoker(&__call_impl<_Fun>);
     }
 
   private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __policy_invoker(__Call __c) : __call_(__c) {}
 
     static _Rp __call_empty(const __policy_storage*,
@@ -713,7 +713,7 @@ struct __policy_invoker<_Rp(_ArgTypes...)>
         _Fun* __f = reinterpret_cast<_Fun*>(__use_small_storage<_Fun>::value
                                                 ? &__buf->__small
                                                 : __buf->__large);
-        return (*__f)(_VSTD::forward<_ArgTypes>(__args)...);
+        return (*__f)(_CUDA_VSTD::forward<_ArgTypes>(__args)...);
     }
 };
 
@@ -738,11 +738,11 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
     const __policy* __policy_;
 
   public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __policy_func() : __policy_(__policy::__create_empty()) {}
 
     template <class _Fp, class _Alloc>
-    _LIBCPP_INLINE_VISIBILITY __policy_func(_Fp&& __f, const _Alloc& __a)
+    _LIBCUDACXX_INLINE_VISIBILITY __policy_func(_Fp&& __f, const _Alloc& __a)
         : __policy_(__policy::__create_empty())
     {
         typedef __alloc_func<_Fp, _Alloc, _Rp(_ArgTypes...)> _Fun;
@@ -759,21 +759,21 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
             if (__use_small_storage<_Fun>())
             {
                 ::new ((void*)&__buf_.__small)
-                    _Fun(_VSTD::move(__f), _Alloc(__af));
+                    _Fun(_CUDA_VSTD::move(__f), _Alloc(__af));
             }
             else
             {
                 typedef __allocator_destructor<_FunAlloc> _Dp;
                 unique_ptr<_Fun, _Dp> __hold(__af.allocate(1), _Dp(__af, 1));
                 ::new ((void*)__hold.get())
-                    _Fun(_VSTD::move(__f), _Alloc(__af));
+                    _Fun(_CUDA_VSTD::move(__f), _Alloc(__af));
                 __buf_.__large = __hold.release();
             }
         }
     }
 
     template <class _Fp, class = typename enable_if<!is_same<typename decay<_Fp>::type, __policy_func>::value>::type>
-    _LIBCPP_INLINE_VISIBILITY explicit __policy_func(_Fp&& __f)
+    _LIBCUDACXX_INLINE_VISIBILITY explicit __policy_func(_Fp&& __f)
         : __policy_(__policy::__create_empty()) {
       typedef __default_alloc_func<_Fp, _Rp(_ArgTypes...)> _Fun;
 
@@ -781,17 +781,17 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
         __invoker_ = __invoker::template __create<_Fun>();
         __policy_ = __policy::__create<_Fun>();
         if (__use_small_storage<_Fun>()) {
-          ::new ((void*)&__buf_.__small) _Fun(_VSTD::move(__f));
+          ::new ((void*)&__buf_.__small) _Fun(_CUDA_VSTD::move(__f));
         } else {
           __builtin_new_allocator::__holder_t __hold =
               __builtin_new_allocator::__allocate_type<_Fun>(1);
-          __buf_.__large = ::new ((void*)__hold.get()) _Fun(_VSTD::move(__f));
+          __buf_.__large = ::new ((void*)__hold.get()) _Fun(_CUDA_VSTD::move(__f));
           (void)__hold.release();
         }
       }
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __policy_func(const __policy_func& __f)
         : __buf_(__f.__buf_), __invoker_(__f.__invoker_),
           __policy_(__f.__policy_)
@@ -800,7 +800,7 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
             __buf_.__large = __policy_->__clone(__f.__buf_.__large);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __policy_func(__policy_func&& __f)
         : __buf_(__f.__buf_), __invoker_(__f.__invoker_),
           __policy_(__f.__policy_)
@@ -812,14 +812,14 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
         }
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~__policy_func()
     {
         if (__policy_->__destroy)
             __policy_->__destroy(__buf_.__large);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __policy_func& operator=(__policy_func&& __f)
     {
         *this = nullptr;
@@ -831,7 +831,7 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __policy_func& operator=(nullptr_t)
     {
         const __policy* __p = __policy_;
@@ -842,36 +842,36 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Rp operator()(_ArgTypes&&... __args) const
     {
-        return __invoker_.__call_(_VSTD::addressof(__buf_),
-                                  _VSTD::forward<_ArgTypes>(__args)...);
+        return __invoker_.__call_(_CUDA_VSTD::addressof(__buf_),
+                                  _CUDA_VSTD::forward<_ArgTypes>(__args)...);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(__policy_func& __f)
     {
-        _VSTD::swap(__invoker_, __f.__invoker_);
-        _VSTD::swap(__policy_, __f.__policy_);
-        _VSTD::swap(__buf_, __f.__buf_);
+        _CUDA_VSTD::swap(__invoker_, __f.__invoker_);
+        _CUDA_VSTD::swap(__policy_, __f.__policy_);
+        _CUDA_VSTD::swap(__buf_, __f.__buf_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit operator bool() const _NOEXCEPT
     {
         return !__policy_->__is_null;
     }
 
-#ifndef _LIBCPP_NO_RTTI
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_NO_RTTI
+    _LIBCUDACXX_INLINE_VISIBILITY
     const std::type_info& target_type() const _NOEXCEPT
     {
         return *__policy_->__type_info;
     }
 
     template <typename _Tp>
-    _LIBCPP_INLINE_VISIBILITY const _Tp* target() const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY const _Tp* target() const _NOEXCEPT
     {
         if (__policy_->__is_null || typeid(_Tp) != *__policy_->__type_info)
             return nullptr;
@@ -880,10 +880,10 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)>
         else
             return reinterpret_cast<const _Tp*>(&__buf_.__small);
     }
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
-#if defined(_LIBCPP_HAS_BLOCKS_RUNTIME) && !defined(_LIBCPP_HAS_OBJC_ARC)
+#if defined(_LIBCUDACXX_HAS_BLOCKS_RUNTIME) && !defined(_LIBCUDACXX_HAS_OBJC_ARC)
 
 extern "C" void *_Block_copy(const void *);
 extern "C" void _Block_release(const void *);
@@ -896,20 +896,20 @@ class __func<_Rp1(^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)>
     __block_type __f_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __func(__block_type const& __f)
         : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
     { }
 
     // [TODO] add && to save on a retain
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __func(__block_type __f, const _Alloc& /* unused */)
         : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr))
     { }
 
     virtual __base<_Rp(_ArgTypes...)>* __clone() const {
-        _LIBCPP_ASSERT(false,
+        _LIBCUDACXX_ASSERT(false,
             "Block pointers are just pointers, so they should always fit into "
             "std::function's small buffer optimization. This function should "
             "never be invoked.");
@@ -927,17 +927,17 @@ class __func<_Rp1(^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)>
     }
 
     virtual void destroy_deallocate() _NOEXCEPT {
-        _LIBCPP_ASSERT(false,
+        _LIBCUDACXX_ASSERT(false,
             "Block pointers are just pointers, so they should always fit into "
             "std::function's small buffer optimization. This function should "
             "never be invoked.");
     }
 
     virtual _Rp operator()(_ArgTypes&& ... __arg) {
-        return _VSTD::__invoke(__f_, _VSTD::forward<_ArgTypes>(__arg)...);
+        return _CUDA_VSTD::__invoke(__f_, _CUDA_VSTD::forward<_ArgTypes>(__arg)...);
     }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* target(type_info const& __ti) const _NOEXCEPT {
         if (__ti == typeid(__func::__block_type))
             return &__f_;
@@ -947,19 +947,19 @@ class __func<_Rp1(^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)>
     virtual const std::type_info& target_type() const _NOEXCEPT {
         return typeid(__func::__block_type);
     }
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
-#endif // _LIBCPP_HAS_EXTENSION_BLOCKS && !_LIBCPP_HAS_OBJC_ARC
+#endif // _LIBCUDACXX_HAS_EXTENSION_BLOCKS && !_LIBCUDACXX_HAS_OBJC_ARC
 
 } // namespace __function
 
 template<class _Rp, class ..._ArgTypes>
-class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
+class _LIBCUDACXX_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
     : public __function::__maybe_derive_from_unary_function<_Rp(_ArgTypes...)>,
       public __function::__maybe_derive_from_binary_function<_Rp(_ArgTypes...)>
 {
-#ifndef _LIBCPP_ABI_OPTIMIZED_FUNCTION
+#ifndef _LIBCUDACXX_ABI_OPTIMIZED_FUNCTION
     typedef __function::__value_func<_Rp(_ArgTypes...)> __func;
 #else
     typedef __function::__policy_func<_Rp(_ArgTypes...)> __func;
@@ -991,21 +991,21 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
     typedef _Rp result_type;
 
     // construct/copy/destroy:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     function() _NOEXCEPT { }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     function(nullptr_t) _NOEXCEPT {}
     function(const function&);
     function(function&&) _NOEXCEPT;
     template<class _Fp, class = _EnableIfLValueCallable<_Fp>>
     function(_Fp);
 
-#if _LIBCPP_STD_VER <= 14
+#if _LIBCUDACXX_STD_VER <= 14
     template<class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       function(allocator_arg_t, const _Alloc&) _NOEXCEPT {}
     template<class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       function(allocator_arg_t, const _Alloc&, nullptr_t) _NOEXCEPT {}
     template<class _Alloc>
       function(allocator_arg_t, const _Alloc&, const function&);
@@ -1026,15 +1026,15 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
     // function modifiers:
     void swap(function&) _NOEXCEPT;
 
-#if _LIBCPP_STD_VER <= 14
+#if _LIBCUDACXX_STD_VER <= 14
     template<class _Fp, class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       void assign(_Fp&& __f, const _Alloc& __a)
-        {function(allocator_arg, __a, _VSTD::forward<_Fp>(__f)).swap(*this);}
+        {function(allocator_arg, __a, _CUDA_VSTD::forward<_Fp>(__f)).swap(*this);}
 #endif
 
     // function capacity:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit operator bool() const _NOEXCEPT {
       return static_cast<bool>(__f_);
     }
@@ -1048,15 +1048,15 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_ArgTypes...)>
     // function invocation:
     _Rp operator()(_ArgTypes...) const;
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     // function target access:
     const std::type_info& target_type() const _NOEXCEPT;
     template <typename _Tp> _Tp* target() _NOEXCEPT;
     template <typename _Tp> const _Tp* target() const _NOEXCEPT;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _Rp, class ..._Ap>
 function(_Rp(*)(_Ap...)) -> function<_Rp(_Ap...)>;
 
@@ -1101,12 +1101,12 @@ struct __strip_signature<_Rp (_Gp::*) (_Ap...) const volatile & noexcept> { usin
 
 template<class _Fp, class _Stripped = typename __strip_signature<decltype(&_Fp::operator())>::type>
 function(_Fp) -> function<_Stripped>;
-#endif // _LIBCPP_STD_VER >= 17
+#endif // _LIBCUDACXX_STD_VER >= 17
 
 template<class _Rp, class ..._ArgTypes>
 function<_Rp(_ArgTypes...)>::function(const function& __f) : __f_(__f.__f_) {}
 
-#if _LIBCPP_STD_VER <= 14
+#if _LIBCUDACXX_STD_VER <= 14
 template<class _Rp, class ..._ArgTypes>
 template <class _Alloc>
 function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&,
@@ -1115,26 +1115,26 @@ function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&,
 
 template <class _Rp, class... _ArgTypes>
 function<_Rp(_ArgTypes...)>::function(function&& __f) _NOEXCEPT
-    : __f_(_VSTD::move(__f.__f_)) {}
+    : __f_(_CUDA_VSTD::move(__f.__f_)) {}
 
-#if _LIBCPP_STD_VER <= 14
+#if _LIBCUDACXX_STD_VER <= 14
 template<class _Rp, class ..._ArgTypes>
 template <class _Alloc>
 function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc&,
                                       function&& __f)
-    : __f_(_VSTD::move(__f.__f_)) {}
+    : __f_(_CUDA_VSTD::move(__f.__f_)) {}
 #endif
 
 template <class _Rp, class... _ArgTypes>
 template <class _Fp, class>
-function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(_VSTD::move(__f)) {}
+function<_Rp(_ArgTypes...)>::function(_Fp __f) : __f_(_CUDA_VSTD::move(__f)) {}
 
-#if _LIBCPP_STD_VER <= 14
+#if _LIBCUDACXX_STD_VER <= 14
 template <class _Rp, class... _ArgTypes>
 template <class _Fp, class _Alloc, class>
 function<_Rp(_ArgTypes...)>::function(allocator_arg_t, const _Alloc& __a,
                                       _Fp __f)
-    : __f_(_VSTD::move(__f), __a) {}
+    : __f_(_CUDA_VSTD::move(__f), __a) {}
 #endif
 
 template<class _Rp, class ..._ArgTypes>
@@ -1149,7 +1149,7 @@ template<class _Rp, class ..._ArgTypes>
 function<_Rp(_ArgTypes...)>&
 function<_Rp(_ArgTypes...)>::operator=(function&& __f) _NOEXCEPT
 {
-    __f_ = _VSTD::move(__f.__f_);
+    __f_ = _CUDA_VSTD::move(__f.__f_);
     return *this;
 }
 
@@ -1166,7 +1166,7 @@ template <class _Fp, class>
 function<_Rp(_ArgTypes...)>&
 function<_Rp(_ArgTypes...)>::operator=(_Fp&& __f)
 {
-    function(_VSTD::forward<_Fp>(__f)).swap(*this);
+    function(_CUDA_VSTD::forward<_Fp>(__f)).swap(*this);
     return *this;
 }
 
@@ -1184,10 +1184,10 @@ template<class _Rp, class ..._ArgTypes>
 _Rp
 function<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __arg) const
 {
-    return __f_(_VSTD::forward<_ArgTypes>(__arg)...);
+    return __f_(_CUDA_VSTD::forward<_ArgTypes>(__arg)...);
 }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template<class _Rp, class ..._ArgTypes>
 const std::type_info&
@@ -1212,35 +1212,35 @@ function<_Rp(_ArgTypes...)>::target() const _NOEXCEPT
     return __f_.template target<_Tp>();
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 template <class _Rp, class... _ArgTypes>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return !__f;}
 
 template <class _Rp, class... _ArgTypes>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return !__f;}
 
 template <class _Rp, class... _ArgTypes>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const function<_Rp(_ArgTypes...)>& __f, nullptr_t) _NOEXCEPT {return (bool)__f;}
 
 template <class _Rp, class... _ArgTypes>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(nullptr_t, const function<_Rp(_ArgTypes...)>& __f) _NOEXCEPT {return (bool)__f;}
 
 template <class _Rp, class... _ArgTypes>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(function<_Rp(_ArgTypes...)>& __x, function<_Rp(_ArgTypes...)>& __y) _NOEXCEPT
 {return __x.swap(__y);}
 
-#elif defined(_LIBCPP_ENABLE_CXX03_FUNCTION)
+#elif defined(_LIBCUDACXX_ENABLE_CXX03_FUNCTION)
 
 namespace __function {
 
@@ -1259,10 +1259,10 @@ class __base<_Rp()>
     virtual void destroy() = 0;
     virtual void destroy_deallocate() = 0;
     virtual _Rp operator()() = 0;
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* target(const type_info&) const = 0;
     virtual const std::type_info& target_type() const = 0;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Rp, class _A0>
@@ -1278,10 +1278,10 @@ class __base<_Rp(_A0)>
     virtual void destroy() = 0;
     virtual void destroy_deallocate() = 0;
     virtual _Rp operator()(_A0) = 0;
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* target(const type_info&) const = 0;
     virtual const std::type_info& target_type() const = 0;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Rp, class _A0, class _A1>
@@ -1297,10 +1297,10 @@ class __base<_Rp(_A0, _A1)>
     virtual void destroy() = 0;
     virtual void destroy_deallocate() = 0;
     virtual _Rp operator()(_A0, _A1) = 0;
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* target(const type_info&) const = 0;
     virtual const std::type_info& target_type() const = 0;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Rp, class _A0, class _A1, class _A2>
@@ -1316,10 +1316,10 @@ class __base<_Rp(_A0, _A1, _A2)>
     virtual void destroy() = 0;
     virtual void destroy_deallocate() = 0;
     virtual _Rp operator()(_A0, _A1, _A2) = 0;
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* target(const type_info&) const = 0;
     virtual const std::type_info& target_type() const = 0;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _FD, class _Alloc, class _FB> class __func;
@@ -1330,17 +1330,17 @@ class __func<_Fp, _Alloc, _Rp()>
 {
     __compressed_pair<_Fp, _Alloc> __f_;
 public:
-    explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
-    explicit __func(_Fp __f, _Alloc __a) : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
+    explicit __func(_Fp __f) : __f_(_CUDA_VSTD::move(__f), __default_init_tag()) {}
+    explicit __func(_Fp __f, _Alloc __a) : __f_(_CUDA_VSTD::move(__f), _CUDA_VSTD::move(__a)) {}
     virtual __base<_Rp()>* __clone() const;
     virtual void __clone(__base<_Rp()>*) const;
     virtual void destroy();
     virtual void destroy_deallocate();
     virtual _Rp operator()();
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* target(const type_info&) const;
     virtual const std::type_info& target_type() const;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Fp, class _Alloc, class _Rp>
@@ -1389,14 +1389,14 @@ __func<_Fp, _Alloc, _Rp()>::operator()()
     return _Invoker::__call(__f_.first());
 }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template<class _Fp, class _Alloc, class _Rp>
 const void*
 __func<_Fp, _Alloc, _Rp()>::target(const type_info& __ti) const
 {
     if (__ti == typeid(_Fp))
-        return _VSTD::addressof(__f_.first());
+        return _CUDA_VSTD::addressof(__f_.first());
     return (const void*)0;
 }
 
@@ -1407,7 +1407,7 @@ __func<_Fp, _Alloc, _Rp()>::target_type() const
     return typeid(_Fp);
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 template<class _Fp, class _Alloc, class _Rp, class _A0>
 class __func<_Fp, _Alloc, _Rp(_A0)>
@@ -1415,18 +1415,18 @@ class __func<_Fp, _Alloc, _Rp(_A0)>
 {
     __compressed_pair<_Fp, _Alloc> __f_;
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
-    _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
-        : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_CUDA_VSTD::move(__f), __default_init_tag()) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
+        : __f_(_CUDA_VSTD::move(__f), _CUDA_VSTD::move(__a)) {}
     virtual __base<_Rp(_A0)>* __clone() const;
     virtual void __clone(__base<_Rp(_A0)>*) const;
     virtual void destroy();
     virtual void destroy_deallocate();
     virtual _Rp operator()(_A0);
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* target(const type_info&) const;
     virtual const std::type_info& target_type() const;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Fp, class _Alloc, class _Rp, class _A0>
@@ -1475,7 +1475,7 @@ __func<_Fp, _Alloc, _Rp(_A0)>::operator()(_A0 __a0)
     return _Invoker::__call(__f_.first(), __a0);
 }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template<class _Fp, class _Alloc, class _Rp, class _A0>
 const void*
@@ -1493,7 +1493,7 @@ __func<_Fp, _Alloc, _Rp(_A0)>::target_type() const
     return typeid(_Fp);
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1>
 class __func<_Fp, _Alloc, _Rp(_A0, _A1)>
@@ -1501,18 +1501,18 @@ class __func<_Fp, _Alloc, _Rp(_A0, _A1)>
 {
     __compressed_pair<_Fp, _Alloc> __f_;
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
-    _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
-        : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_CUDA_VSTD::move(__f), __default_init_tag()) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
+        : __f_(_CUDA_VSTD::move(__f), _CUDA_VSTD::move(__a)) {}
     virtual __base<_Rp(_A0, _A1)>* __clone() const;
     virtual void __clone(__base<_Rp(_A0, _A1)>*) const;
     virtual void destroy();
     virtual void destroy_deallocate();
     virtual _Rp operator()(_A0, _A1);
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* target(const type_info&) const;
     virtual const std::type_info& target_type() const;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1>
@@ -1561,7 +1561,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1)>::operator()(_A0 __a0, _A1 __a1)
     return _Invoker::__call(__f_.first(), __a0, __a1);
 }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1>
 const void*
@@ -1579,7 +1579,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1)>::target_type() const
     return typeid(_Fp);
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2>
 class __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>
@@ -1587,18 +1587,18 @@ class __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>
 {
     __compressed_pair<_Fp, _Alloc> __f_;
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
-    _LIBCPP_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
-        : __f_(_VSTD::move(__f), _VSTD::move(__a)) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit __func(_Fp __f) : __f_(_CUDA_VSTD::move(__f), __default_init_tag()) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit __func(_Fp __f, _Alloc __a)
+        : __f_(_CUDA_VSTD::move(__f), _CUDA_VSTD::move(__a)) {}
     virtual __base<_Rp(_A0, _A1, _A2)>* __clone() const;
     virtual void __clone(__base<_Rp(_A0, _A1, _A2)>*) const;
     virtual void destroy();
     virtual void destroy_deallocate();
     virtual _Rp operator()(_A0, _A1, _A2);
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* target(const type_info&) const;
     virtual const std::type_info& target_type() const;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2>
@@ -1647,7 +1647,7 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::operator()(_A0 __a0, _A1 __a1, _A2 __a2
     return _Invoker::__call(__f_.first(), __a0, __a1, __a2);
 }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template<class _Fp, class _Alloc, class _Rp, class _A0, class _A1, class _A2>
 const void*
@@ -1665,12 +1665,12 @@ __func<_Fp, _Alloc, _Rp(_A0, _A1, _A2)>::target_type() const
     return typeid(_Fp);
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 } // namespace __function
 
 template<class _Rp>
-class _LIBCPP_TEMPLATE_VIS function<_Rp()>
+class _LIBCUDACXX_TEMPLATE_VIS function<_Rp()>
 {
     typedef __function::__base<_Rp()> __base;
     aligned_storage<3*sizeof(void*)>::type __buf_;
@@ -1680,18 +1680,18 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp()>
     typedef _Rp result_type;
 
     // 20.7.16.2.1, construct/copy/destroy:
-    _LIBCPP_INLINE_VISIBILITY explicit function() : __f_(0) {}
-    _LIBCPP_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit function() : __f_(0) {}
+    _LIBCUDACXX_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
     function(const function&);
     template<class _Fp>
       function(_Fp,
                typename enable_if<!is_integral<_Fp>::value>::type* = 0);
 
     template<class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       function(allocator_arg_t, const _Alloc&) : __f_(0) {}
     template<class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
     template<class _Alloc>
       function(allocator_arg_t, const _Alloc&, const function&);
@@ -1714,12 +1714,12 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp()>
     // 20.7.16.2.2, function modifiers:
     void swap(function&);
     template<class _Fp, class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       void assign(_Fp __f, const _Alloc& __a)
         {function(allocator_arg, __a, __f).swap(*this);}
 
     // 20.7.16.2.3, function capacity:
-    _LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
 
     template<class _R2>
       bool operator==(const function<_R2()>&) const = delete;
@@ -1729,12 +1729,12 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp()>
     // 20.7.16.2.4, function invocation:
     _Rp operator()() const;
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     // 20.7.16.2.5, function target access:
     const std::type_info& target_type() const;
     template <typename _Tp> _Tp* target();
     template <typename _Tp> const _Tp* target() const;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Rp>
@@ -1852,7 +1852,7 @@ typename enable_if
 >::type
 function<_Rp()>::operator=(_Fp __f)
 {
-    function(_VSTD::move(__f)).swap(*this);
+    function(_CUDA_VSTD::move(__f)).swap(*this);
     return *this;
 }
 
@@ -1869,7 +1869,7 @@ template<class _Rp>
 void
 function<_Rp()>::swap(function& __f)
 {
-    if (_VSTD::addressof(__f) == this)
+    if (_CUDA_VSTD::addressof(__f) == this)
       return;
     if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
     {
@@ -1901,7 +1901,7 @@ function<_Rp()>::swap(function& __f)
         __f_ = (__base*)&__buf_;
     }
     else
-        _VSTD::swap(__f_, __f.__f_);
+        _CUDA_VSTD::swap(__f_, __f.__f_);
 }
 
 template<class _Rp>
@@ -1913,7 +1913,7 @@ function<_Rp()>::operator()() const
     return (*__f_)();
 }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template<class _Rp>
 const std::type_info&
@@ -1944,10 +1944,10 @@ function<_Rp()>::target() const
     return (const _Tp*)__f_->target(typeid(_Tp));
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 template<class _Rp, class _A0>
-class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0)>
+class _LIBCUDACXX_TEMPLATE_VIS function<_Rp(_A0)>
     : public unary_function<_A0, _Rp>
 {
     typedef __function::__base<_Rp(_A0)> __base;
@@ -1958,18 +1958,18 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0)>
     typedef _Rp result_type;
 
     // 20.7.16.2.1, construct/copy/destroy:
-    _LIBCPP_INLINE_VISIBILITY explicit function() : __f_(0) {}
-    _LIBCPP_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit function() : __f_(0) {}
+    _LIBCUDACXX_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
     function(const function&);
     template<class _Fp>
       function(_Fp,
                typename enable_if<!is_integral<_Fp>::value>::type* = 0);
 
     template<class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       function(allocator_arg_t, const _Alloc&) : __f_(0) {}
     template<class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
     template<class _Alloc>
       function(allocator_arg_t, const _Alloc&, const function&);
@@ -1992,12 +1992,12 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0)>
     // 20.7.16.2.2, function modifiers:
     void swap(function&);
     template<class _Fp, class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       void assign(_Fp __f, const _Alloc& __a)
         {function(allocator_arg, __a, __f).swap(*this);}
 
     // 20.7.16.2.3, function capacity:
-    _LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
 
     template<class _R2, class _B0>
       bool operator==(const function<_R2(_B0)>&) const = delete;
@@ -2007,12 +2007,12 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0)>
     // 20.7.16.2.4, function invocation:
     _Rp operator()(_A0) const;
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     // 20.7.16.2.5, function target access:
     const std::type_info& target_type() const;
     template <typename _Tp> _Tp* target();
     template <typename _Tp> const _Tp* target() const;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Rp, class _A0>
@@ -2130,7 +2130,7 @@ typename enable_if
 >::type
 function<_Rp(_A0)>::operator=(_Fp __f)
 {
-    function(_VSTD::move(__f)).swap(*this);
+    function(_CUDA_VSTD::move(__f)).swap(*this);
     return *this;
 }
 
@@ -2147,7 +2147,7 @@ template<class _Rp, class _A0>
 void
 function<_Rp(_A0)>::swap(function& __f)
 {
-    if (_VSTD::addressof(__f) == this)
+    if (_CUDA_VSTD::addressof(__f) == this)
       return;
     if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
     {
@@ -2179,7 +2179,7 @@ function<_Rp(_A0)>::swap(function& __f)
         __f_ = (__base*)&__buf_;
     }
     else
-        _VSTD::swap(__f_, __f.__f_);
+        _CUDA_VSTD::swap(__f_, __f.__f_);
 }
 
 template<class _Rp, class _A0>
@@ -2191,7 +2191,7 @@ function<_Rp(_A0)>::operator()(_A0 __a0) const
     return (*__f_)(__a0);
 }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template<class _Rp, class _A0>
 const std::type_info&
@@ -2222,10 +2222,10 @@ function<_Rp(_A0)>::target() const
     return (const _Tp*)__f_->target(typeid(_Tp));
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 template<class _Rp, class _A0, class _A1>
-class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1)>
+class _LIBCUDACXX_TEMPLATE_VIS function<_Rp(_A0, _A1)>
     : public binary_function<_A0, _A1, _Rp>
 {
     typedef __function::__base<_Rp(_A0, _A1)> __base;
@@ -2236,18 +2236,18 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1)>
     typedef _Rp result_type;
 
     // 20.7.16.2.1, construct/copy/destroy:
-    _LIBCPP_INLINE_VISIBILITY explicit function() : __f_(0) {}
-    _LIBCPP_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit function() : __f_(0) {}
+    _LIBCUDACXX_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
     function(const function&);
     template<class _Fp>
       function(_Fp,
                typename enable_if<!is_integral<_Fp>::value>::type* = 0);
 
     template<class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       function(allocator_arg_t, const _Alloc&) : __f_(0) {}
     template<class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
     template<class _Alloc>
       function(allocator_arg_t, const _Alloc&, const function&);
@@ -2270,12 +2270,12 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1)>
     // 20.7.16.2.2, function modifiers:
     void swap(function&);
     template<class _Fp, class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       void assign(_Fp __f, const _Alloc& __a)
         {function(allocator_arg, __a, __f).swap(*this);}
 
     // 20.7.16.2.3, function capacity:
-    _LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
 
     template<class _R2, class _B0, class _B1>
       bool operator==(const function<_R2(_B0, _B1)>&) const = delete;
@@ -2285,12 +2285,12 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1)>
     // 20.7.16.2.4, function invocation:
     _Rp operator()(_A0, _A1) const;
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     // 20.7.16.2.5, function target access:
     const std::type_info& target_type() const;
     template <typename _Tp> _Tp* target();
     template <typename _Tp> const _Tp* target() const;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Rp, class _A0, class _A1>
@@ -2408,7 +2408,7 @@ typename enable_if
 >::type
 function<_Rp(_A0, _A1)>::operator=(_Fp __f)
 {
-    function(_VSTD::move(__f)).swap(*this);
+    function(_CUDA_VSTD::move(__f)).swap(*this);
     return *this;
 }
 
@@ -2425,7 +2425,7 @@ template<class _Rp, class _A0, class _A1>
 void
 function<_Rp(_A0, _A1)>::swap(function& __f)
 {
-    if (_VSTD::addressof(__f) == this)
+    if (_CUDA_VSTD::addressof(__f) == this)
       return;
     if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
     {
@@ -2457,7 +2457,7 @@ function<_Rp(_A0, _A1)>::swap(function& __f)
         __f_ = (__base*)&__buf_;
     }
     else
-        _VSTD::swap(__f_, __f.__f_);
+        _CUDA_VSTD::swap(__f_, __f.__f_);
 }
 
 template<class _Rp, class _A0, class _A1>
@@ -2469,7 +2469,7 @@ function<_Rp(_A0, _A1)>::operator()(_A0 __a0, _A1 __a1) const
     return (*__f_)(__a0, __a1);
 }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template<class _Rp, class _A0, class _A1>
 const std::type_info&
@@ -2500,10 +2500,10 @@ function<_Rp(_A0, _A1)>::target() const
     return (const _Tp*)__f_->target(typeid(_Tp));
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 template<class _Rp, class _A0, class _A1, class _A2>
-class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1, _A2)>
+class _LIBCUDACXX_TEMPLATE_VIS function<_Rp(_A0, _A1, _A2)>
 {
     typedef __function::__base<_Rp(_A0, _A1, _A2)> __base;
     aligned_storage<3*sizeof(void*)>::type __buf_;
@@ -2513,18 +2513,18 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1, _A2)>
     typedef _Rp result_type;
 
     // 20.7.16.2.1, construct/copy/destroy:
-    _LIBCPP_INLINE_VISIBILITY explicit function() : __f_(0) {}
-    _LIBCPP_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit function() : __f_(0) {}
+    _LIBCUDACXX_INLINE_VISIBILITY function(nullptr_t) : __f_(0) {}
     function(const function&);
     template<class _Fp>
       function(_Fp,
                typename enable_if<!is_integral<_Fp>::value>::type* = 0);
 
     template<class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       function(allocator_arg_t, const _Alloc&) : __f_(0) {}
     template<class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       function(allocator_arg_t, const _Alloc&, nullptr_t) : __f_(0) {}
     template<class _Alloc>
       function(allocator_arg_t, const _Alloc&, const function&);
@@ -2547,12 +2547,12 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1, _A2)>
     // 20.7.16.2.2, function modifiers:
     void swap(function&);
     template<class _Fp, class _Alloc>
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       void assign(_Fp __f, const _Alloc& __a)
         {function(allocator_arg, __a, __f).swap(*this);}
 
     // 20.7.16.2.3, function capacity:
-    _LIBCPP_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit operator bool() const {return __f_;}
 
     template<class _R2, class _B0, class _B1, class _B2>
       bool operator==(const function<_R2(_B0, _B1, _B2)>&) const = delete;
@@ -2562,12 +2562,12 @@ class _LIBCPP_TEMPLATE_VIS function<_Rp(_A0, _A1, _A2)>
     // 20.7.16.2.4, function invocation:
     _Rp operator()(_A0, _A1, _A2) const;
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     // 20.7.16.2.5, function target access:
     const std::type_info& target_type() const;
     template <typename _Tp> _Tp* target();
     template <typename _Tp> const _Tp* target() const;
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 };
 
 template<class _Rp, class _A0, class _A1, class _A2>
@@ -2686,7 +2686,7 @@ typename enable_if
 >::type
 function<_Rp(_A0, _A1, _A2)>::operator=(_Fp __f)
 {
-    function(_VSTD::move(__f)).swap(*this);
+    function(_CUDA_VSTD::move(__f)).swap(*this);
     return *this;
 }
 
@@ -2703,7 +2703,7 @@ template<class _Rp, class _A0, class _A1, class _A2>
 void
 function<_Rp(_A0, _A1, _A2)>::swap(function& __f)
 {
-    if (_VSTD::addressof(__f) == this)
+    if (_CUDA_VSTD::addressof(__f) == this)
       return;
     if (__f_ == (__base*)&__buf_ && __f.__f_ == (__base*)&__f.__buf_)
     {
@@ -2735,7 +2735,7 @@ function<_Rp(_A0, _A1, _A2)>::swap(function& __f)
         __f_ = (__base*)&__buf_;
     }
     else
-        _VSTD::swap(__f_, __f.__f_);
+        _CUDA_VSTD::swap(__f_, __f.__f_);
 }
 
 template<class _Rp, class _A0, class _A1, class _A2>
@@ -2747,7 +2747,7 @@ function<_Rp(_A0, _A1, _A2)>::operator()(_A0 __a0, _A1 __a1, _A2 __a2) const
     return (*__f_)(__a0, __a1, __a2);
 }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template<class _Rp, class _A0, class _A1, class _A2>
 const std::type_info&
@@ -2778,36 +2778,36 @@ function<_Rp(_A0, _A1, _A2)>::target() const
     return (const _Tp*)__f_->target(typeid(_Tp));
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 template <class _Fp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const function<_Fp>& __f, nullptr_t) {return !__f;}
 
 template <class _Fp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(nullptr_t, const function<_Fp>& __f) {return !__f;}
 
 template <class _Fp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const function<_Fp>& __f, nullptr_t) {return (bool)__f;}
 
 template <class _Fp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(nullptr_t, const function<_Fp>& __f) {return (bool)__f;}
 
 template <class _Fp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(function<_Fp>& __x, function<_Fp>& __y)
 {return __x.swap(__y);}
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_FUNCTION_H
+#endif // _LIBCUDACXX___FUNCTIONAL_FUNCTION_H

diff  --git a/libcxx/include/__functional/hash.h b/libcxx/include/__functional/hash.h
index 8a11931288cf..469ddc293113 100644
--- a/libcxx/include/__functional/hash.h
+++ b/libcxx/include/__functional/hash.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_HASH_H
-#define _LIBCPP___FUNCTIONAL_HASH_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_HASH_H
+#define _LIBCUDACXX___FUNCTIONAL_HASH_H
 
 #include <__config>
 #include <__functional/unary_function.h>
@@ -22,19 +22,19 @@
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Size>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _Size
 __loadword(const void* __p)
 {
     _Size __r;
-    _VSTD::memcpy(&__r, __p, sizeof(__r));
+    _CUDA_VSTD::memcpy(&__r, __p, sizeof(__r));
     return __r;
 }
 
@@ -48,7 +48,7 @@ template <class _Size>
 struct __murmur2_or_cityhash<_Size, 32>
 {
     inline _Size operator()(const void* __key, _Size __len)
-         _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK;
+         _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK;
 };
 
 // murmur2
@@ -73,10 +73,10 @@ __murmur2_or_cityhash<_Size, 32>::operator()(const void* __key, _Size __len)
     {
     case 3:
         __h ^= static_cast<_Size>(__data[2] << 16);
-        _LIBCPP_FALLTHROUGH();
+        _LIBCUDACXX_FALLTHROUGH();
     case 2:
         __h ^= static_cast<_Size>(__data[1] << 8);
-        _LIBCPP_FALLTHROUGH();
+        _LIBCUDACXX_FALLTHROUGH();
     case 1:
         __h ^= __data[0];
         __h *= __m;
@@ -90,7 +90,7 @@ __murmur2_or_cityhash<_Size, 32>::operator()(const void* __key, _Size __len)
 template <class _Size>
 struct __murmur2_or_cityhash<_Size, 64>
 {
-    inline _Size operator()(const void* __key, _Size __len)  _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK;
+    inline _Size operator()(const void* __key, _Size __len)  _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK;
 
  private:
   // Some primes between 2^63 and 2^64.
@@ -112,7 +112,7 @@ struct __murmur2_or_cityhash<_Size, 64>
   }
 
   static _Size __hash_len_16(_Size __u, _Size __v)
-     _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+     _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
   {
     const _Size __mul = 0x9ddfea08eb382d69ULL;
     _Size __a = (__u ^ __v) * __mul;
@@ -124,7 +124,7 @@ struct __murmur2_or_cityhash<_Size, 64>
   }
 
   static _Size __hash_len_0_to_16(const char* __s, _Size __len)
-     _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+     _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
   {
     if (__len > 8) {
       const _Size __a = __loadword<_Size>(__s);
@@ -149,7 +149,7 @@ struct __murmur2_or_cityhash<_Size, 64>
   }
 
   static _Size __hash_len_17_to_32(const char *__s, _Size __len)
-     _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+     _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
   {
     const _Size __a = __loadword<_Size>(__s) * __k1;
     const _Size __b = __loadword<_Size>(__s + 8);
@@ -163,7 +163,7 @@ struct __murmur2_or_cityhash<_Size, 64>
   // Callers do best to use "random-looking" values for a and b.
   static pair<_Size, _Size> __weak_hash_len_32_with_seeds(
       _Size __w, _Size __x, _Size __y, _Size __z, _Size __a, _Size __b)
-        _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+        _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
   {
     __a += __w;
     __b = __rotate(__b + __a + __z, 21);
@@ -177,7 +177,7 @@ struct __murmur2_or_cityhash<_Size, 64>
   // Return a 16-byte hash for s[0] ... s[31], a, and b.  Quick and dirty.
   static pair<_Size, _Size> __weak_hash_len_32_with_seeds(
       const char* __s, _Size __a, _Size __b)
-    _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+    _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
   {
     return __weak_hash_len_32_with_seeds(__loadword<_Size>(__s),
                                          __loadword<_Size>(__s + 8),
@@ -189,7 +189,7 @@ struct __murmur2_or_cityhash<_Size, 64>
 
   // Return an 8-byte hash for 33 to 64 bytes.
   static _Size __hash_len_33_to_64(const char *__s, size_t __len)
-    _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+    _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
   {
     _Size __z = __loadword<_Size>(__s + 24);
     _Size __a = __loadword<_Size>(__s) +
@@ -253,7 +253,7 @@ __murmur2_or_cityhash<_Size, 64>::operator()(const void* __key, _Size __len)
     __v = __weak_hash_len_32_with_seeds(__s, __v.second * __k1, __x + __w.first);
     __w = __weak_hash_len_32_with_seeds(__s + 32, __z + __w.second,
                                         __y + __loadword<_Size>(__s + 16));
-    _VSTD::swap(__z, __x);
+    _CUDA_VSTD::swap(__z, __x);
     __s += 64;
     __len -= 64;
   } while (__len != 0);
@@ -269,7 +269,7 @@ template <class _Tp>
 struct __scalar_hash<_Tp, 0>
     : public __unary_function<_Tp, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(_Tp __v) const _NOEXCEPT
     {
         union
@@ -287,7 +287,7 @@ template <class _Tp>
 struct __scalar_hash<_Tp, 1>
     : public __unary_function<_Tp, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(_Tp __v) const _NOEXCEPT
     {
         union
@@ -304,7 +304,7 @@ template <class _Tp>
 struct __scalar_hash<_Tp, 2>
     : public __unary_function<_Tp, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(_Tp __v) const _NOEXCEPT
     {
         union
@@ -325,7 +325,7 @@ template <class _Tp>
 struct __scalar_hash<_Tp, 3>
     : public __unary_function<_Tp, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(_Tp __v) const _NOEXCEPT
     {
         union
@@ -347,7 +347,7 @@ template <class _Tp>
 struct __scalar_hash<_Tp, 4>
     : public __unary_function<_Tp, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(_Tp __v) const _NOEXCEPT
     {
         union
@@ -371,7 +371,7 @@ struct _PairT {
   size_t second;
 };
 
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 inline size_t __hash_combine(size_t __lhs, size_t __rhs) _NOEXCEPT {
     typedef __scalar_hash<_PairT> _HashT;
     const _PairT __p = {__lhs, __rhs};
@@ -379,10 +379,10 @@ inline size_t __hash_combine(size_t __lhs, size_t __rhs) _NOEXCEPT {
 }
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash<_Tp*>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<_Tp*>
     : public __unary_function<_Tp*, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(_Tp* __v) const _NOEXCEPT
     {
         union
@@ -396,143 +396,143 @@ struct _LIBCPP_TEMPLATE_VIS hash<_Tp*>
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<bool>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<bool>
     : public __unary_function<bool, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(bool __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<char>
     : public __unary_function<char, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<signed char>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<signed char>
     : public __unary_function<signed char, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(signed char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<unsigned char>
     : public __unary_function<unsigned char, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(unsigned char __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char8_t>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<char8_t>
     : public __unary_function<char8_t, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(char8_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
-#endif // !_LIBCPP_HAS_NO_CHAR8_T
+#endif // !_LIBCUDACXX_HAS_NO_CHAR8_T
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char16_t>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<char16_t>
     : public __unary_function<char16_t, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(char16_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<char32_t>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<char32_t>
     : public __unary_function<char32_t, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(char32_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<wchar_t>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<wchar_t>
     : public __unary_function<wchar_t, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(wchar_t __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<short>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<short>
     : public __unary_function<short, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(short __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<unsigned short>
     : public __unary_function<unsigned short, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(unsigned short __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<int>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<int>
     : public __unary_function<int, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(int __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<unsigned int>
     : public __unary_function<unsigned int, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(unsigned int __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<long>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<long>
     : public __unary_function<long, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(long __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<unsigned long>
     : public __unary_function<unsigned long, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(unsigned long __v) const _NOEXCEPT {return static_cast<size_t>(__v);}
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<long long>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<long long>
     : public __scalar_hash<long long>
 {
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<unsigned long long>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<unsigned long long>
     : public __scalar_hash<unsigned long long>
 {
 };
 
-#ifndef _LIBCPP_HAS_NO_INT128
+#ifndef _LIBCUDACXX_HAS_NO_INT128
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<__int128_t>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<__int128_t>
     : public __scalar_hash<__int128_t>
 {
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<__uint128_t>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<__uint128_t>
     : public __scalar_hash<__uint128_t>
 {
 };
@@ -540,10 +540,10 @@ struct _LIBCPP_TEMPLATE_VIS hash<__uint128_t>
 #endif
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<float>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<float>
     : public __scalar_hash<float>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(float __v) const _NOEXCEPT
     {
         // -0.0 and 0.0 should return same hash
@@ -554,10 +554,10 @@ struct _LIBCPP_TEMPLATE_VIS hash<float>
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<double>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<double>
     : public __scalar_hash<double>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(double __v) const _NOEXCEPT
     {
         // -0.0 and 0.0 should return same hash
@@ -568,10 +568,10 @@ struct _LIBCPP_TEMPLATE_VIS hash<double>
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<long double>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<long double>
     : public __scalar_hash<long double>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(long double __v) const _NOEXCEPT
     {
         // -0.0 and 0.0 should return same hash
@@ -618,10 +618,10 @@ struct _LIBCPP_TEMPLATE_VIS hash<long double>
 };
 
 template <class _Tp, bool = is_enum<_Tp>::value>
-struct _LIBCPP_TEMPLATE_VIS __enum_hash
+struct _LIBCUDACXX_TEMPLATE_VIS __enum_hash
     : public __unary_function<_Tp, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(_Tp __v) const _NOEXCEPT
     {
         typedef typename underlying_type<_Tp>::type type;
@@ -629,59 +629,59 @@ struct _LIBCPP_TEMPLATE_VIS __enum_hash
     }
 };
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS __enum_hash<_Tp, false> {
+struct _LIBCUDACXX_TEMPLATE_VIS __enum_hash<_Tp, false> {
     __enum_hash() = delete;
     __enum_hash(__enum_hash const&) = delete;
     __enum_hash& operator=(__enum_hash const&) = delete;
 };
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash : public __enum_hash<_Tp>
+struct _LIBCUDACXX_TEMPLATE_VIS hash : public __enum_hash<_Tp>
 {
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<nullptr_t>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<nullptr_t>
   : public __unary_function<nullptr_t, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(nullptr_t) const _NOEXCEPT {
         return 662607004ull;
     }
 };
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Key, class _Hash>
-using __check_hash_requirements _LIBCPP_NODEBUG = integral_constant<bool,
+using __check_hash_requirements _LIBCUDACXX_NODEBUG = integral_constant<bool,
     is_copy_constructible<_Hash>::value &&
     is_move_constructible<_Hash>::value &&
     __invokable_r<size_t, _Hash, _Key const&>::value
 >;
 
 template <class _Key, class _Hash = hash<_Key> >
-using __has_enabled_hash _LIBCPP_NODEBUG = integral_constant<bool,
+using __has_enabled_hash _LIBCUDACXX_NODEBUG = integral_constant<bool,
     __check_hash_requirements<_Key, _Hash>::value &&
     is_default_constructible<_Hash>::value
 >;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Type, class>
-using __enable_hash_helper_imp _LIBCPP_NODEBUG = _Type;
+using __enable_hash_helper_imp _LIBCUDACXX_NODEBUG = _Type;
 
 template <class _Type, class ..._Keys>
-using __enable_hash_helper _LIBCPP_NODEBUG = __enable_hash_helper_imp<_Type,
+using __enable_hash_helper _LIBCUDACXX_NODEBUG = __enable_hash_helper_imp<_Type,
   typename enable_if<__all<__has_enabled_hash<_Keys>::value...>::value>::type
 >;
 #else
 template <class _Type, class ...>
-using __enable_hash_helper _LIBCPP_NODEBUG = _Type;
+using __enable_hash_helper _LIBCUDACXX_NODEBUG = _Type;
 #endif
 
-#endif // !_LIBCPP_CXX03_LANG
+#endif // !_LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_HASH_H
+#endif // _LIBCUDACXX___FUNCTIONAL_HASH_H

diff  --git a/libcxx/include/__functional/identity.h b/libcxx/include/__functional/identity.h
index 2fe3acca0899..415dbc10a009 100644
--- a/libcxx/include/__functional/identity.h
+++ b/libcxx/include/__functional/identity.h
@@ -7,40 +7,40 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_IDENTITY_H
-#define _LIBCPP___FUNCTIONAL_IDENTITY_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_IDENTITY_H
+#define _LIBCUDACXX___FUNCTIONAL_IDENTITY_H
 
 #include <__config>
 #include <__utility/forward.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 struct __identity {
   template <class _Tp>
-  _LIBCPP_NODISCARD _LIBCPP_CONSTEXPR _Tp&& operator()(_Tp&& __t) const _NOEXCEPT {
+  _LIBCUDACXX_NODISCARD _LIBCUDACXX_CONSTEXPR _Tp&& operator()(_Tp&& __t) const _NOEXCEPT {
     return std::forward<_Tp>(__t);
   }
 
   using is_transparent = void;
 };
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 struct identity {
     template<class _Tp>
-    _LIBCPP_NODISCARD_EXT constexpr _Tp&& operator()(_Tp&& __t) const noexcept
+    _LIBCUDACXX_NODISCARD_EXT constexpr _Tp&& operator()(_Tp&& __t) const noexcept
     {
-        return _VSTD::forward<_Tp>(__t);
+        return _CUDA_VSTD::forward<_Tp>(__t);
     }
 
     using is_transparent = void;
 };
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_IDENTITY_H
+#endif // _LIBCUDACXX___FUNCTIONAL_IDENTITY_H

diff  --git a/libcxx/include/__functional/invoke.h b/libcxx/include/__functional/invoke.h
index d56a0accdbce..e8d304950992 100644
--- a/libcxx/include/__functional/invoke.h
+++ b/libcxx/include/__functional/invoke.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_INVOKE_H
-#define _LIBCPP___FUNCTIONAL_INVOKE_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_INVOKE_H
+#define _LIBCUDACXX___FUNCTIONAL_INVOKE_H
 
 #include <__config>
 #include <__type_traits/add_lvalue_reference.h>
@@ -29,13 +29,13 @@
 #include <__utility/declval.h>
 #include <__utility/forward.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 // TODO: Disentangle the type traits and std::invoke properly
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 struct __any
 {
@@ -336,24 +336,24 @@ __nat __invoke(__any, _Args&& ...__args);
 
 template <class _Fp, class _A0, class ..._Args,
           class = __enable_if_bullet1<_Fp, _A0> >
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR decltype((std::declval<_A0>().*std::declval<_Fp>())(std::declval<_Args>()...))
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR decltype((std::declval<_A0>().*std::declval<_Fp>())(std::declval<_Args>()...))
 __invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
     _NOEXCEPT_(noexcept((static_cast<_A0&&>(__a0).*__f)(static_cast<_Args&&>(__args)...)))
     { return           (static_cast<_A0&&>(__a0).*__f)(static_cast<_Args&&>(__args)...); }
 
 template <class _Fp, class _A0, class ..._Args,
           class = __enable_if_bullet2<_Fp, _A0> >
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR decltype((std::declval<_A0>().get().*std::declval<_Fp>())(std::declval<_Args>()...))
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR decltype((std::declval<_A0>().get().*std::declval<_Fp>())(std::declval<_Args>()...))
 __invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
     _NOEXCEPT_(noexcept((__a0.get().*__f)(static_cast<_Args&&>(__args)...)))
     { return          (__a0.get().*__f)(static_cast<_Args&&>(__args)...); }
 
 template <class _Fp, class _A0, class ..._Args,
           class = __enable_if_bullet3<_Fp, _A0> >
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR decltype(((*std::declval<_A0>()).*std::declval<_Fp>())(std::declval<_Args>()...))
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR decltype(((*std::declval<_A0>()).*std::declval<_Fp>())(std::declval<_Args>()...))
 __invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
     _NOEXCEPT_(noexcept(((*static_cast<_A0&&>(__a0)).*__f)(static_cast<_Args&&>(__args)...)))
     { return          ((*static_cast<_A0&&>(__a0)).*__f)(static_cast<_Args&&>(__args)...); }
@@ -362,24 +362,24 @@ __invoke(_Fp&& __f, _A0&& __a0, _Args&& ...__args)
 
 template <class _Fp, class _A0,
           class = __enable_if_bullet4<_Fp, _A0> >
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR decltype(std::declval<_A0>().*std::declval<_Fp>())
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR decltype(std::declval<_A0>().*std::declval<_Fp>())
 __invoke(_Fp&& __f, _A0&& __a0)
     _NOEXCEPT_(noexcept(static_cast<_A0&&>(__a0).*__f))
     { return          static_cast<_A0&&>(__a0).*__f; }
 
 template <class _Fp, class _A0,
           class = __enable_if_bullet5<_Fp, _A0> >
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR decltype(std::declval<_A0>().get().*std::declval<_Fp>())
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR decltype(std::declval<_A0>().get().*std::declval<_Fp>())
 __invoke(_Fp&& __f, _A0&& __a0)
     _NOEXCEPT_(noexcept(__a0.get().*__f))
     { return          __a0.get().*__f; }
 
 template <class _Fp, class _A0,
           class = __enable_if_bullet6<_Fp, _A0> >
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR decltype((*std::declval<_A0>()).*std::declval<_Fp>())
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR decltype((*std::declval<_A0>()).*std::declval<_Fp>())
 __invoke(_Fp&& __f, _A0&& __a0)
     _NOEXCEPT_(noexcept((*static_cast<_A0&&>(__a0)).*__f))
     { return          (*static_cast<_A0&&>(__a0)).*__f; }
@@ -387,8 +387,8 @@ __invoke(_Fp&& __f, _A0&& __a0)
 // bullet 7
 
 template <class _Fp, class ..._Args>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR decltype(std::declval<_Fp>()(std::declval<_Args>()...))
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR decltype(std::declval<_Fp>()(std::declval<_Args>()...))
 __invoke(_Fp&& __f, _Args&& ...__args)
     _NOEXCEPT_(noexcept(static_cast<_Fp&&>(__f)(static_cast<_Args&&>(__args)...)))
     { return          static_cast<_Fp&&>(__f)(static_cast<_Args&&>(__args)...); }
@@ -429,14 +429,14 @@ struct __nothrow_invokable_r_imp<true, false, _Ret, _Fp, _Args...>
     static void __test_noexcept(_Tp) _NOEXCEPT;
 
     static const bool value = noexcept(_ThisT::__test_noexcept<_Ret>(
-        _VSTD::__invoke(declval<_Fp>(), declval<_Args>()...)));
+        _CUDA_VSTD::__invoke(declval<_Fp>(), declval<_Args>()...)));
 };
 
 template <class _Ret, class _Fp, class ..._Args>
 struct __nothrow_invokable_r_imp<true, true, _Ret, _Fp, _Args...>
 {
     static const bool value = noexcept(
-        _VSTD::__invoke(declval<_Fp>(), declval<_Args>()...));
+        _CUDA_VSTD::__invoke(declval<_Fp>(), declval<_Args>()...));
 };
 
 template <class _Ret, class _Fp, class ..._Args>
@@ -480,16 +480,16 @@ struct __invoke_void_return_wrapper<_Ret, true>
     }
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 // is_invocable
 
 template <class _Fn, class ..._Args>
-struct _LIBCPP_TEMPLATE_VIS is_invocable
+struct _LIBCUDACXX_TEMPLATE_VIS is_invocable
     : integral_constant<bool, __invokable<_Fn, _Args...>::value> {};
 
 template <class _Ret, class _Fn, class ..._Args>
-struct _LIBCPP_TEMPLATE_VIS is_invocable_r
+struct _LIBCUDACXX_TEMPLATE_VIS is_invocable_r
     : integral_constant<bool, __invokable_r<_Ret, _Fn, _Args...>::value> {};
 
 template <class _Fn, class ..._Args>
@@ -501,11 +501,11 @@ inline constexpr bool is_invocable_r_v = is_invocable_r<_Ret, _Fn, _Args...>::va
 // is_nothrow_invocable
 
 template <class _Fn, class ..._Args>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_invocable
     : integral_constant<bool, __nothrow_invokable<_Fn, _Args...>::value> {};
 
 template <class _Ret, class _Fn, class ..._Args>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_invocable_r
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_invocable_r
     : integral_constant<bool, __nothrow_invokable_r<_Ret, _Fn, _Args...>::value> {};
 
 template <class _Fn, class ..._Args>
@@ -515,7 +515,7 @@ template <class _Ret, class _Fn, class ..._Args>
 inline constexpr bool is_nothrow_invocable_r_v = is_nothrow_invocable_r<_Ret, _Fn, _Args...>::value;
 
 template <class _Fn, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS invoke_result
+struct _LIBCUDACXX_TEMPLATE_VIS invoke_result
     : __invoke_of<_Fn, _Args...>
 {
 };
@@ -524,15 +524,15 @@ template <class _Fn, class... _Args>
 using invoke_result_t = typename invoke_result<_Fn, _Args...>::type;
 
 template <class _Fn, class ..._Args>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 invoke_result_t<_Fn, _Args...>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 invoke_result_t<_Fn, _Args...>
 invoke(_Fn&& __f, _Args&&... __args)
     noexcept(is_nothrow_invocable_v<_Fn, _Args...>)
 {
-    return _VSTD::__invoke(_VSTD::forward<_Fn>(__f), _VSTD::forward<_Args>(__args)...);
+    return _CUDA_VSTD::__invoke(_CUDA_VSTD::forward<_Fn>(__f), _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_INVOKE_H
+#endif // _LIBCUDACXX___FUNCTIONAL_INVOKE_H

diff  --git a/libcxx/include/__functional/is_transparent.h b/libcxx/include/__functional/is_transparent.h
index 74326c76c12f..9006673aa4a8 100644
--- a/libcxx/include/__functional/is_transparent.h
+++ b/libcxx/include/__functional/is_transparent.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_IS_TRANSPARENT
-#define _LIBCPP___FUNCTIONAL_IS_TRANSPARENT
+#ifndef _LIBCUDACXX___FUNCTIONAL_IS_TRANSPARENT
+#define _LIBCUDACXX___FUNCTIONAL_IS_TRANSPARENT
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 
 template <class _Tp, class, class = void>
 struct __is_transparent : false_type {};
@@ -31,6 +31,6 @@ struct __is_transparent<_Tp, _Up,
 
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_IS_TRANSPARENT
+#endif // _LIBCUDACXX___FUNCTIONAL_IS_TRANSPARENT

diff  --git a/libcxx/include/__functional/mem_fn.h b/libcxx/include/__functional/mem_fn.h
index a5818b3f018c..661d0c1d7637 100644
--- a/libcxx/include/__functional/mem_fn.h
+++ b/libcxx/include/__functional/mem_fn.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_MEM_FN_H
-#define _LIBCPP___FUNCTIONAL_MEM_FN_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_MEM_FN_H
+#define _LIBCUDACXX___FUNCTIONAL_MEM_FN_H
 
 #include <__config>
 #include <__functional/binary_function.h>
@@ -17,11 +17,11 @@
 #include <__utility/forward.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
 class __mem_fn : public __weak_result_type<_Tp>
@@ -33,12 +33,12 @@ class __mem_fn : public __weak_result_type<_Tp>
     type __f_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __mem_fn(type __f) _NOEXCEPT : __f_(__f) {}
 
     // invoke
     template <class... _ArgTypes>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 
     typename __invoke_return<type, _ArgTypes...>::type
     operator() (_ArgTypes&&... __args) const {
@@ -47,13 +47,13 @@ class __mem_fn : public __weak_result_type<_Tp>
 };
 
 template<class _Rp, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __mem_fn<_Rp _Tp::*>
 mem_fn(_Rp _Tp::* __pm) _NOEXCEPT
 {
     return __mem_fn<_Rp _Tp::*>(__pm);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_MEM_FN_H
+#endif // _LIBCUDACXX___FUNCTIONAL_MEM_FN_H

diff  --git a/libcxx/include/__functional/mem_fun_ref.h b/libcxx/include/__functional/mem_fun_ref.h
index 65aab0696c16..faa3b4f78d71 100644
--- a/libcxx/include/__functional/mem_fun_ref.h
+++ b/libcxx/include/__functional/mem_fun_ref.h
@@ -7,167 +7,167 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_MEM_FUN_REF_H
-#define _LIBCPP___FUNCTIONAL_MEM_FUN_REF_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_MEM_FUN_REF_H
+#define _LIBCUDACXX___FUNCTIONAL_MEM_FUN_REF_H
 
 #include <__config>
 #include <__functional/binary_function.h>
 #include <__functional/unary_function.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)
 
 template<class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_t
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 mem_fun_t
     : public __unary_function<_Tp*, _Sp>
 {
     _Sp (_Tp::*__p_)();
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit mem_fun_t(_Sp (_Tp::*__p)())
+    _LIBCUDACXX_INLINE_VISIBILITY explicit mem_fun_t(_Sp (_Tp::*__p)())
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY _Sp operator()(_Tp* __p) const
+    _LIBCUDACXX_INLINE_VISIBILITY _Sp operator()(_Tp* __p) const
         {return (__p->*__p_)();}
 };
 
 template<class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_t
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 mem_fun1_t
     : public __binary_function<_Tp*, _Ap, _Sp>
 {
     _Sp (_Tp::*__p_)(_Ap);
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit mem_fun1_t(_Sp (_Tp::*__p)(_Ap))
+    _LIBCUDACXX_INLINE_VISIBILITY explicit mem_fun1_t(_Sp (_Tp::*__p)(_Ap))
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY _Sp operator()(_Tp* __p, _Ap __x) const
+    _LIBCUDACXX_INLINE_VISIBILITY _Sp operator()(_Tp* __p, _Ap __x) const
         {return (__p->*__p_)(__x);}
 };
 
 template<class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 mem_fun_t<_Sp,_Tp>
 mem_fun(_Sp (_Tp::*__f)())
     {return mem_fun_t<_Sp,_Tp>(__f);}
 
 template<class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 mem_fun1_t<_Sp,_Tp,_Ap>
 mem_fun(_Sp (_Tp::*__f)(_Ap))
     {return mem_fun1_t<_Sp,_Tp,_Ap>(__f);}
 
 template<class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun_ref_t
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 mem_fun_ref_t
     : public __unary_function<_Tp, _Sp>
 {
     _Sp (_Tp::*__p_)();
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit mem_fun_ref_t(_Sp (_Tp::*__p)())
+    _LIBCUDACXX_INLINE_VISIBILITY explicit mem_fun_ref_t(_Sp (_Tp::*__p)())
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY _Sp operator()(_Tp& __p) const
+    _LIBCUDACXX_INLINE_VISIBILITY _Sp operator()(_Tp& __p) const
         {return (__p.*__p_)();}
 };
 
 template<class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 mem_fun1_ref_t
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 mem_fun1_ref_t
     : public __binary_function<_Tp, _Ap, _Sp>
 {
     _Sp (_Tp::*__p_)(_Ap);
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit mem_fun1_ref_t(_Sp (_Tp::*__p)(_Ap))
+    _LIBCUDACXX_INLINE_VISIBILITY explicit mem_fun1_ref_t(_Sp (_Tp::*__p)(_Ap))
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY _Sp operator()(_Tp& __p, _Ap __x) const
+    _LIBCUDACXX_INLINE_VISIBILITY _Sp operator()(_Tp& __p, _Ap __x) const
         {return (__p.*__p_)(__x);}
 };
 
 template<class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 mem_fun_ref_t<_Sp,_Tp>
 mem_fun_ref(_Sp (_Tp::*__f)())
     {return mem_fun_ref_t<_Sp,_Tp>(__f);}
 
 template<class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 mem_fun1_ref_t<_Sp,_Tp,_Ap>
 mem_fun_ref(_Sp (_Tp::*__f)(_Ap))
     {return mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}
 
 template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_t
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun_t
     : public __unary_function<const _Tp*, _Sp>
 {
     _Sp (_Tp::*__p_)() const;
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit const_mem_fun_t(_Sp (_Tp::*__p)() const)
+    _LIBCUDACXX_INLINE_VISIBILITY explicit const_mem_fun_t(_Sp (_Tp::*__p)() const)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY _Sp operator()(const _Tp* __p) const
+    _LIBCUDACXX_INLINE_VISIBILITY _Sp operator()(const _Tp* __p) const
         {return (__p->*__p_)();}
 };
 
 template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_t
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun1_t
     : public __binary_function<const _Tp*, _Ap, _Sp>
 {
     _Sp (_Tp::*__p_)(_Ap) const;
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit const_mem_fun1_t(_Sp (_Tp::*__p)(_Ap) const)
+    _LIBCUDACXX_INLINE_VISIBILITY explicit const_mem_fun1_t(_Sp (_Tp::*__p)(_Ap) const)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY _Sp operator()(const _Tp* __p, _Ap __x) const
+    _LIBCUDACXX_INLINE_VISIBILITY _Sp operator()(const _Tp* __p, _Ap __x) const
         {return (__p->*__p_)(__x);}
 };
 
 template <class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 const_mem_fun_t<_Sp,_Tp>
 mem_fun(_Sp (_Tp::*__f)() const)
     {return const_mem_fun_t<_Sp,_Tp>(__f);}
 
 template <class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 const_mem_fun1_t<_Sp,_Tp,_Ap>
 mem_fun(_Sp (_Tp::*__f)(_Ap) const)
     {return const_mem_fun1_t<_Sp,_Tp,_Ap>(__f);}
 
 template <class _Sp, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun_ref_t
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun_ref_t
     : public __unary_function<_Tp, _Sp>
 {
     _Sp (_Tp::*__p_)() const;
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit const_mem_fun_ref_t(_Sp (_Tp::*__p)() const)
+    _LIBCUDACXX_INLINE_VISIBILITY explicit const_mem_fun_ref_t(_Sp (_Tp::*__p)() const)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY _Sp operator()(const _Tp& __p) const
+    _LIBCUDACXX_INLINE_VISIBILITY _Sp operator()(const _Tp& __p) const
         {return (__p.*__p_)();}
 };
 
 template <class _Sp, class _Tp, class _Ap>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 const_mem_fun1_ref_t
     : public __binary_function<_Tp, _Ap, _Sp>
 {
     _Sp (_Tp::*__p_)(_Ap) const;
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit const_mem_fun1_ref_t(_Sp (_Tp::*__p)(_Ap) const)
+    _LIBCUDACXX_INLINE_VISIBILITY explicit const_mem_fun1_ref_t(_Sp (_Tp::*__p)(_Ap) const)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY _Sp operator()(const _Tp& __p, _Ap __x) const
+    _LIBCUDACXX_INLINE_VISIBILITY _Sp operator()(const _Tp& __p, _Ap __x) const
         {return (__p.*__p_)(__x);}
 };
 
 template <class _Sp, class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 const_mem_fun_ref_t<_Sp,_Tp>
 mem_fun_ref(_Sp (_Tp::*__f)() const)
     {return const_mem_fun_ref_t<_Sp,_Tp>(__f);}
 
 template <class _Sp, class _Tp, class _Ap>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 const_mem_fun1_ref_t<_Sp,_Tp,_Ap>
 mem_fun_ref(_Sp (_Tp::*__f)(_Ap) const)
     {return const_mem_fun1_ref_t<_Sp,_Tp,_Ap>(__f);}
 
-#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
+#endif // _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_MEM_FUN_REF_H
+#endif // _LIBCUDACXX___FUNCTIONAL_MEM_FUN_REF_H

diff  --git a/libcxx/include/__functional/not_fn.h b/libcxx/include/__functional/not_fn.h
index b5c415c25c44..2713962f7ad4 100644
--- a/libcxx/include/__functional/not_fn.h
+++ b/libcxx/include/__functional/not_fn.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_NOT_FN_H
-#define _LIBCPP___FUNCTIONAL_NOT_FN_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_NOT_FN_H
+#define _LIBCUDACXX___FUNCTIONAL_NOT_FN_H
 
 #include <__config>
 #include <__functional/invoke.h>
@@ -16,21 +16,21 @@
 #include <__utility/forward.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 struct __not_fn_op {
     template <class... _Args>
-    _LIBCPP_HIDE_FROM_ABI
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 auto operator()(_Args&&... __args) const
-        noexcept(noexcept(!_VSTD::invoke(_VSTD::forward<_Args>(__args)...)))
-        -> decltype(      !_VSTD::invoke(_VSTD::forward<_Args>(__args)...))
-        { return          !_VSTD::invoke(_VSTD::forward<_Args>(__args)...); }
+    _LIBCUDACXX_HIDE_FROM_ABI
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 auto operator()(_Args&&... __args) const
+        noexcept(noexcept(!_CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Args>(__args)...)))
+        -> decltype(      !_CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Args>(__args)...))
+        { return          !_CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Args>(__args)...); }
 };
 
 template <class _Fn>
@@ -42,13 +42,13 @@ template <class _Fn, class = enable_if_t<
     is_constructible_v<decay_t<_Fn>, _Fn> &&
     is_move_constructible_v<decay_t<_Fn>>
 >>
-_LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR_AFTER_CXX17 auto not_fn(_Fn&& __f) {
-    return __not_fn_t<decay_t<_Fn>>(_VSTD::forward<_Fn>(__f));
+_LIBCUDACXX_HIDE_FROM_ABI
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 auto not_fn(_Fn&& __f) {
+    return __not_fn_t<decay_t<_Fn>>(_CUDA_VSTD::forward<_Fn>(__f));
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_NOT_FN_H
+#endif // _LIBCUDACXX___FUNCTIONAL_NOT_FN_H

diff  --git a/libcxx/include/__functional/operations.h b/libcxx/include/__functional/operations.h
index 1c73c999db91..aff27b53f316 100644
--- a/libcxx/include/__functional/operations.h
+++ b/libcxx/include/__functional/operations.h
@@ -7,555 +7,555 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_OPERATIONS_H
-#define _LIBCPP___FUNCTIONAL_OPERATIONS_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_OPERATIONS_H
+#define _LIBCUDACXX___FUNCTIONAL_OPERATIONS_H
 
 #include <__config>
 #include <__functional/binary_function.h>
 #include <__functional/unary_function.h>
 #include <__utility/forward.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Arithmetic operations
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS plus
+struct _LIBCUDACXX_TEMPLATE_VIS plus
     : __binary_function<_Tp, _Tp, _Tp>
 {
     typedef _Tp __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return __x + __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS plus<void>
+struct _LIBCUDACXX_TEMPLATE_VIS plus<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) + _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) + _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) + _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) + _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS minus
+struct _LIBCUDACXX_TEMPLATE_VIS minus
     : __binary_function<_Tp, _Tp, _Tp>
 {
     typedef _Tp __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return __x - __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS minus<void>
+struct _LIBCUDACXX_TEMPLATE_VIS minus<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) - _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) - _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) - _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) - _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS multiplies
+struct _LIBCUDACXX_TEMPLATE_VIS multiplies
     : __binary_function<_Tp, _Tp, _Tp>
 {
     typedef _Tp __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return __x * __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS multiplies<void>
+struct _LIBCUDACXX_TEMPLATE_VIS multiplies<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) * _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) * _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) * _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) * _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS divides
+struct _LIBCUDACXX_TEMPLATE_VIS divides
     : __binary_function<_Tp, _Tp, _Tp>
 {
     typedef _Tp __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return __x / __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS divides<void>
+struct _LIBCUDACXX_TEMPLATE_VIS divides<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) / _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) / _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) / _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) / _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS modulus
+struct _LIBCUDACXX_TEMPLATE_VIS modulus
     : __binary_function<_Tp, _Tp, _Tp>
 {
     typedef _Tp __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return __x % __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS modulus<void>
+struct _LIBCUDACXX_TEMPLATE_VIS modulus<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) % _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) % _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) % _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) % _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS negate
+struct _LIBCUDACXX_TEMPLATE_VIS negate
     : __unary_function<_Tp, _Tp>
 {
     typedef _Tp __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return -__x;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS negate<void>
+struct _LIBCUDACXX_TEMPLATE_VIS negate<void>
 {
     template <class _Tp>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_Tp&& __x) const
-        noexcept(noexcept(- _VSTD::forward<_Tp>(__x)))
-        -> decltype(      - _VSTD::forward<_Tp>(__x))
-        { return          - _VSTD::forward<_Tp>(__x); }
+        noexcept(noexcept(- _CUDA_VSTD::forward<_Tp>(__x)))
+        -> decltype(      - _CUDA_VSTD::forward<_Tp>(__x))
+        { return          - _CUDA_VSTD::forward<_Tp>(__x); }
     typedef void is_transparent;
 };
 #endif
 
 // Bitwise operations
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS bit_and
+struct _LIBCUDACXX_TEMPLATE_VIS bit_and
     : __binary_function<_Tp, _Tp, _Tp>
 {
     typedef _Tp __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return __x & __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS bit_and<void>
+struct _LIBCUDACXX_TEMPLATE_VIS bit_and<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) & _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) & _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) & _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) & _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
-struct _LIBCPP_TEMPLATE_VIS bit_not
+struct _LIBCUDACXX_TEMPLATE_VIS bit_not
     : __unary_function<_Tp, _Tp>
 {
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return ~__x;}
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS bit_not<void>
+struct _LIBCUDACXX_TEMPLATE_VIS bit_not<void>
 {
     template <class _Tp>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_Tp&& __x) const
-        noexcept(noexcept(~_VSTD::forward<_Tp>(__x)))
-        -> decltype(      ~_VSTD::forward<_Tp>(__x))
-        { return          ~_VSTD::forward<_Tp>(__x); }
+        noexcept(noexcept(~_CUDA_VSTD::forward<_Tp>(__x)))
+        -> decltype(      ~_CUDA_VSTD::forward<_Tp>(__x))
+        { return          ~_CUDA_VSTD::forward<_Tp>(__x); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS bit_or
+struct _LIBCUDACXX_TEMPLATE_VIS bit_or
     : __binary_function<_Tp, _Tp, _Tp>
 {
     typedef _Tp __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return __x | __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS bit_or<void>
+struct _LIBCUDACXX_TEMPLATE_VIS bit_or<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) | _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) | _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) | _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) | _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS bit_xor
+struct _LIBCUDACXX_TEMPLATE_VIS bit_xor
     : __binary_function<_Tp, _Tp, _Tp>
 {
     typedef _Tp __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return __x ^ __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS bit_xor<void>
+struct _LIBCUDACXX_TEMPLATE_VIS bit_xor<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) ^ _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) ^ _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) ^ _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) ^ _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
 // Comparison operations
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS equal_to
+struct _LIBCUDACXX_TEMPLATE_VIS equal_to
     : __binary_function<_Tp, _Tp, bool>
 {
     typedef bool __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const _Tp& __y) const
         {return __x == __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS equal_to<void>
+struct _LIBCUDACXX_TEMPLATE_VIS equal_to<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) == _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) == _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) == _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) == _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS not_equal_to
+struct _LIBCUDACXX_TEMPLATE_VIS not_equal_to
     : __binary_function<_Tp, _Tp, bool>
 {
     typedef bool __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const _Tp& __y) const
         {return __x != __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS not_equal_to<void>
+struct _LIBCUDACXX_TEMPLATE_VIS not_equal_to<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) != _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) != _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) != _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) != _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS less
+struct _LIBCUDACXX_TEMPLATE_VIS less
     : __binary_function<_Tp, _Tp, bool>
 {
     typedef bool __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const _Tp& __y) const
         {return __x < __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS less<void>
+struct _LIBCUDACXX_TEMPLATE_VIS less<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) < _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) < _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) < _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) < _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS less_equal
+struct _LIBCUDACXX_TEMPLATE_VIS less_equal
     : __binary_function<_Tp, _Tp, bool>
 {
     typedef bool __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const _Tp& __y) const
         {return __x <= __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS less_equal<void>
+struct _LIBCUDACXX_TEMPLATE_VIS less_equal<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) <= _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) <= _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) <= _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) <= _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS greater_equal
+struct _LIBCUDACXX_TEMPLATE_VIS greater_equal
     : __binary_function<_Tp, _Tp, bool>
 {
     typedef bool __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const _Tp& __y) const
         {return __x >= __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS greater_equal<void>
+struct _LIBCUDACXX_TEMPLATE_VIS greater_equal<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) >= _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) >= _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) >= _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) >= _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS greater
+struct _LIBCUDACXX_TEMPLATE_VIS greater
     : __binary_function<_Tp, _Tp, bool>
 {
     typedef bool __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const _Tp& __y) const
         {return __x > __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS greater<void>
+struct _LIBCUDACXX_TEMPLATE_VIS greater<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) > _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) > _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) > _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) > _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
 // Logical operations
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS logical_and
+struct _LIBCUDACXX_TEMPLATE_VIS logical_and
     : __binary_function<_Tp, _Tp, bool>
 {
     typedef bool __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const _Tp& __y) const
         {return __x && __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS logical_and<void>
+struct _LIBCUDACXX_TEMPLATE_VIS logical_and<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) && _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) && _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) && _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) && _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS logical_not
+struct _LIBCUDACXX_TEMPLATE_VIS logical_not
     : __unary_function<_Tp, bool>
 {
     typedef bool __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x) const
         {return !__x;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS logical_not<void>
+struct _LIBCUDACXX_TEMPLATE_VIS logical_not<void>
 {
     template <class _Tp>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_Tp&& __x) const
-        noexcept(noexcept(!_VSTD::forward<_Tp>(__x)))
-        -> decltype(      !_VSTD::forward<_Tp>(__x))
-        { return          !_VSTD::forward<_Tp>(__x); }
+        noexcept(noexcept(!_CUDA_VSTD::forward<_Tp>(__x)))
+        -> decltype(      !_CUDA_VSTD::forward<_Tp>(__x))
+        { return          !_CUDA_VSTD::forward<_Tp>(__x); }
     typedef void is_transparent;
 };
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp = void>
 #else
 template <class _Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS logical_or
+struct _LIBCUDACXX_TEMPLATE_VIS logical_or
     : __binary_function<_Tp, _Tp, bool>
 {
     typedef bool __result_type;  // used by valarray
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const _Tp& __y) const
         {return __x || __y;}
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <>
-struct _LIBCPP_TEMPLATE_VIS logical_or<void>
+struct _LIBCUDACXX_TEMPLATE_VIS logical_or<void>
 {
     template <class _T1, class _T2>
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     auto operator()(_T1&& __t, _T2&& __u) const
-        noexcept(noexcept(_VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u)))
-        -> decltype(      _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u))
-        { return          _VSTD::forward<_T1>(__t) || _VSTD::forward<_T2>(__u); }
+        noexcept(noexcept(_CUDA_VSTD::forward<_T1>(__t) || _CUDA_VSTD::forward<_T2>(__u)))
+        -> decltype(      _CUDA_VSTD::forward<_T1>(__t) || _CUDA_VSTD::forward<_T2>(__u))
+        { return          _CUDA_VSTD::forward<_T1>(__t) || _CUDA_VSTD::forward<_T2>(__u); }
     typedef void is_transparent;
 };
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_OPERATIONS_H
+#endif // _LIBCUDACXX___FUNCTIONAL_OPERATIONS_H

diff  --git a/libcxx/include/__functional/perfect_forward.h b/libcxx/include/__functional/perfect_forward.h
index 9ffea1a8c75d..ce4882c1ca5d 100644
--- a/libcxx/include/__functional/perfect_forward.h
+++ b/libcxx/include/__functional/perfect_forward.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_PERFECT_FORWARD_H
-#define _LIBCPP___FUNCTIONAL_PERFECT_FORWARD_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_PERFECT_FORWARD_H
+#define _LIBCUDACXX___FUNCTIONAL_PERFECT_FORWARD_H
 
 #include <__config>
 #include <__utility/declval.h>
@@ -17,13 +17,13 @@
 #include <tuple>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _Op, class _Indices, class... _BoundArgs>
 struct __perfect_forward_impl;
@@ -38,7 +38,7 @@ struct __perfect_forward_impl<_Op, index_sequence<_Idx...>, _BoundArgs...> {
     is_constructible_v<tuple<_BoundArgs...>, _Args&&...>
   >>
   explicit constexpr __perfect_forward_impl(_Args&&... __bound_args)
-    : __bound_args_(_VSTD::forward<_Args>(__bound_args)...) {}
+    : __bound_args_(_CUDA_VSTD::forward<_Args>(__bound_args)...) {}
 
   __perfect_forward_impl(__perfect_forward_impl const&) = default;
   __perfect_forward_impl(__perfect_forward_impl&&) = default;
@@ -47,37 +47,37 @@ struct __perfect_forward_impl<_Op, index_sequence<_Idx...>, _BoundArgs...> {
   __perfect_forward_impl& operator=(__perfect_forward_impl&&) = default;
 
   template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs&..., _Args...>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) &
-    noexcept(noexcept(_Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...)))
-    -> decltype(      _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...))
-    { return          _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...); }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) &
+    noexcept(noexcept(_Op()(_CUDA_VSTD::get<_Idx>(__bound_args_)..., _CUDA_VSTD::forward<_Args>(__args)...)))
+    -> decltype(      _Op()(_CUDA_VSTD::get<_Idx>(__bound_args_)..., _CUDA_VSTD::forward<_Args>(__args)...))
+    { return          _Op()(_CUDA_VSTD::get<_Idx>(__bound_args_)..., _CUDA_VSTD::forward<_Args>(__args)...); }
 
   template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs&..., _Args...>>>
   auto operator()(_Args&&...) & = delete;
 
   template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs const&..., _Args...>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&
-    noexcept(noexcept(_Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...)))
-    -> decltype(      _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...))
-    { return          _Op()(_VSTD::get<_Idx>(__bound_args_)..., _VSTD::forward<_Args>(__args)...); }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&
+    noexcept(noexcept(_Op()(_CUDA_VSTD::get<_Idx>(__bound_args_)..., _CUDA_VSTD::forward<_Args>(__args)...)))
+    -> decltype(      _Op()(_CUDA_VSTD::get<_Idx>(__bound_args_)..., _CUDA_VSTD::forward<_Args>(__args)...))
+    { return          _Op()(_CUDA_VSTD::get<_Idx>(__bound_args_)..., _CUDA_VSTD::forward<_Args>(__args)...); }
 
   template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs const&..., _Args...>>>
   auto operator()(_Args&&...) const& = delete;
 
   template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs..., _Args...>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) &&
-    noexcept(noexcept(_Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...)))
-    -> decltype(      _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...))
-    { return          _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...); }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) &&
+    noexcept(noexcept(_Op()(_CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__bound_args_))..., _CUDA_VSTD::forward<_Args>(__args)...)))
+    -> decltype(      _Op()(_CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__bound_args_))..., _CUDA_VSTD::forward<_Args>(__args)...))
+    { return          _Op()(_CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__bound_args_))..., _CUDA_VSTD::forward<_Args>(__args)...); }
 
   template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs..., _Args...>>>
   auto operator()(_Args&&...) && = delete;
 
   template <class... _Args, class = enable_if_t<is_invocable_v<_Op, _BoundArgs const..., _Args...>>>
-  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&&
-    noexcept(noexcept(_Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...)))
-    -> decltype(      _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...))
-    { return          _Op()(_VSTD::get<_Idx>(_VSTD::move(__bound_args_))..., _VSTD::forward<_Args>(__args)...); }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Args&&... __args) const&&
+    noexcept(noexcept(_Op()(_CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__bound_args_))..., _CUDA_VSTD::forward<_Args>(__args)...)))
+    -> decltype(      _Op()(_CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__bound_args_))..., _CUDA_VSTD::forward<_Args>(__args)...))
+    { return          _Op()(_CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__bound_args_))..., _CUDA_VSTD::forward<_Args>(__args)...); }
 
   template <class... _Args, class = enable_if_t<!is_invocable_v<_Op, _BoundArgs const..., _Args...>>>
   auto operator()(_Args&&...) const&& = delete;
@@ -87,8 +87,8 @@ struct __perfect_forward_impl<_Op, index_sequence<_Idx...>, _BoundArgs...> {
 template <class _Op, class ..._Args>
 using __perfect_forward = __perfect_forward_impl<_Op, index_sequence_for<_Args...>, _Args...>;
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_PERFECT_FORWARD_H
+#endif // _LIBCUDACXX___FUNCTIONAL_PERFECT_FORWARD_H

diff  --git a/libcxx/include/__functional/pointer_to_binary_function.h b/libcxx/include/__functional/pointer_to_binary_function.h
index b2676c58f885..cd48debca7e9 100644
--- a/libcxx/include/__functional/pointer_to_binary_function.h
+++ b/libcxx/include/__functional/pointer_to_binary_function.h
@@ -7,40 +7,40 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_POINTER_TO_BINARY_FUNCTION_H
-#define _LIBCPP___FUNCTIONAL_POINTER_TO_BINARY_FUNCTION_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_POINTER_TO_BINARY_FUNCTION_H
+#define _LIBCUDACXX___FUNCTIONAL_POINTER_TO_BINARY_FUNCTION_H
 
 #include <__config>
 #include <__functional/binary_function.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)
 
 template <class _Arg1, class _Arg2, class _Result>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_binary_function
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 pointer_to_binary_function
     : public __binary_function<_Arg1, _Arg2, _Result>
 {
     _Result (*__f_)(_Arg1, _Arg2);
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit pointer_to_binary_function(_Result (*__f)(_Arg1, _Arg2))
+    _LIBCUDACXX_INLINE_VISIBILITY explicit pointer_to_binary_function(_Result (*__f)(_Arg1, _Arg2))
         : __f_(__f) {}
-    _LIBCPP_INLINE_VISIBILITY _Result operator()(_Arg1 __x, _Arg2 __y) const
+    _LIBCUDACXX_INLINE_VISIBILITY _Result operator()(_Arg1 __x, _Arg2 __y) const
         {return __f_(__x, __y);}
 };
 
 template <class _Arg1, class _Arg2, class _Result>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 pointer_to_binary_function<_Arg1,_Arg2,_Result>
 ptr_fun(_Result (*__f)(_Arg1,_Arg2))
     {return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f);}
 
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_POINTER_TO_BINARY_FUNCTION_H
+#endif // _LIBCUDACXX___FUNCTIONAL_POINTER_TO_BINARY_FUNCTION_H

diff  --git a/libcxx/include/__functional/pointer_to_unary_function.h b/libcxx/include/__functional/pointer_to_unary_function.h
index 77d07adf20f0..dbd866b65954 100644
--- a/libcxx/include/__functional/pointer_to_unary_function.h
+++ b/libcxx/include/__functional/pointer_to_unary_function.h
@@ -7,40 +7,40 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_POINTER_TO_UNARY_FUNCTION_H
-#define _LIBCPP___FUNCTIONAL_POINTER_TO_UNARY_FUNCTION_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_POINTER_TO_UNARY_FUNCTION_H
+#define _LIBCUDACXX___FUNCTIONAL_POINTER_TO_UNARY_FUNCTION_H
 
 #include <__config>
 #include <__functional/unary_function.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)
 
 template <class _Arg, class _Result>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 pointer_to_unary_function
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 pointer_to_unary_function
     : public __unary_function<_Arg, _Result>
 {
     _Result (*__f_)(_Arg);
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit pointer_to_unary_function(_Result (*__f)(_Arg))
+    _LIBCUDACXX_INLINE_VISIBILITY explicit pointer_to_unary_function(_Result (*__f)(_Arg))
         : __f_(__f) {}
-    _LIBCPP_INLINE_VISIBILITY _Result operator()(_Arg __x) const
+    _LIBCUDACXX_INLINE_VISIBILITY _Result operator()(_Arg __x) const
         {return __f_(__x);}
 };
 
 template <class _Arg, class _Result>
-_LIBCPP_DEPRECATED_IN_CXX11 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX11 inline _LIBCUDACXX_INLINE_VISIBILITY
 pointer_to_unary_function<_Arg,_Result>
 ptr_fun(_Result (*__f)(_Arg))
     {return pointer_to_unary_function<_Arg,_Result>(__f);}
 
-#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
+#endif // _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_POINTER_TO_UNARY_FUNCTION_H
+#endif // _LIBCUDACXX___FUNCTIONAL_POINTER_TO_UNARY_FUNCTION_H

diff  --git a/libcxx/include/__functional/ranges_operations.h b/libcxx/include/__functional/ranges_operations.h
index 3f63a86731e0..1b747d7f395c 100644
--- a/libcxx/include/__functional/ranges_operations.h
+++ b/libcxx/include/__functional/ranges_operations.h
@@ -7,20 +7,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_RANGES_OPERATIONS_H
-#define _LIBCPP___FUNCTIONAL_RANGES_OPERATIONS_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_RANGES_OPERATIONS_H
+#define _LIBCUDACXX___FUNCTIONAL_RANGES_OPERATIONS_H
 
 #include <__config>
 #include <__utility/forward.h>
 #include <concepts>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace ranges {
 
@@ -28,8 +28,8 @@ struct equal_to {
   template <class _Tp, class _Up>
   requires equality_comparable_with<_Tp, _Up>
   [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const
-      noexcept(noexcept(bool(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u)))) {
-    return _VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u);
+      noexcept(noexcept(bool(_CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u)))) {
+    return _CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u);
   }
 
   using is_transparent = void;
@@ -39,8 +39,8 @@ struct not_equal_to {
   template <class _Tp, class _Up>
   requires equality_comparable_with<_Tp, _Up>
   [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const
-      noexcept(noexcept(bool(!(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u))))) {
-    return !(_VSTD::forward<_Tp>(__t) == _VSTD::forward<_Up>(__u));
+      noexcept(noexcept(bool(!(_CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u))))) {
+    return !(_CUDA_VSTD::forward<_Tp>(__t) == _CUDA_VSTD::forward<_Up>(__u));
   }
 
   using is_transparent = void;
@@ -50,8 +50,8 @@ struct less {
   template <class _Tp, class _Up>
   requires totally_ordered_with<_Tp, _Up>
   [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const
-      noexcept(noexcept(bool(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u)))) {
-    return _VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u);
+      noexcept(noexcept(bool(_CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u)))) {
+    return _CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u);
   }
 
   using is_transparent = void;
@@ -61,8 +61,8 @@ struct less_equal {
   template <class _Tp, class _Up>
   requires totally_ordered_with<_Tp, _Up>
   [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const
-      noexcept(noexcept(bool(!(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t))))) {
-    return !(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t));
+      noexcept(noexcept(bool(!(_CUDA_VSTD::forward<_Up>(__u) < _CUDA_VSTD::forward<_Tp>(__t))))) {
+    return !(_CUDA_VSTD::forward<_Up>(__u) < _CUDA_VSTD::forward<_Tp>(__t));
   }
 
   using is_transparent = void;
@@ -72,8 +72,8 @@ struct greater {
   template <class _Tp, class _Up>
   requires totally_ordered_with<_Tp, _Up>
   [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const
-      noexcept(noexcept(bool(_VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t)))) {
-    return _VSTD::forward<_Up>(__u) < _VSTD::forward<_Tp>(__t);
+      noexcept(noexcept(bool(_CUDA_VSTD::forward<_Up>(__u) < _CUDA_VSTD::forward<_Tp>(__t)))) {
+    return _CUDA_VSTD::forward<_Up>(__u) < _CUDA_VSTD::forward<_Tp>(__t);
   }
 
   using is_transparent = void;
@@ -83,8 +83,8 @@ struct greater_equal {
   template <class _Tp, class _Up>
   requires totally_ordered_with<_Tp, _Up>
   [[nodiscard]] constexpr bool operator()(_Tp &&__t, _Up &&__u) const
-      noexcept(noexcept(bool(!(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u))))) {
-    return !(_VSTD::forward<_Tp>(__t) < _VSTD::forward<_Up>(__u));
+      noexcept(noexcept(bool(!(_CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u))))) {
+    return !(_CUDA_VSTD::forward<_Tp>(__t) < _CUDA_VSTD::forward<_Up>(__u));
   }
 
   using is_transparent = void;
@@ -92,8 +92,8 @@ struct greater_equal {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_RANGES_OPERATIONS_H
+#endif // _LIBCUDACXX___FUNCTIONAL_RANGES_OPERATIONS_H

diff  --git a/libcxx/include/__functional/reference_wrapper.h b/libcxx/include/__functional/reference_wrapper.h
index 8245e3a04734..ef3d22774384 100644
--- a/libcxx/include/__functional/reference_wrapper.h
+++ b/libcxx/include/__functional/reference_wrapper.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_REFERENCE_WRAPPER_H
-#define _LIBCPP___FUNCTIONAL_REFERENCE_WRAPPER_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_REFERENCE_WRAPPER_H
+#define _LIBCUDACXX___FUNCTIONAL_REFERENCE_WRAPPER_H
 
 #include <__config>
 #include <__functional/weak_result_type.h>
@@ -16,14 +16,14 @@
 #include <__utility/forward.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp>
+class _LIBCUDACXX_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp>
 {
 public:
     // types
@@ -36,34 +36,34 @@ class _LIBCPP_TEMPLATE_VIS reference_wrapper : public __weak_result_type<_Tp>
 
 public:
     template <class _Up, class = __enable_if_t<!__is_same_uncvref<_Up, reference_wrapper>::value, decltype(__fun(declval<_Up>())) > >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     reference_wrapper(_Up&& __u) _NOEXCEPT_(noexcept(__fun(declval<_Up>()))) {
         type& __f = static_cast<_Up&&>(__u);
-        __f_ = _VSTD::addressof(__f);
+        __f_ = _CUDA_VSTD::addressof(__f);
     }
 
     // access
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     operator type&() const _NOEXCEPT {return *__f_;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     type& get() const _NOEXCEPT {return *__f_;}
 
     // invoke
     template <class... _ArgTypes>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     typename __invoke_of<type&, _ArgTypes...>::type
     operator() (_ArgTypes&&... __args) const {
         return std::__invoke(get(), std::forward<_ArgTypes>(__args)...);
     }
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 reference_wrapper(_Tp&) -> reference_wrapper<_Tp>;
 #endif
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 reference_wrapper<_Tp>
 ref(_Tp& __t) _NOEXCEPT
 {
@@ -71,7 +71,7 @@ ref(_Tp& __t) _NOEXCEPT
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 reference_wrapper<_Tp>
 ref(reference_wrapper<_Tp> __t) _NOEXCEPT
 {
@@ -79,7 +79,7 @@ ref(reference_wrapper<_Tp> __t) _NOEXCEPT
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 reference_wrapper<const _Tp>
 cref(const _Tp& __t) _NOEXCEPT
 {
@@ -87,7 +87,7 @@ cref(const _Tp& __t) _NOEXCEPT
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 reference_wrapper<const _Tp>
 cref(reference_wrapper<_Tp> __t) _NOEXCEPT
 {
@@ -97,6 +97,6 @@ cref(reference_wrapper<_Tp> __t) _NOEXCEPT
 template <class _Tp> void ref(const _Tp&&) = delete;
 template <class _Tp> void cref(const _Tp&&) = delete;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_REFERENCE_WRAPPER_H
+#endif // _LIBCUDACXX___FUNCTIONAL_REFERENCE_WRAPPER_H

diff  --git a/libcxx/include/__functional/unary_function.h b/libcxx/include/__functional/unary_function.h
index f07cac175a99..37987918c840 100644
--- a/libcxx/include/__functional/unary_function.h
+++ b/libcxx/include/__functional/unary_function.h
@@ -6,46 +6,46 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_UNARY_FUNCTION_H
-#define _LIBCPP___FUNCTIONAL_UNARY_FUNCTION_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_UNARY_FUNCTION_H
+#define _LIBCUDACXX___FUNCTIONAL_UNARY_FUNCTION_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
 
 template <class _Arg, class _Result>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 unary_function
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 unary_function
 {
     typedef _Arg    argument_type;
     typedef _Result result_type;
 };
 
-#endif // _LIBCPP_STD_VER <= 14
+#endif // _LIBCUDACXX_STD_VER <= 14
 
 template <class _Arg, class _Result> struct __unary_function_keep_layout_base {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-  using argument_type _LIBCPP_DEPRECATED_IN_CXX17 = _Arg;
-  using result_type _LIBCPP_DEPRECATED_IN_CXX17 = _Result;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+  using argument_type _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Arg;
+  using result_type _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Result;
 #endif
 };
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
-_LIBCPP_DIAGNOSTIC_PUSH
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION)
+_LIBCUDACXX_DIAGNOSTIC_PUSH
+_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated-declarations")
 template <class _Arg, class _Result>
 using __unary_function = unary_function<_Arg, _Result>;
-_LIBCPP_DIAGNOSTIC_POP
+_LIBCUDACXX_DIAGNOSTIC_POP
 #else
 template <class _Arg, class _Result>
 using __unary_function = __unary_function_keep_layout_base<_Arg, _Result>;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_UNARY_FUNCTION_H
+#endif // _LIBCUDACXX___FUNCTIONAL_UNARY_FUNCTION_H

diff  --git a/libcxx/include/__functional/unary_negate.h b/libcxx/include/__functional/unary_negate.h
index 7f081903fe44..36b584d4338e 100644
--- a/libcxx/include/__functional/unary_negate.h
+++ b/libcxx/include/__functional/unary_negate.h
@@ -7,41 +7,41 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_UNARY_NEGATE_H
-#define _LIBCPP___FUNCTIONAL_UNARY_NEGATE_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_UNARY_NEGATE_H
+#define _LIBCUDACXX___FUNCTIONAL_UNARY_NEGATE_H
 
 #include <__config>
 #include <__functional/unary_function.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS)
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS)
 
 template <class _Predicate>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 unary_negate
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 unary_negate
     : public __unary_function<typename _Predicate::argument_type, bool>
 {
     _Predicate __pred_;
 public:
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     explicit unary_negate(const _Predicate& __pred)
         : __pred_(__pred) {}
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const typename _Predicate::argument_type& __x) const
         {return !__pred_(__x);}
 };
 
 template <class _Predicate>
-_LIBCPP_DEPRECATED_IN_CXX17 inline _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX17 inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 unary_negate<_Predicate>
 not1(const _Predicate& __pred) {return unary_negate<_Predicate>(__pred);}
 
-#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS)
+#endif // _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_UNARY_NEGATE_H
+#endif // _LIBCUDACXX___FUNCTIONAL_UNARY_NEGATE_H

diff  --git a/libcxx/include/__functional/unwrap_ref.h b/libcxx/include/__functional/unwrap_ref.h
index f7207934e1b4..2740e78dacfe 100644
--- a/libcxx/include/__functional/unwrap_ref.h
+++ b/libcxx/include/__functional/unwrap_ref.h
@@ -6,30 +6,30 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_UNWRAP_REF_H
-#define _LIBCPP___FUNCTIONAL_UNWRAP_REF_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_UNWRAP_REF_H
+#define _LIBCUDACXX___FUNCTIONAL_UNWRAP_REF_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-struct __unwrap_reference { typedef _LIBCPP_NODEBUG _Tp type; };
+struct __unwrap_reference { typedef _LIBCUDACXX_NODEBUG _Tp type; };
 
 template <class _Tp>
 class reference_wrapper;
 
 template <class _Tp>
-struct __unwrap_reference<reference_wrapper<_Tp> > { typedef _LIBCPP_NODEBUG _Tp& type; };
+struct __unwrap_reference<reference_wrapper<_Tp> > { typedef _LIBCUDACXX_NODEBUG _Tp& type; };
 
 template <class _Tp>
 struct decay;
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Tp>
 struct unwrap_reference : __unwrap_reference<_Tp> { };
 
@@ -45,13 +45,13 @@ using unwrap_ref_decay_t = typename unwrap_ref_decay<_Tp>::type;
 
 template <class _Tp>
 struct __unwrap_ref_decay
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     : unwrap_ref_decay<_Tp>
 #else
     : __unwrap_reference<typename decay<_Tp>::type>
 #endif
 { };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_UNWRAP_REF_H
+#endif // _LIBCUDACXX___FUNCTIONAL_UNWRAP_REF_H

diff  --git a/libcxx/include/__functional/weak_result_type.h b/libcxx/include/__functional/weak_result_type.h
index 96d8cf7146b1..879bad2cfbf1 100644
--- a/libcxx/include/__functional/weak_result_type.h
+++ b/libcxx/include/__functional/weak_result_type.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_WEAK_RESULT_TYPE_H
-#define _LIBCPP___FUNCTIONAL_WEAK_RESULT_TYPE_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_WEAK_RESULT_TYPE_H
+#define _LIBCUDACXX___FUNCTIONAL_WEAK_RESULT_TYPE_H
 
 #include <__config>
 #include <__functional/binary_function.h>
 #include <__functional/unary_function.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
 struct __has_result_type
@@ -90,8 +90,8 @@ struct __weak_result_type_imp // bool is true
     : public __maybe_derive_from_unary_function<_Tp>,
       public __maybe_derive_from_binary_function<_Tp>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = typename _Tp::result_type;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    using result_type _LIBCUDACXX_NODEBUG _LIBCUDACXX_DEPRECATED_IN_CXX17 = typename _Tp::result_type;
 #endif
 };
 
@@ -113,24 +113,24 @@ struct __weak_result_type
 template <class _Rp>
 struct __weak_result_type<_Rp ()>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    using result_type _LIBCUDACXX_NODEBUG _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Rp;
 #endif
 };
 
 template <class _Rp>
 struct __weak_result_type<_Rp (&)()>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    using result_type _LIBCUDACXX_NODEBUG _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Rp;
 #endif
 };
 
 template <class _Rp>
 struct __weak_result_type<_Rp (*)()>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    using result_type _LIBCUDACXX_NODEBUG _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Rp;
 #endif
 };
 
@@ -227,65 +227,65 @@ struct __weak_result_type<_Rp (_Cp::*)(_A1) const volatile>
 template <class _Rp, class _A1, class _A2, class _A3, class ..._A4>
 struct __weak_result_type<_Rp (_A1, _A2, _A3, _A4...)>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    using result_type _LIBCUDACXX_NODEBUG _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Rp;
 #endif
 };
 
 template <class _Rp, class _A1, class _A2, class _A3, class ..._A4>
 struct __weak_result_type<_Rp (&)(_A1, _A2, _A3, _A4...)>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    using result_type _LIBCUDACXX_NODEBUG _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Rp;
 #endif
 };
 
 template <class _Rp, class _A1, class _A2, class _A3, class ..._A4>
 struct __weak_result_type<_Rp (*)(_A1, _A2, _A3, _A4...)>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    using result_type _LIBCUDACXX_NODEBUG _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Rp;
 #endif
 };
 
 template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
 struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...)>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    using result_type _LIBCUDACXX_NODEBUG _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Rp;
 #endif
 };
 
 template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
 struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    using result_type _LIBCUDACXX_NODEBUG _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Rp;
 #endif
 };
 
 template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
 struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) volatile>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    using result_type _LIBCUDACXX_NODEBUG _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Rp;
 #endif
 };
 
 template <class _Rp, class _Cp, class _A1, class _A2, class ..._A3>
 struct __weak_result_type<_Rp (_Cp::*)(_A1, _A2, _A3...) const volatile>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    using result_type _LIBCPP_NODEBUG _LIBCPP_DEPRECATED_IN_CXX17 = _Rp;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    using result_type _LIBCUDACXX_NODEBUG _LIBCUDACXX_DEPRECATED_IN_CXX17 = _Rp;
 #endif
 };
 
 template <class _Tp, class ..._Args>
 struct __invoke_return
 {
-    typedef decltype(_VSTD::__invoke(declval<_Tp>(), declval<_Args>()...)) type;
+    typedef decltype(_CUDA_VSTD::__invoke(declval<_Tp>(), declval<_Args>()...)) type;
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_WEAK_RESULT_TYPE_H
+#endif // _LIBCUDACXX___FUNCTIONAL_WEAK_RESULT_TYPE_H

diff  --git a/libcxx/include/__fwd/span.h b/libcxx/include/__fwd/span.h
index f38b8cfa0526..7a901c9e4c37 100644
--- a/libcxx/include/__fwd/span.h
+++ b/libcxx/include/__fwd/span.h
@@ -7,31 +7,31 @@
 //
 //===---------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_FWD_SPAN_H
-#define _LIBCPP_FWD_SPAN_H
+#ifndef _LIBCUDACXX_FWD_SPAN_H
+#define _LIBCUDACXX_FWD_SPAN_H
 
 #include <__config>
 #include <cstddef>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 inline constexpr size_t dynamic_extent = numeric_limits<size_t>::max();
 template <typename _Tp, size_t _Extent = dynamic_extent> class span;
 
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_FWD_SPAN_H
+#endif // _LIBCUDACXX_FWD_SPAN_H

diff  --git a/libcxx/include/__fwd/string_view.h b/libcxx/include/__fwd/string_view.h
index e5e77b292a6e..a98ecf84295c 100644
--- a/libcxx/include/__fwd/string_view.h
+++ b/libcxx/include/__fwd/string_view.h
@@ -7,31 +7,31 @@
 //
 //===---------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_FWD_STRING_VIEW_H
-#define _LIBCPP_FWD_STRING_VIEW_H
+#ifndef _LIBCUDACXX_FWD_STRING_VIEW_H
+#define _LIBCUDACXX_FWD_STRING_VIEW_H
 
 #include <__config>
 #include <iosfwd> // char_traits
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _CharT, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS basic_string_view;
+class _LIBCUDACXX_TEMPLATE_VIS basic_string_view;
 
 typedef basic_string_view<char>     string_view;
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 typedef basic_string_view<char8_t>  u8string_view;
 #endif
 typedef basic_string_view<char16_t> u16string_view;
 typedef basic_string_view<char32_t> u32string_view;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef basic_string_view<wchar_t>  wstring_view;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_FWD_STRING_VIEW_H
+#endif // _LIBCUDACXX_FWD_STRING_VIEW_H

diff  --git a/libcxx/include/__hash_table b/libcxx/include/__hash_table
index 959ef7fe7d83..6ca9de3fc8fa 100644
--- a/libcxx/include/__hash_table
+++ b/libcxx/include/__hash_table
@@ -7,13 +7,13 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___HASH_TABLE
-#define _LIBCPP___HASH_TABLE
+#ifndef _LIBCUDACXX___HASH_TABLE
+#define _LIBCUDACXX___HASH_TABLE
 
 #include <__algorithm/max.h>
 #include <__algorithm/min.h>
 #include <__assert>
-#include <__bits> // __libcpp_clz
+#include <__bits> // __LIBCUDACXX_clz
 #include <__config>
 #include <__debug>
 #include <__functional/hash.h>
@@ -25,15 +25,15 @@
 #include <memory>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Key, class _Tp>
 struct __hash_value_type;
@@ -50,7 +50,7 @@ struct __is_hash_value_type : false_type {};
 template <class _One>
 struct __is_hash_value_type<_One> : __is_hash_value_type_imp<__uncvref_t<_One> > {};
 
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 size_t __next_prime(size_t __n);
 
 template <class _NodePtr>
@@ -61,7 +61,7 @@ struct __hash_node_base
     typedef typename __rebind_pointer<_NodePtr, __first_node>::type __node_base_pointer;
     typedef _NodePtr __node_pointer;
 
-#if defined(_LIBCPP_ABI_FIX_UNORDERED_NODE_POINTER_UB)
+#if defined(_LIBCUDACXX_ABI_FIX_UNORDERED_NODE_POINTER_UB)
   typedef __node_base_pointer __next_pointer;
 #else
   typedef typename conditional<
@@ -72,28 +72,28 @@ struct __hash_node_base
 
     __next_pointer    __next_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __next_pointer __ptr() _NOEXCEPT {
         return static_cast<__next_pointer>(
             pointer_traits<__node_base_pointer>::pointer_to(*this));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __node_pointer __upcast() _NOEXCEPT {
         return static_cast<__node_pointer>(
             pointer_traits<__node_base_pointer>::pointer_to(*this));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t __hash() const _NOEXCEPT {
         return static_cast<__node_type const&>(*this).__hash_;
     }
 
-    _LIBCPP_INLINE_VISIBILITY __hash_node_base() _NOEXCEPT : __next_(nullptr) {}
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_node_base() _NOEXCEPT : __next_(nullptr) {}
 };
 
 template <class _Tp, class _VoidPtr>
-struct _LIBCPP_STANDALONE_DEBUG __hash_node
+struct _LIBCUDACXX_STANDALONE_DEBUG __hash_node
     : public __hash_node_base
              <
                  typename __rebind_pointer<_VoidPtr, __hash_node<_Tp, _VoidPtr> >::type
@@ -105,14 +105,14 @@ struct _LIBCPP_STANDALONE_DEBUG __hash_node
     __node_value_type __value_;
 };
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 __is_hash_power2(size_t __bc)
 {
     return __bc > 2 && !(__bc & (__bc - 1));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 size_t
 __constrain_hash(size_t __h, size_t __bc)
 {
@@ -120,22 +120,22 @@ __constrain_hash(size_t __h, size_t __bc)
         (__h < __bc ? __h : __h % __bc);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 size_t
 __next_hash_pow2(size_t __n)
 {
-    return __n < 2 ? __n : (size_t(1) << (numeric_limits<size_t>::digits - __libcpp_clz(__n-1)));
+    return __n < 2 ? __n : (size_t(1) << (numeric_limits<size_t>::digits - __LIBCUDACXX_clz(__n-1)));
 }
 
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc> class __hash_table;
 
-template <class _NodePtr>      class _LIBCPP_TEMPLATE_VIS __hash_iterator;
-template <class _ConstNodePtr> class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
-template <class _NodePtr>      class _LIBCPP_TEMPLATE_VIS __hash_local_iterator;
-template <class _ConstNodePtr> class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
-template <class _HashIterator> class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
-template <class _HashIterator> class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
+template <class _NodePtr>      class _LIBCUDACXX_TEMPLATE_VIS __hash_iterator;
+template <class _ConstNodePtr> class _LIBCUDACXX_TEMPLATE_VIS __hash_const_iterator;
+template <class _NodePtr>      class _LIBCUDACXX_TEMPLATE_VIS __hash_local_iterator;
+template <class _ConstNodePtr> class _LIBCUDACXX_TEMPLATE_VIS __hash_const_local_iterator;
+template <class _HashIterator> class _LIBCUDACXX_TEMPLATE_VIS __hash_map_iterator;
+template <class _HashIterator> class _LIBCUDACXX_TEMPLATE_VIS __hash_map_const_iterator;
 
 template <class _Tp>
 struct __hash_key_value_types {
@@ -145,21 +145,21 @@ struct __hash_key_value_types {
   typedef _Tp __container_value_type;
   static const bool __is_map = false;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static key_type const& __get_key(_Tp const& __v) {
     return __v;
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __container_value_type const& __get_value(__node_value_type const& __v) {
     return __v;
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __container_value_type* __get_ptr(__node_value_type& __n) {
-    return _VSTD::addressof(__n);
+    return _CUDA_VSTD::addressof(__n);
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __container_value_type&& __move(__node_value_type& __v) {
-    return _VSTD::move(__v);
+    return _CUDA_VSTD::move(__v);
   }
 };
 
@@ -172,30 +172,30 @@ struct __hash_key_value_types<__hash_value_type<_Key, _Tp> > {
   typedef __container_value_type                       __map_value_type;
   static const bool __is_map = true;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static key_type const& __get_key(__container_value_type const& __v) {
     return __v.first;
   }
 
   template <class _Up>
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __enable_if_t<__is_same_uncvref<_Up, __node_value_type>::value, __container_value_type const&>
   __get_value(_Up& __t) {
     return __t.__get_value();
   }
 
   template <class _Up>
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __enable_if_t<__is_same_uncvref<_Up, __container_value_type>::value, __container_value_type const&>
   __get_value(_Up& __t) {
     return __t;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __container_value_type* __get_ptr(__node_value_type& __n) {
-    return _VSTD::addressof(__n.__get_value());
+    return _CUDA_VSTD::addressof(__n.__get_value());
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static pair<key_type&&, mapped_type&&> __move(__node_value_type& __v) {
     return __v.__move();
   }
@@ -274,7 +274,7 @@ struct __make_hash_node_types {
 };
 
 template <class _NodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __hash_iterator
 {
     typedef __hash_node_types<_NodePtr> _NodeTypes;
     typedef _NodePtr                            __node_pointer;
@@ -289,59 +289,59 @@ public:
     typedef value_type&                                    reference;
     typedef typename _NodeTypes::__node_value_type_pointer pointer;
 
-    _LIBCPP_INLINE_VISIBILITY __hash_iterator() _NOEXCEPT : __node_(nullptr) {
-        _VSTD::__debug_db_insert_i(this);
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_iterator() _NOEXCEPT : __node_(nullptr) {
+        _CUDA_VSTD::__debug_db_insert_i(this);
     }
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    _LIBCPP_INLINE_VISIBILITY
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_iterator(const __hash_iterator& __i)
         : __node_(__i.__node_)
     {
-        __get_db()->__iterator_copy(this, _VSTD::addressof(__i));
+        __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__i));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~__hash_iterator()
     {
         __get_db()->__erase_i(this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_iterator& operator=(const __hash_iterator& __i)
     {
-        if (this != _VSTD::addressof(__i))
+        if (this != _CUDA_VSTD::addressof(__i))
         {
-            __get_db()->__iterator_copy(this, _VSTD::addressof(__i));
+            __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__i));
             __node_ = __i.__node_;
         }
         return *this;
     }
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to dereference a non-dereferenceable unordered container iterator");
         return __node_->__upcast()->__value_;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                            "Attempted to dereference a non-dereferenceable unordered container iterator");
         return pointer_traits<pointer>::pointer_to(__node_->__upcast()->__value_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_iterator& operator++() {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                        "Attempted to increment a non-incrementable unordered container iterator");
         __node_ = __node_->__next_;
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_iterator operator++(int)
     {
         __hash_iterator __t(*this);
@@ -349,34 +349,34 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __hash_iterator& __x, const __hash_iterator& __y)
     {
         return __x.__node_ == __y.__node_;
     }
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __hash_iterator& __x, const __hash_iterator& __y)
         {return !(__x == __y);}
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __hash_iterator(__next_pointer __node, const void* __c) _NOEXCEPT
         : __node_(__node)
         {
             (void)__c;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
             __get_db()->__insert_ic(this, __c);
 #endif
         }
     template <class, class, class, class> friend class __hash_table;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_const_iterator;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_map_iterator;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS unordered_map;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS unordered_multimap;
 };
 
 template <class _NodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_const_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __hash_const_iterator
 {
     static_assert(!is_const<typename pointer_traits<_NodePtr>::element_type>::value, "");
     typedef __hash_node_types<_NodePtr> _NodeTypes;
@@ -395,67 +395,67 @@ public:
     typedef typename _NodeTypes::__const_node_value_type_pointer pointer;
 
 
-    _LIBCPP_INLINE_VISIBILITY __hash_const_iterator() _NOEXCEPT : __node_(nullptr) {
-        _VSTD::__debug_db_insert_i(this);
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_const_iterator() _NOEXCEPT : __node_(nullptr) {
+        _CUDA_VSTD::__debug_db_insert_i(this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_const_iterator(const __non_const_iterator& __x) _NOEXCEPT
         : __node_(__x.__node_)
     {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-        __get_db()->__iterator_copy(this, _VSTD::addressof(__x));
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+        __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__x));
 #endif
     }
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    _LIBCPP_INLINE_VISIBILITY
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_const_iterator(const __hash_const_iterator& __i)
         : __node_(__i.__node_)
     {
-        __get_db()->__iterator_copy(this, _VSTD::addressof(__i));
+        __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__i));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~__hash_const_iterator()
     {
         __get_db()->__erase_i(this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_const_iterator& operator=(const __hash_const_iterator& __i)
     {
-        if (this != _VSTD::addressof(__i))
+        if (this != _CUDA_VSTD::addressof(__i))
         {
-            __get_db()->__iterator_copy(this, _VSTD::addressof(__i));
+            __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__i));
             __node_ = __i.__node_;
         }
         return *this;
     }
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                            "Attempted to dereference a non-dereferenceable unordered container const_iterator");
         return __node_->__upcast()->__value_;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                            "Attempted to dereference a non-dereferenceable unordered container const_iterator");
         return pointer_traits<pointer>::pointer_to(__node_->__upcast()->__value_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_const_iterator& operator++() {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to increment a non-incrementable unordered container const_iterator");
         __node_ = __node_->__next_;
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_const_iterator operator++(int)
     {
         __hash_const_iterator __t(*this);
@@ -463,33 +463,33 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __hash_const_iterator& __x, const __hash_const_iterator& __y)
     {
         return __x.__node_ == __y.__node_;
     }
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __hash_const_iterator& __x, const __hash_const_iterator& __y)
         {return !(__x == __y);}
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __hash_const_iterator(__next_pointer __node, const void* __c) _NOEXCEPT
         : __node_(__node)
         {
             (void)__c;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
             __get_db()->__insert_ic(this, __c);
 #endif
         }
     template <class, class, class, class> friend class __hash_table;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_map_const_iterator;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS unordered_map;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS unordered_multimap;
 };
 
 template <class _NodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_local_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __hash_local_iterator
 {
     typedef __hash_node_types<_NodePtr> _NodeTypes;
     typedef _NodePtr                            __node_pointer;
@@ -506,57 +506,57 @@ public:
     typedef value_type&                                         reference;
     typedef typename _NodeTypes::__node_value_type_pointer      pointer;
 
-    _LIBCPP_INLINE_VISIBILITY __hash_local_iterator() _NOEXCEPT : __node_(nullptr) {
-        _VSTD::__debug_db_insert_i(this);
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_local_iterator() _NOEXCEPT : __node_(nullptr) {
+        _CUDA_VSTD::__debug_db_insert_i(this);
     }
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    _LIBCPP_INLINE_VISIBILITY
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_local_iterator(const __hash_local_iterator& __i)
         : __node_(__i.__node_),
           __bucket_(__i.__bucket_),
           __bucket_count_(__i.__bucket_count_)
     {
-        __get_db()->__iterator_copy(this, _VSTD::addressof(__i));
+        __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__i));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~__hash_local_iterator()
     {
         __get_db()->__erase_i(this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_local_iterator& operator=(const __hash_local_iterator& __i)
     {
-        if (this != _VSTD::addressof(__i))
+        if (this != _CUDA_VSTD::addressof(__i))
         {
-            __get_db()->__iterator_copy(this, _VSTD::addressof(__i));
+            __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__i));
             __node_ = __i.__node_;
             __bucket_ = __i.__bucket_;
             __bucket_count_ = __i.__bucket_count_;
         }
         return *this;
     }
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                            "Attempted to dereference a non-dereferenceable unordered container local_iterator");
         return __node_->__upcast()->__value_;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to dereference a non-dereferenceable unordered container local_iterator");
         return pointer_traits<pointer>::pointer_to(__node_->__upcast()->__value_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_local_iterator& operator++() {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                        "Attempted to increment a non-incrementable unordered container local_iterator");
         __node_ = __node_->__next_;
         if (__node_ != nullptr && __constrain_hash(__node_->__hash(), __bucket_count_) != __bucket_)
@@ -564,7 +564,7 @@ public:
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_local_iterator operator++(int)
     {
         __hash_local_iterator __t(*this);
@@ -572,17 +572,17 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __hash_local_iterator& __x, const __hash_local_iterator& __y)
     {
         return __x.__node_ == __y.__node_;
     }
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __hash_local_iterator& __x, const __hash_local_iterator& __y)
         {return !(__x == __y);}
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __hash_local_iterator(__next_pointer __node, size_t __bucket,
                                    size_t __bucket_count, const void* __c) _NOEXCEPT
         : __node_(__node),
@@ -590,19 +590,19 @@ private:
           __bucket_count_(__bucket_count)
         {
             (void)__c;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
             __get_db()->__insert_ic(this, __c);
 #endif
             if (__node_ != nullptr)
                 __node_ = __node_->__next_;
         }
     template <class, class, class, class> friend class __hash_table;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_iterator;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_const_local_iterator;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_map_iterator;
 };
 
 template <class _ConstNodePtr>
-class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __hash_const_local_iterator
 {
     typedef __hash_node_types<_ConstNodePtr> _NodeTypes;
     typedef _ConstNodePtr                       __node_pointer;
@@ -628,68 +628,68 @@ public:
     typedef typename _NodeTypes::__const_node_value_type_pointer pointer;
 
 
-    _LIBCPP_INLINE_VISIBILITY __hash_const_local_iterator() _NOEXCEPT : __node_(nullptr) {
-        _VSTD::__debug_db_insert_i(this);
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_const_local_iterator() _NOEXCEPT : __node_(nullptr) {
+        _CUDA_VSTD::__debug_db_insert_i(this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_const_local_iterator(const __non_const_iterator& __x) _NOEXCEPT
         : __node_(__x.__node_),
           __bucket_(__x.__bucket_),
           __bucket_count_(__x.__bucket_count_)
     {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-        __get_db()->__iterator_copy(this, _VSTD::addressof(__x));
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+        __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__x));
 #endif
     }
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    _LIBCPP_INLINE_VISIBILITY
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_const_local_iterator(const __hash_const_local_iterator& __i)
         : __node_(__i.__node_),
           __bucket_(__i.__bucket_),
           __bucket_count_(__i.__bucket_count_)
     {
-        __get_db()->__iterator_copy(this, _VSTD::addressof(__i));
+        __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__i));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~__hash_const_local_iterator()
     {
         __get_db()->__erase_i(this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_const_local_iterator& operator=(const __hash_const_local_iterator& __i)
     {
-        if (this != _VSTD::addressof(__i))
+        if (this != _CUDA_VSTD::addressof(__i))
         {
-            __get_db()->__iterator_copy(this, _VSTD::addressof(__i));
+            __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__i));
             __node_ = __i.__node_;
             __bucket_ = __i.__bucket_;
             __bucket_count_ = __i.__bucket_count_;
         }
         return *this;
     }
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                            "Attempted to dereference a non-dereferenceable unordered container const_local_iterator");
         return __node_->__upcast()->__value_;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                            "Attempted to dereference a non-dereferenceable unordered container const_local_iterator");
         return pointer_traits<pointer>::pointer_to(__node_->__upcast()->__value_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_const_local_iterator& operator++() {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                        "Attempted to increment a non-incrementable unordered container const_local_iterator");
         __node_ = __node_->__next_;
         if (__node_ != nullptr && __constrain_hash(__node_->__hash(), __bucket_count_) != __bucket_)
@@ -697,7 +697,7 @@ public:
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_const_local_iterator operator++(int)
     {
         __hash_const_local_iterator __t(*this);
@@ -705,17 +705,17 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __hash_const_local_iterator& __x, const __hash_const_local_iterator& __y)
     {
         return __x.__node_ == __y.__node_;
     }
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __hash_const_local_iterator& __x, const __hash_const_local_iterator& __y)
         {return !(__x == __y);}
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __hash_const_local_iterator(__next_pointer __node_ptr, size_t __bucket,
                                          size_t __bucket_count, const void* __c) _NOEXCEPT
         : __node_(__node_ptr),
@@ -723,14 +723,14 @@ private:
           __bucket_count_(__bucket_count)
         {
             (void)__c;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
             __get_db()->__insert_ic(this, __c);
 #endif
             if (__node_ != nullptr)
                 __node_ = __node_->__next_;
         }
     template <class, class, class, class> friend class __hash_table;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_map_const_iterator;
 };
 
 template <class _Alloc>
@@ -744,35 +744,35 @@ class __bucket_list_deallocator
 public:
     typedef typename __alloc_traits::pointer pointer;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __bucket_list_deallocator()
         _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
         : __data_(0, __default_init_tag()) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __bucket_list_deallocator(const allocator_type& __a, size_type __size)
         _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
         : __data_(__size, __a) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __bucket_list_deallocator(__bucket_list_deallocator&& __x)
         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
-        : __data_(_VSTD::move(__x.__data_))
+        : __data_(_CUDA_VSTD::move(__x.__data_))
     {
         __x.size() = 0;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type& size() _NOEXCEPT {return __data_.first();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type  size() const _NOEXCEPT {return __data_.first();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type& __alloc() _NOEXCEPT {return __data_.second();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const allocator_type& __alloc() const _NOEXCEPT {return __data_.second();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator()(pointer __p) _NOEXCEPT
     {
         __alloc_traits::deallocate(__alloc(), __p, size());
@@ -801,14 +801,14 @@ public:
     __hash_node_destructor& operator=(const __hash_node_destructor&) = delete;
 
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __hash_node_destructor(allocator_type& __na,
                                     bool __constructed = false) _NOEXCEPT
         : __na_(__na),
           __value_constructed(__constructed)
         {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator()(pointer __p) _NOEXCEPT
     {
         if (__value_constructed)
@@ -820,7 +820,7 @@ public:
     template <class> friend class __hash_map_node_destructor;
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _NodeType, class _Alloc>
 struct __generic_container_node_destructor;
 
@@ -834,7 +834,7 @@ struct __generic_container_node_destructor<__hash_node<_Tp, _VoidPtr>, _Alloc>
 
 template <class _Key, class _Hash, class _Equal>
 struct __enforce_unordered_container_requirements {
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     static_assert(__check_hash_requirements<_Key, _Hash>::value,
     "the specified hash does not meet the Hash requirements");
     static_assert(is_copy_constructible<_Equal>::value,
@@ -844,10 +844,10 @@ struct __enforce_unordered_container_requirements {
 };
 
 template <class _Key, class _Hash, class _Equal>
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_DIAGNOSE_WARNING(!__invokable<_Equal const&, _Key const&, _Key const&>::value,
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_DIAGNOSE_WARNING(!__invokable<_Equal const&, _Key const&, _Key const&>::value,
     "the specified comparator type does not provide a viable const call operator")
-    _LIBCPP_DIAGNOSE_WARNING(!__invokable<_Hash const&, _Key const&>::value,
+    _LIBCUDACXX_DIAGNOSE_WARNING(!__invokable<_Hash const&, _Key const&>::value,
     "the specified hash functor does not provide a viable const call operator")
 #endif
 typename __enforce_unordered_container_requirements<_Key, _Hash, _Equal>::type
@@ -882,7 +882,7 @@ public:
     typedef const value_type&                        const_reference;
     typedef typename __alloc_traits::pointer         pointer;
     typedef typename __alloc_traits::const_pointer   const_pointer;
-#ifndef _LIBCPP_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
+#ifndef _LIBCUDACXX_ABI_FIX_UNORDERED_CONTAINER_SIZE_TYPE
     typedef typename __alloc_traits::size_type       size_type;
 #else
     typedef typename _NodeTypes::size_type           size_type;
@@ -928,30 +928,30 @@ private:
     __compressed_pair<float, key_equal>                   __p3_;
     // --- Member data end ---
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type& size() _NOEXCEPT {return __p2_.first();}
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type  size() const _NOEXCEPT {return __p2_.first();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hasher& hash_function() _NOEXCEPT {return __p2_.second();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const hasher& hash_function() const _NOEXCEPT {return __p2_.second();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     float& max_load_factor() _NOEXCEPT {return __p3_.first();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     float  max_load_factor() const _NOEXCEPT {return __p3_.first();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_equal& key_eq() _NOEXCEPT {return __p3_.second();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const key_equal& key_eq() const _NOEXCEPT {return __p3_.second();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __node_allocator& __node_alloc() _NOEXCEPT {return __p1_.second();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const __node_allocator& __node_alloc() const _NOEXCEPT
         {return __p1_.second();}
 
@@ -961,7 +961,7 @@ public:
     typedef __hash_local_iterator<__node_pointer>             local_iterator;
     typedef __hash_const_local_iterator<__node_pointer>       const_local_iterator;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_table()
         _NOEXCEPT_(
             is_nothrow_default_constructible<__bucket_list>::value &&
@@ -969,7 +969,7 @@ public:
             is_nothrow_default_constructible<__node_allocator>::value &&
             is_nothrow_default_constructible<hasher>::value &&
             is_nothrow_default_constructible<key_equal>::value);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_table(const hasher& __hf, const key_equal& __eql);
     __hash_table(const hasher& __hf, const key_equal& __eql,
                  const allocator_type& __a);
@@ -987,7 +987,7 @@ public:
     ~__hash_table();
 
     __hash_table& operator=(const __hash_table& __u);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_table& operator=(__hash_table&& __u)
         _NOEXCEPT_(
             __node_traits::propagate_on_container_move_assignment::value &&
@@ -999,185 +999,185 @@ public:
     template <class _InputIterator>
         void __assign_multi(_InputIterator __first, _InputIterator __last);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT
     {
-        return _VSTD::min<size_type>(
+        return _CUDA_VSTD::min<size_type>(
             __node_traits::max_size(__node_alloc()),
             numeric_limits<
diff erence_type >::max()
         );
     }
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __next_pointer __node_insert_multi_prepare(size_t __cp_hash,
                                                value_type& __cp_val);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __node_insert_multi_perform(__node_pointer __cp,
                                      __next_pointer __pn) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __next_pointer __node_insert_unique_prepare(size_t __nd_hash,
                                                 value_type& __nd_val);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __node_insert_unique_perform(__node_pointer __ptr) _NOEXCEPT;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __node_insert_unique(__node_pointer __nd);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator             __node_insert_multi(__node_pointer __nd);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator             __node_insert_multi(const_iterator __p,
                                              __node_pointer __nd);
 
     template <class _Key, class ..._Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __emplace_unique_key_args(_Key const& __k, _Args&&... __args);
 
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __emplace_unique_impl(_Args&&... __args);
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __emplace_unique(_Pp&& __x) {
-      return __emplace_unique_extract_key(_VSTD::forward<_Pp>(__x),
+      return __emplace_unique_extract_key(_CUDA_VSTD::forward<_Pp>(__x),
                                           __can_extract_key<_Pp, key_type>());
     }
 
     template <class _First, class _Second>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__can_extract_map_key<_First, key_type, __container_value_type>::value, pair<iterator, bool> >
     __emplace_unique(_First&& __f, _Second&& __s) {
-        return __emplace_unique_key_args(__f, _VSTD::forward<_First>(__f),
-                                              _VSTD::forward<_Second>(__s));
+        return __emplace_unique_key_args(__f, _CUDA_VSTD::forward<_First>(__f),
+                                              _CUDA_VSTD::forward<_Second>(__s));
     }
 
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __emplace_unique(_Args&&... __args) {
-      return __emplace_unique_impl(_VSTD::forward<_Args>(__args)...);
+      return __emplace_unique_impl(_CUDA_VSTD::forward<_Args>(__args)...);
     }
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool>
     __emplace_unique_extract_key(_Pp&& __x, __extract_key_fail_tag) {
-      return __emplace_unique_impl(_VSTD::forward<_Pp>(__x));
+      return __emplace_unique_impl(_CUDA_VSTD::forward<_Pp>(__x));
     }
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool>
     __emplace_unique_extract_key(_Pp&& __x, __extract_key_self_tag) {
-      return __emplace_unique_key_args(__x, _VSTD::forward<_Pp>(__x));
+      return __emplace_unique_key_args(__x, _CUDA_VSTD::forward<_Pp>(__x));
     }
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool>
     __emplace_unique_extract_key(_Pp&& __x, __extract_key_first_tag) {
-      return __emplace_unique_key_args(__x.first, _VSTD::forward<_Pp>(__x));
+      return __emplace_unique_key_args(__x.first, _CUDA_VSTD::forward<_Pp>(__x));
     }
 
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __emplace_multi(_Args&&... __args);
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args);
 
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool>
     __insert_unique(__container_value_type&& __x) {
-      return __emplace_unique_key_args(_NodeTypes::__get_key(__x), _VSTD::move(__x));
+      return __emplace_unique_key_args(_NodeTypes::__get_key(__x), _CUDA_VSTD::move(__x));
     }
 
     template <class _Pp, class = __enable_if_t<!__is_same_uncvref<_Pp, __container_value_type>::value> >
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __insert_unique(_Pp&& __x) {
-      return __emplace_unique(_VSTD::forward<_Pp>(__x));
+      return __emplace_unique(_CUDA_VSTD::forward<_Pp>(__x));
     }
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __insert_multi(_Pp&& __x) {
-      return __emplace_multi(_VSTD::forward<_Pp>(__x));
+      return __emplace_multi(_CUDA_VSTD::forward<_Pp>(__x));
     }
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __insert_multi(const_iterator __p, _Pp&& __x) {
-        return __emplace_hint_multi(__p, _VSTD::forward<_Pp>(__x));
+        return __emplace_hint_multi(__p, _CUDA_VSTD::forward<_Pp>(__x));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __insert_unique(const __container_value_type& __x) {
         return __emplace_unique_key_args(_NodeTypes::__get_key(__x), __x);
     }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     template <class _NodeHandle, class _InsertReturnType>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _InsertReturnType __node_handle_insert_unique(_NodeHandle&& __nh);
     template <class _NodeHandle>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __node_handle_insert_unique(const_iterator __hint,
                                          _NodeHandle&& __nh);
     template <class _Table>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __node_handle_merge_unique(_Table& __source);
 
     template <class _NodeHandle>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __node_handle_insert_multi(_NodeHandle&& __nh);
     template <class _NodeHandle>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __node_handle_insert_multi(const_iterator __hint, _NodeHandle&& __nh);
     template <class _Table>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __node_handle_merge_multi(_Table& __source);
 
     template <class _NodeHandle>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _NodeHandle __node_handle_extract(key_type const& __key);
     template <class _NodeHandle>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _NodeHandle __node_handle_extract(const_iterator __it);
 #endif
 
     void clear() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY void __rehash_unique(size_type __n) { __rehash<true>(__n); }
-    _LIBCPP_INLINE_VISIBILITY void __rehash_multi(size_type __n) { __rehash<false>(__n); }
-    _LIBCPP_INLINE_VISIBILITY void __reserve_unique(size_type __n)
+    _LIBCUDACXX_INLINE_VISIBILITY void __rehash_unique(size_type __n) { __rehash<true>(__n); }
+    _LIBCUDACXX_INLINE_VISIBILITY void __rehash_multi(size_type __n) { __rehash<false>(__n); }
+    _LIBCUDACXX_INLINE_VISIBILITY void __reserve_unique(size_type __n)
     {
         __rehash_unique(static_cast<size_type>(ceil(__n / max_load_factor())));
     }
-    _LIBCPP_INLINE_VISIBILITY void __reserve_multi(size_type __n)
+    _LIBCUDACXX_INLINE_VISIBILITY void __reserve_multi(size_type __n)
     {
         __rehash_multi(static_cast<size_type>(ceil(__n / max_load_factor())));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_count() const _NOEXCEPT
     {
         return __bucket_list_.get_deleter().size();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       begin() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       end() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin() const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end() const _NOEXCEPT;
 
     template <class _Key>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         size_type bucket(const _Key& __k) const
         {
-            _LIBCPP_ASSERT(bucket_count() > 0,
+            _LIBCUDACXX_ASSERT(bucket_count() > 0,
                 "unordered container::bucket(key) called when bucket_count() == 0");
             return __constrain_hash(hash_function()(__k), bucket_count());
         }
@@ -1199,7 +1199,7 @@ public:
     __node_holder remove(const_iterator __p) _NOEXCEPT;
 
     template <class _Key>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         size_type __count_unique(const _Key& __k) const;
     template <class _Key>
         size_type __count_multi(const _Key& __k) const;
@@ -1219,7 +1219,7 @@ public:
         __equal_range_multi(const _Key& __k) const;
 
     void swap(__hash_table& __u)
-#if _LIBCPP_STD_VER <= 11
+#if _LIBCUDACXX_STD_VER <= 11
         _NOEXCEPT_(
             __is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value
             && (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value
@@ -1231,66 +1231,66 @@ public:
      _NOEXCEPT_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value);
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_bucket_count() const _NOEXCEPT
         {return max_size(); }
     size_type bucket_size(size_type __n) const;
-    _LIBCPP_INLINE_VISIBILITY float load_factor() const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY float load_factor() const _NOEXCEPT
     {
         size_type __bc = bucket_count();
         return __bc != 0 ? (float)size() / __bc : 0.f;
     }
-    _LIBCPP_INLINE_VISIBILITY void max_load_factor(float __mlf) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY void max_load_factor(float __mlf) _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__mlf > 0,
+        _LIBCUDACXX_ASSERT(__mlf > 0,
             "unordered container::max_load_factor(lf) called with lf <= 0");
-        max_load_factor() = _VSTD::max(__mlf, load_factor());
+        max_load_factor() = _CUDA_VSTD::max(__mlf, load_factor());
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     local_iterator
     begin(size_type __n)
     {
-        _LIBCPP_ASSERT(__n < bucket_count(),
+        _LIBCUDACXX_ASSERT(__n < bucket_count(),
             "unordered container::begin(n) called with n >= bucket_count()");
         return local_iterator(__bucket_list_[__n], __n, bucket_count(), this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     local_iterator
     end(size_type __n)
     {
-        _LIBCPP_ASSERT(__n < bucket_count(),
+        _LIBCUDACXX_ASSERT(__n < bucket_count(),
             "unordered container::end(n) called with n >= bucket_count()");
         return local_iterator(nullptr, __n, bucket_count(), this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator
     cbegin(size_type __n) const
     {
-        _LIBCPP_ASSERT(__n < bucket_count(),
+        _LIBCUDACXX_ASSERT(__n < bucket_count(),
             "unordered container::cbegin(n) called with n >= bucket_count()");
         return const_local_iterator(__bucket_list_[__n], __n, bucket_count(), this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator
     cend(size_type __n) const
     {
-        _LIBCPP_ASSERT(__n < bucket_count(),
+        _LIBCUDACXX_ASSERT(__n < bucket_count(),
             "unordered container::cend(n) called with n >= bucket_count()");
         return const_local_iterator(nullptr, __n, bucket_count(), this);
     }
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
     bool __dereferenceable(const const_iterator* __i) const;
     bool __decrementable(const const_iterator* __i) const;
     bool __addable(const const_iterator* __i, ptr
diff _t __n) const;
     bool __subscriptable(const const_iterator* __i, ptr
diff _t __n) const;
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 private:
     template <bool _UniqueKeys> void __rehash(size_type __n);
@@ -1303,12 +1303,12 @@ private:
     __node_holder __construct_node_hash(size_t __hash, _First&& __f, _Rest&&... __rest);
 
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const __hash_table& __u)
         {__copy_assign_alloc(__u, integral_constant<bool,
              __node_traits::propagate_on_container_copy_assignment::value>());}
     void __copy_assign_alloc(const __hash_table& __u, true_type);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
         void __copy_assign_alloc(const __hash_table&, false_type) {}
 
     void __move_assign(__hash_table& __u, false_type);
@@ -1317,7 +1317,7 @@ private:
             is_nothrow_move_assignable<__node_allocator>::value &&
             is_nothrow_move_assignable<hasher>::value &&
             is_nothrow_move_assignable<key_equal>::value);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__hash_table& __u)
         _NOEXCEPT_(
             !__node_traits::propagate_on_container_move_assignment::value ||
@@ -1325,24 +1325,24 @@ private:
              is_nothrow_move_assignable<__node_allocator>::value))
         {__move_assign_alloc(__u, integral_constant<bool,
              __node_traits::propagate_on_container_move_assignment::value>());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__hash_table& __u, true_type)
         _NOEXCEPT_(
             is_nothrow_move_assignable<__pointer_allocator>::value &&
             is_nothrow_move_assignable<__node_allocator>::value)
     {
         __bucket_list_.get_deleter().__alloc() =
-                _VSTD::move(__u.__bucket_list_.get_deleter().__alloc());
-        __node_alloc() = _VSTD::move(__u.__node_alloc());
+                _CUDA_VSTD::move(__u.__bucket_list_.get_deleter().__alloc());
+        __node_alloc() = _CUDA_VSTD::move(__u.__node_alloc());
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
         void __move_assign_alloc(__hash_table&, false_type) _NOEXCEPT {}
 
     void __deallocate_node(__next_pointer __np) _NOEXCEPT;
     __next_pointer __detach() _NOEXCEPT;
 
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS unordered_map;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS unordered_multimap;
 };
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
@@ -1421,10 +1421,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u)
             is_nothrow_move_constructible<__node_allocator>::value &&
             is_nothrow_move_constructible<hasher>::value &&
             is_nothrow_move_constructible<key_equal>::value)
-    : __bucket_list_(_VSTD::move(__u.__bucket_list_)),
-      __p1_(_VSTD::move(__u.__p1_)),
-      __p2_(_VSTD::move(__u.__p2_)),
-      __p3_(_VSTD::move(__u.__p3_))
+    : __bucket_list_(_CUDA_VSTD::move(__u.__bucket_list_)),
+      __p1_(_CUDA_VSTD::move(__u.__p1_)),
+      __p2_(_CUDA_VSTD::move(__u.__p2_)),
+      __p3_(_CUDA_VSTD::move(__u.__p3_))
 {
     if (size() > 0)
     {
@@ -1440,8 +1440,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
                                                        const allocator_type& __a)
     : __bucket_list_(nullptr, __bucket_list_deleter(__pointer_allocator(__a), 0)),
       __p1_(__default_init_tag(), __node_allocator(__a)),
-      __p2_(0, _VSTD::move(__u.hash_function())),
-      __p3_(_VSTD::move(__u.__p3_))
+      __p2_(0, _CUDA_VSTD::move(__u.hash_function())),
+      __p3_(_CUDA_VSTD::move(__u.__p3_))
 {
     if (__a == allocator_type(__u.__node_alloc()))
     {
@@ -1463,7 +1463,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__hash_table(__hash_table&& __u,
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::~__hash_table()
 {
-#if defined(_LIBCPP_CXX03_LANG)
+#if defined(_LIBCUDACXX_CXX03_LANG)
     static_assert((is_copy_constructible<key_equal>::value),
                  "Predicate must be copy-constructible.");
     static_assert((is_copy_constructible<hasher>::value),
@@ -1493,7 +1493,7 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
 __hash_table<_Tp, _Hash, _Equal, _Alloc>&
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::operator=(const __hash_table& __u)
 {
-    if (this != _VSTD::addressof(__u))
+    if (this != _CUDA_VSTD::addressof(__u))
     {
         __copy_assign_alloc(__u);
         hash_function() = __u.hash_function();
@@ -1513,7 +1513,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__deallocate_node(__next_pointer __np)
     while (__np != nullptr)
     {
         __next_pointer __next = __np->__next_;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
         __c_node* __c = __get_db()->__find_c_and_lock(this);
         for (__i_node** __p = __c->end_; __p != __c->beg_; )
         {
@@ -1523,7 +1523,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__deallocate_node(__next_pointer __np)
             {
                 (*__p)->__c_ = nullptr;
                 if (--__c->end_ != __p)
-                    _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+                    _CUDA_VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
             }
         }
         __get_db()->unlock();
@@ -1563,9 +1563,9 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
     __u.__bucket_list_.get_deleter().size() = 0;
     __move_assign_alloc(__u);
     size() = __u.size();
-    hash_function() = _VSTD::move(__u.hash_function());
+    hash_function() = _CUDA_VSTD::move(__u.hash_function());
     max_load_factor() = __u.max_load_factor();
-    key_eq() = _VSTD::move(__u.key_eq());
+    key_eq() = _CUDA_VSTD::move(__u.key_eq());
     __p1_.first().__next_ = __u.__p1_.first().__next_;
     if (size() > 0)
     {
@@ -1586,33 +1586,33 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__move_assign(
         __move_assign(__u, true_type());
     else
     {
-        hash_function() = _VSTD::move(__u.hash_function());
-        key_eq() = _VSTD::move(__u.key_eq());
+        hash_function() = _CUDA_VSTD::move(__u.hash_function());
+        key_eq() = _CUDA_VSTD::move(__u.key_eq());
         max_load_factor() = __u.max_load_factor();
         if (bucket_count() != 0)
         {
             __next_pointer __cache = __detach();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
             try
             {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
                 const_iterator __i = __u.begin();
                 while (__cache != nullptr && __u.size() != 0)
                 {
                     __cache->__upcast()->__value_ =
-                        _VSTD::move(__u.remove(__i++)->__value_);
+                        _CUDA_VSTD::move(__u.remove(__i++)->__value_);
                     __next_pointer __next = __cache->__next_;
                     __node_insert_multi(__cache->__upcast());
                     __cache = __next;
                 }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
             }
             catch (...)
             {
                 __deallocate_node(__cache);
                 throw;
             }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             __deallocate_node(__cache);
         }
         const_iterator __i = __u.begin();
@@ -1654,10 +1654,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_unique(_InputIterator __first
     if (bucket_count() != 0)
     {
         __next_pointer __cache = __detach();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (; __cache != nullptr && __first != __last; ++__first)
             {
                 __cache->__upcast()->__value_ = *__first;
@@ -1665,14 +1665,14 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_unique(_InputIterator __first
                 __node_insert_unique(__cache->__upcast());
                 __cache = __next;
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __deallocate_node(__cache);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __deallocate_node(__cache);
     }
     for (; __first != __last; ++__first)
@@ -1694,10 +1694,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_multi(_InputIterator __first,
     if (bucket_count() != 0)
     {
         __next_pointer __cache = __detach();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (; __cache != nullptr && __first != __last; ++__first)
             {
                 __cache->__upcast()->__value_ = *__first;
@@ -1705,14 +1705,14 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__assign_multi(_InputIterator __first,
                 __node_insert_multi(__cache->__upcast());
                 __cache = __next;
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __deallocate_node(__cache);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __deallocate_node(__cache);
     }
     for (; __first != __last; ++__first)
@@ -1775,7 +1775,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::clear() _NOEXCEPT
 // Note that this function does forward exceptions if key_eq() throws, and never
 // mutates __value or actually inserts into the map.
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::__next_pointer
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique_prepare(
     size_t __hash, value_type& __value)
@@ -1799,7 +1799,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique_prepare(
     }
     if (size()+1 > __bc * max_load_factor() || __bc == 0)
     {
-        __rehash_unique(_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
+        __rehash_unique(_CUDA_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
                                      size_type(ceil(float(size() + 1) / max_load_factor()))));
     }
     return nullptr;
@@ -1810,7 +1810,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique_prepare(
 // rehashing has already occurred and that no element with the same key exists
 // in the map.
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_unique_perform(
     __node_pointer __nd) _NOEXCEPT
@@ -1871,7 +1871,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi_prepare(
     size_type __bc = bucket_count();
     if (size()+1 > __bc * max_load_factor() || __bc == 0)
     {
-        __rehash_multi(_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
+        __rehash_multi(_CUDA_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
                        size_type(ceil(float(size() + 1) / max_load_factor()))));
         __bc = bucket_count();
     }
@@ -1955,7 +1955,7 @@ typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(
         const_iterator __p, __node_pointer __cp)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                          "unordered container::emplace_hint(const_iterator, args...) called with an iterator not"
                          " referring to this unordered container");
     if (__p != end() && key_eq()(*__p, __cp->__value_))
@@ -1965,7 +1965,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_insert_multi(
         size_type __bc = bucket_count();
         if (size()+1 > __bc * max_load_factor() || __bc == 0)
         {
-            __rehash_multi(_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
+            __rehash_multi(_CUDA_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
                            size_type(ceil(float(size() + 1) / max_load_factor()))));
             __bc = bucket_count();
         }
@@ -2010,10 +2010,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_key_args(_Key const&
         }
     }
     {
-        __node_holder __h = __construct_node_hash(__hash, _VSTD::forward<_Args>(__args)...);
+        __node_holder __h = __construct_node_hash(__hash, _CUDA_VSTD::forward<_Args>(__args)...);
         if (size()+1 > __bc * max_load_factor() || __bc == 0)
         {
-            __rehash_unique(_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
+            __rehash_unique(_CUDA_VSTD::max<size_type>(2 * __bc + !__is_hash_power2(__bc),
                            size_type(ceil(float(size() + 1) / max_load_factor()))));
             __bc = bucket_count();
             __chash = __constrain_hash(__hash, __bc);
@@ -2050,7 +2050,7 @@ template <class... _Args>
 pair<typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator, bool>
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_unique_impl(_Args&&... __args)
 {
-    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
+    __node_holder __h = __construct_node(_CUDA_VSTD::forward<_Args>(__args)...);
     pair<iterator, bool> __r = __node_insert_unique(__h.get());
     if (__r.second)
         __h.release();
@@ -2062,7 +2062,7 @@ template <class... _Args>
 typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_multi(_Args&&... __args)
 {
-    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
+    __node_holder __h = __construct_node(_CUDA_VSTD::forward<_Args>(__args)...);
     iterator __r = __node_insert_multi(__h.get());
     __h.release();
     return __r;
@@ -2074,19 +2074,19 @@ typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__emplace_hint_multi(
         const_iterator __p, _Args&&... __args)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                          "unordered container::emplace_hint(const_iterator, args...) called with an iterator not"
                          " referring to this unordered container");
-    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
+    __node_holder __h = __construct_node(_CUDA_VSTD::forward<_Args>(__args)...);
     iterator __r = __node_insert_multi(__p, __h.get());
     __h.release();
     return __r;
 }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 template <class _NodeHandle, class _InsertReturnType>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _InsertReturnType
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_unique(
     _NodeHandle&& __nh)
@@ -2096,12 +2096,12 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_unique(
     pair<iterator, bool> __result = __node_insert_unique(__nh.__ptr_);
     if (__result.second)
         __nh.__release_ptr();
-    return _InsertReturnType{__result.first, __result.second, _VSTD::move(__nh)};
+    return _InsertReturnType{__result.first, __result.second, _CUDA_VSTD::move(__nh)};
 }
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 template <class _NodeHandle>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_unique(
     const_iterator, _NodeHandle&& __nh)
@@ -2116,7 +2116,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_unique(
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 template <class _NodeHandle>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _NodeHandle
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_extract(
     key_type const& __key)
@@ -2129,7 +2129,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_extract(
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 template <class _NodeHandle>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _NodeHandle
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_extract(
     const_iterator __p)
@@ -2140,7 +2140,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_extract(
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 template <class _Table>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_merge_unique(
     _Table& __source)
@@ -2166,7 +2166,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_merge_unique(
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 template <class _NodeHandle>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_multi(
     _NodeHandle&& __nh)
@@ -2180,7 +2180,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_multi(
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 template <class _NodeHandle>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_multi(
     const_iterator __hint, _NodeHandle&& __nh)
@@ -2194,7 +2194,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_insert_multi(
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 template <class _Table>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_merge_multi(
     _Table& __source)
@@ -2213,13 +2213,13 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__node_handle_merge_multi(
         __node_insert_multi_perform(__src_ptr, __pn);
     }
 }
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 template <bool _UniqueKeys>
 void
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::__rehash(size_type __n)
-_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+_LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
 {
     if (__n == 1)
         __n = 2;
@@ -2230,7 +2230,7 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
         __do_rehash<_UniqueKeys>(__n);
     else if (__n < __bc)
     {
-        __n = _VSTD::max<size_type>
+        __n = _CUDA_VSTD::max<size_type>
               (
                   __n,
                   __is_hash_power2(__bc) ? __next_hash_pow2(size_t(ceil(float(size()) / max_load_factor()))) :
@@ -2279,7 +2279,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__do_rehash(size_type __nbc)
                     else
                     {
                         __next_pointer __np = __cp;
-                        if _LIBCPP_CONSTEXPR_AFTER_CXX14 (!_UniqueKeys)
+                        if _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 (!_UniqueKeys)
                         {
                             for (; __np->__next_ != nullptr &&
                                    key_eq()(__cp->__upcast()->__value_,
@@ -2362,7 +2362,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node(_Args&& ...__args)
                   "Construct cannot be called with a hash value type");
     __node_allocator& __na = __node_alloc();
     __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
-    __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), _VSTD::forward<_Args>(__args)...);
+    __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), _CUDA_VSTD::forward<_Args>(__args)...);
     __h.get_deleter().__value_constructed = true;
     __h->__hash_ = hash_function()(__h->__value_);
     __h->__next_ = nullptr;
@@ -2380,8 +2380,8 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__construct_node_hash(
     __node_allocator& __na = __node_alloc();
     __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
     __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_),
-                             _VSTD::forward<_First>(__f),
-                             _VSTD::forward<_Rest>(__rest)...);
+                             _CUDA_VSTD::forward<_First>(__f),
+                             _CUDA_VSTD::forward<_Rest>(__rest)...);
     __h.get_deleter().__value_constructed = true;
     __h->__hash_ = __hash;
     __h->__next_ = nullptr;
@@ -2393,10 +2393,10 @@ typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __p)
 {
     __next_pointer __np = __p.__node_;
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                          "unordered container erase(iterator) called with an iterator not"
                          " referring to this container");
-    _LIBCPP_ASSERT(__p != end(),
+    _LIBCUDACXX_ASSERT(__p != end(),
                    "unordered container erase(iterator) called with a non-dereferenceable iterator");
     iterator __r(__np, this);
     ++__r;
@@ -2409,10 +2409,10 @@ typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::iterator
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::erase(const_iterator __first,
                                                 const_iterator __last)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__first)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__first)) == this,
                          "unordered container::erase(iterator, iterator) called with an iterator not"
                          " referring to this container");
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__last)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__last)) == this,
                          "unordered container::erase(iterator, iterator) called with an iterator not"
                          " referring to this container");
     for (const_iterator __p = __first; __first != __last; __p = __first)
@@ -2488,7 +2488,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p) _NOEXCEPT
     __pn->__next_ = __cn->__next_;
     __cn->__next_ = nullptr;
     --size();
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
     __c_node* __c = __get_db()->__find_c_and_lock(this);
     for (__i_node** __dp = __c->end_; __dp != __c->beg_; )
     {
@@ -2498,7 +2498,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::remove(const_iterator __p) _NOEXCEPT
         {
             (*__dp)->__c_ = nullptr;
             if (--__c->end_ != __dp)
-                _VSTD::memmove(__dp, __dp+1, (__c->end_ - __dp)*sizeof(__i_node*));
+                _CUDA_VSTD::memmove(__dp, __dp+1, (__c->end_ - __dp)*sizeof(__i_node*));
         }
     }
     __get_db()->unlock();
@@ -2605,7 +2605,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__equal_range_multi(
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 void
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
-#if _LIBCPP_STD_VER <= 11
+#if _LIBCUDACXX_STD_VER <= 11
     _NOEXCEPT_(
         __is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value
         && (!allocator_traits<__pointer_allocator>::propagate_on_container_swap::value
@@ -2617,7 +2617,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
   _NOEXCEPT_(__is_nothrow_swappable<hasher>::value && __is_nothrow_swappable<key_equal>::value)
 #endif
 {
-    _LIBCPP_ASSERT(__node_traits::propagate_on_container_swap::value ||
+    _LIBCUDACXX_ASSERT(__node_traits::propagate_on_container_swap::value ||
                    this->__node_alloc() == __u.__node_alloc(),
                    "list::swap: Either propagate_on_container_swap must be true"
                    " or the allocators must compare equal");
@@ -2626,11 +2626,11 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::swap(__hash_table& __u)
     __bucket_list_.reset(__u.__bucket_list_.release());
     __u.__bucket_list_.reset(__npp);
     }
-    _VSTD::swap(__bucket_list_.get_deleter().size(), __u.__bucket_list_.get_deleter().size());
-    _VSTD::__swap_allocator(__bucket_list_.get_deleter().__alloc(),
+    _CUDA_VSTD::swap(__bucket_list_.get_deleter().size(), __u.__bucket_list_.get_deleter().size());
+    _CUDA_VSTD::__swap_allocator(__bucket_list_.get_deleter().__alloc(),
              __u.__bucket_list_.get_deleter().__alloc());
-    _VSTD::__swap_allocator(__node_alloc(), __u.__node_alloc());
-    _VSTD::swap(__p1_.first().__next_, __u.__p1_.first().__next_);
+    _CUDA_VSTD::__swap_allocator(__node_alloc(), __u.__node_alloc());
+    _CUDA_VSTD::swap(__p1_.first().__next_, __u.__p1_.first().__next_);
     __p2_.swap(__u.__p2_);
     __p3_.swap(__u.__p3_);
     if (size() > 0)
@@ -2646,7 +2646,7 @@ template <class _Tp, class _Hash, class _Equal, class _Alloc>
 typename __hash_table<_Tp, _Hash, _Equal, _Alloc>::size_type
 __hash_table<_Tp, _Hash, _Equal, _Alloc>::bucket_size(size_type __n) const
 {
-    _LIBCPP_ASSERT(__n < bucket_count(),
+    _LIBCUDACXX_ASSERT(__n < bucket_count(),
         "unordered container::bucket_size(n) called with n >= bucket_count()");
     __next_pointer __np = __bucket_list_[__n];
     size_type __bc = bucket_count();
@@ -2662,7 +2662,7 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::bucket_size(size_type __n) const
 }
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(__hash_table<_Tp, _Hash, _Equal, _Alloc>& __x,
      __hash_table<_Tp, _Hash, _Equal, _Alloc>& __y)
@@ -2671,7 +2671,7 @@ swap(__hash_table<_Tp, _Hash, _Equal, _Alloc>& __x,
     __x.swap(__y);
 }
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 template <class _Tp, class _Hash, class _Equal, class _Alloc>
 bool
@@ -2701,10 +2701,10 @@ __hash_table<_Tp, _Hash, _Equal, _Alloc>::__subscriptable(const const_iterator*,
     return false;
 }
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___HASH_TABLE
+#endif // _LIBCUDACXX___HASH_TABLE

diff  --git a/libcxx/include/__ios/fpos.h b/libcxx/include/__ios/fpos.h
index 87f0135fc3ea..f65c591b6b58 100644
--- a/libcxx/include/__ios/fpos.h
+++ b/libcxx/include/__ios/fpos.h
@@ -7,49 +7,49 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___IOS_FPOS_H
-#define _LIBCPP___IOS_FPOS_H
+#ifndef _LIBCUDACXX___IOS_FPOS_H
+#define _LIBCUDACXX___IOS_FPOS_H
 
 #include <__config>
 #include <iosfwd>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _StateT>
-class _LIBCPP_TEMPLATE_VIS fpos {
+class _LIBCUDACXX_TEMPLATE_VIS fpos {
 private:
   _StateT __st_;
   streamoff __off_;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI fpos(streamoff __off = streamoff()) : __st_(), __off_(__off) {}
+  _LIBCUDACXX_HIDE_FROM_ABI fpos(streamoff __off = streamoff()) : __st_(), __off_(__off) {}
 
-  _LIBCPP_HIDE_FROM_ABI operator streamoff() const { return __off_; }
+  _LIBCUDACXX_HIDE_FROM_ABI operator streamoff() const { return __off_; }
 
-  _LIBCPP_HIDE_FROM_ABI _StateT state() const { return __st_; }
-  _LIBCPP_HIDE_FROM_ABI void state(_StateT __st) { __st_ = __st; }
+  _LIBCUDACXX_HIDE_FROM_ABI _StateT state() const { return __st_; }
+  _LIBCUDACXX_HIDE_FROM_ABI void state(_StateT __st) { __st_ = __st; }
 
-  _LIBCPP_HIDE_FROM_ABI fpos& operator+=(streamoff __off) {
+  _LIBCUDACXX_HIDE_FROM_ABI fpos& operator+=(streamoff __off) {
     __off_ += __off;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI fpos operator+(streamoff __off) const {
+  _LIBCUDACXX_HIDE_FROM_ABI fpos operator+(streamoff __off) const {
     fpos __t(*this);
     __t += __off;
     return __t;
   }
 
-  _LIBCPP_HIDE_FROM_ABI fpos& operator-=(streamoff __off) {
+  _LIBCUDACXX_HIDE_FROM_ABI fpos& operator-=(streamoff __off) {
     __off_ -= __off;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI fpos operator-(streamoff __off) const {
+  _LIBCUDACXX_HIDE_FROM_ABI fpos operator-(streamoff __off) const {
     fpos __t(*this);
     __t -= __off;
     return __t;
@@ -57,23 +57,23 @@ class _LIBCPP_TEMPLATE_VIS fpos {
 };
 
 template <class _StateT>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 streamoff operator-(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
   return streamoff(__x) - streamoff(__y);
 }
 
 template <class _StateT>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 bool operator==(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
   return streamoff(__x) == streamoff(__y);
 }
 
 template <class _StateT>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 bool operator!=(const fpos<_StateT>& __x, const fpos<_StateT>& __y) {
   return streamoff(__x) != streamoff(__y);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___IOS_FPOS_H
+#endif // _LIBCUDACXX___IOS_FPOS_H

diff  --git a/libcxx/include/__iterator/access.h b/libcxx/include/__iterator/access.h
index 7abd4c5573d6..155ac48de428 100644
--- a/libcxx/include/__iterator/access.h
+++ b/libcxx/include/__iterator/access.h
@@ -7,20 +7,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_ACCESS_H
-#define _LIBCPP___ITERATOR_ACCESS_H
+#ifndef _LIBCUDACXX___ITERATOR_ACCESS_H
+#define _LIBCUDACXX___ITERATOR_ACCESS_H
 
 #include <__config>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, size_t _Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp*
 begin(_Tp (&__array)[_Np])
 {
@@ -28,17 +28,17 @@ begin(_Tp (&__array)[_Np])
 }
 
 template <class _Tp, size_t _Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp*
 end(_Tp (&__array)[_Np])
 {
     return __array + _Np;
 }
 
-#if !defined(_LIBCPP_CXX03_LANG)
+#if !defined(_LIBCUDACXX_CXX03_LANG)
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 auto
 begin(_Cp& __c) -> decltype(__c.begin())
 {
@@ -46,7 +46,7 @@ begin(_Cp& __c) -> decltype(__c.begin())
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 auto
 begin(const _Cp& __c) -> decltype(__c.begin())
 {
@@ -54,7 +54,7 @@ begin(const _Cp& __c) -> decltype(__c.begin())
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 auto
 end(_Cp& __c) -> decltype(__c.end())
 {
@@ -62,36 +62,36 @@ end(_Cp& __c) -> decltype(__c.end())
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 auto
 end(const _Cp& __c) -> decltype(__c.end())
 {
     return __c.end();
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-auto cbegin(const _Cp& __c) -> decltype(_VSTD::begin(__c))
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
+auto cbegin(const _Cp& __c) -> decltype(_CUDA_VSTD::begin(__c))
 {
-    return _VSTD::begin(__c);
+    return _CUDA_VSTD::begin(__c);
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-auto cend(const _Cp& __c) -> decltype(_VSTD::end(__c))
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
+auto cend(const _Cp& __c) -> decltype(_CUDA_VSTD::end(__c))
 {
-    return _VSTD::end(__c);
+    return _CUDA_VSTD::end(__c);
 }
 
 #endif
 
 
-#else  // defined(_LIBCPP_CXX03_LANG)
+#else  // defined(_LIBCUDACXX_CXX03_LANG)
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename _Cp::iterator
 begin(_Cp& __c)
 {
@@ -99,7 +99,7 @@ begin(_Cp& __c)
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename _Cp::const_iterator
 begin(const _Cp& __c)
 {
@@ -107,7 +107,7 @@ begin(const _Cp& __c)
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename _Cp::iterator
 end(_Cp& __c)
 {
@@ -115,15 +115,15 @@ end(_Cp& __c)
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename _Cp::const_iterator
 end(const _Cp& __c)
 {
     return __c.end();
 }
 
-#endif // !defined(_LIBCPP_CXX03_LANG)
+#endif // !defined(_LIBCUDACXX_CXX03_LANG)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_ACCESS_H
+#endif // _LIBCUDACXX___ITERATOR_ACCESS_H

diff  --git a/libcxx/include/__iterator/advance.h b/libcxx/include/__iterator/advance.h
index 4b8b0dc970a1..499b390f2722 100644
--- a/libcxx/include/__iterator/advance.h
+++ b/libcxx/include/__iterator/advance.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_ADVANCE_H
-#define _LIBCPP___ITERATOR_ADVANCE_H
+#ifndef _LIBCUDACXX___ITERATOR_ADVANCE_H
+#define _LIBCUDACXX___ITERATOR_ADVANCE_H
 
 #include <__assert>
 #include <__config>
@@ -22,21 +22,21 @@
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 void __advance(_InputIter& __i, typename iterator_traits<_InputIter>::
diff erence_type __n, input_iterator_tag) {
   for (; __n > 0; --__n)
     ++__i;
 }
 
 template <class _BiDirIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 void __advance(_BiDirIter& __i, typename iterator_traits<_BiDirIter>::
diff erence_type __n, bidirectional_iterator_tag) {
   if (__n >= 0)
     for (; __n > 0; --__n)
@@ -47,25 +47,25 @@ void __advance(_BiDirIter& __i, typename iterator_traits<_BiDirIter>::
diff erence
 }
 
 template <class _RandIter>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 void __advance(_RandIter& __i, typename iterator_traits<_RandIter>::
diff erence_type __n, random_access_iterator_tag) {
   __i += __n;
 }
 
 template <
     class _InputIter, class _Distance,
-    class _IntegralDistance = decltype(_VSTD::__convert_to_integral(declval<_Distance>())),
+    class _IntegralDistance = decltype(_CUDA_VSTD::__convert_to_integral(declval<_Distance>())),
     class = __enable_if_t<is_integral<_IntegralDistance>::value> >
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 void advance(_InputIter& __i, _Distance __orig_n) {
   typedef typename iterator_traits<_InputIter>::
diff erence_type _Difference;
-  _Difference __n = static_cast<_Difference>(_VSTD::__convert_to_integral(__orig_n));
-  _LIBCPP_ASSERT(__n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
+  _Difference __n = static_cast<_Difference>(_CUDA_VSTD::__convert_to_integral(__orig_n));
+  _LIBCUDACXX_ASSERT(__n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
                  "Attempt to advance(it, n) with negative n on a non-bidirectional iterator");
-  _VSTD::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());
+  _CUDA_VSTD::__advance(__i, __n, typename iterator_traits<_InputIter>::iterator_category());
 }
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 // [range.iter.op.advance]
 
@@ -75,7 +75,7 @@ namespace __advance {
 struct __fn {
 private:
   template <class _Ip>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static constexpr void __advance_forward(_Ip& __i, iter_
diff erence_t<_Ip> __n) {
     while (__n > 0) {
       --__n;
@@ -84,7 +84,7 @@ struct __fn {
   }
 
   template <class _Ip>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   static constexpr void __advance_backward(_Ip& __i, iter_
diff erence_t<_Ip> __n) {
     while (__n < 0) {
       ++__n;
@@ -95,9 +95,9 @@ struct __fn {
 public:
   // Preconditions: If `I` does not model `bidirectional_iterator`, `n` is not negative.
   template <input_or_output_iterator _Ip>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr void operator()(_Ip& __i, iter_
diff erence_t<_Ip> __n) const {
-    _LIBCPP_ASSERT(__n >= 0 || bidirectional_iterator<_Ip>,
+    _LIBCUDACXX_ASSERT(__n >= 0 || bidirectional_iterator<_Ip>,
                    "If `n < 0`, then `bidirectional_iterator<I>` must be true.");
 
     // If `I` models `random_access_iterator`, equivalent to `i += n`.
@@ -119,10 +119,10 @@ struct __fn {
 
   // Preconditions: Either `assignable_from<I&, S> || sized_sentinel_for<S, I>` is modeled, or [i, bound_sentinel) denotes a range.
   template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
-  _LIBCPP_HIDE_FROM_ABI constexpr void operator()(_Ip& __i, _Sp __bound_sentinel) const {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr void operator()(_Ip& __i, _Sp __bound_sentinel) const {
     // If `I` and `S` model `assignable_from<I&, S>`, equivalent to `i = std::move(bound_sentinel)`.
     if constexpr (assignable_from<_Ip&, _Sp>) {
-      __i = _VSTD::move(__bound_sentinel);
+      __i = _CUDA_VSTD::move(__bound_sentinel);
     }
     // Otherwise, if `S` and `I` model `sized_sentinel_for<S, I>`, equivalent to `ranges::advance(i, bound_sentinel - i)`.
     else if constexpr (sized_sentinel_for<_Sp, _Ip>) {
@@ -142,9 +142,9 @@ struct __fn {
   //   * If `n < 0`, [bound_sentinel, i) denotes a range, `I` models `bidirectional_iterator`, and `I` and `S` model `same_as<I, S>`.
   // Returns: `n - M`, where `M` is the 
diff erence between the ending and starting position.
   template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
-  _LIBCPP_HIDE_FROM_ABI constexpr iter_
diff erence_t<_Ip> operator()(_Ip& __i, iter_
diff erence_t<_Ip> __n,
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr iter_
diff erence_t<_Ip> operator()(_Ip& __i, iter_
diff erence_t<_Ip> __n,
                                                                     _Sp __bound_sentinel) const {
-    _LIBCPP_ASSERT((__n >= 0) || (bidirectional_iterator<_Ip> && same_as<_Ip, _Sp>),
+    _LIBCUDACXX_ASSERT((__n >= 0) || (bidirectional_iterator<_Ip> && same_as<_Ip, _Sp>),
                    "If `n < 0`, then `bidirectional_iterator<I> && same_as<I, S>` must be true.");
     // If `S` and `I` model `sized_sentinel_for<S, I>`:
     if constexpr (sized_sentinel_for<_Sp, _Ip>) {
@@ -181,7 +181,7 @@ struct __fn {
       return __n;
     }
 
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 };
 
@@ -192,8 +192,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_ADVANCE_H
+#endif // _LIBCUDACXX___ITERATOR_ADVANCE_H

diff  --git a/libcxx/include/__iterator/back_insert_iterator.h b/libcxx/include/__iterator/back_insert_iterator.h
index e9f9f2abec2a..449b91944b43 100644
--- a/libcxx/include/__iterator/back_insert_iterator.h
+++ b/libcxx/include/__iterator/back_insert_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_BACK_INSERT_ITERATOR_H
-#define _LIBCPP___ITERATOR_BACK_INSERT_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_BACK_INSERT_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_BACK_INSERT_ITERATOR_H
 
 #include <__config>
 #include <__iterator/iterator.h>
@@ -17,26 +17,26 @@
 #include <__utility/move.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Container>
-class _LIBCPP_TEMPLATE_VIS back_insert_iterator
-#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
+class _LIBCUDACXX_TEMPLATE_VIS back_insert_iterator
+#if _LIBCUDACXX_STD_VER <= 14 || !defined(_LIBCUDACXX_ABI_NO_ITERATOR_BASES)
     : public iterator<output_iterator_tag, void, void, void, void>
 #endif
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 protected:
     _Container* container;
 public:
     typedef output_iterator_tag iterator_category;
     typedef void value_type;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     typedef ptr
diff _t 
diff erence_type;
 #else
     typedef void 
diff erence_type;
@@ -45,28 +45,28 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     typedef void reference;
     typedef _Container container_type;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit back_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(const typename _Container::value_type& __value)
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit back_insert_iterator(_Container& __x) : container(_CUDA_VSTD::addressof(__x)) {}
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(const typename _Container::value_type& __value)
         {container->push_back(__value); return *this;}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(typename _Container::value_type&& __value)
-        {container->push_back(_VSTD::move(__value)); return *this;}
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator*()     {return *this;}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator++()    {return *this;}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 back_insert_iterator  operator++(int) {return *this;}
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator=(typename _Container::value_type&& __value)
+        {container->push_back(_CUDA_VSTD::move(__value)); return *this;}
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator*()     {return *this;}
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 back_insert_iterator& operator++()    {return *this;}
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 back_insert_iterator  operator++(int) {return *this;}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Container* __get_container() const { return container; }
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Container* __get_container() const { return container; }
 };
 
 template <class _Container>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 back_insert_iterator<_Container>
 back_inserter(_Container& __x)
 {
     return back_insert_iterator<_Container>(__x);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_BACK_INSERT_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_BACK_INSERT_ITERATOR_H

diff  --git a/libcxx/include/__iterator/bounded_iter.h b/libcxx/include/__iterator/bounded_iter.h
index a395e2b638eb..b48b1002d7e8 100644
--- a/libcxx/include/__iterator/bounded_iter.h
+++ b/libcxx/include/__iterator/bounded_iter.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_BOUNDED_ITER_H
-#define _LIBCPP___ITERATOR_BOUNDED_ITER_H
+#ifndef _LIBCUDACXX___ITERATOR_BOUNDED_ITER_H
+#define _LIBCUDACXX___ITERATOR_BOUNDED_ITER_H
 
 #include <__assert>
 #include <__config>
@@ -17,11 +17,11 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Iterator wrapper that carries the valid range it is allowed to access.
 //
@@ -40,7 +40,7 @@ struct __bounded_iter {
   using pointer           = typename iterator_traits<_Iterator>::pointer;
   using reference         = typename iterator_traits<_Iterator>::reference;
   using iterator_category = typename iterator_traits<_Iterator>::iterator_category;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
   using iterator_concept = contiguous_iterator_tag;
 #endif
 
@@ -48,20 +48,20 @@ struct __bounded_iter {
   //
   // Such an iterator does not point to any object and is conceptually out of bounds, so it is
   // not dereferenceable. Observing operations like comparison and assignment are valid.
-  _LIBCPP_HIDE_FROM_ABI __bounded_iter() = default;
+  _LIBCUDACXX_HIDE_FROM_ABI __bounded_iter() = default;
 
-  _LIBCPP_HIDE_FROM_ABI __bounded_iter(__bounded_iter const&) = default;
-  _LIBCPP_HIDE_FROM_ABI __bounded_iter(__bounded_iter&&)      = default;
+  _LIBCUDACXX_HIDE_FROM_ABI __bounded_iter(__bounded_iter const&) = default;
+  _LIBCUDACXX_HIDE_FROM_ABI __bounded_iter(__bounded_iter&&)      = default;
 
   template <class _OtherIterator, class = __enable_if_t< is_convertible<_OtherIterator, _Iterator>::value > >
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __bounded_iter(__bounded_iter<_OtherIterator> const& __other) _NOEXCEPT
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR __bounded_iter(__bounded_iter<_OtherIterator> const& __other) _NOEXCEPT
       : __current_(__other.__current_),
         __begin_(__other.__begin_),
         __end_(__other.__end_) {}
 
   // Assign a bounded iterator to another one, rebinding the bounds of the iterator as well.
-  _LIBCPP_HIDE_FROM_ABI __bounded_iter& operator=(__bounded_iter const&) = default;
-  _LIBCPP_HIDE_FROM_ABI __bounded_iter& operator=(__bounded_iter&&)      = default;
+  _LIBCUDACXX_HIDE_FROM_ABI __bounded_iter& operator=(__bounded_iter const&) = default;
+  _LIBCUDACXX_HIDE_FROM_ABI __bounded_iter& operator=(__bounded_iter&&)      = default;
 
 private:
   // Create an iterator wrapping the given iterator, and whose bounds are described
@@ -73,33 +73,33 @@ struct __bounded_iter {
   //
   // Since it is non-standard for iterators to have this constructor, __bounded_iter must
   // be created via `std::__make_bounded_iter`.
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 explicit __bounded_iter(
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 explicit __bounded_iter(
       _Iterator __current, _Iterator __begin, _Iterator __end)
       : __current_(__current), __begin_(__begin), __end_(__end) {
-    _LIBCPP_ASSERT(__begin <= __end, "__bounded_iter(current, begin, end): [begin, end) is not a valid range");
+    _LIBCUDACXX_ASSERT(__begin <= __end, "__bounded_iter(current, begin, end): [begin, end) is not a valid range");
   }
 
   template <class _It>
-  friend _LIBCPP_CONSTEXPR __bounded_iter<_It> __make_bounded_iter(_It, _It, _It);
+  friend _LIBCUDACXX_CONSTEXPR __bounded_iter<_It> __make_bounded_iter(_It, _It, _It);
 
 public:
   // Dereference and indexing operations.
   //
   // These operations check that the iterator is dereferenceable, that is within [begin, end).
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference operator*() const _NOEXCEPT {
-    _LIBCPP_ASSERT(
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 reference operator*() const _NOEXCEPT {
+    _LIBCUDACXX_ASSERT(
         __in_bounds(__current_), "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
     return *__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 pointer operator->() const _NOEXCEPT {
-    _LIBCPP_ASSERT(
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 pointer operator->() const _NOEXCEPT {
+    _LIBCUDACXX_ASSERT(
         __in_bounds(__current_), "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
     return std::__to_address(__current_);
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference operator[](
diff erence_type __n) const _NOEXCEPT {
-    _LIBCPP_ASSERT(
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 reference operator[](
diff erence_type __n) const _NOEXCEPT {
+    _LIBCUDACXX_ASSERT(
         __in_bounds(__current_ + __n), "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
     return __current_[__n];
   }
@@ -108,54 +108,54 @@ struct __bounded_iter {
   //
   // These operations do not check that the resulting iterator is within the bounds, since that
   // would make it impossible to create a past-the-end iterator.
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __bounded_iter& operator++() _NOEXCEPT {
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __bounded_iter& operator++() _NOEXCEPT {
     ++__current_;
     return *this;
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __bounded_iter operator++(int) _NOEXCEPT {
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __bounded_iter operator++(int) _NOEXCEPT {
     __bounded_iter __tmp(*this);
     ++*this;
     return __tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __bounded_iter& operator--() _NOEXCEPT {
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __bounded_iter& operator--() _NOEXCEPT {
     --__current_;
     return *this;
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __bounded_iter operator--(int) _NOEXCEPT {
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __bounded_iter operator--(int) _NOEXCEPT {
     __bounded_iter __tmp(*this);
     --*this;
     return __tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __bounded_iter& operator+=(
diff erence_type __n) _NOEXCEPT {
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __bounded_iter& operator+=(
diff erence_type __n) _NOEXCEPT {
     __current_ += __n;
     return *this;
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 friend __bounded_iter
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 friend __bounded_iter
   operator+(__bounded_iter const& __self, 
diff erence_type __n) _NOEXCEPT {
     __bounded_iter __tmp(__self);
     __tmp += __n;
     return __tmp;
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 friend __bounded_iter
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 friend __bounded_iter
   operator+(
diff erence_type __n, __bounded_iter const& __self) _NOEXCEPT {
     __bounded_iter __tmp(__self);
     __tmp += __n;
     return __tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __bounded_iter& operator-=(
diff erence_type __n) _NOEXCEPT {
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __bounded_iter& operator-=(
diff erence_type __n) _NOEXCEPT {
     __current_ -= __n;
     return *this;
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 friend __bounded_iter
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 friend __bounded_iter
   operator-(__bounded_iter const& __self, 
diff erence_type __n) _NOEXCEPT {
     __bounded_iter __tmp(__self);
     __tmp -= __n;
     return __tmp;
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 friend 
diff erence_type
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 friend 
diff erence_type
   operator-(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
     return __x.__current_ - __y.__current_;
   }
@@ -166,34 +166,34 @@ struct __bounded_iter {
   // The valid range for each iterator is also not considered as part of the comparison,
   // i.e. two iterators pointing to the same location will be considered equal even
   // if they have 
diff erent validity ranges.
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR friend bool
   operator==(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
     return __x.__current_ == __y.__current_;
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR friend bool
   operator!=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
     return __x.__current_ != __y.__current_;
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR friend bool
   operator<(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
     return __x.__current_ < __y.__current_;
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR friend bool
   operator>(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
     return __x.__current_ > __y.__current_;
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR friend bool
   operator<=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
     return __x.__current_ <= __y.__current_;
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR friend bool
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR friend bool
   operator>=(__bounded_iter const& __x, __bounded_iter const& __y) _NOEXCEPT {
     return __x.__current_ >= __y.__current_;
   }
 
 private:
   // Return whether the given iterator is in the bounds of this __bounded_iter.
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR bool __in_bounds(_Iterator const& __iter) const {
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR bool __in_bounds(_Iterator const& __iter) const {
     return __iter >= __begin_ && __iter < __end_;
   }
 
@@ -204,11 +204,11 @@ struct __bounded_iter {
 };
 
 template <class _It>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __bounded_iter<_It> __make_bounded_iter(_It __it, _It __begin, _It __end) {
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR __bounded_iter<_It> __make_bounded_iter(_It __it, _It __begin, _It __end) {
   return __bounded_iter<_It>(std::move(__it), std::move(__begin), std::move(__end));
 }
 
-#if _LIBCPP_STD_VER <= 17
+#if _LIBCUDACXX_STD_VER <= 17
 template <class _Iterator>
 struct __is_cpp17_contiguous_iterator<__bounded_iter<_Iterator> > : true_type {};
 #endif
@@ -219,11 +219,11 @@ struct pointer_traits<__bounded_iter<_Iterator> > {
   using element_type    = typename pointer_traits<_Iterator>::element_type;
   using 
diff erence_type = typename pointer_traits<_Iterator>::
diff erence_type;
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static element_type* to_address(pointer __it) _NOEXCEPT {
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR static element_type* to_address(pointer __it) _NOEXCEPT {
     return std::__to_address(__it.__current_);
   }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_BOUNDED_ITER_H
+#endif // _LIBCUDACXX___ITERATOR_BOUNDED_ITER_H

diff  --git a/libcxx/include/__iterator/common_iterator.h b/libcxx/include/__iterator/common_iterator.h
index abcc0b675e63..07d842a8104c 100644
--- a/libcxx/include/__iterator/common_iterator.h
+++ b/libcxx/include/__iterator/common_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_COMMON_ITERATOR_H
-#define _LIBCPP___ITERATOR_COMMON_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_COMMON_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_COMMON_ITERATOR_H
 
 #include <__assert>
 #include <__config>
@@ -21,13 +21,13 @@
 #include <concepts>
 #include <variant>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template<class _Iter>
 concept __can_use_postfix_proxy =
@@ -39,7 +39,7 @@ template<input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent>
 class common_iterator {
   struct __proxy {
     constexpr const iter_value_t<_Iter>* operator->() const noexcept {
-      return _VSTD::addressof(__value_);
+      return _CUDA_VSTD::addressof(__value_);
     }
     iter_value_t<_Iter> __value_;
   };
@@ -56,54 +56,54 @@ class common_iterator {
 
   common_iterator() requires default_initializable<_Iter> = default;
 
-  constexpr common_iterator(_Iter __i) : __hold_(in_place_type<_Iter>, _VSTD::move(__i)) {}
-  constexpr common_iterator(_Sent __s) : __hold_(in_place_type<_Sent>, _VSTD::move(__s)) {}
+  constexpr common_iterator(_Iter __i) : __hold_(in_place_type<_Iter>, _CUDA_VSTD::move(__i)) {}
+  constexpr common_iterator(_Sent __s) : __hold_(in_place_type<_Sent>, _CUDA_VSTD::move(__s)) {}
 
   template<class _I2, class _S2>
     requires convertible_to<const _I2&, _Iter> && convertible_to<const _S2&, _Sent>
   constexpr common_iterator(const common_iterator<_I2, _S2>& __other)
     : __hold_([&]() -> variant<_Iter, _Sent> {
-      _LIBCPP_ASSERT(!__other.__hold_.valueless_by_exception(), "Attempted to construct from a valueless common_iterator");
+      _LIBCUDACXX_ASSERT(!__other.__hold_.valueless_by_exception(), "Attempted to construct from a valueless common_iterator");
       if (__other.__hold_.index() == 0)
-        return variant<_Iter, _Sent>{in_place_index<0>, _VSTD::__unchecked_get<0>(__other.__hold_)};
-      return variant<_Iter, _Sent>{in_place_index<1>, _VSTD::__unchecked_get<1>(__other.__hold_)};
+        return variant<_Iter, _Sent>{in_place_index<0>, _CUDA_VSTD::__unchecked_get<0>(__other.__hold_)};
+      return variant<_Iter, _Sent>{in_place_index<1>, _CUDA_VSTD::__unchecked_get<1>(__other.__hold_)};
     }()) {}
 
   template<class _I2, class _S2>
     requires convertible_to<const _I2&, _Iter> && convertible_to<const _S2&, _Sent> &&
              assignable_from<_Iter&, const _I2&> && assignable_from<_Sent&, const _S2&>
   common_iterator& operator=(const common_iterator<_I2, _S2>& __other) {
-    _LIBCPP_ASSERT(!__other.__hold_.valueless_by_exception(), "Attempted to assign from a valueless common_iterator");
+    _LIBCUDACXX_ASSERT(!__other.__hold_.valueless_by_exception(), "Attempted to assign from a valueless common_iterator");
 
     auto __idx = __hold_.index();
     auto __other_idx = __other.__hold_.index();
 
     // If they're the same index, just assign.
     if (__idx == 0 && __other_idx == 0)
-      _VSTD::__unchecked_get<0>(__hold_) = _VSTD::__unchecked_get<0>(__other.__hold_);
+      _CUDA_VSTD::__unchecked_get<0>(__hold_) = _CUDA_VSTD::__unchecked_get<0>(__other.__hold_);
     else if (__idx == 1 && __other_idx == 1)
-      _VSTD::__unchecked_get<1>(__hold_) = _VSTD::__unchecked_get<1>(__other.__hold_);
+      _CUDA_VSTD::__unchecked_get<1>(__hold_) = _CUDA_VSTD::__unchecked_get<1>(__other.__hold_);
 
     // Otherwise replace with the oposite element.
     else if (__other_idx == 1)
-      __hold_.template emplace<1>(_VSTD::__unchecked_get<1>(__other.__hold_));
+      __hold_.template emplace<1>(_CUDA_VSTD::__unchecked_get<1>(__other.__hold_));
     else if (__other_idx == 0)
-      __hold_.template emplace<0>(_VSTD::__unchecked_get<0>(__other.__hold_));
+      __hold_.template emplace<0>(_CUDA_VSTD::__unchecked_get<0>(__other.__hold_));
 
     return *this;
   }
 
   constexpr decltype(auto) operator*()
   {
-    _LIBCPP_ASSERT(holds_alternative<_Iter>(__hold_), "Attempted to dereference a non-dereferenceable common_iterator");
-    return *_VSTD::__unchecked_get<_Iter>(__hold_);
+    _LIBCUDACXX_ASSERT(holds_alternative<_Iter>(__hold_), "Attempted to dereference a non-dereferenceable common_iterator");
+    return *_CUDA_VSTD::__unchecked_get<_Iter>(__hold_);
   }
 
   constexpr decltype(auto) operator*() const
     requires __dereferenceable<const _Iter>
   {
-    _LIBCPP_ASSERT(holds_alternative<_Iter>(__hold_), "Attempted to dereference a non-dereferenceable common_iterator");
-    return *_VSTD::__unchecked_get<_Iter>(__hold_);
+    _LIBCUDACXX_ASSERT(holds_alternative<_Iter>(__hold_), "Attempted to dereference a non-dereferenceable common_iterator");
+    return *_CUDA_VSTD::__unchecked_get<_Iter>(__hold_);
   }
 
   template<class _I2 = _Iter>
@@ -113,31 +113,31 @@ class common_iterator {
      is_reference_v<iter_reference_t<_I2>> ||
      constructible_from<iter_value_t<_I2>, iter_reference_t<_I2>>)
   {
-    _LIBCPP_ASSERT(holds_alternative<_Iter>(__hold_), "Attempted to dereference a non-dereferenceable common_iterator");
+    _LIBCUDACXX_ASSERT(holds_alternative<_Iter>(__hold_), "Attempted to dereference a non-dereferenceable common_iterator");
     if constexpr (is_pointer_v<_Iter> || requires(const _Iter& __i) { __i.operator->(); })    {
-      return _VSTD::__unchecked_get<_Iter>(__hold_);
+      return _CUDA_VSTD::__unchecked_get<_Iter>(__hold_);
     } else if constexpr (is_reference_v<iter_reference_t<_Iter>>) {
-      auto&& __tmp = *_VSTD::__unchecked_get<_Iter>(__hold_);
-      return _VSTD::addressof(__tmp);
+      auto&& __tmp = *_CUDA_VSTD::__unchecked_get<_Iter>(__hold_);
+      return _CUDA_VSTD::addressof(__tmp);
     } else {
-      return __proxy{*_VSTD::__unchecked_get<_Iter>(__hold_)};
+      return __proxy{*_CUDA_VSTD::__unchecked_get<_Iter>(__hold_)};
     }
   }
 
   common_iterator& operator++() {
-    _LIBCPP_ASSERT(holds_alternative<_Iter>(__hold_), "Attempted to increment a non-dereferenceable common_iterator");
-    ++_VSTD::__unchecked_get<_Iter>(__hold_); return *this;
+    _LIBCUDACXX_ASSERT(holds_alternative<_Iter>(__hold_), "Attempted to increment a non-dereferenceable common_iterator");
+    ++_CUDA_VSTD::__unchecked_get<_Iter>(__hold_); return *this;
   }
 
   decltype(auto) operator++(int) {
-    _LIBCPP_ASSERT(holds_alternative<_Iter>(__hold_), "Attempted to increment a non-dereferenceable common_iterator");
+    _LIBCUDACXX_ASSERT(holds_alternative<_Iter>(__hold_), "Attempted to increment a non-dereferenceable common_iterator");
     if constexpr (forward_iterator<_Iter>) {
       auto __tmp = *this;
       ++*this;
       return __tmp;
     } else if constexpr (requires (_Iter& __i) { { *__i++ } -> __can_reference; } ||
                          !__can_use_postfix_proxy<_Iter>) {
-      return _VSTD::__unchecked_get<_Iter>(__hold_)++;
+      return _CUDA_VSTD::__unchecked_get<_Iter>(__hold_)++;
     } else {
       auto __p = __postfix_proxy{**this};
       ++*this;
@@ -148,8 +148,8 @@ class common_iterator {
   template<class _I2, sentinel_for<_Iter> _S2>
     requires sentinel_for<_Sent, _I2>
   friend constexpr bool operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
-    _LIBCPP_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
-    _LIBCPP_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
+    _LIBCUDACXX_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
+    _LIBCUDACXX_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
 
     auto __x_index = __x.__hold_.index();
     auto __y_index = __y.__hold_.index();
@@ -158,16 +158,16 @@ class common_iterator {
       return true;
 
     if (__x_index == 0)
-      return _VSTD::__unchecked_get<_Iter>(__x.__hold_) == _VSTD::__unchecked_get<_S2>(__y.__hold_);
+      return _CUDA_VSTD::__unchecked_get<_Iter>(__x.__hold_) == _CUDA_VSTD::__unchecked_get<_S2>(__y.__hold_);
 
-    return _VSTD::__unchecked_get<_Sent>(__x.__hold_) == _VSTD::__unchecked_get<_I2>(__y.__hold_);
+    return _CUDA_VSTD::__unchecked_get<_Sent>(__x.__hold_) == _CUDA_VSTD::__unchecked_get<_I2>(__y.__hold_);
   }
 
   template<class _I2, sentinel_for<_Iter> _S2>
     requires sentinel_for<_Sent, _I2> && equality_comparable_with<_Iter, _I2>
   friend constexpr bool operator==(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
-    _LIBCPP_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
-    _LIBCPP_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
+    _LIBCUDACXX_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
+    _LIBCUDACXX_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to compare a valueless common_iterator");
 
     auto __x_index = __x.__hold_.index();
     auto __y_index = __y.__hold_.index();
@@ -176,19 +176,19 @@ class common_iterator {
       return true;
 
     if (__x_index == 0 && __y_index == 0)
-      return  _VSTD::__unchecked_get<_Iter>(__x.__hold_) ==  _VSTD::__unchecked_get<_I2>(__y.__hold_);
+      return  _CUDA_VSTD::__unchecked_get<_Iter>(__x.__hold_) ==  _CUDA_VSTD::__unchecked_get<_I2>(__y.__hold_);
 
     if (__x_index == 0)
-      return  _VSTD::__unchecked_get<_Iter>(__x.__hold_) == _VSTD::__unchecked_get<_S2>(__y.__hold_);
+      return  _CUDA_VSTD::__unchecked_get<_Iter>(__x.__hold_) == _CUDA_VSTD::__unchecked_get<_S2>(__y.__hold_);
 
-    return _VSTD::__unchecked_get<_Sent>(__x.__hold_) ==  _VSTD::__unchecked_get<_I2>(__y.__hold_);
+    return _CUDA_VSTD::__unchecked_get<_Sent>(__x.__hold_) ==  _CUDA_VSTD::__unchecked_get<_I2>(__y.__hold_);
   }
 
   template<sized_sentinel_for<_Iter> _I2, sized_sentinel_for<_Iter> _S2>
     requires sized_sentinel_for<_Sent, _I2>
   friend constexpr iter_
diff erence_t<_I2> operator-(const common_iterator& __x, const common_iterator<_I2, _S2>& __y) {
-    _LIBCPP_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to subtract from a valueless common_iterator");
-    _LIBCPP_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to subtract a valueless common_iterator");
+    _LIBCUDACXX_ASSERT(!__x.__hold_.valueless_by_exception(), "Attempted to subtract from a valueless common_iterator");
+    _LIBCUDACXX_ASSERT(!__y.__hold_.valueless_by_exception(), "Attempted to subtract a valueless common_iterator");
 
     auto __x_index = __x.__hold_.index();
     auto __y_index = __y.__hold_.index();
@@ -197,29 +197,29 @@ class common_iterator {
       return 0;
 
     if (__x_index == 0 && __y_index == 0)
-      return  _VSTD::__unchecked_get<_Iter>(__x.__hold_) - _VSTD::__unchecked_get<_I2>(__y.__hold_);
+      return  _CUDA_VSTD::__unchecked_get<_Iter>(__x.__hold_) - _CUDA_VSTD::__unchecked_get<_I2>(__y.__hold_);
 
     if (__x_index == 0)
-      return  _VSTD::__unchecked_get<_Iter>(__x.__hold_) - _VSTD::__unchecked_get<_S2>(__y.__hold_);
+      return  _CUDA_VSTD::__unchecked_get<_Iter>(__x.__hold_) - _CUDA_VSTD::__unchecked_get<_S2>(__y.__hold_);
 
-    return _VSTD::__unchecked_get<_Sent>(__x.__hold_) - _VSTD::__unchecked_get<_I2>(__y.__hold_);
+    return _CUDA_VSTD::__unchecked_get<_Sent>(__x.__hold_) - _CUDA_VSTD::__unchecked_get<_I2>(__y.__hold_);
   }
 
   friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const common_iterator& __i)
     noexcept(noexcept(ranges::iter_move(declval<const _Iter&>())))
       requires input_iterator<_Iter>
   {
-    _LIBCPP_ASSERT(holds_alternative<_Iter>(__i.__hold_), "Attempted to iter_move a non-dereferenceable common_iterator");
-    return ranges::iter_move( _VSTD::__unchecked_get<_Iter>(__i.__hold_));
+    _LIBCUDACXX_ASSERT(holds_alternative<_Iter>(__i.__hold_), "Attempted to iter_move a non-dereferenceable common_iterator");
+    return ranges::iter_move( _CUDA_VSTD::__unchecked_get<_Iter>(__i.__hold_));
   }
 
   template<indirectly_swappable<_Iter> _I2, class _S2>
   friend constexpr void iter_swap(const common_iterator& __x, const common_iterator<_I2, _S2>& __y)
       noexcept(noexcept(ranges::iter_swap(declval<const _Iter&>(), declval<const _I2&>())))
   {
-    _LIBCPP_ASSERT(holds_alternative<_Iter>(__x.__hold_), "Attempted to iter_swap a non-dereferenceable common_iterator");
-    _LIBCPP_ASSERT(holds_alternative<_I2>(__y.__hold_), "Attempted to iter_swap a non-dereferenceable common_iterator");
-    return ranges::iter_swap(_VSTD::__unchecked_get<_Iter>(__x.__hold_), _VSTD::__unchecked_get<_I2>(__y.__hold_));
+    _LIBCUDACXX_ASSERT(holds_alternative<_Iter>(__x.__hold_), "Attempted to iter_swap a non-dereferenceable common_iterator");
+    _LIBCUDACXX_ASSERT(holds_alternative<_I2>(__y.__hold_), "Attempted to iter_swap a non-dereferenceable common_iterator");
+    return ranges::iter_swap(_CUDA_VSTD::__unchecked_get<_Iter>(__x.__hold_), _CUDA_VSTD::__unchecked_get<_I2>(__y.__hold_));
   }
 };
 
@@ -263,8 +263,8 @@ struct iterator_traits<common_iterator<_Iter, _Sent>> {
   using reference = iter_reference_t<_Iter>;
 };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_COMMON_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_COMMON_ITERATOR_H

diff  --git a/libcxx/include/__iterator/concepts.h b/libcxx/include/__iterator/concepts.h
index bd68889333ce..3b860888849f 100644
--- a/libcxx/include/__iterator/concepts.h
+++ b/libcxx/include/__iterator/concepts.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_CONCEPTS_H
-#define _LIBCPP___ITERATOR_CONCEPTS_H
+#ifndef _LIBCUDACXX___ITERATOR_CONCEPTS_H
+#define _LIBCUDACXX___ITERATOR_CONCEPTS_H
 
 #include <__config>
 #include <__iterator/incrementable_traits.h>
@@ -20,13 +20,13 @@
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [iterator.concept.readable]
 template<class _In>
@@ -52,10 +52,10 @@ using iter_common_reference_t = common_reference_t<iter_reference_t<_Tp>, iter_v
 template<class _Out, class _Tp>
 concept indirectly_writable =
   requires(_Out&& __o, _Tp&& __t) {
-    *__o = _VSTD::forward<_Tp>(__t);                        // not required to be equality-preserving
-    *_VSTD::forward<_Out>(__o) = _VSTD::forward<_Tp>(__t);  // not required to be equality-preserving
-    const_cast<const iter_reference_t<_Out>&&>(*__o) = _VSTD::forward<_Tp>(__t);                       // not required to be equality-preserving
-    const_cast<const iter_reference_t<_Out>&&>(*_VSTD::forward<_Out>(__o)) = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving
+    *__o = _CUDA_VSTD::forward<_Tp>(__t);                        // not required to be equality-preserving
+    *_CUDA_VSTD::forward<_Out>(__o) = _CUDA_VSTD::forward<_Tp>(__t);  // not required to be equality-preserving
+    const_cast<const iter_reference_t<_Out>&&>(*__o) = _CUDA_VSTD::forward<_Tp>(__t);                       // not required to be equality-preserving
+    const_cast<const iter_reference_t<_Out>&&>(*_CUDA_VSTD::forward<_Out>(__o)) = _CUDA_VSTD::forward<_Tp>(__t); // not required to be equality-preserving
   };
 
 // [iterator.concept.winc]
@@ -127,7 +127,7 @@ concept output_iterator =
   input_or_output_iterator<_Ip> &&
   indirectly_writable<_Ip, _Tp> &&
   requires (_Ip __it, _Tp&& __t) {
-    *__it++ = _VSTD::forward<_Tp>(__t); // not required to be equality-preserving
+    *__it++ = _CUDA_VSTD::forward<_Tp>(__t); // not required to be equality-preserving
   };
 
 // [iterator.concept.forward]
@@ -170,7 +170,7 @@ concept contiguous_iterator =
   is_lvalue_reference_v<iter_reference_t<_Ip>> &&
   same_as<iter_value_t<_Ip>, remove_cvref_t<iter_reference_t<_Ip>>> &&
   requires(const _Ip& __i) {
-    { _VSTD::to_address(__i) } -> same_as<add_pointer_t<iter_reference_t<_Ip>>>;
+    { _CUDA_VSTD::to_address(__i) } -> same_as<add_pointer_t<iter_reference_t<_Ip>>>;
   };
 
 template<class _Ip>
@@ -273,8 +273,8 @@ concept indirectly_copyable_storable =
 // Note: indirectly_swappable is located in iter_swap.h to prevent a dependency cycle
 // (both iter_swap and indirectly_swappable require indirectly_readable).
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_CONCEPTS_H
+#endif // _LIBCUDACXX___ITERATOR_CONCEPTS_H

diff  --git a/libcxx/include/__iterator/counted_iterator.h b/libcxx/include/__iterator/counted_iterator.h
index b0f5c66ecf21..98ce32a96181 100644
--- a/libcxx/include/__iterator/counted_iterator.h
+++ b/libcxx/include/__iterator/counted_iterator.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ITERATOR_COUNTED_ITERATOR_H
-#define _LIBCPP___ITERATOR_COUNTED_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_COUNTED_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_COUNTED_ITERATOR_H
 
 #include <__assert>
 #include <__config>
@@ -24,13 +24,13 @@
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template<class>
 struct __counted_iterator_concept {};
@@ -65,97 +65,97 @@ class counted_iterator
   , public __counted_iterator_value_type<_Iter>
 {
 public:
-  _LIBCPP_NO_UNIQUE_ADDRESS _Iter __current_ = _Iter();
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _Iter __current_ = _Iter();
   iter_
diff erence_t<_Iter> __count_ = 0;
 
   using iterator_type = _Iter;
   using 
diff erence_type = iter_
diff erence_t<_Iter>;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator() requires default_initializable<_Iter> = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator(_Iter __iter, iter_
diff erence_t<_Iter> __n)
-   : __current_(_VSTD::move(__iter)), __count_(__n) {
-    _LIBCPP_ASSERT(__n >= 0, "__n must not be negative.");
+   : __current_(_CUDA_VSTD::move(__iter)), __count_(__n) {
+    _LIBCUDACXX_ASSERT(__n >= 0, "__n must not be negative.");
   }
 
   template<class _I2>
     requires convertible_to<const _I2&, _Iter>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator(const counted_iterator<_I2>& __other)
    : __current_(__other.__current_), __count_(__other.__count_) {}
 
   template<class _I2>
     requires assignable_from<_Iter&, const _I2&>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator& operator=(const counted_iterator<_I2>& __other) {
     __current_ = __other.__current_;
     __count_ = __other.__count_;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr const _Iter& base() const& noexcept { return __current_; }
 
-  _LIBCPP_HIDE_FROM_ABI
-  constexpr _Iter base() && { return _VSTD::move(__current_); }
+  _LIBCUDACXX_HIDE_FROM_ABI
+  constexpr _Iter base() && { return _CUDA_VSTD::move(__current_); }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr iter_
diff erence_t<_Iter> count() const noexcept { return __count_; }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr decltype(auto) operator*() {
-    _LIBCPP_ASSERT(__count_ > 0, "Iterator is equal to or past end.");
+    _LIBCUDACXX_ASSERT(__count_ > 0, "Iterator is equal to or past end.");
     return *__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr decltype(auto) operator*() const
     requires __dereferenceable<const _Iter>
   {
-    _LIBCPP_ASSERT(__count_ > 0, "Iterator is equal to or past end.");
+    _LIBCUDACXX_ASSERT(__count_ > 0, "Iterator is equal to or past end.");
     return *__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator->() const noexcept
     requires contiguous_iterator<_Iter>
   {
-    return _VSTD::to_address(__current_);
+    return _CUDA_VSTD::to_address(__current_);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator& operator++() {
-    _LIBCPP_ASSERT(__count_ > 0, "Iterator already at or past end.");
+    _LIBCUDACXX_ASSERT(__count_ > 0, "Iterator already at or past end.");
     ++__current_;
     --__count_;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   decltype(auto) operator++(int) {
-    _LIBCPP_ASSERT(__count_ > 0, "Iterator already at or past end.");
+    _LIBCUDACXX_ASSERT(__count_ > 0, "Iterator already at or past end.");
     --__count_;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try { return __current_++; }
     catch(...) { ++__count_; throw; }
 #else
     return __current_++;
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator operator++(int)
     requires forward_iterator<_Iter>
   {
-    _LIBCPP_ASSERT(__count_ > 0, "Iterator already at or past end.");
+    _LIBCUDACXX_ASSERT(__count_ > 0, "Iterator already at or past end.");
     counted_iterator __tmp = *this;
     ++*this;
     return __tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator& operator--()
     requires bidirectional_iterator<_Iter>
   {
@@ -164,7 +164,7 @@ class counted_iterator
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator operator--(int)
     requires bidirectional_iterator<_Iter>
   {
@@ -173,14 +173,14 @@ class counted_iterator
     return __tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator operator+(iter_
diff erence_t<_Iter> __n) const
     requires random_access_iterator<_Iter>
   {
     return counted_iterator(__current_ + __n, __count_ - __n);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr counted_iterator operator+(
     iter_
diff erence_t<_Iter> __n, const counted_iterator& __x)
     requires random_access_iterator<_Iter>
@@ -188,17 +188,17 @@ class counted_iterator
     return __x + __n;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator& operator+=(iter_
diff erence_t<_Iter> __n)
     requires random_access_iterator<_Iter>
   {
-    _LIBCPP_ASSERT(__n <= __count_, "Cannot advance iterator past end.");
+    _LIBCUDACXX_ASSERT(__n <= __count_, "Cannot advance iterator past end.");
     __current_ += __n;
     __count_ -= __n;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator operator-(iter_
diff erence_t<_Iter> __n) const
     requires random_access_iterator<_Iter>
   {
@@ -206,32 +206,32 @@ class counted_iterator
   }
 
   template<common_with<_Iter> _I2>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr iter_
diff erence_t<_I2> operator-(
     const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs)
   {
     return __rhs.__count_ - __lhs.__count_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr iter_
diff erence_t<_Iter> operator-(
     const counted_iterator& __lhs, default_sentinel_t)
   {
     return -__lhs.__count_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr iter_
diff erence_t<_Iter> operator-(
     default_sentinel_t, const counted_iterator& __rhs)
   {
     return __rhs.__count_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr counted_iterator& operator-=(iter_
diff erence_t<_Iter> __n)
     requires random_access_iterator<_Iter>
   {
-    _LIBCPP_ASSERT(-__n <= __count_, "Attempt to subtract too large of a size: "
+    _LIBCUDACXX_ASSERT(-__n <= __count_, "Attempt to subtract too large of a size: "
                                      "counted_iterator would be decremented before the "
                                      "first element of its range.");
     __current_ -= __n;
@@ -239,23 +239,23 @@ class counted_iterator
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr decltype(auto) operator[](iter_
diff erence_t<_Iter> __n) const
     requires random_access_iterator<_Iter>
   {
-    _LIBCPP_ASSERT(__n < __count_, "Subscript argument must be less than size.");
+    _LIBCUDACXX_ASSERT(__n < __count_, "Subscript argument must be less than size.");
     return __current_[__n];
   }
 
   template<common_with<_Iter> _I2>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(
     const counted_iterator& __lhs, const counted_iterator<_I2>& __rhs)
   {
     return __lhs.__count_ == __rhs.__count_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(
     const counted_iterator& __lhs, default_sentinel_t)
   {
@@ -269,21 +269,21 @@ class counted_iterator
     return __rhs.__count_ <=> __lhs.__count_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr iter_rvalue_reference_t<_Iter> iter_move(const counted_iterator& __i)
     noexcept(noexcept(ranges::iter_move(__i.__current_)))
       requires input_iterator<_Iter>
   {
-    _LIBCPP_ASSERT(__i.__count_ > 0, "Iterator must not be past end of range.");
+    _LIBCUDACXX_ASSERT(__i.__count_ > 0, "Iterator must not be past end of range.");
     return ranges::iter_move(__i.__current_);
   }
 
   template<indirectly_swappable<_Iter> _I2>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr void iter_swap(const counted_iterator& __x, const counted_iterator<_I2>& __y)
     noexcept(noexcept(ranges::iter_swap(__x.__current_, __y.__current_)))
   {
-    _LIBCPP_ASSERT(__x.__count_ > 0 && __y.__count_ > 0,
+    _LIBCUDACXX_ASSERT(__x.__count_ > 0 && __y.__count_ > 0,
                    "Iterators must not be past end of range.");
     return ranges::iter_swap(__x.__current_, __y.__current_);
   }
@@ -296,8 +296,8 @@ struct iterator_traits<counted_iterator<_Iter>> : iterator_traits<_Iter> {
                                 add_pointer_t<iter_reference_t<_Iter>>, void>;
 };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_COUNTED_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_COUNTED_ITERATOR_H

diff  --git a/libcxx/include/__iterator/data.h b/libcxx/include/__iterator/data.h
index 88eb752b642e..62a57ffbe087 100644
--- a/libcxx/include/__iterator/data.h
+++ b/libcxx/include/__iterator/data.h
@@ -7,45 +7,45 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_DATA_H
-#define _LIBCPP___ITERATOR_DATA_H
+#ifndef _LIBCUDACXX___ITERATOR_DATA_H
+#define _LIBCUDACXX___ITERATOR_DATA_H
 
 #include <__config>
 #include <cstddef>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _Cont> constexpr
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 auto data(_Cont& __c)
 _NOEXCEPT_(noexcept(__c.data()))
 -> decltype        (__c.data())
 { return            __c.data(); }
 
 template <class _Cont> constexpr
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 auto data(const _Cont& __c)
 _NOEXCEPT_(noexcept(__c.data()))
 -> decltype        (__c.data())
 { return            __c.data(); }
 
 template <class _Tp, size_t _Sz>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 constexpr _Tp* data(_Tp (&__array)[_Sz]) noexcept { return __array; }
 
 template <class _Ep>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 constexpr const _Ep* data(initializer_list<_Ep> __il) noexcept { return __il.begin(); }
 
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_DATA_H
+#endif // _LIBCUDACXX___ITERATOR_DATA_H

diff  --git a/libcxx/include/__iterator/default_sentinel.h b/libcxx/include/__iterator/default_sentinel.h
index 669032aa9729..951847ec693c 100644
--- a/libcxx/include/__iterator/default_sentinel.h
+++ b/libcxx/include/__iterator/default_sentinel.h
@@ -7,24 +7,24 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_DEFAULT_SENTINEL_H
-#define _LIBCPP___ITERATOR_DEFAULT_SENTINEL_H
+#ifndef _LIBCUDACXX___ITERATOR_DEFAULT_SENTINEL_H
+#define _LIBCUDACXX___ITERATOR_DEFAULT_SENTINEL_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 struct default_sentinel_t { };
 inline constexpr default_sentinel_t default_sentinel{};
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_DEFAULT_SENTINEL_H
+#endif // _LIBCUDACXX___ITERATOR_DEFAULT_SENTINEL_H

diff  --git a/libcxx/include/__iterator/distance.h b/libcxx/include/__iterator/distance.h
index 8819078958d3..7337bc758414 100644
--- a/libcxx/include/__iterator/distance.h
+++ b/libcxx/include/__iterator/distance.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_DISTANCE_H
-#define _LIBCPP___ITERATOR_DISTANCE_H
+#ifndef _LIBCUDACXX___ITERATOR_DISTANCE_H
+#define _LIBCUDACXX___ITERATOR_DISTANCE_H
 
 #include <__config>
 #include <__iterator/concepts.h>
@@ -19,14 +19,14 @@
 #include <__ranges/size.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 typename iterator_traits<_InputIter>::
diff erence_type
 __distance(_InputIter __first, _InputIter __last, input_iterator_tag)
 {
@@ -37,7 +37,7 @@ __distance(_InputIter __first, _InputIter __last, input_iterator_tag)
 }
 
 template <class _RandIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 typename iterator_traits<_RandIter>::
diff erence_type
 __distance(_RandIter __first, _RandIter __last, random_access_iterator_tag)
 {
@@ -45,14 +45,14 @@ __distance(_RandIter __first, _RandIter __last, random_access_iterator_tag)
 }
 
 template <class _InputIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 typename iterator_traits<_InputIter>::
diff erence_type
 distance(_InputIter __first, _InputIter __last)
 {
-    return _VSTD::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
+    return _CUDA_VSTD::__distance(__first, __last, typename iterator_traits<_InputIter>::iterator_category());
 }
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 // [range.iter.op.distance]
 
@@ -62,7 +62,7 @@ namespace __distance {
 struct __fn {
   template<class _Ip, sentinel_for<_Ip> _Sp>
     requires (!sized_sentinel_for<_Sp, _Ip>)
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr iter_
diff erence_t<_Ip> operator()(_Ip __first, _Sp __last) const {
     iter_
diff erence_t<_Ip> __n = 0;
     while (__first != __last) {
@@ -73,7 +73,7 @@ struct __fn {
   }
 
   template<class _Ip, sized_sentinel_for<decay_t<_Ip>> _Sp>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr iter_
diff erence_t<_Ip> operator()(_Ip&& __first, _Sp __last) const {
     if constexpr (sized_sentinel_for<_Sp, __uncvref_t<_Ip>>) {
       return __last - __first;
@@ -83,7 +83,7 @@ struct __fn {
   }
 
   template<range _Rp>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr range_
diff erence_t<_Rp> operator()(_Rp&& __r) const {
     if constexpr (sized_range<_Rp>) {
       return static_cast<range_
diff erence_t<_Rp>>(ranges::size(__r));
@@ -100,8 +100,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_DISTANCE_H
+#endif // _LIBCUDACXX___ITERATOR_DISTANCE_H

diff  --git a/libcxx/include/__iterator/empty.h b/libcxx/include/__iterator/empty.h
index 748ca9ecbd59..86ce9ba8562a 100644
--- a/libcxx/include/__iterator/empty.h
+++ b/libcxx/include/__iterator/empty.h
@@ -7,38 +7,38 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_EMPTY_H
-#define _LIBCPP___ITERATOR_EMPTY_H
+#ifndef _LIBCUDACXX___ITERATOR_EMPTY_H
+#define _LIBCUDACXX___ITERATOR_EMPTY_H
 
 #include <__config>
 #include <cstddef>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _Cont>
-_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
 constexpr auto empty(const _Cont& __c)
 _NOEXCEPT_(noexcept(__c.empty()))
 -> decltype        (__c.empty())
 { return            __c.empty(); }
 
 template <class _Tp, size_t _Sz>
-_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool empty(const _Tp (&)[_Sz]) noexcept { return false; }
 
 template <class _Ep>
-_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool empty(initializer_list<_Ep> __il) noexcept { return __il.size() == 0; }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_EMPTY_H
+#endif // _LIBCUDACXX___ITERATOR_EMPTY_H

diff  --git a/libcxx/include/__iterator/erase_if_container.h b/libcxx/include/__iterator/erase_if_container.h
index d7c71a947a2b..e414f52051d3 100644
--- a/libcxx/include/__iterator/erase_if_container.h
+++ b/libcxx/include/__iterator/erase_if_container.h
@@ -7,21 +7,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_ERASE_IF_CONTAINER_H
-#define _LIBCPP___ITERATOR_ERASE_IF_CONTAINER_H
+#ifndef _LIBCUDACXX___ITERATOR_ERASE_IF_CONTAINER_H
+#define _LIBCUDACXX___ITERATOR_ERASE_IF_CONTAINER_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Container, class _Predicate>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 typename _Container::size_type
-__libcpp_erase_if_container(_Container& __c, _Predicate& __pred) {
+__LIBCUDACXX_erase_if_container(_Container& __c, _Predicate& __pred) {
   typename _Container::size_type __old_size = __c.size();
 
   const typename _Container::iterator __last = __c.end();
@@ -35,6 +35,6 @@ __libcpp_erase_if_container(_Container& __c, _Predicate& __pred) {
   return __old_size - __c.size();
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_ERASE_IF_CONTAINER_H
+#endif // _LIBCUDACXX___ITERATOR_ERASE_IF_CONTAINER_H

diff  --git a/libcxx/include/__iterator/front_insert_iterator.h b/libcxx/include/__iterator/front_insert_iterator.h
index 9c8ec0028298..a3519d4380bc 100644
--- a/libcxx/include/__iterator/front_insert_iterator.h
+++ b/libcxx/include/__iterator/front_insert_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_FRONT_INSERT_ITERATOR_H
-#define _LIBCPP___ITERATOR_FRONT_INSERT_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_FRONT_INSERT_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_FRONT_INSERT_ITERATOR_H
 
 #include <__config>
 #include <__iterator/iterator.h>
@@ -17,26 +17,26 @@
 #include <__utility/move.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Container>
-class _LIBCPP_TEMPLATE_VIS front_insert_iterator
-#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
+class _LIBCUDACXX_TEMPLATE_VIS front_insert_iterator
+#if _LIBCUDACXX_STD_VER <= 14 || !defined(_LIBCUDACXX_ABI_NO_ITERATOR_BASES)
     : public iterator<output_iterator_tag, void, void, void, void>
 #endif
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 protected:
     _Container* container;
 public:
     typedef output_iterator_tag iterator_category;
     typedef void value_type;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     typedef ptr
diff _t 
diff erence_type;
 #else
     typedef void 
diff erence_type;
@@ -45,26 +45,26 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     typedef void reference;
     typedef _Container container_type;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit front_insert_iterator(_Container& __x) : container(_VSTD::addressof(__x)) {}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(const typename _Container::value_type& __value)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit front_insert_iterator(_Container& __x) : container(_CUDA_VSTD::addressof(__x)) {}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(const typename _Container::value_type& __value)
         {container->push_front(__value); return *this;}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(typename _Container::value_type&& __value)
-        {container->push_front(_VSTD::move(__value)); return *this;}
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator*()     {return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator++()    {return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 front_insert_iterator  operator++(int) {return *this;}
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator=(typename _Container::value_type&& __value)
+        {container->push_front(_CUDA_VSTD::move(__value)); return *this;}
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator*()     {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 front_insert_iterator& operator++()    {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 front_insert_iterator  operator++(int) {return *this;}
 };
 
 template <class _Container>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 front_insert_iterator<_Container>
 front_inserter(_Container& __x)
 {
     return front_insert_iterator<_Container>(__x);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_FRONT_INSERT_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_FRONT_INSERT_ITERATOR_H

diff  --git a/libcxx/include/__iterator/incrementable_traits.h b/libcxx/include/__iterator/incrementable_traits.h
index e6a5ed720f9f..f8a16c339c0a 100644
--- a/libcxx/include/__iterator/incrementable_traits.h
+++ b/libcxx/include/__iterator/incrementable_traits.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_INCREMENTABLE_TRAITS_H
-#define _LIBCPP___ITERATOR_INCREMENTABLE_TRAITS_H
+#ifndef _LIBCUDACXX___ITERATOR_INCREMENTABLE_TRAITS_H
+#define _LIBCUDACXX___ITERATOR_INCREMENTABLE_TRAITS_H
 
 #include <__config>
 #include <__type_traits/is_primary_template.h>
@@ -16,13 +16,13 @@
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [incrementable.traits]
 template<class> struct incrementable_traits {};
@@ -67,8 +67,8 @@ using iter_
diff erence_t = typename conditional_t<__is_primary_template<iterator_
                                                  incrementable_traits<remove_cvref_t<_Ip> >,
                                                  iterator_traits<remove_cvref_t<_Ip> > >::
diff erence_type;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_INCREMENTABLE_TRAITS_H
+#endif // _LIBCUDACXX___ITERATOR_INCREMENTABLE_TRAITS_H

diff  --git a/libcxx/include/__iterator/indirectly_comparable.h b/libcxx/include/__iterator/indirectly_comparable.h
index 868190fc48da..2315e108dce6 100644
--- a/libcxx/include/__iterator/indirectly_comparable.h
+++ b/libcxx/include/__iterator/indirectly_comparable.h
@@ -7,28 +7,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_INDIRECTLY_COMPARABLE_H
-#define _LIBCPP___ITERATOR_INDIRECTLY_COMPARABLE_H
+#ifndef _LIBCUDACXX___ITERATOR_INDIRECTLY_COMPARABLE_H
+#define _LIBCUDACXX___ITERATOR_INDIRECTLY_COMPARABLE_H
 
 #include <__config>
 #include <__functional/identity.h>
 #include <__iterator/concepts.h>
 #include <__iterator/projected.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _I1, class _I2, class _Rp, class _P1 = identity, class _P2 = identity>
 concept indirectly_comparable =
   indirect_binary_predicate<_Rp, projected<_I1, _P1>, projected<_I2, _P2>>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_INDIRECTLY_COMPARABLE_H
+#endif // _LIBCUDACXX___ITERATOR_INDIRECTLY_COMPARABLE_H

diff  --git a/libcxx/include/__iterator/insert_iterator.h b/libcxx/include/__iterator/insert_iterator.h
index b35d8bf16af9..0af5c8e4ccb0 100644
--- a/libcxx/include/__iterator/insert_iterator.h
+++ b/libcxx/include/__iterator/insert_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_INSERT_ITERATOR_H
-#define _LIBCPP___ITERATOR_INSERT_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_INSERT_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_INSERT_ITERATOR_H
 
 #include <__config>
 #include <__iterator/iterator.h>
@@ -18,13 +18,13 @@
 #include <__utility/move.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 template <class _Container>
 using __insert_iterator_iter_t = ranges::iterator_t<_Container>;
 #else
@@ -32,21 +32,21 @@ template <class _Container>
 using __insert_iterator_iter_t = typename _Container::iterator;
 #endif
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Container>
-class _LIBCPP_TEMPLATE_VIS insert_iterator
-#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
+class _LIBCUDACXX_TEMPLATE_VIS insert_iterator
+#if _LIBCUDACXX_STD_VER <= 14 || !defined(_LIBCUDACXX_ABI_NO_ITERATOR_BASES)
     : public iterator<output_iterator_tag, void, void, void, void>
 #endif
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 protected:
     _Container* container;
     __insert_iterator_iter_t<_Container> iter;
 public:
     typedef output_iterator_tag iterator_category;
     typedef void value_type;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     typedef ptr
diff _t 
diff erence_type;
 #else
     typedef void 
diff erence_type;
@@ -55,27 +55,27 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     typedef void reference;
     typedef _Container container_type;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
-        : container(_VSTD::addressof(__x)), iter(__i) {}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(const typename _Container::value_type& __value)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 insert_iterator(_Container& __x, __insert_iterator_iter_t<_Container> __i)
+        : container(_CUDA_VSTD::addressof(__x)), iter(__i) {}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(const typename _Container::value_type& __value)
         {iter = container->insert(iter, __value); ++iter; return *this;}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(typename _Container::value_type&& __value)
-        {iter = container->insert(iter, _VSTD::move(__value)); ++iter; return *this;}
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator*()        {return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator++()       {return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 insert_iterator& operator++(int)    {return *this;}
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 insert_iterator& operator=(typename _Container::value_type&& __value)
+        {iter = container->insert(iter, _CUDA_VSTD::move(__value)); ++iter; return *this;}
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 insert_iterator& operator*()        {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 insert_iterator& operator++()       {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 insert_iterator& operator++(int)    {return *this;}
 };
 
 template <class _Container>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 insert_iterator<_Container>
 inserter(_Container& __x, __insert_iterator_iter_t<_Container> __i)
 {
     return insert_iterator<_Container>(__x, __i);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_INSERT_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_INSERT_ITERATOR_H

diff  --git a/libcxx/include/__iterator/istream_iterator.h b/libcxx/include/__iterator/istream_iterator.h
index a056961c10a8..5dd94a3b00ba 100644
--- a/libcxx/include/__iterator/istream_iterator.h
+++ b/libcxx/include/__iterator/istream_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_ISTREAM_ITERATOR_H
-#define _LIBCPP___ITERATOR_ISTREAM_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_ISTREAM_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_ISTREAM_ITERATOR_H
 
 #include <__config>
 #include <__iterator/default_sentinel.h>
@@ -18,21 +18,21 @@
 #include <cstddef>
 #include <iosfwd> // for forward declarations of char_traits and basic_istream
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Tp, class _CharT = char,
           class _Traits = char_traits<_CharT>, class _Distance = ptr
diff _t>
-class _LIBCPP_TEMPLATE_VIS istream_iterator
-#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
+class _LIBCUDACXX_TEMPLATE_VIS istream_iterator
+#if _LIBCUDACXX_STD_VER <= 14 || !defined(_LIBCUDACXX_ABI_NO_ITERATOR_BASES)
     : public iterator<input_iterator_tag, _Tp, _Distance, const _Tp*, const _Tp&>
 #endif
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 public:
     typedef input_iterator_tag iterator_category;
     typedef _Tp value_type;
@@ -46,42 +46,42 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     istream_type* __in_stream_;
     _Tp __value_;
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istream_iterator() : __in_stream_(nullptr), __value_() {}
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_HIDE_FROM_ABI constexpr istream_iterator(default_sentinel_t) : istream_iterator() {}
-#endif // _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY istream_iterator(istream_type& __s) : __in_stream_(_VSTD::addressof(__s))
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR istream_iterator() : __in_stream_(nullptr), __value_() {}
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr istream_iterator(default_sentinel_t) : istream_iterator() {}
+#endif // _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY istream_iterator(istream_type& __s) : __in_stream_(_CUDA_VSTD::addressof(__s))
         {
             if (!(*__in_stream_ >> __value_))
                 __in_stream_ = nullptr;
         }
 
-    _LIBCPP_INLINE_VISIBILITY const _Tp& operator*() const {return __value_;}
-    _LIBCPP_INLINE_VISIBILITY const _Tp* operator->() const {return _VSTD::addressof((operator*()));}
-    _LIBCPP_INLINE_VISIBILITY istream_iterator& operator++()
+    _LIBCUDACXX_INLINE_VISIBILITY const _Tp& operator*() const {return __value_;}
+    _LIBCUDACXX_INLINE_VISIBILITY const _Tp* operator->() const {return _CUDA_VSTD::addressof((operator*()));}
+    _LIBCUDACXX_INLINE_VISIBILITY istream_iterator& operator++()
         {
             if (!(*__in_stream_ >> __value_))
                 __in_stream_ = nullptr;
             return *this;
         }
-    _LIBCPP_INLINE_VISIBILITY istream_iterator  operator++(int)
+    _LIBCUDACXX_INLINE_VISIBILITY istream_iterator  operator++(int)
         {istream_iterator __t(*this); ++(*this); return __t;}
 
     template <class _Up, class _CharU, class _TraitsU, class _DistanceU>
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool
     operator==(const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __x,
                const istream_iterator<_Up, _CharU, _TraitsU, _DistanceU>& __y);
 
-#if _LIBCPP_STD_VER > 17
-    friend _LIBCPP_HIDE_FROM_ABI bool operator==(const istream_iterator& __i, default_sentinel_t) {
+#if _LIBCUDACXX_STD_VER > 17
+    friend _LIBCUDACXX_HIDE_FROM_ABI bool operator==(const istream_iterator& __i, default_sentinel_t) {
       return __i.__in_stream_ == nullptr;
     }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 };
 
 template <class _Tp, class _CharT, class _Traits, class _Distance>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
            const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __y)
@@ -89,17 +89,17 @@ operator==(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
     return __x.__in_stream_ == __y.__in_stream_;
 }
 
-#if _LIBCPP_STD_VER <= 17
+#if _LIBCUDACXX_STD_VER <= 17
 template <class _Tp, class _CharT, class _Traits, class _Distance>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __x,
            const istream_iterator<_Tp, _CharT, _Traits, _Distance>& __y)
 {
     return !(__x == __y);
 }
-#endif // _LIBCPP_STD_VER <= 17
+#endif // _LIBCUDACXX_STD_VER <= 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_ISTREAM_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_ISTREAM_ITERATOR_H

diff  --git a/libcxx/include/__iterator/istreambuf_iterator.h b/libcxx/include/__iterator/istreambuf_iterator.h
index bc53a6a1c80e..d26eb1d2c972 100644
--- a/libcxx/include/__iterator/istreambuf_iterator.h
+++ b/libcxx/include/__iterator/istreambuf_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_ISTREAMBUF_ITERATOR_H
-#define _LIBCPP___ITERATOR_ISTREAMBUF_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_ISTREAMBUF_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_ISTREAMBUF_ITERATOR_H
 
 #include <__config>
 #include <__iterator/default_sentinel.h>
@@ -16,22 +16,22 @@
 #include <__iterator/iterator_traits.h>
 #include <iosfwd> // for forward declaration of basic_streambuf
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template<class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS istreambuf_iterator
-#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
+class _LIBCUDACXX_TEMPLATE_VIS istreambuf_iterator
+#if _LIBCUDACXX_STD_VER <= 14 || !defined(_LIBCUDACXX_ABI_NO_ITERATOR_BASES)
     : public iterator<input_iterator_tag, _CharT,
                       typename _Traits::off_type, _CharT*,
                       _CharT>
 #endif
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 public:
     typedef input_iterator_tag              iterator_category;
     typedef _CharT                          value_type;
@@ -50,15 +50,15 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     {
         char_type __keep_;
         streambuf_type* __sbuf_;
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit __proxy(char_type __c, streambuf_type* __s)
             : __keep_(__c), __sbuf_(__s) {}
         friend class istreambuf_iterator;
     public:
-        _LIBCPP_INLINE_VISIBILITY char_type operator*() const {return __keep_;}
+        _LIBCUDACXX_INLINE_VISIBILITY char_type operator*() const {return __keep_;}
     };
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool __test_for_eof() const
     {
         if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sgetc(), traits_type::eof()))
@@ -66,54 +66,54 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
         return __sbuf_ == nullptr;
     }
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(nullptr) {}
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY constexpr istreambuf_iterator(default_sentinel_t) noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR istreambuf_iterator() _NOEXCEPT : __sbuf_(nullptr) {}
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr istreambuf_iterator(default_sentinel_t) noexcept
         : istreambuf_iterator() {}
-#endif // _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT
+#endif // _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY istreambuf_iterator(istream_type& __s) _NOEXCEPT
         : __sbuf_(__s.rdbuf()) {}
-    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY istreambuf_iterator(streambuf_type* __s) _NOEXCEPT
         : __sbuf_(__s) {}
-    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator(const __proxy& __p) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY istreambuf_iterator(const __proxy& __p) _NOEXCEPT
         : __sbuf_(__p.__sbuf_) {}
 
-    _LIBCPP_INLINE_VISIBILITY char_type  operator*() const
+    _LIBCUDACXX_INLINE_VISIBILITY char_type  operator*() const
         {return static_cast<char_type>(__sbuf_->sgetc());}
-    _LIBCPP_INLINE_VISIBILITY istreambuf_iterator& operator++()
+    _LIBCUDACXX_INLINE_VISIBILITY istreambuf_iterator& operator++()
         {
             __sbuf_->sbumpc();
             return *this;
         }
-    _LIBCPP_INLINE_VISIBILITY __proxy              operator++(int)
+    _LIBCUDACXX_INLINE_VISIBILITY __proxy              operator++(int)
         {
             return __proxy(__sbuf_->sbumpc(), __sbuf_);
         }
 
-    _LIBCPP_INLINE_VISIBILITY bool equal(const istreambuf_iterator& __b) const
+    _LIBCUDACXX_INLINE_VISIBILITY bool equal(const istreambuf_iterator& __b) const
         {return __test_for_eof() == __b.__test_for_eof();}
 
-#if _LIBCPP_STD_VER > 17
-    friend _LIBCPP_HIDE_FROM_ABI bool operator==(const istreambuf_iterator& __i, default_sentinel_t) {
+#if _LIBCUDACXX_STD_VER > 17
+    friend _LIBCUDACXX_HIDE_FROM_ABI bool operator==(const istreambuf_iterator& __i, default_sentinel_t) {
       return __i.__test_for_eof();
     }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 };
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator==(const istreambuf_iterator<_CharT,_Traits>& __a,
                 const istreambuf_iterator<_CharT,_Traits>& __b)
                 {return __a.equal(__b);}
 
-#if _LIBCPP_STD_VER <= 17
+#if _LIBCUDACXX_STD_VER <= 17
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator!=(const istreambuf_iterator<_CharT,_Traits>& __a,
                 const istreambuf_iterator<_CharT,_Traits>& __b)
                 {return !__a.equal(__b);}
-#endif // _LIBCPP_STD_VER <= 17
+#endif // _LIBCUDACXX_STD_VER <= 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_ISTREAMBUF_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_ISTREAMBUF_ITERATOR_H

diff  --git a/libcxx/include/__iterator/iter_move.h b/libcxx/include/__iterator/iter_move.h
index d8240ab9c2f1..9854307b91fd 100644
--- a/libcxx/include/__iterator/iter_move.h
+++ b/libcxx/include/__iterator/iter_move.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_ITER_MOVE_H
-#define _LIBCPP___ITERATOR_ITER_MOVE_H
+#ifndef _LIBCUDACXX___ITERATOR_ITER_MOVE_H
+#define _LIBCUDACXX___ITERATOR_ITER_MOVE_H
 
 #include <__concepts/class_or_enum.h>
 #include <__config>
@@ -17,13 +17,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [iterator.cust.move]
 
@@ -61,7 +61,7 @@ concept __just_deref =
 struct __fn {
   template<class _Ip>
     requires __unqualified_iter_move<_Ip>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr decltype(auto) operator()(_Ip&& __i) const
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr decltype(auto) operator()(_Ip&& __i) const
     noexcept(noexcept(iter_move(std::forward<_Ip>(__i))))
   {
     return iter_move(std::forward<_Ip>(__i));
@@ -69,14 +69,14 @@ struct __fn {
 
   template<class _Ip>
     requires __move_deref<_Ip>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ip&& __i) const
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Ip&& __i) const
     noexcept(noexcept(std::move(*std::forward<_Ip>(__i))))
     -> decltype(      std::move(*std::forward<_Ip>(__i)))
     { return          std::move(*std::forward<_Ip>(__i)); }
 
   template<class _Ip>
     requires __just_deref<_Ip>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ip&& __i) const
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Ip&& __i) const
     noexcept(noexcept(*std::forward<_Ip>(__i)))
     -> decltype(      *std::forward<_Ip>(__i))
     { return          *std::forward<_Ip>(__i); }
@@ -92,8 +92,8 @@ template<__dereferenceable _Tp>
   requires requires(_Tp& __t) { { ranges::iter_move(__t) } -> __can_reference; }
 using iter_rvalue_reference_t = decltype(ranges::iter_move(declval<_Tp&>()));
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_ITER_MOVE_H
+#endif // _LIBCUDACXX___ITERATOR_ITER_MOVE_H

diff  --git a/libcxx/include/__iterator/iter_swap.h b/libcxx/include/__iterator/iter_swap.h
index 9e06464c3690..987c4aa059e0 100644
--- a/libcxx/include/__iterator/iter_swap.h
+++ b/libcxx/include/__iterator/iter_swap.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ITERATOR_ITER_SWAP_H
-#define _LIBCPP___ITERATOR_ITER_SWAP_H
+#ifndef _LIBCUDACXX___ITERATOR_ITER_SWAP_H
+#define _LIBCUDACXX___ITERATOR_ITER_SWAP_H
 
 #include <__config>
 #include <__iterator/concepts.h>
@@ -19,13 +19,13 @@
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [iter.cust.swap]
 
@@ -38,7 +38,7 @@ namespace __iter_swap {
   concept __unqualified_iter_swap =
     (__class_or_enum<remove_cvref_t<_T1>> || __class_or_enum<remove_cvref_t<_T2>>) &&
     requires (_T1&& __x, _T2&& __y) {
-      iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y));
+      iter_swap(_CUDA_VSTD::forward<_T1>(__x), _CUDA_VSTD::forward<_T2>(__y));
     };
 
   template<class _T1, class _T2>
@@ -49,21 +49,21 @@ namespace __iter_swap {
   struct __fn {
     template <class _T1, class _T2>
       requires __unqualified_iter_swap<_T1, _T2>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void operator()(_T1&& __x, _T2&& __y) const
-      noexcept(noexcept(iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y))))
+      noexcept(noexcept(iter_swap(_CUDA_VSTD::forward<_T1>(__x), _CUDA_VSTD::forward<_T2>(__y))))
     {
-      (void)iter_swap(_VSTD::forward<_T1>(__x), _VSTD::forward<_T2>(__y));
+      (void)iter_swap(_CUDA_VSTD::forward<_T1>(__x), _CUDA_VSTD::forward<_T2>(__y));
     }
 
     template <class _T1, class _T2>
       requires (!__unqualified_iter_swap<_T1, _T2>) &&
                __readable_swappable<_T1, _T2>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void operator()(_T1&& __x, _T2&& __y) const
-      noexcept(noexcept(ranges::swap(*_VSTD::forward<_T1>(__x), *_VSTD::forward<_T2>(__y))))
+      noexcept(noexcept(ranges::swap(*_CUDA_VSTD::forward<_T1>(__x), *_CUDA_VSTD::forward<_T2>(__y))))
     {
-      ranges::swap(*_VSTD::forward<_T1>(__x), *_VSTD::forward<_T2>(__y));
+      ranges::swap(*_CUDA_VSTD::forward<_T1>(__x), *_CUDA_VSTD::forward<_T2>(__y));
     }
 
     template <class _T1, class _T2>
@@ -71,15 +71,15 @@ namespace __iter_swap {
                 !__readable_swappable<_T1, _T2>) &&
                indirectly_movable_storable<_T1, _T2> &&
                indirectly_movable_storable<_T2, _T1>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void operator()(_T1&& __x, _T2&& __y) const
       noexcept(noexcept(iter_value_t<_T2>(ranges::iter_move(__y))) &&
                noexcept(*__y = ranges::iter_move(__x)) &&
-               noexcept(*_VSTD::forward<_T1>(__x) = declval<iter_value_t<_T2>>()))
+               noexcept(*_CUDA_VSTD::forward<_T1>(__x) = declval<iter_value_t<_T2>>()))
     {
       iter_value_t<_T2> __old(ranges::iter_move(__y));
       *__y = ranges::iter_move(__x);
-      *_VSTD::forward<_T1>(__x) = _VSTD::move(__old);
+      *_CUDA_VSTD::forward<_T1>(__x) = _CUDA_VSTD::move(__old);
     }
   };
 } // namespace __iter_swap
@@ -99,8 +99,8 @@ concept indirectly_swappable =
     ranges::iter_swap(__i2, __i1);
   };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_ITER_SWAP_H
+#endif // _LIBCUDACXX___ITERATOR_ITER_SWAP_H

diff  --git a/libcxx/include/__iterator/iterator.h b/libcxx/include/__iterator/iterator.h
index b417eeab79bf..cbb38b7cfdc6 100644
--- a/libcxx/include/__iterator/iterator.h
+++ b/libcxx/include/__iterator/iterator.h
@@ -7,21 +7,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_ITERATOR_H
-#define _LIBCPP___ITERATOR_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_ITERATOR_H
 
 #include <__config>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _Category, class _Tp, class _Distance = ptr
diff _t,
          class _Pointer = _Tp*, class _Reference = _Tp&>
-struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator
+struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 iterator
 {
     typedef _Tp        value_type;
     typedef _Distance  
diff erence_type;
@@ -30,6 +30,6 @@ struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator
     typedef _Category  iterator_category;
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_ITERATOR_H

diff  --git a/libcxx/include/__iterator/iterator_traits.h b/libcxx/include/__iterator/iterator_traits.h
index 0cc64adc0de9..04eb0e7a0b7f 100644
--- a/libcxx/include/__iterator/iterator_traits.h
+++ b/libcxx/include/__iterator/iterator_traits.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_ITERATOR_TRAITS_H
-#define _LIBCPP___ITERATOR_ITERATOR_TRAITS_H
+#ifndef _LIBCUDACXX___ITERATOR_ITERATOR_TRAITS_H
+#define _LIBCUDACXX___ITERATOR_ITERATOR_TRAITS_H
 
 #include <__config>
 #include <__iterator/incrementable_traits.h>
@@ -17,13 +17,13 @@
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _Tp>
 using __with_reference = _Tp&;
@@ -42,18 +42,18 @@ concept __dereferenceable = requires(_Tp& __t) {
 template<__dereferenceable _Tp>
 using iter_reference_t = decltype(*declval<_Tp&>());
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 template <class _Iter>
-struct _LIBCPP_TEMPLATE_VIS iterator_traits;
-
-struct _LIBCPP_TEMPLATE_VIS input_iterator_tag {};
-struct _LIBCPP_TEMPLATE_VIS output_iterator_tag {};
-struct _LIBCPP_TEMPLATE_VIS forward_iterator_tag       : public input_iterator_tag {};
-struct _LIBCPP_TEMPLATE_VIS bidirectional_iterator_tag : public forward_iterator_tag {};
-struct _LIBCPP_TEMPLATE_VIS random_access_iterator_tag : public bidirectional_iterator_tag {};
-#if _LIBCPP_STD_VER > 17
-struct _LIBCPP_TEMPLATE_VIS contiguous_iterator_tag    : public random_access_iterator_tag {};
+struct _LIBCUDACXX_TEMPLATE_VIS iterator_traits;
+
+struct _LIBCUDACXX_TEMPLATE_VIS input_iterator_tag {};
+struct _LIBCUDACXX_TEMPLATE_VIS output_iterator_tag {};
+struct _LIBCUDACXX_TEMPLATE_VIS forward_iterator_tag       : public input_iterator_tag {};
+struct _LIBCUDACXX_TEMPLATE_VIS bidirectional_iterator_tag : public forward_iterator_tag {};
+struct _LIBCUDACXX_TEMPLATE_VIS random_access_iterator_tag : public bidirectional_iterator_tag {};
+#if _LIBCUDACXX_STD_VER > 17
+struct _LIBCUDACXX_TEMPLATE_VIS contiguous_iterator_tag    : public random_access_iterator_tag {};
 #endif
 
 template <class _Iter>
@@ -137,7 +137,7 @@ struct __has_iterator_concept
     static const bool value = decltype(__test<_Tp>(nullptr))::value;
 };
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // The `cpp17-*-iterator` exposition-only concepts have very similar names to the `Cpp17*Iterator` named requirements
 // from `[iterator.cpp17]`. To avoid confusion between the two, the exposition-only concepts have been banished to
@@ -361,7 +361,7 @@ struct iterator_traits : __iterator_traits<_Ip> {
   using __primary_template = iterator_traits;
 };
 
-#else // _LIBCPP_STD_VER > 17
+#else // _LIBCUDACXX_STD_VER > 17
 
 template <class _Iter, bool> struct __iterator_traits {};
 
@@ -393,25 +393,25 @@ struct __iterator_traits<_Iter, true>
 //    the client expects instead of failing at compile time.
 
 template <class _Iter>
-struct _LIBCPP_TEMPLATE_VIS iterator_traits
+struct _LIBCUDACXX_TEMPLATE_VIS iterator_traits
     : __iterator_traits<_Iter, __has_iterator_typedefs<_Iter>::value> {
 
   using __primary_template = iterator_traits;
 };
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 template<class _Tp>
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 requires is_object_v<_Tp>
 #endif
-struct _LIBCPP_TEMPLATE_VIS iterator_traits<_Tp*>
+struct _LIBCUDACXX_TEMPLATE_VIS iterator_traits<_Tp*>
 {
     typedef ptr
diff _t 
diff erence_type;
     typedef typename remove_cv<_Tp>::type value_type;
     typedef _Tp* pointer;
     typedef _Tp& reference;
     typedef random_access_iterator_tag iterator_category;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     typedef contiguous_iterator_tag    iterator_concept;
 #endif
 };
@@ -451,7 +451,7 @@ struct __is_cpp17_random_access_iterator : public __has_iterator_category_conver
 // Such iterators receive special "contiguous" optimizations in
 // std::copy and std::sort.
 //
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Tp>
 struct __is_cpp17_contiguous_iterator : _Or<
     __has_iterator_category_convertible_to<_Tp, contiguous_iterator_tag>,
@@ -514,6 +514,6 @@ using __iter_
diff _t = typename iterator_traits<_Iter>::
diff erence_type;
 template<class _InputIterator>
 using __iter_value_type = typename iterator_traits<_InputIterator>::value_type;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_ITERATOR_TRAITS_H
+#endif // _LIBCUDACXX___ITERATOR_ITERATOR_TRAITS_H

diff  --git a/libcxx/include/__iterator/mergeable.h b/libcxx/include/__iterator/mergeable.h
index b9f2d081dc7e..70b39ca96422 100644
--- a/libcxx/include/__iterator/mergeable.h
+++ b/libcxx/include/__iterator/mergeable.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_MERGEABLE_H
-#define _LIBCPP___ITERATOR_MERGEABLE_H
+#ifndef _LIBCUDACXX___ITERATOR_MERGEABLE_H
+#define _LIBCUDACXX___ITERATOR_MERGEABLE_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -16,13 +16,13 @@
 #include <__iterator/concepts.h>
 #include <__iterator/projected.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _Input1, class _Input2, class _Output,
           class _Comp = ranges::less, class _Proj1 = identity, class _Proj2 = identity>
@@ -34,8 +34,8 @@ concept mergeable =
     indirectly_copyable<_Input2, _Output> &&
     indirect_strict_weak_order<_Comp, projected<_Input1, _Proj1>, projected<_Input2, _Proj2>>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_MERGEABLE_H
+#endif // _LIBCUDACXX___ITERATOR_MERGEABLE_H

diff  --git a/libcxx/include/__iterator/move_iterator.h b/libcxx/include/__iterator/move_iterator.h
index 6be9f216dbb4..24e5b122ac53 100644
--- a/libcxx/include/__iterator/move_iterator.h
+++ b/libcxx/include/__iterator/move_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_MOVE_ITERATOR_H
-#define _LIBCPP___ITERATOR_MOVE_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_MOVE_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_MOVE_ITERATOR_H
 
 #include <__compare/compare_three_way_result.h>
 #include <__compare/three_way_comparable.h>
@@ -27,13 +27,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template<class _Iter, class = void>
 struct __move_iter_category_base {};
 
@@ -51,16 +51,16 @@ template<class _Iter, class _Sent>
 concept __move_iter_comparable = requires {
     { declval<const _Iter&>() == declval<_Sent>() } -> convertible_to<bool>;
 };
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 template <class _Iter>
-class _LIBCPP_TEMPLATE_VIS move_iterator
-#if _LIBCPP_STD_VER > 17
+class _LIBCUDACXX_TEMPLATE_VIS move_iterator
+#if _LIBCUDACXX_STD_VER > 17
     : public __move_iter_category_base<_Iter>
 #endif
 {
 public:
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     using iterator_type = _Iter;
     using iterator_concept = input_iterator_tag;
     // iterator_category is inherited and not always present
@@ -85,61 +85,61 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
             typename remove_reference<__reference>::type&&,
             __reference
         >::type reference;
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     explicit move_iterator(_Iter __i) : __current_(std::move(__i)) {}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     move_iterator& operator++() { ++__current_; return *this; }
 
-    _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_DEPRECATED_IN_CXX20 _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     pointer operator->() const { return __current_; }
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_HIDE_FROM_ABI constexpr
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     move_iterator() requires is_constructible_v<_Iter> : __current_() {}
 
     template <class _Up>
         requires (!_IsSame<_Up, _Iter>::value) && convertible_to<const _Up&, _Iter>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     move_iterator(const move_iterator<_Up>& __u) : __current_(__u.base()) {}
 
     template <class _Up>
         requires (!_IsSame<_Up, _Iter>::value) &&
                  convertible_to<const _Up&, _Iter> &&
                  assignable_from<_Iter&, const _Up&>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     move_iterator& operator=(const move_iterator<_Up>& __u) {
         __current_ = __u.base();
         return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr const _Iter& base() const & noexcept { return __current_; }
-    _LIBCPP_HIDE_FROM_ABI constexpr _Iter base() && { return std::move(__current_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr const _Iter& base() const & noexcept { return __current_; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _Iter base() && { return std::move(__current_); }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     reference operator*() const { return ranges::iter_move(__current_); }
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     reference operator[](
diff erence_type __n) const { return ranges::iter_move(__current_ + __n); }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     auto operator++(int)
         requires forward_iterator<_Iter>
     {
         move_iterator __tmp(*this); ++__current_; return __tmp;
     }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     void operator++(int) { ++__current_; }
 #else
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     move_iterator() : __current_() {}
 
     template <class _Up, class = __enable_if_t<
         !is_same<_Up, _Iter>::value && is_convertible<const _Up&, _Iter>::value
     > >
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     move_iterator(const move_iterator<_Up>& __u) : __current_(__u.base()) {}
 
     template <class _Up, class = __enable_if_t<
@@ -147,40 +147,40 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
         is_convertible<const _Up&, _Iter>::value &&
         is_assignable<_Iter&, const _Up&>::value
     > >
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     move_iterator& operator=(const move_iterator<_Up>& __u) {
         __current_ = __u.base();
         return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     _Iter base() const { return __current_; }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reference operator*() const { return static_cast<reference>(*__current_); }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reference operator[](
diff erence_type __n) const { return static_cast<reference>(__current_[__n]); }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     move_iterator operator++(int) { move_iterator __tmp(*this); ++__current_; return __tmp; }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     move_iterator& operator--() { --__current_; return *this; }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     move_iterator operator--(int) { move_iterator __tmp(*this); --__current_; return __tmp; }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     move_iterator operator+(
diff erence_type __n) const { return move_iterator(__current_ + __n); }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     move_iterator& operator+=(
diff erence_type __n) { __current_ += __n; return *this; }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     move_iterator operator-(
diff erence_type __n) const { return move_iterator(__current_ - __n); }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     move_iterator& operator-=(
diff erence_type __n) { __current_ -= __n; return *this; }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template<sentinel_for<_Iter> _Sent>
-    friend _LIBCPP_HIDE_FROM_ABI constexpr
+    friend _LIBCUDACXX_HIDE_FROM_ABI constexpr
     bool operator==(const move_iterator& __x, const move_sentinel<_Sent>& __y)
         requires __move_iter_comparable<_Iter, _Sent>
     {
@@ -188,20 +188,20 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
     }
 
     template<sized_sentinel_for<_Iter> _Sent>
-    friend _LIBCPP_HIDE_FROM_ABI constexpr
+    friend _LIBCUDACXX_HIDE_FROM_ABI constexpr
     iter_
diff erence_t<_Iter> operator-(const move_sentinel<_Sent>& __x, const move_iterator& __y)
     {
         return __x.base() - __y.base();
     }
 
     template<sized_sentinel_for<_Iter> _Sent>
-    friend _LIBCPP_HIDE_FROM_ABI constexpr
+    friend _LIBCUDACXX_HIDE_FROM_ABI constexpr
     iter_
diff erence_t<_Iter> operator-(const move_iterator& __x, const move_sentinel<_Sent>& __y)
     {
         return __x.base() - __y.base();
     }
 
-    friend _LIBCPP_HIDE_FROM_ABI constexpr
+    friend _LIBCUDACXX_HIDE_FROM_ABI constexpr
     iter_rvalue_reference_t<_Iter> iter_move(const move_iterator& __i)
         noexcept(noexcept(ranges::iter_move(__i.__current_)))
     {
@@ -209,13 +209,13 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
     }
 
     template<indirectly_swappable<_Iter> _It2>
-    friend _LIBCPP_HIDE_FROM_ABI constexpr
+    friend _LIBCUDACXX_HIDE_FROM_ABI constexpr
     void iter_swap(const move_iterator& __x, const move_iterator<_It2>& __y)
         noexcept(noexcept(ranges::iter_swap(__x.__current_, __y.__current_)))
     {
         return ranges::iter_swap(__x.__current_, __y.__current_);
     }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 private:
     template<class _It2> friend class move_iterator;
@@ -224,62 +224,62 @@ class _LIBCPP_TEMPLATE_VIS move_iterator
 };
 
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool operator==(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
 {
     return __x.base() == __y.base();
 }
 
-#if _LIBCPP_STD_VER <= 17
+#if _LIBCUDACXX_STD_VER <= 17
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool operator!=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
 {
     return __x.base() != __y.base();
 }
-#endif // _LIBCPP_STD_VER <= 17
+#endif // _LIBCUDACXX_STD_VER <= 17
 
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool operator<(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
 {
     return __x.base() < __y.base();
 }
 
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool operator>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
 {
     return __x.base() > __y.base();
 }
 
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool operator<=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
 {
     return __x.base() <= __y.base();
 }
 
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool operator>=(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
 {
     return __x.base() >= __y.base();
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Iter1, three_way_comparable_with<_Iter1> _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI constexpr
+inline _LIBCUDACXX_HIDE_FROM_ABI constexpr
 auto operator<=>(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
     -> compare_three_way_result_t<_Iter1, _Iter2>
 {
     return __x.base() <=> __y.base();
 }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 auto operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
     -> decltype(__x.base() - __y.base())
 {
@@ -287,17 +287,17 @@ auto operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __
 }
 #else
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 typename move_iterator<_Iter1>::
diff erence_type
 operator-(const move_iterator<_Iter1>& __x, const move_iterator<_Iter2>& __y)
 {
     return __x.base() - __y.base();
 }
-#endif // !_LIBCPP_CXX03_LANG
+#endif // !_LIBCUDACXX_CXX03_LANG
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Iter>
-inline _LIBCPP_HIDE_FROM_ABI constexpr
+inline _LIBCUDACXX_HIDE_FROM_ABI constexpr
 move_iterator<_Iter> operator+(iter_
diff erence_t<_Iter> __n, const move_iterator<_Iter>& __x)
     requires requires { { __x.base() + __n } -> same_as<_Iter>; }
 {
@@ -305,22 +305,22 @@ move_iterator<_Iter> operator+(iter_
diff erence_t<_Iter> __n, const move_iterator
 }
 #else
 template <class _Iter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 move_iterator<_Iter>
 operator+(typename move_iterator<_Iter>::
diff erence_type __n, const move_iterator<_Iter>& __x)
 {
     return move_iterator<_Iter>(__x.base() + __n);
 }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 template <class _Iter>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 move_iterator<_Iter>
 make_move_iterator(_Iter __i)
 {
     return move_iterator<_Iter>(std::move(__i));
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_MOVE_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_MOVE_ITERATOR_H

diff  --git a/libcxx/include/__iterator/move_sentinel.h b/libcxx/include/__iterator/move_sentinel.h
index 5adf877b3490..55c82856fe5d 100644
--- a/libcxx/include/__iterator/move_sentinel.h
+++ b/libcxx/include/__iterator/move_sentinel.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_MOVE_SENTINEL_H
-#define _LIBCPP___ITERATOR_MOVE_SENTINEL_H
+#ifndef _LIBCUDACXX___ITERATOR_MOVE_SENTINEL_H
+#define _LIBCUDACXX___ITERATOR_MOVE_SENTINEL_H
 
 #include <__concepts/assignable.h>
 #include <__concepts/convertible_to.h>
@@ -15,32 +15,32 @@
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <semiregular _Sent>
-class _LIBCPP_TEMPLATE_VIS move_sentinel
+class _LIBCUDACXX_TEMPLATE_VIS move_sentinel
 {
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   move_sentinel() = default;
 
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   explicit move_sentinel(_Sent __s) : __last_(std::move(__s)) {}
 
   template <class _S2>
     requires convertible_to<const _S2&, _Sent>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   move_sentinel(const move_sentinel<_S2>& __s) : __last_(__s.base()) {}
 
   template <class _S2>
     requires assignable_from<_Sent&, const _S2&>
-  _LIBCPP_HIDE_FROM_ABI constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr
   move_sentinel& operator=(const move_sentinel<_S2>& __s)
     { __last_ = __s.base(); return *this; }
 
@@ -50,8 +50,8 @@ class _LIBCPP_TEMPLATE_VIS move_sentinel
     _Sent __last_ = _Sent();
 };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_MOVE_SENTINEL_H
+#endif // _LIBCUDACXX___ITERATOR_MOVE_SENTINEL_H

diff  --git a/libcxx/include/__iterator/next.h b/libcxx/include/__iterator/next.h
index 5363d6d58ecf..8dbb749905f3 100644
--- a/libcxx/include/__iterator/next.h
+++ b/libcxx/include/__iterator/next.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_NEXT_H
-#define _LIBCPP___ITERATOR_NEXT_H
+#ifndef _LIBCUDACXX___ITERATOR_NEXT_H
+#define _LIBCUDACXX___ITERATOR_NEXT_H
 
 #include <__assert>
 #include <__config>
@@ -18,24 +18,24 @@
 #include <__iterator/iterator_traits.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     typename enable_if<__is_cpp17_input_iterator<_InputIter>::value, _InputIter>::type
     next(_InputIter __x, typename iterator_traits<_InputIter>::
diff erence_type __n = 1) {
-  _LIBCPP_ASSERT(__n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
+  _LIBCUDACXX_ASSERT(__n >= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
                  "Attempt to next(it, n) with negative n on a non-bidirectional iterator");
 
-  _VSTD::advance(__x, __n);
+  _CUDA_VSTD::advance(__x, __n);
   return __x;
 }
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 // [range.iter.op.next]
 
@@ -44,27 +44,27 @@ namespace __next {
 
 struct __fn {
   template <input_or_output_iterator _Ip>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _Ip operator()(_Ip __x) const {
     ++__x;
     return __x;
   }
 
   template <input_or_output_iterator _Ip>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _Ip operator()(_Ip __x, iter_
diff erence_t<_Ip> __n) const {
     ranges::advance(__x, __n);
     return __x;
   }
 
   template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
-  _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, _Sp __bound_sentinel) const {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, _Sp __bound_sentinel) const {
     ranges::advance(__x, __bound_sentinel);
     return __x;
   }
 
   template <input_or_output_iterator _Ip, sentinel_for<_Ip> _Sp>
-  _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_
diff erence_t<_Ip> __n, _Sp __bound_sentinel) const {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_
diff erence_t<_Ip> __n, _Sp __bound_sentinel) const {
     ranges::advance(__x, __n, __bound_sentinel);
     return __x;
   }
@@ -77,8 +77,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_NEXT_H
+#endif // _LIBCUDACXX___ITERATOR_NEXT_H

diff  --git a/libcxx/include/__iterator/ostream_iterator.h b/libcxx/include/__iterator/ostream_iterator.h
index d16f5a26ebaa..a17cfb340bf3 100644
--- a/libcxx/include/__iterator/ostream_iterator.h
+++ b/libcxx/include/__iterator/ostream_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_OSTREAM_ITERATOR_H
-#define _LIBCPP___ITERATOR_OSTREAM_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_OSTREAM_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_OSTREAM_ITERATOR_H
 
 #include <__config>
 #include <__iterator/iterator.h>
@@ -17,24 +17,24 @@
 #include <cstddef>
 #include <iosfwd> // for forward declarations of char_traits and basic_ostream
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Tp, class _CharT = char, class _Traits = char_traits<_CharT> >
-class _LIBCPP_TEMPLATE_VIS ostream_iterator
-#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
+class _LIBCUDACXX_TEMPLATE_VIS ostream_iterator
+#if _LIBCUDACXX_STD_VER <= 14 || !defined(_LIBCUDACXX_ABI_NO_ITERATOR_BASES)
     : public iterator<output_iterator_tag, void, void, void, void>
 #endif
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 public:
     typedef output_iterator_tag             iterator_category;
     typedef void                            value_type;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     typedef ptr
diff _t                       
diff erence_type;
 #else
     typedef void                            
diff erence_type;
@@ -49,11 +49,11 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     ostream_type* __out_stream_;
     const char_type* __delim_;
 public:
-    _LIBCPP_INLINE_VISIBILITY ostream_iterator(ostream_type& __s) _NOEXCEPT
-        : __out_stream_(_VSTD::addressof(__s)), __delim_(nullptr) {}
-    _LIBCPP_INLINE_VISIBILITY ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT
-        : __out_stream_(_VSTD::addressof(__s)), __delim_(__delimiter) {}
-    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator=(const _Tp& __value)
+    _LIBCUDACXX_INLINE_VISIBILITY ostream_iterator(ostream_type& __s) _NOEXCEPT
+        : __out_stream_(_CUDA_VSTD::addressof(__s)), __delim_(nullptr) {}
+    _LIBCUDACXX_INLINE_VISIBILITY ostream_iterator(ostream_type& __s, const _CharT* __delimiter) _NOEXCEPT
+        : __out_stream_(_CUDA_VSTD::addressof(__s)), __delim_(__delimiter) {}
+    _LIBCUDACXX_INLINE_VISIBILITY ostream_iterator& operator=(const _Tp& __value)
         {
             *__out_stream_ << __value;
             if (__delim_)
@@ -61,11 +61,11 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
             return *this;
         }
 
-    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator*()     {return *this;}
-    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator++()    {return *this;}
-    _LIBCPP_INLINE_VISIBILITY ostream_iterator& operator++(int) {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY ostream_iterator& operator*()     {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY ostream_iterator& operator++()    {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY ostream_iterator& operator++(int) {return *this;}
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_OSTREAM_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_OSTREAM_ITERATOR_H

diff  --git a/libcxx/include/__iterator/ostreambuf_iterator.h b/libcxx/include/__iterator/ostreambuf_iterator.h
index 6da7598ed272..8ca46e92bd38 100644
--- a/libcxx/include/__iterator/ostreambuf_iterator.h
+++ b/libcxx/include/__iterator/ostreambuf_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_OSTREAMBUF_ITERATOR_H
-#define _LIBCPP___ITERATOR_OSTREAMBUF_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_OSTREAMBUF_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_OSTREAMBUF_ITERATOR_H
 
 #include <__config>
 #include <__iterator/iterator.h>
@@ -16,24 +16,24 @@
 #include <cstddef>
 #include <iosfwd> // for forward declaration of basic_streambuf
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator
-#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
+class _LIBCUDACXX_TEMPLATE_VIS ostreambuf_iterator
+#if _LIBCUDACXX_STD_VER <= 14 || !defined(_LIBCUDACXX_ABI_NO_ITERATOR_BASES)
     : public iterator<output_iterator_tag, void, void, void, void>
 #endif
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 public:
     typedef output_iterator_tag                 iterator_category;
     typedef void                                value_type;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     typedef ptr
diff _t                           
diff erence_type;
 #else
     typedef void                                
diff erence_type;
@@ -48,30 +48,30 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
 private:
     streambuf_type* __sbuf_;
 public:
-    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator(ostream_type& __s) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY ostreambuf_iterator(ostream_type& __s) _NOEXCEPT
         : __sbuf_(__s.rdbuf()) {}
-    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator(streambuf_type* __s) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY ostreambuf_iterator(streambuf_type* __s) _NOEXCEPT
         : __sbuf_(__s) {}
-    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator=(_CharT __c)
+    _LIBCUDACXX_INLINE_VISIBILITY ostreambuf_iterator& operator=(_CharT __c)
         {
             if (__sbuf_ && traits_type::eq_int_type(__sbuf_->sputc(__c), traits_type::eof()))
                 __sbuf_ = nullptr;
             return *this;
         }
-    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator*()     {return *this;}
-    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++()    {return *this;}
-    _LIBCPP_INLINE_VISIBILITY ostreambuf_iterator& operator++(int) {return *this;}
-    _LIBCPP_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == nullptr;}
+    _LIBCUDACXX_INLINE_VISIBILITY ostreambuf_iterator& operator*()     {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY ostreambuf_iterator& operator++()    {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY ostreambuf_iterator& operator++(int) {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY bool failed() const _NOEXCEPT {return __sbuf_ == nullptr;}
 
     template <class _Ch, class _Tr>
     friend
-    _LIBCPP_HIDDEN
+    _LIBCUDACXX_HIDDEN
     ostreambuf_iterator<_Ch, _Tr>
     __pad_and_output(ostreambuf_iterator<_Ch, _Tr> __s,
                      const _Ch* __ob, const _Ch* __op, const _Ch* __oe,
                      ios_base& __iob, _Ch __fl);
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_OSTREAMBUF_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_OSTREAMBUF_ITERATOR_H

diff  --git a/libcxx/include/__iterator/permutable.h b/libcxx/include/__iterator/permutable.h
index 28d193eaae2c..a17f32886579 100644
--- a/libcxx/include/__iterator/permutable.h
+++ b/libcxx/include/__iterator/permutable.h
@@ -7,20 +7,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_PERMUTABLE_H
-#define _LIBCPP___ITERATOR_PERMUTABLE_H
+#ifndef _LIBCUDACXX___ITERATOR_PERMUTABLE_H
+#define _LIBCUDACXX___ITERATOR_PERMUTABLE_H
 
 #include <__config>
 #include <__iterator/concepts.h>
 #include <__iterator/iter_swap.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _Iterator>
 concept permutable =
@@ -28,8 +28,8 @@ concept permutable =
     indirectly_movable_storable<_Iterator, _Iterator> &&
     indirectly_swappable<_Iterator, _Iterator>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_PERMUTABLE_H
+#endif // _LIBCUDACXX___ITERATOR_PERMUTABLE_H

diff  --git a/libcxx/include/__iterator/prev.h b/libcxx/include/__iterator/prev.h
index eb997b91ba20..8ad8d3fa7f9a 100644
--- a/libcxx/include/__iterator/prev.h
+++ b/libcxx/include/__iterator/prev.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_PREV_H
-#define _LIBCPP___ITERATOR_PREV_H
+#ifndef _LIBCUDACXX___ITERATOR_PREV_H
+#define _LIBCUDACXX___ITERATOR_PREV_H
 
 #include <__assert>
 #include <__config>
@@ -18,23 +18,23 @@
 #include <__iterator/iterator_traits.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     typename enable_if<__is_cpp17_input_iterator<_InputIter>::value, _InputIter>::type
     prev(_InputIter __x, typename iterator_traits<_InputIter>::
diff erence_type __n = 1) {
-  _LIBCPP_ASSERT(__n <= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
+  _LIBCUDACXX_ASSERT(__n <= 0 || __is_cpp17_bidirectional_iterator<_InputIter>::value,
                  "Attempt to prev(it, n) with a positive n on a non-bidirectional iterator");
-  _VSTD::advance(__x, -__n);
+  _CUDA_VSTD::advance(__x, -__n);
   return __x;
 }
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 // [range.iter.op.prev]
 
@@ -43,21 +43,21 @@ namespace __prev {
 
 struct __fn {
   template <bidirectional_iterator _Ip>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _Ip operator()(_Ip __x) const {
     --__x;
     return __x;
   }
 
   template <bidirectional_iterator _Ip>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _Ip operator()(_Ip __x, iter_
diff erence_t<_Ip> __n) const {
     ranges::advance(__x, -__n);
     return __x;
   }
 
   template <bidirectional_iterator _Ip>
-  _LIBCPP_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_
diff erence_t<_Ip> __n, _Ip __bound_iter) const {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr _Ip operator()(_Ip __x, iter_
diff erence_t<_Ip> __n, _Ip __bound_iter) const {
     ranges::advance(__x, -__n, __bound_iter);
     return __x;
   }
@@ -70,8 +70,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_PREV_H
+#endif // _LIBCUDACXX___ITERATOR_PREV_H

diff  --git a/libcxx/include/__iterator/projected.h b/libcxx/include/__iterator/projected.h
index 53526bd8e712..f6476a4d3644 100644
--- a/libcxx/include/__iterator/projected.h
+++ b/libcxx/include/__iterator/projected.h
@@ -6,21 +6,21 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___ITERATOR_PROJECTED_H
-#define _LIBCPP___ITERATOR_PROJECTED_H
+#ifndef _LIBCUDACXX___ITERATOR_PROJECTED_H
+#define _LIBCUDACXX___ITERATOR_PROJECTED_H
 
 #include <__config>
 #include <__iterator/concepts.h>
 #include <__iterator/incrementable_traits.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template<indirectly_readable _It, indirectly_regular_unary_invocable<_It> _Proj>
 struct projected {
@@ -33,8 +33,8 @@ struct incrementable_traits<projected<_It, _Proj>> {
   using 
diff erence_type = iter_
diff erence_t<_It>;
 };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_PROJECTED_H
+#endif // _LIBCUDACXX___ITERATOR_PROJECTED_H

diff  --git a/libcxx/include/__iterator/readable_traits.h b/libcxx/include/__iterator/readable_traits.h
index 500b46ac145f..4653b618673d 100644
--- a/libcxx/include/__iterator/readable_traits.h
+++ b/libcxx/include/__iterator/readable_traits.h
@@ -7,20 +7,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_READABLE_TRAITS_H
-#define _LIBCPP___ITERATOR_READABLE_TRAITS_H
+#ifndef _LIBCUDACXX___ITERATOR_READABLE_TRAITS_H
+#define _LIBCUDACXX___ITERATOR_READABLE_TRAITS_H
 
 #include <__config>
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [readable.traits]
 template<class> struct __cond_value_type {};
@@ -79,8 +79,8 @@ using iter_value_t = typename conditional_t<__is_primary_template<iterator_trait
                                             indirectly_readable_traits<remove_cvref_t<_Ip> >,
                                             iterator_traits<remove_cvref_t<_Ip> > >::value_type;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_READABLE_TRAITS_H
+#endif // _LIBCUDACXX___ITERATOR_READABLE_TRAITS_H

diff  --git a/libcxx/include/__iterator/reverse_access.h b/libcxx/include/__iterator/reverse_access.h
index 40c266378d36..50a5a0dcfc00 100644
--- a/libcxx/include/__iterator/reverse_access.h
+++ b/libcxx/include/__iterator/reverse_access.h
@@ -7,94 +7,94 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_REVERSE_ACCESS_H
-#define _LIBCPP___ITERATOR_REVERSE_ACCESS_H
+#ifndef _LIBCUDACXX___ITERATOR_REVERSE_ACCESS_H
+#define _LIBCUDACXX___ITERATOR_REVERSE_ACCESS_H
 
 #include <__config>
 #include <__iterator/reverse_iterator.h>
 #include <cstddef>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 
 template <class _Tp, size_t _Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 reverse_iterator<_Tp*> rbegin(_Tp (&__array)[_Np])
 {
     return reverse_iterator<_Tp*>(__array + _Np);
 }
 
 template <class _Tp, size_t _Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 reverse_iterator<_Tp*> rend(_Tp (&__array)[_Np])
 {
     return reverse_iterator<_Tp*>(__array);
 }
 
 template <class _Ep>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 reverse_iterator<const _Ep*> rbegin(initializer_list<_Ep> __il)
 {
     return reverse_iterator<const _Ep*>(__il.end());
 }
 
 template <class _Ep>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 reverse_iterator<const _Ep*> rend(initializer_list<_Ep> __il)
 {
     return reverse_iterator<const _Ep*>(__il.begin());
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 auto rbegin(_Cp& __c) -> decltype(__c.rbegin())
 {
     return __c.rbegin();
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 auto rbegin(const _Cp& __c) -> decltype(__c.rbegin())
 {
     return __c.rbegin();
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 auto rend(_Cp& __c) -> decltype(__c.rend())
 {
     return __c.rend();
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 auto rend(const _Cp& __c) -> decltype(__c.rend())
 {
     return __c.rend();
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
-auto crbegin(const _Cp& __c) -> decltype(_VSTD::rbegin(__c))
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
+auto crbegin(const _Cp& __c) -> decltype(_CUDA_VSTD::rbegin(__c))
 {
-    return _VSTD::rbegin(__c);
+    return _CUDA_VSTD::rbegin(__c);
 }
 
 template <class _Cp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
-auto crend(const _Cp& __c) -> decltype(_VSTD::rend(__c))
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
+auto crend(const _Cp& __c) -> decltype(_CUDA_VSTD::rend(__c))
 {
-    return _VSTD::rend(__c);
+    return _CUDA_VSTD::rend(__c);
 }
 
-#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER > 11
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_REVERSE_ACCESS_H
+#endif // _LIBCUDACXX___ITERATOR_REVERSE_ACCESS_H

diff  --git a/libcxx/include/__iterator/reverse_iterator.h b/libcxx/include/__iterator/reverse_iterator.h
index 7b002205f333..376bb414550e 100644
--- a/libcxx/include/__iterator/reverse_iterator.h
+++ b/libcxx/include/__iterator/reverse_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_REVERSE_ITERATOR_H
-#define _LIBCPP___ITERATOR_REVERSE_ITERATOR_H
+#ifndef _LIBCUDACXX___ITERATOR_REVERSE_ITERATOR_H
+#define _LIBCUDACXX___ITERATOR_REVERSE_ITERATOR_H
 
 #include <__algorithm/unwrap_iter.h>
 #include <__compare/compare_three_way_result.h>
@@ -32,16 +32,16 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Iter>
-class _LIBCPP_TEMPLATE_VIS reverse_iterator
-#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
+class _LIBCUDACXX_TEMPLATE_VIS reverse_iterator
+#if _LIBCUDACXX_STD_VER <= 14 || !defined(_LIBCUDACXX_ABI_NO_ITERATOR_BASES)
     : public iterator<typename iterator_traits<_Iter>::iterator_category,
                       typename iterator_traits<_Iter>::value_type,
                       typename iterator_traits<_Iter>::
diff erence_type,
@@ -49,16 +49,16 @@ class _LIBCPP_TEMPLATE_VIS reverse_iterator
                       typename iterator_traits<_Iter>::reference>
 #endif
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 private:
-#ifndef _LIBCPP_ABI_NO_ITERATOR_BASES
+#ifndef _LIBCUDACXX_ABI_NO_ITERATOR_BASES
     _Iter __t; // no longer used as of LWG #2360, not removed due to ABI break
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     static_assert(__is_cpp17_bidirectional_iterator<_Iter>::value || bidirectional_iterator<_Iter>,
         "reverse_iterator<It> requires It to be a bidirectional iterator.");
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 protected:
     _Iter current;
@@ -69,7 +69,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
                                   random_access_iterator_tag,
                                   typename iterator_traits<_Iter>::iterator_category>;
     using pointer = typename iterator_traits<_Iter>::pointer;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     using iterator_concept = _If<random_access_iterator<_Iter>, random_access_iterator_tag, bidirectional_iterator_tag>;
     using value_type = iter_value_t<_Iter>;
     using 
diff erence_type = iter_
diff erence_t<_Iter>;
@@ -80,17 +80,17 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     using reference = typename iterator_traits<_Iter>::reference;
 #endif
 
-#ifndef _LIBCPP_ABI_NO_ITERATOR_BASES
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+#ifndef _LIBCUDACXX_ABI_NO_ITERATOR_BASES
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator() : __t(), current() {}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     explicit reverse_iterator(_Iter __x) : __t(__x), current(__x) {}
 
     template <class _Up, class = __enable_if_t<
         !is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value
     > >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator(const reverse_iterator<_Up>& __u)
         : __t(__u.base()), current(__u.base())
     { }
@@ -100,22 +100,22 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
         is_convertible<_Up const&, _Iter>::value &&
         is_assignable<_Iter&, _Up const&>::value
     > >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
         __t = current = __u.base();
         return *this;
     }
 #else
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator() : current() {}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     explicit reverse_iterator(_Iter __x) : current(__x) {}
 
     template <class _Up, class = __enable_if_t<
         !is_same<_Up, _Iter>::value && is_convertible<_Up const&, _Iter>::value
     > >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator(const reverse_iterator<_Up>& __u)
         : current(__u.base())
     { }
@@ -125,19 +125,19 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
         is_convertible<_Up const&, _Iter>::value &&
         is_assignable<_Iter&, _Up const&>::value
     > >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator& operator=(const reverse_iterator<_Up>& __u) {
         current = __u.base();
         return *this;
     }
 #endif
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     _Iter base() const {return current;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reference operator*() const {_Iter __tmp = current; return *--__tmp;}
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr pointer operator->() const
       requires is_pointer_v<_Iter> || requires(const _Iter __i) { __i.operator->(); }
     {
@@ -148,33 +148,33 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
       }
     }
 #else
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     pointer operator->() const {
       return std::addressof(operator*());
     }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator& operator++() {--current; return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator operator++(int) {reverse_iterator __tmp(*this); --current; return __tmp;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator& operator--() {++current; return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator operator--(int) {reverse_iterator __tmp(*this); ++current; return __tmp;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator operator+(
diff erence_type __n) const {return reverse_iterator(current - __n);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator& operator+=(
diff erence_type __n) {current -= __n; return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator operator-(
diff erence_type __n) const {return reverse_iterator(current + __n);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator& operator-=(
diff erence_type __n) {current += __n; return *this;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reference operator[](
diff erence_type __n) const {return *(*this + __n);}
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_HIDE_FROM_ABI friend constexpr
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_HIDE_FROM_ABI friend constexpr
     iter_rvalue_reference_t<_Iter> iter_move(const reverse_iterator& __i)
       noexcept(is_nothrow_copy_constructible_v<_Iter> &&
           noexcept(ranges::iter_move(--declval<_Iter&>()))) {
@@ -183,7 +183,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     }
 
     template <indirectly_swappable<_Iter> _Iter2>
-    _LIBCPP_HIDE_FROM_ABI friend constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI friend constexpr
     void iter_swap(const reverse_iterator& __x, const reverse_iterator<_Iter2>& __y)
       noexcept(is_nothrow_copy_constructible_v<_Iter> &&
           is_nothrow_copy_constructible_v<_Iter2> &&
@@ -192,7 +192,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
       auto __ytmp = __y.base();
       ranges::iter_swap(--__xtmp, --__ytmp);
     }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 };
 
 template <class _Iter>
@@ -202,96 +202,96 @@ template <class _Iter>
 struct __is_reverse_iterator<reverse_iterator<_Iter> > : true_type {};
 
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool
 operator==(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     requires requires {
       { __x.base() == __y.base() } -> convertible_to<bool>;
     }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 {
     return __x.base() == __y.base();
 }
 
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool
 operator<(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     requires requires {
         { __x.base() > __y.base() } -> convertible_to<bool>;
       }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 {
     return __x.base() > __y.base();
 }
 
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool
 operator!=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     requires requires {
       { __x.base() != __y.base() } -> convertible_to<bool>;
     }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 {
     return __x.base() != __y.base();
 }
 
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool
 operator>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     requires requires {
         { __x.base() < __y.base() } -> convertible_to<bool>;
       }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 {
     return __x.base() < __y.base();
 }
 
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool
 operator>=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     requires requires {
         { __x.base() <= __y.base() } -> convertible_to<bool>;
       }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 {
     return __x.base() <= __y.base();
 }
 
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 bool
 operator<=(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     requires requires {
         { __x.base() >= __y.base() } -> convertible_to<bool>;
       }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 {
     return __x.base() >= __y.base();
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Iter1, three_way_comparable_with<_Iter1> _Iter2>
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 compare_three_way_result_t<_Iter1, _Iter2>
 operator<=>(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
 {
     return __y.base() <=> __x.base();
 }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 auto
 operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
 -> decltype(__y.base() - __x.base())
@@ -300,7 +300,7 @@ operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& _
 }
 #else
 template <class _Iter1, class _Iter2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename reverse_iterator<_Iter1>::
diff erence_type
 operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& __y)
 {
@@ -309,29 +309,29 @@ operator-(const reverse_iterator<_Iter1>& __x, const reverse_iterator<_Iter2>& _
 #endif
 
 template <class _Iter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 reverse_iterator<_Iter>
 operator+(typename reverse_iterator<_Iter>::
diff erence_type __n, const reverse_iterator<_Iter>& __x)
 {
     return reverse_iterator<_Iter>(__x.base() - __n);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Iter1, class _Iter2>
   requires (!sized_sentinel_for<_Iter1, _Iter2>)
 inline constexpr bool disable_sized_sentinel_for<reverse_iterator<_Iter1>, reverse_iterator<_Iter2>> = true;
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Iter>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 reverse_iterator<_Iter> make_reverse_iterator(_Iter __i)
 {
     return reverse_iterator<_Iter>(__i);
 }
 #endif
 
-#if _LIBCPP_STD_VER <= 17
+#if _LIBCUDACXX_STD_VER <= 17
 template <class _Iter>
 using __unconstrained_reverse_iterator = reverse_iterator<_Iter>;
 #else
@@ -373,17 +373,17 @@ class __unconstrained_reverse_iterator {
   using 
diff erence_type = iter_
diff erence_t<_Iter>;
   using reference = iter_reference_t<_Iter>;
 
-  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator() = default;
-  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator(const __unconstrained_reverse_iterator&) = default;
-  _LIBCPP_HIDE_FROM_ABI constexpr explicit __unconstrained_reverse_iterator(_Iter __iter) : __iter_(__iter) {}
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator() = default;
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator(const __unconstrained_reverse_iterator&) = default;
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr explicit __unconstrained_reverse_iterator(_Iter __iter) : __iter_(__iter) {}
 
-  _LIBCPP_HIDE_FROM_ABI constexpr _Iter base() const { return __iter_; }
-  _LIBCPP_HIDE_FROM_ABI constexpr reference operator*() const {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr _Iter base() const { return __iter_; }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr reference operator*() const {
     auto __tmp = __iter_;
     return *--__tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr pointer operator->() const {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr pointer operator->() const {
     if constexpr (is_pointer_v<_Iter>) {
       return std::prev(__iter_);
     } else {
@@ -391,7 +391,7 @@ class __unconstrained_reverse_iterator {
     }
   }
 
-  _LIBCPP_HIDE_FROM_ABI friend constexpr
+  _LIBCUDACXX_HIDE_FROM_ABI friend constexpr
   iter_rvalue_reference_t<_Iter> iter_move(const __unconstrained_reverse_iterator& __i)
     noexcept(is_nothrow_copy_constructible_v<_Iter> &&
         noexcept(ranges::iter_move(--declval<_Iter&>()))) {
@@ -399,80 +399,80 @@ class __unconstrained_reverse_iterator {
     return ranges::iter_move(--__tmp);
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator++() {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator++() {
     --__iter_;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator++(int) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator++(int) {
     auto __tmp = *this;
     --__iter_;
     return __tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator--() {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator--() {
     ++__iter_;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator--(int) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator--(int) {
     auto __tmp = *this;
     ++__iter_;
     return __tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator+=(
diff erence_type __n) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator+=(
diff erence_type __n) {
     __iter_ -= __n;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator-=(
diff erence_type __n) {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator& operator-=(
diff erence_type __n) {
     __iter_ += __n;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator+(
diff erence_type __n) const {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator+(
diff erence_type __n) const {
     return __unconstrained_reverse_iterator(__iter_ - __n);
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator-(
diff erence_type __n) const {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __unconstrained_reverse_iterator operator-(
diff erence_type __n) const {
     return __unconstrained_reverse_iterator(__iter_ + __n);
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr 
diff erence_type operator-(const __unconstrained_reverse_iterator& __other) const {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr 
diff erence_type operator-(const __unconstrained_reverse_iterator& __other) const {
     return __other.__iter_ - __iter_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr auto operator[](
diff erence_type __n) const { return *(*this + __n); }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator[](
diff erence_type __n) const { return *(*this + __n); }
 
   // Deliberately unconstrained unlike the comparison functions in `reverse_iterator` -- see the class comment for the
   // rationale.
-  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
+  _LIBCUDACXX_HIDE_FROM_ABI friend constexpr bool
   operator==(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
     return __lhs.base() == __rhs.base();
   }
 
-  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
+  _LIBCUDACXX_HIDE_FROM_ABI friend constexpr bool
   operator!=(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
     return __lhs.base() != __rhs.base();
   }
 
-  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
+  _LIBCUDACXX_HIDE_FROM_ABI friend constexpr bool
   operator<(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
     return __lhs.base() > __rhs.base();
   }
 
-  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
+  _LIBCUDACXX_HIDE_FROM_ABI friend constexpr bool
   operator>(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
     return __lhs.base() < __rhs.base();
   }
 
-  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
+  _LIBCUDACXX_HIDE_FROM_ABI friend constexpr bool
   operator<=(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
     return __lhs.base() >= __rhs.base();
   }
 
-  _LIBCPP_HIDE_FROM_ABI friend constexpr bool
+  _LIBCUDACXX_HIDE_FROM_ABI friend constexpr bool
   operator>=(const __unconstrained_reverse_iterator& __lhs, const __unconstrained_reverse_iterator& __rhs) {
     return __lhs.base() <= __rhs.base();
   }
@@ -481,27 +481,27 @@ class __unconstrained_reverse_iterator {
 template <class _Iter>
 struct __is_reverse_iterator<__unconstrained_reverse_iterator<_Iter>> : true_type {};
 
-#endif // _LIBCPP_STD_VER <= 17
+#endif // _LIBCUDACXX_STD_VER <= 17
 
 template <template <class> class _RevIter1, template <class> class _RevIter2, class _Iter>
 struct __unwrap_reverse_iter_impl {
   using _UnwrappedIter = decltype(__unwrap_iter_impl<_Iter>::__unwrap(std::declval<_Iter>()));
   using _ReverseWrapper = _RevIter1<_RevIter2<_Iter> >;
 
-  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _ReverseWrapper
+  static _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR _ReverseWrapper
   __rewrap(_ReverseWrapper __orig_iter, _UnwrappedIter __unwrapped_iter) {
     return _ReverseWrapper(
         _RevIter2<_Iter>(__unwrap_iter_impl<_Iter>::__rewrap(__orig_iter.base().base(), __unwrapped_iter)));
   }
 
-  static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _UnwrappedIter __unwrap(_ReverseWrapper __i) _NOEXCEPT {
+  static _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR _UnwrappedIter __unwrap(_ReverseWrapper __i) _NOEXCEPT {
     return __unwrap_iter_impl<_Iter>::__unwrap(__i.base().base());
   }
 };
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 template <ranges::bidirectional_range _Range>
-_LIBCPP_HIDE_FROM_ABI constexpr ranges::
+_LIBCUDACXX_HIDE_FROM_ABI constexpr ranges::
     subrange<reverse_iterator<ranges::iterator_t<_Range>>, reverse_iterator<ranges::iterator_t<_Range>>>
     __reverse_range(_Range&& __range) {
   auto __first = ranges::begin(__range);
@@ -513,7 +513,7 @@ template <class _Iter, bool __b>
 struct __unwrap_iter_impl<reverse_iterator<reverse_iterator<_Iter> >, __b>
     : __unwrap_reverse_iter_impl<reverse_iterator, reverse_iterator, _Iter> {};
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _Iter, bool __b>
 struct __unwrap_iter_impl<reverse_iterator<__unconstrained_reverse_iterator<_Iter>>, __b>
@@ -527,8 +527,8 @@ template <class _Iter, bool __b>
 struct __unwrap_iter_impl<__unconstrained_reverse_iterator<__unconstrained_reverse_iterator<_Iter>>, __b>
     : __unwrap_reverse_iter_impl<__unconstrained_reverse_iterator, __unconstrained_reverse_iterator, _Iter> {};
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_REVERSE_ITERATOR_H
+#endif // _LIBCUDACXX___ITERATOR_REVERSE_ITERATOR_H

diff  --git a/libcxx/include/__iterator/size.h b/libcxx/include/__iterator/size.h
index e06013496668..f320785b68eb 100644
--- a/libcxx/include/__iterator/size.h
+++ b/libcxx/include/__iterator/size.h
@@ -7,35 +7,35 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_SIZE_H
-#define _LIBCPP___ITERATOR_SIZE_H
+#ifndef _LIBCUDACXX___ITERATOR_SIZE_H
+#define _LIBCUDACXX___ITERATOR_SIZE_H
 
 #include <__config>
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _Cont>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 constexpr auto size(const _Cont& __c)
 _NOEXCEPT_(noexcept(__c.size()))
 -> decltype        (__c.size())
 { return            __c.size(); }
 
 template <class _Tp, size_t _Sz>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 constexpr size_t size(const _Tp (&)[_Sz]) noexcept { return _Sz; }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Cont>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 constexpr auto ssize(const _Cont& __c)
 _NOEXCEPT_(noexcept(static_cast<common_type_t<ptr
diff _t, make_signed_t<decltype(__c.size())>>>(__c.size())))
 ->                              common_type_t<ptr
diff _t, make_signed_t<decltype(__c.size())>>
@@ -43,16 +43,16 @@ _NOEXCEPT_(noexcept(static_cast<common_type_t<ptr
diff _t, make_signed_t<decltype(
 
 // GCC complains about the implicit conversion from ptr
diff _t to size_t in
 // the array bound.
-_LIBCPP_DIAGNOSTIC_PUSH
-_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wsign-conversion")
+_LIBCUDACXX_DIAGNOSTIC_PUSH
+_LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wsign-conversion")
 template <class _Tp, ptr
diff _t _Sz>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 constexpr ptr
diff _t ssize(const _Tp (&)[_Sz]) noexcept { return _Sz; }
-_LIBCPP_DIAGNOSTIC_POP
+_LIBCUDACXX_DIAGNOSTIC_POP
 #endif
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_SIZE_H
+#endif // _LIBCUDACXX___ITERATOR_SIZE_H

diff  --git a/libcxx/include/__iterator/sortable.h b/libcxx/include/__iterator/sortable.h
index bcf934f87be0..404cf0d35788 100644
--- a/libcxx/include/__iterator/sortable.h
+++ b/libcxx/include/__iterator/sortable.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_SORTABLE_H
-#define _LIBCPP___ITERATOR_SORTABLE_H
+#ifndef _LIBCUDACXX___ITERATOR_SORTABLE_H
+#define _LIBCUDACXX___ITERATOR_SORTABLE_H
 
 #include <__config>
 #include <__functional/identity.h>
@@ -17,21 +17,21 @@
 #include <__iterator/permutable.h>
 #include <__iterator/projected.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _Iter, class _Comp = ranges::less, class _Proj = identity>
 concept sortable =
   permutable<_Iter> &&
   indirect_strict_weak_order<_Comp, projected<_Iter, _Proj>>;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_SORTABLE_H
+#endif // _LIBCUDACXX___ITERATOR_SORTABLE_H

diff  --git a/libcxx/include/__iterator/unreachable_sentinel.h b/libcxx/include/__iterator/unreachable_sentinel.h
index d77cc99f02f7..b989dfc9b22a 100644
--- a/libcxx/include/__iterator/unreachable_sentinel.h
+++ b/libcxx/include/__iterator/unreachable_sentinel.h
@@ -7,23 +7,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_UNREACHABLE_SENTINEL_H
-#define _LIBCPP___ITERATOR_UNREACHABLE_SENTINEL_H
+#ifndef _LIBCUDACXX___ITERATOR_UNREACHABLE_SENTINEL_H
+#define _LIBCUDACXX___ITERATOR_UNREACHABLE_SENTINEL_H
 
 #include <__config>
 #include <__iterator/concepts.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 struct unreachable_sentinel_t {
   template<weakly_incrementable _Iter>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(unreachable_sentinel_t, const _Iter&) noexcept {
     return false;
   }
@@ -31,8 +31,8 @@ struct unreachable_sentinel_t {
 
 inline constexpr unreachable_sentinel_t unreachable_sentinel{};
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_UNREACHABLE_SENTINEL_H
+#endif // _LIBCUDACXX___ITERATOR_UNREACHABLE_SENTINEL_H

diff  --git a/libcxx/include/__iterator/wrap_iter.h b/libcxx/include/__iterator/wrap_iter.h
index f780048754c9..2fe525b4ae26 100644
--- a/libcxx/include/__iterator/wrap_iter.h
+++ b/libcxx/include/__iterator/wrap_iter.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___ITERATOR_WRAP_ITER_H
-#define _LIBCPP___ITERATOR_WRAP_ITER_H
+#ifndef _LIBCUDACXX___ITERATOR_WRAP_ITER_H
+#define _LIBCUDACXX___ITERATOR_WRAP_ITER_H
 
 #include <__config>
 #include <__debug>
@@ -17,11 +17,11 @@
 #include <__memory/pointer_traits.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Iter>
 class __wrap_iter
@@ -33,215 +33,215 @@ class __wrap_iter
     typedef typename iterator_traits<iterator_type>::pointer           pointer;
     typedef typename iterator_traits<iterator_type>::reference         reference;
     typedef typename iterator_traits<iterator_type>::iterator_category iterator_category;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     typedef contiguous_iterator_tag                                    iterator_concept;
 #endif
 
 private:
     iterator_type __i;
 public:
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter() _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __wrap_iter() _NOEXCEPT
                 : __i()
     {
-        _VSTD::__debug_db_insert_i(this);
+        _CUDA_VSTD::__debug_db_insert_i(this);
     }
-    template <class _Up> _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+    template <class _Up> _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         __wrap_iter(const __wrap_iter<_Up>& __u,
             typename enable_if<is_convertible<_Up, iterator_type>::value>::type* = nullptr) _NOEXCEPT
             : __i(__u.base())
     {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-      if (!__libcpp_is_constant_evaluated())
-        __get_db()->__iterator_copy(this, _VSTD::addressof(__u));
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+      if (!__LIBCUDACXX_is_constant_evaluated())
+        __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__u));
 #endif
     }
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     __wrap_iter(const __wrap_iter& __x)
         : __i(__x.base())
     {
-      if (!__libcpp_is_constant_evaluated())
-        __get_db()->__iterator_copy(this, _VSTD::addressof(__x));
+      if (!__LIBCUDACXX_is_constant_evaluated())
+        __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__x));
     }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     __wrap_iter& operator=(const __wrap_iter& __x)
     {
-        if (this != _VSTD::addressof(__x))
+        if (this != _CUDA_VSTD::addressof(__x))
         {
-            if (!__libcpp_is_constant_evaluated())
-                __get_db()->__iterator_copy(this, _VSTD::addressof(__x));
+            if (!__LIBCUDACXX_is_constant_evaluated())
+                __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__x));
             __i = __x.__i;
         }
         return *this;
     }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     ~__wrap_iter()
     {
-      if (!__libcpp_is_constant_evaluated())
+      if (!__LIBCUDACXX_is_constant_evaluated())
         __get_db()->__erase_i(this);
     }
 #endif
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference operator*() const _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 reference operator*() const _NOEXCEPT
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to dereference a non-dereferenceable iterator");
         return *__i;
     }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 pointer operator->() const _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 pointer operator->() const _NOEXCEPT
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to dereference a non-dereferenceable iterator");
-        return _VSTD::__to_address(__i);
+        return _CUDA_VSTD::__to_address(__i);
     }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator++() _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator++() _NOEXCEPT
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to increment a non-incrementable iterator");
         ++__i;
         return *this;
     }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter  operator++(int) _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __wrap_iter  operator++(int) _NOEXCEPT
         {__wrap_iter __tmp(*this); ++(*this); return __tmp;}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator--() _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator--() _NOEXCEPT
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__decrementable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__decrementable(this),
                              "Attempted to decrement a non-decrementable iterator");
         --__i;
         return *this;
     }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter  operator--(int) _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __wrap_iter  operator--(int) _NOEXCEPT
         {__wrap_iter __tmp(*this); --(*this); return __tmp;}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter  operator+ (
diff erence_type __n) const _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __wrap_iter  operator+ (
diff erence_type __n) const _NOEXCEPT
         {__wrap_iter __w(*this); __w += __n; return __w;}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator+=(
diff erence_type __n) _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator+=(
diff erence_type __n) _NOEXCEPT
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__addable(this, __n),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__addable(this, __n),
                              "Attempted to add/subtract an iterator outside its valid range");
         __i += __n;
         return *this;
     }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter  operator- (
diff erence_type __n) const _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __wrap_iter  operator- (
diff erence_type __n) const _NOEXCEPT
         {return *this + (-__n);}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator-=(
diff erence_type __n) _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __wrap_iter& operator-=(
diff erence_type __n) _NOEXCEPT
         {*this += -__n; return *this;}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference    operator[](
diff erence_type __n) const _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 reference    operator[](
diff erence_type __n) const _NOEXCEPT
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__subscriptable(this, __n),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__subscriptable(this, __n),
                              "Attempted to subscript an iterator outside its valid range");
         return __i[__n];
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 iterator_type base() const _NOEXCEPT {return __i;}
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 iterator_type base() const _NOEXCEPT {return __i;}
 
 private:
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit __wrap_iter(const void* __p, iterator_type __x) _NOEXCEPT : __i(__x)
     {
         (void)__p;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-      if (!__libcpp_is_constant_evaluated())
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+      if (!__LIBCUDACXX_is_constant_evaluated())
         __get_db()->__insert_ic(this, __p);
 #endif
     }
 
     template <class _Up> friend class __wrap_iter;
     template <class _CharT, class _Traits, class _Alloc> friend class basic_string;
-    template <class _Tp, class _Alloc> friend class _LIBCPP_TEMPLATE_VIS vector;
-    template <class _Tp, size_t> friend class _LIBCPP_TEMPLATE_VIS span;
+    template <class _Tp, class _Alloc> friend class _LIBCUDACXX_TEMPLATE_VIS vector;
+    template <class _Tp, size_t> friend class _LIBCUDACXX_TEMPLATE_VIS span;
 };
 
 template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 bool operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
 {
     return __x.base() == __y.base();
 }
 
 template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 bool operator==(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
 {
     return __x.base() == __y.base();
 }
 
 template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(_VSTD::addressof(__x), _VSTD::addressof(__y)),
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(_CUDA_VSTD::addressof(__x), _CUDA_VSTD::addressof(__y)),
                          "Attempted to compare incomparable iterators");
     return __x.base() < __y.base();
 }
 
 template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool operator<(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y),
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(&__x, &__y),
                          "Attempted to compare incomparable iterators");
     return __x.base() < __y.base();
 }
 
 template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 bool operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
 {
     return !(__x == __y);
 }
 
 template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 bool operator!=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
 {
     return !(__x == __y);
 }
 
 template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 bool operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
 {
     return __y < __x;
 }
 
 template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 bool operator>(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
 {
     return __y < __x;
 }
 
 template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 bool operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
 {
     return !(__x < __y);
 }
 
 template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 bool operator>=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
 {
     return !(__x < __y);
 }
 
 template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 bool operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter1>& __y) _NOEXCEPT
 {
     return !(__y < __x);
 }
 
 template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 bool operator<=(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
 {
     return !(__y < __x);
 }
 
 template <class _Iter1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
-#ifndef _LIBCPP_CXX03_LANG
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
+#ifndef _LIBCUDACXX_CXX03_LANG
 auto operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
     -> decltype(__x.base() - __y.base())
 #else
@@ -249,37 +249,37 @@ typename __wrap_iter<_Iter1>::
diff erence_type
 operator-(const __wrap_iter<_Iter1>& __x, const __wrap_iter<_Iter2>& __y) _NOEXCEPT
 #endif // C++03
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(_VSTD::addressof(__x), _VSTD::addressof(__y)),
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__less_than_comparable(_CUDA_VSTD::addressof(__x), _CUDA_VSTD::addressof(__y)),
                          "Attempted to subtract incompatible iterators");
     return __x.base() - __y.base();
 }
 
 template <class _Iter1>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 __wrap_iter<_Iter1> operator+(typename __wrap_iter<_Iter1>::
diff erence_type __n, __wrap_iter<_Iter1> __x) _NOEXCEPT
 {
     __x += __n;
     return __x;
 }
 
-#if _LIBCPP_STD_VER <= 17
+#if _LIBCUDACXX_STD_VER <= 17
 template <class _It>
 struct __is_cpp17_contiguous_iterator<__wrap_iter<_It> > : true_type {};
 #endif
 
 template <class _It>
-struct _LIBCPP_TEMPLATE_VIS pointer_traits<__wrap_iter<_It> >
+struct _LIBCUDACXX_TEMPLATE_VIS pointer_traits<__wrap_iter<_It> >
 {
     typedef __wrap_iter<_It> pointer;
     typedef typename pointer_traits<_It>::element_type element_type;
     typedef typename pointer_traits<_It>::
diff erence_type 
diff erence_type;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
     static element_type *to_address(pointer __w) _NOEXCEPT {
-        return _VSTD::__to_address(__w.base());
+        return _CUDA_VSTD::__to_address(__w.base());
     }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___ITERATOR_WRAP_ITER_H
+#endif // _LIBCUDACXX___ITERATOR_WRAP_ITER_H

diff  --git a/libcxx/include/__locale b/libcxx/include/__locale
index 40f9a3ff57c2..e73c30ab1173 100644
--- a/libcxx/include/__locale
+++ b/libcxx/include/__locale
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___LOCALE
-#define _LIBCPP___LOCALE
+#ifndef _LIBCUDACXX___LOCALE
+#define _LIBCUDACXX___LOCALE
 
 #include <__availability>
 #include <__config>
@@ -19,7 +19,7 @@
 #include <mutex>
 #include <string>
 
-#if defined(_LIBCPP_MSVCRT_LIKE)
+#if defined(_LIBCUDACXX_MSVCRT_LIKE)
 # include <__support/win32/locale_win32.h>
 # include <cstring>
 #elif defined(_AIX) || defined(__MVS__)
@@ -40,35 +40,35 @@
 #elif defined(__wasi__)
 // WASI libc uses musl's locales support.
 # include <__support/musl/xlocale.h>
-#elif defined(_LIBCPP_HAS_MUSL_LIBC)
+#elif defined(_LIBCUDACXX_HAS_MUSL_LIBC)
 # include <__support/musl/xlocale.h>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if !defined(_LIBCPP_LOCALE__L_EXTENSIONS)
-struct __libcpp_locale_guard {
-  _LIBCPP_INLINE_VISIBILITY
-  __libcpp_locale_guard(locale_t& __loc) : __old_loc_(uselocale(__loc)) {}
+#if !defined(_LIBCUDACXX_LOCALE__L_EXTENSIONS)
+struct __LIBCUDACXX_locale_guard {
+  _LIBCUDACXX_INLINE_VISIBILITY
+  __LIBCUDACXX_locale_guard(locale_t& __loc) : __old_loc_(uselocale(__loc)) {}
 
-  _LIBCPP_INLINE_VISIBILITY
-  ~__libcpp_locale_guard() {
+  _LIBCUDACXX_INLINE_VISIBILITY
+  ~__LIBCUDACXX_locale_guard() {
     if (__old_loc_)
       uselocale(__old_loc_);
   }
 
   locale_t __old_loc_;
 private:
-  __libcpp_locale_guard(__libcpp_locale_guard const&);
-  __libcpp_locale_guard& operator=(__libcpp_locale_guard const&);
+  __LIBCUDACXX_locale_guard(__LIBCUDACXX_locale_guard const&);
+  __LIBCUDACXX_locale_guard& operator=(__LIBCUDACXX_locale_guard const&);
 };
-#elif defined(_LIBCPP_MSVCRT_LIKE)
-struct __libcpp_locale_guard {
-    __libcpp_locale_guard(locale_t __l) :
+#elif defined(_LIBCUDACXX_MSVCRT_LIKE)
+struct __LIBCUDACXX_locale_guard {
+    __LIBCUDACXX_locale_guard(locale_t __l) :
         __status(_configthreadlocale(_ENABLE_PER_THREAD_LOCALE)) {
       // Setting the locale can be expensive even when the locale given is
       // already the current locale, so do an explicit check to see if the
@@ -78,14 +78,14 @@ struct __libcpp_locale_guard {
       // locale name, otherwise it will be a semicolon-separated string listing
       // each category.  In the second case, we know at least one category won't
       // be what we want, so we only have to check the first case.
-      if (_VSTD::strcmp(__l.__get_locale(), __lc) != 0) {
+      if (_CUDA_VSTD::strcmp(__l.__get_locale(), __lc) != 0) {
         __locale_all = _strdup(__lc);
         if (__locale_all == nullptr)
           __throw_bad_alloc();
         __setlocale(__l.__get_locale());
       }
     }
-    ~__libcpp_locale_guard() {
+    ~__LIBCUDACXX_locale_guard() {
       // The CRT documentation doesn't explicitly say, but setlocale() does the
       // right thing when given a semicolon-separated list of locale settings
       // for the 
diff erent categories in the same format as returned by
@@ -107,27 +107,27 @@ struct __libcpp_locale_guard {
 };
 #endif
 
-class _LIBCPP_TYPE_VIS locale;
+class _LIBCUDACXX_TYPE_VIS locale;
 
 template <class _Facet>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 has_facet(const locale&) _NOEXCEPT;
 
 template <class _Facet>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 const _Facet&
 use_facet(const locale&);
 
-class _LIBCPP_TYPE_VIS locale
+class _LIBCUDACXX_TYPE_VIS locale
 {
 public:
     // types:
-    class _LIBCPP_TYPE_VIS facet;
-    class _LIBCPP_TYPE_VIS id;
+    class _LIBCUDACXX_TYPE_VIS facet;
+    class _LIBCUDACXX_TYPE_VIS id;
 
     typedef int category;
-    _LIBCPP_AVAILABILITY_LOCALE_CATEGORY
+    _LIBCUDACXX_AVAILABILITY_LOCALE_CATEGORY
     static const category // values assigned here are for exposition only
         none     = 0,
         collate  = LC_COLLATE_MASK,
@@ -146,7 +146,7 @@ public:
     locale(const locale&, const char*, category);
     locale(const locale&, const string&, category);
     template <class _Facet>
-        _LIBCPP_INLINE_VISIBILITY locale(const locale&, _Facet*);
+        _LIBCUDACXX_INLINE_VISIBILITY locale(const locale&, _Facet*);
     locale(const locale&, const locale&, category);
 
     ~locale();
@@ -154,7 +154,7 @@ public:
     const locale& operator=(const locale&)  _NOEXCEPT;
 
     template <class _Facet>
-      _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+      _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
       locale combine(const locale&) const;
 
     // locale operations:
@@ -162,7 +162,7 @@ public:
     bool operator==(const locale&) const;
     bool operator!=(const locale& __y) const {return !(*this == __y);}
     template <class _CharT, class _Traits, class _Allocator>
-      _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+      _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
       bool operator()(const basic_string<_CharT, _Traits, _Allocator>&,
                       const basic_string<_CharT, _Traits, _Allocator>&) const;
 
@@ -183,11 +183,11 @@ private:
     template <class _Facet> friend const _Facet& use_facet(const locale&);
 };
 
-class _LIBCPP_TYPE_VIS locale::facet
+class _LIBCUDACXX_TYPE_VIS locale::facet
     : public __shared_count
 {
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit facet(size_t __refs = 0)
         : __shared_count(static_cast<long>(__refs)-1) {}
 
@@ -199,14 +199,14 @@ private:
     virtual void __on_zero_shared() _NOEXCEPT;
 };
 
-class _LIBCPP_TYPE_VIS locale::id
+class _LIBCUDACXX_TYPE_VIS locale::id
 {
     once_flag      __flag_;
     int32_t        __id_;
 
     static int32_t __next_id;
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR id() :__id_(0) {}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR id() :__id_(0) {}
     void operator=(const id&) = delete;
     id(const id&) = delete;
 
@@ -220,7 +220,7 @@ public:  // only needed for tests
 };
 
 template <class _Facet>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 locale::locale(const locale& __other, _Facet* __f)
 {
     __install_ctor(__other, __f, __f ? __f->id.__get() : 0);
@@ -230,14 +230,14 @@ template <class _Facet>
 locale
 locale::combine(const locale& __other) const
 {
-    if (!_VSTD::has_facet<_Facet>(__other))
+    if (!_CUDA_VSTD::has_facet<_Facet>(__other))
         __throw_runtime_error("locale::combine: locale missing facet");
 
-    return locale(*this, &const_cast<_Facet&>(_VSTD::use_facet<_Facet>(__other)));
+    return locale(*this, &const_cast<_Facet&>(_CUDA_VSTD::use_facet<_Facet>(__other)));
 }
 
 template <class _Facet>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 has_facet(const locale& __l)  _NOEXCEPT
 {
@@ -245,7 +245,7 @@ has_facet(const locale& __l)  _NOEXCEPT
 }
 
 template <class _Facet>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 const _Facet&
 use_facet(const locale& __l)
 {
@@ -255,34 +255,34 @@ use_facet(const locale& __l)
 // template <class _CharT> class collate;
 
 template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS collate
+class _LIBCUDACXX_TEMPLATE_VIS collate
     : public locale::facet
 {
 public:
     typedef _CharT char_type;
     typedef basic_string<char_type> string_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit collate(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int compare(const char_type* __lo1, const char_type* __hi1,
                 const char_type* __lo2, const char_type* __hi2) const
     {
         return do_compare(__lo1, __hi1, __lo2, __hi2);
     }
 
-    // FIXME(EricWF): The _LIBCPP_ALWAYS_INLINE is needed on Windows to work
+    // FIXME(EricWF): The _LIBCUDACXX_ALWAYS_INLINE is needed on Windows to work
     // around a dllimport bug that expects an external instantiation.
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_ALWAYS_INLINE
     string_type transform(const char_type* __lo, const char_type* __hi) const
     {
         return do_transform(__lo, __hi);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     long hash(const char_type* __lo, const char_type* __hi) const
     {
         return do_hash(__lo, __hi);
@@ -337,17 +337,17 @@ collate<_CharT>::do_hash(const char_type* __lo, const char_type* __hi) const
     return static_cast<long>(__h);
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS collate<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS collate<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS collate<wchar_t>;
 #endif
 
 // template <class CharT> class collate_byname;
 
-template <class _CharT> class _LIBCPP_TEMPLATE_VIS collate_byname;
+template <class _CharT> class _LIBCUDACXX_TEMPLATE_VIS collate_byname;
 
 template <>
-class _LIBCPP_TYPE_VIS collate_byname<char>
+class _LIBCUDACXX_TYPE_VIS collate_byname<char>
     : public collate<char>
 {
     locale_t __l;
@@ -365,9 +365,9 @@ protected:
     virtual string_type do_transform(const char_type* __lo, const char_type* __hi) const;
 };
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS collate_byname<wchar_t>
+class _LIBCUDACXX_TYPE_VIS collate_byname<wchar_t>
     : public collate<wchar_t>
 {
     locale_t __l;
@@ -392,17 +392,17 @@ bool
 locale::operator()(const basic_string<_CharT, _Traits, _Allocator>& __x,
                    const basic_string<_CharT, _Traits, _Allocator>& __y) const
 {
-    return _VSTD::use_facet<_VSTD::collate<_CharT> >(*this).compare(
+    return _CUDA_VSTD::use_facet<_CUDA_VSTD::collate<_CharT> >(*this).compare(
                                        __x.data(), __x.data() + __x.size(),
                                        __y.data(), __y.data() + __y.size()) < 0;
 }
 
 // template <class charT> class ctype
 
-class _LIBCPP_TYPE_VIS ctype_base
+class _LIBCUDACXX_TYPE_VIS ctype_base
 {
 public:
-#if defined(_LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE)
+#if defined(_LIBCUDACXX_PROVIDES_DEFAULT_RUNE_TABLE)
     typedef unsigned long mask;
     static const mask space  = 1<<0;
     static const mask print  = 1<<1;
@@ -438,7 +438,7 @@ public:
 #else
     static const mask __regex_word = 0x80;
 #endif
-#elif defined(_LIBCPP_MSVCRT_LIKE)
+#elif defined(_LIBCUDACXX_MSVCRT_LIKE)
     typedef unsigned short mask;
     static const mask space  = _SPACE;
     static const mask print  = _BLANK|_PUNCT|_ALPHA|_DIGIT;
@@ -451,8 +451,8 @@ public:
     static const mask xdigit = _HEX;
     static const mask blank  = _BLANK;
     static const mask __regex_word = 0x4000; // 0x8000 and 0x0100 and 0x00ff are used
-# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
-# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA
+# define _LIBCUDACXX_CTYPE_MASK_IS_COMPOSITE_PRINT
+# define _LIBCUDACXX_CTYPE_MASK_IS_COMPOSITE_ALPHA
 #elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__EMSCRIPTEN__) || defined(__NetBSD__)
 # ifdef __APPLE__
     typedef __uint32_t mask;
@@ -511,9 +511,9 @@ public:
     static const mask xdigit = _X | _N;
     static const mask blank  = _B;
     static const mask __regex_word = 0x80;
-# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
-# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA
-# define _LIBCPP_CTYPE_MASK_IS_COMPOSITE_XDIGIT
+# define _LIBCUDACXX_CTYPE_MASK_IS_COMPOSITE_PRINT
+# define _LIBCUDACXX_CTYPE_MASK_IS_COMPOSITE_ALPHA
+# define _LIBCUDACXX_CTYPE_MASK_IS_COMPOSITE_XDIGIT
 #elif defined(__MVS__)
 # if defined(__NATIVE_ASCII_F)
     typedef unsigned int mask;
@@ -542,99 +542,99 @@ public:
 # endif
     static const mask __regex_word = 0x8000;
 #else
-# error unknown rune table for this platform -- do you mean to define _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE?
+# error unknown rune table for this platform -- do you mean to define _LIBCUDACXX_PROVIDES_DEFAULT_RUNE_TABLE?
 #endif
     static const mask alnum  = alpha | digit;
     static const mask graph  = alnum | punct;
 
-    _LIBCPP_INLINE_VISIBILITY ctype_base() {}
+    _LIBCUDACXX_INLINE_VISIBILITY ctype_base() {}
 
     static_assert((__regex_word & ~(space | print | cntrl | upper | lower | alpha | digit | punct | xdigit | blank)) == __regex_word,
                   "__regex_word can't overlap other bits");
 };
 
-template <class _CharT> class _LIBCPP_TEMPLATE_VIS ctype;
+template <class _CharT> class _LIBCUDACXX_TEMPLATE_VIS ctype;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS ctype<wchar_t>
+class _LIBCUDACXX_TYPE_VIS ctype<wchar_t>
     : public locale::facet,
       public ctype_base
 {
 public:
     typedef wchar_t char_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit ctype(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool is(mask __m, char_type __c) const
     {
         return do_is(__m, __c);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char_type* is(const char_type* __low, const char_type* __high, mask* __vec) const
     {
         return do_is(__low, __high, __vec);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char_type* scan_is(mask __m, const char_type* __low, const char_type* __high) const
     {
         return do_scan_is(__m, __low, __high);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char_type* scan_not(mask __m, const char_type* __low, const char_type* __high) const
     {
         return do_scan_not(__m, __low, __high);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char_type toupper(char_type __c) const
     {
         return do_toupper(__c);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char_type* toupper(char_type* __low, const char_type* __high) const
     {
         return do_toupper(__low, __high);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char_type tolower(char_type __c) const
     {
         return do_tolower(__c);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char_type* tolower(char_type* __low, const char_type* __high) const
     {
         return do_tolower(__low, __high);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char_type widen(char __c) const
     {
         return do_widen(__c);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char* widen(const char* __low, const char* __high, char_type* __to) const
     {
         return do_widen(__low, __high, __to);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char narrow(char_type __c, char __dfault) const
     {
         return do_narrow(__c, __dfault);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char_type* narrow(const char_type* __low, const char_type* __high, char __dfault, char* __to) const
     {
         return do_narrow(__low, __high, __dfault, __to);
@@ -657,10 +657,10 @@ protected:
     virtual char do_narrow(char_type, char __dfault) const;
     virtual const char_type* do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __dest) const;
 };
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 template <>
-class _LIBCPP_TYPE_VIS ctype<char>
+class _LIBCUDACXX_TYPE_VIS ctype<char>
     : public locale::facet, public ctype_base
 {
     const mask* __tab_;
@@ -670,13 +670,13 @@ public:
 
     explicit ctype(const mask* __tab = nullptr, bool __del = false, size_t __refs = 0);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool is(mask __m, char_type __c) const
     {
         return isascii(__c) ? (__tab_[static_cast<int>(__c)] & __m) !=0 : false;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char_type* is(const char_type* __low, const char_type* __high, mask* __vec) const
     {
         for (; __low != __high; ++__low, ++__vec)
@@ -684,7 +684,7 @@ public:
         return __low;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char_type* scan_is (mask __m, const char_type* __low, const char_type* __high) const
     {
         for (; __low != __high; ++__low)
@@ -693,7 +693,7 @@ public:
         return __low;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char_type* scan_not(mask __m, const char_type* __low, const char_type* __high) const
     {
         for (; __low != __high; ++__low)
@@ -702,49 +702,49 @@ public:
         return __low;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char_type toupper(char_type __c) const
     {
         return do_toupper(__c);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char_type* toupper(char_type* __low, const char_type* __high) const
     {
         return do_toupper(__low, __high);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char_type tolower(char_type __c) const
     {
         return do_tolower(__c);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char_type* tolower(char_type* __low, const char_type* __high) const
     {
         return do_tolower(__low, __high);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char_type widen(char __c) const
     {
         return do_widen(__c);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char* widen(const char* __low, const char* __high, char_type* __to) const
     {
         return do_widen(__low, __high, __to);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char narrow(char_type __c, char __dfault) const
     {
         return do_narrow(__c, __dfault);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char* narrow(const char_type* __low, const char_type* __high, char __dfault, char* __to) const
     {
         return do_narrow(__low, __high, __dfault, __to);
@@ -757,7 +757,7 @@ public:
 #else
     static const size_t table_size = 256;  // FIXME: Don't hardcode this.
 #endif
-    _LIBCPP_INLINE_VISIBILITY const mask* table() const  _NOEXCEPT {return __tab_;}
+    _LIBCUDACXX_INLINE_VISIBILITY const mask* table() const  _NOEXCEPT {return __tab_;}
     static const mask* classic_table()  _NOEXCEPT;
 #if defined(__GLIBC__) || defined(__EMSCRIPTEN__)
     static const int* __classic_upper_table() _NOEXCEPT;
@@ -786,10 +786,10 @@ protected:
 
 // template <class CharT> class ctype_byname;
 
-template <class _CharT> class _LIBCPP_TEMPLATE_VIS ctype_byname;
+template <class _CharT> class _LIBCUDACXX_TEMPLATE_VIS ctype_byname;
 
 template <>
-class _LIBCPP_TYPE_VIS ctype_byname<char>
+class _LIBCUDACXX_TYPE_VIS ctype_byname<char>
     : public ctype<char>
 {
     locale_t __l;
@@ -806,9 +806,9 @@ protected:
     virtual const char_type* do_tolower(char_type* __low, const char_type* __high) const;
 };
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS ctype_byname<wchar_t>
+class _LIBCUDACXX_TYPE_VIS ctype_byname<wchar_t>
     : public ctype<wchar_t>
 {
     locale_t __l;
@@ -832,10 +832,10 @@ protected:
     virtual char do_narrow(char_type, char __dfault) const;
     virtual const char_type* do_narrow(const char_type* __low, const char_type* __high, char __dfault, char* __dest) const;
 };
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 isspace(_CharT __c, const locale& __loc)
 {
@@ -843,7 +843,7 @@ isspace(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 isprint(_CharT __c, const locale& __loc)
 {
@@ -851,7 +851,7 @@ isprint(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 iscntrl(_CharT __c, const locale& __loc)
 {
@@ -859,7 +859,7 @@ iscntrl(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 isupper(_CharT __c, const locale& __loc)
 {
@@ -867,7 +867,7 @@ isupper(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 islower(_CharT __c, const locale& __loc)
 {
@@ -875,7 +875,7 @@ islower(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 isalpha(_CharT __c, const locale& __loc)
 {
@@ -883,7 +883,7 @@ isalpha(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 isdigit(_CharT __c, const locale& __loc)
 {
@@ -891,7 +891,7 @@ isdigit(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 ispunct(_CharT __c, const locale& __loc)
 {
@@ -899,7 +899,7 @@ ispunct(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 isxdigit(_CharT __c, const locale& __loc)
 {
@@ -907,7 +907,7 @@ isxdigit(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 isalnum(_CharT __c, const locale& __loc)
 {
@@ -915,7 +915,7 @@ isalnum(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 isgraph(_CharT __c, const locale& __loc)
 {
@@ -923,7 +923,7 @@ isgraph(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _CharT
 toupper(_CharT __c, const locale& __loc)
 {
@@ -931,7 +931,7 @@ toupper(_CharT __c, const locale& __loc)
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _CharT
 tolower(_CharT __c, const locale& __loc)
 {
@@ -940,21 +940,21 @@ tolower(_CharT __c, const locale& __loc)
 
 // codecvt_base
 
-class _LIBCPP_TYPE_VIS codecvt_base
+class _LIBCUDACXX_TYPE_VIS codecvt_base
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY codecvt_base() {}
+    _LIBCUDACXX_INLINE_VISIBILITY codecvt_base() {}
     enum result {ok, partial, error, noconv};
 };
 
 // template <class internT, class externT, class stateT> class codecvt;
 
-template <class _InternT, class _ExternT, class _StateT> class _LIBCPP_TEMPLATE_VIS codecvt;
+template <class _InternT, class _ExternT, class _StateT> class _LIBCUDACXX_TEMPLATE_VIS codecvt;
 
 // template <> class codecvt<char, char, mbstate_t>
 
 template <>
-class _LIBCPP_TYPE_VIS codecvt<char, char, mbstate_t>
+class _LIBCUDACXX_TYPE_VIS codecvt<char, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -963,11 +963,11 @@ public:
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result out(state_type& __st,
                const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
@@ -975,14 +975,14 @@ public:
         return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result unshift(state_type& __st,
                    extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
     {
         return do_unshift(__st, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result in(state_type& __st,
               const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
               intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
@@ -990,25 +990,25 @@ public:
         return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int encoding() const  _NOEXCEPT
     {
         return do_encoding();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool always_noconv() const  _NOEXCEPT
     {
         return do_always_noconv();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
     {
         return do_length(__st, __frm, __end, __mx);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int max_length() const  _NOEXCEPT
     {
         return do_max_length();
@@ -1017,7 +1017,7 @@ public:
     static locale::id id;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt(const char*, size_t __refs = 0)
         : locale::facet(__refs) {}
 
@@ -1039,9 +1039,9 @@ protected:
 
 // template <> class codecvt<wchar_t, char, mbstate_t>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS codecvt<wchar_t, char, mbstate_t>
+class _LIBCUDACXX_TYPE_VIS codecvt<wchar_t, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1053,7 +1053,7 @@ public:
 
     explicit codecvt(size_t __refs = 0);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result out(state_type& __st,
                const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
@@ -1061,14 +1061,14 @@ public:
         return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result unshift(state_type& __st,
                    extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
     {
         return do_unshift(__st, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result in(state_type& __st,
               const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
               intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
@@ -1076,25 +1076,25 @@ public:
         return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int encoding() const  _NOEXCEPT
     {
         return do_encoding();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool always_noconv() const  _NOEXCEPT
     {
         return do_always_noconv();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
     {
         return do_length(__st, __frm, __end, __mx);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int max_length() const  _NOEXCEPT
     {
         return do_max_length();
@@ -1120,12 +1120,12 @@ protected:
     virtual int do_length(state_type&, const extern_type* __frm, const extern_type* __end, size_t __mx) const;
     virtual int do_max_length() const  _NOEXCEPT;
 };
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // template <> class codecvt<char16_t, char, mbstate_t> // deprecated in C++20
 
 template <>
-class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_TYPE_VIS codecvt<char16_t, char, mbstate_t>
+class _LIBCUDACXX_DEPRECATED_IN_CXX20 _LIBCUDACXX_TYPE_VIS codecvt<char16_t, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1134,11 +1134,11 @@ public:
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result out(state_type& __st,
                const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
@@ -1146,14 +1146,14 @@ public:
         return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result unshift(state_type& __st,
                    extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
     {
         return do_unshift(__st, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result in(state_type& __st,
               const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
               intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
@@ -1161,25 +1161,25 @@ public:
         return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int encoding() const  _NOEXCEPT
     {
         return do_encoding();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool always_noconv() const  _NOEXCEPT
     {
         return do_always_noconv();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
     {
         return do_length(__st, __frm, __end, __mx);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int max_length() const  _NOEXCEPT
     {
         return do_max_length();
@@ -1188,7 +1188,7 @@ public:
     static locale::id id;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt(const char*, size_t __refs = 0)
         : locale::facet(__refs) {}
 
@@ -1208,12 +1208,12 @@ protected:
     virtual int do_max_length() const  _NOEXCEPT;
 };
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 
 // template <> class codecvt<char16_t, char8_t, mbstate_t> // C++20
 
 template <>
-class _LIBCPP_TYPE_VIS codecvt<char16_t, char8_t, mbstate_t>
+class _LIBCUDACXX_TYPE_VIS codecvt<char16_t, char8_t, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1222,11 +1222,11 @@ public:
     typedef char8_t   extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result out(state_type& __st,
                const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
@@ -1234,14 +1234,14 @@ public:
         return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result unshift(state_type& __st,
                    extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
     {
         return do_unshift(__st, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result in(state_type& __st,
               const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
               intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
@@ -1249,25 +1249,25 @@ public:
         return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int encoding() const  _NOEXCEPT
     {
         return do_encoding();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool always_noconv() const  _NOEXCEPT
     {
         return do_always_noconv();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
     {
         return do_length(__st, __frm, __end, __mx);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int max_length() const  _NOEXCEPT
     {
         return do_max_length();
@@ -1276,7 +1276,7 @@ public:
     static locale::id id;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt(const char*, size_t __refs = 0)
         : locale::facet(__refs) {}
 
@@ -1301,7 +1301,7 @@ protected:
 // template <> class codecvt<char32_t, char, mbstate_t> // deprecated in C++20
 
 template <>
-class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_TYPE_VIS codecvt<char32_t, char, mbstate_t>
+class _LIBCUDACXX_DEPRECATED_IN_CXX20 _LIBCUDACXX_TYPE_VIS codecvt<char32_t, char, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1310,11 +1310,11 @@ public:
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result out(state_type& __st,
                const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
@@ -1322,14 +1322,14 @@ public:
         return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result unshift(state_type& __st,
                    extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
     {
         return do_unshift(__st, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result in(state_type& __st,
               const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
               intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
@@ -1337,25 +1337,25 @@ public:
         return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int encoding() const  _NOEXCEPT
     {
         return do_encoding();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool always_noconv() const  _NOEXCEPT
     {
         return do_always_noconv();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
     {
         return do_length(__st, __frm, __end, __mx);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int max_length() const  _NOEXCEPT
     {
         return do_max_length();
@@ -1364,7 +1364,7 @@ public:
     static locale::id id;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt(const char*, size_t __refs = 0)
         : locale::facet(__refs) {}
 
@@ -1384,12 +1384,12 @@ protected:
     virtual int do_max_length() const  _NOEXCEPT;
 };
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 
 // template <> class codecvt<char32_t, char8_t, mbstate_t> // C++20
 
 template <>
-class _LIBCPP_TYPE_VIS codecvt<char32_t, char8_t, mbstate_t>
+class _LIBCUDACXX_TYPE_VIS codecvt<char32_t, char8_t, mbstate_t>
     : public locale::facet,
       public codecvt_base
 {
@@ -1398,11 +1398,11 @@ public:
     typedef char8_t   extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result out(state_type& __st,
                const intern_type* __frm, const intern_type* __frm_end, const intern_type*& __frm_nxt,
                extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
@@ -1410,14 +1410,14 @@ public:
         return do_out(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result unshift(state_type& __st,
                    extern_type* __to, extern_type* __to_end, extern_type*& __to_nxt) const
     {
         return do_unshift(__st, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result in(state_type& __st,
               const extern_type* __frm, const extern_type* __frm_end, const extern_type*& __frm_nxt,
               intern_type* __to, intern_type* __to_end, intern_type*& __to_nxt) const
@@ -1425,25 +1425,25 @@ public:
         return do_in(__st, __frm, __frm_end, __frm_nxt, __to, __to_end, __to_nxt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int encoding() const  _NOEXCEPT
     {
         return do_encoding();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool always_noconv() const  _NOEXCEPT
     {
         return do_always_noconv();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int length(state_type& __st, const extern_type* __frm, const extern_type* __end, size_t __mx) const
     {
         return do_length(__st, __frm, __end, __mx);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int max_length() const  _NOEXCEPT
     {
         return do_max_length();
@@ -1452,7 +1452,7 @@ public:
     static locale::id id;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt(const char*, size_t __refs = 0)
         : locale::facet(__refs) {}
 
@@ -1477,36 +1477,36 @@ protected:
 // template <class _InternT, class _ExternT, class _StateT> class codecvt_byname
 
 template <class _InternT, class _ExternT, class _StateT>
-class _LIBCPP_TEMPLATE_VIS codecvt_byname
+class _LIBCUDACXX_TEMPLATE_VIS codecvt_byname
     : public codecvt<_InternT, _ExternT, _StateT>
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt_byname(const char* __nm, size_t __refs = 0)
         : codecvt<_InternT, _ExternT, _StateT>(__nm, __refs) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt_byname(const string& __nm, size_t __refs = 0)
         : codecvt<_InternT, _ExternT, _StateT>(__nm.c_str(), __refs) {}
 protected:
     ~codecvt_byname();
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _InternT, class _ExternT, class _StateT>
 codecvt_byname<_InternT, _ExternT, _StateT>::~codecvt_byname()
 {
 }
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char, char, mbstate_t>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<wchar_t, char, mbstate_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char, char, mbstate_t>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<wchar_t, char, mbstate_t>;
 #endif
-extern template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>; // deprecated in C++20
-extern template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>; // deprecated in C++20
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char8_t, mbstate_t>; // C++20
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char8_t, mbstate_t>; // C++20
+extern template class _LIBCUDACXX_DEPRECATED_IN_CXX20 _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char, mbstate_t>; // deprecated in C++20
+extern template class _LIBCUDACXX_DEPRECATED_IN_CXX20 _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char, mbstate_t>; // deprecated in C++20
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char16_t, char8_t, mbstate_t>; // C++20
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS codecvt_byname<char32_t, char8_t, mbstate_t>; // C++20
 #endif
 
 template <size_t _Np>
@@ -1521,7 +1521,7 @@ template <>
 struct __narrow_to_utf8<8>
 {
     template <class _OutputIterator, class _CharT>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _OutputIterator
     operator()(_OutputIterator __s, const _CharT* __wb, const _CharT* __we) const
     {
@@ -1531,19 +1531,19 @@ struct __narrow_to_utf8<8>
     }
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-struct _LIBCPP_TYPE_VIS __narrow_to_utf8<16>
+struct _LIBCUDACXX_TYPE_VIS __narrow_to_utf8<16>
     : public codecvt<char16_t, char, mbstate_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __narrow_to_utf8() : codecvt<char16_t, char, mbstate_t>(1) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
     ~__narrow_to_utf8();
 
     template <class _OutputIterator, class _CharT>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _OutputIterator
     operator()(_OutputIterator __s, const _CharT* __wb, const _CharT* __we) const
     {
@@ -1567,19 +1567,19 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     }
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-struct _LIBCPP_TYPE_VIS __narrow_to_utf8<32>
+struct _LIBCUDACXX_TYPE_VIS __narrow_to_utf8<32>
     : public codecvt<char32_t, char, mbstate_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __narrow_to_utf8() : codecvt<char32_t, char, mbstate_t>(1) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
     ~__narrow_to_utf8();
 
     template <class _OutputIterator, class _CharT>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _OutputIterator
     operator()(_OutputIterator __s, const _CharT* __wb, const _CharT* __we) const
     {
@@ -1615,7 +1615,7 @@ template <>
 struct __widen_from_utf8<8>
 {
     template <class _OutputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _OutputIterator
     operator()(_OutputIterator __s, const char* __nb, const char* __ne) const
     {
@@ -1625,19 +1625,19 @@ struct __widen_from_utf8<8>
     }
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-struct _LIBCPP_TYPE_VIS __widen_from_utf8<16>
+struct _LIBCUDACXX_TYPE_VIS __widen_from_utf8<16>
     : public codecvt<char16_t, char, mbstate_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __widen_from_utf8() : codecvt<char16_t, char, mbstate_t>(1) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
     ~__widen_from_utf8();
 
     template <class _OutputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _OutputIterator
     operator()(_OutputIterator __s, const char* __nb, const char* __ne) const
     {
@@ -1661,19 +1661,19 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     }
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-struct _LIBCPP_TYPE_VIS __widen_from_utf8<32>
+struct _LIBCUDACXX_TYPE_VIS __widen_from_utf8<32>
     : public codecvt<char32_t, char, mbstate_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __widen_from_utf8() : codecvt<char32_t, char, mbstate_t>(1) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
     ~__widen_from_utf8();
 
     template <class _OutputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _OutputIterator
     operator()(_OutputIterator __s, const char* __nb, const char* __ne) const
     {
@@ -1699,10 +1699,10 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
 
 // template <class charT> class numpunct
 
-template <class _CharT> class _LIBCPP_TEMPLATE_VIS numpunct;
+template <class _CharT> class _LIBCUDACXX_TEMPLATE_VIS numpunct;
 
 template <>
-class _LIBCPP_TYPE_VIS numpunct<char>
+class _LIBCUDACXX_TYPE_VIS numpunct<char>
     : public locale::facet
 {
 public:
@@ -1711,11 +1711,11 @@ public:
 
     explicit numpunct(size_t __refs = 0);
 
-    _LIBCPP_INLINE_VISIBILITY char_type decimal_point() const {return do_decimal_point();}
-    _LIBCPP_INLINE_VISIBILITY char_type thousands_sep() const {return do_thousands_sep();}
-    _LIBCPP_INLINE_VISIBILITY string grouping() const         {return do_grouping();}
-    _LIBCPP_INLINE_VISIBILITY string_type truename() const    {return do_truename();}
-    _LIBCPP_INLINE_VISIBILITY string_type falsename() const   {return do_falsename();}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type decimal_point() const {return do_decimal_point();}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type thousands_sep() const {return do_thousands_sep();}
+    _LIBCUDACXX_INLINE_VISIBILITY string grouping() const         {return do_grouping();}
+    _LIBCUDACXX_INLINE_VISIBILITY string_type truename() const    {return do_truename();}
+    _LIBCUDACXX_INLINE_VISIBILITY string_type falsename() const   {return do_falsename();}
 
     static locale::id id;
 
@@ -1732,9 +1732,9 @@ protected:
     string __grouping_;
 };
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS numpunct<wchar_t>
+class _LIBCUDACXX_TYPE_VIS numpunct<wchar_t>
     : public locale::facet
 {
 public:
@@ -1743,11 +1743,11 @@ public:
 
     explicit numpunct(size_t __refs = 0);
 
-    _LIBCPP_INLINE_VISIBILITY char_type decimal_point() const {return do_decimal_point();}
-    _LIBCPP_INLINE_VISIBILITY char_type thousands_sep() const {return do_thousands_sep();}
-    _LIBCPP_INLINE_VISIBILITY string grouping() const         {return do_grouping();}
-    _LIBCPP_INLINE_VISIBILITY string_type truename() const    {return do_truename();}
-    _LIBCPP_INLINE_VISIBILITY string_type falsename() const   {return do_falsename();}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type decimal_point() const {return do_decimal_point();}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type thousands_sep() const {return do_thousands_sep();}
+    _LIBCUDACXX_INLINE_VISIBILITY string grouping() const         {return do_grouping();}
+    _LIBCUDACXX_INLINE_VISIBILITY string_type truename() const    {return do_truename();}
+    _LIBCUDACXX_INLINE_VISIBILITY string_type falsename() const   {return do_falsename();}
 
     static locale::id id;
 
@@ -1763,14 +1763,14 @@ protected:
     char_type __thousands_sep_;
     string __grouping_;
 };
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // template <class charT> class numpunct_byname
 
-template <class _CharT> class _LIBCPP_TEMPLATE_VIS numpunct_byname;
+template <class _CharT> class _LIBCUDACXX_TEMPLATE_VIS numpunct_byname;
 
 template <>
-class _LIBCPP_TYPE_VIS numpunct_byname<char>
+class _LIBCUDACXX_TYPE_VIS numpunct_byname<char>
 : public numpunct<char>
 {
 public:
@@ -1787,9 +1787,9 @@ private:
     void __init(const char*);
 };
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS numpunct_byname<wchar_t>
+class _LIBCUDACXX_TYPE_VIS numpunct_byname<wchar_t>
 : public numpunct<wchar_t>
 {
 public:
@@ -1805,8 +1805,8 @@ protected:
 private:
     void __init(const char*);
 };
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___LOCALE
+#endif // _LIBCUDACXX___LOCALE

diff  --git a/libcxx/include/__mbstate_t.h b/libcxx/include/__mbstate_t.h
index 487a6d092c71..30e4930e647b 100644
--- a/libcxx/include/__mbstate_t.h
+++ b/libcxx/include/__mbstate_t.h
@@ -7,12 +7,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MBSTATE_T_H
-#define _LIBCPP___MBSTATE_T_H
+#ifndef _LIBCUDACXX___MBSTATE_T_H
+#define _LIBCUDACXX___MBSTATE_T_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -25,7 +25,7 @@
 // This is a gruesome hack, but I don't know how to make it cleaner for
 // the time being.
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 #   include <wchar.h> // for mbstate_t
 #elif __has_include(<bits/types/mbstate_t.h>)
 #   include <bits/types/mbstate_t.h> // works on most Unixes
@@ -35,10 +35,10 @@
 #   error "The library was configured without support for wide-characters, but we don't know how to get the definition of mbstate_t without <wchar.h> on your platform."
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-using ::mbstate_t _LIBCPP_USING_IF_EXISTS;
+using ::mbstate_t _LIBCUDACXX_USING_IF_EXISTS;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MBSTATE_T_H
+#endif // _LIBCUDACXX___MBSTATE_T_H

diff  --git a/libcxx/include/__memory/addressof.h b/libcxx/include/__memory/addressof.h
index 75e3dd0647b2..3e8c7a131e09 100644
--- a/libcxx/include/__memory/addressof.h
+++ b/libcxx/include/__memory/addressof.h
@@ -7,42 +7,42 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_ADDRESSOF_H
-#define _LIBCPP___MEMORY_ADDRESSOF_H
+#ifndef _LIBCUDACXX___MEMORY_ADDRESSOF_H
+#define _LIBCUDACXX___MEMORY_ADDRESSOF_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
-_LIBCPP_NO_CFI _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
+_LIBCUDACXX_NO_CFI _LIBCUDACXX_INLINE_VISIBILITY
 _Tp*
 addressof(_Tp& __x) _NOEXCEPT
 {
     return __builtin_addressof(__x);
 }
 
-#if defined(_LIBCPP_HAS_OBJC_ARC) && !defined(_LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF)
+#if defined(_LIBCUDACXX_HAS_OBJC_ARC) && !defined(_LIBCUDACXX_PREDEFINED_OBJC_ARC_ADDRESSOF)
 // Objective-C++ Automatic Reference Counting uses qualified pointers
 // that require special addressof() signatures. When
-// _LIBCPP_PREDEFINED_OBJC_ARC_ADDRESSOF is defined, the compiler
+// _LIBCUDACXX_PREDEFINED_OBJC_ARC_ADDRESSOF is defined, the compiler
 // itself is providing these definitions. Otherwise, we provide them.
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __strong _Tp*
 addressof(__strong _Tp& __x) _NOEXCEPT
 {
   return &__x;
 }
 
-#ifdef _LIBCPP_HAS_OBJC_ARC_WEAK
+#ifdef _LIBCUDACXX_HAS_OBJC_ARC_WEAK
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __weak _Tp*
 addressof(__weak _Tp& __x) _NOEXCEPT
 {
@@ -51,7 +51,7 @@ addressof(__weak _Tp& __x) _NOEXCEPT
 #endif
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __autoreleasing _Tp*
 addressof(__autoreleasing _Tp& __x) _NOEXCEPT
 {
@@ -59,7 +59,7 @@ addressof(__autoreleasing _Tp& __x) _NOEXCEPT
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __unsafe_unretained _Tp*
 addressof(__unsafe_unretained _Tp& __x) _NOEXCEPT
 {
@@ -67,10 +67,10 @@ addressof(__unsafe_unretained _Tp& __x) _NOEXCEPT
 }
 #endif
 
-#if !defined(_LIBCPP_CXX03_LANG)
+#if !defined(_LIBCUDACXX_CXX03_LANG)
 template <class _Tp> _Tp* addressof(const _Tp&&) noexcept = delete;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_ADDRESSOF_H
+#endif // _LIBCUDACXX___MEMORY_ADDRESSOF_H

diff  --git a/libcxx/include/__memory/allocate_at_least.h b/libcxx/include/__memory/allocate_at_least.h
index 7ce588a25d1b..f290132a51b4 100644
--- a/libcxx/include/__memory/allocate_at_least.h
+++ b/libcxx/include/__memory/allocate_at_least.h
@@ -6,20 +6,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_ALLOCATE_AT_LEAST_H
-#define _LIBCPP___MEMORY_ALLOCATE_AT_LEAST_H
+#ifndef _LIBCUDACXX___MEMORY_ALLOCATE_AT_LEAST_H
+#define _LIBCUDACXX___MEMORY_ALLOCATE_AT_LEAST_H
 
 #include <__config>
 #include <__memory/allocator_traits.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 template <class _Pointer>
 struct allocation_result {
   _Pointer ptr;
@@ -27,7 +27,7 @@ struct allocation_result {
 };
 
 template <class _Alloc>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr
 allocation_result<typename allocator_traits<_Alloc>::pointer> allocate_at_least(_Alloc& __alloc, size_t __n) {
   if constexpr (requires { __alloc.allocate_at_least(__n); }) {
     return __alloc.allocate_at_least(__n);
@@ -37,7 +37,7 @@ allocation_result<typename allocator_traits<_Alloc>::pointer> allocate_at_least(
 }
 
 template <class _Alloc>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr
 auto __allocate_at_least(_Alloc& __alloc, size_t __n) {
   return std::allocate_at_least(__alloc, __n);
 }
@@ -49,13 +49,13 @@ struct __allocation_result {
 };
 
 template <class _Alloc>
-_LIBCPP_NODISCARD _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_NODISCARD _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 __allocation_result<typename allocator_traits<_Alloc>::pointer> __allocate_at_least(_Alloc& __alloc, size_t __n) {
   return {__alloc.allocate(__n), __n};
 }
 
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_ALLOCATE_AT_LEAST_H
+#endif // _LIBCUDACXX___MEMORY_ALLOCATE_AT_LEAST_H

diff  --git a/libcxx/include/__memory/allocation_guard.h b/libcxx/include/__memory/allocation_guard.h
index 424598cc8158..8cbaa0c9aed8 100644
--- a/libcxx/include/__memory/allocation_guard.h
+++ b/libcxx/include/__memory/allocation_guard.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_ALLOCATION_GUARD_H
-#define _LIBCPP___MEMORY_ALLOCATION_GUARD_H
+#ifndef _LIBCUDACXX___MEMORY_ALLOCATION_GUARD_H
+#define _LIBCUDACXX___MEMORY_ALLOCATION_GUARD_H
 
 #include <__config>
 #include <__memory/allocator_traits.h>
 #include <__utility/move.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Helper class to allocate memory using an Allocator in an exception safe
 // manner.
@@ -46,28 +46,28 @@ struct __allocation_guard {
     using _Size = typename allocator_traits<_Alloc>::size_type;
 
     template<class _AllocT> // we perform the allocator conversion inside the constructor
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     explicit __allocation_guard(_AllocT __alloc, _Size __n)
-        : __alloc_(_VSTD::move(__alloc))
+        : __alloc_(_CUDA_VSTD::move(__alloc))
         , __n_(__n)
         , __ptr_(allocator_traits<_Alloc>::allocate(__alloc_, __n_)) // initialization order is important
     { }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     ~__allocation_guard() _NOEXCEPT {
         if (__ptr_ != nullptr) {
             allocator_traits<_Alloc>::deallocate(__alloc_, __ptr_, __n_);
         }
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     _Pointer __release_ptr() _NOEXCEPT { // not called __release() because it's a keyword in objective-c++
         _Pointer __tmp = __ptr_;
         __ptr_ = nullptr;
         return __tmp;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     _Pointer __get() const _NOEXCEPT {
         return __ptr_;
     }
@@ -78,6 +78,6 @@ struct __allocation_guard {
     _Pointer __ptr_;
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_ALLOCATION_GUARD_H
+#endif // _LIBCUDACXX___MEMORY_ALLOCATION_GUARD_H

diff  --git a/libcxx/include/__memory/allocator.h b/libcxx/include/__memory/allocator.h
index 57ce23483df3..0228177d7c1a 100644
--- a/libcxx/include/__memory/allocator.h
+++ b/libcxx/include/__memory/allocator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_ALLOCATOR_H
-#define _LIBCPP___MEMORY_ALLOCATOR_H
+#ifndef _LIBCUDACXX___MEMORY_ALLOCATOR_H
+#define _LIBCUDACXX___MEMORY_ALLOCATOR_H
 
 #include <__config>
 #include <__memory/allocate_at_least.h>
@@ -19,40 +19,40 @@
 #include <stdexcept>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp> class allocator;
 
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION)
-// These specializations shouldn't be marked _LIBCPP_DEPRECATED_IN_CXX17.
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION)
+// These specializations shouldn't be marked _LIBCUDACXX_DEPRECATED_IN_CXX17.
 // Specializing allocator<void> is deprecated, but not using it.
 template <>
-class _LIBCPP_TEMPLATE_VIS allocator<void>
+class _LIBCUDACXX_TEMPLATE_VIS allocator<void>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
 public:
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef void*             pointer;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       const_pointer;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef void              value_type;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef void*             pointer;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef const void*       const_pointer;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef void              value_type;
 
-    template <class _Up> struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {typedef allocator<_Up> other;};
+    template <class _Up> struct _LIBCUDACXX_DEPRECATED_IN_CXX17 rebind {typedef allocator<_Up> other;};
 #endif
 };
 
 template <>
-class _LIBCPP_TEMPLATE_VIS allocator<const void>
+class _LIBCUDACXX_TEMPLATE_VIS allocator<const void>
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
 public:
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       pointer;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void*       const_pointer;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef const void        value_type;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef const void*       pointer;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef const void*       const_pointer;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef const void        value_type;
 
-    template <class _Up> struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {typedef allocator<_Up> other;};
+    template <class _Up> struct _LIBCUDACXX_DEPRECATED_IN_CXX17 rebind {typedef allocator<_Up> other;};
 #endif
 };
 #endif
@@ -74,8 +74,8 @@ struct __non_trivial_if { };
 
 template <class _Unique>
 struct __non_trivial_if<true, _Unique> {
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR __non_trivial_if() _NOEXCEPT { }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR __non_trivial_if() _NOEXCEPT { }
 };
 
 // allocator
@@ -84,7 +84,7 @@ struct __non_trivial_if<true, _Unique> {
 //       allocator<void> trivial in C++20.
 
 template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS allocator
+class _LIBCUDACXX_TEMPLATE_VIS allocator
     : private __non_trivial_if<!is_void<_Tp>::value, allocator<_Tp> >
 {
     static_assert(!is_volatile<_Tp>::value, "std::allocator does not support volatile types");
@@ -95,77 +95,77 @@ class _LIBCPP_TEMPLATE_VIS allocator
     typedef true_type   propagate_on_container_move_assignment;
     typedef true_type   is_always_equal;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     allocator() _NOEXCEPT = default;
 
     template <class _Up>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     allocator(const allocator<_Up>&) _NOEXCEPT { }
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     _Tp* allocate(size_t __n) {
         if (__n > allocator_traits<allocator>::max_size(*this))
             __throw_bad_array_new_length();
-        if (__libcpp_is_constant_evaluated()) {
+        if (__LIBCUDACXX_is_constant_evaluated()) {
             return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
         } else {
-            return static_cast<_Tp*>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
+            return static_cast<_Tp*>(_CUDA_VSTD::__LIBCUDACXX_allocate(__n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp)));
         }
     }
 
-#if _LIBCPP_STD_VER > 20
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr
+#if _LIBCUDACXX_STD_VER > 20
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr
     allocation_result<_Tp*> allocate_at_least(size_t __n) {
         return {allocate(__n), __n};
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void deallocate(_Tp* __p, size_t __n) _NOEXCEPT {
-        if (__libcpp_is_constant_evaluated()) {
+        if (__LIBCUDACXX_is_constant_evaluated()) {
             ::operator delete(__p);
         } else {
-            _VSTD::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
+            _CUDA_VSTD::__LIBCUDACXX_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp));
         }
     }
 
     // C++20 Removed members
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp*       pointer;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef _Tp&       reference;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& const_reference;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef _Tp*       pointer;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef _Tp&       reference;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef const _Tp& const_reference;
 
     template <class _Up>
-    struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {
+    struct _LIBCUDACXX_DEPRECATED_IN_CXX17 rebind {
         typedef allocator<_Up> other;
     };
 
-    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     pointer address(reference __x) const _NOEXCEPT {
-        return _VSTD::addressof(__x);
+        return _CUDA_VSTD::addressof(__x);
     }
-    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     const_pointer address(const_reference __x) const _NOEXCEPT {
-        return _VSTD::addressof(__x);
+        return _CUDA_VSTD::addressof(__x);
     }
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_DEPRECATED_IN_CXX17
     _Tp* allocate(size_t __n, const void*) {
         return allocate(__n);
     }
 
-    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT {
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT {
         return size_type(~0) / sizeof(_Tp);
     }
 
     template <class _Up, class... _Args>
-    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void construct(_Up* __p, _Args&&... __args) {
-        ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
+        ::new ((void*)__p) _Up(_CUDA_VSTD::forward<_Args>(__args)...);
     }
 
-    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void destroy(pointer __p) {
         __p->~_Tp();
     }
@@ -173,7 +173,7 @@ class _LIBCPP_TEMPLATE_VIS allocator
 };
 
 template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS allocator<const _Tp>
+class _LIBCUDACXX_TEMPLATE_VIS allocator<const _Tp>
     : private __non_trivial_if<!is_void<_Tp>::value, allocator<const _Tp> >
 {
     static_assert(!is_volatile<_Tp>::value, "std::allocator does not support volatile types");
@@ -184,73 +184,73 @@ class _LIBCPP_TEMPLATE_VIS allocator<const _Tp>
     typedef true_type   propagate_on_container_move_assignment;
     typedef true_type   is_always_equal;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     allocator() _NOEXCEPT = default;
 
     template <class _Up>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     allocator(const allocator<_Up>&) _NOEXCEPT { }
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const _Tp* allocate(size_t __n) {
         if (__n > allocator_traits<allocator>::max_size(*this))
             __throw_bad_array_new_length();
-        if (__libcpp_is_constant_evaluated()) {
+        if (__LIBCUDACXX_is_constant_evaluated()) {
             return static_cast<const _Tp*>(::operator new(__n * sizeof(_Tp)));
         } else {
-            return static_cast<const _Tp*>(_VSTD::__libcpp_allocate(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)));
+            return static_cast<const _Tp*>(_CUDA_VSTD::__LIBCUDACXX_allocate(__n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp)));
         }
     }
 
-#if _LIBCPP_STD_VER > 20
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr
+#if _LIBCUDACXX_STD_VER > 20
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr
     allocation_result<const _Tp*> allocate_at_least(size_t __n) {
         return {allocate(__n), __n};
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void deallocate(const _Tp* __p, size_t __n) {
-        if (__libcpp_is_constant_evaluated()) {
+        if (__LIBCUDACXX_is_constant_evaluated()) {
             ::operator delete(const_cast<_Tp*>(__p));
         } else {
-            _VSTD::__libcpp_deallocate((void*) const_cast<_Tp *>(__p), __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
+            _CUDA_VSTD::__LIBCUDACXX_deallocate((void*) const_cast<_Tp *>(__p), __n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp));
         }
     }
 
     // C++20 Removed members
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* pointer;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& reference;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef const _Tp& const_reference;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS)
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef const _Tp* pointer;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef const _Tp* const_pointer;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef const _Tp& reference;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef const _Tp& const_reference;
 
     template <class _Up>
-    struct _LIBCPP_DEPRECATED_IN_CXX17 rebind {
+    struct _LIBCUDACXX_DEPRECATED_IN_CXX17 rebind {
         typedef allocator<_Up> other;
     };
 
-    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     const_pointer address(const_reference __x) const _NOEXCEPT {
-        return _VSTD::addressof(__x);
+        return _CUDA_VSTD::addressof(__x);
     }
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_DEPRECATED_IN_CXX17
     const _Tp* allocate(size_t __n, const void*) {
         return allocate(__n);
     }
 
-    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT {
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_INLINE_VISIBILITY size_type max_size() const _NOEXCEPT {
         return size_type(~0) / sizeof(_Tp);
     }
 
     template <class _Up, class... _Args>
-    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void construct(_Up* __p, _Args&&... __args) {
-        ::new ((void*)__p) _Up(_VSTD::forward<_Args>(__args)...);
+        ::new ((void*)__p) _Up(_CUDA_VSTD::forward<_Args>(__args)...);
     }
 
-    _LIBCPP_DEPRECATED_IN_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void destroy(pointer __p) {
         __p->~_Tp();
     }
@@ -258,13 +258,13 @@ class _LIBCPP_TEMPLATE_VIS allocator<const _Tp>
 };
 
 template <class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool operator==(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return true;}
 
 template <class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool operator!=(const allocator<_Tp>&, const allocator<_Up>&) _NOEXCEPT {return false;}
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_ALLOCATOR_H
+#endif // _LIBCUDACXX___MEMORY_ALLOCATOR_H

diff  --git a/libcxx/include/__memory/allocator_arg_t.h b/libcxx/include/__memory/allocator_arg_t.h
index 2d63b1f905e5..36dd955b442c 100644
--- a/libcxx/include/__memory/allocator_arg_t.h
+++ b/libcxx/include/__memory/allocator_arg_t.h
@@ -7,36 +7,36 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___FUNCTIONAL_ALLOCATOR_ARG_T_H
-#define _LIBCPP___FUNCTIONAL_ALLOCATOR_ARG_T_H
+#ifndef _LIBCUDACXX___FUNCTIONAL_ALLOCATOR_ARG_T_H
+#define _LIBCUDACXX___FUNCTIONAL_ALLOCATOR_ARG_T_H
 
 #include <__config>
 #include <__memory/uses_allocator.h>
 #include <__utility/forward.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-struct _LIBCPP_TEMPLATE_VIS allocator_arg_t { explicit allocator_arg_t() = default; };
+struct _LIBCUDACXX_TEMPLATE_VIS allocator_arg_t { explicit allocator_arg_t() = default; };
 
-#if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY)
-extern _LIBCPP_EXPORTED_FROM_ABI const allocator_arg_t allocator_arg;
+#if defined(_LIBCUDACXX_CXX03_LANG) || defined(_LIBCUDACXX_BUILDING_LIBRARY)
+extern _LIBCUDACXX_EXPORTED_FROM_ABI const allocator_arg_t allocator_arg;
 #else
 /* inline */ constexpr allocator_arg_t allocator_arg = allocator_arg_t();
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 // allocator construction
 
 template <class _Tp, class _Alloc, class ..._Args>
 struct __uses_alloc_ctor_imp
 {
-    typedef _LIBCPP_NODEBUG __uncvref_t<_Alloc> _RawAlloc;
+    typedef _LIBCUDACXX_NODEBUG __uncvref_t<_Alloc> _RawAlloc;
     static const bool __ua = uses_allocator<_Tp, _RawAlloc>::value;
     static const bool __ic =
         is_constructible<_Tp, allocator_arg_t, _Alloc, _Args...>::value;
@@ -49,30 +49,30 @@ struct __uses_alloc_ctor
     {};
 
 template <class _Tp, class _Allocator, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void __user_alloc_construct_impl (integral_constant<int, 0>, _Tp *__storage, const _Allocator &, _Args &&... __args )
 {
-    new (__storage) _Tp (_VSTD::forward<_Args>(__args)...);
+    new (__storage) _Tp (_CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 // FIXME: This should have a version which takes a non-const alloc.
 template <class _Tp, class _Allocator, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void __user_alloc_construct_impl (integral_constant<int, 1>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
 {
-    new (__storage) _Tp (allocator_arg, __a, _VSTD::forward<_Args>(__args)...);
+    new (__storage) _Tp (allocator_arg, __a, _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 // FIXME: This should have a version which takes a non-const alloc.
 template <class _Tp, class _Allocator, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void __user_alloc_construct_impl (integral_constant<int, 2>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
 {
-    new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a);
+    new (__storage) _Tp (_CUDA_VSTD::forward<_Args>(__args)..., __a);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FUNCTIONAL_ALLOCATOR_ARG_T_H
+#endif // _LIBCUDACXX___FUNCTIONAL_ALLOCATOR_ARG_T_H

diff  --git a/libcxx/include/__memory/allocator_traits.h b/libcxx/include/__memory/allocator_traits.h
index 5215556cdf3c..04f953de7986 100644
--- a/libcxx/include/__memory/allocator_traits.h
+++ b/libcxx/include/__memory/allocator_traits.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_ALLOCATOR_TRAITS_H
-#define _LIBCPP___MEMORY_ALLOCATOR_TRAITS_H
+#ifndef _LIBCUDACXX___MEMORY_ALLOCATOR_TRAITS_H
+#define _LIBCUDACXX___MEMORY_ALLOCATOR_TRAITS_H
 
 #include <__config>
 #include <__memory/construct_at.h>
@@ -17,138 +17,138 @@
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#define _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(NAME, PROPERTY)                \
+#define _LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(NAME, PROPERTY)                \
     template <class _Tp, class = void> struct NAME : false_type { };    \
     template <class _Tp>               struct NAME<_Tp, typename __void_t<typename _Tp:: PROPERTY >::type> : true_type { }
 
 // __pointer
-_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_pointer, pointer);
+_LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(__has_pointer, pointer);
 template <class _Tp, class _Alloc,
           class _RawAlloc = typename remove_reference<_Alloc>::type,
           bool = __has_pointer<_RawAlloc>::value>
 struct __pointer {
-    using type _LIBCPP_NODEBUG = typename _RawAlloc::pointer;
+    using type _LIBCUDACXX_NODEBUG = typename _RawAlloc::pointer;
 };
 template <class _Tp, class _Alloc, class _RawAlloc>
 struct __pointer<_Tp, _Alloc, _RawAlloc, false> {
-    using type _LIBCPP_NODEBUG = _Tp*;
+    using type _LIBCUDACXX_NODEBUG = _Tp*;
 };
 
 // __const_pointer
-_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_const_pointer, const_pointer);
+_LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(__has_const_pointer, const_pointer);
 template <class _Tp, class _Ptr, class _Alloc,
           bool = __has_const_pointer<_Alloc>::value>
 struct __const_pointer {
-    using type _LIBCPP_NODEBUG = typename _Alloc::const_pointer;
+    using type _LIBCUDACXX_NODEBUG = typename _Alloc::const_pointer;
 };
 template <class _Tp, class _Ptr, class _Alloc>
 struct __const_pointer<_Tp, _Ptr, _Alloc, false> {
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
     using type = typename pointer_traits<_Ptr>::template rebind<const _Tp>::other;
 #else
-    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind<const _Tp>;
+    using type _LIBCUDACXX_NODEBUG = typename pointer_traits<_Ptr>::template rebind<const _Tp>;
 #endif
 };
 
 // __void_pointer
-_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_void_pointer, void_pointer);
+_LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(__has_void_pointer, void_pointer);
 template <class _Ptr, class _Alloc,
           bool = __has_void_pointer<_Alloc>::value>
 struct __void_pointer {
-    using type _LIBCPP_NODEBUG = typename _Alloc::void_pointer;
+    using type _LIBCUDACXX_NODEBUG = typename _Alloc::void_pointer;
 };
 template <class _Ptr, class _Alloc>
 struct __void_pointer<_Ptr, _Alloc, false> {
-#ifdef _LIBCPP_CXX03_LANG
-    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind<void>::other;
+#ifdef _LIBCUDACXX_CXX03_LANG
+    using type _LIBCUDACXX_NODEBUG = typename pointer_traits<_Ptr>::template rebind<void>::other;
 #else
-    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind<void>;
+    using type _LIBCUDACXX_NODEBUG = typename pointer_traits<_Ptr>::template rebind<void>;
 #endif
 };
 
 // __const_void_pointer
-_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_const_void_pointer, const_void_pointer);
+_LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(__has_const_void_pointer, const_void_pointer);
 template <class _Ptr, class _Alloc,
           bool = __has_const_void_pointer<_Alloc>::value>
 struct __const_void_pointer {
-    using type _LIBCPP_NODEBUG = typename _Alloc::const_void_pointer;
+    using type _LIBCUDACXX_NODEBUG = typename _Alloc::const_void_pointer;
 };
 template <class _Ptr, class _Alloc>
 struct __const_void_pointer<_Ptr, _Alloc, false> {
-#ifdef _LIBCPP_CXX03_LANG
-    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind<const void>::other;
+#ifdef _LIBCUDACXX_CXX03_LANG
+    using type _LIBCUDACXX_NODEBUG = typename pointer_traits<_Ptr>::template rebind<const void>::other;
 #else
-    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::template rebind<const void>;
+    using type _LIBCUDACXX_NODEBUG = typename pointer_traits<_Ptr>::template rebind<const void>;
 #endif
 };
 
 // __size_type
-_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_size_type, size_type);
+_LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(__has_size_type, size_type);
 template <class _Alloc, class _DiffType, bool = __has_size_type<_Alloc>::value>
 struct __size_type : make_unsigned<_DiffType> { };
 template <class _Alloc, class _DiffType>
 struct __size_type<_Alloc, _DiffType, true> {
-    using type _LIBCPP_NODEBUG = typename _Alloc::size_type;
+    using type _LIBCUDACXX_NODEBUG = typename _Alloc::size_type;
 };
 
 // __alloc_traits_
diff erence_type
-_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_alloc_traits_
diff erence_type, 
diff erence_type);
+_LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(__has_alloc_traits_
diff erence_type, 
diff erence_type);
 template <class _Alloc, class _Ptr, bool = __has_alloc_traits_
diff erence_type<_Alloc>::value>
 struct __alloc_traits_
diff erence_type {
-    using type _LIBCPP_NODEBUG = typename pointer_traits<_Ptr>::
diff erence_type;
+    using type _LIBCUDACXX_NODEBUG = typename pointer_traits<_Ptr>::
diff erence_type;
 };
 template <class _Alloc, class _Ptr>
 struct __alloc_traits_
diff erence_type<_Alloc, _Ptr, true> {
-    using type _LIBCPP_NODEBUG = typename _Alloc::
diff erence_type;
+    using type _LIBCUDACXX_NODEBUG = typename _Alloc::
diff erence_type;
 };
 
 // __propagate_on_container_copy_assignment
-_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_copy_assignment, propagate_on_container_copy_assignment);
+_LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_copy_assignment, propagate_on_container_copy_assignment);
 template <class _Alloc, bool = __has_propagate_on_container_copy_assignment<_Alloc>::value>
 struct __propagate_on_container_copy_assignment : false_type { };
 template <class _Alloc>
 struct __propagate_on_container_copy_assignment<_Alloc, true> {
-    using type _LIBCPP_NODEBUG = typename _Alloc::propagate_on_container_copy_assignment;
+    using type _LIBCUDACXX_NODEBUG = typename _Alloc::propagate_on_container_copy_assignment;
 };
 
 // __propagate_on_container_move_assignment
-_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_move_assignment, propagate_on_container_move_assignment);
+_LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_move_assignment, propagate_on_container_move_assignment);
 template <class _Alloc, bool = __has_propagate_on_container_move_assignment<_Alloc>::value>
 struct __propagate_on_container_move_assignment : false_type { };
 template <class _Alloc>
 struct __propagate_on_container_move_assignment<_Alloc, true> {
-    using type _LIBCPP_NODEBUG = typename _Alloc::propagate_on_container_move_assignment;
+    using type _LIBCUDACXX_NODEBUG = typename _Alloc::propagate_on_container_move_assignment;
 };
 
 // __propagate_on_container_swap
-_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_swap, propagate_on_container_swap);
+_LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(__has_propagate_on_container_swap, propagate_on_container_swap);
 template <class _Alloc, bool = __has_propagate_on_container_swap<_Alloc>::value>
 struct __propagate_on_container_swap : false_type { };
 template <class _Alloc>
 struct __propagate_on_container_swap<_Alloc, true> {
-    using type _LIBCPP_NODEBUG = typename _Alloc::propagate_on_container_swap;
+    using type _LIBCUDACXX_NODEBUG = typename _Alloc::propagate_on_container_swap;
 };
 
 // __is_always_equal
-_LIBCPP_ALLOCATOR_TRAITS_HAS_XXX(__has_is_always_equal, is_always_equal);
+_LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX(__has_is_always_equal, is_always_equal);
 template <class _Alloc, bool = __has_is_always_equal<_Alloc>::value>
 struct __is_always_equal : is_empty<_Alloc> { };
 template <class _Alloc>
 struct __is_always_equal<_Alloc, true> {
-    using type _LIBCPP_NODEBUG = typename _Alloc::is_always_equal;
+    using type _LIBCUDACXX_NODEBUG = typename _Alloc::is_always_equal;
 };
 
 // __allocator_traits_rebind
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Tp, class _Up, class = void>
 struct __has_rebind_other : false_type { };
 template <class _Tp, class _Up>
@@ -158,22 +158,22 @@ struct __has_rebind_other<_Tp, _Up, typename __void_t<
 
 template <class _Tp, class _Up, bool = __has_rebind_other<_Tp, _Up>::value>
 struct __allocator_traits_rebind {
-    using type _LIBCPP_NODEBUG = typename _Tp::template rebind<_Up>::other;
+    using type _LIBCUDACXX_NODEBUG = typename _Tp::template rebind<_Up>::other;
 };
 template <template <class, class...> class _Alloc, class _Tp, class ..._Args, class _Up>
 struct __allocator_traits_rebind<_Alloc<_Tp, _Args...>, _Up, true> {
-    using type _LIBCPP_NODEBUG = typename _Alloc<_Tp, _Args...>::template rebind<_Up>::other;
+    using type _LIBCUDACXX_NODEBUG = typename _Alloc<_Tp, _Args...>::template rebind<_Up>::other;
 };
 template <template <class, class...> class _Alloc, class _Tp, class ..._Args, class _Up>
 struct __allocator_traits_rebind<_Alloc<_Tp, _Args...>, _Up, false> {
-    using type _LIBCPP_NODEBUG = _Alloc<_Up, _Args...>;
+    using type _LIBCUDACXX_NODEBUG = _Alloc<_Up, _Args...>;
 };
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 template<class _Alloc, class _Tp>
 using __allocator_traits_rebind_t = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 
 // __has_allocate_hint
 template <class _Alloc, class _SizeType, class _ConstVoidPtr, class = void>
@@ -223,10 +223,10 @@ struct __has_select_on_container_copy_construction<_Alloc, decltype(
     (void)declval<_Alloc>().select_on_container_copy_construction()
 )> : true_type { };
 
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 template <class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS allocator_traits
+struct _LIBCUDACXX_TEMPLATE_VIS allocator_traits
 {
     using allocator_type = _Alloc;
     using value_type = typename allocator_type::value_type;
@@ -241,12 +241,12 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
     using propagate_on_container_swap = typename __propagate_on_container_swap<allocator_type>::type;
     using is_always_equal = typename __is_always_equal<allocator_type>::type;
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _Tp>
     using rebind_alloc = __allocator_traits_rebind_t<allocator_type, _Tp>;
     template <class _Tp>
     using rebind_traits = allocator_traits<rebind_alloc<_Tp> >;
-#else  // _LIBCPP_CXX03_LANG
+#else  // _LIBCUDACXX_CXX03_LANG
     template <class _Tp>
     struct rebind_alloc {
         using other = __allocator_traits_rebind_t<allocator_type, _Tp>;
@@ -255,66 +255,66 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
     struct rebind_traits {
         using other = allocator_traits<typename rebind_alloc<_Tp>::other>;
     };
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static pointer allocate(allocator_type& __a, size_type __n) {
         return __a.allocate(__n);
     }
 
     template <class _Ap = _Alloc, class =
         __enable_if_t<__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> >
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer __hint) {
-        _LIBCPP_SUPPRESS_DEPRECATED_PUSH
+        _LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
         return __a.allocate(__n, __hint);
-        _LIBCPP_SUPPRESS_DEPRECATED_POP
+        _LIBCUDACXX_SUPPRESS_DEPRECATED_POP
     }
     template <class _Ap = _Alloc, class = void, class =
         __enable_if_t<!__has_allocate_hint<_Ap, size_type, const_void_pointer>::value> >
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static pointer allocate(allocator_type& __a, size_type __n, const_void_pointer) {
         return __a.allocate(__n);
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static void deallocate(allocator_type& __a, pointer __p, size_type __n) _NOEXCEPT {
         __a.deallocate(__p, __n);
     }
 
     template <class _Tp, class... _Args, class =
         __enable_if_t<__has_construct<allocator_type, _Tp*, _Args...>::value> >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static void construct(allocator_type& __a, _Tp* __p, _Args&&... __args) {
-        _LIBCPP_SUPPRESS_DEPRECATED_PUSH
-        __a.construct(__p, _VSTD::forward<_Args>(__args)...);
-        _LIBCPP_SUPPRESS_DEPRECATED_POP
+        _LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
+        __a.construct(__p, _CUDA_VSTD::forward<_Args>(__args)...);
+        _LIBCUDACXX_SUPPRESS_DEPRECATED_POP
     }
     template <class _Tp, class... _Args, class = void, class =
         __enable_if_t<!__has_construct<allocator_type, _Tp*, _Args...>::value> >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static void construct(allocator_type&, _Tp* __p, _Args&&... __args) {
-#if _LIBCPP_STD_VER > 17
-        _VSTD::construct_at(__p, _VSTD::forward<_Args>(__args)...);
+#if _LIBCUDACXX_STD_VER > 17
+        _CUDA_VSTD::construct_at(__p, _CUDA_VSTD::forward<_Args>(__args)...);
 #else
-        ::new ((void*)__p) _Tp(_VSTD::forward<_Args>(__args)...);
+        ::new ((void*)__p) _Tp(_CUDA_VSTD::forward<_Args>(__args)...);
 #endif
     }
 
     template <class _Tp, class =
         __enable_if_t<__has_destroy<allocator_type, _Tp*>::value> >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static void destroy(allocator_type& __a, _Tp* __p) {
-        _LIBCPP_SUPPRESS_DEPRECATED_PUSH
+        _LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
         __a.destroy(__p);
-        _LIBCPP_SUPPRESS_DEPRECATED_POP
+        _LIBCUDACXX_SUPPRESS_DEPRECATED_POP
     }
     template <class _Tp, class = void, class =
         __enable_if_t<!__has_destroy<allocator_type, _Tp*>::value> >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static void destroy(allocator_type&, _Tp* __p) {
-#if _LIBCPP_STD_VER > 17
-        _VSTD::destroy_at(__p);
+#if _LIBCUDACXX_STD_VER > 17
+        _CUDA_VSTD::destroy_at(__p);
 #else
         __p->~_Tp();
 #endif
@@ -322,28 +322,28 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
 
     template <class _Ap = _Alloc, class =
         __enable_if_t<__has_max_size<const _Ap>::value> >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static size_type max_size(const allocator_type& __a) _NOEXCEPT {
-        _LIBCPP_SUPPRESS_DEPRECATED_PUSH
+        _LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
         return __a.max_size();
-        _LIBCPP_SUPPRESS_DEPRECATED_POP
+        _LIBCUDACXX_SUPPRESS_DEPRECATED_POP
     }
     template <class _Ap = _Alloc, class = void, class =
         __enable_if_t<!__has_max_size<const _Ap>::value> >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static size_type max_size(const allocator_type&) _NOEXCEPT {
         return numeric_limits<size_type>::max() / sizeof(value_type);
     }
 
     template <class _Ap = _Alloc, class =
         __enable_if_t<__has_select_on_container_copy_construction<const _Ap>::value> >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static allocator_type select_on_container_copy_construction(const allocator_type& __a) {
         return __a.select_on_container_copy_construction();
     }
     template <class _Ap = _Alloc, class = void, class =
         __enable_if_t<!__has_select_on_container_copy_construction<const _Ap>::value> >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static allocator_type select_on_container_copy_construction(const allocator_type& __a) {
         return __a;
     }
@@ -351,8 +351,8 @@ struct _LIBCPP_TEMPLATE_VIS allocator_traits
 
 template <class _Traits, class _Tp>
 struct __rebind_alloc_helper {
-#ifndef _LIBCPP_CXX03_LANG
-    using type _LIBCPP_NODEBUG = typename _Traits::template rebind_alloc<_Tp>;
+#ifndef _LIBCUDACXX_CXX03_LANG
+    using type _LIBCUDACXX_NODEBUG = typename _Traits::template rebind_alloc<_Tp>;
 #else
     using type = typename _Traits::template rebind_alloc<_Tp>::other;
 #endif
@@ -396,10 +396,10 @@ struct __is_cpp17_copy_insertable<_Alloc, __enable_if_t<
     : __is_cpp17_move_insertable<_Alloc>
 { };
 
-#undef _LIBCPP_ALLOCATOR_TRAITS_HAS_XXX
+#undef _LIBCUDACXX_ALLOCATOR_TRAITS_HAS_XXX
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___MEMORY_ALLOCATOR_TRAITS_H
+#endif // _LIBCUDACXX___MEMORY_ALLOCATOR_TRAITS_H

diff  --git a/libcxx/include/__memory/assume_aligned.h b/libcxx/include/__memory/assume_aligned.h
index 0f12fb11fd86..e6d7c51a879a 100644
--- a/libcxx/include/__memory/assume_aligned.h
+++ b/libcxx/include/__memory/assume_aligned.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_ASSUME_ALIGNED_H
-#define _LIBCPP___MEMORY_ASSUME_ALIGNED_H
+#ifndef _LIBCUDACXX___MEMORY_ASSUME_ALIGNED_H
+#define _LIBCUDACXX___MEMORY_ASSUME_ALIGNED_H
 
 #include <__assert>
 #include <__config>
@@ -16,17 +16,17 @@
 #include <cstdint>
 #include <type_traits> // for is_constant_evaluated()
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <size_t _Np, class _Tp>
 [[nodiscard]]
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr _Tp* assume_aligned(_Tp* __ptr) {
   static_assert(_Np != 0 && (_Np & (_Np - 1)) == 0,
     "std::assume_aligned<N>(p) requires N to be a power of two");
@@ -34,13 +34,13 @@ constexpr _Tp* assume_aligned(_Tp* __ptr) {
   if (is_constant_evaluated()) {
     return __ptr;
   } else {
-    _LIBCPP_ASSERT(reinterpret_cast<uintptr_t>(__ptr) % _Np == 0, "Alignment assumption is violated");
+    _LIBCUDACXX_ASSERT(reinterpret_cast<uintptr_t>(__ptr) % _Np == 0, "Alignment assumption is violated");
     return static_cast<_Tp*>(__builtin_assume_aligned(__ptr, _Np));
   }
 }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_ASSUME_ALIGNED_H
+#endif // _LIBCUDACXX___MEMORY_ASSUME_ALIGNED_H

diff  --git a/libcxx/include/__memory/auto_ptr.h b/libcxx/include/__memory/auto_ptr.h
index c007b4d21a5d..af5ac3be52ea 100644
--- a/libcxx/include/__memory/auto_ptr.h
+++ b/libcxx/include/__memory/auto_ptr.h
@@ -7,78 +7,78 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_AUTO_PTR_H
-#define _LIBCPP___MEMORY_AUTO_PTR_H
+#ifndef _LIBCUDACXX___MEMORY_AUTO_PTR_H
+#define _LIBCUDACXX___MEMORY_AUTO_PTR_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-struct _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr_ref
+struct _LIBCUDACXX_DEPRECATED_IN_CXX11 auto_ptr_ref
 {
     _Tp* __ptr_;
 };
 
 template<class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 auto_ptr
 {
 private:
     _Tp* __ptr_;
 public:
     typedef _Tp element_type;
 
-    _LIBCPP_INLINE_VISIBILITY explicit auto_ptr(_Tp* __p = 0) _NOEXCEPT : __ptr_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr& __p) _NOEXCEPT : __ptr_(__p.release()) {}
-    template<class _Up> _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr<_Up>& __p) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY explicit auto_ptr(_Tp* __p = 0) _NOEXCEPT : __ptr_(__p) {}
+    _LIBCUDACXX_INLINE_VISIBILITY auto_ptr(auto_ptr& __p) _NOEXCEPT : __ptr_(__p.release()) {}
+    template<class _Up> _LIBCUDACXX_INLINE_VISIBILITY auto_ptr(auto_ptr<_Up>& __p) _NOEXCEPT
         : __ptr_(__p.release()) {}
-    _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr& __p) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr& __p) _NOEXCEPT
         {reset(__p.release()); return *this;}
-    template<class _Up> _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr<_Up>& __p) _NOEXCEPT
+    template<class _Up> _LIBCUDACXX_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr<_Up>& __p) _NOEXCEPT
         {reset(__p.release()); return *this;}
-    _LIBCPP_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr_ref<_Tp> __p) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY auto_ptr& operator=(auto_ptr_ref<_Tp> __p) _NOEXCEPT
         {reset(__p.__ptr_); return *this;}
-    _LIBCPP_INLINE_VISIBILITY ~auto_ptr() _NOEXCEPT {delete __ptr_;}
+    _LIBCUDACXX_INLINE_VISIBILITY ~auto_ptr() _NOEXCEPT {delete __ptr_;}
 
-    _LIBCPP_INLINE_VISIBILITY _Tp& operator*() const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY _Tp& operator*() const _NOEXCEPT
         {return *__ptr_;}
-    _LIBCPP_INLINE_VISIBILITY _Tp* operator->() const _NOEXCEPT {return __ptr_;}
-    _LIBCPP_INLINE_VISIBILITY _Tp* get() const _NOEXCEPT {return __ptr_;}
-    _LIBCPP_INLINE_VISIBILITY _Tp* release() _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY _Tp* operator->() const _NOEXCEPT {return __ptr_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _Tp* get() const _NOEXCEPT {return __ptr_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _Tp* release() _NOEXCEPT
     {
         _Tp* __t = __ptr_;
         __ptr_ = nullptr;
         return __t;
     }
-    _LIBCPP_INLINE_VISIBILITY void reset(_Tp* __p = 0) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY void reset(_Tp* __p = 0) _NOEXCEPT
     {
         if (__ptr_ != __p)
             delete __ptr_;
         __ptr_ = __p;
     }
 
-    _LIBCPP_INLINE_VISIBILITY auto_ptr(auto_ptr_ref<_Tp> __p) _NOEXCEPT : __ptr_(__p.__ptr_) {}
-    template<class _Up> _LIBCPP_INLINE_VISIBILITY operator auto_ptr_ref<_Up>() _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY auto_ptr(auto_ptr_ref<_Tp> __p) _NOEXCEPT : __ptr_(__p.__ptr_) {}
+    template<class _Up> _LIBCUDACXX_INLINE_VISIBILITY operator auto_ptr_ref<_Up>() _NOEXCEPT
         {auto_ptr_ref<_Up> __t; __t.__ptr_ = release(); return __t;}
-    template<class _Up> _LIBCPP_INLINE_VISIBILITY operator auto_ptr<_Up>() _NOEXCEPT
+    template<class _Up> _LIBCUDACXX_INLINE_VISIBILITY operator auto_ptr<_Up>() _NOEXCEPT
         {return auto_ptr<_Up>(release());}
 };
 
 template <>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX11 auto_ptr<void>
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX11 auto_ptr<void>
 {
 public:
     typedef void element_type;
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
+#endif // _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR)
 
-#endif // _LIBCPP___MEMORY_AUTO_PTR_H
+#endif // _LIBCUDACXX___MEMORY_AUTO_PTR_H

diff  --git a/libcxx/include/__memory/compressed_pair.h b/libcxx/include/__memory/compressed_pair.h
index 89e5820e992a..a36967c9b2ff 100644
--- a/libcxx/include/__memory/compressed_pair.h
+++ b/libcxx/include/__memory/compressed_pair.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_COMPRESSED_PAIR_H
-#define _LIBCPP___MEMORY_COMPRESSED_PAIR_H
+#ifndef _LIBCUDACXX___MEMORY_COMPRESSED_PAIR_H
+#define _LIBCUDACXX___MEMORY_COMPRESSED_PAIR_H
 
 #include <__config>
 #include <__utility/forward.h>
@@ -16,38 +16,38 @@
 #include <tuple> // needed in c++03 for some constructors
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Tag used to default initialize one or both of the pair's elements.
 struct __default_init_tag {};
 struct __value_init_tag {};
 
-template <class _Tp, int _Idx, bool _CanBeEmptyBase = is_empty<_Tp>::value && !__libcpp_is_final<_Tp>::value>
+template <class _Tp, int _Idx, bool _CanBeEmptyBase = is_empty<_Tp>::value && !__LIBCUDACXX_is_final<_Tp>::value>
 struct __compressed_pair_elem {
   using _ParamT = _Tp;
   using reference = _Tp&;
   using const_reference = const _Tp&;
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {}
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_() {}
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {}
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_() {}
 
   template <class _Up, class = __enable_if_t<!is_same<__compressed_pair_elem, typename decay<_Up>::type>::value> >
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
   explicit __compressed_pair_elem(_Up&& __u) : __value_(std::forward<_Up>(__u)) {}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
   template <class... _Args, size_t... _Indices>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
   explicit __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, __tuple_indices<_Indices...>)
       : __value_(std::forward<_Args>(std::get<_Indices>(__args))...) {}
 #endif
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return __value_; }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return __value_; }
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return __value_; }
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR const_reference __get() const _NOEXCEPT { return __value_; }
 
 private:
   _Tp __value_;
@@ -60,23 +60,23 @@ struct __compressed_pair_elem<_Tp, _Idx, true> : private _Tp {
   using const_reference = const _Tp&;
   using __value_type = _Tp;
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem() = default;
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {}
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_type() {}
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR explicit __compressed_pair_elem() = default;
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR explicit __compressed_pair_elem(__default_init_tag) {}
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR explicit __compressed_pair_elem(__value_init_tag) : __value_type() {}
 
   template <class _Up, class = __enable_if_t<!is_same<__compressed_pair_elem, typename decay<_Up>::type>::value> >
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
   explicit __compressed_pair_elem(_Up&& __u) : __value_type(std::forward<_Up>(__u)) {}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
   template <class... _Args, size_t... _Indices>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
   __compressed_pair_elem(piecewise_construct_t, tuple<_Args...> __args, __tuple_indices<_Indices...>)
       : __value_type(std::forward<_Args>(std::get<_Indices>(__args))...) {}
 #endif
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return *this; }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference __get() const _NOEXCEPT { return *this; }
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 reference __get() _NOEXCEPT { return *this; }
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR const_reference __get() const _NOEXCEPT { return *this; }
 };
 
 template <class _T1, class _T2>
@@ -91,8 +91,8 @@ class __compressed_pair : private __compressed_pair_elem<_T1, 0>,
     "__compressed_pair cannot be instantiated when T1 and T2 are the same type; "
     "The current implementation is NOT ABI-compatible with the previous implementation for this configuration");
 
-  using _Base1 _LIBCPP_NODEBUG = __compressed_pair_elem<_T1, 0>;
-  using _Base2 _LIBCPP_NODEBUG = __compressed_pair_elem<_T2, 1>;
+  using _Base1 _LIBCUDACXX_NODEBUG = __compressed_pair_elem<_T1, 0>;
+  using _Base2 _LIBCUDACXX_NODEBUG = __compressed_pair_elem<_T2, 1>;
 
   template <bool _Dummy = true,
     class = __enable_if_t<
@@ -100,52 +100,52 @@ class __compressed_pair : private __compressed_pair_elem<_T1, 0>,
         __dependent_type<is_default_constructible<_T2>, _Dummy>::value
     >
   >
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
   explicit __compressed_pair() : _Base1(__value_init_tag()), _Base2(__value_init_tag()) {}
 
   template <class _U1, class _U2>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
   explicit __compressed_pair(_U1&& __t1, _U2&& __t2) : _Base1(std::forward<_U1>(__t1)), _Base2(std::forward<_U2>(__t2)) {}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
   template <class... _Args1, class... _Args2>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX14
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
   explicit __compressed_pair(piecewise_construct_t __pc, tuple<_Args1...> __first_args,
                              tuple<_Args2...> __second_args)
       : _Base1(__pc, std::move(__first_args), typename __make_tuple_indices<sizeof...(_Args1)>::type()),
         _Base2(__pc, std::move(__second_args), typename __make_tuple_indices<sizeof...(_Args2)>::type()) {}
 #endif
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   typename _Base1::reference first() _NOEXCEPT {
     return static_cast<_Base1&>(*this).__get();
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
   typename _Base1::const_reference first() const _NOEXCEPT {
     return static_cast<_Base1 const&>(*this).__get();
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   typename _Base2::reference second() _NOEXCEPT {
     return static_cast<_Base2&>(*this).__get();
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
   typename _Base2::const_reference second() const _NOEXCEPT {
     return static_cast<_Base2 const&>(*this).__get();
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR static
   _Base1* __get_first_base(__compressed_pair* __pair) _NOEXCEPT {
     return static_cast<_Base1*>(__pair);
   }
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR static
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR static
   _Base2* __get_second_base(__compressed_pair* __pair) _NOEXCEPT {
     return static_cast<_Base2*>(__pair);
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   void swap(__compressed_pair& __x)
       _NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) {
     using std::swap;
@@ -155,12 +155,12 @@ class __compressed_pair : private __compressed_pair_elem<_T1, 0>,
 };
 
 template <class _T1, class _T2>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void swap(__compressed_pair<_T1, _T2>& __x, __compressed_pair<_T1, _T2>& __y)
     _NOEXCEPT_(__is_nothrow_swappable<_T1>::value && __is_nothrow_swappable<_T2>::value) {
   __x.swap(__y);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_COMPRESSED_PAIR_H
+#endif // _LIBCUDACXX___MEMORY_COMPRESSED_PAIR_H

diff  --git a/libcxx/include/__memory/concepts.h b/libcxx/include/__memory/concepts.h
index 88372d277d7f..c70a90197f2c 100644
--- a/libcxx/include/__memory/concepts.h
+++ b/libcxx/include/__memory/concepts.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_CONCEPTS_H
-#define _LIBCPP___MEMORY_CONCEPTS_H
+#ifndef _LIBCUDACXX___MEMORY_CONCEPTS_H
+#define _LIBCUDACXX___MEMORY_CONCEPTS_H
 
 #include <__config>
 #include <__iterator/concepts.h>
@@ -19,13 +19,13 @@
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
@@ -61,8 +61,8 @@ concept __nothrow_forward_range =
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_CONCEPTS_H
+#endif // _LIBCUDACXX___MEMORY_CONCEPTS_H

diff  --git a/libcxx/include/__memory/construct_at.h b/libcxx/include/__memory/construct_at.h
index f5985b7731fd..f94c66306dcf 100644
--- a/libcxx/include/__memory/construct_at.h
+++ b/libcxx/include/__memory/construct_at.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_CONSTRUCT_AT_H
-#define _LIBCPP___MEMORY_CONSTRUCT_AT_H
+#ifndef _LIBCUDACXX___MEMORY_CONSTRUCT_AT_H
+#define _LIBCUDACXX___MEMORY_CONSTRUCT_AT_H
 
 #include <__assert>
 #include <__config>
@@ -19,30 +19,30 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // construct_at
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _Tp, class... _Args, class = decltype(::new(declval<void*>()) _Tp(declval<_Args>()...))>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp* construct_at(_Tp* __location, _Args&&... __args) {
-  _LIBCPP_ASSERT(__location != nullptr, "null pointer given to construct_at");
-  return ::new (_VSTD::__voidify(*__location)) _Tp(_VSTD::forward<_Args>(__args)...);
+_LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp* construct_at(_Tp* __location, _Args&&... __args) {
+  _LIBCUDACXX_ASSERT(__location != nullptr, "null pointer given to construct_at");
+  return ::new (_CUDA_VSTD::__voidify(*__location)) _Tp(_CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 #endif
 
 template <class _Tp, class... _Args, class = decltype(::new(declval<void*>()) _Tp(declval<_Args>()...))>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __construct_at(_Tp* __location, _Args&&... __args) {
-#if _LIBCPP_STD_VER > 17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR _Tp* __construct_at(_Tp* __location, _Args&&... __args) {
+#if _LIBCUDACXX_STD_VER > 17
   return std::construct_at(__location, std::forward<_Args>(__args)...);
 #else
-  return _LIBCPP_ASSERT(__location != nullptr, "null pointer given to construct_at"),
+  return _LIBCUDACXX_ASSERT(__location != nullptr, "null pointer given to construct_at"),
          ::new (std::__voidify(*__location)) _Tp(std::forward<_Args>(__args)...);
 #endif
 }
@@ -53,65 +53,65 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR _Tp* __construct_at(_Tp* __location, _Ar
 // taking an array).
 
 template <class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator __destroy(_ForwardIterator, _ForwardIterator);
 
 template <class _Tp, typename enable_if<!is_array<_Tp>::value, int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void __destroy_at(_Tp* __loc) {
-    _LIBCPP_ASSERT(__loc != nullptr, "null pointer given to destroy_at");
+    _LIBCUDACXX_ASSERT(__loc != nullptr, "null pointer given to destroy_at");
     __loc->~_Tp();
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Tp, typename enable_if<is_array<_Tp>::value, int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void __destroy_at(_Tp* __loc) {
-    _LIBCPP_ASSERT(__loc != nullptr, "null pointer given to destroy_at");
-    _VSTD::__destroy(_VSTD::begin(*__loc), _VSTD::end(*__loc));
+    _LIBCUDACXX_ASSERT(__loc != nullptr, "null pointer given to destroy_at");
+    _CUDA_VSTD::__destroy(_CUDA_VSTD::begin(*__loc), _CUDA_VSTD::end(*__loc));
 }
 #endif
 
 template <class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator __destroy(_ForwardIterator __first, _ForwardIterator __last) {
     for (; __first != __last; ++__first)
-        _VSTD::__destroy_at(_VSTD::addressof(*__first));
+        _CUDA_VSTD::__destroy_at(_CUDA_VSTD::addressof(*__first));
     return __first;
 }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _Tp, enable_if_t<!is_array_v<_Tp>, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void destroy_at(_Tp* __loc) {
-    _VSTD::__destroy_at(__loc);
+    _CUDA_VSTD::__destroy_at(__loc);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Tp, enable_if_t<is_array_v<_Tp>, int> = 0>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void destroy_at(_Tp* __loc) {
-  _VSTD::__destroy_at(__loc);
+  _CUDA_VSTD::__destroy_at(__loc);
 }
 #endif
 
 template <class _ForwardIterator>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void destroy(_ForwardIterator __first, _ForwardIterator __last) {
-  (void)_VSTD::__destroy(_VSTD::move(__first), _VSTD::move(__last));
+  (void)_CUDA_VSTD::__destroy(_CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last));
 }
 
 template <class _ForwardIterator, class _Size>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _ForwardIterator destroy_n(_ForwardIterator __first, _Size __n) {
     for (; __n > 0; (void)++__first, --__n)
-        _VSTD::__destroy_at(_VSTD::addressof(*__first));
+        _CUDA_VSTD::__destroy_at(_CUDA_VSTD::addressof(*__first));
     return __first;
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_CONSTRUCT_AT_H
+#endif // _LIBCUDACXX___MEMORY_CONSTRUCT_AT_H

diff  --git a/libcxx/include/__memory/pointer_traits.h b/libcxx/include/__memory/pointer_traits.h
index 348f7323a41d..ddd4bbe23926 100644
--- a/libcxx/include/__memory/pointer_traits.h
+++ b/libcxx/include/__memory/pointer_traits.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_POINTER_TRAITS_H
-#define _LIBCPP___MEMORY_POINTER_TRAITS_H
+#ifndef _LIBCUDACXX___MEMORY_POINTER_TRAITS_H
+#define _LIBCUDACXX___MEMORY_POINTER_TRAITS_H
 
 #include <__config>
 #include <__memory/addressof.h>
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class = void>
 struct __has_element_type : false_type {};
@@ -34,19 +34,19 @@ struct __pointer_traits_element_type;
 template <class _Ptr>
 struct __pointer_traits_element_type<_Ptr, true>
 {
-    typedef _LIBCPP_NODEBUG typename _Ptr::element_type type;
+    typedef _LIBCUDACXX_NODEBUG typename _Ptr::element_type type;
 };
 
 template <template <class, class...> class _Sp, class _Tp, class ..._Args>
 struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, true>
 {
-    typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::element_type type;
+    typedef _LIBCUDACXX_NODEBUG typename _Sp<_Tp, _Args...>::element_type type;
 };
 
 template <template <class, class...> class _Sp, class _Tp, class ..._Args>
 struct __pointer_traits_element_type<_Sp<_Tp, _Args...>, false>
 {
-    typedef _LIBCPP_NODEBUG _Tp type;
+    typedef _LIBCUDACXX_NODEBUG _Tp type;
 };
 
 template <class _Tp, class = void>
@@ -59,13 +59,13 @@ struct __has_
diff erence_type<_Tp,
 template <class _Ptr, bool = __has_
diff erence_type<_Ptr>::value>
 struct __pointer_traits_
diff erence_type
 {
-    typedef _LIBCPP_NODEBUG ptr
diff _t type;
+    typedef _LIBCUDACXX_NODEBUG ptr
diff _t type;
 };
 
 template <class _Ptr>
 struct __pointer_traits_
diff erence_type<_Ptr, true>
 {
-    typedef _LIBCPP_NODEBUG typename _Ptr::
diff erence_type type;
+    typedef _LIBCUDACXX_NODEBUG typename _Ptr::
diff erence_type type;
 };
 
 template <class _Tp, class _Up>
@@ -73,9 +73,9 @@ struct __has_rebind
 {
 private:
     template <class _Xp> static false_type __test(...);
-    _LIBCPP_SUPPRESS_DEPRECATED_PUSH
+    _LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
     template <class _Xp> static true_type __test(typename _Xp::template rebind<_Up>* = 0);
-    _LIBCPP_SUPPRESS_DEPRECATED_POP
+    _LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 public:
     static const bool value = decltype(__test<_Tp>(0))::value;
 };
@@ -83,20 +83,20 @@ struct __has_rebind
 template <class _Tp, class _Up, bool = __has_rebind<_Tp, _Up>::value>
 struct __pointer_traits_rebind
 {
-#ifndef _LIBCPP_CXX03_LANG
-    typedef _LIBCPP_NODEBUG typename _Tp::template rebind<_Up> type;
+#ifndef _LIBCUDACXX_CXX03_LANG
+    typedef _LIBCUDACXX_NODEBUG typename _Tp::template rebind<_Up> type;
 #else
-    typedef _LIBCPP_NODEBUG typename _Tp::template rebind<_Up>::other type;
+    typedef _LIBCUDACXX_NODEBUG typename _Tp::template rebind<_Up>::other type;
 #endif
 };
 
 template <template <class, class...> class _Sp, class _Tp, class ..._Args, class _Up>
 struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, true>
 {
-#ifndef _LIBCPP_CXX03_LANG
-    typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up> type;
+#ifndef _LIBCUDACXX_CXX03_LANG
+    typedef _LIBCUDACXX_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up> type;
 #else
-    typedef _LIBCPP_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up>::other type;
+    typedef _LIBCUDACXX_NODEBUG typename _Sp<_Tp, _Args...>::template rebind<_Up>::other type;
 #endif
 };
 
@@ -107,36 +107,36 @@ struct __pointer_traits_rebind<_Sp<_Tp, _Args...>, _Up, false>
 };
 
 template <class _Ptr>
-struct _LIBCPP_TEMPLATE_VIS pointer_traits
+struct _LIBCUDACXX_TEMPLATE_VIS pointer_traits
 {
     typedef _Ptr                                                     pointer;
     typedef typename __pointer_traits_element_type<pointer>::type    element_type;
     typedef typename __pointer_traits_
diff erence_type<pointer>::type 
diff erence_type;
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _Up> using rebind = typename __pointer_traits_rebind<pointer, _Up>::type;
 #else
     template <class _Up> struct rebind
         {typedef typename __pointer_traits_rebind<pointer, _Up>::type other;};
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 private:
     struct __nat {};
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static pointer pointer_to(typename conditional<is_void<element_type>::value,
                                            __nat, element_type>::type& __r)
         {return pointer::pointer_to(__r);}
 };
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*>
+struct _LIBCUDACXX_TEMPLATE_VIS pointer_traits<_Tp*>
 {
     typedef _Tp*      pointer;
     typedef _Tp       element_type;
     typedef ptr
diff _t 
diff erence_type;
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _Up> using rebind = _Up*;
 #else
     template <class _Up> struct rebind {typedef _Up* other;};
@@ -145,15 +145,15 @@ struct _LIBCPP_TEMPLATE_VIS pointer_traits<_Tp*>
 private:
     struct __nat {};
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static pointer pointer_to(typename conditional<is_void<element_type>::value,
                                       __nat, element_type>::type& __r) _NOEXCEPT
-        {return _VSTD::addressof(__r);}
+        {return _CUDA_VSTD::addressof(__r);}
 };
 
 template <class _From, class _To>
 struct __rebind_pointer {
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     typedef typename pointer_traits<_From>::template rebind<_To>        type;
 #else
     typedef typename pointer_traits<_From>::template rebind<_To>::other type;
@@ -166,7 +166,7 @@ template <class _Pointer, class = void>
 struct __to_address_helper;
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 _Tp* __to_address(_Tp* __p) _NOEXCEPT {
     static_assert(!is_function<_Tp>::value, "_Tp is a function type");
     return __p;
@@ -197,7 +197,7 @@ struct _IsFancyPointer {
 template <class _Pointer, class = __enable_if_t<
     _And<is_class<_Pointer>, _IsFancyPointer<_Pointer> >::value
 > >
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename decay<decltype(__to_address_helper<_Pointer>::__call(declval<const _Pointer&>()))>::type
 __to_address(const _Pointer& __p) _NOEXCEPT {
     return __to_address_helper<_Pointer>::__call(__p);
@@ -205,36 +205,36 @@ __to_address(const _Pointer& __p) _NOEXCEPT {
 
 template <class _Pointer, class>
 struct __to_address_helper {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
-    static decltype(_VSTD::__to_address(declval<const _Pointer&>().operator->()))
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
+    static decltype(_CUDA_VSTD::__to_address(declval<const _Pointer&>().operator->()))
     __call(const _Pointer& __p) _NOEXCEPT {
-        return _VSTD::__to_address(__p.operator->());
+        return _CUDA_VSTD::__to_address(__p.operator->());
     }
 };
 
 template <class _Pointer>
 struct __to_address_helper<_Pointer, decltype((void)pointer_traits<_Pointer>::to_address(declval<const _Pointer&>()))> {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     static decltype(pointer_traits<_Pointer>::to_address(declval<const _Pointer&>()))
     __call(const _Pointer& __p) _NOEXCEPT {
         return pointer_traits<_Pointer>::to_address(__p);
     }
 };
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY constexpr
+inline _LIBCUDACXX_INLINE_VISIBILITY constexpr
 auto to_address(_Tp *__p) noexcept {
-    return _VSTD::__to_address(__p);
+    return _CUDA_VSTD::__to_address(__p);
 }
 
 template <class _Pointer>
-inline _LIBCPP_INLINE_VISIBILITY constexpr
+inline _LIBCUDACXX_INLINE_VISIBILITY constexpr
 auto to_address(const _Pointer& __p) noexcept -> decltype(std::__to_address(__p)) {
-    return _VSTD::__to_address(__p);
+    return _CUDA_VSTD::__to_address(__p);
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_POINTER_TRAITS_H
+#endif // _LIBCUDACXX___MEMORY_POINTER_TRAITS_H

diff  --git a/libcxx/include/__memory/ranges_construct_at.h b/libcxx/include/__memory/ranges_construct_at.h
index 29258023e3f9..82a0c43d6406 100644
--- a/libcxx/include/__memory/ranges_construct_at.h
+++ b/libcxx/include/__memory/ranges_construct_at.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_RANGES_CONSTRUCT_AT_H
-#define _LIBCPP___MEMORY_RANGES_CONSTRUCT_AT_H
+#ifndef _LIBCUDACXX___MEMORY_RANGES_CONSTRUCT_AT_H
+#define _LIBCUDACXX___MEMORY_RANGES_CONSTRUCT_AT_H
 
 #include <__concepts/destructible.h>
 #include <__config>
@@ -23,13 +23,13 @@
 #include <__utility/forward.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 namespace ranges {
 
 // construct_at
@@ -40,9 +40,9 @@ struct __fn {
   template<class _Tp, class... _Args, class = decltype(
     ::new (declval<void*>()) _Tp(declval<_Args>()...)
   )>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _Tp* operator()(_Tp* __location, _Args&& ...__args) const {
-    return _VSTD::construct_at(__location, _VSTD::forward<_Args>(__args)...);
+    return _CUDA_VSTD::construct_at(__location, _CUDA_VSTD::forward<_Args>(__args)...);
   }
 };
 
@@ -58,9 +58,9 @@ namespace __destroy_at {
 
 struct __fn {
   template <destructible _Tp>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr void operator()(_Tp* __location) const noexcept {
-    _VSTD::destroy_at(__location);
+    _CUDA_VSTD::destroy_at(__location);
   }
 };
 
@@ -77,14 +77,14 @@ namespace __destroy {
 struct __fn {
   template <__nothrow_input_iterator _InputIterator, __nothrow_sentinel_for<_InputIterator> _Sentinel>
     requires destructible<iter_value_t<_InputIterator>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _InputIterator operator()(_InputIterator __first, _Sentinel __last) const noexcept {
-    return _VSTD::__destroy(_VSTD::move(__first), _VSTD::move(__last));
+    return _CUDA_VSTD::__destroy(_CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last));
   }
 
   template <__nothrow_input_range _InputRange>
     requires destructible<range_value_t<_InputRange>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr borrowed_iterator_t<_InputRange> operator()(_InputRange&& __range) const noexcept {
     return (*this)(ranges::begin(__range), ranges::end(__range));
   }
@@ -103,9 +103,9 @@ namespace __destroy_n {
 struct __fn {
   template <__nothrow_input_iterator _InputIterator>
     requires destructible<iter_value_t<_InputIterator>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _InputIterator operator()(_InputIterator __first, iter_
diff erence_t<_InputIterator> __n) const noexcept {
-    return _VSTD::destroy_n(_VSTD::move(__first), __n);
+    return _CUDA_VSTD::destroy_n(_CUDA_VSTD::move(__first), __n);
   }
 };
 
@@ -117,8 +117,8 @@ inline namespace __cpo {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_RANGES_CONSTRUCT_AT_H
+#endif // _LIBCUDACXX___MEMORY_RANGES_CONSTRUCT_AT_H

diff  --git a/libcxx/include/__memory/ranges_uninitialized_algorithms.h b/libcxx/include/__memory/ranges_uninitialized_algorithms.h
index 8072496c24d6..d5c6db96e25c 100644
--- a/libcxx/include/__memory/ranges_uninitialized_algorithms.h
+++ b/libcxx/include/__memory/ranges_uninitialized_algorithms.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_RANGES_UNINITIALIZED_ALGORITHMS_H
-#define _LIBCPP___MEMORY_RANGES_UNINITIALIZED_ALGORITHMS_H
+#ifndef _LIBCUDACXX___MEMORY_RANGES_UNINITIALIZED_ALGORITHMS_H
+#define _LIBCUDACXX___MEMORY_RANGES_UNINITIALIZED_ALGORITHMS_H
 
 #include <__algorithm/in_out_result.h>
 #include <__concepts/constructible.h>
@@ -26,13 +26,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
@@ -46,8 +46,8 @@ struct __fn {
     requires default_initializable<iter_value_t<_ForwardIterator>>
   _ForwardIterator operator()(_ForwardIterator __first, _Sentinel __last) const {
     using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
-    return _VSTD::__uninitialized_default_construct<_ValueType>(
-        _VSTD::move(__first), _VSTD::move(__last));
+    return _CUDA_VSTD::__uninitialized_default_construct<_ValueType>(
+        _CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last));
   }
 
   template <__nothrow_forward_range _ForwardRange>
@@ -73,7 +73,7 @@ struct __fn {
   _ForwardIterator operator()(_ForwardIterator __first,
                               iter_
diff erence_t<_ForwardIterator> __n) const {
     using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
-    return _VSTD::__uninitialized_default_construct_n<_ValueType>(_VSTD::move(__first), __n);
+    return _CUDA_VSTD::__uninitialized_default_construct_n<_ValueType>(_CUDA_VSTD::move(__first), __n);
   }
 };
 
@@ -93,8 +93,8 @@ struct __fn {
     requires default_initializable<iter_value_t<_ForwardIterator>>
   _ForwardIterator operator()(_ForwardIterator __first, _Sentinel __last) const {
     using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
-    return _VSTD::__uninitialized_value_construct<_ValueType>(
-        _VSTD::move(__first), _VSTD::move(__last));
+    return _CUDA_VSTD::__uninitialized_value_construct<_ValueType>(
+        _CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last));
   }
 
   template <__nothrow_forward_range _ForwardRange>
@@ -120,7 +120,7 @@ struct __fn {
   _ForwardIterator operator()(_ForwardIterator __first,
                               iter_
diff erence_t<_ForwardIterator> __n) const {
     using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
-    return _VSTD::__uninitialized_value_construct_n<_ValueType>(_VSTD::move(__first), __n);
+    return _CUDA_VSTD::__uninitialized_value_construct_n<_ValueType>(_CUDA_VSTD::move(__first), __n);
   }
 };
 
@@ -141,7 +141,7 @@ struct __fn {
     requires constructible_from<iter_value_t<_ForwardIterator>, const _Tp&>
   _ForwardIterator operator()(_ForwardIterator __first, _Sentinel __last, const _Tp& __x) const {
     using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
-    return _VSTD::__uninitialized_fill<_ValueType>(_VSTD::move(__first), _VSTD::move(__last), __x);
+    return _CUDA_VSTD::__uninitialized_fill<_ValueType>(_CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last), __x);
   }
 
   template <__nothrow_forward_range _ForwardRange, class _Tp>
@@ -168,7 +168,7 @@ struct __fn {
                               iter_
diff erence_t<_ForwardIterator> __n,
                               const _Tp& __x) const {
     using _ValueType = remove_reference_t<iter_reference_t<_ForwardIterator>>;
-    return _VSTD::__uninitialized_fill_n<_ValueType>(_VSTD::move(__first), __n, __x);
+    return _CUDA_VSTD::__uninitialized_fill_n<_ValueType>(_CUDA_VSTD::move(__first), __n, __x);
   }
 };
 
@@ -195,9 +195,9 @@ struct __fn {
   operator()(_InputIterator __ifirst, _Sentinel1 __ilast, _OutputIterator __ofirst, _Sentinel2 __olast) const {
     using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
 
-    auto __result = _VSTD::__uninitialized_copy<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast),
-                                                            _VSTD::move(__ofirst), _VSTD::move(__olast));
-    return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
+    auto __result = _CUDA_VSTD::__uninitialized_copy<_ValueType>(_CUDA_VSTD::move(__ifirst), _CUDA_VSTD::move(__ilast),
+                                                            _CUDA_VSTD::move(__ofirst), _CUDA_VSTD::move(__olast));
+    return {_CUDA_VSTD::move(__result.first), _CUDA_VSTD::move(__result.second)};
   }
 
   template <input_range _InputRange, __nothrow_forward_range _OutputRange>
@@ -231,9 +231,9 @@ struct __fn {
   operator()(_InputIterator __ifirst, iter_
diff erence_t<_InputIterator> __n,
              _OutputIterator __ofirst, _Sentinel __olast) const {
     using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
-    auto __result = _VSTD::__uninitialized_copy_n<_ValueType>(_VSTD::move(__ifirst), __n,
-                                                              _VSTD::move(__ofirst), _VSTD::move(__olast));
-    return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
+    auto __result = _CUDA_VSTD::__uninitialized_copy_n<_ValueType>(_CUDA_VSTD::move(__ifirst), __n,
+                                                              _CUDA_VSTD::move(__ofirst), _CUDA_VSTD::move(__olast));
+    return {_CUDA_VSTD::move(__result.first), _CUDA_VSTD::move(__result.second)};
   }
 };
 
@@ -260,9 +260,9 @@ struct __fn {
   operator()(_InputIterator __ifirst, _Sentinel1 __ilast, _OutputIterator __ofirst, _Sentinel2 __olast) const {
     using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
     auto __iter_move = [](auto&& __iter) -> decltype(auto) { return ranges::iter_move(__iter); };
-    auto __result = _VSTD::__uninitialized_move<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast),
-                                                            _VSTD::move(__ofirst), _VSTD::move(__olast), __iter_move);
-    return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
+    auto __result = _CUDA_VSTD::__uninitialized_move<_ValueType>(_CUDA_VSTD::move(__ifirst), _CUDA_VSTD::move(__ilast),
+                                                            _CUDA_VSTD::move(__ofirst), _CUDA_VSTD::move(__olast), __iter_move);
+    return {_CUDA_VSTD::move(__result.first), _CUDA_VSTD::move(__result.second)};
   }
 
   template <input_range _InputRange, __nothrow_forward_range _OutputRange>
@@ -297,9 +297,9 @@ struct __fn {
              _OutputIterator __ofirst, _Sentinel __olast) const {
     using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
     auto __iter_move = [](auto&& __iter) -> decltype(auto) { return ranges::iter_move(__iter); };
-    auto __result = _VSTD::__uninitialized_move_n<_ValueType>(_VSTD::move(__ifirst), __n,
-                                                              _VSTD::move(__ofirst), _VSTD::move(__olast), __iter_move);
-    return {_VSTD::move(__result.first), _VSTD::move(__result.second)};
+    auto __result = _CUDA_VSTD::__uninitialized_move_n<_ValueType>(_CUDA_VSTD::move(__ifirst), __n,
+                                                              _CUDA_VSTD::move(__ofirst), _CUDA_VSTD::move(__olast), __iter_move);
+    return {_CUDA_VSTD::move(__result.first), _CUDA_VSTD::move(__result.second)};
   }
 };
 
@@ -311,8 +311,8 @@ inline namespace __cpo {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_RANGES_UNINITIALIZED_ALGORITHMS_H
+#endif // _LIBCUDACXX___MEMORY_RANGES_UNINITIALIZED_ALGORITHMS_H

diff  --git a/libcxx/include/__memory/raw_storage_iterator.h b/libcxx/include/__memory/raw_storage_iterator.h
index 9b6594b8883e..c1c784d6a8e1 100644
--- a/libcxx/include/__memory/raw_storage_iterator.h
+++ b/libcxx/include/__memory/raw_storage_iterator.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_RAW_STORAGE_ITERATOR_H
-#define _LIBCPP___MEMORY_RAW_STORAGE_ITERATOR_H
+#ifndef _LIBCUDACXX___MEMORY_RAW_STORAGE_ITERATOR_H
+#define _LIBCUDACXX___MEMORY_RAW_STORAGE_ITERATOR_H
 
 #include <__config>
 #include <__iterator/iterator.h>
@@ -17,28 +17,28 @@
 #include <__utility/move.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR)
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR)
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _OutputIterator, class _Tp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 raw_storage_iterator
-#if _LIBCPP_STD_VER <= 14 || !defined(_LIBCPP_ABI_NO_ITERATOR_BASES)
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 raw_storage_iterator
+#if _LIBCUDACXX_STD_VER <= 14 || !defined(_LIBCUDACXX_ABI_NO_ITERATOR_BASES)
     : public iterator<output_iterator_tag, void, void, void, void>
 #endif
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 private:
     _OutputIterator __x_;
 public:
     typedef output_iterator_tag iterator_category;
     typedef void                value_type;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     typedef ptr
diff _t           
diff erence_type;
 #else
     typedef void                
diff erence_type;
@@ -46,24 +46,24 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     typedef void                pointer;
     typedef void                reference;
 
-    _LIBCPP_INLINE_VISIBILITY explicit raw_storage_iterator(_OutputIterator __x) : __x_(__x) {}
-    _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator*() {return *this;}
-    _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(const _Tp& __element)
-        {::new ((void*)_VSTD::addressof(*__x_)) _Tp(__element); return *this;}
-#if _LIBCPP_STD_VER >= 14
-    _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator=(_Tp&& __element)
-        {::new ((void*)_VSTD::addressof(*__x_)) _Tp(_VSTD::move(__element)); return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit raw_storage_iterator(_OutputIterator __x) : __x_(__x) {}
+    _LIBCUDACXX_INLINE_VISIBILITY raw_storage_iterator& operator*() {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY raw_storage_iterator& operator=(const _Tp& __element)
+        {::new ((void*)_CUDA_VSTD::addressof(*__x_)) _Tp(__element); return *this;}
+#if _LIBCUDACXX_STD_VER >= 14
+    _LIBCUDACXX_INLINE_VISIBILITY raw_storage_iterator& operator=(_Tp&& __element)
+        {::new ((void*)_CUDA_VSTD::addressof(*__x_)) _Tp(_CUDA_VSTD::move(__element)); return *this;}
 #endif
-    _LIBCPP_INLINE_VISIBILITY raw_storage_iterator& operator++() {++__x_; return *this;}
-    _LIBCPP_INLINE_VISIBILITY raw_storage_iterator  operator++(int)
+    _LIBCUDACXX_INLINE_VISIBILITY raw_storage_iterator& operator++() {++__x_; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY raw_storage_iterator  operator++(int)
         {raw_storage_iterator __t(*this); ++__x_; return __t;}
-#if _LIBCPP_STD_VER >= 14
-    _LIBCPP_INLINE_VISIBILITY _OutputIterator base() const { return __x_; }
+#if _LIBCUDACXX_STD_VER >= 14
+    _LIBCUDACXX_INLINE_VISIBILITY _OutputIterator base() const { return __x_; }
 #endif
 };
 
-#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR)
+#endif // _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_RAW_STORAGE_ITERATOR_H
+#endif // _LIBCUDACXX___MEMORY_RAW_STORAGE_ITERATOR_H

diff  --git a/libcxx/include/__memory/shared_ptr.h b/libcxx/include/__memory/shared_ptr.h
index 41a7c7fa7575..a26d0e034186 100644
--- a/libcxx/include/__memory/shared_ptr.h
+++ b/libcxx/include/__memory/shared_ptr.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_SHARED_PTR_H
-#define _LIBCPP___MEMORY_SHARED_PTR_H
+#ifndef _LIBCUDACXX___MEMORY_SHARED_PTR_H
+#define _LIBCUDACXX___MEMORY_SHARED_PTR_H
 
 #include <__availability>
 #include <__config>
@@ -35,32 +35,32 @@
 #include <stdexcept>
 #include <type_traits>
 #include <typeinfo>
-#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_ATOMIC_HEADER)
 #  include <atomic>
 #endif
 
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Alloc>
 class __allocator_destructor
 {
-    typedef _LIBCPP_NODEBUG allocator_traits<_Alloc> __alloc_traits;
+    typedef _LIBCUDACXX_NODEBUG allocator_traits<_Alloc> __alloc_traits;
 public:
-    typedef _LIBCPP_NODEBUG typename __alloc_traits::pointer pointer;
-    typedef _LIBCPP_NODEBUG typename __alloc_traits::size_type size_type;
+    typedef _LIBCUDACXX_NODEBUG typename __alloc_traits::pointer pointer;
+    typedef _LIBCUDACXX_NODEBUG typename __alloc_traits::size_type size_type;
 private:
     _Alloc& __alloc_;
     size_type __s_;
 public:
-    _LIBCPP_INLINE_VISIBILITY __allocator_destructor(_Alloc& __a, size_type __s)
+    _LIBCUDACXX_INLINE_VISIBILITY __allocator_destructor(_Alloc& __a, size_type __s)
              _NOEXCEPT
         : __alloc_(__a), __s_(__s) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator()(pointer __p) _NOEXCEPT
         {__alloc_traits::deallocate(__alloc_, __p, __s_);}
 };
@@ -71,17 +71,17 @@ class __allocator_destructor
 #if defined(__clang__) && __has_builtin(__atomic_add_fetch)          \
                        && defined(__ATOMIC_RELAXED)                  \
                        && defined(__ATOMIC_ACQ_REL)
-#   define _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT
-#elif defined(_LIBCPP_COMPILER_GCC)
-#   define _LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT
+#   define _LIBCUDACXX_HAS_BUILTIN_ATOMIC_SUPPORT
+#elif defined(_LIBCUDACXX_COMPILER_GCC)
+#   define _LIBCUDACXX_HAS_BUILTIN_ATOMIC_SUPPORT
 #endif
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
-_ValueType __libcpp_relaxed_load(_ValueType const* __value) {
-#if !defined(_LIBCPP_HAS_NO_THREADS) && \
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_ValueType __LIBCUDACXX_relaxed_load(_ValueType const* __value) {
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS) && \
     defined(__ATOMIC_RELAXED) &&        \
-    (__has_builtin(__atomic_load_n) || defined(_LIBCPP_COMPILER_GCC))
+    (__has_builtin(__atomic_load_n) || defined(_LIBCUDACXX_COMPILER_GCC))
     return __atomic_load_n(__value, __ATOMIC_RELAXED);
 #else
     return *__value;
@@ -89,11 +89,11 @@ _ValueType __libcpp_relaxed_load(_ValueType const* __value) {
 }
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
-_ValueType __libcpp_acquire_load(_ValueType const* __value) {
-#if !defined(_LIBCPP_HAS_NO_THREADS) && \
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_ValueType __LIBCUDACXX_acquire_load(_ValueType const* __value) {
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS) && \
     defined(__ATOMIC_ACQUIRE) &&        \
-    (__has_builtin(__atomic_load_n) || defined(_LIBCPP_COMPILER_GCC))
+    (__has_builtin(__atomic_load_n) || defined(_LIBCUDACXX_COMPILER_GCC))
     return __atomic_load_n(__value, __ATOMIC_ACQUIRE);
 #else
     return *__value;
@@ -101,10 +101,10 @@ _ValueType __libcpp_acquire_load(_ValueType const* __value) {
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _Tp
-__libcpp_atomic_refcount_increment(_Tp& __t) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY _Tp
+__LIBCUDACXX_atomic_refcount_increment(_Tp& __t) _NOEXCEPT
 {
-#if defined(_LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(_LIBCUDACXX_HAS_BUILTIN_ATOMIC_SUPPORT) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
     return __atomic_add_fetch(&__t, 1, __ATOMIC_RELAXED);
 #else
     return __t += 1;
@@ -112,17 +112,17 @@ __libcpp_atomic_refcount_increment(_Tp& __t) _NOEXCEPT
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _Tp
-__libcpp_atomic_refcount_decrement(_Tp& __t) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY _Tp
+__LIBCUDACXX_atomic_refcount_decrement(_Tp& __t) _NOEXCEPT
 {
-#if defined(_LIBCPP_HAS_BUILTIN_ATOMIC_SUPPORT) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(_LIBCUDACXX_HAS_BUILTIN_ATOMIC_SUPPORT) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
     return __atomic_add_fetch(&__t, -1, __ATOMIC_ACQ_REL);
 #else
     return __t -= 1;
 #endif
 }
 
-class _LIBCPP_EXCEPTION_ABI bad_weak_ptr
+class _LIBCUDACXX_EXCEPTION_ABI bad_weak_ptr
     : public std::exception
 {
 public:
@@ -132,19 +132,19 @@ class _LIBCPP_EXCEPTION_ABI bad_weak_ptr
     virtual const char* what() const  _NOEXCEPT;
 };
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_bad_weak_ptr()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw bad_weak_ptr();
 #else
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-template<class _Tp> class _LIBCPP_TEMPLATE_VIS weak_ptr;
+template<class _Tp> class _LIBCUDACXX_TEMPLATE_VIS weak_ptr;
 
-class _LIBCPP_TYPE_VIS __shared_count
+class _LIBCUDACXX_TYPE_VIS __shared_count
 {
     __shared_count(const __shared_count&);
     __shared_count& operator=(const __shared_count&);
@@ -156,40 +156,40 @@ class _LIBCPP_TYPE_VIS __shared_count
     virtual void __on_zero_shared() _NOEXCEPT = 0;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __shared_count(long __refs = 0) _NOEXCEPT
         : __shared_owners_(__refs) {}
 
-#if defined(_LIBCPP_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS)
+#if defined(_LIBCUDACXX_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS)
     void __add_shared() noexcept;
     bool __release_shared() noexcept;
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __add_shared() _NOEXCEPT {
-      __libcpp_atomic_refcount_increment(__shared_owners_);
+      __LIBCUDACXX_atomic_refcount_increment(__shared_owners_);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool __release_shared() _NOEXCEPT {
-      if (__libcpp_atomic_refcount_decrement(__shared_owners_) == -1) {
+      if (__LIBCUDACXX_atomic_refcount_decrement(__shared_owners_) == -1) {
         __on_zero_shared();
         return true;
       }
       return false;
     }
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     long use_count() const _NOEXCEPT {
-        return __libcpp_relaxed_load(&__shared_owners_) + 1;
+        return __LIBCUDACXX_relaxed_load(&__shared_owners_) + 1;
     }
 };
 
-class _LIBCPP_TYPE_VIS __shared_weak_count
+class _LIBCUDACXX_TYPE_VIS __shared_weak_count
     : private __shared_count
 {
     long __shared_weak_owners_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __shared_weak_count(long __refs = 0) _NOEXCEPT
         : __shared_count(__refs),
           __shared_weak_owners_(__refs) {}
@@ -197,27 +197,27 @@ class _LIBCPP_TYPE_VIS __shared_weak_count
     virtual ~__shared_weak_count();
 
 public:
-#if defined(_LIBCPP_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS)
+#if defined(_LIBCUDACXX_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS)
     void __add_shared() noexcept;
     void __add_weak() noexcept;
     void __release_shared() noexcept;
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __add_shared() _NOEXCEPT {
       __shared_count::__add_shared();
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __add_weak() _NOEXCEPT {
-      __libcpp_atomic_refcount_increment(__shared_weak_owners_);
+      __LIBCUDACXX_atomic_refcount_increment(__shared_weak_owners_);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __release_shared() _NOEXCEPT {
       if (__shared_count::__release_shared())
         __release_weak();
     }
 #endif
     void __release_weak() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     long use_count() const _NOEXCEPT {return __shared_count::use_count();}
     __shared_weak_count* lock() _NOEXCEPT;
 
@@ -232,11 +232,11 @@ class __shared_ptr_pointer
 {
     __compressed_pair<__compressed_pair<_Tp, _Dp>, _Alloc> __data_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __shared_ptr_pointer(_Tp __p, _Dp __d, _Alloc __a)
-        :  __data_(__compressed_pair<_Tp, _Dp>(__p, _VSTD::move(__d)), _VSTD::move(__a)) {}
+        :  __data_(__compressed_pair<_Tp, _Dp>(__p, _CUDA_VSTD::move(__d)), _CUDA_VSTD::move(__a)) {}
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     virtual const void* __get_deleter(const type_info&) const _NOEXCEPT;
 #endif
 
@@ -245,16 +245,16 @@ class __shared_ptr_pointer
     virtual void __on_zero_shared_weak() _NOEXCEPT;
 };
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template <class _Tp, class _Dp, class _Alloc>
 const void*
 __shared_ptr_pointer<_Tp, _Dp, _Alloc>::__get_deleter(const type_info& __t) const _NOEXCEPT
 {
-    return __t == typeid(_Dp) ? _VSTD::addressof(__data_.first().second()) : nullptr;
+    return __t == typeid(_Dp) ? _CUDA_VSTD::addressof(__data_.first().second()) : nullptr;
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 template <class _Tp, class _Dp, class _Alloc>
 void
@@ -282,28 +282,28 @@ struct __shared_ptr_emplace
     : __shared_weak_count
 {
     template<class ..._Args>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     explicit __shared_ptr_emplace(_Alloc __a, _Args&& ...__args)
-        : __storage_(_VSTD::move(__a))
+        : __storage_(_CUDA_VSTD::move(__a))
     {
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
         using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
         _TpAlloc __tmp(*__get_alloc());
-        allocator_traits<_TpAlloc>::construct(__tmp, __get_elem(), _VSTD::forward<_Args>(__args)...);
+        allocator_traits<_TpAlloc>::construct(__tmp, __get_elem(), _CUDA_VSTD::forward<_Args>(__args)...);
 #else
-        ::new ((void*)__get_elem()) _Tp(_VSTD::forward<_Args>(__args)...);
+        ::new ((void*)__get_elem()) _Tp(_CUDA_VSTD::forward<_Args>(__args)...);
 #endif
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     _Alloc* __get_alloc() _NOEXCEPT { return __storage_.__get_alloc(); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     _Tp* __get_elem() _NOEXCEPT { return __storage_.__get_elem(); }
 
 private:
     virtual void __on_zero_shared() _NOEXCEPT {
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
         using _TpAlloc = typename __allocator_traits_rebind<_Alloc, _Tp>::type;
         _TpAlloc __tmp(*__get_alloc());
         allocator_traits<_TpAlloc>::destroy(__tmp, __get_elem());
@@ -333,10 +333,10 @@ struct __shared_ptr_emplace
     struct _ALIGNAS_TYPE(_CompressedPair) _Storage {
         char __blob_[sizeof(_CompressedPair)];
 
-        _LIBCPP_HIDE_FROM_ABI explicit _Storage(_Alloc&& __a) {
-            ::new ((void*)__get_alloc()) _Alloc(_VSTD::move(__a));
+        _LIBCUDACXX_HIDE_FROM_ABI explicit _Storage(_Alloc&& __a) {
+            ::new ((void*)__get_alloc()) _Alloc(_CUDA_VSTD::move(__a));
         }
-        _LIBCPP_HIDE_FROM_ABI ~_Storage() {
+        _LIBCUDACXX_HIDE_FROM_ABI ~_Storage() {
             __get_alloc()->~_Alloc();
         }
         _Alloc* __get_alloc() _NOEXCEPT {
@@ -345,7 +345,7 @@ struct __shared_ptr_emplace
             _Alloc *__alloc = reinterpret_cast<_Alloc*>(__first);
             return __alloc;
         }
-        _LIBCPP_NO_CFI _Tp* __get_elem() _NOEXCEPT {
+        _LIBCUDACXX_NO_CFI _Tp* __get_elem() _NOEXCEPT {
             _CompressedPair *__as_pair = reinterpret_cast<_CompressedPair*>(__blob_);
             typename _CompressedPair::_Base2* __second = _CompressedPair::__get_second_base(__as_pair);
             _Tp *__elem = reinterpret_cast<_Tp*>(__second);
@@ -353,14 +353,14 @@ struct __shared_ptr_emplace
         }
     };
 
-    static_assert(_LIBCPP_ALIGNOF(_Storage) == _LIBCPP_ALIGNOF(_CompressedPair), "");
+    static_assert(_LIBCUDACXX_ALIGNOF(_Storage) == _LIBCUDACXX_ALIGNOF(_CompressedPair), "");
     static_assert(sizeof(_Storage) == sizeof(_CompressedPair), "");
     _Storage __storage_;
 };
 
 struct __shared_ptr_dummy_rebind_allocator_type;
 template <>
-class _LIBCPP_TEMPLATE_VIS allocator<__shared_ptr_dummy_rebind_allocator_type>
+class _LIBCUDACXX_TEMPLATE_VIS allocator<__shared_ptr_dummy_rebind_allocator_type>
 {
 public:
     template <class _Other>
@@ -370,15 +370,15 @@ class _LIBCPP_TEMPLATE_VIS allocator<__shared_ptr_dummy_rebind_allocator_type>
     };
 };
 
-template<class _Tp> class _LIBCPP_TEMPLATE_VIS enable_shared_from_this;
+template<class _Tp> class _LIBCUDACXX_TEMPLATE_VIS enable_shared_from_this;
 
 template<class _Tp, class _Up>
 struct __compatible_with
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     : is_convertible<remove_extent_t<_Tp>*, remove_extent_t<_Up>*> {};
 #else
     : is_convertible<_Tp*, _Up*> {};
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
 template <class _Ptr, class = void>
 struct __is_deletable : false_type { };
@@ -408,17 +408,17 @@ struct __shared_ptr_deleter_ctor_reqs
                               __well_formed_deleter<_Dp, _Tp*>::value;
 };
 
-#if defined(_LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI)
-#  define _LIBCPP_SHARED_PTR_TRIVIAL_ABI __attribute__((trivial_abi))
+#if defined(_LIBCUDACXX_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI)
+#  define _LIBCUDACXX_SHARED_PTR_TRIVIAL_ABI __attribute__((trivial_abi))
 #else
-#  define _LIBCPP_SHARED_PTR_TRIVIAL_ABI
+#  define _LIBCUDACXX_SHARED_PTR_TRIVIAL_ABI
 #endif
 
 template<class _Tp>
-class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
+class _LIBCUDACXX_SHARED_PTR_TRIVIAL_ABI _LIBCUDACXX_TEMPLATE_VIS shared_ptr
 {
 public:
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     typedef weak_ptr<_Tp> weak_type;
     typedef remove_extent_t<_Tp> element_type;
 #else
@@ -430,14 +430,14 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     __shared_weak_count* __cntrl_;
 
 public:
-    _LIBCPP_HIDE_FROM_ABI
-    _LIBCPP_CONSTEXPR shared_ptr() _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI
+    _LIBCUDACXX_CONSTEXPR shared_ptr() _NOEXCEPT
         : __ptr_(nullptr),
           __cntrl_(nullptr)
     { }
 
-    _LIBCPP_HIDE_FROM_ABI
-    _LIBCPP_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI
+    _LIBCUDACXX_CONSTEXPR shared_ptr(nullptr_t) _NOEXCEPT
         : __ptr_(nullptr),
           __cntrl_(nullptr)
     { }
@@ -448,7 +448,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
             // In C++03 we get errors when trying to do SFINAE with the
             // delete operator, so we always pretend that it's deletable.
             // The same happens on GCC.
-#if !defined(_LIBCPP_CXX03_LANG) && !defined(_LIBCPP_COMPILER_GCC)
+#if !defined(_LIBCUDACXX_CXX03_LANG) && !defined(_LIBCUDACXX_COMPILER_GCC)
             , _If<is_array<_Tp>::value, __is_array_deletable<_Yp*>, __is_deletable<_Yp*> >
 #endif
         >::value
@@ -463,123 +463,123 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     }
 
     template<class _Yp, class _Dp, class = __enable_if_t<__shared_ptr_deleter_ctor_reqs<_Dp, _Yp, element_type>::value> >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(_Yp* __p, _Dp __d)
         : __ptr_(__p)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             typedef typename __shared_ptr_default_allocator<_Yp>::type _AllocT;
             typedef __shared_ptr_pointer<_Yp*, _Dp, _AllocT> _CntrlBlk;
-#ifndef _LIBCPP_CXX03_LANG
-            __cntrl_ = new _CntrlBlk(__p, _VSTD::move(__d), _AllocT());
+#ifndef _LIBCUDACXX_CXX03_LANG
+            __cntrl_ = new _CntrlBlk(__p, _CUDA_VSTD::move(__d), _AllocT());
 #else
             __cntrl_ = new _CntrlBlk(__p, __d, _AllocT());
-#endif // not _LIBCPP_CXX03_LANG
+#endif // not _LIBCUDACXX_CXX03_LANG
             __enable_weak_this(__p, __p);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __d(__p);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 
     template<class _Yp, class _Dp, class _Alloc, class = __enable_if_t<__shared_ptr_deleter_ctor_reqs<_Dp, _Yp, element_type>::value> >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(_Yp* __p, _Dp __d, _Alloc __a)
         : __ptr_(__p)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             typedef __shared_ptr_pointer<_Yp*, _Dp, _Alloc> _CntrlBlk;
             typedef typename __allocator_traits_rebind<_Alloc, _CntrlBlk>::type _A2;
             typedef __allocator_destructor<_A2> _D2;
             _A2 __a2(__a);
             unique_ptr<_CntrlBlk, _D2> __hold2(__a2.allocate(1), _D2(__a2, 1));
-            ::new ((void*)_VSTD::addressof(*__hold2.get()))
-#ifndef _LIBCPP_CXX03_LANG
-                _CntrlBlk(__p, _VSTD::move(__d), __a);
+            ::new ((void*)_CUDA_VSTD::addressof(*__hold2.get()))
+#ifndef _LIBCUDACXX_CXX03_LANG
+                _CntrlBlk(__p, _CUDA_VSTD::move(__d), __a);
 #else
                 _CntrlBlk(__p, __d, __a);
-#endif // not _LIBCPP_CXX03_LANG
-            __cntrl_ = _VSTD::addressof(*__hold2.release());
+#endif // not _LIBCUDACXX_CXX03_LANG
+            __cntrl_ = _CUDA_VSTD::addressof(*__hold2.release());
             __enable_weak_this(__p, __p);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __d(__p);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 
     template<class _Dp>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(nullptr_t __p, _Dp __d)
         : __ptr_(nullptr)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             typedef typename __shared_ptr_default_allocator<_Tp>::type _AllocT;
             typedef __shared_ptr_pointer<nullptr_t, _Dp, _AllocT> _CntrlBlk;
-#ifndef _LIBCPP_CXX03_LANG
-            __cntrl_ = new _CntrlBlk(__p, _VSTD::move(__d), _AllocT());
+#ifndef _LIBCUDACXX_CXX03_LANG
+            __cntrl_ = new _CntrlBlk(__p, _CUDA_VSTD::move(__d), _AllocT());
 #else
             __cntrl_ = new _CntrlBlk(__p, __d, _AllocT());
-#endif // not _LIBCPP_CXX03_LANG
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#endif // not _LIBCUDACXX_CXX03_LANG
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __d(__p);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 
     template<class _Dp, class _Alloc>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(nullptr_t __p, _Dp __d, _Alloc __a)
         : __ptr_(nullptr)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             typedef __shared_ptr_pointer<nullptr_t, _Dp, _Alloc> _CntrlBlk;
             typedef typename __allocator_traits_rebind<_Alloc, _CntrlBlk>::type _A2;
             typedef __allocator_destructor<_A2> _D2;
             _A2 __a2(__a);
             unique_ptr<_CntrlBlk, _D2> __hold2(__a2.allocate(1), _D2(__a2, 1));
-            ::new ((void*)_VSTD::addressof(*__hold2.get()))
-#ifndef _LIBCPP_CXX03_LANG
-                _CntrlBlk(__p, _VSTD::move(__d), __a);
+            ::new ((void*)_CUDA_VSTD::addressof(*__hold2.get()))
+#ifndef _LIBCUDACXX_CXX03_LANG
+                _CntrlBlk(__p, _CUDA_VSTD::move(__d), __a);
 #else
                 _CntrlBlk(__p, __d, __a);
-#endif // not _LIBCPP_CXX03_LANG
-            __cntrl_ = _VSTD::addressof(*__hold2.release());
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#endif // not _LIBCUDACXX_CXX03_LANG
+            __cntrl_ = _CUDA_VSTD::addressof(*__hold2.release());
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __d(__p);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 
     template<class _Yp>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(const shared_ptr<_Yp>& __r, element_type *__p) _NOEXCEPT
         : __ptr_(__p),
           __cntrl_(__r.__cntrl_)
@@ -588,7 +588,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
             __cntrl_->__add_shared();
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(const shared_ptr& __r) _NOEXCEPT
         : __ptr_(__r.__ptr_),
           __cntrl_(__r.__cntrl_)
@@ -598,7 +598,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     }
 
     template<class _Yp, class = __enable_if_t<__compatible_with<_Yp, _Tp>::value> >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(const shared_ptr<_Yp>& __r) _NOEXCEPT
         : __ptr_(__r.__ptr_),
           __cntrl_(__r.__cntrl_)
@@ -607,7 +607,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
             __cntrl_->__add_shared();
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(shared_ptr&& __r) _NOEXCEPT
         : __ptr_(__r.__ptr_),
           __cntrl_(__r.__cntrl_)
@@ -617,7 +617,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     }
 
     template<class _Yp, class = __enable_if_t<__compatible_with<_Yp, _Tp>::value> >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(shared_ptr<_Yp>&& __r) _NOEXCEPT
         : __ptr_(__r.__ptr_),
           __cntrl_(__r.__cntrl_)
@@ -627,7 +627,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     }
 
     template<class _Yp, class = __enable_if_t<__compatible_with<_Yp, _Tp>::value> >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     explicit shared_ptr(const weak_ptr<_Yp>& __r)
         : __ptr_(__r.__ptr_),
           __cntrl_(__r.__cntrl_ ? __r.__cntrl_->lock() : __r.__cntrl_)
@@ -636,9 +636,9 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
             __throw_bad_weak_ptr();
     }
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR)
     template<class _Yp, class = __enable_if_t<is_convertible<_Yp*, element_type*>::value> >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(auto_ptr<_Yp>&& __r)
         : __ptr_(__r.get())
     {
@@ -653,11 +653,11 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
         !is_lvalue_reference<_Dp>::value &&
          is_convertible<typename unique_ptr<_Yp, _Dp>::pointer, element_type*>::value
     > >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(unique_ptr<_Yp, _Dp>&& __r)
         : __ptr_(__r.get())
     {
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
         if (__ptr_ == nullptr)
             __cntrl_ = nullptr;
         else
@@ -675,11 +675,11 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
         is_lvalue_reference<_Dp>::value &&
         is_convertible<typename unique_ptr<_Yp, _Dp>::pointer, element_type*>::value
     > >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr(unique_ptr<_Yp, _Dp>&& __r)
         : __ptr_(__r.get())
     {
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
         if (__ptr_ == nullptr)
             __cntrl_ = nullptr;
         else
@@ -689,20 +689,20 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
             typedef __shared_ptr_pointer<typename unique_ptr<_Yp, _Dp>::pointer,
                                         reference_wrapper<typename remove_reference<_Dp>::type>,
                                         _AllocT> _CntrlBlk;
-            __cntrl_ = new _CntrlBlk(__r.get(), _VSTD::ref(__r.get_deleter()), _AllocT());
+            __cntrl_ = new _CntrlBlk(__r.get(), _CUDA_VSTD::ref(__r.get_deleter()), _AllocT());
             __enable_weak_this(__r.get(), __r.get());
         }
         __r.release();
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     ~shared_ptr()
     {
         if (__cntrl_)
             __cntrl_->__release_shared();
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr<_Tp>& operator=(const shared_ptr& __r) _NOEXCEPT
     {
         shared_ptr(__r).swap(*this);
@@ -710,37 +710,37 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     }
 
     template<class _Yp, class = __enable_if_t<__compatible_with<_Yp, _Tp>::value> >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr<_Tp>& operator=(const shared_ptr<_Yp>& __r) _NOEXCEPT
     {
         shared_ptr(__r).swap(*this);
         return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr<_Tp>& operator=(shared_ptr&& __r) _NOEXCEPT
     {
-        shared_ptr(_VSTD::move(__r)).swap(*this);
+        shared_ptr(_CUDA_VSTD::move(__r)).swap(*this);
         return *this;
     }
 
     template<class _Yp, class = __enable_if_t<__compatible_with<_Yp, _Tp>::value> >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr<_Tp>& operator=(shared_ptr<_Yp>&& __r)
     {
-        shared_ptr(_VSTD::move(__r)).swap(*this);
+        shared_ptr(_CUDA_VSTD::move(__r)).swap(*this);
         return *this;
     }
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR)
     template<class _Yp, class = __enable_if_t<
         !is_array<_Yp>::value &&
         is_convertible<_Yp*, typename shared_ptr<_Tp>::element_type*>::value
     > >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr<_Tp>& operator=(auto_ptr<_Yp>&& __r)
     {
-        shared_ptr(_VSTD::move(__r)).swap(*this);
+        shared_ptr(_CUDA_VSTD::move(__r)).swap(*this);
         return *this;
     }
 #endif
@@ -748,21 +748,21 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     template <class _Yp, class _Dp, class = __enable_if_t<
         is_convertible<typename unique_ptr<_Yp, _Dp>::pointer, element_type*>::value
     > >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     shared_ptr<_Tp>& operator=(unique_ptr<_Yp, _Dp>&& __r)
     {
-        shared_ptr(_VSTD::move(__r)).swap(*this);
+        shared_ptr(_CUDA_VSTD::move(__r)).swap(*this);
         return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void swap(shared_ptr& __r) _NOEXCEPT
     {
-        _VSTD::swap(__ptr_, __r.__ptr_);
-        _VSTD::swap(__cntrl_, __r.__cntrl_);
+        _CUDA_VSTD::swap(__ptr_, __r.__ptr_);
+        _CUDA_VSTD::swap(__cntrl_, __r.__cntrl_);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void reset() _NOEXCEPT
     {
         shared_ptr().swap(*this);
@@ -771,7 +771,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     template<class _Yp, class = __enable_if_t<
         __compatible_with<_Yp, _Tp>::value
     > >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void reset(_Yp* __p)
     {
         shared_ptr(__p).swap(*this);
@@ -780,7 +780,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     template<class _Yp, class _Dp, class = __enable_if_t<
         __compatible_with<_Yp, _Tp>::value
     > >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void reset(_Yp* __p, _Dp __d)
     {
         shared_ptr(__p, __d).swap(*this);
@@ -789,25 +789,25 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     template<class _Yp, class _Dp, class _Alloc, class = __enable_if_t<
         __compatible_with<_Yp, _Tp>::value
     > >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void reset(_Yp* __p, _Dp __d, _Alloc __a)
     {
         shared_ptr(__p, __d, __a).swap(*this);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     element_type* get() const _NOEXCEPT
     {
         return __ptr_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     typename add_lvalue_reference<element_type>::type operator*() const _NOEXCEPT
     {
         return *__ptr_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     element_type* operator->() const _NOEXCEPT
     {
         static_assert(!is_array<_Tp>::value,
@@ -815,46 +815,46 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
         return __ptr_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     long use_count() const _NOEXCEPT
     {
         return __cntrl_ ? __cntrl_->use_count() : 0;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     bool unique() const _NOEXCEPT
     {
         return use_count() == 1;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     explicit operator bool() const _NOEXCEPT
     {
         return get() != nullptr;
     }
 
     template <class _Up>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     bool owner_before(shared_ptr<_Up> const& __p) const _NOEXCEPT
     {
         return __cntrl_ < __p.__cntrl_;
     }
 
     template <class _Up>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     bool owner_before(weak_ptr<_Up> const& __p) const _NOEXCEPT
     {
         return __cntrl_ < __p.__cntrl_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     bool __owner_equivalent(const shared_ptr& __p) const
     {
         return __cntrl_ == __p.__cntrl_;
     }
 
-#if _LIBCPP_STD_VER > 14
-    _LIBCPP_HIDE_FROM_ABI
+#if _LIBCUDACXX_STD_VER > 14
+    _LIBCUDACXX_HIDE_FROM_ABI
     typename add_lvalue_reference<element_type>::type operator[](ptr
diff _t __i) const
     {
             static_assert(is_array<_Tp>::value,
@@ -863,19 +863,19 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     }
 #endif
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
     template <class _Dp>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     _Dp* __get_deleter() const _NOEXCEPT
     {
         return static_cast<_Dp*>(__cntrl_
                     ? const_cast<void *>(__cntrl_->__get_deleter(typeid(_Dp)))
                       : nullptr);
     }
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
     template<class _Yp, class _CntrlBlk>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     static shared_ptr<_Tp> __create_with_control_block(_Yp* __p, _CntrlBlk* __cntrl) _NOEXCEPT
     {
         shared_ptr<_Tp> __r;
@@ -901,7 +901,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
     template <class _Yp, class _OrigPtr, class = __enable_if_t<
         is_convertible<_OrigPtr*, const enable_shared_from_this<_Yp>*>::value
     > >
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     void __enable_weak_this(const enable_shared_from_this<_Yp>* __e, _OrigPtr* __ptr) _NOEXCEPT
     {
         typedef typename remove_cv<_Yp>::type _RawYp;
@@ -912,7 +912,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
         }
     }
 
-    _LIBCPP_HIDE_FROM_ABI void __enable_weak_this(...) _NOEXCEPT { }
+    _LIBCUDACXX_HIDE_FROM_ABI void __enable_weak_this(...) _NOEXCEPT { }
 
     template <class, class _Yp>
     struct __shared_ptr_default_delete
@@ -929,11 +929,11 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS shared_ptr
         : default_delete<_Yp[]>
     { };
 
-    template <class _Up> friend class _LIBCPP_TEMPLATE_VIS shared_ptr;
-    template <class _Up> friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
+    template <class _Up> friend class _LIBCUDACXX_TEMPLATE_VIS shared_ptr;
+    template <class _Up> friend class _LIBCUDACXX_TEMPLATE_VIS weak_ptr;
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template<class _Tp>
 shared_ptr(weak_ptr<_Tp>) -> shared_ptr<_Tp>;
 template<class _Tp, class _Dp>
@@ -944,25 +944,25 @@ shared_ptr(unique_ptr<_Tp, _Dp>) -> shared_ptr<_Tp>;
 // std::allocate_shared and std::make_shared
 //
 template<class _Tp, class _Alloc, class ..._Args, class = __enable_if_t<!is_array<_Tp>::value> >
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Tp> allocate_shared(const _Alloc& __a, _Args&& ...__args)
 {
     using _ControlBlock = __shared_ptr_emplace<_Tp, _Alloc>;
     using _ControlBlockAllocator = typename __allocator_traits_rebind<_Alloc, _ControlBlock>::type;
     __allocation_guard<_ControlBlockAllocator> __guard(__a, 1);
-    ::new ((void*)_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _VSTD::forward<_Args>(__args)...);
+    ::new ((void*)_CUDA_VSTD::addressof(*__guard.__get())) _ControlBlock(__a, _CUDA_VSTD::forward<_Args>(__args)...);
     auto __control_block = __guard.__release_ptr();
-    return shared_ptr<_Tp>::__create_with_control_block((*__control_block).__get_elem(), _VSTD::addressof(*__control_block));
+    return shared_ptr<_Tp>::__create_with_control_block((*__control_block).__get_elem(), _CUDA_VSTD::addressof(*__control_block));
 }
 
 template<class _Tp, class ..._Args, class = __enable_if_t<!is_array<_Tp>::value> >
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Tp> make_shared(_Args&& ...__args)
 {
-    return _VSTD::allocate_shared<_Tp>(allocator<_Tp>(), _VSTD::forward<_Args>(__args)...);
+    return _CUDA_VSTD::allocate_shared<_Tp>(allocator<_Tp>(), _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <size_t _Alignment>
 struct __sp_aligned_storage {
@@ -975,17 +975,17 @@ struct __unbounded_array_control_block;
 template <class _Tp, class _Alloc>
 struct __unbounded_array_control_block<_Tp[], _Alloc> : __shared_weak_count
 {
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     _Tp* __get_data() noexcept { return __data_; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     explicit __unbounded_array_control_block(_Alloc const& __alloc, size_t __count, _Tp const& __arg)
         : __alloc_(__alloc), __count_(__count)
     {
         std::__uninitialized_allocator_fill_n(__alloc_, std::begin(__data_), __count_, __arg);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     explicit __unbounded_array_control_block(_Alloc const& __alloc, size_t __count)
         : __alloc_(__alloc), __count_(__count)
     {
@@ -994,7 +994,7 @@ struct __unbounded_array_control_block<_Tp[], _Alloc> : __shared_weak_count
 
     // Returns the number of bytes required to store a control block followed by the given number
     // of elements of _Tp, with the whole storage being aligned to a multiple of _Tp's alignment.
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     static constexpr size_t __bytes_for(size_t __elements) {
         // When there's 0 elements, the control block alone is enough since it holds one element.
         // Otherwise, we allocate one fewer element than requested because the control block already
@@ -1008,7 +1008,7 @@ struct __unbounded_array_control_block<_Tp[], _Alloc> : __shared_weak_count
         return (__bytes + __align - 1) & ~(__align - 1);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     ~__unbounded_array_control_block() override { } // can't be `= default` because of the sometimes-non-trivial union member __data_
 
 private:
@@ -1029,7 +1029,7 @@ struct __unbounded_array_control_block<_Tp[], _Alloc> : __shared_weak_count
         allocator_traits<_StorageAlloc>::deallocate(__tmp, _PointerTraits::pointer_to(*__storage), __size);
     }
 
-    _LIBCPP_NO_UNIQUE_ADDRESS _Alloc __alloc_;
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _Alloc __alloc_;
     size_t __count_;
     union {
         _Tp __data_[1];
@@ -1037,10 +1037,10 @@ struct __unbounded_array_control_block<_Tp[], _Alloc> : __shared_weak_count
 };
 
 template<class _Array, class _Alloc, class... _Arg>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Array> __allocate_shared_unbounded_array(const _Alloc& __a, size_t __n, _Arg&& ...__arg)
 {
-    static_assert(__libcpp_is_unbounded_array<_Array>::value);
+    static_assert(__LIBCUDACXX_is_unbounded_array<_Array>::value);
     // We compute the number of bytes necessary to hold the control block and the
     // array elements. Then, we allocate an array of properly-aligned dummy structs
     // large enough to hold the control block and array. This allows shifting the
@@ -1062,20 +1062,20 @@ template <class _Tp, size_t _Count, class _Alloc>
 struct __bounded_array_control_block<_Tp[_Count], _Alloc>
     : __shared_weak_count
 {
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     _Tp* __get_data() noexcept { return __data_; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     explicit __bounded_array_control_block(_Alloc const& __alloc, _Tp const& __arg) : __alloc_(__alloc) {
         std::__uninitialized_allocator_fill_n(__alloc_, std::addressof(__data_[0]), _Count, __arg);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     explicit __bounded_array_control_block(_Alloc const& __alloc) : __alloc_(__alloc) {
         std::__uninitialized_allocator_value_construct_n(__alloc_, std::addressof(__data_[0]), _Count);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     ~__bounded_array_control_block() override { } // can't be `= default` because of the sometimes-non-trivial union member __data_
 
 private:
@@ -1093,17 +1093,17 @@ struct __bounded_array_control_block<_Tp[_Count], _Alloc>
         allocator_traits<_ControlBlockAlloc>::deallocate(__tmp, _PointerTraits::pointer_to(*this), sizeof(*this));
     }
 
-    _LIBCPP_NO_UNIQUE_ADDRESS _Alloc __alloc_;
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _Alloc __alloc_;
     union {
         _Tp __data_[_Count];
     };
 };
 
 template<class _Array, class _Alloc, class... _Arg>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Array> __allocate_shared_bounded_array(const _Alloc& __a, _Arg&& ...__arg)
 {
-    static_assert(__libcpp_is_bounded_array<_Array>::value);
+    static_assert(__LIBCUDACXX_is_bounded_array<_Array>::value);
     using _ControlBlock = __bounded_array_control_block<_Array, _Alloc>;
     using _ControlBlockAlloc = __allocator_traits_rebind_t<_Alloc, _ControlBlock>;
 
@@ -1114,70 +1114,70 @@ shared_ptr<_Array> __allocate_shared_bounded_array(const _Alloc& __a, _Arg&& ...
     return shared_ptr<_Array>::__create_with_control_block(__control_block->__get_data(), __control_block);
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template<class _Tp, class _Alloc, class = __enable_if_t<is_bounded_array<_Tp>::value>>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Tp> allocate_shared(const _Alloc& __a)
 {
     return std::__allocate_shared_bounded_array<_Tp>(__a);
 }
 
 template<class _Tp, class _Alloc, class = __enable_if_t<is_bounded_array<_Tp>::value>>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Tp> allocate_shared(const _Alloc& __a, const remove_extent_t<_Tp>& __u)
 {
     return std::__allocate_shared_bounded_array<_Tp>(__a, __u);
 }
 
 template<class _Tp, class _Alloc, class = __enable_if_t<is_unbounded_array<_Tp>::value>>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Tp> allocate_shared(const _Alloc& __a, size_t __n)
 {
     return std::__allocate_shared_unbounded_array<_Tp>(__a, __n);
 }
 
 template<class _Tp, class _Alloc, class = __enable_if_t<is_unbounded_array<_Tp>::value>>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Tp> allocate_shared(const _Alloc& __a, size_t __n, const remove_extent_t<_Tp>& __u)
 {
     return std::__allocate_shared_unbounded_array<_Tp>(__a, __n, __u);
 }
 
 template<class _Tp, class = __enable_if_t<is_bounded_array<_Tp>::value>>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Tp> make_shared()
 {
     return std::__allocate_shared_bounded_array<_Tp>(allocator<_Tp>());
 }
 
 template<class _Tp, class = __enable_if_t<is_bounded_array<_Tp>::value>>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Tp> make_shared(const remove_extent_t<_Tp>& __u)
 {
     return std::__allocate_shared_bounded_array<_Tp>(allocator<_Tp>(), __u);
 }
 
 template<class _Tp, class = __enable_if_t<is_unbounded_array<_Tp>::value>>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Tp> make_shared(size_t __n)
 {
     return std::__allocate_shared_unbounded_array<_Tp>(allocator<_Tp>(), __n);
 }
 
 template<class _Tp, class = __enable_if_t<is_unbounded_array<_Tp>::value>>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 shared_ptr<_Tp> make_shared(size_t __n, const remove_extent_t<_Tp>& __u)
 {
     return std::__allocate_shared_unbounded_array<_Tp>(allocator<_Tp>(), __n, __u);
 }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 template<class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 {
@@ -1185,7 +1185,7 @@ operator==(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 }
 
 template<class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 {
@@ -1193,11 +1193,11 @@ operator!=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 }
 
 template<class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 {
-#if _LIBCPP_STD_VER <= 11
+#if _LIBCUDACXX_STD_VER <= 11
     typedef typename common_type<_Tp*, _Up*>::type _Vp;
     return less<_Vp>()(__x.get(), __y.get());
 #else
@@ -1207,7 +1207,7 @@ operator<(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 }
 
 template<class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 {
@@ -1215,7 +1215,7 @@ operator>(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 }
 
 template<class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 {
@@ -1223,7 +1223,7 @@ operator<=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 }
 
 template<class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 {
@@ -1231,7 +1231,7 @@ operator>=(const shared_ptr<_Tp>& __x, const shared_ptr<_Up>& __y) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 {
@@ -1239,7 +1239,7 @@ operator==(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 {
@@ -1247,7 +1247,7 @@ operator==(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 {
@@ -1255,7 +1255,7 @@ operator!=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 {
@@ -1263,7 +1263,7 @@ operator!=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 {
@@ -1271,7 +1271,7 @@ operator<(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 {
@@ -1279,7 +1279,7 @@ operator<(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 {
@@ -1287,7 +1287,7 @@ operator>(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 {
@@ -1295,7 +1295,7 @@ operator>(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 {
@@ -1303,7 +1303,7 @@ operator<=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 {
@@ -1311,7 +1311,7 @@ operator<=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 {
@@ -1319,7 +1319,7 @@ operator>=(const shared_ptr<_Tp>& __x, nullptr_t) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 {
@@ -1327,7 +1327,7 @@ operator>=(nullptr_t, const shared_ptr<_Tp>& __x) _NOEXCEPT
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(shared_ptr<_Tp>& __x, shared_ptr<_Tp>& __y) _NOEXCEPT
 {
@@ -1335,7 +1335,7 @@ swap(shared_ptr<_Tp>& __x, shared_ptr<_Tp>& __y) _NOEXCEPT
 }
 
 template<class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 shared_ptr<_Tp>
 static_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
 {
@@ -1345,7 +1345,7 @@ static_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
 }
 
 template<class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 shared_ptr<_Tp>
 dynamic_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
 {
@@ -1371,23 +1371,23 @@ reinterpret_pointer_cast(const shared_ptr<_Up>& __r) _NOEXCEPT
                                typename shared_ptr<_Tp>::element_type*>(__r.get()));
 }
 
-#ifndef _LIBCPP_NO_RTTI
+#ifndef _LIBCUDACXX_NO_RTTI
 
 template<class _Dp, class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _Dp*
 get_deleter(const shared_ptr<_Tp>& __p) _NOEXCEPT
 {
     return __p.template __get_deleter<_Dp>();
 }
 
-#endif // _LIBCPP_NO_RTTI
+#endif // _LIBCUDACXX_NO_RTTI
 
 template<class _Tp>
-class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr
+class _LIBCUDACXX_SHARED_PTR_TRIVIAL_ABI _LIBCUDACXX_TEMPLATE_VIS weak_ptr
 {
 public:
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     typedef remove_extent_t<_Tp> element_type;
 #else
     typedef _Tp element_type;
@@ -1398,25 +1398,25 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr
     __shared_weak_count* __cntrl_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR weak_ptr() _NOEXCEPT;
-    template<class _Yp> _LIBCPP_INLINE_VISIBILITY weak_ptr(shared_ptr<_Yp> const& __r,
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR weak_ptr() _NOEXCEPT;
+    template<class _Yp> _LIBCUDACXX_INLINE_VISIBILITY weak_ptr(shared_ptr<_Yp> const& __r,
                    typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = 0)
                         _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     weak_ptr(weak_ptr const& __r) _NOEXCEPT;
-    template<class _Yp> _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp> const& __r,
+    template<class _Yp> _LIBCUDACXX_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp> const& __r,
                    typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = 0)
                          _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     weak_ptr(weak_ptr&& __r) _NOEXCEPT;
-    template<class _Yp> _LIBCPP_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp>&& __r,
+    template<class _Yp> _LIBCUDACXX_INLINE_VISIBILITY weak_ptr(weak_ptr<_Yp>&& __r,
                    typename enable_if<__compatible_with<_Yp, _Tp>::value, __nat*>::type = 0)
                          _NOEXCEPT;
     ~weak_ptr();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     weak_ptr& operator=(weak_ptr const& __r) _NOEXCEPT;
     template<class _Yp>
         typename enable_if
@@ -1424,10 +1424,10 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr
             __compatible_with<_Yp, _Tp>::value,
             weak_ptr&
         >::type
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         operator=(weak_ptr<_Yp> const& __r) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     weak_ptr& operator=(weak_ptr&& __r) _NOEXCEPT;
     template<class _Yp>
         typename enable_if
@@ -1435,7 +1435,7 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr
             __compatible_with<_Yp, _Tp>::value,
             weak_ptr&
         >::type
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         operator=(weak_ptr<_Yp>&& __r) _NOEXCEPT;
 
     template<class _Yp>
@@ -1444,42 +1444,42 @@ class _LIBCPP_SHARED_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS weak_ptr
             __compatible_with<_Yp, _Tp>::value,
             weak_ptr&
         >::type
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         operator=(shared_ptr<_Yp> const& __r) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(weak_ptr& __r) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     long use_count() const _NOEXCEPT
         {return __cntrl_ ? __cntrl_->use_count() : 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool expired() const _NOEXCEPT
         {return __cntrl_ == nullptr || __cntrl_->use_count() == 0;}
     shared_ptr<_Tp> lock() const _NOEXCEPT;
     template<class _Up>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         bool owner_before(const shared_ptr<_Up>& __r) const _NOEXCEPT
         {return __cntrl_ < __r.__cntrl_;}
     template<class _Up>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         bool owner_before(const weak_ptr<_Up>& __r) const _NOEXCEPT
         {return __cntrl_ < __r.__cntrl_;}
 
-    template <class _Up> friend class _LIBCPP_TEMPLATE_VIS weak_ptr;
-    template <class _Up> friend class _LIBCPP_TEMPLATE_VIS shared_ptr;
+    template <class _Up> friend class _LIBCUDACXX_TEMPLATE_VIS weak_ptr;
+    template <class _Up> friend class _LIBCUDACXX_TEMPLATE_VIS shared_ptr;
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template<class _Tp>
 weak_ptr(shared_ptr<_Tp>) -> weak_ptr<_Tp>;
 #endif
 
 template<class _Tp>
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 weak_ptr<_Tp>::weak_ptr() _NOEXCEPT
     : __ptr_(nullptr),
       __cntrl_(nullptr)
@@ -1580,7 +1580,7 @@ inline
 weak_ptr<_Tp>&
 weak_ptr<_Tp>::operator=(weak_ptr&& __r) _NOEXCEPT
 {
-    weak_ptr(_VSTD::move(__r)).swap(*this);
+    weak_ptr(_CUDA_VSTD::move(__r)).swap(*this);
     return *this;
 }
 
@@ -1594,7 +1594,7 @@ typename enable_if
 >::type
 weak_ptr<_Tp>::operator=(weak_ptr<_Yp>&& __r) _NOEXCEPT
 {
-    weak_ptr(_VSTD::move(__r)).swap(*this);
+    weak_ptr(_CUDA_VSTD::move(__r)).swap(*this);
     return *this;
 }
 
@@ -1617,12 +1617,12 @@ inline
 void
 weak_ptr<_Tp>::swap(weak_ptr& __r) _NOEXCEPT
 {
-    _VSTD::swap(__ptr_, __r.__ptr_);
-    _VSTD::swap(__cntrl_, __r.__cntrl_);
+    _CUDA_VSTD::swap(__ptr_, __r.__ptr_);
+    _CUDA_VSTD::swap(__cntrl_, __r.__cntrl_);
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(weak_ptr<_Tp>& __x, weak_ptr<_Tp>& __y) _NOEXCEPT
 {
@@ -1648,7 +1648,7 @@ weak_ptr<_Tp>::lock() const _NOEXCEPT
     return __r;
 }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp = void> struct owner_less;
 #else
 template <class _Tp> struct owner_less;
@@ -1656,53 +1656,53 @@ template <class _Tp> struct owner_less;
 
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS owner_less<shared_ptr<_Tp> >
+struct _LIBCUDACXX_TEMPLATE_VIS owner_less<shared_ptr<_Tp> >
     : __binary_function<shared_ptr<_Tp>, shared_ptr<_Tp>, bool>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(shared_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const _NOEXCEPT
         {return __x.owner_before(__y);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(shared_ptr<_Tp> const& __x,   weak_ptr<_Tp> const& __y) const _NOEXCEPT
         {return __x.owner_before(__y);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(  weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const _NOEXCEPT
         {return __x.owner_before(__y);}
 };
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS owner_less<weak_ptr<_Tp> >
+struct _LIBCUDACXX_TEMPLATE_VIS owner_less<weak_ptr<_Tp> >
     : __binary_function<weak_ptr<_Tp>, weak_ptr<_Tp>, bool>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(  weak_ptr<_Tp> const& __x,   weak_ptr<_Tp> const& __y) const _NOEXCEPT
         {return __x.owner_before(__y);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(shared_ptr<_Tp> const& __x,   weak_ptr<_Tp> const& __y) const _NOEXCEPT
         {return __x.owner_before(__y);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(  weak_ptr<_Tp> const& __x, shared_ptr<_Tp> const& __y) const _NOEXCEPT
         {return __x.owner_before(__y);}
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <>
-struct _LIBCPP_TEMPLATE_VIS owner_less<void>
+struct _LIBCUDACXX_TEMPLATE_VIS owner_less<void>
 {
     template <class _Tp, class _Up>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()( shared_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const _NOEXCEPT
         {return __x.owner_before(__y);}
     template <class _Tp, class _Up>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()( shared_ptr<_Tp> const& __x,   weak_ptr<_Up> const& __y) const _NOEXCEPT
         {return __x.owner_before(__y);}
     template <class _Tp, class _Up>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(   weak_ptr<_Tp> const& __x, shared_ptr<_Up> const& __y) const _NOEXCEPT
         {return __x.owner_before(__y);}
     template <class _Tp, class _Up>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(   weak_ptr<_Tp> const& __x,   weak_ptr<_Up> const& __y) const _NOEXCEPT
         {return __x.owner_before(__y);}
     typedef void is_transparent;
@@ -1710,51 +1710,51 @@ struct _LIBCPP_TEMPLATE_VIS owner_less<void>
 #endif
 
 template<class _Tp>
-class _LIBCPP_TEMPLATE_VIS enable_shared_from_this
+class _LIBCUDACXX_TEMPLATE_VIS enable_shared_from_this
 {
     mutable weak_ptr<_Tp> __weak_this_;
 protected:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     enable_shared_from_this() _NOEXCEPT {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     enable_shared_from_this(enable_shared_from_this const&) _NOEXCEPT {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     enable_shared_from_this& operator=(enable_shared_from_this const&) _NOEXCEPT
         {return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~enable_shared_from_this() {}
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_ptr<_Tp> shared_from_this()
         {return shared_ptr<_Tp>(__weak_this_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_ptr<_Tp const> shared_from_this() const
         {return shared_ptr<const _Tp>(__weak_this_);}
 
-#if _LIBCPP_STD_VER > 14
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
+    _LIBCUDACXX_INLINE_VISIBILITY
     weak_ptr<_Tp> weak_from_this() _NOEXCEPT
        { return __weak_this_; }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     weak_ptr<const _Tp> weak_from_this() const _NOEXCEPT
         { return __weak_this_; }
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
     template <class _Up> friend class shared_ptr;
 };
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS hash;
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash<shared_ptr<_Tp> >
+struct _LIBCUDACXX_TEMPLATE_VIS hash<shared_ptr<_Tp> >
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef shared_ptr<_Tp> argument_type;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t          result_type;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef shared_ptr<_Tp> argument_type;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef size_t          result_type;
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const shared_ptr<_Tp>& __ptr) const _NOEXCEPT
     {
         return hash<typename shared_ptr<_Tp>::element_type*>()(__ptr.get());
@@ -1762,14 +1762,14 @@ struct _LIBCPP_TEMPLATE_VIS hash<shared_ptr<_Tp> >
 };
 
 template<class _CharT, class _Traits, class _Yp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);
 
 
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 
-class _LIBCPP_TYPE_VIS __sp_mut
+class _LIBCUDACXX_TYPE_VIS __sp_mut
 {
     void* __lx;
 public:
@@ -1777,18 +1777,18 @@ class _LIBCPP_TYPE_VIS __sp_mut
     void unlock() _NOEXCEPT;
 
 private:
-    _LIBCPP_CONSTEXPR __sp_mut(void*) _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR __sp_mut(void*) _NOEXCEPT;
     __sp_mut(const __sp_mut&);
     __sp_mut& operator=(const __sp_mut&);
 
-    friend _LIBCPP_FUNC_VIS __sp_mut& __get_sp_mut(const void*);
+    friend _LIBCUDACXX_FUNC_VIS __sp_mut& __get_sp_mut(const void*);
 };
 
-_LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+_LIBCUDACXX_FUNC_VIS _LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 __sp_mut& __get_sp_mut(const void*);
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_is_lock_free(const shared_ptr<_Tp>*)
 {
@@ -1796,7 +1796,7 @@ atomic_is_lock_free(const shared_ptr<_Tp>*)
 }
 
 template <class _Tp>
-_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+_LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 shared_ptr<_Tp>
 atomic_load(const shared_ptr<_Tp>* __p)
 {
@@ -1808,8 +1808,8 @@ atomic_load(const shared_ptr<_Tp>* __p)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 shared_ptr<_Tp>
 atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
 {
@@ -1817,7 +1817,7 @@ atomic_load_explicit(const shared_ptr<_Tp>* __p, memory_order)
 }
 
 template <class _Tp>
-_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+_LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 void
 atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
 {
@@ -1828,8 +1828,8 @@ atomic_store(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 void
 atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
 {
@@ -1837,7 +1837,7 @@ atomic_store_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
 }
 
 template <class _Tp>
-_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+_LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 shared_ptr<_Tp>
 atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
 {
@@ -1849,8 +1849,8 @@ atomic_exchange(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 shared_ptr<_Tp>
 atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order)
 {
@@ -1858,7 +1858,7 @@ atomic_exchange_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp> __r, memory_order
 }
 
 template <class _Tp>
-_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+_LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 bool
 atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
 {
@@ -1867,20 +1867,20 @@ atomic_compare_exchange_strong(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, share
     __m.lock();
     if (__p->__owner_equivalent(*__v))
     {
-        _VSTD::swap(__temp, *__p);
+        _CUDA_VSTD::swap(__temp, *__p);
         *__p = __w;
         __m.unlock();
         return true;
     }
-    _VSTD::swap(__temp, *__v);
+    _CUDA_VSTD::swap(__temp, *__v);
     *__v = *__p;
     __m.unlock();
     return false;
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 bool
 atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_ptr<_Tp> __w)
 {
@@ -1888,8 +1888,8 @@ atomic_compare_exchange_weak(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v, shared_
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 bool
 atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
                                         shared_ptr<_Tp> __w, memory_order, memory_order)
@@ -1898,8 +1898,8 @@ atomic_compare_exchange_strong_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* _
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_ATOMIC_SHARED_PTR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_ATOMIC_SHARED_PTR
 bool
 atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v,
                                       shared_ptr<_Tp> __w, memory_order, memory_order)
@@ -1907,8 +1907,8 @@ atomic_compare_exchange_weak_explicit(shared_ptr<_Tp>* __p, shared_ptr<_Tp>* __v
     return atomic_compare_exchange_weak(__p, __v, __w);
 }
 
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // !defined(_LIBCUDACXX_HAS_NO_THREADS)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_SHARED_PTR_H
+#endif // _LIBCUDACXX___MEMORY_SHARED_PTR_H

diff  --git a/libcxx/include/__memory/swap_allocator.h b/libcxx/include/__memory/swap_allocator.h
index 64970fa9e2f4..57893c470640 100644
--- a/libcxx/include/__memory/swap_allocator.h
+++ b/libcxx/include/__memory/swap_allocator.h
@@ -6,48 +6,48 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_SWAP_ALLOCATOR_H
-#define _LIBCPP___MEMORY_SWAP_ALLOCATOR_H
+#ifndef _LIBCUDACXX___MEMORY_SWAP_ALLOCATOR_H
+#define _LIBCUDACXX___MEMORY_SWAP_ALLOCATOR_H
 
 #include <__config>
 #include <__memory/allocator_traits.h>
 #include <__type_traits/integral_constant.h>
 #include <__utility/swap.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <typename _Alloc>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void __swap_allocator(_Alloc& __a1, _Alloc& __a2, true_type)
-#if _LIBCPP_STD_VER > 11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 void __swap_allocator(_Alloc& __a1, _Alloc& __a2, true_type)
+#if _LIBCUDACXX_STD_VER > 11
     _NOEXCEPT
 #else
     _NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value)
 #endif
 {
-  using _VSTD::swap;
+  using _CUDA_VSTD::swap;
   swap(__a1, __a2);
 }
 
 template <typename _Alloc>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 void
 __swap_allocator(_Alloc&, _Alloc&, false_type) _NOEXCEPT {}
 
 template <typename _Alloc>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void __swap_allocator(_Alloc& __a1, _Alloc& __a2)
-#if _LIBCPP_STD_VER > 11
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 void __swap_allocator(_Alloc& __a1, _Alloc& __a2)
+#if _LIBCUDACXX_STD_VER > 11
     _NOEXCEPT
 #else
     _NOEXCEPT_(__is_nothrow_swappable<_Alloc>::value)
 #endif
 {
-  _VSTD::__swap_allocator(
+  _CUDA_VSTD::__swap_allocator(
       __a1, __a2, integral_constant<bool, allocator_traits<_Alloc>::propagate_on_container_swap::value>());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_SWAP_ALLOCATOR_H
+#endif // _LIBCUDACXX___MEMORY_SWAP_ALLOCATOR_H

diff  --git a/libcxx/include/__memory/temporary_buffer.h b/libcxx/include/__memory/temporary_buffer.h
index b1f7a126299f..2f5cdb78ae4f 100644
--- a/libcxx/include/__memory/temporary_buffer.h
+++ b/libcxx/include/__memory/temporary_buffer.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_TEMPORARY_BUFFER_H
-#define _LIBCPP___MEMORY_TEMPORARY_BUFFER_H
+#ifndef _LIBCUDACXX___MEMORY_TEMPORARY_BUFFER_H
+#define _LIBCUDACXX___MEMORY_TEMPORARY_BUFFER_H
 
 #include <__config>
 #include <__type_traits/alignment_of.h>
@@ -16,14 +16,14 @@
 #include <cstddef>
 #include <new>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-_LIBCPP_NODISCARD_EXT _LIBCPP_NO_CFI _LIBCPP_DEPRECATED_IN_CXX17
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_NO_CFI _LIBCUDACXX_DEPRECATED_IN_CXX17
 pair<_Tp*, ptr
diff _t>
 get_temporary_buffer(ptr
diff _t __n) _NOEXCEPT
 {
@@ -35,8 +35,8 @@ get_temporary_buffer(ptr
diff _t __n) _NOEXCEPT
         __n = __m;
     while (__n > 0)
     {
-#if !defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)
-    if (__is_overaligned_for_new(_LIBCPP_ALIGNOF(_Tp)))
+#if !defined(_LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION)
+    if (__is_overaligned_for_new(_LIBCUDACXX_ALIGNOF(_Tp)))
         {
             align_val_t __al =
                 align_val_t(alignment_of<_Tp>::value);
@@ -47,7 +47,7 @@ get_temporary_buffer(ptr
diff _t __n) _NOEXCEPT
                 __n * sizeof(_Tp), nothrow));
         }
 #else
-    if (__is_overaligned_for_new(_LIBCPP_ALIGNOF(_Tp)))
+    if (__is_overaligned_for_new(_LIBCUDACXX_ALIGNOF(_Tp)))
         {
             // Since aligned operator new is unavailable, return an empty
             // buffer rather than one with invalid alignment.
@@ -68,20 +68,20 @@ get_temporary_buffer(ptr
diff _t __n) _NOEXCEPT
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_DEPRECATED_IN_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_DEPRECATED_IN_CXX17
 void return_temporary_buffer(_Tp* __p) _NOEXCEPT
 {
-  _VSTD::__libcpp_deallocate_unsized((void*)__p, _LIBCPP_ALIGNOF(_Tp));
+  _CUDA_VSTD::__LIBCUDACXX_deallocate_unsized((void*)__p, _LIBCUDACXX_ALIGNOF(_Tp));
 }
 
 struct __return_temporary_buffer
 {
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
     template <class _Tp>
-    _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __p) const {_VSTD::return_temporary_buffer(__p);}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+    _LIBCUDACXX_INLINE_VISIBILITY void operator()(_Tp* __p) const {_CUDA_VSTD::return_temporary_buffer(__p);}
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_TEMPORARY_BUFFER_H
+#endif // _LIBCUDACXX___MEMORY_TEMPORARY_BUFFER_H

diff  --git a/libcxx/include/__memory/uninitialized_algorithms.h b/libcxx/include/__memory/uninitialized_algorithms.h
index 4f3d4e90cb6e..64cf0df60f33 100644
--- a/libcxx/include/__memory/uninitialized_algorithms.h
+++ b/libcxx/include/__memory/uninitialized_algorithms.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_UNINITIALIZED_ALGORITHMS_H
-#define _LIBCPP___MEMORY_UNINITIALIZED_ALGORITHMS_H
+#ifndef _LIBCUDACXX___MEMORY_UNINITIALIZED_ALGORITHMS_H
+#define _LIBCUDACXX___MEMORY_UNINITIALIZED_ALGORITHMS_H
 
 #include <__algorithm/copy.h>
 #include <__algorithm/move.h>
@@ -26,17 +26,17 @@
 #include <__utility/transaction.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // This is a simplified version of C++20 `unreachable_sentinel` that doesn't use concepts and thus can be used in any
 // language mode.
 struct __unreachable_sentinel {
   template <class _Iter>
-  _LIBCPP_HIDE_FROM_ABI friend _LIBCPP_CONSTEXPR bool operator!=(const _Iter&, __unreachable_sentinel) _NOEXCEPT {
+  _LIBCUDACXX_HIDE_FROM_ABI friend _LIBCUDACXX_CONSTEXPR bool operator!=(const _Iter&, __unreachable_sentinel) _NOEXCEPT {
     return true;
   }
 };
@@ -44,83 +44,83 @@ struct __unreachable_sentinel {
 // uninitialized_copy
 
 template <class _ValueType, class _InputIterator, class _Sentinel1, class _ForwardIterator, class _Sentinel2>
-inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
+inline _LIBCUDACXX_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
 __uninitialized_copy(_InputIterator __ifirst, _Sentinel1 __ilast,
                      _ForwardIterator __ofirst, _Sentinel2 __olast) {
   _ForwardIterator __idx = __ofirst;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   try {
 #endif
     for (; __ifirst != __ilast && __idx != __olast; ++__ifirst, (void)++__idx)
-      ::new (_VSTD::__voidify(*__idx)) _ValueType(*__ifirst);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+      ::new (_CUDA_VSTD::__voidify(*__idx)) _ValueType(*__ifirst);
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   } catch (...) {
-    _VSTD::__destroy(__ofirst, __idx);
+    _CUDA_VSTD::__destroy(__ofirst, __idx);
     throw;
   }
 #endif
 
-  return pair<_InputIterator, _ForwardIterator>(_VSTD::move(__ifirst), _VSTD::move(__idx));
+  return pair<_InputIterator, _ForwardIterator>(_CUDA_VSTD::move(__ifirst), _CUDA_VSTD::move(__idx));
 }
 
 template <class _InputIterator, class _ForwardIterator>
 _ForwardIterator uninitialized_copy(_InputIterator __ifirst, _InputIterator __ilast,
                                     _ForwardIterator __ofirst) {
   typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
-  auto __result = _VSTD::__uninitialized_copy<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast),
-                                                          _VSTD::move(__ofirst), __unreachable_sentinel());
-  return _VSTD::move(__result.second);
+  auto __result = _CUDA_VSTD::__uninitialized_copy<_ValueType>(_CUDA_VSTD::move(__ifirst), _CUDA_VSTD::move(__ilast),
+                                                          _CUDA_VSTD::move(__ofirst), __unreachable_sentinel());
+  return _CUDA_VSTD::move(__result.second);
 }
 
 // uninitialized_copy_n
 
 template <class _ValueType, class _InputIterator, class _Size, class _ForwardIterator, class _Sentinel>
-inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
+inline _LIBCUDACXX_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
 __uninitialized_copy_n(_InputIterator __ifirst, _Size __n,
                        _ForwardIterator __ofirst, _Sentinel __olast) {
   _ForwardIterator __idx = __ofirst;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   try {
 #endif
     for (; __n > 0 && __idx != __olast; ++__ifirst, (void)++__idx, (void)--__n)
-      ::new (_VSTD::__voidify(*__idx)) _ValueType(*__ifirst);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+      ::new (_CUDA_VSTD::__voidify(*__idx)) _ValueType(*__ifirst);
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   } catch (...) {
-    _VSTD::__destroy(__ofirst, __idx);
+    _CUDA_VSTD::__destroy(__ofirst, __idx);
     throw;
   }
 #endif
 
-  return pair<_InputIterator, _ForwardIterator>(_VSTD::move(__ifirst), _VSTD::move(__idx));
+  return pair<_InputIterator, _ForwardIterator>(_CUDA_VSTD::move(__ifirst), _CUDA_VSTD::move(__idx));
 }
 
 template <class _InputIterator, class _Size, class _ForwardIterator>
-inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator uninitialized_copy_n(_InputIterator __ifirst, _Size __n,
+inline _LIBCUDACXX_HIDE_FROM_ABI _ForwardIterator uninitialized_copy_n(_InputIterator __ifirst, _Size __n,
                                                                    _ForwardIterator __ofirst) {
   typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
-  auto __result = _VSTD::__uninitialized_copy_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst),
+  auto __result = _CUDA_VSTD::__uninitialized_copy_n<_ValueType>(_CUDA_VSTD::move(__ifirst), __n, _CUDA_VSTD::move(__ofirst),
                                                             __unreachable_sentinel());
-  return _VSTD::move(__result.second);
+  return _CUDA_VSTD::move(__result.second);
 }
 
 // uninitialized_fill
 
 template <class _ValueType, class _ForwardIterator, class _Sentinel, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 _ForwardIterator __uninitialized_fill(_ForwardIterator __first, _Sentinel __last, const _Tp& __x)
 {
     _ForwardIterator __idx = __first;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
 #endif
         for (; __idx != __last; ++__idx)
-            ::new (_VSTD::__voidify(*__idx)) _ValueType(__x);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+            ::new (_CUDA_VSTD::__voidify(*__idx)) _ValueType(__x);
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
-        _VSTD::__destroy(__first, __idx);
+        _CUDA_VSTD::__destroy(__first, __idx);
         throw;
     }
 #endif
@@ -129,31 +129,31 @@ _ForwardIterator __uninitialized_fill(_ForwardIterator __first, _Sentinel __last
 }
 
 template <class _ForwardIterator, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 void uninitialized_fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __x)
 {
     typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
-    (void)_VSTD::__uninitialized_fill<_ValueType>(__first, __last, __x);
+    (void)_CUDA_VSTD::__uninitialized_fill<_ValueType>(__first, __last, __x);
 }
 
 // uninitialized_fill_n
 
 template <class _ValueType, class _ForwardIterator, class _Size, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 _ForwardIterator __uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
 {
     _ForwardIterator __idx = __first;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
 #endif
         for (; __n > 0; ++__idx, (void) --__n)
-            ::new (_VSTD::__voidify(*__idx)) _ValueType(__x);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+            ::new (_CUDA_VSTD::__voidify(*__idx)) _ValueType(__x);
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
-        _VSTD::__destroy(__first, __idx);
+        _CUDA_VSTD::__destroy(__first, __idx);
         throw;
     }
 #endif
@@ -162,29 +162,29 @@ _ForwardIterator __uninitialized_fill_n(_ForwardIterator __first, _Size __n, con
 }
 
 template <class _ForwardIterator, class _Size, class _Tp>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 _ForwardIterator uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x)
 {
     typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
-    return _VSTD::__uninitialized_fill_n<_ValueType>(__first, __n, __x);
+    return _CUDA_VSTD::__uninitialized_fill_n<_ValueType>(__first, __n, __x);
 }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 // uninitialized_default_construct
 
 template <class _ValueType, class _ForwardIterator, class _Sentinel>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 _ForwardIterator __uninitialized_default_construct(_ForwardIterator __first, _Sentinel __last) {
     auto __idx = __first;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try {
 #endif
     for (; __idx != __last; ++__idx)
-        ::new (_VSTD::__voidify(*__idx)) _ValueType;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+        ::new (_CUDA_VSTD::__voidify(*__idx)) _ValueType;
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     } catch (...) {
-        _VSTD::__destroy(__first, __idx);
+        _CUDA_VSTD::__destroy(__first, __idx);
         throw;
     }
 #endif
@@ -193,27 +193,27 @@ _ForwardIterator __uninitialized_default_construct(_ForwardIterator __first, _Se
 }
 
 template <class _ForwardIterator>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 void uninitialized_default_construct(_ForwardIterator __first, _ForwardIterator __last) {
     using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
-    (void)_VSTD::__uninitialized_default_construct<_ValueType>(
-        _VSTD::move(__first), _VSTD::move(__last));
+    (void)_CUDA_VSTD::__uninitialized_default_construct<_ValueType>(
+        _CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last));
 }
 
 // uninitialized_default_construct_n
 
 template <class _ValueType, class _ForwardIterator, class _Size>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 _ForwardIterator __uninitialized_default_construct_n(_ForwardIterator __first, _Size __n) {
     auto __idx = __first;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try {
 #endif
     for (; __n > 0; ++__idx, (void) --__n)
-        ::new (_VSTD::__voidify(*__idx)) _ValueType;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+        ::new (_CUDA_VSTD::__voidify(*__idx)) _ValueType;
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     } catch (...) {
-        _VSTD::__destroy(__first, __idx);
+        _CUDA_VSTD::__destroy(__first, __idx);
         throw;
     }
 #endif
@@ -222,26 +222,26 @@ _ForwardIterator __uninitialized_default_construct_n(_ForwardIterator __first, _
 }
 
 template <class _ForwardIterator, class _Size>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 _ForwardIterator uninitialized_default_construct_n(_ForwardIterator __first, _Size __n) {
     using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
-    return _VSTD::__uninitialized_default_construct_n<_ValueType>(_VSTD::move(__first), __n);
+    return _CUDA_VSTD::__uninitialized_default_construct_n<_ValueType>(_CUDA_VSTD::move(__first), __n);
 }
 
 // uninitialized_value_construct
 
 template <class _ValueType, class _ForwardIterator, class _Sentinel>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 _ForwardIterator __uninitialized_value_construct(_ForwardIterator __first, _Sentinel __last) {
     auto __idx = __first;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try {
 #endif
     for (; __idx != __last; ++__idx)
-        ::new (_VSTD::__voidify(*__idx)) _ValueType();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+        ::new (_CUDA_VSTD::__voidify(*__idx)) _ValueType();
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     } catch (...) {
-        _VSTD::__destroy(__first, __idx);
+        _CUDA_VSTD::__destroy(__first, __idx);
         throw;
     }
 #endif
@@ -250,27 +250,27 @@ _ForwardIterator __uninitialized_value_construct(_ForwardIterator __first, _Sent
 }
 
 template <class _ForwardIterator>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 void uninitialized_value_construct(_ForwardIterator __first, _ForwardIterator __last) {
     using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
-    (void)_VSTD::__uninitialized_value_construct<_ValueType>(
-        _VSTD::move(__first), _VSTD::move(__last));
+    (void)_CUDA_VSTD::__uninitialized_value_construct<_ValueType>(
+        _CUDA_VSTD::move(__first), _CUDA_VSTD::move(__last));
 }
 
 // uninitialized_value_construct_n
 
 template <class _ValueType, class _ForwardIterator, class _Size>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 _ForwardIterator __uninitialized_value_construct_n(_ForwardIterator __first, _Size __n) {
     auto __idx = __first;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try {
 #endif
     for (; __n > 0; ++__idx, (void) --__n)
-        ::new (_VSTD::__voidify(*__idx)) _ValueType();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+        ::new (_CUDA_VSTD::__voidify(*__idx)) _ValueType();
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     } catch (...) {
-        _VSTD::__destroy(__first, __idx);
+        _CUDA_VSTD::__destroy(__first, __idx);
         throw;
     }
 #endif
@@ -279,76 +279,76 @@ _ForwardIterator __uninitialized_value_construct_n(_ForwardIterator __first, _Si
 }
 
 template <class _ForwardIterator, class _Size>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 _ForwardIterator uninitialized_value_construct_n(_ForwardIterator __first, _Size __n) {
     using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
-    return __uninitialized_value_construct_n<_ValueType>(_VSTD::move(__first), __n);
+    return __uninitialized_value_construct_n<_ValueType>(_CUDA_VSTD::move(__first), __n);
 }
 
 // uninitialized_move
 
 template <class _ValueType, class _InputIterator, class _Sentinel1, class _ForwardIterator, class _Sentinel2,
           class _IterMove>
-inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
+inline _LIBCUDACXX_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
 __uninitialized_move(_InputIterator __ifirst, _Sentinel1 __ilast,
                      _ForwardIterator __ofirst, _Sentinel2 __olast, _IterMove __iter_move) {
   auto __idx = __ofirst;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   try {
 #endif
     for (; __ifirst != __ilast && __idx != __olast; ++__idx, (void)++__ifirst) {
-      ::new (_VSTD::__voidify(*__idx)) _ValueType(__iter_move(__ifirst));
+      ::new (_CUDA_VSTD::__voidify(*__idx)) _ValueType(__iter_move(__ifirst));
     }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   } catch (...) {
-    _VSTD::__destroy(__ofirst, __idx);
+    _CUDA_VSTD::__destroy(__ofirst, __idx);
     throw;
   }
 #endif
 
-  return {_VSTD::move(__ifirst), _VSTD::move(__idx)};
+  return {_CUDA_VSTD::move(__ifirst), _CUDA_VSTD::move(__idx)};
 }
 
 template <class _InputIterator, class _ForwardIterator>
-inline _LIBCPP_HIDE_FROM_ABI _ForwardIterator uninitialized_move(_InputIterator __ifirst, _InputIterator __ilast,
+inline _LIBCUDACXX_HIDE_FROM_ABI _ForwardIterator uninitialized_move(_InputIterator __ifirst, _InputIterator __ilast,
                                                                  _ForwardIterator __ofirst) {
   using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
-  auto __iter_move = [](auto&& __iter) -> decltype(auto) { return _VSTD::move(*__iter); };
+  auto __iter_move = [](auto&& __iter) -> decltype(auto) { return _CUDA_VSTD::move(*__iter); };
 
-  auto __result = _VSTD::__uninitialized_move<_ValueType>(_VSTD::move(__ifirst), _VSTD::move(__ilast),
-                                                          _VSTD::move(__ofirst), __unreachable_sentinel(), __iter_move);
-  return _VSTD::move(__result.second);
+  auto __result = _CUDA_VSTD::__uninitialized_move<_ValueType>(_CUDA_VSTD::move(__ifirst), _CUDA_VSTD::move(__ilast),
+                                                          _CUDA_VSTD::move(__ofirst), __unreachable_sentinel(), __iter_move);
+  return _CUDA_VSTD::move(__result.second);
 }
 
 // uninitialized_move_n
 
 template <class _ValueType, class _InputIterator, class _Size, class _ForwardIterator, class _Sentinel, class _IterMove>
-inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
+inline _LIBCUDACXX_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
 __uninitialized_move_n(_InputIterator __ifirst, _Size __n,
                        _ForwardIterator __ofirst, _Sentinel __olast, _IterMove __iter_move) {
   auto __idx = __ofirst;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   try {
 #endif
     for (; __n > 0 && __idx != __olast; ++__idx, (void)++__ifirst, --__n)
-      ::new (_VSTD::__voidify(*__idx)) _ValueType(__iter_move(__ifirst));
-#ifndef _LIBCPP_NO_EXCEPTIONS
+      ::new (_CUDA_VSTD::__voidify(*__idx)) _ValueType(__iter_move(__ifirst));
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   } catch (...) {
-    _VSTD::__destroy(__ofirst, __idx);
+    _CUDA_VSTD::__destroy(__ofirst, __idx);
     throw;
   }
 #endif
 
-  return {_VSTD::move(__ifirst), _VSTD::move(__idx)};
+  return {_CUDA_VSTD::move(__ifirst), _CUDA_VSTD::move(__idx)};
 }
 
 template <class _InputIterator, class _Size, class _ForwardIterator>
-inline _LIBCPP_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
+inline _LIBCUDACXX_HIDE_FROM_ABI pair<_InputIterator, _ForwardIterator>
 uninitialized_move_n(_InputIterator __ifirst, _Size __n, _ForwardIterator __ofirst) {
   using _ValueType = typename iterator_traits<_ForwardIterator>::value_type;
-  auto __iter_move = [](auto&& __iter) -> decltype(auto) { return _VSTD::move(*__iter); };
+  auto __iter_move = [](auto&& __iter) -> decltype(auto) { return _CUDA_VSTD::move(*__iter); };
 
-  return _VSTD::__uninitialized_move_n<_ValueType>(_VSTD::move(__ifirst), __n, _VSTD::move(__ofirst),
+  return _CUDA_VSTD::__uninitialized_move_n<_ValueType>(_CUDA_VSTD::move(__ifirst), __n, _CUDA_VSTD::move(__ofirst),
                                                    __unreachable_sentinel(), __iter_move);
 }
 
@@ -362,7 +362,7 @@ uninitialized_move_n(_InputIterator __ifirst, _Size __n, _ForwardIterator __ofir
 template<class _Alloc, class _BidirIter, class = __enable_if_t<
     __is_cpp17_bidirectional_iterator<_BidirIter>::value
 >>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr void __allocator_destroy_multidimensional(_Alloc& __alloc, _BidirIter __first, _BidirIter __last) noexcept {
     using _ValueType = typename iterator_traits<_BidirIter>::value_type;
     static_assert(is_same_v<typename allocator_traits<_Alloc>::value_type, _ValueType>,
@@ -372,7 +372,7 @@ constexpr void __allocator_destroy_multidimensional(_Alloc& __alloc, _BidirIter
         return;
 
     if constexpr (is_array_v<_ValueType>) {
-        static_assert(!__libcpp_is_unbounded_array<_ValueType>::value,
+        static_assert(!__LIBCUDACXX_is_unbounded_array<_ValueType>::value,
             "arrays of unbounded arrays don't exist, but if they did we would mess up here");
 
         using _Element = remove_extent_t<_ValueType>;
@@ -398,7 +398,7 @@ constexpr void __allocator_destroy_multidimensional(_Alloc& __alloc, _BidirIter
 //
 // This function assumes that the allocator is bound to the correct type.
 template<class _Alloc, class _Tp>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr void __allocator_construct_at(_Alloc& __alloc, _Tp* __loc) {
     static_assert(is_same_v<typename allocator_traits<_Alloc>::value_type, _Tp>,
         "The allocator should already be rebound to the correct type");
@@ -431,7 +431,7 @@ constexpr void __allocator_construct_at(_Alloc& __alloc, _Tp* __loc) {
 //
 // This function assumes that the allocator is bound to the correct type.
 template<class _Alloc, class _Tp, class _Arg>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr void __allocator_construct_at(_Alloc& __alloc, _Tp* __loc, _Arg const& __arg) {
     static_assert(is_same_v<typename allocator_traits<_Alloc>::value_type, _Tp>,
         "The allocator should already be rebound to the correct type");
@@ -465,7 +465,7 @@ constexpr void __allocator_construct_at(_Alloc& __alloc, _Tp* __loc, _Arg const&
 // initialization using allocator_traits destruction. If the elements in the range are C-style
 // arrays, they are initialized element-wise using allocator construction, and recursively so.
 template<class _Alloc, class _BidirIter, class _Tp, class _Size = typename iterator_traits<_BidirIter>::
diff erence_type>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr void __uninitialized_allocator_fill_n(_Alloc& __alloc, _BidirIter __it, _Size __n, _Tp const& __value) {
     using _ValueType = typename iterator_traits<_BidirIter>::value_type;
     __allocator_traits_rebind_t<_Alloc, _ValueType> __value_alloc(__alloc);
@@ -482,7 +482,7 @@ constexpr void __uninitialized_allocator_fill_n(_Alloc& __alloc, _BidirIter __it
 // Same as __uninitialized_allocator_fill_n, but doesn't pass any initialization argument
 // to the allocator's construct method, which results in value initialization.
 template<class _Alloc, class _BidirIter, class _Size = typename iterator_traits<_BidirIter>::
diff erence_type>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr void __uninitialized_allocator_value_construct_n(_Alloc& __alloc, _BidirIter __it, _Size __n) {
     using _ValueType = typename iterator_traits<_BidirIter>::value_type;
     __allocator_traits_rebind_t<_Alloc, _ValueType> __value_alloc(__alloc);
@@ -496,11 +496,11 @@ constexpr void __uninitialized_allocator_value_construct_n(_Alloc& __alloc, _Bid
     __guard.__complete();
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
 // Destroy all elements in [__first, __last) from left to right using allocator destruction.
 template <class _Alloc, class _Iter, class _Sent>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 __allocator_destroy(_Alloc& __alloc, _Iter __first, _Sent __last) {
   for (; __first != __last; ++__first)
      allocator_traits<_Alloc>::destroy(__alloc, std::__to_address(__first));
@@ -509,11 +509,11 @@ __allocator_destroy(_Alloc& __alloc, _Iter __first, _Sent __last) {
 template <class _Alloc, class _Iter>
 class _AllocatorDestroyRangeReverse {
 public:
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
   _AllocatorDestroyRangeReverse(_Alloc& __alloc, _Iter& __first, _Iter& __last)
       : __alloc_(__alloc), __first_(__first), __last_(__last) {}
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 void operator()() const {
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 void operator()() const {
     std::__allocator_destroy(__alloc_, std::reverse_iterator<_Iter>(__last_), std::reverse_iterator<_Iter>(__first_));
   }
 
@@ -528,9 +528,9 @@ class _AllocatorDestroyRangeReverse {
 // The caller has to ensure that __first2 can hold at least N uninitialized elements. If an exception is thrown the
 // already copied elements are destroyed in reverse order of their construction.
 template <class _Alloc, class _Iter1, class _Sent1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter2
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Iter2
 __uninitialized_allocator_copy(_Alloc& __alloc, _Iter1 __first1, _Sent1 __last1, _Iter2 __first2) {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   auto __destruct_first = __first2;
   try {
 #endif
@@ -539,7 +539,7 @@ __uninitialized_allocator_copy(_Alloc& __alloc, _Iter1 __first1, _Sent1 __last1,
     ++__first1;
     ++__first2;
   }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   } catch (...) {
     _AllocatorDestroyRangeReverse<_Alloc, _Iter2>(__alloc, __destruct_first, __first2)();
     throw;
@@ -561,10 +561,10 @@ template <class _Alloc,
               // using _RawType because of the allocator<T const> extension
               is_trivially_copy_constructible<_RawType>::value && is_trivially_copy_assignable<_RawType>::value &&
               __allocator_has_trivial_copy_construct<_Alloc, _RawType>::value>* = nullptr>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Type*
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Type*
 __uninitialized_allocator_copy(_Alloc&, const _Type* __first1, const _Type* __last1, _Type* __first2) {
   // TODO: Remove the const_cast once we drop support for std::allocator<T const>
-  if (__libcpp_is_constant_evaluated()) {
+  if (__LIBCUDACXX_is_constant_evaluated()) {
     while (__first1 != __last1) {
       std::__construct_at(std::__to_address(__first2), *__first1);
       ++__first1;
@@ -582,16 +582,16 @@ __uninitialized_allocator_copy(_Alloc&, const _Type* __first1, const _Type* __la
 // Otherwise try to copy all elements. If an exception is thrown the already copied
 // elements are destroyed in reverse order of their construction.
 template <class _Alloc, class _Iter1, class _Sent1, class _Iter2>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter2 __uninitialized_allocator_move_if_noexcept(
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Iter2 __uninitialized_allocator_move_if_noexcept(
     _Alloc& __alloc, _Iter1 __first1, _Sent1 __last1, _Iter2 __first2) {
   static_assert(__is_cpp17_move_insertable<_Alloc>::value,
                 "The specified type does not meet the requirements of Cpp17MoveInsertable");
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   auto __destruct_first = __first2;
   try {
 #endif
   while (__first1 != __last1) {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     allocator_traits<_Alloc>::construct(__alloc, std::__to_address(__first2), std::move_if_noexcept(*__first1));
 #else
     allocator_traits<_Alloc>::construct(__alloc, std::__to_address(__first2), std::move(*__first1));
@@ -599,7 +599,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter2 __uninitialized_alloc
     ++__first1;
     ++__first2;
   }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   } catch (...) {
     _AllocatorDestroyRangeReverse<_Alloc, _Iter2>(__alloc, __destruct_first, __first2)();
     throw;
@@ -614,7 +614,7 @@ struct __allocator_has_trivial_move_construct : _Not<__has_construct<_Alloc, _Ty
 template <class _Type>
 struct __allocator_has_trivial_move_construct<allocator<_Type>, _Type> : true_type {};
 
-#ifndef _LIBCPP_COMPILER_GCC
+#ifndef _LIBCUDACXX_COMPILER_GCC
 template <
     class _Alloc,
     class _Iter1,
@@ -622,9 +622,9 @@ template <
     class _Type = typename iterator_traits<_Iter1>::value_type,
     class = __enable_if_t<is_trivially_move_constructible<_Type>::value && is_trivially_move_assignable<_Type>::value &&
                           __allocator_has_trivial_move_construct<_Alloc, _Type>::value> >
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 _Iter2
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Iter2
 __uninitialized_allocator_move_if_noexcept(_Alloc&, _Iter1 __first1, _Iter1 __last1, _Iter2 __first2) {
-  if (__libcpp_is_constant_evaluated()) {
+  if (__LIBCUDACXX_is_constant_evaluated()) {
     while (__first1 != __last1) {
       std::__construct_at(std::__to_address(__first2), std::move(*__first1));
       ++__first1;
@@ -635,8 +635,8 @@ __uninitialized_allocator_move_if_noexcept(_Alloc&, _Iter1 __first1, _Iter1 __la
     return std::move(__first1, __last1, __first2);
   }
 }
-#endif // _LIBCPP_COMPILER_GCC
+#endif // _LIBCUDACXX_COMPILER_GCC
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_UNINITIALIZED_ALGORITHMS_H
+#endif // _LIBCUDACXX___MEMORY_UNINITIALIZED_ALGORITHMS_H

diff  --git a/libcxx/include/__memory/unique_ptr.h b/libcxx/include/__memory/unique_ptr.h
index 1de64de30b23..bd9fd3069763 100644
--- a/libcxx/include/__memory/unique_ptr.h
+++ b/libcxx/include/__memory/unique_ptr.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_UNIQUE_PTR_H
-#define _LIBCPP___MEMORY_UNIQUE_PTR_H
+#ifndef _LIBCUDACXX___MEMORY_UNIQUE_PTR_H
+#define _LIBCUDACXX___MEMORY_UNIQUE_PTR_H
 
 #include <__config>
 #include <__functional/hash.h>
@@ -21,28 +21,28 @@
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS default_delete {
+struct _LIBCUDACXX_TEMPLATE_VIS default_delete {
     static_assert(!is_function<_Tp>::value,
                   "default_delete cannot be instantiated for function types");
-#ifndef _LIBCPP_CXX03_LANG
-  _LIBCPP_INLINE_VISIBILITY constexpr default_delete() _NOEXCEPT = default;
+#ifndef _LIBCUDACXX_CXX03_LANG
+  _LIBCUDACXX_INLINE_VISIBILITY constexpr default_delete() _NOEXCEPT = default;
 #else
-  _LIBCPP_INLINE_VISIBILITY default_delete() {}
+  _LIBCUDACXX_INLINE_VISIBILITY default_delete() {}
 #endif
   template <class _Up>
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   default_delete(const default_delete<_Up>&,
                  typename enable_if<is_convertible<_Up*, _Tp*>::value>::type* =
                      0) _NOEXCEPT {}
 
-  _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __ptr) const _NOEXCEPT {
+  _LIBCUDACXX_INLINE_VISIBILITY void operator()(_Tp* __ptr) const _NOEXCEPT {
     static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
     static_assert(!is_void<_Tp>::value, "cannot delete an incomplete type");
     delete __ptr;
@@ -50,26 +50,26 @@ struct _LIBCPP_TEMPLATE_VIS default_delete {
 };
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS default_delete<_Tp[]> {
+struct _LIBCUDACXX_TEMPLATE_VIS default_delete<_Tp[]> {
 private:
   template <class _Up>
   struct _EnableIfConvertible
       : enable_if<is_convertible<_Up(*)[], _Tp(*)[]>::value> {};
 
 public:
-#ifndef _LIBCPP_CXX03_LANG
-  _LIBCPP_INLINE_VISIBILITY constexpr default_delete() _NOEXCEPT = default;
+#ifndef _LIBCUDACXX_CXX03_LANG
+  _LIBCUDACXX_INLINE_VISIBILITY constexpr default_delete() _NOEXCEPT = default;
 #else
-  _LIBCPP_INLINE_VISIBILITY default_delete() {}
+  _LIBCUDACXX_INLINE_VISIBILITY default_delete() {}
 #endif
 
   template <class _Up>
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   default_delete(const default_delete<_Up[]>&,
                  typename _EnableIfConvertible<_Up>::type* = 0) _NOEXCEPT {}
 
   template <class _Up>
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   typename _EnableIfConvertible<_Up>::type
   operator()(_Up* __ptr) const _NOEXCEPT {
     static_assert(sizeof(_Up) >= 0, "cannot delete an incomplete type");
@@ -99,18 +99,18 @@ struct __unique_ptr_deleter_sfinae<_Deleter&> {
   typedef false_type __enable_rval_overload;
 };
 
-#if defined(_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI)
-#  define _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI __attribute__((trivial_abi))
+#if defined(_LIBCUDACXX_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI)
+#  define _LIBCUDACXX_UNIQUE_PTR_TRIVIAL_ABI __attribute__((trivial_abi))
 #else
-#  define _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI
+#  define _LIBCUDACXX_UNIQUE_PTR_TRIVIAL_ABI
 #endif
 
 template <class _Tp, class _Dp = default_delete<_Tp> >
-class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
+class _LIBCUDACXX_UNIQUE_PTR_TRIVIAL_ABI _LIBCUDACXX_TEMPLATE_VIS unique_ptr {
 public:
   typedef _Tp element_type;
   typedef _Dp deleter_type;
-  typedef _LIBCPP_NODEBUG typename __pointer<_Tp, deleter_type>::type pointer;
+  typedef _LIBCUDACXX_NODEBUG typename __pointer<_Tp, deleter_type>::type pointer;
 
   static_assert(!is_rvalue_reference<deleter_type>::value,
                 "the specified deleter type cannot be an rvalue reference");
@@ -120,38 +120,38 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
 
   struct __nat { int __for_bool_; };
 
-  typedef _LIBCPP_NODEBUG __unique_ptr_deleter_sfinae<_Dp> _DeleterSFINAE;
+  typedef _LIBCUDACXX_NODEBUG __unique_ptr_deleter_sfinae<_Dp> _DeleterSFINAE;
 
   template <bool _Dummy>
-  using _LValRefType _LIBCPP_NODEBUG =
+  using _LValRefType _LIBCUDACXX_NODEBUG =
       typename __dependent_type<_DeleterSFINAE, _Dummy>::__lval_ref_type;
 
   template <bool _Dummy>
-  using _GoodRValRefType _LIBCPP_NODEBUG =
+  using _GoodRValRefType _LIBCUDACXX_NODEBUG =
       typename __dependent_type<_DeleterSFINAE, _Dummy>::__good_rval_ref_type;
 
   template <bool _Dummy>
-  using _BadRValRefType _LIBCPP_NODEBUG =
+  using _BadRValRefType _LIBCUDACXX_NODEBUG =
       typename __dependent_type<_DeleterSFINAE, _Dummy>::__bad_rval_ref_type;
 
   template <bool _Dummy, class _Deleter = typename __dependent_type<
                              __type_identity<deleter_type>, _Dummy>::type>
-  using _EnableIfDeleterDefaultConstructible _LIBCPP_NODEBUG =
+  using _EnableIfDeleterDefaultConstructible _LIBCUDACXX_NODEBUG =
       typename enable_if<is_default_constructible<_Deleter>::value &&
                          !is_pointer<_Deleter>::value>::type;
 
   template <class _ArgType>
-  using _EnableIfDeleterConstructible _LIBCPP_NODEBUG =
+  using _EnableIfDeleterConstructible _LIBCUDACXX_NODEBUG =
       typename enable_if<is_constructible<deleter_type, _ArgType>::value>::type;
 
   template <class _UPtr, class _Up>
-  using _EnableIfMoveConvertible _LIBCPP_NODEBUG = typename enable_if<
+  using _EnableIfMoveConvertible _LIBCUDACXX_NODEBUG = typename enable_if<
       is_convertible<typename _UPtr::pointer, pointer>::value &&
       !is_array<_Up>::value
   >::type;
 
   template <class _UDel>
-  using _EnableIfDeleterConvertible _LIBCPP_NODEBUG = typename enable_if<
+  using _EnableIfDeleterConvertible _LIBCUDACXX_NODEBUG = typename enable_if<
       (is_reference<_Dp>::value && is_same<_Dp, _UDel>::value) ||
       (!is_reference<_Dp>::value && is_convertible<_UDel, _Dp>::value)
     >::type;
@@ -164,55 +164,55 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
 public:
   template <bool _Dummy = true,
             class = _EnableIfDeleterDefaultConstructible<_Dummy> >
-  _LIBCPP_INLINE_VISIBILITY
-  _LIBCPP_CONSTEXPR unique_ptr() _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
+  _LIBCUDACXX_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR unique_ptr() _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
 
   template <bool _Dummy = true,
             class = _EnableIfDeleterDefaultConstructible<_Dummy> >
-  _LIBCPP_INLINE_VISIBILITY
-  _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
+  _LIBCUDACXX_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
 
   template <bool _Dummy = true,
             class = _EnableIfDeleterDefaultConstructible<_Dummy> >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   explicit unique_ptr(pointer __p) _NOEXCEPT : __ptr_(__p, __value_init_tag()) {}
 
   template <bool _Dummy = true,
             class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> > >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(pointer __p, _LValRefType<_Dummy> __d) _NOEXCEPT
       : __ptr_(__p, __d) {}
 
   template <bool _Dummy = true,
             class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(pointer __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
-      : __ptr_(__p, _VSTD::move(__d)) {
+      : __ptr_(__p, _CUDA_VSTD::move(__d)) {
     static_assert(!is_reference<deleter_type>::value,
                   "rvalue deleter bound to reference");
   }
 
   template <bool _Dummy = true,
             class = _EnableIfDeleterConstructible<_BadRValRefType<_Dummy> > >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(pointer __p, _BadRValRefType<_Dummy> __d) = delete;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(unique_ptr&& __u) _NOEXCEPT
-      : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {
+      : __ptr_(__u.release(), _CUDA_VSTD::forward<deleter_type>(__u.get_deleter())) {
   }
 
   template <class _Up, class _Ep,
       class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
       class = _EnableIfDeleterConvertible<_Ep>
   >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
-      : __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) {}
+      : __ptr_(__u.release(), _CUDA_VSTD::forward<_Ep>(__u.get_deleter())) {}
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR)
   template <class _Up>
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(auto_ptr<_Up>&& __p,
              typename enable_if<is_convertible<_Up*, _Tp*>::value &&
                                     is_same<_Dp, default_delete<_Tp> >::value,
@@ -220,10 +220,10 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
       : __ptr_(__p.release(), __value_init_tag()) {}
 #endif
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
     reset(__u.release());
-    __ptr_.second() = _VSTD::forward<deleter_type>(__u.get_deleter());
+    __ptr_.second() = _CUDA_VSTD::forward<deleter_type>(__u.get_deleter());
     return *this;
   }
 
@@ -231,16 +231,16 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
       class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
       class = _EnableIfDeleterAssignable<_Ep>
   >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr& operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
     reset(__u.release());
-    __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
+    __ptr_.second() = _CUDA_VSTD::forward<_Ep>(__u.get_deleter());
     return *this;
   }
 
-#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
+#if _LIBCUDACXX_STD_VER <= 14 || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR)
   template <class _Up>
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
       typename enable_if<is_convertible<_Up*, _Tp*>::value &&
                              is_same<_Dp, default_delete<_Tp> >::value,
                          unique_ptr&>::type
@@ -250,54 +250,54 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
   }
 #endif
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
   unique_ptr(unique_ptr const&) = delete;
   unique_ptr& operator=(unique_ptr const&) = delete;
 #endif
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   ~unique_ptr() { reset(); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr& operator=(nullptr_t) _NOEXCEPT {
     reset();
     return *this;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   typename add_lvalue_reference<_Tp>::type
   operator*() const {
     return *__ptr_.first();
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   pointer operator->() const _NOEXCEPT {
     return __ptr_.first();
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   pointer get() const _NOEXCEPT {
     return __ptr_.first();
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   deleter_type& get_deleter() _NOEXCEPT {
     return __ptr_.second();
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   const deleter_type& get_deleter() const _NOEXCEPT {
     return __ptr_.second();
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   explicit operator bool() const _NOEXCEPT {
     return __ptr_.first() != nullptr;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   pointer release() _NOEXCEPT {
     pointer __t = __ptr_.first();
     __ptr_.first() = pointer();
     return __t;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void reset(pointer __p = pointer()) _NOEXCEPT {
     pointer __tmp = __ptr_.first();
     __ptr_.first() = __p;
@@ -305,7 +305,7 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
       __ptr_.second()(__tmp);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void swap(unique_ptr& __u) _NOEXCEPT {
     __ptr_.swap(__u.__ptr_);
   }
@@ -313,7 +313,7 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
 
 
 template <class _Tp, class _Dp>
-class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp> {
+class _LIBCUDACXX_UNIQUE_PTR_TRIVIAL_ABI _LIBCUDACXX_TEMPLATE_VIS unique_ptr<_Tp[], _Dp> {
 public:
   typedef _Tp element_type;
   typedef _Dp deleter_type;
@@ -337,35 +337,35 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
   typedef __unique_ptr_deleter_sfinae<_Dp> _DeleterSFINAE;
 
   template <bool _Dummy>
-  using _LValRefType _LIBCPP_NODEBUG =
+  using _LValRefType _LIBCUDACXX_NODEBUG =
       typename __dependent_type<_DeleterSFINAE, _Dummy>::__lval_ref_type;
 
   template <bool _Dummy>
-  using _GoodRValRefType _LIBCPP_NODEBUG =
+  using _GoodRValRefType _LIBCUDACXX_NODEBUG =
       typename __dependent_type<_DeleterSFINAE, _Dummy>::__good_rval_ref_type;
 
   template <bool _Dummy>
-  using _BadRValRefType _LIBCPP_NODEBUG =
+  using _BadRValRefType _LIBCUDACXX_NODEBUG =
       typename __dependent_type<_DeleterSFINAE, _Dummy>::__bad_rval_ref_type;
 
   template <bool _Dummy, class _Deleter = typename __dependent_type<
                              __type_identity<deleter_type>, _Dummy>::type>
-  using _EnableIfDeleterDefaultConstructible _LIBCPP_NODEBUG =
+  using _EnableIfDeleterDefaultConstructible _LIBCUDACXX_NODEBUG =
       typename enable_if<is_default_constructible<_Deleter>::value &&
                          !is_pointer<_Deleter>::value>::type;
 
   template <class _ArgType>
-  using _EnableIfDeleterConstructible _LIBCPP_NODEBUG =
+  using _EnableIfDeleterConstructible _LIBCUDACXX_NODEBUG =
       typename enable_if<is_constructible<deleter_type, _ArgType>::value>::type;
 
   template <class _Pp>
-  using _EnableIfPointerConvertible _LIBCPP_NODEBUG = typename enable_if<
+  using _EnableIfPointerConvertible _LIBCUDACXX_NODEBUG = typename enable_if<
       _CheckArrayPointerConversion<_Pp>::value
   >::type;
 
   template <class _UPtr, class _Up,
         class _ElemT = typename _UPtr::element_type>
-  using _EnableIfMoveConvertible _LIBCPP_NODEBUG = typename enable_if<
+  using _EnableIfMoveConvertible _LIBCUDACXX_NODEBUG = typename enable_if<
       is_array<_Up>::value &&
       is_same<pointer, element_type*>::value &&
       is_same<typename _UPtr::pointer, _ElemT*>::value &&
@@ -373,62 +373,62 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
     >::type;
 
   template <class _UDel>
-  using _EnableIfDeleterConvertible _LIBCPP_NODEBUG = typename enable_if<
+  using _EnableIfDeleterConvertible _LIBCUDACXX_NODEBUG = typename enable_if<
       (is_reference<_Dp>::value && is_same<_Dp, _UDel>::value) ||
       (!is_reference<_Dp>::value && is_convertible<_UDel, _Dp>::value)
     >::type;
 
   template <class _UDel>
-  using _EnableIfDeleterAssignable _LIBCPP_NODEBUG = typename enable_if<
+  using _EnableIfDeleterAssignable _LIBCUDACXX_NODEBUG = typename enable_if<
       is_assignable<_Dp&, _UDel&&>::value
     >::type;
 
 public:
   template <bool _Dummy = true,
             class = _EnableIfDeleterDefaultConstructible<_Dummy> >
-  _LIBCPP_INLINE_VISIBILITY
-  _LIBCPP_CONSTEXPR unique_ptr() _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
+  _LIBCUDACXX_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR unique_ptr() _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
 
   template <bool _Dummy = true,
             class = _EnableIfDeleterDefaultConstructible<_Dummy> >
-  _LIBCPP_INLINE_VISIBILITY
-  _LIBCPP_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
+  _LIBCUDACXX_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR unique_ptr(nullptr_t) _NOEXCEPT : __ptr_(__value_init_tag(), __value_init_tag()) {}
 
   template <class _Pp, bool _Dummy = true,
             class = _EnableIfDeleterDefaultConstructible<_Dummy>,
             class = _EnableIfPointerConvertible<_Pp> >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   explicit unique_ptr(_Pp __p) _NOEXCEPT
       : __ptr_(__p, __value_init_tag()) {}
 
   template <class _Pp, bool _Dummy = true,
             class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> >,
             class = _EnableIfPointerConvertible<_Pp> >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(_Pp __p, _LValRefType<_Dummy> __d) _NOEXCEPT
       : __ptr_(__p, __d) {}
 
   template <bool _Dummy = true,
             class = _EnableIfDeleterConstructible<_LValRefType<_Dummy> > >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(nullptr_t, _LValRefType<_Dummy> __d) _NOEXCEPT
       : __ptr_(nullptr, __d) {}
 
   template <class _Pp, bool _Dummy = true,
             class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> >,
             class = _EnableIfPointerConvertible<_Pp> >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(_Pp __p, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
-      : __ptr_(__p, _VSTD::move(__d)) {
+      : __ptr_(__p, _CUDA_VSTD::move(__d)) {
     static_assert(!is_reference<deleter_type>::value,
                   "rvalue deleter bound to reference");
   }
 
   template <bool _Dummy = true,
             class = _EnableIfDeleterConstructible<_GoodRValRefType<_Dummy> > >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(nullptr_t, _GoodRValRefType<_Dummy> __d) _NOEXCEPT
-      : __ptr_(nullptr, _VSTD::move(__d)) {
+      : __ptr_(nullptr, _CUDA_VSTD::move(__d)) {
     static_assert(!is_reference<deleter_type>::value,
                   "rvalue deleter bound to reference");
   }
@@ -436,18 +436,18 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
   template <class _Pp, bool _Dummy = true,
             class = _EnableIfDeleterConstructible<_BadRValRefType<_Dummy> >,
             class = _EnableIfPointerConvertible<_Pp> >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(_Pp __p, _BadRValRefType<_Dummy> __d) = delete;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(unique_ptr&& __u) _NOEXCEPT
-      : __ptr_(__u.release(), _VSTD::forward<deleter_type>(__u.get_deleter())) {
+      : __ptr_(__u.release(), _CUDA_VSTD::forward<deleter_type>(__u.get_deleter())) {
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr& operator=(unique_ptr&& __u) _NOEXCEPT {
     reset(__u.release());
-    __ptr_.second() = _VSTD::forward<deleter_type>(__u.get_deleter());
+    __ptr_.second() = _CUDA_VSTD::forward<deleter_type>(__u.get_deleter());
     return *this;
   }
 
@@ -455,62 +455,62 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
       class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
       class = _EnableIfDeleterConvertible<_Ep>
   >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT
-      : __ptr_(__u.release(), _VSTD::forward<_Ep>(__u.get_deleter())) {
+      : __ptr_(__u.release(), _CUDA_VSTD::forward<_Ep>(__u.get_deleter())) {
   }
 
   template <class _Up, class _Ep,
       class = _EnableIfMoveConvertible<unique_ptr<_Up, _Ep>, _Up>,
       class = _EnableIfDeleterAssignable<_Ep>
   >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr&
   operator=(unique_ptr<_Up, _Ep>&& __u) _NOEXCEPT {
     reset(__u.release());
-    __ptr_.second() = _VSTD::forward<_Ep>(__u.get_deleter());
+    __ptr_.second() = _CUDA_VSTD::forward<_Ep>(__u.get_deleter());
     return *this;
   }
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
   unique_ptr(unique_ptr const&) = delete;
   unique_ptr& operator=(unique_ptr const&) = delete;
 #endif
 public:
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   ~unique_ptr() { reset(); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   unique_ptr& operator=(nullptr_t) _NOEXCEPT {
     reset();
     return *this;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   typename add_lvalue_reference<_Tp>::type
   operator[](size_t __i) const {
     return __ptr_.first()[__i];
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   pointer get() const _NOEXCEPT {
     return __ptr_.first();
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   deleter_type& get_deleter() _NOEXCEPT {
     return __ptr_.second();
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   const deleter_type& get_deleter() const _NOEXCEPT {
     return __ptr_.second();
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   explicit operator bool() const _NOEXCEPT {
     return __ptr_.first() != nullptr;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   pointer release() _NOEXCEPT {
     pointer __t = __ptr_.first();
     __ptr_.first() = pointer();
@@ -518,7 +518,7 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
   }
 
   template <class _Pp>
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   typename enable_if<
       _CheckArrayPointerConversion<_Pp>::value
   >::type
@@ -529,7 +529,7 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
       __ptr_.second()(__tmp);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void reset(nullptr_t = nullptr) _NOEXCEPT {
     pointer __tmp = __ptr_.first();
     __ptr_.first() = nullptr;
@@ -537,7 +537,7 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
       __ptr_.second()(__tmp);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void swap(unique_ptr& __u) _NOEXCEPT {
     __ptr_.swap(__u.__ptr_);
   }
@@ -545,7 +545,7 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr<_Tp[], _Dp>
 };
 
 template <class _Tp, class _Dp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if<
     __is_swappable<_Dp>::value,
     void
@@ -553,17 +553,17 @@ typename enable_if<
 swap(unique_ptr<_Tp, _Dp>& __x, unique_ptr<_Tp, _Dp>& __y) _NOEXCEPT {__x.swap(__y);}
 
 template <class _T1, class _D1, class _T2, class _D2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return __x.get() == __y.get();}
 
 template <class _T1, class _D1, class _T2, class _D2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__x == __y);}
 
 template <class _T1, class _D1, class _T2, class _D2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y)
 {
@@ -574,22 +574,22 @@ operator< (const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y)
 }
 
 template <class _T1, class _D1, class _T2, class _D2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator> (const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return __y < __x;}
 
 template <class _T1, class _D1, class _T2, class _D2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__y < __x);}
 
 template <class _T1, class _D1, class _T2, class _D2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const unique_ptr<_T1, _D1>& __x, const unique_ptr<_T2, _D2>& __y) {return !(__x < __y);}
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
 {
@@ -597,7 +597,7 @@ operator==(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
 }
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT
 {
@@ -605,7 +605,7 @@ operator==(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT
 }
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
 {
@@ -613,7 +613,7 @@ operator!=(const unique_ptr<_T1, _D1>& __x, nullptr_t) _NOEXCEPT
 }
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT
 {
@@ -621,7 +621,7 @@ operator!=(nullptr_t, const unique_ptr<_T1, _D1>& __x) _NOEXCEPT
 }
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(const unique_ptr<_T1, _D1>& __x, nullptr_t)
 {
@@ -630,7 +630,7 @@ operator<(const unique_ptr<_T1, _D1>& __x, nullptr_t)
 }
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(nullptr_t, const unique_ptr<_T1, _D1>& __x)
 {
@@ -639,7 +639,7 @@ operator<(nullptr_t, const unique_ptr<_T1, _D1>& __x)
 }
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>(const unique_ptr<_T1, _D1>& __x, nullptr_t)
 {
@@ -647,7 +647,7 @@ operator>(const unique_ptr<_T1, _D1>& __x, nullptr_t)
 }
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>(nullptr_t, const unique_ptr<_T1, _D1>& __x)
 {
@@ -655,7 +655,7 @@ operator>(nullptr_t, const unique_ptr<_T1, _D1>& __x)
 }
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const unique_ptr<_T1, _D1>& __x, nullptr_t)
 {
@@ -663,7 +663,7 @@ operator<=(const unique_ptr<_T1, _D1>& __x, nullptr_t)
 }
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(nullptr_t, const unique_ptr<_T1, _D1>& __x)
 {
@@ -671,7 +671,7 @@ operator<=(nullptr_t, const unique_ptr<_T1, _D1>& __x)
 }
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const unique_ptr<_T1, _D1>& __x, nullptr_t)
 {
@@ -679,14 +679,14 @@ operator>=(const unique_ptr<_T1, _D1>& __x, nullptr_t)
 }
 
 template <class _T1, class _D1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(nullptr_t, const unique_ptr<_T1, _D1>& __x)
 {
     return !(nullptr < __x);
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 
 template<class _Tp>
 struct __unique_if
@@ -707,15 +707,15 @@ struct __unique_if<_Tp[_Np]>
 };
 
 template<class _Tp, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename __unique_if<_Tp>::__unique_single
 make_unique(_Args&&... __args)
 {
-    return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...));
+    return unique_ptr<_Tp>(new _Tp(_CUDA_VSTD::forward<_Args>(__args)...));
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename __unique_if<_Tp>::__unique_array_unknown_bound
 make_unique(size_t __n)
 {
@@ -727,24 +727,24 @@ template<class _Tp, class... _Args>
     typename __unique_if<_Tp>::__unique_array_known_bound
     make_unique(_Args&&...) = delete;
 
-#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER > 11
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS hash;
 
 template <class _Tp, class _Dp>
-#ifdef _LIBCPP_CXX03_LANG
-struct _LIBCPP_TEMPLATE_VIS hash<unique_ptr<_Tp, _Dp> >
+#ifdef _LIBCUDACXX_CXX03_LANG
+struct _LIBCUDACXX_TEMPLATE_VIS hash<unique_ptr<_Tp, _Dp> >
 #else
-struct _LIBCPP_TEMPLATE_VIS hash<__enable_hash_helper<
+struct _LIBCUDACXX_TEMPLATE_VIS hash<__enable_hash_helper<
     unique_ptr<_Tp, _Dp>, typename unique_ptr<_Tp, _Dp>::pointer> >
 #endif
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef unique_ptr<_Tp, _Dp> argument_type;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t               result_type;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef unique_ptr<_Tp, _Dp> argument_type;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef size_t               result_type;
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const unique_ptr<_Tp, _Dp>& __ptr) const
     {
         typedef typename unique_ptr<_Tp, _Dp>::pointer pointer;
@@ -752,6 +752,6 @@ struct _LIBCPP_TEMPLATE_VIS hash<__enable_hash_helper<
     }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_UNIQUE_PTR_H
+#endif // _LIBCUDACXX___MEMORY_UNIQUE_PTR_H

diff  --git a/libcxx/include/__memory/uses_allocator.h b/libcxx/include/__memory/uses_allocator.h
index 4a07a4a52121..4379ac90b058 100644
--- a/libcxx/include/__memory/uses_allocator.h
+++ b/libcxx/include/__memory/uses_allocator.h
@@ -7,18 +7,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_USES_ALLOCATOR_H
-#define _LIBCPP___MEMORY_USES_ALLOCATOR_H
+#ifndef _LIBCUDACXX___MEMORY_USES_ALLOCATOR_H
+#define _LIBCUDACXX___MEMORY_USES_ALLOCATOR_H
 
 #include <__config>
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
 struct __has_allocator_type
@@ -44,16 +44,16 @@ struct __uses_allocator<_Tp, _Alloc, false>
 };
 
 template <class _Tp, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator
+struct _LIBCUDACXX_TEMPLATE_VIS uses_allocator
     : public __uses_allocator<_Tp, _Alloc>
 {
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, class _Alloc>
 inline constexpr size_t uses_allocator_v = uses_allocator<_Tp, _Alloc>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_USES_ALLOCATOR_H
+#endif // _LIBCUDACXX___MEMORY_USES_ALLOCATOR_H

diff  --git a/libcxx/include/__memory/voidify.h b/libcxx/include/__memory/voidify.h
index 3a65c0e83fb7..c9145df7e1c5 100644
--- a/libcxx/include/__memory/voidify.h
+++ b/libcxx/include/__memory/voidify.h
@@ -7,24 +7,24 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MEMORY_VOIDIFY_H
-#define _LIBCPP___MEMORY_VOIDIFY_H
+#ifndef _LIBCUDACXX___MEMORY_VOIDIFY_H
+#define _LIBCUDACXX___MEMORY_VOIDIFY_H
 
 #include <__config>
 #include <__memory/addressof.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <typename _Tp>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void* __voidify(_Tp& __from) {
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void* __voidify(_Tp& __from) {
   // Cast away cv-qualifiers to allow modifying elements of a range through const iterators.
-  return const_cast<void*>(static_cast<const volatile void*>(_VSTD::addressof(__from)));
+  return const_cast<void*>(static_cast<const volatile void*>(_CUDA_VSTD::addressof(__from)));
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___MEMORY_VOIDIFY_H
+#endif // _LIBCUDACXX___MEMORY_VOIDIFY_H

diff  --git a/libcxx/include/__mutex_base b/libcxx/include/__mutex_base
index ac0d090b7d19..62af983aaf64 100644
--- a/libcxx/include/__mutex_base
+++ b/libcxx/include/__mutex_base
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___MUTEX_BASE
-#define _LIBCPP___MUTEX_BASE
+#ifndef _LIBCUDACXX___MUTEX_BASE
+#define _LIBCUDACXX___MUTEX_BASE
 
 #include <__chrono/duration.h>
 #include <__chrono/steady_clock.h>
@@ -20,55 +20,55 @@
 #include <system_error>
 #include <time.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 
-class _LIBCPP_TYPE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
+class _LIBCUDACXX_TYPE_VIS _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex
 {
-    __libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER;
+    __LIBCUDACXX_mutex_t __m_ = _LIBCUDACXX_MUTEX_INITIALIZER;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR mutex() = default;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR mutex() = default;
 
     mutex(const mutex&) = delete;
     mutex& operator=(const mutex&) = delete;
 
-#if defined(_LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION)
+#if defined(_LIBCUDACXX_HAS_TRIVIAL_MUTEX_DESTRUCTION)
     ~mutex() = default;
 #else
     ~mutex() _NOEXCEPT;
 #endif
 
-    void lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability());
-    bool try_lock() _NOEXCEPT _LIBCPP_THREAD_SAFETY_ANNOTATION(try_acquire_capability(true));
-    void unlock() _NOEXCEPT _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability());
+    void lock() _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(acquire_capability());
+    bool try_lock() _NOEXCEPT _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(try_acquire_capability(true));
+    void unlock() _NOEXCEPT _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(release_capability());
 
-    typedef __libcpp_mutex_t* native_handle_type;
-    _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() {return &__m_;}
+    typedef __LIBCUDACXX_mutex_t* native_handle_type;
+    _LIBCUDACXX_INLINE_VISIBILITY native_handle_type native_handle() {return &__m_;}
 };
 
 static_assert(is_nothrow_default_constructible<mutex>::value,
               "the default constructor for std::mutex must be nothrow");
 
-struct _LIBCPP_TYPE_VIS defer_lock_t { explicit defer_lock_t() = default; };
-struct _LIBCPP_TYPE_VIS try_to_lock_t { explicit try_to_lock_t() = default; };
-struct _LIBCPP_TYPE_VIS adopt_lock_t { explicit adopt_lock_t() = default; };
+struct _LIBCUDACXX_TYPE_VIS defer_lock_t { explicit defer_lock_t() = default; };
+struct _LIBCUDACXX_TYPE_VIS try_to_lock_t { explicit try_to_lock_t() = default; };
+struct _LIBCUDACXX_TYPE_VIS adopt_lock_t { explicit adopt_lock_t() = default; };
 
-#if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY)
+#if defined(_LIBCUDACXX_CXX03_LANG) || defined(_LIBCUDACXX_BUILDING_LIBRARY)
 
-extern _LIBCPP_EXPORTED_FROM_ABI const defer_lock_t  defer_lock;
-extern _LIBCPP_EXPORTED_FROM_ABI const try_to_lock_t try_to_lock;
-extern _LIBCPP_EXPORTED_FROM_ABI const adopt_lock_t  adopt_lock;
+extern _LIBCUDACXX_EXPORTED_FROM_ABI const defer_lock_t  defer_lock;
+extern _LIBCUDACXX_EXPORTED_FROM_ABI const try_to_lock_t try_to_lock;
+extern _LIBCUDACXX_EXPORTED_FROM_ABI const adopt_lock_t  adopt_lock;
 
 #else
 
@@ -79,7 +79,7 @@ extern _LIBCPP_EXPORTED_FROM_ABI const adopt_lock_t  adopt_lock;
 #endif
 
 template <class _Mutex>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable)
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(scoped_lockable)
 lock_guard
 {
 public:
@@ -89,15 +89,15 @@ private:
     mutex_type& __m_;
 public:
 
-    _LIBCPP_NODISCARD_EXT _LIBCPP_INLINE_VISIBILITY
-    explicit lock_guard(mutex_type& __m) _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability(__m))
+    _LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_INLINE_VISIBILITY
+    explicit lock_guard(mutex_type& __m) _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(acquire_capability(__m))
         : __m_(__m) {__m_.lock();}
 
-    _LIBCPP_NODISCARD_EXT _LIBCPP_INLINE_VISIBILITY
-    lock_guard(mutex_type& __m, adopt_lock_t) _LIBCPP_THREAD_SAFETY_ANNOTATION(requires_capability(__m))
+    _LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_INLINE_VISIBILITY
+    lock_guard(mutex_type& __m, adopt_lock_t) _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(requires_capability(__m))
         : __m_(__m) {}
-    _LIBCPP_INLINE_VISIBILITY
-    ~lock_guard() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability()) {__m_.unlock();}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    ~lock_guard() _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(release_capability()) {__m_.unlock();}
 
 private:
     lock_guard(lock_guard const&) = delete;
@@ -105,7 +105,7 @@ private:
 };
 
 template <class _Mutex>
-class _LIBCPP_TEMPLATE_VIS unique_lock
+class _LIBCUDACXX_TEMPLATE_VIS unique_lock
 {
 public:
     typedef _Mutex mutex_type;
@@ -115,29 +115,29 @@ private:
     bool __owns_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unique_lock() _NOEXCEPT : __m_(nullptr), __owns_(false) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit unique_lock(mutex_type& __m)
-        : __m_(_VSTD::addressof(__m)), __owns_(true) {__m_->lock();}
-    _LIBCPP_INLINE_VISIBILITY
+        : __m_(_CUDA_VSTD::addressof(__m)), __owns_(true) {__m_->lock();}
+    _LIBCUDACXX_INLINE_VISIBILITY
     unique_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT
-        : __m_(_VSTD::addressof(__m)), __owns_(false) {}
-    _LIBCPP_INLINE_VISIBILITY
+        : __m_(_CUDA_VSTD::addressof(__m)), __owns_(false) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
     unique_lock(mutex_type& __m, try_to_lock_t)
-        : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock()) {}
-    _LIBCPP_INLINE_VISIBILITY
+        : __m_(_CUDA_VSTD::addressof(__m)), __owns_(__m.try_lock()) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
     unique_lock(mutex_type& __m, adopt_lock_t)
-        : __m_(_VSTD::addressof(__m)), __owns_(true) {}
+        : __m_(_CUDA_VSTD::addressof(__m)), __owns_(true) {}
     template <class _Clock, class _Duration>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
         unique_lock(mutex_type& __m, const chrono::time_point<_Clock, _Duration>& __t)
-            : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock_until(__t)) {}
+            : __m_(_CUDA_VSTD::addressof(__m)), __owns_(__m.try_lock_until(__t)) {}
     template <class _Rep, class _Period>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
         unique_lock(mutex_type& __m, const chrono::duration<_Rep, _Period>& __d)
-            : __m_(_VSTD::addressof(__m)), __owns_(__m.try_lock_for(__d)) {}
-    _LIBCPP_INLINE_VISIBILITY
+            : __m_(_CUDA_VSTD::addressof(__m)), __owns_(__m.try_lock_for(__d)) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~unique_lock()
     {
         if (__owns_)
@@ -147,11 +147,11 @@ public:
     unique_lock(unique_lock const&) = delete;
     unique_lock& operator=(unique_lock const&) = delete;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unique_lock(unique_lock&& __u) _NOEXCEPT
         : __m_(__u.__m_), __owns_(__u.__owns_)
         {__u.__m_ = nullptr; __u.__owns_ = false;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unique_lock& operator=(unique_lock&& __u) _NOEXCEPT
         {
             if (__owns_)
@@ -173,13 +173,13 @@ public:
 
     void unlock();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(unique_lock& __u) _NOEXCEPT
     {
-        _VSTD::swap(__m_, __u.__m_);
-        _VSTD::swap(__owns_, __u.__owns_);
+        _CUDA_VSTD::swap(__m_, __u.__m_);
+        _CUDA_VSTD::swap(__owns_, __u.__owns_);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     mutex_type* release() _NOEXCEPT
     {
         mutex_type* __m = __m_;
@@ -188,11 +188,11 @@ public:
         return __m;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool owns_lock() const _NOEXCEPT {return __owns_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit operator bool() const _NOEXCEPT {return __owns_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     mutex_type* mutex() const _NOEXCEPT {return __m_;}
 };
 
@@ -257,27 +257,27 @@ unique_lock<_Mutex>::unlock()
 }
 
 template <class _Mutex>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) _NOEXCEPT
     {__x.swap(__y);}
 
 //enum class cv_status
-_LIBCPP_DECLARE_STRONG_ENUM(cv_status)
+_LIBCUDACXX_DECLARE_STRONG_ENUM(cv_status)
 {
     no_timeout,
     timeout
 };
-_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(cv_status)
+_LIBCUDACXX_DECLARE_STRONG_ENUM_EPILOG(cv_status)
 
-class _LIBCPP_TYPE_VIS condition_variable
+class _LIBCUDACXX_TYPE_VIS condition_variable
 {
-    __libcpp_condvar_t __cv_ = _LIBCPP_CONDVAR_INITIALIZER;
+    __LIBCUDACXX_condvar_t __cv_ = _LIBCUDACXX_CONDVAR_INITIALIZER;
 public:
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR condition_variable() _NOEXCEPT = default;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR condition_variable() _NOEXCEPT = default;
 
-#ifdef _LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION
+#ifdef _LIBCUDACXX_HAS_TRIVIAL_CONDVAR_DESTRUCTION
     ~condition_variable() = default;
 #else
     ~condition_variable();
@@ -291,42 +291,42 @@ public:
 
     void wait(unique_lock<mutex>& __lk) _NOEXCEPT;
     template <class _Predicate>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         void wait(unique_lock<mutex>& __lk, _Predicate __pred);
 
     template <class _Clock, class _Duration>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         cv_status
         wait_until(unique_lock<mutex>& __lk,
                    const chrono::time_point<_Clock, _Duration>& __t);
 
     template <class _Clock, class _Duration, class _Predicate>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         bool
         wait_until(unique_lock<mutex>& __lk,
                    const chrono::time_point<_Clock, _Duration>& __t,
                    _Predicate __pred);
 
     template <class _Rep, class _Period>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         cv_status
         wait_for(unique_lock<mutex>& __lk,
                  const chrono::duration<_Rep, _Period>& __d);
 
     template <class _Rep, class _Period, class _Predicate>
         bool
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         wait_for(unique_lock<mutex>& __lk,
                  const chrono::duration<_Rep, _Period>& __d,
                  _Predicate __pred);
 
-    typedef __libcpp_condvar_t* native_handle_type;
-    _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() {return &__cv_;}
+    typedef __LIBCUDACXX_condvar_t* native_handle_type;
+    _LIBCUDACXX_INLINE_VISIBILITY native_handle_type native_handle() {return &__cv_;}
 
 private:
     void __do_timed_wait(unique_lock<mutex>& __lk,
        chrono::time_point<chrono::system_clock, chrono::nanoseconds>) _NOEXCEPT;
-#if defined(_LIBCPP_HAS_COND_CLOCKWAIT)
+#if defined(_LIBCUDACXX_HAS_COND_CLOCKWAIT)
     void __do_timed_wait(unique_lock<mutex>& __lk,
        chrono::time_point<chrono::steady_clock, chrono::nanoseconds>) _NOEXCEPT;
 #endif
@@ -334,10 +334,10 @@ private:
     void __do_timed_wait(unique_lock<mutex>& __lk,
        chrono::time_point<_Clock, chrono::nanoseconds>) _NOEXCEPT;
 };
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // !_LIBCUDACXX_HAS_NO_THREADS
 
 template <class _Rep, class _Period>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __enable_if_t<is_floating_point<_Rep>::value, chrono::nanoseconds>
 __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d)
 {
@@ -360,7 +360,7 @@ __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d)
 }
 
 template <class _Rep, class _Period>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __enable_if_t<!is_floating_point<_Rep>::value, chrono::nanoseconds>
 __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d)
 {
@@ -389,7 +389,7 @@ __safe_nanosecond_cast(chrono::duration<_Rep, _Period> __d)
     return nanoseconds(__result);
 }
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 template <class _Predicate>
 void
 condition_variable::wait(unique_lock<mutex>& __lk, _Predicate __pred)
@@ -410,7 +410,7 @@ condition_variable::wait_until(unique_lock<mutex>& __lk,
     if (__t <= __now)
         return cv_status::timeout;
 
-    __clock_tp_ns __t_ns = __clock_tp_ns(_VSTD::__safe_nanosecond_cast(__t.time_since_epoch()));
+    __clock_tp_ns __t_ns = __clock_tp_ns(_CUDA_VSTD::__safe_nanosecond_cast(__t.time_since_epoch()));
 
     __do_timed_wait(__lk, __t_ns);
     return _Clock::now() < __t ? cv_status::no_timeout : cv_status::timeout;
@@ -441,15 +441,15 @@ condition_variable::wait_for(unique_lock<mutex>& __lk,
     using __ns_rep = nanoseconds::rep;
     steady_clock::time_point __c_now = steady_clock::now();
 
-#if defined(_LIBCPP_HAS_COND_CLOCKWAIT)
+#if defined(_LIBCUDACXX_HAS_COND_CLOCKWAIT)
     using __clock_tp_ns = time_point<steady_clock, nanoseconds>;
-    __ns_rep __now_count_ns = _VSTD::__safe_nanosecond_cast(__c_now.time_since_epoch()).count();
+    __ns_rep __now_count_ns = _CUDA_VSTD::__safe_nanosecond_cast(__c_now.time_since_epoch()).count();
 #else
     using __clock_tp_ns = time_point<system_clock, nanoseconds>;
-    __ns_rep __now_count_ns = _VSTD::__safe_nanosecond_cast(system_clock::now().time_since_epoch()).count();
+    __ns_rep __now_count_ns = _CUDA_VSTD::__safe_nanosecond_cast(system_clock::now().time_since_epoch()).count();
 #endif
 
-    __ns_rep __d_ns_count = _VSTD::__safe_nanosecond_cast(__d).count();
+    __ns_rep __d_ns_count = _CUDA_VSTD::__safe_nanosecond_cast(__d).count();
 
     if (__now_count_ns > numeric_limits<__ns_rep>::max() - __d_ns_count) {
         __do_timed_wait(__lk, __clock_tp_ns::max());
@@ -469,10 +469,10 @@ condition_variable::wait_for(unique_lock<mutex>& __lk,
                              _Predicate __pred)
 {
     return wait_until(__lk, chrono::steady_clock::now() + __d,
-                      _VSTD::move(__pred));
+                      _CUDA_VSTD::move(__pred));
 }
 
-#if defined(_LIBCPP_HAS_COND_CLOCKWAIT)
+#if defined(_LIBCUDACXX_HAS_COND_CLOCKWAIT)
 inline
 void
 condition_variable::__do_timed_wait(unique_lock<mutex>& __lk,
@@ -501,7 +501,7 @@ condition_variable::__do_timed_wait(unique_lock<mutex>& __lk,
     if (__ec != 0 && __ec != ETIMEDOUT)
         __throw_system_error(__ec, "condition_variable timed_wait failed");
 }
-#endif // _LIBCPP_HAS_COND_CLOCKWAIT
+#endif // _LIBCUDACXX_HAS_COND_CLOCKWAIT
 
 template <class _Clock>
 inline
@@ -512,10 +512,10 @@ condition_variable::__do_timed_wait(unique_lock<mutex>& __lk,
     wait_for(__lk, __tp - _Clock::now());
 }
 
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // !_LIBCUDACXX_HAS_NO_THREADS
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___MUTEX_BASE
+#endif // _LIBCUDACXX___MUTEX_BASE

diff  --git a/libcxx/include/__node_handle b/libcxx/include/__node_handle
index 71309be62f3c..e5b00ea7ab3d 100644
--- a/libcxx/include/__node_handle
+++ b/libcxx/include/__node_handle
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NODE_HANDLE
-#define _LIBCPP___NODE_HANDLE
+#ifndef _LIBCUDACXX___NODE_HANDLE
+#define _LIBCUDACXX___NODE_HANDLE
 
 /*
 
@@ -63,13 +63,13 @@ public:
 #include <memory>
 #include <optional>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 // Specialized in __tree & __hash_table for their _NodeType.
 template <class _NodeType, class _Alloc>
@@ -77,7 +77,7 @@ struct __generic_container_node_destructor;
 
 template <class _NodeType, class _Alloc,
           template <class, class> class _MapOrSetSpecifics>
-class _LIBCPP_TEMPLATE_VIS __basic_node_handle
+class _LIBCUDACXX_TEMPLATE_VIS __basic_node_handle
     : public _MapOrSetSpecifics<
           _NodeType,
           __basic_node_handle<_NodeType, _Alloc, _MapOrSetSpecifics>>
@@ -101,14 +101,14 @@ private:
     __node_pointer_type __ptr_ = nullptr;
     optional<allocator_type> __alloc_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __release_ptr()
     {
         __ptr_ = nullptr;
-        __alloc_ = _VSTD::nullopt;
+        __alloc_ = _CUDA_VSTD::nullopt;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __destroy_node_pointer()
     {
         if (__ptr_ != nullptr)
@@ -122,7 +122,7 @@ private:
         }
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __basic_node_handle(__node_pointer_type __ptr,
                         allocator_type const& __alloc)
             : __ptr_(__ptr), __alloc_(__alloc)
@@ -130,23 +130,23 @@ private:
     }
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __basic_node_handle() = default;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __basic_node_handle(__basic_node_handle&& __other) noexcept
             : __ptr_(__other.__ptr_),
-              __alloc_(_VSTD::move(__other.__alloc_))
+              __alloc_(_CUDA_VSTD::move(__other.__alloc_))
     {
         __other.__ptr_ = nullptr;
-        __other.__alloc_ = _VSTD::nullopt;
+        __other.__alloc_ = _CUDA_VSTD::nullopt;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __basic_node_handle& operator=(__basic_node_handle&& __other)
     {
-        _LIBCPP_ASSERT(
-            __alloc_ == _VSTD::nullopt ||
+        _LIBCUDACXX_ASSERT(
+            __alloc_ == _CUDA_VSTD::nullopt ||
             __alloc_traits::propagate_on_container_move_assignment::value ||
             __alloc_ == __other.__alloc_,
             "node_type with incompatible allocator passed to "
@@ -156,41 +156,41 @@ public:
         __ptr_ = __other.__ptr_;
 
         if (__alloc_traits::propagate_on_container_move_assignment::value ||
-            __alloc_ == _VSTD::nullopt)
-            __alloc_ = _VSTD::move(__other.__alloc_);
+            __alloc_ == _CUDA_VSTD::nullopt)
+            __alloc_ = _CUDA_VSTD::move(__other.__alloc_);
 
         __other.__ptr_ = nullptr;
-        __other.__alloc_ = _VSTD::nullopt;
+        __other.__alloc_ = _CUDA_VSTD::nullopt;
 
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const { return *__alloc_; }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit operator bool() const { return __ptr_ != nullptr; }
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool empty() const { return __ptr_ == nullptr; }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(__basic_node_handle& __other) noexcept(
         __alloc_traits::propagate_on_container_swap::value ||
         __alloc_traits::is_always_equal::value)
     {
-        using _VSTD::swap;
+        using _CUDA_VSTD::swap;
         swap(__ptr_, __other.__ptr_);
         if (__alloc_traits::propagate_on_container_swap::value ||
-            __alloc_ == _VSTD::nullopt || __other.__alloc_ == _VSTD::nullopt)
+            __alloc_ == _CUDA_VSTD::nullopt || __other.__alloc_ == _CUDA_VSTD::nullopt)
             swap(__alloc_, __other.__alloc_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     friend void swap(__basic_node_handle& __a, __basic_node_handle& __b)
         noexcept(noexcept(__a.swap(__b))) { __a.swap(__b); }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~__basic_node_handle()
     {
         __destroy_node_pointer();
@@ -202,7 +202,7 @@ struct __set_node_handle_specifics
 {
     typedef typename _NodeType::__node_value_type value_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_type& value() const
     {
         return static_cast<_Derived const*>(this)->__ptr_->__value_;
@@ -215,14 +215,14 @@ struct __map_node_handle_specifics
     typedef typename _NodeType::__node_value_type::key_type key_type;
     typedef typename _NodeType::__node_value_type::mapped_type mapped_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_type& key() const
     {
         return static_cast<_Derived const*>(this)->
             __ptr_->__value_.__ref().first;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     mapped_type& mapped() const
     {
         return static_cast<_Derived const*>(this)->
@@ -239,15 +239,15 @@ using __map_node_handle =
     __basic_node_handle< _NodeType, _Alloc, __map_node_handle_specifics>;
 
 template <class _Iterator, class _NodeType>
-struct _LIBCPP_TEMPLATE_VIS __insert_return_type
+struct _LIBCUDACXX_TEMPLATE_VIS __insert_return_type
 {
     _Iterator position;
     bool inserted;
     _NodeType node;
 };
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif  // _LIBCPP___NODE_HANDLE
+#endif  // _LIBCUDACXX___NODE_HANDLE

diff  --git a/libcxx/include/__numeric/accumulate.h b/libcxx/include/__numeric/accumulate.h
index fa759872ce77..c26b1fb1e4c0 100644
--- a/libcxx/include/__numeric/accumulate.h
+++ b/libcxx/include/__numeric/accumulate.h
@@ -7,26 +7,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_ACCUMULATE_H
-#define _LIBCPP___NUMERIC_ACCUMULATE_H
+#ifndef _LIBCUDACXX___NUMERIC_ACCUMULATE_H
+#define _LIBCUDACXX___NUMERIC_ACCUMULATE_H
 
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _Tp
 accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
 {
     for (; __first != __last; ++__first)
-#if _LIBCPP_STD_VER > 17
-        __init = _VSTD::move(__init) + *__first;
+#if _LIBCUDACXX_STD_VER > 17
+        __init = _CUDA_VSTD::move(__init) + *__first;
 #else
         __init = __init + *__first;
 #endif
@@ -34,19 +34,19 @@ accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
 }
 
 template <class _InputIterator, class _Tp, class _BinaryOperation>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _Tp
 accumulate(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOperation __binary_op)
 {
     for (; __first != __last; ++__first)
-#if _LIBCPP_STD_VER > 17
-        __init = __binary_op(_VSTD::move(__init), *__first);
+#if _LIBCUDACXX_STD_VER > 17
+        __init = __binary_op(_CUDA_VSTD::move(__init), *__first);
 #else
         __init = __binary_op(__init, *__first);
 #endif
     return __init;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___NUMERIC_ACCUMULATE_H
+#endif // _LIBCUDACXX___NUMERIC_ACCUMULATE_H

diff  --git a/libcxx/include/__numeric/adjacent_
diff erence.h b/libcxx/include/__numeric/adjacent_
diff erence.h
index 5c712ecdf77d..bdafac97eb33 100644
--- a/libcxx/include/__numeric/adjacent_
diff erence.h
+++ b/libcxx/include/__numeric/adjacent_
diff erence.h
@@ -7,21 +7,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_ADJACENT_DIFFERENCE_H
-#define _LIBCPP___NUMERIC_ADJACENT_DIFFERENCE_H
+#ifndef _LIBCUDACXX___NUMERIC_ADJACENT_DIFFERENCE_H
+#define _LIBCUDACXX___NUMERIC_ADJACENT_DIFFERENCE_H
 
 #include <__config>
 #include <__iterator/iterator_traits.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _OutputIterator>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 adjacent_
diff erence(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
 {
@@ -32,19 +32,19 @@ adjacent_
diff erence(_InputIterator __first, _InputIterator __last, _OutputIterat
         for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result)
         {
             typename iterator_traits<_InputIterator>::value_type __val(*__first);
-#if _LIBCPP_STD_VER > 17
-            *__result = __val - _VSTD::move(__acc);
+#if _LIBCUDACXX_STD_VER > 17
+            *__result = __val - _CUDA_VSTD::move(__acc);
 #else
             *__result = __val - __acc;
 #endif
-            __acc = _VSTD::move(__val);
+            __acc = _CUDA_VSTD::move(__val);
         }
     }
     return __result;
 }
 
 template <class _InputIterator, class _OutputIterator, class _BinaryOperation>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 adjacent_
diff erence(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
                       _BinaryOperation __binary_op)
@@ -56,17 +56,17 @@ adjacent_
diff erence(_InputIterator __first, _InputIterator __last, _OutputIterat
         for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result)
         {
             typename iterator_traits<_InputIterator>::value_type __val(*__first);
-#if _LIBCPP_STD_VER > 17
-            *__result = __binary_op(__val, _VSTD::move(__acc));
+#if _LIBCUDACXX_STD_VER > 17
+            *__result = __binary_op(__val, _CUDA_VSTD::move(__acc));
 #else
             *__result = __binary_op(__val, __acc);
 #endif
-            __acc = _VSTD::move(__val);
+            __acc = _CUDA_VSTD::move(__val);
         }
     }
     return __result;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___NUMERIC_ADJACENT_DIFFERENCE_H
+#endif // _LIBCUDACXX___NUMERIC_ADJACENT_DIFFERENCE_H

diff  --git a/libcxx/include/__numeric/exclusive_scan.h b/libcxx/include/__numeric/exclusive_scan.h
index c0c89b38805d..cab15b214d90 100644
--- a/libcxx/include/__numeric/exclusive_scan.h
+++ b/libcxx/include/__numeric/exclusive_scan.h
@@ -7,33 +7,33 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_EXCLUSIVE_SCAN_H
-#define _LIBCPP___NUMERIC_EXCLUSIVE_SCAN_H
+#ifndef _LIBCUDACXX___NUMERIC_EXCLUSIVE_SCAN_H
+#define _LIBCUDACXX___NUMERIC_EXCLUSIVE_SCAN_H
 
 #include <__config>
 #include <__functional/operations.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator
 exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp __init, _BinaryOp __b) {
   if (__first != __last) {
     _Tp __tmp(__b(__init, *__first));
     while (true) {
-      *__result = _VSTD::move(__init);
+      *__result = _CUDA_VSTD::move(__init);
       ++__result;
       ++__first;
       if (__first == __last)
         break;
-      __init = _VSTD::move(__tmp);
+      __init = _CUDA_VSTD::move(__tmp);
       __tmp = __b(__init, *__first);
     }
   }
@@ -41,13 +41,13 @@ exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __
 }
 
 template <class _InputIterator, class _OutputIterator, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator
 exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp __init) {
-  return _VSTD::exclusive_scan(__first, __last, __result, __init, _VSTD::plus<>());
+  return _CUDA_VSTD::exclusive_scan(__first, __last, __result, __init, _CUDA_VSTD::plus<>());
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___NUMERIC_EXCLUSIVE_SCAN_H
+#endif // _LIBCUDACXX___NUMERIC_EXCLUSIVE_SCAN_H

diff  --git a/libcxx/include/__numeric/gcd_lcm.h b/libcxx/include/__numeric/gcd_lcm.h
index 9a53a001f211..6e1de7dcd501 100644
--- a/libcxx/include/__numeric/gcd_lcm.h
+++ b/libcxx/include/__numeric/gcd_lcm.h
@@ -7,30 +7,30 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_GCD_LCM_H
-#define _LIBCPP___NUMERIC_GCD_LCM_H
+#ifndef _LIBCUDACXX___NUMERIC_GCD_LCM_H
+#define _LIBCUDACXX___NUMERIC_GCD_LCM_H
 
 #include <__assert>
 #include <__config>
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <typename _Result, typename _Source, bool _IsSigned = is_signed<_Source>::value> struct __ct_abs;
 
 template <typename _Result, typename _Source>
 struct __ct_abs<_Result, _Source, true> {
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     _Result operator()(_Source __t) const noexcept
     {
         if (__t >= 0) return __t;
@@ -41,21 +41,21 @@ struct __ct_abs<_Result, _Source, true> {
 
 template <typename _Result, typename _Source>
 struct __ct_abs<_Result, _Source, false> {
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     _Result operator()(_Source __t) const noexcept { return __t; }
 };
 
 
 template<class _Tp>
-_LIBCPP_CONSTEXPR _LIBCPP_HIDDEN
+_LIBCUDACXX_CONSTEXPR _LIBCUDACXX_HIDDEN
 _Tp __gcd(_Tp __m, _Tp __n)
 {
     static_assert((!is_signed<_Tp>::value), "");
-    return __n == 0 ? __m : _VSTD::__gcd<_Tp>(__n, __m % __n);
+    return __n == 0 ? __m : _CUDA_VSTD::__gcd<_Tp>(__n, __m % __n);
 }
 
 template<class _Tp, class _Up>
-_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
 common_type_t<_Tp,_Up>
 gcd(_Tp __m, _Up __n)
 {
@@ -64,13 +64,13 @@ gcd(_Tp __m, _Up __n)
     static_assert((!is_same<typename remove_cv<_Up>::type, bool>::value), "Second argument to gcd cannot be bool" );
     using _Rp = common_type_t<_Tp,_Up>;
     using _Wp = make_unsigned_t<_Rp>;
-    return static_cast<_Rp>(_VSTD::__gcd(
+    return static_cast<_Rp>(_CUDA_VSTD::__gcd(
         static_cast<_Wp>(__ct_abs<_Rp, _Tp>()(__m)),
         static_cast<_Wp>(__ct_abs<_Rp, _Up>()(__n))));
 }
 
 template<class _Tp, class _Up>
-_LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
 common_type_t<_Tp,_Up>
 lcm(_Tp __m, _Up __n)
 {
@@ -81,16 +81,16 @@ lcm(_Tp __m, _Up __n)
         return 0;
 
     using _Rp = common_type_t<_Tp,_Up>;
-    _Rp __val1 = __ct_abs<_Rp, _Tp>()(__m) / _VSTD::gcd(__m, __n);
+    _Rp __val1 = __ct_abs<_Rp, _Tp>()(__m) / _CUDA_VSTD::gcd(__m, __n);
     _Rp __val2 = __ct_abs<_Rp, _Up>()(__n);
-    _LIBCPP_ASSERT((numeric_limits<_Rp>::max() / __val1 > __val2), "Overflow in lcm");
+    _LIBCUDACXX_ASSERT((numeric_limits<_Rp>::max() / __val1 > __val2), "Overflow in lcm");
     return __val1 * __val2;
 }
 
-#endif // _LIBCPP_STD_VER
+#endif // _LIBCUDACXX_STD_VER
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___NUMERIC_GCD_LCM_H
+#endif // _LIBCUDACXX___NUMERIC_GCD_LCM_H

diff  --git a/libcxx/include/__numeric/inclusive_scan.h b/libcxx/include/__numeric/inclusive_scan.h
index a6b005075835..6f0d2d75a755 100644
--- a/libcxx/include/__numeric/inclusive_scan.h
+++ b/libcxx/include/__numeric/inclusive_scan.h
@@ -7,24 +7,24 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_INCLUSIVE_SCAN_H
-#define _LIBCPP___NUMERIC_INCLUSIVE_SCAN_H
+#ifndef _LIBCUDACXX___NUMERIC_INCLUSIVE_SCAN_H
+#define _LIBCUDACXX___NUMERIC_INCLUSIVE_SCAN_H
 
 #include <__config>
 #include <__functional/operations.h>
 #include <__iterator/iterator_traits.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator
 inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOp __b, _Tp __init) {
   for (; __first != __last; ++__first, (void)++__result) {
     __init = __b(__init, *__first);
@@ -34,27 +34,27 @@ inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __
 }
 
 template <class _InputIterator, class _OutputIterator, class _BinaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator
 inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOp __b) {
   if (__first != __last) {
     typename iterator_traits<_InputIterator>::value_type __init = *__first;
     *__result++ = __init;
     if (++__first != __last)
-      return _VSTD::inclusive_scan(__first, __last, __result, __b, __init);
+      return _CUDA_VSTD::inclusive_scan(__first, __last, __result, __b, __init);
   }
 
   return __result;
 }
 
 template <class _InputIterator, class _OutputIterator>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _OutputIterator inclusive_scan(_InputIterator __first,
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _OutputIterator inclusive_scan(_InputIterator __first,
                                                                                        _InputIterator __last,
                                                                                        _OutputIterator __result) {
-  return _VSTD::inclusive_scan(__first, __last, __result, _VSTD::plus<>());
+  return _CUDA_VSTD::inclusive_scan(__first, __last, __result, _CUDA_VSTD::plus<>());
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___NUMERIC_INCLUSIVE_SCAN_H
+#endif // _LIBCUDACXX___NUMERIC_INCLUSIVE_SCAN_H

diff  --git a/libcxx/include/__numeric/inner_product.h b/libcxx/include/__numeric/inner_product.h
index 6fe18bb2b19e..531bf6a77f5e 100644
--- a/libcxx/include/__numeric/inner_product.h
+++ b/libcxx/include/__numeric/inner_product.h
@@ -7,26 +7,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_INNER_PRODUCT_H
-#define _LIBCPP___NUMERIC_INNER_PRODUCT_H
+#ifndef _LIBCUDACXX___NUMERIC_INNER_PRODUCT_H
+#define _LIBCUDACXX___NUMERIC_INNER_PRODUCT_H
 
 #include <__config>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator1, class _InputIterator2, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _Tp
 inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init)
 {
     for (; __first1 != __last1; ++__first1, (void) ++__first2)
-#if _LIBCPP_STD_VER > 17
-        __init = _VSTD::move(__init) + *__first1 * *__first2;
+#if _LIBCUDACXX_STD_VER > 17
+        __init = _CUDA_VSTD::move(__init) + *__first1 * *__first2;
 #else
         __init = __init + *__first1 * *__first2;
 #endif
@@ -34,20 +34,20 @@ inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2
 }
 
 template <class _InputIterator1, class _InputIterator2, class _Tp, class _BinaryOperation1, class _BinaryOperation2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _Tp
 inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2,
               _Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2)
 {
     for (; __first1 != __last1; ++__first1, (void) ++__first2)
-#if _LIBCPP_STD_VER > 17
-        __init = __binary_op1(_VSTD::move(__init), __binary_op2(*__first1, *__first2));
+#if _LIBCUDACXX_STD_VER > 17
+        __init = __binary_op1(_CUDA_VSTD::move(__init), __binary_op2(*__first1, *__first2));
 #else
         __init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
 #endif
     return __init;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___NUMERIC_INNER_PRODUCT_H
+#endif // _LIBCUDACXX___NUMERIC_INNER_PRODUCT_H

diff  --git a/libcxx/include/__numeric/iota.h b/libcxx/include/__numeric/iota.h
index b7127a11cb75..c4ec66d3adc7 100644
--- a/libcxx/include/__numeric/iota.h
+++ b/libcxx/include/__numeric/iota.h
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_IOTA_H
-#define _LIBCPP___NUMERIC_IOTA_H
+#ifndef _LIBCUDACXX___NUMERIC_IOTA_H
+#define _LIBCUDACXX___NUMERIC_IOTA_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _ForwardIterator, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
 {
@@ -27,6 +27,6 @@ iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __value)
         *__first = __value;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___NUMERIC_IOTA_H
+#endif // _LIBCUDACXX___NUMERIC_IOTA_H

diff  --git a/libcxx/include/__numeric/midpoint.h b/libcxx/include/__numeric/midpoint.h
index 668030c46bcb..641f9bad9bce 100644
--- a/libcxx/include/__numeric/midpoint.h
+++ b/libcxx/include/__numeric/midpoint.h
@@ -7,28 +7,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_MIDPOINT_H
-#define _LIBCPP___NUMERIC_MIDPOINT_H
+#ifndef _LIBCUDACXX___NUMERIC_MIDPOINT_H
+#define _LIBCUDACXX___NUMERIC_MIDPOINT_H
 
 #include <__config>
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<is_integral_v<_Tp> && !is_same_v<bool, _Tp> && !is_null_pointer_v<_Tp>, _Tp>
 midpoint(_Tp __a, _Tp __b) noexcept
-_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+_LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
 {
     using _Up = make_unsigned_t<_Tp>;
     constexpr _Up __bitshift = numeric_limits<_Up>::digits - 1;
@@ -43,14 +43,14 @@ _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
 
 
 template <class _TPtr>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<is_pointer_v<_TPtr>
              && is_object_v<remove_pointer_t<_TPtr>>
              && ! is_void_v<remove_pointer_t<_TPtr>>
              && (sizeof(remove_pointer_t<_TPtr>) > 0), _TPtr>
 midpoint(_TPtr __a, _TPtr __b) noexcept
 {
-    return __a + _VSTD::midpoint(ptr
diff _t(0), __b - __a);
+    return __a + _CUDA_VSTD::midpoint(ptr
diff _t(0), __b - __a);
 }
 
 
@@ -63,7 +63,7 @@ template <typename _Fp>
 constexpr _Fp __fp_abs(_Fp __f) { return __f >= 0 ? __f : -__f; }
 
 template <class _Fp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<is_floating_point_v<_Fp>, _Fp>
 midpoint(_Fp __a, _Fp __b) noexcept
 {
@@ -76,10 +76,10 @@ midpoint(_Fp __a, _Fp __b) noexcept
       __a/2 + __b/2;                                         // otherwise correctly rounded
 }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___NUMERIC_MIDPOINT_H
+#endif // _LIBCUDACXX___NUMERIC_MIDPOINT_H

diff  --git a/libcxx/include/__numeric/partial_sum.h b/libcxx/include/__numeric/partial_sum.h
index 9acee3afc2b0..e67771919aed 100644
--- a/libcxx/include/__numeric/partial_sum.h
+++ b/libcxx/include/__numeric/partial_sum.h
@@ -7,21 +7,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_PARTIAL_SUM_H
-#define _LIBCPP___NUMERIC_PARTIAL_SUM_H
+#ifndef _LIBCUDACXX___NUMERIC_PARTIAL_SUM_H
+#define _LIBCUDACXX___NUMERIC_PARTIAL_SUM_H
 
 #include <__config>
 #include <__iterator/iterator_traits.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _InputIterator, class _OutputIterator>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result)
 {
@@ -31,8 +31,8 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res
         *__result = __t;
         for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result)
         {
-#if _LIBCPP_STD_VER > 17
-            __t = _VSTD::move(__t) + *__first;
+#if _LIBCUDACXX_STD_VER > 17
+            __t = _CUDA_VSTD::move(__t) + *__first;
 #else
             __t = __t + *__first;
 #endif
@@ -43,7 +43,7 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res
 }
 
 template <class _InputIterator, class _OutputIterator, class _BinaryOperation>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __result,
               _BinaryOperation __binary_op)
@@ -54,8 +54,8 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res
         *__result = __t;
         for (++__first, (void) ++__result; __first != __last; ++__first, (void) ++__result)
         {
-#if _LIBCPP_STD_VER > 17
-            __t = __binary_op(_VSTD::move(__t), *__first);
+#if _LIBCUDACXX_STD_VER > 17
+            __t = __binary_op(_CUDA_VSTD::move(__t), *__first);
 #else
             __t = __binary_op(__t, *__first);
 #endif
@@ -65,6 +65,6 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res
     return __result;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___NUMERIC_PARTIAL_SUM_H
+#endif // _LIBCUDACXX___NUMERIC_PARTIAL_SUM_H

diff  --git a/libcxx/include/__numeric/reduce.h b/libcxx/include/__numeric/reduce.h
index 90e4d238d868..42321ffa964f 100644
--- a/libcxx/include/__numeric/reduce.h
+++ b/libcxx/include/__numeric/reduce.h
@@ -7,22 +7,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_REDUCE_H
-#define _LIBCPP___NUMERIC_REDUCE_H
+#ifndef _LIBCUDACXX___NUMERIC_REDUCE_H
+#define _LIBCUDACXX___NUMERIC_REDUCE_H
 
 #include <__config>
 #include <__functional/operations.h>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _InputIterator, class _Tp, class _BinaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp reduce(_InputIterator __first, _InputIterator __last,
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Tp reduce(_InputIterator __first, _InputIterator __last,
                                                                    _Tp __init, _BinaryOp __b) {
   for (; __first != __last; ++__first)
     __init = __b(__init, *__first);
@@ -30,18 +30,18 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp reduce(_InputIterato
 }
 
 template <class _InputIterator, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp reduce(_InputIterator __first, _InputIterator __last,
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Tp reduce(_InputIterator __first, _InputIterator __last,
                                                                    _Tp __init) {
-  return _VSTD::reduce(__first, __last, __init, _VSTD::plus<>());
+  return _CUDA_VSTD::reduce(__first, __last, __init, _CUDA_VSTD::plus<>());
 }
 
 template <class _InputIterator>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 typename iterator_traits<_InputIterator>::value_type
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 typename iterator_traits<_InputIterator>::value_type
 reduce(_InputIterator __first, _InputIterator __last) {
-  return _VSTD::reduce(__first, __last, typename iterator_traits<_InputIterator>::value_type{});
+  return _CUDA_VSTD::reduce(__first, __last, typename iterator_traits<_InputIterator>::value_type{});
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___NUMERIC_REDUCE_H
+#endif // _LIBCUDACXX___NUMERIC_REDUCE_H

diff  --git a/libcxx/include/__numeric/transform_exclusive_scan.h b/libcxx/include/__numeric/transform_exclusive_scan.h
index 45b3077f6649..9fb04bf8ac8a 100644
--- a/libcxx/include/__numeric/transform_exclusive_scan.h
+++ b/libcxx/include/__numeric/transform_exclusive_scan.h
@@ -7,22 +7,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_H
-#define _LIBCPP___NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_H
+#ifndef _LIBCUDACXX___NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_H
+#define _LIBCUDACXX___NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _InputIterator, class _OutputIterator, class _Tp,
           class _BinaryOp, class _UnaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 transform_exclusive_scan(_InputIterator __first, _InputIterator __last,
                            _OutputIterator __result, _Tp __init,
@@ -42,8 +42,8 @@ transform_exclusive_scan(_InputIterator __first, _InputIterator __last,
     return __result;
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_H
+#endif // _LIBCUDACXX___NUMERIC_TRANSFORM_EXCLUSIVE_SCAN_H

diff  --git a/libcxx/include/__numeric/transform_inclusive_scan.h b/libcxx/include/__numeric/transform_inclusive_scan.h
index b0d4ab5a88fd..f975eb00c52d 100644
--- a/libcxx/include/__numeric/transform_inclusive_scan.h
+++ b/libcxx/include/__numeric/transform_inclusive_scan.h
@@ -7,22 +7,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_TRANSFORM_INCLUSIVE_SCAN_H
-#define _LIBCPP___NUMERIC_TRANSFORM_INCLUSIVE_SCAN_H
+#ifndef _LIBCUDACXX___NUMERIC_TRANSFORM_INCLUSIVE_SCAN_H
+#define _LIBCUDACXX___NUMERIC_TRANSFORM_INCLUSIVE_SCAN_H
 
 #include <__config>
 #include <__iterator/iterator_traits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _InputIterator, class _OutputIterator, class _Tp, class _BinaryOp, class _UnaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
                            _OutputIterator __result, _BinaryOp __b, _UnaryOp __u, _Tp __init)
@@ -36,7 +36,7 @@ transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
 }
 
 template <class _InputIterator, class _OutputIterator, class _BinaryOp, class _UnaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _OutputIterator
 transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
                                _OutputIterator __result, _BinaryOp __b, _UnaryOp __u)
@@ -45,14 +45,14 @@ transform_inclusive_scan(_InputIterator __first, _InputIterator __last,
         typename iterator_traits<_InputIterator>::value_type __init = __u(*__first);
         *__result++ = __init;
         if (++__first != __last)
-            return _VSTD::transform_inclusive_scan(__first, __last, __result, __b, __u, __init);
+            return _CUDA_VSTD::transform_inclusive_scan(__first, __last, __result, __b, __u, __init);
     }
 
     return __result;
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___NUMERIC_TRANSFORM_INCLUSIVE_SCAN_H
+#endif // _LIBCUDACXX___NUMERIC_TRANSFORM_INCLUSIVE_SCAN_H

diff  --git a/libcxx/include/__numeric/transform_reduce.h b/libcxx/include/__numeric/transform_reduce.h
index da5a77988c38..b2f8875b4846 100644
--- a/libcxx/include/__numeric/transform_reduce.h
+++ b/libcxx/include/__numeric/transform_reduce.h
@@ -7,22 +7,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___NUMERIC_TRANSFORM_REDUCE_H
-#define _LIBCPP___NUMERIC_TRANSFORM_REDUCE_H
+#ifndef _LIBCUDACXX___NUMERIC_TRANSFORM_REDUCE_H
+#define _LIBCUDACXX___NUMERIC_TRANSFORM_REDUCE_H
 
 #include <__config>
 #include <__functional/operations.h>
 #include <__utility/move.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _InputIterator, class _Tp, class _BinaryOp, class _UnaryOp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_InputIterator __first,
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_InputIterator __first,
                                                                              _InputIterator __last, _Tp __init,
                                                                              _BinaryOp __b, _UnaryOp __u) {
   for (; __first != __last; ++__first)
@@ -31,7 +31,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_In
 }
 
 template <class _InputIterator1, class _InputIterator2, class _Tp, class _BinaryOp1, class _BinaryOp2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_InputIterator1 __first1,
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_InputIterator1 __first1,
                                                                              _InputIterator1 __last1,
                                                                              _InputIterator2 __first2, _Tp __init,
                                                                              _BinaryOp1 __b1, _BinaryOp2 __b2) {
@@ -41,14 +41,14 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_In
 }
 
 template <class _InputIterator1, class _InputIterator2, class _Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_InputIterator1 __first1,
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Tp transform_reduce(_InputIterator1 __first1,
                                                                              _InputIterator1 __last1,
                                                                              _InputIterator2 __first2, _Tp __init) {
-  return _VSTD::transform_reduce(__first1, __last1, __first2, _VSTD::move(__init), _VSTD::plus<>(),
-                                 _VSTD::multiplies<>());
+  return _CUDA_VSTD::transform_reduce(__first1, __last1, __first2, _CUDA_VSTD::move(__init), _CUDA_VSTD::plus<>(),
+                                 _CUDA_VSTD::multiplies<>());
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___NUMERIC_TRANSFORM_REDUCE_H
+#endif // _LIBCUDACXX___NUMERIC_TRANSFORM_REDUCE_H

diff  --git a/libcxx/include/__random/bernoulli_distribution.h b/libcxx/include/__random/bernoulli_distribution.h
index e97d53f5a421..b4474c02afe2 100644
--- a/libcxx/include/__random/bernoulli_distribution.h
+++ b/libcxx/include/__random/bernoulli_distribution.h
@@ -6,45 +6,45 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_BERNOULLI_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_BERNOULLI_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_BERNOULLI_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_BERNOULLI_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/is_valid.h>
 #include <__random/uniform_real_distribution.h>
 #include <iosfwd>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TEMPLATE_VIS bernoulli_distribution
+class _LIBCUDACXX_TEMPLATE_VIS bernoulli_distribution
 {
 public:
     // types
     typedef bool result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         double __p_;
     public:
         typedef bernoulli_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(double __p = 0.5) : __p_(__p) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         double p() const {return __p_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__p_ == __y.__p_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -54,46 +54,46 @@ class _LIBCPP_TEMPLATE_VIS bernoulli_distribution
 
 public:
     // constructors and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     bernoulli_distribution() : bernoulli_distribution(0.5) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit bernoulli_distribution(double __p) : __p_(param_type(__p)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit bernoulli_distribution(double __p = 0.5) : __p_(param_type(__p)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit bernoulli_distribution(const param_type& __p) : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
-    template<class _URNG> _LIBCPP_INLINE_VISIBILITY result_type operator()(_URNG& __g, const param_type& __p);
+    template<class _URNG> _LIBCUDACXX_INLINE_VISIBILITY result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     double p() const {return __p_.p();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return false;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return true;}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const bernoulli_distribution& __x,
                         const bernoulli_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const bernoulli_distribution& __x,
                         const bernoulli_distribution& __y)
         {return !(__x == __y);}
@@ -104,7 +104,7 @@ inline
 bernoulli_distribution::result_type
 bernoulli_distribution::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     uniform_real_distribution<double> __gen;
     return __gen(__g) < __p.p();
 }
@@ -138,8 +138,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bernoulli_distribution& __x)
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_BERNOULLI_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_BERNOULLI_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/binomial_distribution.h b/libcxx/include/__random/binomial_distribution.h
index af60fa2a38e0..25d4c2966400 100644
--- a/libcxx/include/__random/binomial_distribution.h
+++ b/libcxx/include/__random/binomial_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_BINOMIAL_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_BINOMIAL_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_BINOMIAL_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_BINOMIAL_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/is_valid.h>
@@ -15,24 +15,24 @@
 #include <cmath>
 #include <iosfwd>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _IntType = int>
-class _LIBCPP_TEMPLATE_VIS binomial_distribution
+class _LIBCUDACXX_TEMPLATE_VIS binomial_distribution
 {
-    static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
+    static_assert(__LIBCUDACXX_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
 public:
     // types
     typedef _IntType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __t_;
         double __p_;
@@ -44,15 +44,15 @@ class _LIBCPP_TEMPLATE_VIS binomial_distribution
 
         explicit param_type(result_type __t = 1, double __p = 0.5);
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type t() const {return __t_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         double p() const {return __p_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__t_ == __y.__t_ && __x.__p_ == __y.__p_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
 
@@ -64,61 +64,61 @@ class _LIBCPP_TEMPLATE_VIS binomial_distribution
 
 public:
     // constructors and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     binomial_distribution() : binomial_distribution(1) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit binomial_distribution(result_type __t, double __p = 0.5)
         : __p_(param_type(__t, __p)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit binomial_distribution(result_type __t = 1, double __p = 0.5)
         : __p_(param_type(__t, __p)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit binomial_distribution(const param_type& __p) : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type t() const {return __p_.t();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     double p() const {return __p_.p();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return t();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const binomial_distribution& __x,
                         const binomial_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const binomial_distribution& __x,
                         const binomial_distribution& __y)
         {return !(__x == __y);}
 };
 
-#ifndef _LIBCPP_MSVCRT_LIKE
+#ifndef _LIBCUDACXX_MSVCRT_LIKE
 extern "C" double lgamma_r(double, int *);
 #endif
 
-inline _LIBCPP_INLINE_VISIBILITY double __libcpp_lgamma(double __d) {
-#if defined(_LIBCPP_MSVCRT_LIKE)
+inline _LIBCUDACXX_INLINE_VISIBILITY double __LIBCUDACXX_lgamma(double __d) {
+#if defined(_LIBCUDACXX_MSVCRT_LIKE)
   return lgamma(__d);
 #else
   int __sign;
@@ -133,10 +133,10 @@ binomial_distribution<_IntType>::param_type::param_type(result_type __t, double
     if (0 < __p_ && __p_ < 1)
     {
         __r0_ = static_cast<result_type>((__t_ + 1) * __p_);
-        __pr_ = _VSTD::exp(__libcpp_lgamma(__t_ + 1.) -
-                           __libcpp_lgamma(__r0_ + 1.) -
-                           __libcpp_lgamma(__t_ - __r0_ + 1.) + __r0_ * _VSTD::log(__p_) +
-                           (__t_ - __r0_) * _VSTD::log(1 - __p_));
+        __pr_ = _CUDA_VSTD::exp(__LIBCUDACXX_lgamma(__t_ + 1.) -
+                           __LIBCUDACXX_lgamma(__r0_ + 1.) -
+                           __LIBCUDACXX_lgamma(__t_ - __r0_ + 1.) + __r0_ * _CUDA_VSTD::log(__p_) +
+                           (__t_ - __r0_) * _CUDA_VSTD::log(1 - __p_));
         __odds_ratio_ = __p_ / (1 - __p_);
     }
 }
@@ -148,7 +148,7 @@ template<class _URNG>
 _IntType
 binomial_distribution<_IntType>::operator()(_URNG& __g, const param_type& __pr)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     if (__pr.__t_ == 0 || __pr.__p_ == 0)
         return 0;
     if (__pr.__p_ == 1)
@@ -221,8 +221,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_BINOMIAL_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_BINOMIAL_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/cauchy_distribution.h b/libcxx/include/__random/cauchy_distribution.h
index 5bc44ee8dd4c..1f30b9764acd 100644
--- a/libcxx/include/__random/cauchy_distribution.h
+++ b/libcxx/include/__random/cauchy_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_CAUCHY_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_CAUCHY_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_CAUCHY_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_CAUCHY_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/is_valid.h>
@@ -16,42 +16,42 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS cauchy_distribution
+class _LIBCUDACXX_TEMPLATE_VIS cauchy_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __a_;
         result_type __b_;
     public:
         typedef cauchy_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __a = 0, result_type __b = 1)
             : __a_(__a), __b_(__b) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type a() const {return __a_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type b() const {return __b_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__a_ == __y.__a_ && __x.__b_ == __y.__b_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -61,51 +61,51 @@ class _LIBCPP_TEMPLATE_VIS cauchy_distribution
 
 public:
     // constructor and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     cauchy_distribution() : cauchy_distribution(0) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit cauchy_distribution(result_type __a, result_type __b = 1)
         : __p_(param_type(__a, __b)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit cauchy_distribution(result_type __a = 0, result_type __b = 1)
         : __p_(param_type(__a, __b)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit cauchy_distribution(const param_type& __p)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
-    template<class _URNG> _LIBCPP_INLINE_VISIBILITY result_type operator()(_URNG& __g, const param_type& __p);
+    template<class _URNG> _LIBCUDACXX_INLINE_VISIBILITY result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type a() const {return __p_.a();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type b() const {return __p_.b();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return -numeric_limits<result_type>::infinity();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::infinity();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const cauchy_distribution& __x,
                         const cauchy_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const cauchy_distribution& __x,
                         const cauchy_distribution& __y)
         {return !(__x == __y);}
@@ -117,10 +117,10 @@ inline
 _RealType
 cauchy_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     uniform_real_distribution<result_type> __gen;
     // purposefully let tan arg get as close to pi/2 as it wants, tan will return a finite
-    return __p.a() + __p.b() * _VSTD::tan(3.1415926535897932384626433832795 * __gen(__g));
+    return __p.a() + __p.b() * _CUDA_VSTD::tan(3.1415926535897932384626433832795 * __gen(__g));
 }
 
 template <class _CharT, class _Traits, class _RT>
@@ -157,8 +157,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_CAUCHY_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_CAUCHY_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/chi_squared_distribution.h b/libcxx/include/__random/chi_squared_distribution.h
index b98488c20d28..5f8b6addebff 100644
--- a/libcxx/include/__random/chi_squared_distribution.h
+++ b/libcxx/include/__random/chi_squared_distribution.h
@@ -6,46 +6,46 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_CHI_SQUARED_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_CHI_SQUARED_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_CHI_SQUARED_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_CHI_SQUARED_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/gamma_distribution.h>
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS chi_squared_distribution
+class _LIBCUDACXX_TEMPLATE_VIS chi_squared_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __n_;
     public:
         typedef chi_squared_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __n = 1) : __n_(__n) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type n() const {return __n_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__n_ == __y.__n_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -55,52 +55,52 @@ class _LIBCPP_TEMPLATE_VIS chi_squared_distribution
 
 public:
     // constructor and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     chi_squared_distribution() : chi_squared_distribution(1) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit chi_squared_distribution(result_type __n)
         : __p_(param_type(__n)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit chi_squared_distribution(result_type __n = 1)
         : __p_(param_type(__n)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit chi_squared_distribution(const param_type& __p)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g, const param_type& __p)
         {return gamma_distribution<result_type>(__p.n() / 2, 2)(__g);}
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type n() const {return __p_.n();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::infinity();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const chi_squared_distribution& __x,
                         const chi_squared_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const chi_squared_distribution& __x,
                         const chi_squared_distribution& __y)
         {return !(__x == __y);}
@@ -137,8 +137,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_CHI_SQUARED_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_CHI_SQUARED_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/clamp_to_integral.h b/libcxx/include/__random/clamp_to_integral.h
index 7d44ff9cfcad..f847e096476f 100644
--- a/libcxx/include/__random/clamp_to_integral.h
+++ b/libcxx/include/__random/clamp_to_integral.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_CLAMP_TO_INTEGRAL_H
-#define _LIBCPP___RANDOM_CLAMP_TO_INTEGRAL_H
+#ifndef _LIBCUDACXX___RANDOM_CLAMP_TO_INTEGRAL_H
+#define _LIBCUDACXX___RANDOM_CLAMP_TO_INTEGRAL_H
 
 #include <__config>
 #include <cmath>
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _IntT, class _FloatT,
     bool _FloatBigger = (numeric_limits<_FloatT>::digits > numeric_limits<_IntT>::digits),
     int _Bits = (numeric_limits<_IntT>::digits - numeric_limits<_FloatT>::digits)>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR _IntT __max_representable_int_for_float() _NOEXCEPT {
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR _IntT __max_representable_int_for_float() _NOEXCEPT {
   static_assert(is_floating_point<_FloatT>::value, "must be a floating point type");
   static_assert(is_integral<_IntT>::value, "must be an integral type");
   static_assert(numeric_limits<_FloatT>::radix == 2, "FloatT has incorrect radix");
@@ -41,7 +41,7 @@ _LIBCPP_CONSTEXPR _IntT __max_representable_int_for_float() _NOEXCEPT {
 //
 // The behavior is undefined if `__r` is NaN.
 template <class _IntT, class _RealT>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _IntT __clamp_to_integral(_RealT __r) _NOEXCEPT {
   using _Lim = numeric_limits<_IntT>;
   const _IntT _MaxVal = __max_representable_int_for_float<_IntT, _RealT>();
@@ -53,8 +53,8 @@ _IntT __clamp_to_integral(_RealT __r) _NOEXCEPT {
   return static_cast<_IntT>(__r);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_CLAMP_TO_INTEGRAL_H
+#endif // _LIBCUDACXX___RANDOM_CLAMP_TO_INTEGRAL_H

diff  --git a/libcxx/include/__random/default_random_engine.h b/libcxx/include/__random/default_random_engine.h
index 89792f4f0d43..3393cbc1f955 100644
--- a/libcxx/include/__random/default_random_engine.h
+++ b/libcxx/include/__random/default_random_engine.h
@@ -6,20 +6,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_DEFAULT_RANDOM_ENGINE_H
-#define _LIBCPP___RANDOM_DEFAULT_RANDOM_ENGINE_H
+#ifndef _LIBCUDACXX___RANDOM_DEFAULT_RANDOM_ENGINE_H
+#define _LIBCUDACXX___RANDOM_DEFAULT_RANDOM_ENGINE_H
 
 #include <__config>
 #include <__random/linear_congruential_engine.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 typedef minstd_rand default_random_engine;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANDOM_DEFAULT_RANDOM_ENGINE_H
+#endif // _LIBCUDACXX___RANDOM_DEFAULT_RANDOM_ENGINE_H

diff  --git a/libcxx/include/__random/discard_block_engine.h b/libcxx/include/__random/discard_block_engine.h
index c58d66b58869..f07507f72ee2 100644
--- a/libcxx/include/__random/discard_block_engine.h
+++ b/libcxx/include/__random/discard_block_engine.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_DISCARD_BLOCK_ENGINE_H
-#define _LIBCPP___RANDOM_DISCARD_BLOCK_ENGINE_H
+#ifndef _LIBCUDACXX___RANDOM_DISCARD_BLOCK_ENGINE_H
+#define _LIBCUDACXX___RANDOM_DISCARD_BLOCK_ENGINE_H
 
 #include <__config>
 #include <__random/is_seed_sequence.h>
@@ -16,17 +16,17 @@
 #include <iosfwd>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _Engine, size_t __p, size_t __r>
-class _LIBCPP_TEMPLATE_VIS discard_block_engine
+class _LIBCUDACXX_TEMPLATE_VIS discard_block_engine
 {
     _Engine __e_;
     int     __n_;
@@ -39,47 +39,47 @@ class _LIBCPP_TEMPLATE_VIS discard_block_engine
     typedef typename _Engine::result_type result_type;
 
     // engine characteristics
-    static _LIBCPP_CONSTEXPR const size_t block_size = __p;
-    static _LIBCPP_CONSTEXPR const size_t used_block = __r;
+    static _LIBCUDACXX_CONSTEXPR const size_t block_size = __p;
+    static _LIBCUDACXX_CONSTEXPR const size_t used_block = __r;
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
     static const result_type _Min = _Engine::_Min;
     static const result_type _Max = _Engine::_Max;
 #else
-    static _LIBCPP_CONSTEXPR const result_type _Min = _Engine::min();
-    static _LIBCPP_CONSTEXPR const result_type _Max = _Engine::max();
+    static _LIBCUDACXX_CONSTEXPR const result_type _Min = _Engine::min();
+    static _LIBCUDACXX_CONSTEXPR const result_type _Max = _Engine::max();
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type min() { return _Engine::min(); }
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type max() { return _Engine::max(); }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type min() { return _Engine::min(); }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type max() { return _Engine::max(); }
 
     // constructors and seeding functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     discard_block_engine() : __n_(0) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit discard_block_engine(const _Engine& __e)
         : __e_(__e), __n_(0) {}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit discard_block_engine(_Engine&& __e)
-        : __e_(_VSTD::move(__e)), __n_(0) {}
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+        : __e_(_CUDA_VSTD::move(__e)), __n_(0) {}
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit discard_block_engine(result_type __sd) : __e_(__sd), __n_(0) {}
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit discard_block_engine(_Sseq& __q,
         typename enable_if<__is_seed_sequence<_Sseq, discard_block_engine>::value &&
                            !is_convertible<_Sseq, _Engine>::value>::type* = 0)
         : __e_(__q), __n_(0) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed() {__e_.seed(); __n_ = 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed(result_type __sd) {__e_.seed(__sd); __n_ = 0;}
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if
         <
             __is_seed_sequence<_Sseq, discard_block_engine>::value,
@@ -89,11 +89,11 @@ class _LIBCPP_TEMPLATE_VIS discard_block_engine
 
     // generating functions
     result_type operator()();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void discard(unsigned long long __z) {for (; __z; --__z) operator()();}
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Engine& base() const _NOEXCEPT {return __e_;}
 
     template<class _Eng, size_t _Pp, size_t _Rp>
@@ -126,10 +126,10 @@ class _LIBCPP_TEMPLATE_VIS discard_block_engine
 };
 
 template<class _Engine, size_t __p, size_t __r>
-    _LIBCPP_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::block_size;
+    _LIBCUDACXX_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::block_size;
 
 template<class _Engine, size_t __p, size_t __r>
-    _LIBCPP_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::used_block;
+    _LIBCUDACXX_CONSTEXPR const size_t discard_block_engine<_Engine, __p, __r>::used_block;
 
 template<class _Engine, size_t __p, size_t __r>
 typename discard_block_engine<_Engine, __p, __r>::result_type
@@ -145,7 +145,7 @@ discard_block_engine<_Engine, __p, __r>::operator()()
 }
 
 template<class _Eng, size_t _Pp, size_t _Rp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const discard_block_engine<_Eng, _Pp, _Rp>& __x,
            const discard_block_engine<_Eng, _Pp, _Rp>& __y)
@@ -154,7 +154,7 @@ operator==(const discard_block_engine<_Eng, _Pp, _Rp>& __x,
 }
 
 template<class _Eng, size_t _Pp, size_t _Rp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const discard_block_engine<_Eng, _Pp, _Rp>& __x,
            const discard_block_engine<_Eng, _Pp, _Rp>& __y)
@@ -196,8 +196,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_DISCARD_BLOCK_ENGINE_H
+#endif // _LIBCUDACXX___RANDOM_DISCARD_BLOCK_ENGINE_H

diff  --git a/libcxx/include/__random/discrete_distribution.h b/libcxx/include/__random/discrete_distribution.h
index 8dc63c0e98b4..4a89136a2dd8 100644
--- a/libcxx/include/__random/discrete_distribution.h
+++ b/libcxx/include/__random/discrete_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_DISCRETE_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_DISCRETE_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_DISCRETE_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_DISCRETE_DISTRIBUTION_H
 
 #include <__algorithm/upper_bound.h>
 #include <__config>
@@ -18,50 +18,50 @@
 #include <numeric>
 #include <vector>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _IntType = int>
-class _LIBCPP_TEMPLATE_VIS discrete_distribution
+class _LIBCUDACXX_TEMPLATE_VIS discrete_distribution
 {
-    static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
+    static_assert(__LIBCUDACXX_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
 public:
     // types
     typedef _IntType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         vector<double> __p_;
     public:
         typedef discrete_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         param_type() {}
         template<class _InputIterator>
-            _LIBCPP_INLINE_VISIBILITY
+            _LIBCUDACXX_INLINE_VISIBILITY
             param_type(_InputIterator __f, _InputIterator __l)
             : __p_(__f, __l) {__init();}
-#ifndef _LIBCPP_CXX03_LANG
-        _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+        _LIBCUDACXX_INLINE_VISIBILITY
         param_type(initializer_list<double> __wl)
             : __p_(__wl.begin(), __wl.end()) {__init();}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
         template<class _UnaryOperation>
             param_type(size_t __nw, double __xmin, double __xmax,
                        _UnaryOperation __fw);
 
         vector<double> probabilities() const;
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__p_ == __y.__p_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
 
@@ -88,54 +88,54 @@ class _LIBCPP_TEMPLATE_VIS discrete_distribution
 
 public:
     // constructor and reset functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     discrete_distribution() {}
     template<class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         discrete_distribution(_InputIterator __f, _InputIterator __l)
             : __p_(__f, __l) {}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     discrete_distribution(initializer_list<double> __wl)
         : __p_(__wl) {}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
     template<class _UnaryOperation>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         discrete_distribution(size_t __nw, double __xmin, double __xmax,
                               _UnaryOperation __fw)
         : __p_(__nw, __xmin, __xmax, __fw) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit discrete_distribution(const param_type& __p)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     vector<double> probabilities() const {return __p_.probabilities();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return __p_.__p_.size();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const discrete_distribution& __x,
                         const discrete_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const discrete_distribution& __x,
                         const discrete_distribution& __y)
         {return !(__x == __y);}
@@ -179,11 +179,11 @@ discrete_distribution<_IntType>::param_type::__init()
     {
         if (__p_.size() > 1)
         {
-            double __s = _VSTD::accumulate(__p_.begin(), __p_.end(), 0.0);
+            double __s = _CUDA_VSTD::accumulate(__p_.begin(), __p_.end(), 0.0);
             for (vector<double>::iterator __i = __p_.begin(), __e = __p_.end(); __i < __e; ++__i)
                 *__i /= __s;
             vector<double> __t(__p_.size() - 1);
-            _VSTD::partial_sum(__p_.begin(), __p_.end() - 1, __t.begin());
+            _CUDA_VSTD::partial_sum(__p_.begin(), __p_.end() - 1, __t.begin());
             swap(__p_, __t);
         }
         else
@@ -200,7 +200,7 @@ discrete_distribution<_IntType>::param_type::probabilities() const
 {
     size_t __n = __p_.size();
     vector<double> __p(__n+1);
-    _VSTD::adjacent_
diff erence(__p_.begin(), __p_.end(), __p.begin());
+    _CUDA_VSTD::adjacent_
diff erence(__p_.begin(), __p_.end(), __p.begin());
     if (__n > 0)
         __p[__n] = 1 - __p_[__n-1];
     else
@@ -213,10 +213,10 @@ template<class _URNG>
 _IntType
 discrete_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     uniform_real_distribution<double> __gen;
     return static_cast<_IntType>(
-           _VSTD::upper_bound(__p.__p_.begin(), __p.__p_.end(), __gen(__g)) -
+           _CUDA_VSTD::upper_bound(__p.__p_.begin(), __p.__p_.end(), __gen(__g)) -
                                                               __p.__p_.begin());
 }
 
@@ -256,8 +256,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_DISCRETE_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_DISCRETE_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/exponential_distribution.h b/libcxx/include/__random/exponential_distribution.h
index 1c9e9e0d9ef1..53b07e2486b1 100644
--- a/libcxx/include/__random/exponential_distribution.h
+++ b/libcxx/include/__random/exponential_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_EXPONENTIAL_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_EXPONENTIAL_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_EXPONENTIAL_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_EXPONENTIAL_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/generate_canonical.h>
@@ -17,38 +17,38 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS exponential_distribution
+class _LIBCUDACXX_TEMPLATE_VIS exponential_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __lambda_;
     public:
         typedef exponential_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __lambda = 1) : __lambda_(__lambda) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type lambda() const {return __lambda_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__lambda_ == __y.__lambda_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -58,48 +58,48 @@ class _LIBCPP_TEMPLATE_VIS exponential_distribution
 
 public:
     // constructors and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     exponential_distribution() : exponential_distribution(1) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit exponential_distribution(result_type __lambda)
         : __p_(param_type(__lambda)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit exponential_distribution(result_type __lambda = 1)
         : __p_(param_type(__lambda)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit exponential_distribution(const param_type& __p) : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type lambda() const {return __p_.lambda();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::infinity();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const exponential_distribution& __x,
                         const exponential_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const exponential_distribution& __x,
                         const exponential_distribution& __y)
         {return !(__x == __y);}
@@ -110,11 +110,11 @@ template<class _URNG>
 _RealType
 exponential_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
-    return -_VSTD::log
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
+    return -_CUDA_VSTD::log
                   (
                       result_type(1) -
-                      _VSTD::generate_canonical<result_type,
+                      _CUDA_VSTD::generate_canonical<result_type,
                                        numeric_limits<result_type>::digits>(__g)
                   )
                   / __p.lambda();
@@ -150,8 +150,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_EXPONENTIAL_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_EXPONENTIAL_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/extreme_value_distribution.h b/libcxx/include/__random/extreme_value_distribution.h
index ba30aa5b88c3..9af62ef83110 100644
--- a/libcxx/include/__random/extreme_value_distribution.h
+++ b/libcxx/include/__random/extreme_value_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_EXTREME_VALUE_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_EXTREME_VALUE_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_EXTREME_VALUE_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_EXTREME_VALUE_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/is_valid.h>
@@ -16,42 +16,42 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS extreme_value_distribution
+class _LIBCUDACXX_TEMPLATE_VIS extreme_value_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __a_;
         result_type __b_;
     public:
         typedef extreme_value_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __a = 0, result_type __b = 1)
             : __a_(__a), __b_(__b) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type a() const {return __a_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type b() const {return __b_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__a_ == __y.__a_ && __x.__b_ == __y.__b_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -61,52 +61,52 @@ class _LIBCPP_TEMPLATE_VIS extreme_value_distribution
 
 public:
     // constructor and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     extreme_value_distribution() : extreme_value_distribution(0) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit extreme_value_distribution(result_type __a, result_type __b = 1)
         : __p_(param_type(__a, __b)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit extreme_value_distribution(result_type __a = 0,
                                         result_type __b = 1)
         : __p_(param_type(__a, __b)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit extreme_value_distribution(const param_type& __p)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type a() const {return __p_.a();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type b() const {return __p_.b();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return -numeric_limits<result_type>::infinity();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::infinity();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const extreme_value_distribution& __x,
                         const extreme_value_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const extreme_value_distribution& __x,
                         const extreme_value_distribution& __y)
         {return !(__x == __y);}
@@ -117,9 +117,9 @@ template<class _URNG>
 _RealType
 extreme_value_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     return __p.a() - __p.b() *
-         _VSTD::log(-_VSTD::log(1-uniform_real_distribution<result_type>()(__g)));
+         _CUDA_VSTD::log(-_CUDA_VSTD::log(1-uniform_real_distribution<result_type>()(__g)));
 }
 
 template <class _CharT, class _Traits, class _RT>
@@ -156,8 +156,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_EXTREME_VALUE_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_EXTREME_VALUE_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/fisher_f_distribution.h b/libcxx/include/__random/fisher_f_distribution.h
index 60c7f28c0bb0..7449e0dc654c 100644
--- a/libcxx/include/__random/fisher_f_distribution.h
+++ b/libcxx/include/__random/fisher_f_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_FISHER_F_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_FISHER_F_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_FISHER_F_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_FISHER_F_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/gamma_distribution.h>
@@ -15,42 +15,42 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS fisher_f_distribution
+class _LIBCUDACXX_TEMPLATE_VIS fisher_f_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __m_;
         result_type __n_;
     public:
         typedef fisher_f_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __m = 1, result_type __n = 1)
             : __m_(__m), __n_(__n) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type m() const {return __m_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type n() const {return __n_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__m_ == __y.__m_ && __x.__n_ == __y.__n_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -60,51 +60,51 @@ class _LIBCPP_TEMPLATE_VIS fisher_f_distribution
 
 public:
     // constructor and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     fisher_f_distribution() : fisher_f_distribution(1) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit fisher_f_distribution(result_type __m, result_type __n = 1)
         : __p_(param_type(__m, __n)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit fisher_f_distribution(result_type __m = 1, result_type __n = 1)
         : __p_(param_type(__m, __n)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit fisher_f_distribution(const param_type& __p)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type m() const {return __p_.m();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type n() const {return __p_.n();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::infinity();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const fisher_f_distribution& __x,
                         const fisher_f_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const fisher_f_distribution& __x,
                         const fisher_f_distribution& __y)
         {return !(__x == __y);}
@@ -115,7 +115,7 @@ template<class _URNG>
 _RealType
 fisher_f_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     gamma_distribution<result_type> __gdm(__p.m() * result_type(.5));
     gamma_distribution<result_type> __gdn(__p.n() * result_type(.5));
     return __p.n() * __gdm(__g) / (__p.m() * __gdn(__g));
@@ -155,8 +155,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_FISHER_F_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_FISHER_F_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/gamma_distribution.h b/libcxx/include/__random/gamma_distribution.h
index 986d79b67aa3..b4fe478baa34 100644
--- a/libcxx/include/__random/gamma_distribution.h
+++ b/libcxx/include/__random/gamma_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_GAMMA_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_GAMMA_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_GAMMA_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_GAMMA_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/exponential_distribution.h>
@@ -17,42 +17,42 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS gamma_distribution
+class _LIBCUDACXX_TEMPLATE_VIS gamma_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __alpha_;
         result_type __beta_;
     public:
         typedef gamma_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __alpha = 1, result_type __beta = 1)
             : __alpha_(__alpha), __beta_(__beta) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type alpha() const {return __alpha_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type beta() const {return __beta_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__alpha_ == __y.__alpha_ && __x.__beta_ == __y.__beta_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -62,52 +62,52 @@ class _LIBCPP_TEMPLATE_VIS gamma_distribution
 
 public:
     // constructors and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     gamma_distribution() : gamma_distribution(1) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit gamma_distribution(result_type __alpha, result_type __beta = 1)
         : __p_(param_type(__alpha, __beta)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit gamma_distribution(result_type __alpha = 1,
                                 result_type __beta = 1)
         : __p_(param_type(__alpha, __beta)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit gamma_distribution(const param_type& __p)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type alpha() const {return __p_.alpha();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type beta() const {return __p_.beta();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::infinity();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const gamma_distribution& __x,
                         const gamma_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const gamma_distribution& __x,
                         const gamma_distribution& __y)
         {return !(__x == __y);}
@@ -118,7 +118,7 @@ template<class _URNG>
 _RealType
 gamma_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     result_type __a = __p.alpha();
     uniform_real_distribution<result_type> __gen(0, 1);
     exponential_distribution<result_type> __egen;
@@ -136,7 +136,7 @@ gamma_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
             const result_type __w = __u * (1 - __u);
             if (__w != 0)
             {
-                const result_type __y = _VSTD::sqrt(__c / __w) *
+                const result_type __y = _CUDA_VSTD::sqrt(__c / __w) *
                                         (__u - result_type(0.5));
                 __x = __b + __y;
                 if (__x >= 0)
@@ -144,7 +144,7 @@ gamma_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
                     const result_type __z = 64 * __w * __w * __w * __v * __v;
                     if (__z <= 1 - 2 * __y * __y / __x)
                         break;
-                    if (_VSTD::log(__z) <= 2 * (__b * _VSTD::log(__x / __b) - __y))
+                    if (_CUDA_VSTD::log(__z) <= 2 * (__b * _CUDA_VSTD::log(__x / __b) - __y))
                         break;
                 }
             }
@@ -158,14 +158,14 @@ gamma_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
             const result_type __es = __egen(__g);
             if (__u <= 1 - __a)
             {
-                __x = _VSTD::pow(__u, 1 / __a);
+                __x = _CUDA_VSTD::pow(__u, 1 / __a);
                 if (__x <= __es)
                     break;
             }
             else
             {
-                const result_type __e = -_VSTD::log((1-__u)/__a);
-                __x = _VSTD::pow(1 - __a + __a * __e, 1 / __a);
+                const result_type __e = -_CUDA_VSTD::log((1-__u)/__a);
+                __x = _CUDA_VSTD::pow(1 - __a + __a * __e, 1 / __a);
                 if (__x <= __e + __es)
                     break;
             }
@@ -208,8 +208,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_GAMMA_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_GAMMA_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/generate_canonical.h b/libcxx/include/__random/generate_canonical.h
index 84efa7803c94..5f44b2c27069 100644
--- a/libcxx/include/__random/generate_canonical.h
+++ b/libcxx/include/__random/generate_canonical.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_GENERATE_CANONICAL_H
-#define _LIBCPP___RANDOM_GENERATE_CANONICAL_H
+#ifndef _LIBCUDACXX___RANDOM_GENERATE_CANONICAL_H
+#define _LIBCUDACXX___RANDOM_GENERATE_CANONICAL_H
 
 #include <__config>
 #include <__random/log2.h>
@@ -15,14 +15,14 @@
 #include <initializer_list>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // generate_canonical
 
@@ -32,7 +32,7 @@ generate_canonical(_URNG& __g)
 {
     const size_t _Dt = numeric_limits<_RealType>::digits;
     const size_t __b = _Dt < __bits ? _Dt : __bits;
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
     const size_t __logR = __log2<uint64_t, _URNG::_Max - _URNG::_Min + uint64_t(1)>::value;
 #else
     const size_t __logR = __log2<uint64_t, _URNG::max() - _URNG::min() + uint64_t(1)>::value;
@@ -46,8 +46,8 @@ generate_canonical(_URNG& __g)
     return _Sp / __base;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_GENERATE_CANONICAL_H
+#endif // _LIBCUDACXX___RANDOM_GENERATE_CANONICAL_H

diff  --git a/libcxx/include/__random/geometric_distribution.h b/libcxx/include/__random/geometric_distribution.h
index 751cf7860e66..3dc936b841aa 100644
--- a/libcxx/include/__random/geometric_distribution.h
+++ b/libcxx/include/__random/geometric_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_GEOMETRIC_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_GEOMETRIC_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_GEOMETRIC_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_GEOMETRIC_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/is_valid.h>
@@ -15,39 +15,39 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _IntType = int>
-class _LIBCPP_TEMPLATE_VIS geometric_distribution
+class _LIBCUDACXX_TEMPLATE_VIS geometric_distribution
 {
-    static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
+    static_assert(__LIBCUDACXX_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
 public:
     // types
     typedef _IntType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         double __p_;
     public:
         typedef geometric_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(double __p = 0.5) : __p_(__p) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         double p() const {return __p_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__p_ == __y.__p_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -57,51 +57,51 @@ class _LIBCPP_TEMPLATE_VIS geometric_distribution
 
 public:
     // constructors and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     geometric_distribution() : geometric_distribution(0.5) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit geometric_distribution(double __p)
         : __p_(__p) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit geometric_distribution(double __p = 0.5)
         : __p_(__p) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit geometric_distribution(const param_type& __p) : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g, const param_type& __p)
         {return negative_binomial_distribution<result_type>(1, __p.p())(__g);}
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     double p() const {return __p_.p();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::max();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const geometric_distribution& __x,
                         const geometric_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const geometric_distribution& __x,
                         const geometric_distribution& __y)
         {return !(__x == __y);}
@@ -136,8 +136,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_GEOMETRIC_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_GEOMETRIC_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/independent_bits_engine.h b/libcxx/include/__random/independent_bits_engine.h
index e80d6eec49cb..e9224b1cbf79 100644
--- a/libcxx/include/__random/independent_bits_engine.h
+++ b/libcxx/include/__random/independent_bits_engine.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_INDEPENDENT_BITS_ENGINE_H
-#define _LIBCPP___RANDOM_INDEPENDENT_BITS_ENGINE_H
+#ifndef _LIBCUDACXX___RANDOM_INDEPENDENT_BITS_ENGINE_H
+#define _LIBCUDACXX___RANDOM_INDEPENDENT_BITS_ENGINE_H
 
 #include <__config>
 #include <__random/is_seed_sequence.h>
@@ -17,27 +17,27 @@
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _Engine, size_t __w, class _UIntType>
-class _LIBCPP_TEMPLATE_VIS independent_bits_engine
+class _LIBCUDACXX_TEMPLATE_VIS independent_bits_engine
 {
     template <class _UInt, _UInt _R0, size_t _Wp, size_t _Mp>
     class __get_n
     {
-        static _LIBCPP_CONSTEXPR const size_t _Dt = numeric_limits<_UInt>::digits;
-        static _LIBCPP_CONSTEXPR const size_t _Np = _Wp / _Mp + (_Wp % _Mp != 0);
-        static _LIBCPP_CONSTEXPR const size_t _W0 = _Wp / _Np;
-        static _LIBCPP_CONSTEXPR const _UInt _Y0 = _W0 >= _Dt ? 0 : (_R0 >> _W0) << _W0;
+        static _LIBCUDACXX_CONSTEXPR const size_t _Dt = numeric_limits<_UInt>::digits;
+        static _LIBCUDACXX_CONSTEXPR const size_t _Np = _Wp / _Mp + (_Wp % _Mp != 0);
+        static _LIBCUDACXX_CONSTEXPR const size_t _W0 = _Wp / _Np;
+        static _LIBCUDACXX_CONSTEXPR const _UInt _Y0 = _W0 >= _Dt ? 0 : (_R0 >> _W0) << _W0;
     public:
-        static _LIBCPP_CONSTEXPR const size_t value = _R0 - _Y0 > _Y0 / _Np ? _Np + 1 : _Np;
+        static _LIBCUDACXX_CONSTEXPR const size_t value = _R0 - _Y0 > _Y0 / _Np ? _Np + 1 : _Np;
     };
 public:
     // types
@@ -46,7 +46,7 @@ class _LIBCPP_TEMPLATE_VIS independent_bits_engine
 private:
     _Engine __e_;
 
-    static _LIBCPP_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
+    static _LIBCUDACXX_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
     static_assert(  0 <  __w, "independent_bits_engine invalid parameters");
     static_assert(__w <= _Dt, "independent_bits_engine invalid parameters");
 
@@ -57,66 +57,66 @@ class _LIBCPP_TEMPLATE_VIS independent_bits_engine
                 result_type,
                 _Engine_result_type
         >::type _Working_result_type;
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
     static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min
                                           + _Working_result_type(1);
 #else
-    static _LIBCPP_CONSTEXPR const _Working_result_type _Rp = _Engine::max() - _Engine::min()
+    static _LIBCUDACXX_CONSTEXPR const _Working_result_type _Rp = _Engine::max() - _Engine::min()
                                                             + _Working_result_type(1);
 #endif
-    static _LIBCPP_CONSTEXPR const size_t __m = __log2<_Working_result_type, _Rp>::value;
-    static _LIBCPP_CONSTEXPR const size_t __n = __get_n<_Working_result_type, _Rp, __w, __m>::value;
-    static _LIBCPP_CONSTEXPR const size_t __w0 = __w / __n;
-    static _LIBCPP_CONSTEXPR const size_t __n0 = __n - __w % __n;
-    static _LIBCPP_CONSTEXPR const size_t _WDt = numeric_limits<_Working_result_type>::digits;
-    static _LIBCPP_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
-    static _LIBCPP_CONSTEXPR const _Working_result_type __y0 = __w0 >= _WDt ? 0 :
+    static _LIBCUDACXX_CONSTEXPR const size_t __m = __log2<_Working_result_type, _Rp>::value;
+    static _LIBCUDACXX_CONSTEXPR const size_t __n = __get_n<_Working_result_type, _Rp, __w, __m>::value;
+    static _LIBCUDACXX_CONSTEXPR const size_t __w0 = __w / __n;
+    static _LIBCUDACXX_CONSTEXPR const size_t __n0 = __n - __w % __n;
+    static _LIBCUDACXX_CONSTEXPR const size_t _WDt = numeric_limits<_Working_result_type>::digits;
+    static _LIBCUDACXX_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
+    static _LIBCUDACXX_CONSTEXPR const _Working_result_type __y0 = __w0 >= _WDt ? 0 :
                                                                (_Rp >> __w0) << __w0;
-    static _LIBCPP_CONSTEXPR const _Working_result_type __y1 = __w0 >= _WDt - 1 ? 0 :
+    static _LIBCUDACXX_CONSTEXPR const _Working_result_type __y1 = __w0 >= _WDt - 1 ? 0 :
                                                                (_Rp >> (__w0+1)) << (__w0+1);
-    static _LIBCPP_CONSTEXPR const _Engine_result_type __mask0 = __w0 > 0 ?
+    static _LIBCUDACXX_CONSTEXPR const _Engine_result_type __mask0 = __w0 > 0 ?
                                 _Engine_result_type(~0) >> (_EDt - __w0) :
                                 _Engine_result_type(0);
-    static _LIBCPP_CONSTEXPR const _Engine_result_type __mask1 = __w0 < _EDt - 1 ?
+    static _LIBCUDACXX_CONSTEXPR const _Engine_result_type __mask1 = __w0 < _EDt - 1 ?
                                 _Engine_result_type(~0) >> (_EDt - (__w0 + 1)) :
                                 _Engine_result_type(~0);
 public:
-    static _LIBCPP_CONSTEXPR const result_type _Min = 0;
-    static _LIBCPP_CONSTEXPR const result_type _Max = __w == _Dt ? result_type(~0) :
+    static _LIBCUDACXX_CONSTEXPR const result_type _Min = 0;
+    static _LIBCUDACXX_CONSTEXPR const result_type _Max = __w == _Dt ? result_type(~0) :
                                                       (result_type(1) << __w) - result_type(1);
     static_assert(_Min < _Max, "independent_bits_engine invalid parameters");
 
     // engine characteristics
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type min() { return _Min; }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type max() { return _Max; }
 
     // constructors and seeding functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     independent_bits_engine() {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit independent_bits_engine(const _Engine& __e)
         : __e_(__e) {}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit independent_bits_engine(_Engine&& __e)
-        : __e_(_VSTD::move(__e)) {}
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+        : __e_(_CUDA_VSTD::move(__e)) {}
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit independent_bits_engine(result_type __sd) : __e_(__sd) {}
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit independent_bits_engine(_Sseq& __q,
         typename enable_if<__is_seed_sequence<_Sseq, independent_bits_engine>::value &&
                            !is_convertible<_Sseq, _Engine>::value>::type* = 0)
          : __e_(__q) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed() {__e_.seed();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed(result_type __sd) {__e_.seed(__sd);}
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if
         <
             __is_seed_sequence<_Sseq, independent_bits_engine>::value,
@@ -125,13 +125,13 @@ class _LIBCPP_TEMPLATE_VIS independent_bits_engine
         seed(_Sseq& __q) {__e_.seed(__q);}
 
     // generating functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type operator()() {return __eval(integral_constant<bool, _Rp != 0>());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void discard(unsigned long long __z) {for (; __z; --__z) operator()();}
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Engine& base() const _NOEXCEPT {return __e_;}
 
     template<class _Eng, size_t _Wp, class _UInt>
@@ -163,12 +163,12 @@ class _LIBCPP_TEMPLATE_VIS independent_bits_engine
                independent_bits_engine<_Eng, _Wp, _UInt>& __x);
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type __eval(false_type);
     result_type __eval(true_type);
 
     template <size_t __count>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         static
         typename enable_if
         <
@@ -178,7 +178,7 @@ class _LIBCPP_TEMPLATE_VIS independent_bits_engine
         __lshift(result_type __x) {return __x << __count;}
 
     template <size_t __count>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         static
         typename enable_if
         <
@@ -223,7 +223,7 @@ independent_bits_engine<_Engine, __w, _UIntType>::__eval(true_type)
 }
 
 template<class _Eng, size_t _Wp, class _UInt>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(
     const independent_bits_engine<_Eng, _Wp, _UInt>& __x,
@@ -233,7 +233,7 @@ operator==(
 }
 
 template<class _Eng, size_t _Wp, class _UInt>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(
     const independent_bits_engine<_Eng, _Wp, _UInt>& __x,
@@ -264,8 +264,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_INDEPENDENT_BITS_ENGINE_H
+#endif // _LIBCUDACXX___RANDOM_INDEPENDENT_BITS_ENGINE_H

diff  --git a/libcxx/include/__random/is_seed_sequence.h b/libcxx/include/__random/is_seed_sequence.h
index a6832f51c1ee..96216247e84b 100644
--- a/libcxx/include/__random/is_seed_sequence.h
+++ b/libcxx/include/__random/is_seed_sequence.h
@@ -6,26 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_IS_SEED_SEQUENCE_H
-#define _LIBCPP___RANDOM_IS_SEED_SEQUENCE_H
+#ifndef _LIBCUDACXX___RANDOM_IS_SEED_SEQUENCE_H
+#define _LIBCUDACXX___RANDOM_IS_SEED_SEQUENCE_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Sseq, class _Engine>
 struct __is_seed_sequence
 {
-    static _LIBCPP_CONSTEXPR const bool value =
+    static _LIBCUDACXX_CONSTEXPR const bool value =
               !is_convertible<_Sseq, typename _Engine::result_type>::value &&
               !is_same<typename remove_cv<_Sseq>::type, _Engine>::value;
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANDOM_IS_SEED_SEQUENCE_H
+#endif // _LIBCUDACXX___RANDOM_IS_SEED_SEQUENCE_H

diff  --git a/libcxx/include/__random/is_valid.h b/libcxx/include/__random/is_valid.h
index be3b61b8dc01..e365f7c71cf9 100644
--- a/libcxx/include/__random/is_valid.h
+++ b/libcxx/include/__random/is_valid.h
@@ -6,18 +6,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_IS_VALID_H
-#define _LIBCPP___RANDOM_IS_VALID_H
+#ifndef _LIBCUDACXX___RANDOM_IS_VALID_H
+#define _LIBCUDACXX___RANDOM_IS_VALID_H
 
 #include <__config>
 #include <cstdint>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // [rand.req.genl]/1.5:
 // The effect of instantiating a template that has a template type parameter
@@ -25,22 +25,22 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 // cv-unqualified and is one of short, int, long, long long, unsigned short,
 // unsigned int, unsigned long, or unsigned long long.
 
-template<class> struct __libcpp_random_is_valid_inttype : false_type {};
-template<> struct __libcpp_random_is_valid_inttype<int8_t> : true_type {}; // extension
-template<> struct __libcpp_random_is_valid_inttype<short> : true_type {};
-template<> struct __libcpp_random_is_valid_inttype<int> : true_type {};
-template<> struct __libcpp_random_is_valid_inttype<long> : true_type {};
-template<> struct __libcpp_random_is_valid_inttype<long long> : true_type {};
-template<> struct __libcpp_random_is_valid_inttype<uint8_t> : true_type {}; // extension
-template<> struct __libcpp_random_is_valid_inttype<unsigned short> : true_type {};
-template<> struct __libcpp_random_is_valid_inttype<unsigned int> : true_type {};
-template<> struct __libcpp_random_is_valid_inttype<unsigned long> : true_type {};
-template<> struct __libcpp_random_is_valid_inttype<unsigned long long> : true_type {};
-
-#ifndef _LIBCPP_HAS_NO_INT128
-template<> struct __libcpp_random_is_valid_inttype<__int128_t> : true_type {}; // extension
-template<> struct __libcpp_random_is_valid_inttype<__uint128_t> : true_type {}; // extension
-#endif // _LIBCPP_HAS_NO_INT128
+template<class> struct __LIBCUDACXX_random_is_valid_inttype : false_type {};
+template<> struct __LIBCUDACXX_random_is_valid_inttype<int8_t> : true_type {}; // extension
+template<> struct __LIBCUDACXX_random_is_valid_inttype<short> : true_type {};
+template<> struct __LIBCUDACXX_random_is_valid_inttype<int> : true_type {};
+template<> struct __LIBCUDACXX_random_is_valid_inttype<long> : true_type {};
+template<> struct __LIBCUDACXX_random_is_valid_inttype<long long> : true_type {};
+template<> struct __LIBCUDACXX_random_is_valid_inttype<uint8_t> : true_type {}; // extension
+template<> struct __LIBCUDACXX_random_is_valid_inttype<unsigned short> : true_type {};
+template<> struct __LIBCUDACXX_random_is_valid_inttype<unsigned int> : true_type {};
+template<> struct __LIBCUDACXX_random_is_valid_inttype<unsigned long> : true_type {};
+template<> struct __LIBCUDACXX_random_is_valid_inttype<unsigned long long> : true_type {};
+
+#ifndef _LIBCUDACXX_HAS_NO_INT128
+template<> struct __LIBCUDACXX_random_is_valid_inttype<__int128_t> : true_type {}; // extension
+template<> struct __LIBCUDACXX_random_is_valid_inttype<__uint128_t> : true_type {}; // extension
+#endif // _LIBCUDACXX_HAS_NO_INT128
 
 // [rand.req.urng]/3:
 // A class G meets the uniform random bit generator requirements if G models
@@ -50,12 +50,12 @@ template<> struct __libcpp_random_is_valid_inttype<__uint128_t> : true_type {};
 // (In particular, reject URNGs with signed result_types; our distributions cannot
 // handle such generator types.)
 
-template<class, class = void> struct __libcpp_random_is_valid_urng : false_type {};
-template<class _Gp> struct __libcpp_random_is_valid_urng<_Gp, __enable_if_t<
+template<class, class = void> struct __LIBCUDACXX_random_is_valid_urng : false_type {};
+template<class _Gp> struct __LIBCUDACXX_random_is_valid_urng<_Gp, __enable_if_t<
     is_unsigned<typename _Gp::result_type>::value &&
     _IsSame<decltype(declval<_Gp&>()()), typename _Gp::result_type>::value
 > > : true_type {};
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANDOM_IS_VALID_H
+#endif // _LIBCUDACXX___RANDOM_IS_VALID_H

diff  --git a/libcxx/include/__random/knuth_b.h b/libcxx/include/__random/knuth_b.h
index f5b31cb64fa4..63217b0fc881 100644
--- a/libcxx/include/__random/knuth_b.h
+++ b/libcxx/include/__random/knuth_b.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_KNUTH_B_H
-#define _LIBCPP___RANDOM_KNUTH_B_H
+#ifndef _LIBCUDACXX___RANDOM_KNUTH_B_H
+#define _LIBCUDACXX___RANDOM_KNUTH_B_H
 
 #include <__config>
 #include <__random/linear_congruential_engine.h>
 #include <__random/shuffle_order_engine.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 typedef shuffle_order_engine<minstd_rand0, 256> knuth_b;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANDOM_KNUTH_B_H
+#endif // _LIBCUDACXX___RANDOM_KNUTH_B_H

diff  --git a/libcxx/include/__random/linear_congruential_engine.h b/libcxx/include/__random/linear_congruential_engine.h
index 42b40813e0ac..9fe9e0f96cc3 100644
--- a/libcxx/include/__random/linear_congruential_engine.h
+++ b/libcxx/include/__random/linear_congruential_engine.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_LINEAR_CONGRUENTIAL_ENGINE_H
-#define _LIBCPP___RANDOM_LINEAR_CONGRUENTIAL_ENGINE_H
+#ifndef _LIBCUDACXX___RANDOM_LINEAR_CONGRUENTIAL_ENGINE_H
+#define _LIBCUDACXX___RANDOM_LINEAR_CONGRUENTIAL_ENGINE_H
 
 #include <__config>
 #include <__random/is_seed_sequence.h>
@@ -15,14 +15,14 @@
 #include <iosfwd>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <unsigned long long __a, unsigned long long __c,
           unsigned long long __m, unsigned long long _Mp,
@@ -35,7 +35,7 @@ struct __lce_alg_picker
                   "The current values of a, c, and m cannot generate a number "
                   "within bounds of linear_congruential_engine.");
 
-    static _LIBCPP_CONSTEXPR const bool __use_schrage = _MightOverflow &&
+    static _LIBCUDACXX_CONSTEXPR const bool __use_schrage = _MightOverflow &&
                                                         !_OverflowOK &&
                                                         _SchrageOK;
 };
@@ -51,7 +51,7 @@ template <unsigned long long __a, unsigned long long __c, unsigned long long __m
 struct __lce_ta<__a, __c, __m, (unsigned long long)(~0), true>
 {
     typedef unsigned long long result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static result_type next(result_type __x)
     {
         // Schrage's algorithm
@@ -69,7 +69,7 @@ template <unsigned long long __a, unsigned long long __m>
 struct __lce_ta<__a, 0, __m, (unsigned long long)(~0), true>
 {
     typedef unsigned long long result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static result_type next(result_type __x)
     {
         // Schrage's algorithm
@@ -86,7 +86,7 @@ template <unsigned long long __a, unsigned long long __c, unsigned long long __m
 struct __lce_ta<__a, __c, __m, (unsigned long long)(~0), false>
 {
     typedef unsigned long long result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static result_type next(result_type __x)
     {
         return (__a * __x + __c) % __m;
@@ -97,7 +97,7 @@ template <unsigned long long __a, unsigned long long __c>
 struct __lce_ta<__a, __c, 0, (unsigned long long)(~0), false>
 {
     typedef unsigned long long result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static result_type next(result_type __x)
     {
         return __a * __x + __c;
@@ -110,7 +110,7 @@ template <unsigned long long _Ap, unsigned long long _Cp, unsigned long long _Mp
 struct __lce_ta<_Ap, _Cp, _Mp, unsigned(~0), true>
 {
     typedef unsigned result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static result_type next(result_type __x)
     {
         const result_type __a = static_cast<result_type>(_Ap);
@@ -131,7 +131,7 @@ template <unsigned long long _Ap, unsigned long long _Mp>
 struct __lce_ta<_Ap, 0, _Mp, unsigned(~0), true>
 {
     typedef unsigned result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static result_type next(result_type __x)
     {
         const result_type __a = static_cast<result_type>(_Ap);
@@ -150,7 +150,7 @@ template <unsigned long long _Ap, unsigned long long _Cp, unsigned long long _Mp
 struct __lce_ta<_Ap, _Cp, _Mp, unsigned(~0), false>
 {
     typedef unsigned result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static result_type next(result_type __x)
     {
         const result_type __a = static_cast<result_type>(_Ap);
@@ -164,7 +164,7 @@ template <unsigned long long _Ap, unsigned long long _Cp>
 struct __lce_ta<_Ap, _Cp, 0, unsigned(~0), false>
 {
     typedef unsigned result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static result_type next(result_type __x)
     {
         const result_type __a = static_cast<result_type>(_Ap);
@@ -179,7 +179,7 @@ template <unsigned long long __a, unsigned long long __c, unsigned long long __m
 struct __lce_ta<__a, __c, __m, (unsigned short)(~0), __b>
 {
     typedef unsigned short result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static result_type next(result_type __x)
     {
         return static_cast<result_type>(__lce_ta<__a, __c, __m, unsigned(~0)>::next(__x));
@@ -187,11 +187,11 @@ struct __lce_ta<__a, __c, __m, (unsigned short)(~0), __b>
 };
 
 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-class _LIBCPP_TEMPLATE_VIS linear_congruential_engine;
+class _LIBCUDACXX_TEMPLATE_VIS linear_congruential_engine;
 
 template <class _CharT, class _Traits,
           class _Up, _Up _Ap, _Up _Cp, _Up _Np>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const linear_congruential_engine<_Up, _Ap, _Cp, _Np>&);
@@ -203,7 +203,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
            linear_congruential_engine<_Up, _Ap, _Cp, _Np>& __x);
 
 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-class _LIBCPP_TEMPLATE_VIS linear_congruential_engine
+class _LIBCUDACXX_TEMPLATE_VIS linear_congruential_engine
 {
 public:
     // types
@@ -212,49 +212,49 @@ class _LIBCPP_TEMPLATE_VIS linear_congruential_engine
 private:
     result_type __x_;
 
-    static _LIBCPP_CONSTEXPR const result_type _Mp = result_type(~0);
+    static _LIBCUDACXX_CONSTEXPR const result_type _Mp = result_type(~0);
 
     static_assert(__m == 0 || __a < __m, "linear_congruential_engine invalid parameters");
     static_assert(__m == 0 || __c < __m, "linear_congruential_engine invalid parameters");
     static_assert(is_unsigned<_UIntType>::value, "_UIntType must be unsigned type");
 public:
-    static _LIBCPP_CONSTEXPR const result_type _Min = __c == 0u ? 1u : 0u;
-    static _LIBCPP_CONSTEXPR const result_type _Max = __m - _UIntType(1u);
+    static _LIBCUDACXX_CONSTEXPR const result_type _Min = __c == 0u ? 1u : 0u;
+    static _LIBCUDACXX_CONSTEXPR const result_type _Max = __m - _UIntType(1u);
     static_assert(_Min < _Max,           "linear_congruential_engine invalid parameters");
 
     // engine characteristics
-    static _LIBCPP_CONSTEXPR const result_type multiplier = __a;
-    static _LIBCPP_CONSTEXPR const result_type increment = __c;
-    static _LIBCPP_CONSTEXPR const result_type modulus = __m;
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type min() {return _Min;}
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type max() {return _Max;}
-    static _LIBCPP_CONSTEXPR const result_type default_seed = 1u;
+    static _LIBCUDACXX_CONSTEXPR const result_type multiplier = __a;
+    static _LIBCUDACXX_CONSTEXPR const result_type increment = __c;
+    static _LIBCUDACXX_CONSTEXPR const result_type modulus = __m;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type min() {return _Min;}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type max() {return _Max;}
+    static _LIBCUDACXX_CONSTEXPR const result_type default_seed = 1u;
 
     // constructors and seeding functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     linear_congruential_engine() : linear_congruential_engine(default_seed) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit linear_congruential_engine(result_type __s) { seed(__s); }
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit linear_congruential_engine(result_type __s = default_seed) {
       seed(__s);
     }
 #endif
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit linear_congruential_engine(_Sseq& __q,
         typename enable_if<__is_seed_sequence<_Sseq, linear_congruential_engine>::value>::type* = 0)
         {seed(__q);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed(result_type __s = default_seed)
         {seed(integral_constant<bool, __m == 0>(),
               integral_constant<bool, __c == 0>(), __s);}
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if
         <
             __is_seed_sequence<_Sseq, linear_congruential_engine>::value,
@@ -266,31 +266,31 @@ class _LIBCPP_TEMPLATE_VIS linear_congruential_engine
                              :  (__m > 0x100000000ull))>());}
 
     // generating functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type operator()()
         {return __x_ = static_cast<result_type>(__lce_ta<__a, __c, __m, _Mp>::next(__x_));}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void discard(unsigned long long __z) {for (; __z; --__z) operator()();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const linear_congruential_engine& __x,
                     const linear_congruential_engine& __y)
         {return __x.__x_ == __y.__x_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const linear_congruential_engine& __x,
                     const linear_congruential_engine& __y)
         {return !(__x == __y);}
 
 private:
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed(true_type, true_type, result_type __s) {__x_ = __s == 0 ? 1 : __s;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed(true_type, false_type, result_type __s) {__x_ = __s;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed(false_type, true_type, result_type __s) {__x_ = __s % __m == 0 ?
                                                                  1 : __s % __m;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed(false_type, false_type, result_type __s) {__x_ = __s % __m;}
 
     template<class _Sseq>
@@ -314,19 +314,19 @@ class _LIBCPP_TEMPLATE_VIS linear_congruential_engine
 };
 
 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-    _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+    _LIBCUDACXX_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
     linear_congruential_engine<_UIntType, __a, __c, __m>::multiplier;
 
 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-    _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+    _LIBCUDACXX_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
     linear_congruential_engine<_UIntType, __a, __c, __m>::increment;
 
 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-    _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+    _LIBCUDACXX_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
     linear_congruential_engine<_UIntType, __a, __c, __m>::modulus;
 
 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-    _LIBCPP_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
+    _LIBCUDACXX_CONSTEXPR const typename linear_congruential_engine<_UIntType, __a, __c, __m>::result_type
     linear_congruential_engine<_UIntType, __a, __c, __m>::default_seed;
 
 template <class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
@@ -358,7 +358,7 @@ linear_congruential_engine<_UIntType, __a, __c, __m>::__seed(_Sseq& __q,
 
 template <class _CharT, class _Traits,
           class _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const linear_congruential_engine<_UIntType, __a, __c, __m>& __x)
@@ -391,8 +391,8 @@ typedef linear_congruential_engine<uint_fast32_t, 16807, 0, 2147483647>
 typedef linear_congruential_engine<uint_fast32_t, 48271, 0, 2147483647>
                                                                     minstd_rand;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_LINEAR_CONGRUENTIAL_ENGINE_H
+#endif // _LIBCUDACXX___RANDOM_LINEAR_CONGRUENTIAL_ENGINE_H

diff  --git a/libcxx/include/__random/log2.h b/libcxx/include/__random/log2.h
index b077d211cefa..67d572656abd 100644
--- a/libcxx/include/__random/log2.h
+++ b/libcxx/include/__random/log2.h
@@ -6,18 +6,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_LOG2_H
-#define _LIBCPP___RANDOM_LOG2_H
+#ifndef _LIBCUDACXX___RANDOM_LOG2_H
+#define _LIBCUDACXX___RANDOM_LOG2_H
 
 #include <__config>
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _UIntType, _UIntType _Xp, size_t _Rp>
 struct __log2_imp;
@@ -41,7 +41,7 @@ struct __log2_imp<unsigned long long, 0, _Rp>
     static const size_t value = _Rp + 1;
 };
 
-#ifndef _LIBCPP_HAS_NO_INT128
+#ifndef _LIBCUDACXX_HAS_NO_INT128
 
 template <__uint128_t _Xp, size_t _Rp>
 struct __log2_imp<__uint128_t, _Xp, _Rp>
@@ -51,13 +51,13 @@ struct __log2_imp<__uint128_t, _Xp, _Rp>
         : __log2_imp<unsigned long long, _Xp, 63>::value;
 };
 
-#endif // _LIBCPP_HAS_NO_INT128
+#endif // _LIBCUDACXX_HAS_NO_INT128
 
 template <class _UIntType, _UIntType _Xp>
 struct __log2
 {
     static const size_t value = __log2_imp<
-#ifndef _LIBCPP_HAS_NO_INT128
+#ifndef _LIBCUDACXX_HAS_NO_INT128
         typename conditional<
                 sizeof(_UIntType) <= sizeof(unsigned long long),
                     unsigned long long,
@@ -65,10 +65,10 @@ struct __log2
             >::type,
 #else
         unsigned long long,
-#endif // _LIBCPP_HAS_NO_INT128
+#endif // _LIBCUDACXX_HAS_NO_INT128
         _Xp, sizeof(_UIntType) * __CHAR_BIT__ - 1>::value;
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANDOM_LOG2_H
+#endif // _LIBCUDACXX___RANDOM_LOG2_H

diff  --git a/libcxx/include/__random/lognormal_distribution.h b/libcxx/include/__random/lognormal_distribution.h
index 048d7dade9eb..e42f52796225 100644
--- a/libcxx/include/__random/lognormal_distribution.h
+++ b/libcxx/include/__random/lognormal_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_LOGNORMAL_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_LOGNORMAL_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_LOGNORMAL_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_LOGNORMAL_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/normal_distribution.h>
@@ -15,43 +15,43 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifdef _LIBCPP_ABI_OLD_LOGNORMAL_DISTRIBUTION
+#ifdef _LIBCUDACXX_ABI_OLD_LOGNORMAL_DISTRIBUTION
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS lognormal_distribution
+class _LIBCUDACXX_TEMPLATE_VIS lognormal_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         normal_distribution<result_type> __nd_;
     public:
         typedef lognormal_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __m = 0, result_type __s = 1)
             : __nd_(__m, __s) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type m() const {return __nd_.mean();}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type s() const {return __nd_.stddev();}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__nd_ == __y.__nd_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
         friend class lognormal_distribution;
@@ -74,55 +74,55 @@ class _LIBCPP_TEMPLATE_VIS lognormal_distribution
 
 public:
     // constructor and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     lognormal_distribution() : lognormal_distribution(0) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit lognormal_distribution(result_type __m, result_type __s = 1)
         : __p_(param_type(__m, __s)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit lognormal_distribution(result_type __m = 0,
                                     result_type __s = 1)
         : __p_(param_type(__m, __s)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit lognormal_distribution(const param_type& __p)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {__p_.__nd_.reset();}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g, const param_type& __p)
-        {return _VSTD::exp(const_cast<normal_distribution<result_type>&>(__p.__nd_)(__g));}
+        {return _CUDA_VSTD::exp(const_cast<normal_distribution<result_type>&>(__p.__nd_)(__g));}
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type m() const {return __p_.m();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type s() const {return __p_.s();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::infinity();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const lognormal_distribution& __x,
                         const lognormal_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const lognormal_distribution& __x,
                         const lognormal_distribution& __y)
         {return !(__x == __y);}
@@ -141,7 +141,7 @@ class _LIBCPP_TEMPLATE_VIS lognormal_distribution
 };
 
 template <class _CharT, class _Traits, class _RT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const lognormal_distribution<_RT>& __x)
@@ -150,7 +150,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
 }
 
 template <class _CharT, class _Traits, class _RT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<_CharT, _Traits>&
 operator>>(basic_istream<_CharT, _Traits>& __is,
            lognormal_distribution<_RT>& __x)
@@ -158,35 +158,35 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is >> __x.__p_.__nd_;
 }
 
-#else // _LIBCPP_ABI_OLD_LOGNORMAL_DISTRIBUTION
+#else // _LIBCUDACXX_ABI_OLD_LOGNORMAL_DISTRIBUTION
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS lognormal_distribution
+class _LIBCUDACXX_TEMPLATE_VIS lognormal_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __m_;
         result_type __s_;
     public:
         typedef lognormal_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __m = 0, result_type __s = 1)
             : __m_(__m), __s_(__s) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type m() const {return __m_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type s() const {return __s_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__m_ == __y.__m_ && __x.__s_ == __y.__s_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -196,65 +196,65 @@ class _LIBCPP_TEMPLATE_VIS lognormal_distribution
 
 public:
     // constructor and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     lognormal_distribution() : lognormal_distribution(0) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit lognormal_distribution(result_type __m, result_type __s = 1)
         : __nd_(__m, __s) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit lognormal_distribution(result_type __m = 0,
                                     result_type __s = 1)
         : __nd_(__m, __s) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit lognormal_distribution(const param_type& __p)
         : __nd_(__p.m(), __p.s()) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {__nd_.reset();}
 
     // generating functions
     template<class _URNG>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type operator()(_URNG& __g)
     {
-        return _VSTD::exp(__nd_(__g));
+        return _CUDA_VSTD::exp(__nd_(__g));
     }
 
     template<class _URNG>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type operator()(_URNG& __g, const param_type& __p)
     {
         typename normal_distribution<result_type>::param_type __pn(__p.m(), __p.s());
-        return _VSTD::exp(__nd_(__g, __pn));
+        return _CUDA_VSTD::exp(__nd_(__g, __pn));
     }
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type m() const {return __nd_.mean();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type s() const {return __nd_.stddev();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return param_type(__nd_.mean(), __nd_.stddev());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p)
     {
         typename normal_distribution<result_type>::param_type __pn(__p.m(), __p.s());
         __nd_.param(__pn);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::infinity();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const lognormal_distribution& __x,
                         const lognormal_distribution& __y)
         {return __x.__nd_ == __y.__nd_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const lognormal_distribution& __x,
                         const lognormal_distribution& __y)
         {return !(__x == __y);}
@@ -273,7 +273,7 @@ class _LIBCPP_TEMPLATE_VIS lognormal_distribution
 };
 
 template <class _CharT, class _Traits, class _RT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const lognormal_distribution<_RT>& __x)
@@ -282,7 +282,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
 }
 
 template <class _CharT, class _Traits, class _RT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<_CharT, _Traits>&
 operator>>(basic_istream<_CharT, _Traits>& __is,
            lognormal_distribution<_RT>& __x)
@@ -290,10 +290,10 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is >> __x.__nd_;
 }
 
-#endif // _LIBCPP_ABI_OLD_LOGNORMAL_DISTRIBUTION
+#endif // _LIBCUDACXX_ABI_OLD_LOGNORMAL_DISTRIBUTION
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_LOGNORMAL_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_LOGNORMAL_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/mersenne_twister_engine.h b/libcxx/include/__random/mersenne_twister_engine.h
index 8bceac05dce9..893d95968b8e 100644
--- a/libcxx/include/__random/mersenne_twister_engine.h
+++ b/libcxx/include/__random/mersenne_twister_engine.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_MERSENNE_TWISTER_ENGINE_H
-#define _LIBCPP___RANDOM_MERSENNE_TWISTER_ENGINE_H
+#ifndef _LIBCUDACXX___RANDOM_MERSENNE_TWISTER_ENGINE_H
+#define _LIBCUDACXX___RANDOM_MERSENNE_TWISTER_ENGINE_H
 
 #include <__algorithm/equal.h>
 #include <__algorithm/min.h>
@@ -19,19 +19,19 @@
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine;
+class _LIBCUDACXX_TEMPLATE_VIS mersenne_twister_engine;
 
 template <class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
           _UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
@@ -45,7 +45,7 @@ operator==(const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _D
 template <class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
           _UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
           _UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
                                          _Bp, _Tp, _Cp, _Lp, _Fp>& __x,
@@ -73,7 +73,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine
+class _LIBCUDACXX_TEMPLATE_VIS mersenne_twister_engine
 {
 public:
     // types
@@ -85,7 +85,7 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine
 
     static_assert(  0 <  __m, "mersenne_twister_engine invalid parameters");
     static_assert(__m <= __n, "mersenne_twister_engine invalid parameters");
-    static _LIBCPP_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
+    static _LIBCUDACXX_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
     static_assert(__w <= _Dt, "mersenne_twister_engine invalid parameters");
     static_assert(  2 <= __w, "mersenne_twister_engine invalid parameters");
     static_assert(__r <= __w, "mersenne_twister_engine invalid parameters");
@@ -94,8 +94,8 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine
     static_assert(__t <= __w, "mersenne_twister_engine invalid parameters");
     static_assert(__l <= __w, "mersenne_twister_engine invalid parameters");
 public:
-    static _LIBCPP_CONSTEXPR const result_type _Min = 0;
-    static _LIBCPP_CONSTEXPR const result_type _Max = __w == _Dt ? result_type(~0) :
+    static _LIBCUDACXX_CONSTEXPR const result_type _Min = 0;
+    static _LIBCUDACXX_CONSTEXPR const result_type _Max = __w == _Dt ? result_type(~0) :
                                                       (result_type(1) << __w) - result_type(1);
     static_assert(_Min < _Max, "mersenne_twister_engine invalid parameters");
     static_assert(__a <= _Max, "mersenne_twister_engine invalid parameters");
@@ -105,45 +105,45 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine
     static_assert(__f <= _Max, "mersenne_twister_engine invalid parameters");
 
     // engine characteristics
-    static _LIBCPP_CONSTEXPR const size_t word_size = __w;
-    static _LIBCPP_CONSTEXPR const size_t state_size = __n;
-    static _LIBCPP_CONSTEXPR const size_t shift_size = __m;
-    static _LIBCPP_CONSTEXPR const size_t mask_bits = __r;
-    static _LIBCPP_CONSTEXPR const result_type xor_mask = __a;
-    static _LIBCPP_CONSTEXPR const size_t tempering_u = __u;
-    static _LIBCPP_CONSTEXPR const result_type tempering_d = __d;
-    static _LIBCPP_CONSTEXPR const size_t tempering_s = __s;
-    static _LIBCPP_CONSTEXPR const result_type tempering_b = __b;
-    static _LIBCPP_CONSTEXPR const size_t tempering_t = __t;
-    static _LIBCPP_CONSTEXPR const result_type tempering_c = __c;
-    static _LIBCPP_CONSTEXPR const size_t tempering_l = __l;
-    static _LIBCPP_CONSTEXPR const result_type initialization_multiplier = __f;
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
-    static _LIBCPP_CONSTEXPR const result_type default_seed = 5489u;
+    static _LIBCUDACXX_CONSTEXPR const size_t word_size = __w;
+    static _LIBCUDACXX_CONSTEXPR const size_t state_size = __n;
+    static _LIBCUDACXX_CONSTEXPR const size_t shift_size = __m;
+    static _LIBCUDACXX_CONSTEXPR const size_t mask_bits = __r;
+    static _LIBCUDACXX_CONSTEXPR const result_type xor_mask = __a;
+    static _LIBCUDACXX_CONSTEXPR const size_t tempering_u = __u;
+    static _LIBCUDACXX_CONSTEXPR const result_type tempering_d = __d;
+    static _LIBCUDACXX_CONSTEXPR const size_t tempering_s = __s;
+    static _LIBCUDACXX_CONSTEXPR const result_type tempering_b = __b;
+    static _LIBCUDACXX_CONSTEXPR const size_t tempering_t = __t;
+    static _LIBCUDACXX_CONSTEXPR const result_type tempering_c = __c;
+    static _LIBCUDACXX_CONSTEXPR const size_t tempering_l = __l;
+    static _LIBCUDACXX_CONSTEXPR const result_type initialization_multiplier = __f;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type min() { return _Min; }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type max() { return _Max; }
+    static _LIBCUDACXX_CONSTEXPR const result_type default_seed = 5489u;
 
     // constructors and seeding functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     mersenne_twister_engine() : mersenne_twister_engine(default_seed) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit mersenne_twister_engine(result_type __sd) { seed(__sd); }
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit mersenne_twister_engine(result_type __sd = default_seed) {
       seed(__sd);
     }
 #endif
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit mersenne_twister_engine(_Sseq& __q,
         typename enable_if<__is_seed_sequence<_Sseq, mersenne_twister_engine>::value>::type* = 0)
         {seed(__q);}
     void seed(result_type __sd = default_seed);
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if
         <
             __is_seed_sequence<_Sseq, mersenne_twister_engine>::value,
@@ -154,7 +154,7 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine
 
     // generating functions
     result_type operator()();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void discard(unsigned long long __z) {for (; __z; --__z) operator()();}
 
     template <class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
@@ -204,7 +204,7 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine
         void __seed(_Sseq& __q, integral_constant<unsigned, 2>);
 
     template <size_t __count>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         static
         typename enable_if
         <
@@ -214,7 +214,7 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine
         __lshift(result_type __x) {return (__x << __count) & _Max;}
 
     template <size_t __count>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         static
         typename enable_if
         <
@@ -224,7 +224,7 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine
         __lshift(result_type) {return result_type(0);}
 
     template <size_t __count>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         static
         typename enable_if
         <
@@ -234,7 +234,7 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine
         __rshift(result_type __x) {return __x >> __count;}
 
     template <size_t __count>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         static
         typename enable_if
         <
@@ -247,85 +247,85 @@ class _LIBCPP_TEMPLATE_VIS mersenne_twister_engine
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const size_t
+    _LIBCUDACXX_CONSTEXPR const size_t
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::word_size;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const size_t
+    _LIBCUDACXX_CONSTEXPR const size_t
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::state_size;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const size_t
+    _LIBCUDACXX_CONSTEXPR const size_t
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::shift_size;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const size_t
+    _LIBCUDACXX_CONSTEXPR const size_t
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::mask_bits;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+    _LIBCUDACXX_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::xor_mask;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const size_t
+    _LIBCUDACXX_CONSTEXPR const size_t
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_u;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+    _LIBCUDACXX_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_d;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const size_t
+    _LIBCUDACXX_CONSTEXPR const size_t
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_s;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+    _LIBCUDACXX_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_b;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const size_t
+    _LIBCUDACXX_CONSTEXPR const size_t
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_t;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+    _LIBCUDACXX_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_c;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const size_t
+    _LIBCUDACXX_CONSTEXPR const size_t
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::tempering_l;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+    _LIBCUDACXX_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::initialization_multiplier;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
           _UIntType __a, size_t __u, _UIntType __d, size_t __s,
           _UIntType __b, size_t __t, _UIntType __c, size_t __l, _UIntType __f>
-    _LIBCPP_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
+    _LIBCUDACXX_CONSTEXPR const typename mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::result_type
     mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b, __t, __c, __l, __f>::default_seed;
 
 template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
@@ -334,7 +334,7 @@ template <class _UIntType, size_t __w, size_t __n, size_t __m, size_t __r,
 void
 mersenne_twister_engine<_UIntType, __w, __n, __m, __r, __a, __u, __d, __s, __b,
     __t, __c, __l, __f>::seed(result_type __sd)
-    _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+    _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
 {   // __w >= 2
     __x_[0] = __sd & _Max;
     for (size_t __i = 1; __i < __n; ++__i)
@@ -423,44 +423,44 @@ operator==(const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _D
                                          _Bp, _Tp, _Cp, _Lp, _Fp>& __y)
 {
     if (__x.__i_ == __y.__i_)
-        return _VSTD::equal(__x.__x_, __x.__x_ + _Np, __y.__x_);
+        return _CUDA_VSTD::equal(__x.__x_, __x.__x_ + _Np, __y.__x_);
     if (__x.__i_ == 0 || __y.__i_ == 0)
     {
-        size_t __j = _VSTD::min(_Np - __x.__i_, _Np - __y.__i_);
-        if (!_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j,
+        size_t __j = _CUDA_VSTD::min(_Np - __x.__i_, _Np - __y.__i_);
+        if (!_CUDA_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j,
                          __y.__x_ + __y.__i_))
             return false;
         if (__x.__i_ == 0)
-            return _VSTD::equal(__x.__x_ + __j, __x.__x_ + _Np, __y.__x_);
-        return _VSTD::equal(__x.__x_, __x.__x_ + (_Np - __j), __y.__x_ + __j);
+            return _CUDA_VSTD::equal(__x.__x_ + __j, __x.__x_ + _Np, __y.__x_);
+        return _CUDA_VSTD::equal(__x.__x_, __x.__x_ + (_Np - __j), __y.__x_ + __j);
     }
     if (__x.__i_ < __y.__i_)
     {
         size_t __j = _Np - __y.__i_;
-        if (!_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j),
+        if (!_CUDA_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j),
                          __y.__x_ + __y.__i_))
             return false;
-        if (!_VSTD::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Np,
+        if (!_CUDA_VSTD::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Np,
                          __y.__x_))
             return false;
-        return _VSTD::equal(__x.__x_, __x.__x_ + __x.__i_,
+        return _CUDA_VSTD::equal(__x.__x_, __x.__x_ + __x.__i_,
                            __y.__x_ + (_Np - (__x.__i_ + __j)));
     }
     size_t __j = _Np - __x.__i_;
-    if (!_VSTD::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j),
+    if (!_CUDA_VSTD::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j),
                      __x.__x_ + __x.__i_))
         return false;
-    if (!_VSTD::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Np,
+    if (!_CUDA_VSTD::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Np,
                      __x.__x_))
         return false;
-    return _VSTD::equal(__y.__x_, __y.__x_ + __y.__i_,
+    return _CUDA_VSTD::equal(__y.__x_, __y.__x_ + __y.__i_,
                        __x.__x_ + (_Np - (__y.__i_ + __j)));
 }
 
 template <class _UInt, size_t _Wp, size_t _Np, size_t _Mp, size_t _Rp,
           _UInt _Ap, size_t _Up, _UInt _Dp, size_t _Sp,
           _UInt _Bp, size_t _Tp, _UInt _Cp, size_t _Lp, _UInt _Fp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const mersenne_twister_engine<_UInt, _Wp, _Np, _Mp, _Rp, _Ap, _Up, _Dp, _Sp,
                                          _Bp, _Tp, _Cp, _Lp, _Fp>& __x,
@@ -527,8 +527,8 @@ typedef mersenne_twister_engine<uint_fast64_t, 64, 312, 156, 31,
                                 37, 0xfff7eee000000000ULL,
                                 43, 6364136223846793005ULL>          mt19937_64;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_MERSENNE_TWISTER_ENGINE_H
+#endif // _LIBCUDACXX___RANDOM_MERSENNE_TWISTER_ENGINE_H

diff  --git a/libcxx/include/__random/negative_binomial_distribution.h b/libcxx/include/__random/negative_binomial_distribution.h
index 90d3f0178914..b512b4cce4ac 100644
--- a/libcxx/include/__random/negative_binomial_distribution.h
+++ b/libcxx/include/__random/negative_binomial_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_NEGATIVE_BINOMIAL_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_NEGATIVE_BINOMIAL_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_NEGATIVE_BINOMIAL_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_NEGATIVE_BINOMIAL_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/bernoulli_distribution.h>
@@ -17,43 +17,43 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _IntType = int>
-class _LIBCPP_TEMPLATE_VIS negative_binomial_distribution
+class _LIBCUDACXX_TEMPLATE_VIS negative_binomial_distribution
 {
-    static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
+    static_assert(__LIBCUDACXX_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
 public:
     // types
     typedef _IntType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __k_;
         double __p_;
     public:
         typedef negative_binomial_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __k = 1, double __p = 0.5)
             : __k_(__k), __p_(__p) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type k() const {return __k_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         double p() const {return __p_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__k_ == __y.__k_ && __x.__p_ == __y.__p_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -63,51 +63,51 @@ class _LIBCPP_TEMPLATE_VIS negative_binomial_distribution
 
 public:
     // constructor and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     negative_binomial_distribution() : negative_binomial_distribution(1) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit negative_binomial_distribution(result_type __k, double __p = 0.5)
         : __p_(__k, __p) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit negative_binomial_distribution(result_type __k = 1,
                                             double __p = 0.5)
         : __p_(__k, __p) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit negative_binomial_distribution(const param_type& __p) : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type k() const {return __p_.k();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     double p() const {return __p_.p();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::max();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const negative_binomial_distribution& __x,
                         const negative_binomial_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const negative_binomial_distribution& __x,
                         const negative_binomial_distribution& __y)
         {return !(__x == __y);}
@@ -118,7 +118,7 @@ template<class _URNG>
 _IntType
 negative_binomial_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     result_type __k = __pr.k();
     double __p = __pr.p();
     // When the number of bits in _IntType is small, we are too likely to
@@ -135,7 +135,7 @@ negative_binomial_distribution<_IntType>::operator()(_URNG& __urng, const param_
             else
                 ++__f;
         }
-        _LIBCPP_ASSERT(__f >= 0, "std::negative_binomial_distribution should never produce negative values. "
+        _LIBCUDACXX_ASSERT(__f >= 0, "std::negative_binomial_distribution should never produce negative values. "
                                  "This is almost certainly a signed integer overflow issue on __f.");
         return __f;
     }
@@ -176,8 +176,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_NEGATIVE_BINOMIAL_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_NEGATIVE_BINOMIAL_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/normal_distribution.h b/libcxx/include/__random/normal_distribution.h
index 0431df927200..1e82b5ba70d0 100644
--- a/libcxx/include/__random/normal_distribution.h
+++ b/libcxx/include/__random/normal_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_NORMAL_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_NORMAL_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_NORMAL_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_NORMAL_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/is_valid.h>
@@ -16,42 +16,42 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS normal_distribution
+class _LIBCUDACXX_TEMPLATE_VIS normal_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __mean_;
         result_type __stddev_;
     public:
         typedef normal_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __mean = 0, result_type __stddev = 1)
             : __mean_(__mean), __stddev_(__stddev) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type mean() const {return __mean_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type stddev() const {return __stddev_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__mean_ == __y.__mean_ && __x.__stddev_ == __y.__stddev_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -63,53 +63,53 @@ class _LIBCPP_TEMPLATE_VIS normal_distribution
 
 public:
     // constructors and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     normal_distribution() : normal_distribution(0) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit normal_distribution(result_type __mean, result_type __stddev = 1)
         : __p_(param_type(__mean, __stddev)), _V_hot_(false) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit normal_distribution(result_type __mean = 0,
                                  result_type __stddev = 1)
         : __p_(param_type(__mean, __stddev)), _V_hot_(false) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit normal_distribution(const param_type& __p)
         : __p_(__p), _V_hot_(false) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {_V_hot_ = false;}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type mean() const {return __p_.mean();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type stddev() const {return __p_.stddev();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return -numeric_limits<result_type>::infinity();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::infinity();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const normal_distribution& __x,
                         const normal_distribution& __y)
         {return __x.__p_ == __y.__p_ && __x._V_hot_ == __y._V_hot_ &&
                 (!__x._V_hot_ || __x._V_ == __y._V_);}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const normal_distribution& __x,
                         const normal_distribution& __y)
         {return !(__x == __y);}
@@ -132,7 +132,7 @@ template<class _URNG>
 _RealType
 normal_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     result_type _Up;
     if (_V_hot_)
     {
@@ -151,7 +151,7 @@ normal_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
             __v = _Uni(__g);
             __s = __u * __u + __v * __v;
         } while (__s > 1 || __s == 0);
-        result_type _Fp = _VSTD::sqrt(-2 * _VSTD::log(__s) / __s);
+        result_type _Fp = _CUDA_VSTD::sqrt(-2 * _CUDA_VSTD::log(__s) / __s);
         _V_ = __v * _Fp;
         _V_hot_ = true;
         _Up = __u * _Fp;
@@ -203,8 +203,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_NORMAL_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_NORMAL_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/piecewise_constant_distribution.h b/libcxx/include/__random/piecewise_constant_distribution.h
index 9c9e14b16d6e..3dbc47136bc4 100644
--- a/libcxx/include/__random/piecewise_constant_distribution.h
+++ b/libcxx/include/__random/piecewise_constant_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_PIECEWISE_CONSTANT_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_PIECEWISE_CONSTANT_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_PIECEWISE_CONSTANT_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_PIECEWISE_CONSTANT_DISTRIBUTION_H
 
 #include <__algorithm/upper_bound.h>
 #include <__config>
@@ -17,23 +17,23 @@
 #include <numeric>
 #include <vector>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS piecewise_constant_distribution
+class _LIBCUDACXX_TEMPLATE_VIS piecewise_constant_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         vector<result_type> __b_;
         vector<result_type> __densities_;
@@ -45,25 +45,25 @@ class _LIBCPP_TEMPLATE_VIS piecewise_constant_distribution
         template<class _InputIteratorB, class _InputIteratorW>
             param_type(_InputIteratorB __f_b, _InputIteratorB __l_b,
                        _InputIteratorW __f_w);
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
         template<class _UnaryOperation>
             param_type(initializer_list<result_type> __bl, _UnaryOperation __fw);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
         template<class _UnaryOperation>
             param_type(size_t __nw, result_type __xmin, result_type __xmax,
                        _UnaryOperation __fw);
         param_type(param_type const&) = default;
         param_type & operator=(const param_type& __rhs);
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         vector<result_type> intervals() const {return __b_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         vector<result_type> densities() const {return __densities_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__densities_ == __y.__densities_ && __x.__b_ == __y.__b_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
 
@@ -90,64 +90,64 @@ class _LIBCPP_TEMPLATE_VIS piecewise_constant_distribution
 
 public:
     // constructor and reset functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     piecewise_constant_distribution() {}
     template<class _InputIteratorB, class _InputIteratorW>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         piecewise_constant_distribution(_InputIteratorB __f_b,
                                         _InputIteratorB __l_b,
                                         _InputIteratorW __f_w)
         : __p_(__f_b, __l_b, __f_w) {}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template<class _UnaryOperation>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         piecewise_constant_distribution(initializer_list<result_type> __bl,
                                         _UnaryOperation __fw)
         : __p_(__bl, __fw) {}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     template<class _UnaryOperation>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         piecewise_constant_distribution(size_t __nw, result_type __xmin,
                                         result_type __xmax, _UnaryOperation __fw)
         : __p_(__nw, __xmin, __xmax, __fw) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit piecewise_constant_distribution(const param_type& __p)
         : __p_(__p) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     vector<result_type> intervals() const {return __p_.intervals();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     vector<result_type> densities() const {return __p_.densities();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return __p_.__b_.front();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return __p_.__b_.back();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const piecewise_constant_distribution& __x,
                         const piecewise_constant_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const piecewise_constant_distribution& __x,
                            const piecewise_constant_distribution& __y)
         {return !(__x == __y);}
@@ -187,14 +187,14 @@ void
 piecewise_constant_distribution<_RealType>::param_type::__init()
 {
     // __densities_ contains non-normalized areas
-    result_type __total_area = _VSTD::accumulate(__densities_.begin(),
+    result_type __total_area = _CUDA_VSTD::accumulate(__densities_.begin(),
                                                 __densities_.end(),
                                                 result_type());
     for (size_t __i = 0; __i < __densities_.size(); ++__i)
         __densities_[__i] /= __total_area;
     // __densities_ contains normalized areas
     __areas_.assign(__densities_.size(), result_type());
-    _VSTD::partial_sum(__densities_.begin(), __densities_.end() - 1,
+    _CUDA_VSTD::partial_sum(__densities_.begin(), __densities_.end() - 1,
                                                           __areas_.begin() + 1);
     // __areas_ contains partial sums of normalized areas: [0, __densities_ - 1]
     __densities_.back() = 1 - __areas_.back();  // correct round off error
@@ -235,7 +235,7 @@ piecewise_constant_distribution<_RealType>::param_type::param_type(
     }
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template<class _RealType>
 template<class _UnaryOperation>
@@ -260,7 +260,7 @@ piecewise_constant_distribution<_RealType>::param_type::param_type(
     }
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template<class _RealType>
 template<class _UnaryOperation>
@@ -285,10 +285,10 @@ template<class _URNG>
 _RealType
 piecewise_constant_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     typedef uniform_real_distribution<result_type> _Gen;
     result_type __u = _Gen()(__g);
-    ptr
diff _t __k = _VSTD::upper_bound(__p.__areas_.begin(), __p.__areas_.end(),
+    ptr
diff _t __k = _CUDA_VSTD::upper_bound(__p.__areas_.begin(), __p.__areas_.end(),
                                       __u) - __p.__areas_.begin() - 1;
     return (__u - __p.__areas_[__k]) / __p.__densities_[__k] + __p.__b_[__k];
 }
@@ -351,8 +351,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_PIECEWISE_CONSTANT_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_PIECEWISE_CONSTANT_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/piecewise_linear_distribution.h b/libcxx/include/__random/piecewise_linear_distribution.h
index 05f00cef06ef..cd3ac2fdd5e3 100644
--- a/libcxx/include/__random/piecewise_linear_distribution.h
+++ b/libcxx/include/__random/piecewise_linear_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_PIECEWISE_LINEAR_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_PIECEWISE_LINEAR_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_PIECEWISE_LINEAR_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_PIECEWISE_LINEAR_DISTRIBUTION_H
 
 #include <__algorithm/upper_bound.h>
 #include <__config>
@@ -17,23 +17,23 @@
 #include <numeric>
 #include <vector>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS piecewise_linear_distribution
+class _LIBCUDACXX_TEMPLATE_VIS piecewise_linear_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         vector<result_type> __b_;
         vector<result_type> __densities_;
@@ -45,25 +45,25 @@ class _LIBCPP_TEMPLATE_VIS piecewise_linear_distribution
         template<class _InputIteratorB, class _InputIteratorW>
             param_type(_InputIteratorB __f_b, _InputIteratorB __l_b,
                        _InputIteratorW __f_w);
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
         template<class _UnaryOperation>
             param_type(initializer_list<result_type> __bl, _UnaryOperation __fw);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
         template<class _UnaryOperation>
             param_type(size_t __nw, result_type __xmin, result_type __xmax,
                        _UnaryOperation __fw);
         param_type(param_type const&) = default;
         param_type & operator=(const param_type& __rhs);
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         vector<result_type> intervals() const {return __b_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         vector<result_type> densities() const {return __densities_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__densities_ == __y.__densities_ && __x.__b_ == __y.__b_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
 
@@ -90,64 +90,64 @@ class _LIBCPP_TEMPLATE_VIS piecewise_linear_distribution
 
 public:
     // constructor and reset functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     piecewise_linear_distribution() {}
     template<class _InputIteratorB, class _InputIteratorW>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         piecewise_linear_distribution(_InputIteratorB __f_b,
                                       _InputIteratorB __l_b,
                                       _InputIteratorW __f_w)
         : __p_(__f_b, __l_b, __f_w) {}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template<class _UnaryOperation>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         piecewise_linear_distribution(initializer_list<result_type> __bl,
                                       _UnaryOperation __fw)
         : __p_(__bl, __fw) {}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     template<class _UnaryOperation>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         piecewise_linear_distribution(size_t __nw, result_type __xmin,
                                       result_type __xmax, _UnaryOperation __fw)
         : __p_(__nw, __xmin, __xmax, __fw) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit piecewise_linear_distribution(const param_type& __p)
         : __p_(__p) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     vector<result_type> intervals() const {return __p_.intervals();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     vector<result_type> densities() const {return __p_.densities();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return __p_.__b_.front();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return __p_.__b_.back();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const piecewise_linear_distribution& __x,
                         const piecewise_linear_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const piecewise_linear_distribution& __x,
                         const piecewise_linear_distribution& __y)
         {return !(__x == __y);}
@@ -239,7 +239,7 @@ piecewise_linear_distribution<_RealType>::param_type::param_type(
     }
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template<class _RealType>
 template<class _UnaryOperation>
@@ -264,7 +264,7 @@ piecewise_linear_distribution<_RealType>::param_type::param_type(
     }
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template<class _RealType>
 template<class _UnaryOperation>
@@ -290,10 +290,10 @@ template<class _URNG>
 _RealType
 piecewise_linear_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     typedef uniform_real_distribution<result_type> _Gen;
     result_type __u = _Gen()(__g);
-    ptr
diff _t __k = _VSTD::upper_bound(__p.__areas_.begin(), __p.__areas_.end(),
+    ptr
diff _t __k = _CUDA_VSTD::upper_bound(__p.__areas_.begin(), __p.__areas_.end(),
                                       __u) - __p.__areas_.begin() - 1;
     __u -= __p.__areas_[__k];
     const result_type __dk = __p.__densities_[__k];
@@ -305,7 +305,7 @@ piecewise_linear_distribution<_RealType>::operator()(_URNG& __g, const param_typ
     const result_type __bk1 = __p.__b_[__k+1];
     const result_type __deltab = __bk1 - __bk;
     return (__bk * __dk1 - __bk1 * __dk +
-        _VSTD::sqrt(__deltab * (__deltab * __dk * __dk + 2 * __deltad * __u))) /
+        _CUDA_VSTD::sqrt(__deltab * (__deltab * __dk * __dk + 2 * __deltad * __u))) /
         __deltad;
 }
 
@@ -367,8 +367,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_PIECEWISE_LINEAR_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_PIECEWISE_LINEAR_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/poisson_distribution.h b/libcxx/include/__random/poisson_distribution.h
index ef55b1be4844..f1d9364e4146 100644
--- a/libcxx/include/__random/poisson_distribution.h
+++ b/libcxx/include/__random/poisson_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_POISSON_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_POISSON_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_POISSON_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_POISSON_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/clamp_to_integral.h>
@@ -19,24 +19,24 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _IntType = int>
-class _LIBCPP_TEMPLATE_VIS poisson_distribution
+class _LIBCUDACXX_TEMPLATE_VIS poisson_distribution
 {
-    static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
+    static_assert(__LIBCUDACXX_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
 public:
     // types
     typedef _IntType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         double __mean_;
         double __s_;
@@ -54,13 +54,13 @@ class _LIBCPP_TEMPLATE_VIS poisson_distribution
 
         explicit param_type(double __mean = 1.0);
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         double mean() const {return __mean_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__mean_ == __y.__mean_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
 
@@ -72,48 +72,48 @@ class _LIBCPP_TEMPLATE_VIS poisson_distribution
 
 public:
     // constructors and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     poisson_distribution() : poisson_distribution(1.0) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit poisson_distribution(double __mean)
         : __p_(__mean) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit poisson_distribution(double __mean = 1.0)
         : __p_(__mean) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit poisson_distribution(const param_type& __p) : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     double mean() const {return __p_.mean();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::max();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const poisson_distribution& __x,
                         const poisson_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const poisson_distribution& __x,
                         const poisson_distribution& __y)
         {return !(__x == __y);}
@@ -130,7 +130,7 @@ poisson_distribution<_IntType>::param_type::param_type(double __mean)
     {
         __s_ = 0;
         __d_ = 0;
-        __l_ = _VSTD::exp(-__mean_);
+        __l_ = _CUDA_VSTD::exp(-__mean_);
         __omega_ = 0;
         __c3_ = 0;
         __c2_ = 0;
@@ -140,9 +140,9 @@ poisson_distribution<_IntType>::param_type::param_type(double __mean)
     }
     else
     {
-        __s_ = _VSTD::sqrt(__mean_);
+        __s_ = _CUDA_VSTD::sqrt(__mean_);
         __d_ = 6 * __mean_ * __mean_;
-        __l_ = _VSTD::trunc(__mean_ - 1.1484);
+        __l_ = _CUDA_VSTD::trunc(__mean_ - 1.1484);
         __omega_ = .3989423 / __s_;
         double __b1_ = .4166667E-1 / __mean_;
         double __b2_ = .3 * __b1_ * __b1_;
@@ -159,7 +159,7 @@ template<class _URNG>
 _IntType
 poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     double __tx;
     uniform_real_distribution<double> __urd;
     if (__pr.__mean_ < 10)
@@ -175,13 +175,13 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
         double __u;
         if (__g > 0)
         {
-            __tx = _VSTD::trunc(__g);
+            __tx = _CUDA_VSTD::trunc(__g);
             if (__tx >= __pr.__l_)
-                return _VSTD::__clamp_to_integral<result_type>(__tx);
+                return _CUDA_VSTD::__clamp_to_integral<result_type>(__tx);
             __difmuk = __pr.__mean_ - __tx;
             __u = __urd(__urng);
             if (__pr.__d_ * __u >= __difmuk * __difmuk * __difmuk)
-                return _VSTD::__clamp_to_integral<result_type>(__tx);
+                return _CUDA_VSTD::__clamp_to_integral<result_type>(__tx);
         }
         exponential_distribution<double> __edist;
         for (bool __using_exp_dist = false; true; __using_exp_dist = true)
@@ -197,7 +197,7 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
                     __u += __u - 1;
                     __t = 1.8 + (__u < 0 ? -__e : __e);
                 } while (__t <= -.6744);
-                __tx = _VSTD::trunc(__pr.__mean_ + __pr.__s_ * __t);
+                __tx = _CUDA_VSTD::trunc(__pr.__mean_ + __pr.__s_ * __t);
                 __difmuk = __pr.__mean_ - __tx;
                 __using_exp_dist = true;
             }
@@ -208,20 +208,20 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
                 const double __fac[] = {1, 1, 2, 6, 24, 120, 720, 5040,
                                              40320, 362880};
                 __px = -__pr.__mean_;
-                __py = _VSTD::pow(__pr.__mean_, (double)__tx) / __fac[static_cast<int>(__tx)];
+                __py = _CUDA_VSTD::pow(__pr.__mean_, (double)__tx) / __fac[static_cast<int>(__tx)];
             }
             else
             {
                 double __del = .8333333E-1 / __tx;
                 __del -= 4.8 * __del * __del * __del;
                 double __v = __difmuk / __tx;
-                if (_VSTD::abs(__v) > 0.25)
-                    __px = __tx * _VSTD::log(1 + __v) - __difmuk - __del;
+                if (_CUDA_VSTD::abs(__v) > 0.25)
+                    __px = __tx * _CUDA_VSTD::log(1 + __v) - __difmuk - __del;
                 else
                     __px = __tx * __v * __v * (((((((.1250060 * __v + -.1384794) *
                            __v + .1421878) * __v + -.1661269) * __v + .2000118) *
                            __v + -.2500068) * __v + .3333333) * __v + -.5) - __del;
-                __py = .3989423 / _VSTD::sqrt(__tx);
+                __py = .3989423 / _CUDA_VSTD::sqrt(__tx);
             }
             double __r = (0.5 - __difmuk) / __pr.__s_;
             double __r2 = __r * __r;
@@ -230,18 +230,18 @@ poisson_distribution<_IntType>::operator()(_URNG& __urng, const param_type& __pr
                                         __r2 + __pr.__c1_) * __r2 + __pr.__c0_);
             if (__using_exp_dist)
             {
-                if (__pr.__c_ * _VSTD::abs(__u) <= __py * _VSTD::exp(__px + __e) -
-                                                   __fy * _VSTD::exp(__fx + __e))
+                if (__pr.__c_ * _CUDA_VSTD::abs(__u) <= __py * _CUDA_VSTD::exp(__px + __e) -
+                                                   __fy * _CUDA_VSTD::exp(__fx + __e))
                     break;
             }
             else
             {
-                if (__fy - __u * __fy <= __py * _VSTD::exp(__px - __fx))
+                if (__fy - __u * __fy <= __py * _CUDA_VSTD::exp(__px - __fx))
                     break;
             }
         }
     }
-    return _VSTD::__clamp_to_integral<result_type>(__tx);
+    return _CUDA_VSTD::__clamp_to_integral<result_type>(__tx);
 }
 
 template <class _CharT, class _Traits, class _IntType>
@@ -273,8 +273,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_POISSON_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_POISSON_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/random_device.h b/libcxx/include/__random/random_device.h
index e82b437a3b54..e7df59998ae5 100644
--- a/libcxx/include/__random/random_device.h
+++ b/libcxx/include/__random/random_device.h
@@ -6,32 +6,32 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_RANDOM_DEVICE_H
-#define _LIBCPP___RANDOM_RANDOM_DEVICE_H
+#ifndef _LIBCUDACXX___RANDOM_RANDOM_DEVICE_H
+#define _LIBCUDACXX___RANDOM_RANDOM_DEVICE_H
 
 #include <__config>
 #include <string>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if !defined(_LIBCPP_HAS_NO_RANDOM_DEVICE)
+#if !defined(_LIBCUDACXX_HAS_NO_RANDOM_DEVICE)
 
-class _LIBCPP_TYPE_VIS random_device
+class _LIBCUDACXX_TYPE_VIS random_device
 {
-#ifdef _LIBCPP_USING_DEV_RANDOM
+#ifdef _LIBCUDACXX_USING_DEV_RANDOM
     int __f_;
-#elif !defined(_LIBCPP_ABI_NO_RANDOM_DEVICE_COMPATIBILITY_LAYOUT)
-    _LIBCPP_DIAGNOSTIC_PUSH
-    _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wunused-private-field")
+#elif !defined(_LIBCUDACXX_ABI_NO_RANDOM_DEVICE_COMPATIBILITY_LAYOUT)
+    _LIBCUDACXX_DIAGNOSTIC_PUSH
+    _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wunused-private-field")
 
-    // Apple platforms used to use the `_LIBCPP_USING_DEV_RANDOM` code path, and now
+    // Apple platforms used to use the `_LIBCUDACXX_USING_DEV_RANDOM` code path, and now
     // use `arc4random()` as of this comment. In order to avoid breaking the ABI, we
     // retain the same layout as before.
 #   if defined(__APPLE__)
@@ -40,7 +40,7 @@ class _LIBCPP_TYPE_VIS random_device
 
     // ... vendors can add workarounds here if they switch to a 
diff erent representation ...
 
-    _LIBCPP_DIAGNOSTIC_POP
+    _LIBCUDACXX_DIAGNOSTIC_POP
 #endif
 
 public:
@@ -48,16 +48,16 @@ class _LIBCPP_TYPE_VIS random_device
     typedef unsigned result_type;
 
     // generator characteristics
-    static _LIBCPP_CONSTEXPR const result_type _Min = 0;
-    static _LIBCPP_CONSTEXPR const result_type _Max = 0xFFFFFFFFu;
+    static _LIBCUDACXX_CONSTEXPR const result_type _Min = 0;
+    static _LIBCUDACXX_CONSTEXPR const result_type _Max = 0xFFFFFFFFu;
 
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type min() { return _Min;}
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type max() { return _Max;}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type min() { return _Min;}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type max() { return _Max;}
 
     // constructors
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     random_device() : random_device("/dev/urandom") {}
     explicit random_device(const string& __token);
 #else
@@ -75,10 +75,10 @@ class _LIBCPP_TYPE_VIS random_device
     void operator=(const random_device&) = delete;
 };
 
-#endif // !_LIBCPP_HAS_NO_RANDOM_DEVICE
+#endif // !_LIBCUDACXX_HAS_NO_RANDOM_DEVICE
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_RANDOM_DEVICE_H
+#endif // _LIBCUDACXX___RANDOM_RANDOM_DEVICE_H

diff  --git a/libcxx/include/__random/ranlux.h b/libcxx/include/__random/ranlux.h
index e44cece39dfc..9aa1a0e5ca99 100644
--- a/libcxx/include/__random/ranlux.h
+++ b/libcxx/include/__random/ranlux.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_RANLUX_H
-#define _LIBCPP___RANDOM_RANLUX_H
+#ifndef _LIBCUDACXX___RANDOM_RANLUX_H
+#define _LIBCUDACXX___RANDOM_RANLUX_H
 
 #include <__config>
 #include <__random/discard_block_engine.h>
 #include <__random/subtract_with_carry_engine.h>
 #include <cstdint>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 typedef subtract_with_carry_engine<uint_fast32_t, 24, 10, 24> ranlux24_base;
 typedef subtract_with_carry_engine<uint_fast64_t, 48,  5, 12> ranlux48_base;
@@ -26,6 +26,6 @@ typedef subtract_with_carry_engine<uint_fast64_t, 48,  5, 12> ranlux48_base;
 typedef discard_block_engine<ranlux24_base, 223, 23> ranlux24;
 typedef discard_block_engine<ranlux48_base, 389, 11> ranlux48;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANDOM_RANLUX_H
+#endif // _LIBCUDACXX___RANDOM_RANLUX_H

diff  --git a/libcxx/include/__random/seed_seq.h b/libcxx/include/__random/seed_seq.h
index 330537fa0023..b448cac230ae 100644
--- a/libcxx/include/__random/seed_seq.h
+++ b/libcxx/include/__random/seed_seq.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_SEED_SEQ_H
-#define _LIBCPP___RANDOM_SEED_SEQ_H
+#ifndef _LIBCUDACXX___RANDOM_SEED_SEQ_H
+#define _LIBCUDACXX___RANDOM_SEED_SEQ_H
 
 #include <__algorithm/copy.h>
 #include <__algorithm/fill.h>
@@ -16,34 +16,34 @@
 #include <initializer_list>
 #include <vector>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TEMPLATE_VIS seed_seq
+class _LIBCUDACXX_TEMPLATE_VIS seed_seq
 {
 public:
     // types
     typedef uint32_t result_type;
 
     // constructors
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     seed_seq() _NOEXCEPT {}
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template<class _Tp, __enable_if_t<is_integral<_Tp>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     seed_seq(initializer_list<_Tp> __il) {
         __init(__il.begin(), __il.end());
     }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     template<class _InputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     seed_seq(_InputIterator __first, _InputIterator __last) {
         static_assert(is_integral<typename iterator_traits<_InputIterator>::value_type>::value,
             "Mandates: iterator_traits<InputIterator>::value_type is an integer type");
@@ -55,17 +55,17 @@ class _LIBCPP_TEMPLATE_VIS seed_seq
         void generate(_RandomAccessIterator __first, _RandomAccessIterator __last);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const _NOEXCEPT {return __v_.size();}
     template<class _OutputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void param(_OutputIterator __dest) const
-            {_VSTD::copy(__v_.begin(), __v_.end(), __dest);}
+            {_CUDA_VSTD::copy(__v_.begin(), __v_.end(), __dest);}
 
     seed_seq(const seed_seq&) = delete;
     void operator=(const seed_seq&) = delete;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static result_type _Tp(result_type __x) {return __x ^ (__x >> 27);}
 
 private:
@@ -89,7 +89,7 @@ seed_seq::generate(_RandomAccessIterator __first, _RandomAccessIterator __last)
 {
     if (__first != __last)
     {
-        _VSTD::fill(__first, __last, 0x8b8b8b8b);
+        _CUDA_VSTD::fill(__first, __last, 0x8b8b8b8b);
         const size_t __n = static_cast<size_t>(__last - __first);
         const size_t __s = __v_.size();
         const size_t __t = (__n >= 623) ? 11
@@ -99,7 +99,7 @@ seed_seq::generate(_RandomAccessIterator __first, _RandomAccessIterator __last)
                          : (__n - 1) / 2;
         const size_t __p = (__n - __t) / 2;
         const size_t __q = __p + __t;
-        const size_t __m = _VSTD::max(__s + 1, __n);
+        const size_t __m = _CUDA_VSTD::max(__s + 1, __n);
         // __k = 0;
         {
             result_type __r = 1664525 * _Tp(__first[0] ^ __first[__p]
@@ -170,8 +170,8 @@ seed_seq::generate(_RandomAccessIterator __first, _RandomAccessIterator __last)
     }
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_SEED_SEQ_H
+#endif // _LIBCUDACXX___RANDOM_SEED_SEQ_H

diff  --git a/libcxx/include/__random/shuffle_order_engine.h b/libcxx/include/__random/shuffle_order_engine.h
index c2f76f609ae5..76e83fdfbf5f 100644
--- a/libcxx/include/__random/shuffle_order_engine.h
+++ b/libcxx/include/__random/shuffle_order_engine.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_SHUFFLE_ORDER_ENGINE_H
-#define _LIBCPP___RANDOM_SHUFFLE_ORDER_ENGINE_H
+#ifndef _LIBCUDACXX___RANDOM_SHUFFLE_ORDER_ENGINE_H
+#define _LIBCUDACXX___RANDOM_SHUFFLE_ORDER_ENGINE_H
 
 #include <__algorithm/equal.h>
 #include <__config>
@@ -17,41 +17,41 @@
 #include <iosfwd>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <uint64_t _Xp, uint64_t _Yp>
 struct __ugcd
 {
-    static _LIBCPP_CONSTEXPR const uint64_t value = __ugcd<_Yp, _Xp % _Yp>::value;
+    static _LIBCUDACXX_CONSTEXPR const uint64_t value = __ugcd<_Yp, _Xp % _Yp>::value;
 };
 
 template <uint64_t _Xp>
 struct __ugcd<_Xp, 0>
 {
-    static _LIBCPP_CONSTEXPR const uint64_t value = _Xp;
+    static _LIBCUDACXX_CONSTEXPR const uint64_t value = _Xp;
 };
 
 template <uint64_t _Np, uint64_t _Dp>
 class __uratio
 {
     static_assert(_Dp != 0, "__uratio divide by 0");
-    static _LIBCPP_CONSTEXPR const uint64_t __gcd = __ugcd<_Np, _Dp>::value;
+    static _LIBCUDACXX_CONSTEXPR const uint64_t __gcd = __ugcd<_Np, _Dp>::value;
 public:
-    static _LIBCPP_CONSTEXPR const uint64_t num = _Np / __gcd;
-    static _LIBCPP_CONSTEXPR const uint64_t den = _Dp / __gcd;
+    static _LIBCUDACXX_CONSTEXPR const uint64_t num = _Np / __gcd;
+    static _LIBCUDACXX_CONSTEXPR const uint64_t den = _Dp / __gcd;
 
     typedef __uratio<num, den> type;
 };
 
 template<class _Engine, size_t __k>
-class _LIBCPP_TEMPLATE_VIS shuffle_order_engine
+class _LIBCUDACXX_TEMPLATE_VIS shuffle_order_engine
 {
     static_assert(0 < __k, "shuffle_order_engine invalid parameters");
 public:
@@ -65,48 +65,48 @@ class _LIBCPP_TEMPLATE_VIS shuffle_order_engine
 
 public:
     // engine characteristics
-    static _LIBCPP_CONSTEXPR const size_t table_size = __k;
+    static _LIBCUDACXX_CONSTEXPR const size_t table_size = __k;
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
     static const result_type _Min = _Engine::_Min;
     static const result_type _Max = _Engine::_Max;
 #else
-    static _LIBCPP_CONSTEXPR const result_type _Min = _Engine::min();
-    static _LIBCPP_CONSTEXPR const result_type _Max = _Engine::max();
+    static _LIBCUDACXX_CONSTEXPR const result_type _Min = _Engine::min();
+    static _LIBCUDACXX_CONSTEXPR const result_type _Max = _Engine::max();
 #endif
     static_assert(_Min < _Max, "shuffle_order_engine invalid parameters");
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type min() { return _Min; }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type max() { return _Max; }
 
-    static _LIBCPP_CONSTEXPR const unsigned long long _Rp = _Max - _Min + 1ull;
+    static _LIBCUDACXX_CONSTEXPR const unsigned long long _Rp = _Max - _Min + 1ull;
 
     // constructors and seeding functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shuffle_order_engine() {__init();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit shuffle_order_engine(const _Engine& __e)
         : __e_(__e) {__init();}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit shuffle_order_engine(_Engine&& __e)
-        : __e_(_VSTD::move(__e)) {__init();}
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+        : __e_(_CUDA_VSTD::move(__e)) {__init();}
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit shuffle_order_engine(result_type __sd) : __e_(__sd) {__init();}
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit shuffle_order_engine(_Sseq& __q,
         typename enable_if<__is_seed_sequence<_Sseq, shuffle_order_engine>::value &&
                            !is_convertible<_Sseq, _Engine>::value>::type* = 0)
          : __e_(__q) {__init();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed() {__e_.seed(); __init();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed(result_type __sd) {__e_.seed(__sd); __init();}
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if
         <
             __is_seed_sequence<_Sseq, shuffle_order_engine>::value,
@@ -115,13 +115,13 @@ class _LIBCPP_TEMPLATE_VIS shuffle_order_engine
         seed(_Sseq& __q) {__e_.seed(__q); __init();}
 
     // generating functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type operator()() {return __eval(integral_constant<bool, _Rp != 0>());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void discard(unsigned long long __z) {for (; __z; --__z) operator()();}
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Engine& base() const _NOEXCEPT {return __e_;}
 
 private:
@@ -153,7 +153,7 @@ class _LIBCPP_TEMPLATE_VIS shuffle_order_engine
     operator>>(basic_istream<_CharT, _Traits>& __is,
                shuffle_order_engine<_Eng, _Kp>& __x);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __init()
     {
         for (size_t __i = 0; __i < __k; ++__i)
@@ -161,18 +161,18 @@ class _LIBCPP_TEMPLATE_VIS shuffle_order_engine
         _Y_ = __e_();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type __eval(false_type) {return __eval2(integral_constant<bool, __k & 1>());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type __eval(true_type) {return __eval(__uratio<__k, _Rp>());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type __eval2(false_type) {return __eval(__uratio<__k/2, 0x8000000000000000ull>());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type __eval2(true_type) {return __evalf<__k, 0>();}
 
     template <uint64_t _Np, uint64_t _Dp>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if
         <
             (__uratio<_Np, _Dp>::num > 0xFFFFFFFFFFFFFFFFull / (_Max - _Min)),
@@ -182,7 +182,7 @@ class _LIBCPP_TEMPLATE_VIS shuffle_order_engine
             {return __evalf<__uratio<_Np, _Dp>::num, __uratio<_Np, _Dp>::den>();}
 
     template <uint64_t _Np, uint64_t _Dp>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if
         <
             __uratio<_Np, _Dp>::num <= 0xFFFFFFFFFFFFFFFFull / (_Max - _Min),
@@ -198,7 +198,7 @@ class _LIBCPP_TEMPLATE_VIS shuffle_order_engine
         }
 
     template <uint64_t __n, uint64_t __d>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type __evalf()
         {
             const double _Fp = __d == 0 ?
@@ -212,7 +212,7 @@ class _LIBCPP_TEMPLATE_VIS shuffle_order_engine
 };
 
 template<class _Engine, size_t __k>
-    _LIBCPP_CONSTEXPR const size_t shuffle_order_engine<_Engine, __k>::table_size;
+    _LIBCUDACXX_CONSTEXPR const size_t shuffle_order_engine<_Engine, __k>::table_size;
 
 template<class _Eng, size_t _Kp>
 bool
@@ -220,12 +220,12 @@ operator==(
     const shuffle_order_engine<_Eng, _Kp>& __x,
     const shuffle_order_engine<_Eng, _Kp>& __y)
 {
-    return __x._Y_ == __y._Y_ && _VSTD::equal(__x._V_, __x._V_ + _Kp, __y._V_) &&
+    return __x._Y_ == __y._Y_ && _CUDA_VSTD::equal(__x._V_, __x._V_ + _Kp, __y._V_) &&
            __x.__e_ == __y.__e_;
 }
 
 template<class _Eng, size_t _Kp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(
     const shuffle_order_engine<_Eng, _Kp>& __x,
@@ -276,8 +276,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_SHUFFLE_ORDER_ENGINE_H
+#endif // _LIBCUDACXX___RANDOM_SHUFFLE_ORDER_ENGINE_H

diff  --git a/libcxx/include/__random/student_t_distribution.h b/libcxx/include/__random/student_t_distribution.h
index 9e95f97cefab..307ddfe4a1ae 100644
--- a/libcxx/include/__random/student_t_distribution.h
+++ b/libcxx/include/__random/student_t_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_STUDENT_T_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_STUDENT_T_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_STUDENT_T_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_STUDENT_T_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/gamma_distribution.h>
@@ -17,38 +17,38 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS student_t_distribution
+class _LIBCUDACXX_TEMPLATE_VIS student_t_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __n_;
     public:
         typedef student_t_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __n = 1) : __n_(__n) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type n() const {return __n_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__n_ == __y.__n_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -59,49 +59,49 @@ class _LIBCPP_TEMPLATE_VIS student_t_distribution
 
 public:
     // constructor and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     student_t_distribution() : student_t_distribution(1) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit student_t_distribution(result_type __n)
         : __p_(param_type(__n)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit student_t_distribution(result_type __n = 1)
         : __p_(param_type(__n)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit student_t_distribution(const param_type& __p)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {__nd_.reset();}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG> result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type n() const {return __p_.n();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return -numeric_limits<result_type>::infinity();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::infinity();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const student_t_distribution& __x,
                         const student_t_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const student_t_distribution& __x,
                         const student_t_distribution& __y)
         {return !(__x == __y);}
@@ -112,9 +112,9 @@ template<class _URNG>
 _RealType
 student_t_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     gamma_distribution<result_type> __gd(__p.n() * .5, 2);
-    return __nd_(__g) * _VSTD::sqrt(__p.n()/__gd(__g));
+    return __nd_(__g) * _CUDA_VSTD::sqrt(__p.n()/__gd(__g));
 }
 
 template <class _CharT, class _Traits, class _RT>
@@ -148,8 +148,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_STUDENT_T_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_STUDENT_T_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/subtract_with_carry_engine.h b/libcxx/include/__random/subtract_with_carry_engine.h
index fdbe2d2e9be3..6e8d2cd31e35 100644
--- a/libcxx/include/__random/subtract_with_carry_engine.h
+++ b/libcxx/include/__random/subtract_with_carry_engine.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_SUBTRACT_WITH_CARRY_ENGINE_H
-#define _LIBCPP___RANDOM_SUBTRACT_WITH_CARRY_ENGINE_H
+#ifndef _LIBCUDACXX___RANDOM_SUBTRACT_WITH_CARRY_ENGINE_H
+#define _LIBCUDACXX___RANDOM_SUBTRACT_WITH_CARRY_ENGINE_H
 
 #include <__algorithm/equal.h>
 #include <__algorithm/min.h>
@@ -20,17 +20,17 @@
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _UIntType, size_t __w, size_t __s, size_t __r>
-class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine;
+class _LIBCUDACXX_TEMPLATE_VIS subtract_with_carry_engine;
 
 template<class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
 bool
@@ -39,7 +39,7 @@ operator==(
     const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __y);
 
 template<class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(
     const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x,
@@ -58,7 +58,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
            subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x);
 
 template<class _UIntType, size_t __w, size_t __s, size_t __r>
-class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine
+class _LIBCUDACXX_TEMPLATE_VIS subtract_with_carry_engine
 {
 public:
     // types
@@ -69,49 +69,49 @@ class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine
     result_type  __c_;
     size_t      __i_;
 
-    static _LIBCPP_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
+    static _LIBCUDACXX_CONSTEXPR const result_type _Dt = numeric_limits<result_type>::digits;
     static_assert(  0 <  __w, "subtract_with_carry_engine invalid parameters");
     static_assert(__w <= _Dt, "subtract_with_carry_engine invalid parameters");
     static_assert(  0 <  __s, "subtract_with_carry_engine invalid parameters");
     static_assert(__s <  __r, "subtract_with_carry_engine invalid parameters");
 public:
-    static _LIBCPP_CONSTEXPR const result_type _Min = 0;
-    static _LIBCPP_CONSTEXPR const result_type _Max = __w == _Dt ? result_type(~0) :
+    static _LIBCUDACXX_CONSTEXPR const result_type _Min = 0;
+    static _LIBCUDACXX_CONSTEXPR const result_type _Max = __w == _Dt ? result_type(~0) :
                                                       (result_type(1) << __w) - result_type(1);
     static_assert(_Min < _Max, "subtract_with_carry_engine invalid parameters");
 
     // engine characteristics
-    static _LIBCPP_CONSTEXPR const size_t word_size = __w;
-    static _LIBCPP_CONSTEXPR const size_t short_lag = __s;
-    static _LIBCPP_CONSTEXPR const size_t long_lag = __r;
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type min() { return _Min; }
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR result_type max() { return _Max; }
-    static _LIBCPP_CONSTEXPR const result_type default_seed = 19780503u;
+    static _LIBCUDACXX_CONSTEXPR const size_t word_size = __w;
+    static _LIBCUDACXX_CONSTEXPR const size_t short_lag = __s;
+    static _LIBCUDACXX_CONSTEXPR const size_t long_lag = __r;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type min() { return _Min; }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR result_type max() { return _Max; }
+    static _LIBCUDACXX_CONSTEXPR const result_type default_seed = 19780503u;
 
     // constructors and seeding functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     subtract_with_carry_engine() : subtract_with_carry_engine(default_seed) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit subtract_with_carry_engine(result_type __sd) { seed(__sd); }
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit subtract_with_carry_engine(result_type __sd = default_seed) {
       seed(__sd);
     }
 #endif
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit subtract_with_carry_engine(_Sseq& __q,
         typename enable_if<__is_seed_sequence<_Sseq, subtract_with_carry_engine>::value>::type* = 0)
         {seed(__q);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void seed(result_type __sd = default_seed)
         {seed(__sd, integral_constant<unsigned, 1 + (__w - 1) / 32>());}
     template<class _Sseq>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if
         <
             __is_seed_sequence<_Sseq, subtract_with_carry_engine>::value,
@@ -122,7 +122,7 @@ class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine
 
     // generating functions
     result_type operator()();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void discard(unsigned long long __z) {for (; __z; --__z) operator()();}
 
     template<class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
@@ -164,16 +164,16 @@ class _LIBCPP_TEMPLATE_VIS subtract_with_carry_engine
 };
 
 template<class _UIntType, size_t __w, size_t __s, size_t __r>
-    _LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::word_size;
+    _LIBCUDACXX_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::word_size;
 
 template<class _UIntType, size_t __w, size_t __s, size_t __r>
-    _LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::short_lag;
+    _LIBCUDACXX_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::short_lag;
 
 template<class _UIntType, size_t __w, size_t __s, size_t __r>
-    _LIBCPP_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::long_lag;
+    _LIBCUDACXX_CONSTEXPR const size_t subtract_with_carry_engine<_UIntType, __w, __s, __r>::long_lag;
 
 template<class _UIntType, size_t __w, size_t __s, size_t __r>
-    _LIBCPP_CONSTEXPR const typename subtract_with_carry_engine<_UIntType, __w, __s, __r>::result_type
+    _LIBCUDACXX_CONSTEXPR const typename subtract_with_carry_engine<_UIntType, __w, __s, __r>::result_type
     subtract_with_carry_engine<_UIntType, __w, __s, __r>::default_seed;
 
 template<class _UIntType, size_t __w, size_t __s, size_t __r>
@@ -259,42 +259,42 @@ operator==(
     if (__x.__c_ != __y.__c_)
         return false;
     if (__x.__i_ == __y.__i_)
-        return _VSTD::equal(__x.__x_, __x.__x_ + _Rp, __y.__x_);
+        return _CUDA_VSTD::equal(__x.__x_, __x.__x_ + _Rp, __y.__x_);
     if (__x.__i_ == 0 || __y.__i_ == 0)
     {
-        size_t __j = _VSTD::min(_Rp - __x.__i_, _Rp - __y.__i_);
-        if (!_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j,
+        size_t __j = _CUDA_VSTD::min(_Rp - __x.__i_, _Rp - __y.__i_);
+        if (!_CUDA_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + __x.__i_ + __j,
                          __y.__x_ + __y.__i_))
             return false;
         if (__x.__i_ == 0)
-            return _VSTD::equal(__x.__x_ + __j, __x.__x_ + _Rp, __y.__x_);
-        return _VSTD::equal(__x.__x_, __x.__x_ + (_Rp - __j), __y.__x_ + __j);
+            return _CUDA_VSTD::equal(__x.__x_ + __j, __x.__x_ + _Rp, __y.__x_);
+        return _CUDA_VSTD::equal(__x.__x_, __x.__x_ + (_Rp - __j), __y.__x_ + __j);
     }
     if (__x.__i_ < __y.__i_)
     {
         size_t __j = _Rp - __y.__i_;
-        if (!_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j),
+        if (!_CUDA_VSTD::equal(__x.__x_ + __x.__i_, __x.__x_ + (__x.__i_ + __j),
                          __y.__x_ + __y.__i_))
             return false;
-        if (!_VSTD::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Rp,
+        if (!_CUDA_VSTD::equal(__x.__x_ + (__x.__i_ + __j), __x.__x_ + _Rp,
                          __y.__x_))
             return false;
-        return _VSTD::equal(__x.__x_, __x.__x_ + __x.__i_,
+        return _CUDA_VSTD::equal(__x.__x_, __x.__x_ + __x.__i_,
                            __y.__x_ + (_Rp - (__x.__i_ + __j)));
     }
     size_t __j = _Rp - __x.__i_;
-    if (!_VSTD::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j),
+    if (!_CUDA_VSTD::equal(__y.__x_ + __y.__i_, __y.__x_ + (__y.__i_ + __j),
                      __x.__x_ + __x.__i_))
         return false;
-    if (!_VSTD::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Rp,
+    if (!_CUDA_VSTD::equal(__y.__x_ + (__y.__i_ + __j), __y.__x_ + _Rp,
                      __x.__x_))
         return false;
-    return _VSTD::equal(__y.__x_, __y.__x_ + __y.__i_,
+    return _CUDA_VSTD::equal(__y.__x_, __y.__x_ + __y.__i_,
                        __x.__x_ + (_Rp - (__y.__i_ + __j)));
 }
 
 template<class _UInt, size_t _Wp, size_t _Sp, size_t _Rp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(
     const subtract_with_carry_engine<_UInt, _Wp, _Sp, _Rp>& __x,
@@ -345,8 +345,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_SUBTRACT_WITH_CARRY_ENGINE_H
+#endif // _LIBCUDACXX___RANDOM_SUBTRACT_WITH_CARRY_ENGINE_H

diff  --git a/libcxx/include/__random/uniform_int_distribution.h b/libcxx/include/__random/uniform_int_distribution.h
index 46b627f45da9..e91d8c940922 100644
--- a/libcxx/include/__random/uniform_int_distribution.h
+++ b/libcxx/include/__random/uniform_int_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_UNIFORM_INT_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_UNIFORM_INT_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_UNIFORM_INT_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_UNIFORM_INT_DISTRIBUTION_H
 
 #include <__bits>
 #include <__config>
@@ -20,14 +20,14 @@
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _Engine, class _UIntType>
 class __independent_bits_engine
@@ -55,16 +55,16 @@ class __independent_bits_engine
     _Engine_result_type __mask0_;
     _Engine_result_type __mask1_;
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
     static const _Working_result_type _Rp = _Engine::_Max - _Engine::_Min
                                           + _Working_result_type(1);
 #else
-    static _LIBCPP_CONSTEXPR const _Working_result_type _Rp = _Engine::max() - _Engine::min()
+    static _LIBCUDACXX_CONSTEXPR const _Working_result_type _Rp = _Engine::max() - _Engine::min()
                                                       + _Working_result_type(1);
 #endif
-    static _LIBCPP_CONSTEXPR const size_t __m = __log2<_Working_result_type, _Rp>::value;
-    static _LIBCPP_CONSTEXPR const size_t _WDt = numeric_limits<_Working_result_type>::digits;
-    static _LIBCPP_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
+    static _LIBCUDACXX_CONSTEXPR const size_t __m = __log2<_Working_result_type, _Rp>::value;
+    static _LIBCUDACXX_CONSTEXPR const size_t _WDt = numeric_limits<_Working_result_type>::digits;
+    static _LIBCUDACXX_CONSTEXPR const size_t _EDt = numeric_limits<_Engine_result_type>::digits;
 
 public:
     // constructors and seeding functions
@@ -159,7 +159,7 @@ __independent_bits_engine<_Engine, _UIntType>::__eval(true_type)
 template<class _IntType = int>
 class uniform_int_distribution
 {
-    static_assert(__libcpp_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
+    static_assert(__LIBCUDACXX_random_is_valid_inttype<_IntType>::value, "IntType must be a supported integer type");
 public:
     // types
     typedef _IntType result_type;
@@ -189,7 +189,7 @@ class uniform_int_distribution
 
 public:
     // constructors and reset functions
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     uniform_int_distribution() : uniform_int_distribution(0) {}
     explicit uniform_int_distribution(
         result_type __a, result_type __b = numeric_limits<result_type>::max())
@@ -230,9 +230,9 @@ template<class _IntType>
 template<class _URNG>
 typename uniform_int_distribution<_IntType>::result_type
 uniform_int_distribution<_IntType>::operator()(_URNG& __g, const param_type& __p)
-_LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+_LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     typedef typename conditional<sizeof(result_type) <= sizeof(uint32_t), uint32_t,
                                  typename make_unsigned<result_type>::type>::type _UIntType;
     const _UIntType _Rp = _UIntType(__p.b()) - _UIntType(__p.a()) + _UIntType(1);
@@ -286,8 +286,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_UNIFORM_INT_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_UNIFORM_INT_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/uniform_random_bit_generator.h b/libcxx/include/__random/uniform_random_bit_generator.h
index 84a30b0ebe16..4084055095ba 100644
--- a/libcxx/include/__random/uniform_random_bit_generator.h
+++ b/libcxx/include/__random/uniform_random_bit_generator.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_UNIFORM_RANDOM_BIT_GENERATOR_H
-#define _LIBCPP___RANDOM_UNIFORM_RANDOM_BIT_GENERATOR_H
+#ifndef _LIBCUDACXX___RANDOM_UNIFORM_RANDOM_BIT_GENERATOR_H
+#define _LIBCUDACXX___RANDOM_UNIFORM_RANDOM_BIT_GENERATOR_H
 
 #include <__concepts/arithmetic.h>
 #include <__concepts/invocable.h>
@@ -15,16 +15,16 @@
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [rand.req.urng]
 template<class _Gen>
@@ -36,10 +36,10 @@ concept uniform_random_bit_generator =
     requires bool_constant<(_Gen::min() < _Gen::max())>::value;
   };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_UNIFORM_RANDOM_BIT_GENERATOR_H
+#endif // _LIBCUDACXX___RANDOM_UNIFORM_RANDOM_BIT_GENERATOR_H

diff  --git a/libcxx/include/__random/uniform_real_distribution.h b/libcxx/include/__random/uniform_real_distribution.h
index 7d2ecda732fe..f3416371d446 100644
--- a/libcxx/include/__random/uniform_real_distribution.h
+++ b/libcxx/include/__random/uniform_real_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_UNIFORM_REAL_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_UNIFORM_REAL_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_UNIFORM_REAL_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_UNIFORM_REAL_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/generate_canonical.h>
@@ -16,43 +16,43 @@
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS uniform_real_distribution
+class _LIBCUDACXX_TEMPLATE_VIS uniform_real_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __a_;
         result_type __b_;
     public:
         typedef uniform_real_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __a = 0,
                             result_type __b = 1)
             : __a_(__a), __b_(__b) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type a() const {return __a_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type b() const {return __b_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__a_ == __y.__a_ && __x.__b_ == __y.__b_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -62,49 +62,49 @@ class _LIBCPP_TEMPLATE_VIS uniform_real_distribution
 
 public:
     // constructors and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     uniform_real_distribution() : uniform_real_distribution(0) {}
     explicit uniform_real_distribution(result_type __a, result_type __b = 1)
         : __p_(param_type(__a, __b)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit uniform_real_distribution(result_type __a = 0, result_type __b = 1)
         : __p_(param_type(__a, __b)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit uniform_real_distribution(const param_type& __p) : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
-    template<class _URNG> _LIBCPP_INLINE_VISIBILITY result_type operator()(_URNG& __g, const param_type& __p);
+    template<class _URNG> _LIBCUDACXX_INLINE_VISIBILITY result_type operator()(_URNG& __g, const param_type& __p);
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type a() const {return __p_.a();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type b() const {return __p_.b();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return a();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return b();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const uniform_real_distribution& __x,
                         const uniform_real_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const uniform_real_distribution& __x,
                         const uniform_real_distribution& __y)
         {return !(__x == __y);}
@@ -116,9 +116,9 @@ inline
 typename uniform_real_distribution<_RealType>::result_type
 uniform_real_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p)
 {
-    static_assert(__libcpp_random_is_valid_urng<_URNG>::value, "");
+    static_assert(__LIBCUDACXX_random_is_valid_urng<_URNG>::value, "");
     return (__p.b() - __p.a())
-        * _VSTD::generate_canonical<_RealType, numeric_limits<_RealType>::digits>(__g)
+        * _CUDA_VSTD::generate_canonical<_RealType, numeric_limits<_RealType>::digits>(__g)
         + __p.a();
 }
 
@@ -155,8 +155,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_UNIFORM_REAL_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_UNIFORM_REAL_DISTRIBUTION_H

diff  --git a/libcxx/include/__random/weibull_distribution.h b/libcxx/include/__random/weibull_distribution.h
index 85bae65096cb..89c5add99516 100644
--- a/libcxx/include/__random/weibull_distribution.h
+++ b/libcxx/include/__random/weibull_distribution.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANDOM_WEIBULL_DISTRIBUTION_H
-#define _LIBCPP___RANDOM_WEIBULL_DISTRIBUTION_H
+#ifndef _LIBCUDACXX___RANDOM_WEIBULL_DISTRIBUTION_H
+#define _LIBCUDACXX___RANDOM_WEIBULL_DISTRIBUTION_H
 
 #include <__config>
 #include <__random/exponential_distribution.h>
@@ -15,42 +15,42 @@
 #include <iosfwd>
 #include <limits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _RealType = double>
-class _LIBCPP_TEMPLATE_VIS weibull_distribution
+class _LIBCUDACXX_TEMPLATE_VIS weibull_distribution
 {
 public:
     // types
     typedef _RealType result_type;
 
-    class _LIBCPP_TEMPLATE_VIS param_type
+    class _LIBCUDACXX_TEMPLATE_VIS param_type
     {
         result_type __a_;
         result_type __b_;
     public:
         typedef weibull_distribution distribution_type;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit param_type(result_type __a = 1, result_type __b = 1)
             : __a_(__a), __b_(__b) {}
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type a() const {return __a_;}
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type b() const {return __b_;}
 
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator==(const param_type& __x, const param_type& __y)
             {return __x.__a_ == __y.__a_ && __x.__b_ == __y.__b_;}
-        friend _LIBCPP_INLINE_VISIBILITY
+        friend _LIBCUDACXX_INLINE_VISIBILITY
             bool operator!=(const param_type& __x, const param_type& __y)
             {return !(__x == __y);}
     };
@@ -60,55 +60,55 @@ class _LIBCPP_TEMPLATE_VIS weibull_distribution
 
 public:
     // constructor and reset functions
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     weibull_distribution() : weibull_distribution(1) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit weibull_distribution(result_type __a, result_type __b = 1)
         : __p_(param_type(__a, __b)) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit weibull_distribution(result_type __a = 1, result_type __b = 1)
         : __p_(param_type(__a, __b)) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit weibull_distribution(const param_type& __p)
         : __p_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reset() {}
 
     // generating functions
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g)
         {return (*this)(__g, __p_);}
     template<class _URNG>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         result_type operator()(_URNG& __g, const param_type& __p)
         {return __p.b() *
-            _VSTD::pow(exponential_distribution<result_type>()(__g), 1/__p.a());}
+            _CUDA_VSTD::pow(exponential_distribution<result_type>()(__g), 1/__p.a());}
 
     // property functions
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type a() const {return __p_.a();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type b() const {return __p_.b();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     param_type param() const {return __p_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void param(const param_type& __p) {__p_ = __p;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type min() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     result_type max() const {return numeric_limits<result_type>::infinity();}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const weibull_distribution& __x,
                         const weibull_distribution& __y)
         {return __x.__p_ == __y.__p_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const weibull_distribution& __x,
                         const weibull_distribution& __y)
         {return !(__x == __y);}
@@ -148,8 +148,8 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     return __is;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANDOM_WEIBULL_DISTRIBUTION_H
+#endif // _LIBCUDACXX___RANDOM_WEIBULL_DISTRIBUTION_H

diff  --git a/libcxx/include/__ranges/access.h b/libcxx/include/__ranges/access.h
index 0f1cca033a23..af1613af4a50 100644
--- a/libcxx/include/__ranges/access.h
+++ b/libcxx/include/__ranges/access.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_ACCESS_H
-#define _LIBCPP___RANGES_ACCESS_H
+#ifndef _LIBCUDACXX___RANGES_ACCESS_H
+#define _LIBCUDACXX___RANGES_ACCESS_H
 
 #include <__concepts/class_or_enum.h>
 #include <__config>
@@ -17,13 +17,13 @@
 #include <__utility/auto_cast.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace ranges {
   template <class _Tp>
@@ -40,7 +40,7 @@ namespace __begin {
     __can_borrow<_Tp> &&
     __workaround_52970<_Tp> &&
     requires(_Tp&& __t) {
-      { _LIBCPP_AUTO_CAST(__t.begin()) } -> input_or_output_iterator;
+      { _LIBCUDACXX_AUTO_CAST(__t.begin()) } -> input_or_output_iterator;
     };
 
   void begin(auto&) = delete;
@@ -52,19 +52,19 @@ namespace __begin {
     __can_borrow<_Tp> &&
     __class_or_enum<remove_cvref_t<_Tp>> &&
     requires(_Tp && __t) {
-      { _LIBCPP_AUTO_CAST(begin(__t)) } -> input_or_output_iterator;
+      { _LIBCUDACXX_AUTO_CAST(begin(__t)) } -> input_or_output_iterator;
     };
 
   struct __fn {
     template <class _Tp>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[]) const noexcept
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[]) const noexcept
       requires (sizeof(_Tp) >= 0)  // Disallow incomplete element types.
     {
       return __t + 0;
     }
 
     template <class _Tp, size_t _Np>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept
       requires (sizeof(_Tp) >= 0)  // Disallow incomplete element types.
     {
       return __t + 0;
@@ -72,18 +72,18 @@ namespace __begin {
 
     template <class _Tp>
       requires __member_begin<_Tp>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
-      noexcept(noexcept(_LIBCPP_AUTO_CAST(__t.begin())))
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+      noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(__t.begin())))
     {
-      return _LIBCPP_AUTO_CAST(__t.begin());
+      return _LIBCUDACXX_AUTO_CAST(__t.begin());
     }
 
     template <class _Tp>
       requires __unqualified_begin<_Tp>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
-      noexcept(noexcept(_LIBCPP_AUTO_CAST(begin(__t))))
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+      noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(begin(__t))))
     {
-      return _LIBCPP_AUTO_CAST(begin(__t));
+      return _LIBCUDACXX_AUTO_CAST(begin(__t));
     }
 
     void operator()(auto&&) const = delete;
@@ -112,7 +112,7 @@ namespace __end {
     __workaround_52970<_Tp> &&
     requires(_Tp&& __t) {
       typename iterator_t<_Tp>;
-      { _LIBCPP_AUTO_CAST(__t.end()) } -> sentinel_for<iterator_t<_Tp>>;
+      { _LIBCUDACXX_AUTO_CAST(__t.end()) } -> sentinel_for<iterator_t<_Tp>>;
     };
 
   void end(auto&) = delete;
@@ -125,12 +125,12 @@ namespace __end {
     __class_or_enum<remove_cvref_t<_Tp>> &&
     requires(_Tp && __t) {
       typename iterator_t<_Tp>;
-      { _LIBCPP_AUTO_CAST(end(__t)) } -> sentinel_for<iterator_t<_Tp>>;
+      { _LIBCUDACXX_AUTO_CAST(end(__t)) } -> sentinel_for<iterator_t<_Tp>>;
     };
 
   struct __fn {
     template <class _Tp, size_t _Np>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp (&__t)[_Np]) const noexcept
       requires (sizeof(_Tp) >= 0)  // Disallow incomplete element types.
     {
       return __t + _Np;
@@ -138,18 +138,18 @@ namespace __end {
 
     template <class _Tp>
       requires __member_end<_Tp>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
-      noexcept(noexcept(_LIBCPP_AUTO_CAST(__t.end())))
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+      noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(__t.end())))
     {
-      return _LIBCPP_AUTO_CAST(__t.end());
+      return _LIBCUDACXX_AUTO_CAST(__t.end());
     }
 
     template <class _Tp>
       requires __unqualified_end<_Tp>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
-      noexcept(noexcept(_LIBCPP_AUTO_CAST(end(__t))))
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+      noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(end(__t))))
     {
-      return _LIBCPP_AUTO_CAST(end(__t));
+      return _LIBCUDACXX_AUTO_CAST(end(__t));
     }
 
     void operator()(auto&&) const = delete;
@@ -168,7 +168,7 @@ namespace __cbegin {
   struct __fn {
     template <class _Tp>
       requires is_lvalue_reference_v<_Tp&&>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Tp&& __t) const
       noexcept(noexcept(ranges::begin(static_cast<const remove_reference_t<_Tp>&>(__t))))
       -> decltype(      ranges::begin(static_cast<const remove_reference_t<_Tp>&>(__t)))
@@ -176,7 +176,7 @@ namespace __cbegin {
 
     template <class _Tp>
       requires is_rvalue_reference_v<_Tp&&>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Tp&& __t) const
       noexcept(noexcept(ranges::begin(static_cast<const _Tp&&>(__t))))
       -> decltype(      ranges::begin(static_cast<const _Tp&&>(__t)))
@@ -196,7 +196,7 @@ namespace __cend {
   struct __fn {
     template <class _Tp>
       requires is_lvalue_reference_v<_Tp&&>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Tp&& __t) const
       noexcept(noexcept(ranges::end(static_cast<const remove_reference_t<_Tp>&>(__t))))
       -> decltype(      ranges::end(static_cast<const remove_reference_t<_Tp>&>(__t)))
@@ -204,7 +204,7 @@ namespace __cend {
 
     template <class _Tp>
       requires is_rvalue_reference_v<_Tp&&>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Tp&& __t) const
       noexcept(noexcept(ranges::end(static_cast<const _Tp&&>(__t))))
       -> decltype(      ranges::end(static_cast<const _Tp&&>(__t)))
@@ -217,8 +217,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_ACCESS_H
+#endif // _LIBCUDACXX___RANGES_ACCESS_H

diff  --git a/libcxx/include/__ranges/all.h b/libcxx/include/__ranges/all.h
index 181477419c85..687b78d5bb61 100644
--- a/libcxx/include/__ranges/all.h
+++ b/libcxx/include/__ranges/all.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_ALL_H
-#define _LIBCPP___RANGES_ALL_H
+#ifndef _LIBCUDACXX___RANGES_ALL_H
+#define _LIBCUDACXX___RANGES_ALL_H
 
 #include <__config>
 #include <__iterator/concepts.h>
@@ -22,13 +22,13 @@
 #include <__utility/forward.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges::views {
 
@@ -36,18 +36,18 @@ namespace __all {
   struct __fn : __range_adaptor_closure<__fn> {
     template<class _Tp>
       requires ranges::view<decay_t<_Tp>>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Tp&& __t) const
-      noexcept(noexcept(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t))))
-      -> decltype(_LIBCPP_AUTO_CAST(std::forward<_Tp>(__t)))
+      noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(std::forward<_Tp>(__t))))
+      -> decltype(_LIBCUDACXX_AUTO_CAST(std::forward<_Tp>(__t)))
     {
-      return _LIBCPP_AUTO_CAST(std::forward<_Tp>(__t));
+      return _LIBCUDACXX_AUTO_CAST(std::forward<_Tp>(__t));
     }
 
     template<class _Tp>
       requires (!ranges::view<decay_t<_Tp>>) &&
                requires (_Tp&& __t) { ranges::ref_view{std::forward<_Tp>(__t)}; }
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Tp&& __t) const
       noexcept(noexcept(ranges::ref_view{std::forward<_Tp>(__t)}))
     {
@@ -58,7 +58,7 @@ namespace __all {
       requires (!ranges::view<decay_t<_Tp>> &&
                 !requires (_Tp&& __t) { ranges::ref_view{std::forward<_Tp>(__t)}; } &&
                  requires (_Tp&& __t) { ranges::owning_view{std::forward<_Tp>(__t)}; })
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Tp&& __t) const
       noexcept(noexcept(ranges::owning_view{std::forward<_Tp>(__t)}))
     {
@@ -76,8 +76,8 @@ using all_t = decltype(views::all(declval<_Range>()));
 
 } // namespace ranges::views
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_ALL_H
+#endif // _LIBCUDACXX___RANGES_ALL_H

diff  --git a/libcxx/include/__ranges/common_view.h b/libcxx/include/__ranges/common_view.h
index 61b9b61f26aa..091a2719fc27 100644
--- a/libcxx/include/__ranges/common_view.h
+++ b/libcxx/include/__ranges/common_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_COMMON_VIEW_H
-#define _LIBCPP___RANGES_COMMON_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_COMMON_VIEW_H
+#define _LIBCUDACXX___RANGES_COMMON_VIEW_H
 
 #include <__config>
 #include <__iterator/common_iterator.h>
@@ -24,13 +24,13 @@
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
@@ -40,19 +40,19 @@ class common_view : public view_interface<common_view<_View>> {
   _View __base_ = _View();
 
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   common_view() requires default_initializable<_View> = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr explicit common_view(_View __v) : __base_(std::move(__v)) { }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _View base() const& requires copy_constructible<_View> { return __base_; }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _View base() && { return std::move(__base_); }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto begin() {
     if constexpr (random_access_range<_View> && sized_range<_View>)
       return ranges::begin(__base_);
@@ -60,7 +60,7 @@ class common_view : public view_interface<common_view<_View>> {
       return common_iterator<iterator_t<_View>, sentinel_t<_View>>(ranges::begin(__base_));
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto begin() const requires range<const _View> {
     if constexpr (random_access_range<const _View> && sized_range<const _View>)
       return ranges::begin(__base_);
@@ -68,7 +68,7 @@ class common_view : public view_interface<common_view<_View>> {
       return common_iterator<iterator_t<const _View>, sentinel_t<const _View>>(ranges::begin(__base_));
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto end() {
     if constexpr (random_access_range<_View> && sized_range<_View>)
       return ranges::begin(__base_) + ranges::size(__base_);
@@ -76,7 +76,7 @@ class common_view : public view_interface<common_view<_View>> {
       return common_iterator<iterator_t<_View>, sentinel_t<_View>>(ranges::end(__base_));
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto end() const requires range<const _View> {
     if constexpr (random_access_range<const _View> && sized_range<const _View>)
       return ranges::begin(__base_) + ranges::size(__base_);
@@ -84,12 +84,12 @@ class common_view : public view_interface<common_view<_View>> {
       return common_iterator<iterator_t<const _View>, sentinel_t<const _View>>(ranges::end(__base_));
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto size() requires sized_range<_View> {
     return ranges::size(__base_);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto size() const requires sized_range<const _View> {
     return ranges::size(__base_);
   }
@@ -107,14 +107,14 @@ namespace __common {
   struct __fn : __range_adaptor_closure<__fn> {
     template<class _Range>
       requires common_range<_Range>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Range&& __range) const
       noexcept(noexcept(views::all(std::forward<_Range>(__range))))
       -> decltype(      views::all(std::forward<_Range>(__range)))
       { return          views::all(std::forward<_Range>(__range)); }
 
     template<class _Range>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Range&& __range) const
       noexcept(noexcept(common_view{std::forward<_Range>(__range)}))
       -> decltype(      common_view{std::forward<_Range>(__range)})
@@ -128,8 +128,8 @@ inline namespace __cpo {
 } // namespace views
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_COMMON_VIEW_H
+#endif // _LIBCUDACXX___RANGES_COMMON_VIEW_H

diff  --git a/libcxx/include/__ranges/concepts.h b/libcxx/include/__ranges/concepts.h
index 87df1d18baf8..47c25c699d3c 100644
--- a/libcxx/include/__ranges/concepts.h
+++ b/libcxx/include/__ranges/concepts.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_CONCEPTS_H
-#define _LIBCPP___RANGES_CONCEPTS_H
+#ifndef _LIBCUDACXX___RANGES_CONCEPTS_H
+#define _LIBCUDACXX___RANGES_CONCEPTS_H
 
 #include <__concepts/constructible.h>
 #include <__concepts/movable.h>
@@ -26,13 +26,13 @@
 #include <initializer_list>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace ranges {
 
@@ -135,8 +135,8 @@ namespace ranges {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_CONCEPTS_H
+#endif // _LIBCUDACXX___RANGES_CONCEPTS_H

diff  --git a/libcxx/include/__ranges/copyable_box.h b/libcxx/include/__ranges/copyable_box.h
index 6012497db5e8..851752bd2c84 100644
--- a/libcxx/include/__ranges/copyable_box.h
+++ b/libcxx/include/__ranges/copyable_box.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANGES_COPYABLE_BOX_H
-#define _LIBCPP___RANGES_COPYABLE_BOX_H
+#ifndef _LIBCUDACXX___RANGES_COPYABLE_BOX_H
+#define _LIBCUDACXX___RANGES_COPYABLE_BOX_H
 
 #include <__config>
 #include <__memory/addressof.h>
@@ -18,13 +18,13 @@
 #include <optional>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 // __copyable_box allows turning a type that is copy-constructible (but maybe not copy-assignable) into
 // a type that is both copy-constructible and copy-assignable. It does that by introducing an empty state
@@ -41,27 +41,27 @@ namespace ranges {
   // Primary template - uses std::optional and introduces an empty state in case assignment fails.
   template<__copy_constructible_object _Tp>
   class __copyable_box {
-    _LIBCPP_NO_UNIQUE_ADDRESS optional<_Tp> __val_;
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS optional<_Tp> __val_;
 
   public:
     template<class ..._Args>
       requires is_constructible_v<_Tp, _Args...>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit __copyable_box(in_place_t, _Args&& ...__args)
       noexcept(is_nothrow_constructible_v<_Tp, _Args...>)
       : __val_(in_place, std::forward<_Args>(__args)...)
     { }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __copyable_box() noexcept(is_nothrow_default_constructible_v<_Tp>)
       requires default_initializable<_Tp>
       : __val_(in_place)
     { }
 
-    _LIBCPP_HIDE_FROM_ABI __copyable_box(__copyable_box const&) = default;
-    _LIBCPP_HIDE_FROM_ABI __copyable_box(__copyable_box&&) = default;
+    _LIBCUDACXX_HIDE_FROM_ABI __copyable_box(__copyable_box const&) = default;
+    _LIBCUDACXX_HIDE_FROM_ABI __copyable_box(__copyable_box&&) = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __copyable_box& operator=(__copyable_box const& __other)
       noexcept(is_nothrow_copy_constructible_v<_Tp>)
     {
@@ -72,10 +72,10 @@ namespace ranges {
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     __copyable_box& operator=(__copyable_box&&) requires movable<_Tp> = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __copyable_box& operator=(__copyable_box&& __other)
       noexcept(is_nothrow_move_constructible_v<_Tp>)
     {
@@ -86,13 +86,13 @@ namespace ranges {
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr _Tp const& operator*() const noexcept { return *__val_; }
-    _LIBCPP_HIDE_FROM_ABI constexpr _Tp& operator*() noexcept { return *__val_; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp const& operator*() const noexcept { return *__val_; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp& operator*() noexcept { return *__val_; }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr const _Tp *operator->() const noexcept { return __val_.operator->(); }
-    _LIBCPP_HIDE_FROM_ABI constexpr _Tp *operator->() noexcept { return __val_.operator->(); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr const _Tp *operator->() const noexcept { return __val_.operator->(); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp *operator->() noexcept { return __val_.operator->(); }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr bool __has_value() const noexcept { return __val_.has_value(); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __has_value() const noexcept { return __val_.has_value(); }
   };
 
   // This partial specialization implements an optimization for when we know we don't need to store
@@ -116,32 +116,32 @@ namespace ranges {
   template<__copy_constructible_object _Tp>
     requires __doesnt_need_empty_state_for_copy<_Tp> && __doesnt_need_empty_state_for_move<_Tp>
   class __copyable_box<_Tp> {
-    _LIBCPP_NO_UNIQUE_ADDRESS _Tp __val_;
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _Tp __val_;
 
   public:
     template<class ..._Args>
       requires is_constructible_v<_Tp, _Args...>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit __copyable_box(in_place_t, _Args&& ...__args)
       noexcept(is_nothrow_constructible_v<_Tp, _Args...>)
       : __val_(std::forward<_Args>(__args)...)
     { }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __copyable_box() noexcept(is_nothrow_default_constructible_v<_Tp>)
       requires default_initializable<_Tp>
       : __val_()
     { }
 
-    _LIBCPP_HIDE_FROM_ABI __copyable_box(__copyable_box const&) = default;
-    _LIBCPP_HIDE_FROM_ABI __copyable_box(__copyable_box&&) = default;
+    _LIBCUDACXX_HIDE_FROM_ABI __copyable_box(__copyable_box const&) = default;
+    _LIBCUDACXX_HIDE_FROM_ABI __copyable_box(__copyable_box&&) = default;
 
     // Implementation of assignment operators in case we perform optimization (1)
-    _LIBCPP_HIDE_FROM_ABI __copyable_box& operator=(__copyable_box const&) requires copyable<_Tp> = default;
-    _LIBCPP_HIDE_FROM_ABI __copyable_box& operator=(__copyable_box&&) requires movable<_Tp> = default;
+    _LIBCUDACXX_HIDE_FROM_ABI __copyable_box& operator=(__copyable_box const&) requires copyable<_Tp> = default;
+    _LIBCUDACXX_HIDE_FROM_ABI __copyable_box& operator=(__copyable_box&&) requires movable<_Tp> = default;
 
     // Implementation of assignment operators in case we perform optimization (2)
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __copyable_box& operator=(__copyable_box const& __other) noexcept {
       static_assert(is_nothrow_copy_constructible_v<_Tp>);
       if (this != std::addressof(__other)) {
@@ -151,7 +151,7 @@ namespace ranges {
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __copyable_box& operator=(__copyable_box&& __other) noexcept {
       static_assert(is_nothrow_move_constructible_v<_Tp>);
       if (this != std::addressof(__other)) {
@@ -161,18 +161,18 @@ namespace ranges {
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr _Tp const& operator*() const noexcept { return __val_; }
-    _LIBCPP_HIDE_FROM_ABI constexpr _Tp& operator*() noexcept { return __val_; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp const& operator*() const noexcept { return __val_; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp& operator*() noexcept { return __val_; }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr const _Tp *operator->() const noexcept { return std::addressof(__val_); }
-    _LIBCPP_HIDE_FROM_ABI constexpr _Tp *operator->() noexcept { return std::addressof(__val_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr const _Tp *operator->() const noexcept { return std::addressof(__val_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp *operator->() noexcept { return std::addressof(__val_); }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr bool __has_value() const noexcept { return true; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr bool __has_value() const noexcept { return true; }
   };
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_COPYABLE_BOX_H
+#endif // _LIBCUDACXX___RANGES_COPYABLE_BOX_H

diff  --git a/libcxx/include/__ranges/counted.h b/libcxx/include/__ranges/counted.h
index f45f1e890085..374c171dd5f3 100644
--- a/libcxx/include/__ranges/counted.h
+++ b/libcxx/include/__ranges/counted.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_COUNTED_H
-#define _LIBCPP___RANGES_COUNTED_H
+#ifndef _LIBCUDACXX___RANGES_COUNTED_H
+#define _LIBCUDACXX___RANGES_COUNTED_H
 
 #include <__concepts/convertible_to.h>
 #include <__config>
@@ -23,13 +23,13 @@
 #include <span>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges::views {
 
@@ -37,21 +37,21 @@ namespace __counted {
 
   struct __fn {
     template<contiguous_iterator _It>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     static constexpr auto __go(_It __it, iter_
diff erence_t<_It> __count)
       noexcept(noexcept(span(std::to_address(__it), static_cast<size_t>(__count))))
       // Deliberately omit return-type SFINAE, because to_address is not SFINAE-friendly
       { return          span(std::to_address(__it), static_cast<size_t>(__count)); }
 
     template<random_access_iterator _It>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     static constexpr auto __go(_It __it, iter_
diff erence_t<_It> __count)
       noexcept(noexcept(subrange(__it, __it + __count)))
       -> decltype(      subrange(__it, __it + __count))
       { return          subrange(__it, __it + __count); }
 
     template<class _It>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     static constexpr auto __go(_It __it, iter_
diff erence_t<_It> __count)
       noexcept(noexcept(subrange(counted_iterator(std::move(__it), __count), default_sentinel)))
       -> decltype(      subrange(counted_iterator(std::move(__it), __count), default_sentinel))
@@ -59,7 +59,7 @@ namespace __counted {
 
     template<class _It, convertible_to<iter_
diff erence_t<_It>> _Diff>
       requires input_or_output_iterator<decay_t<_It>>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_It&& __it, _Diff&& __count) const
       noexcept(noexcept(__go(std::forward<_It>(__it), std::forward<_Diff>(__count))))
       -> decltype(      __go(std::forward<_It>(__it), std::forward<_Diff>(__count)))
@@ -74,8 +74,8 @@ inline namespace __cpo {
 
 } // namespace ranges::views
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_COUNTED_H
+#endif // _LIBCUDACXX___RANGES_COUNTED_H

diff  --git a/libcxx/include/__ranges/dangling.h b/libcxx/include/__ranges/dangling.h
index 525b5ff0aabe..f3309a98dc84 100644
--- a/libcxx/include/__ranges/dangling.h
+++ b/libcxx/include/__ranges/dangling.h
@@ -7,26 +7,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANGES_DANGLING_H
-#define _LIBCPP___RANGES_DANGLING_H
+#ifndef _LIBCUDACXX___RANGES_DANGLING_H
+#define _LIBCUDACXX___RANGES_DANGLING_H
 
 #include <__config>
 #include <__ranges/access.h>
 #include <__ranges/concepts.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace ranges {
 struct dangling {
   dangling() = default;
-  _LIBCPP_HIDE_FROM_ABI constexpr dangling(auto&&...) noexcept {}
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr dangling(auto&&...) noexcept {}
 };
 
 template <range _Rp>
@@ -35,8 +35,8 @@ using borrowed_iterator_t = _If<borrowed_range<_Rp>, iterator_t<_Rp>, dangling>;
 // borrowed_subrange_t defined in <__ranges/subrange.h>
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_DANGLING_H
+#endif // _LIBCUDACXX___RANGES_DANGLING_H

diff  --git a/libcxx/include/__ranges/data.h b/libcxx/include/__ranges/data.h
index 35d1af1e648f..ce2d02508884 100644
--- a/libcxx/include/__ranges/data.h
+++ b/libcxx/include/__ranges/data.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_DATA_H
-#define _LIBCPP___RANGES_DATA_H
+#ifndef _LIBCUDACXX___RANGES_DATA_H
+#define _LIBCUDACXX___RANGES_DATA_H
 
 #include <__concepts/class_or_enum.h>
 #include <__config>
@@ -18,13 +18,13 @@
 #include <__utility/auto_cast.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // [range.prim.data]
 
@@ -38,7 +38,7 @@ namespace __data {
     __can_borrow<_Tp> &&
     __workaround_52970<_Tp> &&
     requires(_Tp&& __t) {
-      { _LIBCPP_AUTO_CAST(__t.data()) } -> __ptr_to_object;
+      { _LIBCUDACXX_AUTO_CAST(__t.data()) } -> __ptr_to_object;
     };
 
   template <class _Tp>
@@ -51,14 +51,14 @@ namespace __data {
 
   struct __fn {
     template <__member_data _Tp>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Tp&& __t) const
         noexcept(noexcept(__t.data())) {
       return __t.data();
     }
 
     template<__ranges_begin_invocable _Tp>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Tp&& __t) const
         noexcept(noexcept(std::to_address(ranges::begin(__t)))) {
       return std::to_address(ranges::begin(__t));
@@ -78,7 +78,7 @@ namespace __cdata {
   struct __fn {
     template <class _Tp>
       requires is_lvalue_reference_v<_Tp&&>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Tp&& __t) const
       noexcept(noexcept(ranges::data(static_cast<const remove_reference_t<_Tp>&>(__t))))
       -> decltype(      ranges::data(static_cast<const remove_reference_t<_Tp>&>(__t)))
@@ -86,7 +86,7 @@ namespace __cdata {
 
     template <class _Tp>
       requires is_rvalue_reference_v<_Tp&&>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Tp&& __t) const
       noexcept(noexcept(ranges::data(static_cast<const _Tp&&>(__t))))
       -> decltype(      ranges::data(static_cast<const _Tp&&>(__t)))
@@ -99,8 +99,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_DATA_H
+#endif // _LIBCUDACXX___RANGES_DATA_H

diff  --git a/libcxx/include/__ranges/drop_view.h b/libcxx/include/__ranges/drop_view.h
index b2a8ee581475..7e80f388a9e9 100644
--- a/libcxx/include/__ranges/drop_view.h
+++ b/libcxx/include/__ranges/drop_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_DROP_VIEW_H
-#define _LIBCPP___RANGES_DROP_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_DROP_VIEW_H
+#define _LIBCUDACXX___RANGES_DROP_VIEW_H
 
 #include <__algorithm/min.h>
 #include <__assert>
@@ -36,16 +36,16 @@
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
   template<view _View>
@@ -59,25 +59,25 @@ namespace ranges {
     // one can't call begin() on it more than once.
     static constexpr bool _UseCache = forward_range<_View> && !(random_access_range<_View> && sized_range<_View>);
     using _Cache = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
-    _LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
     range_
diff erence_t<_View> __count_ = 0;
     _View __base_ = _View();
 
 public:
     drop_view() requires default_initializable<_View> = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr drop_view(_View __base, range_
diff erence_t<_View> __count)
       : __count_(__count)
       , __base_(std::move(__base))
     {
-      _LIBCPP_ASSERT(__count_ >= 0, "count must be greater than or equal to zero.");
+      _LIBCUDACXX_ASSERT(__count_ >= 0, "count must be greater than or equal to zero.");
     }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr _View base() const& requires copy_constructible<_View> { return __base_; }
-    _LIBCPP_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _View base() const& requires copy_constructible<_View> { return __base_; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _View base() && { return std::move(__base_); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto begin()
       requires (!(__simple_view<_View> &&
                   random_access_range<const _View> && sized_range<const _View>))
@@ -92,36 +92,36 @@ namespace ranges {
       return __tmp;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto begin() const
       requires random_access_range<const _View> && sized_range<const _View>
     {
       return ranges::next(ranges::begin(__base_), __count_, ranges::end(__base_));
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto end()
       requires (!__simple_view<_View>)
     { return ranges::end(__base_); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto end() const
       requires range<const _View>
     { return ranges::end(__base_); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     static constexpr auto __size(auto& __self) {
       const auto __s = ranges::size(__self.__base_);
       const auto __c = static_cast<decltype(__s)>(__self.__count_);
       return __s < __c ? 0 : __s - __c;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto size()
       requires sized_range<_View>
     { return __size(*this); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto size() const
       requires sized_range<const _View>
     { return __size(*this); }
@@ -195,11 +195,11 @@ struct __fn {
   // [range.drop.overview]: the `empty_view` case.
   template <class _Range, convertible_to<range_
diff erence_t<_Range>> _Np>
     requires __is_empty_view<remove_cvref_t<_Range>>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Range&& __range, _Np&&) const
-    noexcept(noexcept(_LIBCPP_AUTO_CAST(std::forward<_Range>(__range))))
-    -> decltype(      _LIBCPP_AUTO_CAST(std::forward<_Range>(__range)))
-    { return          _LIBCPP_AUTO_CAST(std::forward<_Range>(__range)); }
+    noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(std::forward<_Range>(__range))))
+    -> decltype(      _LIBCUDACXX_AUTO_CAST(std::forward<_Range>(__range)))
+    { return          _LIBCUDACXX_AUTO_CAST(std::forward<_Range>(__range)); }
 
   // [range.drop.overview]: the `span | basic_string_view | iota_view | subrange (StoreSize == false)` case.
   template <class _Range,
@@ -210,7 +210,7 @@ struct __fn {
               random_access_range<_RawRange> &&
               sized_range<_RawRange> &&
               __is_passthrough_specialization<_RawRange>)
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Range&& __rng, _Np&& __n) const
     noexcept(noexcept(__passthrough_type_t<_RawRange>(
                               ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n)),
@@ -235,7 +235,7 @@ struct __fn {
               random_access_range<_RawRange> &&
               sized_range<_RawRange> &&
               __is_subrange_specialization_with_store_size<_RawRange>)
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Range&& __rng, _Np&& __n) const
     noexcept(noexcept(_RawRange(
                               ranges::begin(__rng) + std::min<_Dist>(ranges::distance(__rng), std::forward<_Np>(__n)),
@@ -274,7 +274,7 @@ struct __fn {
                 sized_range<_RawRange> &&
                 random_access_range<_RawRange>)
              ))
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Range&& __range, _Np&& __n) const
     noexcept(noexcept(drop_view(std::forward<_Range>(__range), std::forward<_Np>(__n))))
     -> decltype(      drop_view(std::forward<_Range>(__range), std::forward<_Np>(__n)))
@@ -282,7 +282,7 @@ struct __fn {
 
   template <class _Np>
     requires constructible_from<decay_t<_Np>, _Np>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Np&& __n) const
     noexcept(is_nothrow_constructible_v<decay_t<_Np>, _Np>)
   { return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Np>(__n))); }
@@ -297,10 +297,10 @@ inline namespace __cpo {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANGES_DROP_VIEW_H
+#endif // _LIBCUDACXX___RANGES_DROP_VIEW_H

diff  --git a/libcxx/include/__ranges/empty.h b/libcxx/include/__ranges/empty.h
index 46c97ca7e329..42308cb8cb86 100644
--- a/libcxx/include/__ranges/empty.h
+++ b/libcxx/include/__ranges/empty.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_EMPTY_H
-#define _LIBCPP___RANGES_EMPTY_H
+#ifndef _LIBCUDACXX___RANGES_EMPTY_H
+#define _LIBCUDACXX___RANGES_EMPTY_H
 
 #include <__concepts/class_or_enum.h>
 #include <__config>
@@ -16,13 +16,13 @@
 #include <__ranges/size.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 // [range.prim.empty]
 
@@ -51,19 +51,19 @@ namespace __empty {
 
   struct __fn {
     template <__member_empty _Tp>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
         noexcept(noexcept(bool(__t.empty()))) {
       return bool(__t.empty());
     }
 
     template <__can_invoke_size _Tp>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
         noexcept(noexcept(ranges::size(__t))) {
       return ranges::size(__t) == 0;
     }
 
     template<__can_compare_begin_end _Tp>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr bool operator()(_Tp&& __t) const
         noexcept(noexcept(bool(ranges::begin(__t) == ranges::end(__t)))) {
       return ranges::begin(__t) == ranges::end(__t);
     }
@@ -75,8 +75,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_EMPTY_H
+#endif // _LIBCUDACXX___RANGES_EMPTY_H

diff  --git a/libcxx/include/__ranges/empty_view.h b/libcxx/include/__ranges/empty_view.h
index 3299fe825ddf..428b360955f2 100644
--- a/libcxx/include/__ranges/empty_view.h
+++ b/libcxx/include/__ranges/empty_view.h
@@ -6,32 +6,32 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_EMPTY_VIEW_H
-#define _LIBCPP___RANGES_EMPTY_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_EMPTY_VIEW_H
+#define _LIBCUDACXX___RANGES_EMPTY_VIEW_H
 
 #include <__config>
 #include <__ranges/enable_borrowed_range.h>
 #include <__ranges/view_interface.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
   template<class _Tp>
     requires is_object_v<_Tp>
   class empty_view : public view_interface<empty_view<_Tp>> {
   public:
-    _LIBCPP_HIDE_FROM_ABI static constexpr _Tp* begin() noexcept { return nullptr; }
-    _LIBCPP_HIDE_FROM_ABI static constexpr _Tp* end() noexcept { return nullptr; }
-    _LIBCPP_HIDE_FROM_ABI static constexpr _Tp* data() noexcept { return nullptr; }
-    _LIBCPP_HIDE_FROM_ABI static constexpr size_t size() noexcept { return 0; }
-    _LIBCPP_HIDE_FROM_ABI static constexpr bool empty() noexcept { return true; }
+    _LIBCUDACXX_HIDE_FROM_ABI static constexpr _Tp* begin() noexcept { return nullptr; }
+    _LIBCUDACXX_HIDE_FROM_ABI static constexpr _Tp* end() noexcept { return nullptr; }
+    _LIBCUDACXX_HIDE_FROM_ABI static constexpr _Tp* data() noexcept { return nullptr; }
+    _LIBCUDACXX_HIDE_FROM_ABI static constexpr size_t size() noexcept { return 0; }
+    _LIBCUDACXX_HIDE_FROM_ABI static constexpr bool empty() noexcept { return true; }
   };
 
   template<class _Tp>
@@ -45,8 +45,8 @@ namespace ranges {
   } // namespace views
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_EMPTY_VIEW_H
+#endif // _LIBCUDACXX___RANGES_EMPTY_VIEW_H

diff  --git a/libcxx/include/__ranges/enable_borrowed_range.h b/libcxx/include/__ranges/enable_borrowed_range.h
index 833d266403ca..617e7eff7df8 100644
--- a/libcxx/include/__ranges/enable_borrowed_range.h
+++ b/libcxx/include/__ranges/enable_borrowed_range.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANGES_ENABLE_BORROWED_RANGE_H
-#define _LIBCPP___RANGES_ENABLE_BORROWED_RANGE_H
+#ifndef _LIBCUDACXX___RANGES_ENABLE_BORROWED_RANGE_H
+#define _LIBCUDACXX___RANGES_ENABLE_BORROWED_RANGE_H
 
 // These customization variables are used in <span> and <string_view>. The
 // separate header is used to avoid including the entire <ranges> header in
@@ -16,13 +16,13 @@
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace ranges {
 
@@ -33,8 +33,8 @@ inline constexpr bool enable_borrowed_range = false;
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_ENABLE_BORROWED_RANGE_H
+#endif // _LIBCUDACXX___RANGES_ENABLE_BORROWED_RANGE_H

diff  --git a/libcxx/include/__ranges/enable_view.h b/libcxx/include/__ranges/enable_view.h
index a1e5721404cd..d6cd359901d6 100644
--- a/libcxx/include/__ranges/enable_view.h
+++ b/libcxx/include/__ranges/enable_view.h
@@ -7,20 +7,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANGES_ENABLE_VIEW_H
-#define _LIBCPP___RANGES_ENABLE_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_ENABLE_VIEW_H
+#define _LIBCUDACXX___RANGES_ENABLE_VIEW_H
 
 #include <__config>
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace ranges {
 
@@ -40,8 +40,8 @@ inline constexpr bool enable_view = derived_from<_Tp, view_base> ||
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_ENABLE_VIEW_H
+#endif // _LIBCUDACXX___RANGES_ENABLE_VIEW_H

diff  --git a/libcxx/include/__ranges/filter_view.h b/libcxx/include/__ranges/filter_view.h
index b040ea57b779..11c5f5691f1a 100644
--- a/libcxx/include/__ranges/filter_view.h
+++ b/libcxx/include/__ranges/filter_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_FILTER_VIEW_H
-#define _LIBCPP___RANGES_FILTER_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_FILTER_VIEW_H
+#define _LIBCUDACXX___RANGES_FILTER_VIEW_H
 
 #include <__algorithm/ranges_find_if.h>
 #include <__config>
@@ -33,51 +33,51 @@
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
   template<input_range _View, indirect_unary_predicate<iterator_t<_View>> _Pred>
     requires view<_View> && is_object_v<_Pred>
   class filter_view : public view_interface<filter_view<_View, _Pred>> {
-    _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
-    _LIBCPP_NO_UNIQUE_ADDRESS __copyable_box<_Pred> __pred_;
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _View __base_ = _View();
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS __copyable_box<_Pred> __pred_;
 
     // We cache the result of begin() to allow providing an amortized O(1) begin() whenever
     // the underlying range is at least a forward_range.
     static constexpr bool _UseCache = forward_range<_View>;
     using _Cache = _If<_UseCache, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
-    _LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
 
     class __iterator;
     class __sentinel;
 
   public:
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     filter_view() requires default_initializable<_View> && default_initializable<_Pred> = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr filter_view(_View __base, _Pred __pred)
       : __base_(std::move(__base)), __pred_(in_place, std::move(__pred))
     { }
 
     template<class _Vp = _View>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _View base() const& requires copy_constructible<_Vp> { return __base_; }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _View base() && { return std::move(__base_); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _Pred const& pred() const { return *__pred_; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator begin() {
-      _LIBCPP_ASSERT(__pred_.__has_value(), "Trying to call begin() on a filter_view that does not have a valid predicate.");
+      _LIBCUDACXX_ASSERT(__pred_.__has_value(), "Trying to call begin() on a filter_view that does not have a valid predicate.");
       if constexpr (_UseCache) {
         if (!__cached_begin_.__has_value()) {
           __cached_begin_.__emplace(ranges::find_if(__base_, std::ref(*__pred_)));
@@ -88,7 +88,7 @@ namespace ranges {
       }
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto end() {
       if constexpr (common_range<_View>)
         return __iterator{*this, ranges::end(__base_)};
@@ -117,8 +117,8 @@ namespace ranges {
     requires view<_View> && is_object_v<_Pred>
   class filter_view<_View, _Pred>::__iterator : public __filter_iterator_category<_View> {
   public:
-    _LIBCPP_NO_UNIQUE_ADDRESS iterator_t<_View> __current_ = iterator_t<_View>();
-    _LIBCPP_NO_UNIQUE_ADDRESS filter_view* __parent_ = nullptr;
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS iterator_t<_View> __current_ = iterator_t<_View>();
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS filter_view* __parent_ = nullptr;
 
     using iterator_concept =
       _If<bidirectional_range<_View>, bidirectional_iterator_tag,
@@ -129,72 +129,72 @@ namespace ranges {
     using value_type = range_value_t<_View>;
     using 
diff erence_type = range_
diff erence_t<_View>;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     __iterator() requires default_initializable<iterator_t<_View>> = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator(filter_view& __parent, iterator_t<_View> __current)
       : __current_(std::move(__current)), __parent_(std::addressof(__parent))
     { }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr iterator_t<_View> const& base() const& noexcept { return __current_; }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr iterator_t<_View> base() && { return std::move(__current_); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr range_reference_t<_View> operator*() const { return *__current_; }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr iterator_t<_View> operator->() const
       requires __has_arrow<iterator_t<_View>> && copyable<iterator_t<_View>>
     {
       return __current_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator& operator++() {
       __current_ = ranges::find_if(std::move(++__current_), ranges::end(__parent_->__base_),
                                    std::ref(*__parent_->__pred_));
       return *this;
     }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void operator++(int) { ++*this; }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator operator++(int) requires forward_range<_View> {
       auto __tmp = *this;
       ++*this;
       return __tmp;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator& operator--() requires bidirectional_range<_View> {
       do {
         --__current_;
       } while (!std::invoke(*__parent_->__pred_, *__current_));
       return *this;
     }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator operator--(int) requires bidirectional_range<_View> {
       auto tmp = *this;
       --*this;
       return tmp;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr bool operator==(__iterator const& __x, __iterator const& __y)
       requires equality_comparable<iterator_t<_View>>
     {
       return __x.__current_ == __y.__current_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr range_rvalue_reference_t<_View> iter_move(__iterator const& __it)
       noexcept(noexcept(ranges::iter_move(__it.__current_)))
     {
       return ranges::iter_move(__it.__current_);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr void iter_swap(__iterator const& __x, __iterator const& __y)
       noexcept(noexcept(ranges::iter_swap(__x.__current_, __y.__current_)))
       requires indirectly_swappable<iterator_t<_View>>
@@ -209,18 +209,18 @@ namespace ranges {
   public:
     sentinel_t<_View> __end_ = sentinel_t<_View>();
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     __sentinel() = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit __sentinel(filter_view& __parent)
       : __end_(ranges::end(__parent.__base_))
     { }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr sentinel_t<_View> base() const { return __end_; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr bool operator==(__iterator const& __x, __sentinel const& __y) {
       return __x.__current_ == __y.__end_;
     }
@@ -230,7 +230,7 @@ namespace views {
 namespace __filter {
   struct __fn {
     template<class _Range, class _Pred>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Range&& __range, _Pred&& __pred) const
       noexcept(noexcept(filter_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred))))
       -> decltype(      filter_view(std::forward<_Range>(__range), std::forward<_Pred>(__pred)))
@@ -238,7 +238,7 @@ namespace __filter {
 
     template<class _Pred>
       requires constructible_from<decay_t<_Pred>, _Pred>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Pred&& __pred) const
       noexcept(is_nothrow_constructible_v<decay_t<_Pred>, _Pred>)
     { return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Pred>(__pred))); }
@@ -252,8 +252,8 @@ inline namespace __cpo {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_FILTER_VIEW_H
+#endif // _LIBCUDACXX___RANGES_FILTER_VIEW_H

diff  --git a/libcxx/include/__ranges/iota_view.h b/libcxx/include/__ranges/iota_view.h
index e1f03bafa03a..7580307bd022 100644
--- a/libcxx/include/__ranges/iota_view.h
+++ b/libcxx/include/__ranges/iota_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_IOTA_VIEW_H
-#define _LIBCPP___RANGES_IOTA_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_IOTA_VIEW_H
+#define _LIBCUDACXX___RANGES_IOTA_VIEW_H
 
 #include <__assert>
 #include <__compare/three_way_comparable.h>
@@ -33,13 +33,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
   template<class _Int>
@@ -107,47 +107,47 @@ namespace ranges {
 
       _Start __value_ = _Start();
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       __iterator() requires default_initializable<_Start> = default;
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr explicit __iterator(_Start __value) : __value_(std::move(__value)) {}
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr _Start operator*() const noexcept(is_nothrow_copy_constructible_v<_Start>) {
         return __value_;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr __iterator& operator++() {
         ++__value_;
         return *this;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr void operator++(int) { ++*this; }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr __iterator operator++(int) requires incrementable<_Start> {
         auto __tmp = *this;
         ++*this;
         return __tmp;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr __iterator& operator--() requires __decrementable<_Start> {
         --__value_;
         return *this;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr __iterator  operator--(int) requires __decrementable<_Start> {
         auto __tmp = *this;
         --*this;
         return __tmp;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr __iterator& operator+=(
diff erence_type __n)
         requires __advanceable<_Start>
       {
@@ -163,7 +163,7 @@ namespace ranges {
         return *this;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr __iterator& operator-=(
diff erence_type __n)
         requires __advanceable<_Start>
       {
@@ -179,42 +179,42 @@ namespace ranges {
         return *this;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr _Start operator[](
diff erence_type __n) const
         requires __advanceable<_Start>
       {
         return _Start(__value_ + __n);
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr bool operator==(const __iterator& __x, const __iterator& __y)
         requires equality_comparable<_Start>
       {
         return __x.__value_ == __y.__value_;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr bool operator<(const __iterator& __x, const __iterator& __y)
         requires totally_ordered<_Start>
       {
         return __x.__value_ < __y.__value_;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr bool operator>(const __iterator& __x, const __iterator& __y)
         requires totally_ordered<_Start>
       {
         return __y < __x;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr bool operator<=(const __iterator& __x, const __iterator& __y)
         requires totally_ordered<_Start>
       {
         return !(__y < __x);
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr bool operator>=(const __iterator& __x, const __iterator& __y)
         requires totally_ordered<_Start>
       {
@@ -227,7 +227,7 @@ namespace ranges {
         return __x.__value_ <=> __y.__value_;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr __iterator operator+(__iterator __i, 
diff erence_type __n)
         requires __advanceable<_Start>
       {
@@ -235,14 +235,14 @@ namespace ranges {
         return __i;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr __iterator operator+(
diff erence_type __n, __iterator __i)
         requires __advanceable<_Start>
       {
         return __i + __n;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr __iterator operator-(__iterator __i, 
diff erence_type __n)
         requires __advanceable<_Start>
       {
@@ -250,7 +250,7 @@ namespace ranges {
         return __i;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr 
diff erence_type operator-(const __iterator& __x, const __iterator& __y)
         requires __advanceable<_Start>
       {
@@ -274,23 +274,23 @@ namespace ranges {
       _BoundSentinel __bound_sentinel_ = _BoundSentinel();
 
     public:
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       __sentinel() = default;
       constexpr explicit __sentinel(_BoundSentinel __bound_sentinel) : __bound_sentinel_(std::move(__bound_sentinel)) {}
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr bool operator==(const __iterator& __x, const __sentinel& __y) {
         return __x.__value_ == __y.__bound_sentinel_;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr iter_
diff erence_t<_Start> operator-(const __iterator& __x, const __sentinel& __y)
         requires sized_sentinel_for<_BoundSentinel, _Start>
       {
         return __x.__value_ - __y.__bound_sentinel_;
       }
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       friend constexpr iter_
diff erence_t<_Start> operator-(const __sentinel& __x, const __iterator& __y)
         requires sized_sentinel_for<_BoundSentinel, _Start>
       {
@@ -302,41 +302,41 @@ namespace ranges {
     _BoundSentinel __bound_sentinel_ = _BoundSentinel();
 
   public:
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     iota_view() requires default_initializable<_Start> = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit iota_view(_Start __value) : __value_(std::move(__value)) { }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr iota_view(type_identity_t<_Start> __value, type_identity_t<_BoundSentinel> __bound_sentinel)
         : __value_(std::move(__value)), __bound_sentinel_(std::move(__bound_sentinel)) {
       // Validate the precondition if possible.
       if constexpr (totally_ordered_with<_Start, _BoundSentinel>) {
-        _LIBCPP_ASSERT(ranges::less_equal()(__value_, __bound_sentinel_),
+        _LIBCUDACXX_ASSERT(ranges::less_equal()(__value_, __bound_sentinel_),
                        "Precondition violated: value is greater than bound.");
       }
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr iota_view(__iterator __first, __iterator __last)
       requires same_as<_Start, _BoundSentinel>
     : iota_view(std::move(__first.__value_), std::move(__last.__value_)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr iota_view(__iterator __first, _BoundSentinel __last)
       requires same_as<_BoundSentinel, unreachable_sentinel_t>
     : iota_view(std::move(__first.__value_), std::move(__last)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr iota_view(__iterator __first, __sentinel __last)
       requires(!same_as<_Start, _BoundSentinel> && !same_as<_Start, unreachable_sentinel_t>)
     : iota_view(std::move(__first.__value_), std::move(__last.__bound_sentinel_)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator begin() const { return __iterator{__value_}; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto end() const {
       if constexpr (same_as<_BoundSentinel, unreachable_sentinel_t>)
         return unreachable_sentinel;
@@ -344,14 +344,14 @@ namespace ranges {
         return __sentinel{__bound_sentinel_};
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator end() const
       requires same_as<_Start, _BoundSentinel>
     {
       return __iterator{__bound_sentinel_};
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto size() const
       requires(same_as<_Start, _BoundSentinel> && __advanceable<_Start>) ||
               (integral<_Start> && integral<_BoundSentinel>) || sized_sentinel_for<_BoundSentinel, _Start>
@@ -381,14 +381,14 @@ namespace ranges {
  namespace __iota {
   struct __fn {
     template<class _Start>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Start&& __start) const
       noexcept(noexcept(ranges::iota_view(std::forward<_Start>(__start))))
       -> decltype(      ranges::iota_view(std::forward<_Start>(__start)))
       { return          ranges::iota_view(std::forward<_Start>(__start)); }
 
     template <class _Start, class _BoundSentinel>
-    _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Start&& __start, _BoundSentinel&& __bound_sentinel) const
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Start&& __start, _BoundSentinel&& __bound_sentinel) const
       noexcept(noexcept(ranges::iota_view(std::forward<_Start>(__start), std::forward<_BoundSentinel>(__bound_sentinel))))
       -> decltype(      ranges::iota_view(std::forward<_Start>(__start), std::forward<_BoundSentinel>(__bound_sentinel)))
       { return          ranges::iota_view(std::forward<_Start>(__start), std::forward<_BoundSentinel>(__bound_sentinel)); }
@@ -401,8 +401,8 @@ inline namespace __cpo {
 } // namespace views
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_IOTA_VIEW_H
+#endif // _LIBCUDACXX___RANGES_IOTA_VIEW_H

diff  --git a/libcxx/include/__ranges/join_view.h b/libcxx/include/__ranges/join_view.h
index b6fcce95aeda..28f5cc03f9a8 100644
--- a/libcxx/include/__ranges/join_view.h
+++ b/libcxx/include/__ranges/join_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_JOIN_VIEW_H
-#define _LIBCPP___RANGES_JOIN_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_JOIN_VIEW_H
+#define _LIBCUDACXX___RANGES_JOIN_VIEW_H
 
 #include <__concepts/constructible.h>
 #include <__concepts/convertible_to.h>
@@ -29,13 +29,13 @@
 #include <optional>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
   template<class>
@@ -73,24 +73,24 @@ namespace ranges {
 
     static constexpr bool _UseCache = !is_reference_v<_InnerRange>;
     using _Cache = _If<_UseCache, __non_propagating_cache<remove_cvref_t<_InnerRange>>, __empty_cache>;
-    _LIBCPP_NO_UNIQUE_ADDRESS _Cache __cache_;
-    _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _Cache __cache_;
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _View __base_ = _View();
 
   public:
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     join_view() requires default_initializable<_View> = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit join_view(_View __base)
       : __base_(std::move(__base)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _View base() const& requires copy_constructible<_View> { return __base_; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _View base() && { return std::move(__base_); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto begin() {
       constexpr bool __use_const = __simple_view<_View> &&
                                    is_reference_v<range_reference_t<_View>>;
@@ -98,7 +98,7 @@ namespace ranges {
     }
 
     template<class _V2 = _View>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto begin() const
       requires input_range<const _V2> &&
                is_reference_v<range_reference_t<const _V2>>
@@ -106,7 +106,7 @@ namespace ranges {
       return __iterator<true>{*this, ranges::begin(__base_)};
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto end() {
       if constexpr (forward_range<_View> &&
                     is_reference_v<_InnerRange> &&
@@ -119,7 +119,7 @@ namespace ranges {
     }
 
     template<class _V2 = _View>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto end() const
       requires input_range<const _V2> &&
                is_reference_v<range_reference_t<const _V2>>
@@ -148,21 +148,21 @@ namespace ranges {
     sentinel_t<_Base> __end_ = sentinel_t<_Base>();
 
   public:
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     __sentinel() = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit __sentinel(_Parent& __parent)
       : __end_(ranges::end(__parent.__base_)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __sentinel(__sentinel<!_Const> __s)
       requires _Const && convertible_to<sentinel_t<_View>, sentinel_t<_Base>>
       : __end_(std::move(__s.__end_)) {}
 
     template<bool _OtherConst>
       requires sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr bool operator==(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
       return __x.__outer_ == __y.__end_;
     }
@@ -190,7 +190,7 @@ namespace ranges {
     optional<_Inner> __inner_;
     _Parent *__parent_ = nullptr;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void __satisfy() {
       for (; __outer_ != ranges::end(__parent_->__base_); ++__outer_) {
         auto&& __inner = [&]() -> auto&& {
@@ -225,17 +225,17 @@ namespace ranges {
     using 
diff erence_type = common_type_t<
       range_
diff erence_t<_Base>, range_
diff erence_t<range_reference_t<_Base>>>;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     __iterator() requires default_initializable<_Outer> = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator(_Parent& __parent, _Outer __outer)
       : __outer_(std::move(__outer))
       , __parent_(std::addressof(__parent)) {
       __satisfy();
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator(__iterator<!_Const> __i)
       requires _Const &&
                convertible_to<iterator_t<_View>, _Outer> &&
@@ -244,19 +244,19 @@ namespace ranges {
       , __inner_(std::move(__i.__inner_))
       , __parent_(__i.__parent_) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr decltype(auto) operator*() const {
       return **__inner_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _Inner operator->() const
       requires __has_arrow<_Inner> && copyable<_Inner>
     {
       return *__inner_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator& operator++() {
       auto&& __inner = [&]() -> auto&& {
         if constexpr (__ref_is_glvalue)
@@ -271,12 +271,12 @@ namespace ranges {
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr void operator++(int) {
       ++*this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator operator++(int)
       requires __ref_is_glvalue &&
                forward_range<_Base> &&
@@ -287,7 +287,7 @@ namespace ranges {
       return __tmp;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator& operator--()
       requires __ref_is_glvalue &&
                bidirectional_range<_Base> &&
@@ -306,7 +306,7 @@ namespace ranges {
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __iterator operator--(int)
       requires __ref_is_glvalue &&
                bidirectional_range<_Base> &&
@@ -318,7 +318,7 @@ namespace ranges {
       return __tmp;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr bool operator==(const __iterator& __x, const __iterator& __y)
       requires __ref_is_glvalue &&
                equality_comparable<iterator_t<_Base>> &&
@@ -327,14 +327,14 @@ namespace ranges {
       return __x.__outer_ == __y.__outer_ && __x.__inner_ == __y.__inner_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr decltype(auto) iter_move(const __iterator& __i)
       noexcept(noexcept(ranges::iter_move(*__i.__inner_)))
     {
       return ranges::iter_move(*__i.__inner_);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr void iter_swap(const __iterator& __x, const __iterator& __y)
       noexcept(noexcept(ranges::iter_swap(*__x.__inner_, *__y.__inner_)))
       requires indirectly_swappable<_Inner>
@@ -350,7 +350,7 @@ namespace views {
 namespace __join_view {
 struct __fn : __range_adaptor_closure<__fn> {
   template<class _Range>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Range&& __range) const
     noexcept(noexcept(join_view<all_t<_Range&&>>(std::forward<_Range>(__range))))
     -> decltype(      join_view<all_t<_Range&&>>(std::forward<_Range>(__range)))
@@ -363,8 +363,8 @@ inline namespace __cpo {
 } // namespace views
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_JOIN_VIEW_H
+#endif // _LIBCUDACXX___RANGES_JOIN_VIEW_H

diff  --git a/libcxx/include/__ranges/lazy_split_view.h b/libcxx/include/__ranges/lazy_split_view.h
index e559a76ef7b7..d0b3d17c82f0 100644
--- a/libcxx/include/__ranges/lazy_split_view.h
+++ b/libcxx/include/__ranges/lazy_split_view.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANGES_LAZY_SPLIT_VIEW_H
-#define _LIBCPP___RANGES_LAZY_SPLIT_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_LAZY_SPLIT_VIEW_H
+#define _LIBCUDACXX___RANGES_LAZY_SPLIT_VIEW_H
 
 #include <__algorithm/in_in_result.h>
 #include <__algorithm/ranges_find.h>
@@ -39,13 +39,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
@@ -63,38 +63,38 @@ template <input_range _View, forward_range _Pattern>
            (forward_range<_View> || __tiny_range<_Pattern>)
 class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>> {
 
-  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
-  _LIBCPP_NO_UNIQUE_ADDRESS _Pattern __pattern_ = _Pattern();
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _View __base_ = _View();
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _Pattern __pattern_ = _Pattern();
 
   using _MaybeCurrent = _If<!forward_range<_View>, __non_propagating_cache<iterator_t<_View>>, __empty_cache>;
-  _LIBCPP_NO_UNIQUE_ADDRESS _MaybeCurrent __current_ = _MaybeCurrent();
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _MaybeCurrent __current_ = _MaybeCurrent();
 
   template <bool> struct __outer_iterator;
   template <bool> struct __inner_iterator;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   lazy_split_view()
     requires default_initializable<_View> && default_initializable<_Pattern> = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr lazy_split_view(_View __base, _Pattern __pattern)
     : __base_(std::move(__base)), __pattern_(std::move(__pattern)) {}
 
   template <input_range _Range>
     requires constructible_from<_View, views::all_t<_Range>> &&
              constructible_from<_Pattern, single_view<range_value_t<_Range>>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr lazy_split_view(_Range&& __r, range_value_t<_Range> __e)
     : __base_(views::all(std::forward<_Range>(__r)))
     , __pattern_(views::single(std::move(__e))) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _View base() const& requires copy_constructible<_View> { return __base_; }
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _View base() && { return std::move(__base_); }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto begin() {
     if constexpr (forward_range<_View>) {
       return __outer_iterator<__simple_view<_View> && __simple_view<_Pattern>>{*this, ranges::begin(__base_)};
@@ -104,17 +104,17 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
     }
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto begin() const requires forward_range<_View> && forward_range<const _View> {
     return __outer_iterator<true>{*this, ranges::begin(__base_)};
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto end() requires forward_range<_View> && common_range<_View> {
     return __outer_iterator<__simple_view<_View> && __simple_view<_Pattern>>{*this, ranges::end(__base_)};
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto end() const {
     if constexpr (forward_range<_View> && forward_range<const _View> && common_range<const _View>) {
       return __outer_iterator<true>{*this, ranges::end(__base_)};
@@ -145,10 +145,10 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
 
     _Parent* __parent_ = nullptr;
     using _MaybeCurrent = _If<forward_range<_View>, iterator_t<_Base>, __empty_cache>;
-    _LIBCPP_NO_UNIQUE_ADDRESS _MaybeCurrent __current_ = _MaybeCurrent();
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _MaybeCurrent __current_ = _MaybeCurrent();
     bool __trailing_empty_ = false;
 
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto& __current() noexcept {
       if constexpr (forward_range<_View>) {
         return __current_;
@@ -157,7 +157,7 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
       }
     }
 
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr const auto& __current() const noexcept {
       if constexpr (forward_range<_View>) {
         return __current_;
@@ -168,7 +168,7 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
 
     // Workaround for the GCC issue that doesn't allow calling `__parent_->__base_` from friend functions (because
     // `__base_` is private).
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto& __parent_base() const noexcept {
       return __parent_->__base_;
     }
@@ -183,40 +183,40 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
       __outer_iterator __i_ = __outer_iterator();
 
     public:
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       value_type() = default;
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr explicit value_type(__outer_iterator __i)
         : __i_(std::move(__i)) {}
 
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr __inner_iterator<_Const> begin() const { return __inner_iterator<_Const>{__i_}; }
-      _LIBCPP_HIDE_FROM_ABI
+      _LIBCUDACXX_HIDE_FROM_ABI
       constexpr default_sentinel_t end() const noexcept { return default_sentinel; }
     };
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     __outer_iterator() = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit __outer_iterator(_Parent& __parent)
       requires (!forward_range<_Base>)
       : __parent_(std::addressof(__parent)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __outer_iterator(_Parent& __parent, iterator_t<_Base> __current)
       requires forward_range<_Base>
       : __parent_(std::addressof(__parent)), __current_(std::move(__current)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __outer_iterator(__outer_iterator<!_Const> __i)
       requires _Const && convertible_to<iterator_t<_View>, iterator_t<_Base>>
       : __parent_(__i.__parent_), __current_(std::move(__i.__current_)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr value_type operator*() const { return value_type{*this}; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __outer_iterator& operator++() {
       const auto __end = ranges::end(__parent_->__base_);
       if (__current() == __end) {
@@ -256,7 +256,7 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr decltype(auto) operator++(int) {
       if constexpr (forward_range<_Base>) {
         auto __tmp = *this;
@@ -268,15 +268,15 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
       }
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr bool operator==(const __outer_iterator& __x, const __outer_iterator& __y)
       requires forward_range<_Base> {
       return __x.__current_ == __y.__current_ && __x.__trailing_empty_ == __y.__trailing_empty_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr bool operator==(const __outer_iterator& __x, default_sentinel_t) {
-      _LIBCPP_ASSERT(__x.__parent_, "Cannot call comparison on a default-constructed iterator.");
+      _LIBCUDACXX_ASSERT(__x.__parent_, "Cannot call comparison on a default-constructed iterator.");
       return __x.__current() == ranges::end(__x.__parent_base()) && !__x.__trailing_empty_;
     }
   };
@@ -305,9 +305,9 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
     // Note: these private functions are necessary because GCC doesn't allow calls to private members of `__i_` from
     // free functions that are friends of `inner-iterator`.
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr bool __is_done() const {
-      _LIBCPP_ASSERT(__i_.__parent_, "Cannot call comparison on a default-constructed iterator.");
+      _LIBCUDACXX_ASSERT(__i_.__parent_, "Cannot call comparison on a default-constructed iterator.");
 
       auto [__pcur, __pend] = ranges::subrange{__i_.__parent_->__pattern_};
       auto __end = ranges::end(__i_.__parent_->__base_);
@@ -339,12 +339,12 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
       }
     }
 
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto& __outer_current() noexcept {
       return __i_.__current();
     }
 
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr const auto& __outer_current() const noexcept {
       return __i_.__current();
     }
@@ -355,23 +355,23 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
     using value_type = range_value_t<_Base>;
     using 
diff erence_type = range_
diff erence_t<_Base>;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     __inner_iterator() = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit __inner_iterator(__outer_iterator<_Const> __i)
       : __i_(std::move(__i)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr const iterator_t<_Base>& base() const& noexcept { return __i_.__current(); }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr iterator_t<_Base> base() &&
       requires forward_range<_View> { return std::move(__i_.__current()); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr decltype(auto) operator*() const { return *__i_.__current(); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __inner_iterator& operator++() {
       __incremented_ = true;
 
@@ -385,7 +385,7 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr decltype(auto) operator++(int) {
       if constexpr (forward_range<_Base>) {
         auto __tmp = *this;
@@ -397,24 +397,24 @@ class lazy_split_view : public view_interface<lazy_split_view<_View, _Pattern>>
       }
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr bool operator==(const __inner_iterator& __x, const __inner_iterator& __y)
       requires forward_range<_Base> {
       return __x.__outer_current() == __y.__outer_current();
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr bool operator==(const __inner_iterator& __x, default_sentinel_t) {
       return __x.__is_done();
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr decltype(auto) iter_move(const __inner_iterator& __i)
         noexcept(noexcept(ranges::iter_move(__i.__outer_current()))) {
       return ranges::iter_move(__i.__outer_current());
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr void iter_swap(const __inner_iterator& __x, const __inner_iterator& __y)
         noexcept(noexcept(ranges::iter_swap(__x.__outer_current(), __y.__outer_current())))
         requires indirectly_swappable<iterator_t<_Base>> {
@@ -435,7 +435,7 @@ namespace views {
 namespace __lazy_split_view {
 struct __fn : __range_adaptor_closure<__fn> {
   template <class _Range, class _Pattern>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Range&& __range, _Pattern&& __pattern) const
     noexcept(noexcept(lazy_split_view(std::forward<_Range>(__range), std::forward<_Pattern>(__pattern))))
     -> decltype(      lazy_split_view(std::forward<_Range>(__range), std::forward<_Pattern>(__pattern)))
@@ -443,7 +443,7 @@ struct __fn : __range_adaptor_closure<__fn> {
 
   template <class _Pattern>
     requires constructible_from<decay_t<_Pattern>, _Pattern>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Pattern&& __pattern) const
       noexcept(is_nothrow_constructible_v<decay_t<_Pattern>, _Pattern>) {
     return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Pattern>(__pattern)));
@@ -458,8 +458,8 @@ inline namespace __cpo {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_LAZY_SPLIT_VIEW_H
+#endif // _LIBCUDACXX___RANGES_LAZY_SPLIT_VIEW_H

diff  --git a/libcxx/include/__ranges/non_propagating_cache.h b/libcxx/include/__ranges/non_propagating_cache.h
index 7255705256d7..50528cadad90 100644
--- a/libcxx/include/__ranges/non_propagating_cache.h
+++ b/libcxx/include/__ranges/non_propagating_cache.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_NON_PROPAGATING_CACHE_H
-#define _LIBCPP___RANGES_NON_PROPAGATING_CACHE_H
+#ifndef _LIBCUDACXX___RANGES_NON_PROPAGATING_CACHE_H
+#define _LIBCUDACXX___RANGES_NON_PROPAGATING_CACHE_H
 
 #include <__config>
 #include <__iterator/concepts.h>        // indirectly_readable
@@ -18,13 +18,13 @@
 #include <optional>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
   // __non_propagating_cache is a helper type that allows storing an optional value in it,
@@ -37,7 +37,7 @@ namespace ranges {
   // may refer to internal details of the source view.
   template<class _Tp>
     requires is_object_v<_Tp>
-  class _LIBCPP_TEMPLATE_VIS __non_propagating_cache {
+  class _LIBCUDACXX_TEMPLATE_VIS __non_propagating_cache {
     struct __from_tag { };
     struct __forward_tag { };
 
@@ -54,21 +54,21 @@ namespace ranges {
     optional<__wrapper> __value_ = nullopt;
 
   public:
-    _LIBCPP_HIDE_FROM_ABI __non_propagating_cache() = default;
+    _LIBCUDACXX_HIDE_FROM_ABI __non_propagating_cache() = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __non_propagating_cache(__non_propagating_cache const&) noexcept
       : __value_(nullopt)
     { }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __non_propagating_cache(__non_propagating_cache&& __other) noexcept
       : __value_(nullopt)
     {
       __other.__value_.reset();
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __non_propagating_cache& operator=(__non_propagating_cache const& __other) noexcept {
       if (this != std::addressof(__other)) {
         __value_.reset();
@@ -76,29 +76,29 @@ namespace ranges {
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr __non_propagating_cache& operator=(__non_propagating_cache&& __other) noexcept {
       __value_.reset();
       __other.__value_.reset();
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _Tp& operator*() { return __value_->__t_; }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _Tp const& operator*() const { return __value_->__t_; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr bool __has_value() const { return __value_.has_value(); }
 
     template<class _Fn>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _Tp& __emplace_from(_Fn const& __f) {
       return __value_.emplace(__from_tag{}, __f).__t_;
     }
 
     template<class ..._Args>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _Tp& __emplace(_Args&& ...__args) {
       return __value_.emplace(__forward_tag{}, std::forward<_Args>(__args)...).__t_;
     }
@@ -107,8 +107,8 @@ namespace ranges {
   struct __empty_cache { };
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_NON_PROPAGATING_CACHE_H
+#endif // _LIBCUDACXX___RANGES_NON_PROPAGATING_CACHE_H

diff  --git a/libcxx/include/__ranges/owning_view.h b/libcxx/include/__ranges/owning_view.h
index ac1ef08fecc2..97a67c436fa9 100644
--- a/libcxx/include/__ranges/owning_view.h
+++ b/libcxx/include/__ranges/owning_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_OWNING_VIEW_H
-#define _LIBCPP___RANGES_OWNING_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_OWNING_VIEW_H
+#define _LIBCUDACXX___RANGES_OWNING_VIEW_H
 
 #include <__concepts/constructible.h>
 #include <__concepts/movable.h>
@@ -22,13 +22,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
   template<range _Rp>
@@ -38,34 +38,34 @@ namespace ranges {
 
 public:
     owning_view() requires default_initializable<_Rp> = default;
-    _LIBCPP_HIDE_FROM_ABI constexpr owning_view(_Rp&& __r) : __r_(std::move(__r)) {}
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr owning_view(_Rp&& __r) : __r_(std::move(__r)) {}
 
     owning_view(owning_view&&) = default;
     owning_view& operator=(owning_view&&) = default;
 
-    _LIBCPP_HIDE_FROM_ABI constexpr _Rp& base() & noexcept { return __r_; }
-    _LIBCPP_HIDE_FROM_ABI constexpr const _Rp& base() const& noexcept { return __r_; }
-    _LIBCPP_HIDE_FROM_ABI constexpr _Rp&& base() && noexcept { return std::move(__r_); }
-    _LIBCPP_HIDE_FROM_ABI constexpr const _Rp&& base() const&& noexcept { return std::move(__r_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _Rp& base() & noexcept { return __r_; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr const _Rp& base() const& noexcept { return __r_; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _Rp&& base() && noexcept { return std::move(__r_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr const _Rp&& base() const&& noexcept { return std::move(__r_); }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_Rp> begin() { return ranges::begin(__r_); }
-    _LIBCPP_HIDE_FROM_ABI constexpr sentinel_t<_Rp> end() { return ranges::end(__r_); }
-    _LIBCPP_HIDE_FROM_ABI constexpr auto begin() const requires range<const _Rp> { return ranges::begin(__r_); }
-    _LIBCPP_HIDE_FROM_ABI constexpr auto end() const requires range<const _Rp> { return ranges::end(__r_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator_t<_Rp> begin() { return ranges::begin(__r_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr sentinel_t<_Rp> end() { return ranges::end(__r_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr auto begin() const requires range<const _Rp> { return ranges::begin(__r_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr auto end() const requires range<const _Rp> { return ranges::end(__r_); }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr bool empty() requires requires { ranges::empty(__r_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr bool empty() requires requires { ranges::empty(__r_); }
       { return ranges::empty(__r_); }
-    _LIBCPP_HIDE_FROM_ABI constexpr bool empty() const requires requires { ranges::empty(__r_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr bool empty() const requires requires { ranges::empty(__r_); }
       { return ranges::empty(__r_); }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr auto size() requires sized_range<_Rp>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr auto size() requires sized_range<_Rp>
       { return ranges::size(__r_); }
-    _LIBCPP_HIDE_FROM_ABI constexpr auto size() const requires sized_range<const _Rp>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr auto size() const requires sized_range<const _Rp>
       { return ranges::size(__r_); }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr auto data() requires contiguous_range<_Rp>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr auto data() requires contiguous_range<_Rp>
       { return ranges::data(__r_); }
-    _LIBCPP_HIDE_FROM_ABI constexpr auto data() const requires contiguous_range<const _Rp>
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr auto data() const requires contiguous_range<const _Rp>
       { return ranges::data(__r_); }
   };
 
@@ -74,8 +74,8 @@ namespace ranges {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_OWNING_VIEW_H
+#endif // _LIBCUDACXX___RANGES_OWNING_VIEW_H

diff  --git a/libcxx/include/__ranges/range_adaptor.h b/libcxx/include/__ranges/range_adaptor.h
index b65233b56359..c80cc49d8b2b 100644
--- a/libcxx/include/__ranges/range_adaptor.h
+++ b/libcxx/include/__ranges/range_adaptor.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANGES_RANGE_ADAPTOR_H
-#define _LIBCPP___RANGES_RANGE_ADAPTOR_H
+#ifndef _LIBCUDACXX___RANGES_RANGE_ADAPTOR_H
+#define _LIBCUDACXX___RANGES_RANGE_ADAPTOR_H
 
 #include <__config>
 #include <__functional/compose.h>
@@ -19,13 +19,13 @@
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 // CRTP base that one can derive from in order to be considered a range adaptor closure
 // by the library. When deriving from this class, a pipe operator will be provided to
@@ -50,7 +50,7 @@ struct __range_adaptor_closure {
     template <ranges::viewable_range _View, _RangeAdaptorClosure _Closure>
         requires same_as<_Tp, remove_cvref_t<_Closure>> &&
                  invocable<_Closure, _View>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr decltype(auto) operator|(_View&& __view, _Closure&& __closure)
         noexcept(is_nothrow_invocable_v<_Closure, _View>)
     { return std::invoke(std::forward<_Closure>(__closure), std::forward<_View>(__view)); }
@@ -59,15 +59,15 @@ struct __range_adaptor_closure {
         requires same_as<_Tp, remove_cvref_t<_Closure>> &&
                  constructible_from<decay_t<_Closure>, _Closure> &&
                  constructible_from<decay_t<_OtherClosure>, _OtherClosure>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     friend constexpr auto operator|(_Closure&& __c1, _OtherClosure&& __c2)
         noexcept(is_nothrow_constructible_v<decay_t<_Closure>, _Closure> &&
                  is_nothrow_constructible_v<decay_t<_OtherClosure>, _OtherClosure>)
     { return __range_adaptor_closure_t(std::__compose(std::forward<_OtherClosure>(__c2), std::forward<_Closure>(__c1))); }
 };
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_RANGE_ADAPTOR_H
+#endif // _LIBCUDACXX___RANGES_RANGE_ADAPTOR_H

diff  --git a/libcxx/include/__ranges/rbegin.h b/libcxx/include/__ranges/rbegin.h
index 9291359fdf3b..8cdf8877aa12 100644
--- a/libcxx/include/__ranges/rbegin.h
+++ b/libcxx/include/__ranges/rbegin.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_RBEGIN_H
-#define _LIBCPP___RANGES_RBEGIN_H
+#ifndef _LIBCUDACXX___RANGES_RBEGIN_H
+#define _LIBCUDACXX___RANGES_RBEGIN_H
 
 #include <__concepts/class_or_enum.h>
 #include <__concepts/same_as.h>
@@ -19,13 +19,13 @@
 #include <__utility/auto_cast.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 // [ranges.access.rbegin]
 
@@ -36,7 +36,7 @@ concept __member_rbegin =
   __can_borrow<_Tp> &&
   __workaround_52970<_Tp> &&
   requires(_Tp&& __t) {
-    { _LIBCPP_AUTO_CAST(__t.rbegin()) } -> input_or_output_iterator;
+    { _LIBCUDACXX_AUTO_CAST(__t.rbegin()) } -> input_or_output_iterator;
   };
 
 void rbegin(auto&) = delete;
@@ -48,7 +48,7 @@ concept __unqualified_rbegin =
   __can_borrow<_Tp> &&
   __class_or_enum<remove_cvref_t<_Tp>> &&
   requires(_Tp&& __t) {
-    { _LIBCPP_AUTO_CAST(rbegin(__t)) } -> input_or_output_iterator;
+    { _LIBCUDACXX_AUTO_CAST(rbegin(__t)) } -> input_or_output_iterator;
   };
 
 template <class _Tp>
@@ -64,23 +64,23 @@ concept __can_reverse =
 struct __fn {
   template <class _Tp>
     requires __member_rbegin<_Tp>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
-    noexcept(noexcept(_LIBCPP_AUTO_CAST(__t.rbegin())))
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+    noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(__t.rbegin())))
   {
-    return _LIBCPP_AUTO_CAST(__t.rbegin());
+    return _LIBCUDACXX_AUTO_CAST(__t.rbegin());
   }
 
   template <class _Tp>
     requires __unqualified_rbegin<_Tp>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
-    noexcept(noexcept(_LIBCPP_AUTO_CAST(rbegin(__t))))
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+    noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(rbegin(__t))))
   {
-    return _LIBCPP_AUTO_CAST(rbegin(__t));
+    return _LIBCUDACXX_AUTO_CAST(rbegin(__t));
   }
 
   template <class _Tp>
     requires __can_reverse<_Tp>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
     noexcept(noexcept(ranges::end(__t)))
   {
     return std::make_reverse_iterator(ranges::end(__t));
@@ -102,7 +102,7 @@ namespace __crbegin {
 struct __fn {
   template <class _Tp>
     requires is_lvalue_reference_v<_Tp&&>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Tp&& __t) const
     noexcept(noexcept(ranges::rbegin(static_cast<const remove_reference_t<_Tp>&>(__t))))
     -> decltype(      ranges::rbegin(static_cast<const remove_reference_t<_Tp>&>(__t)))
@@ -110,7 +110,7 @@ struct __fn {
 
   template <class _Tp>
     requires is_rvalue_reference_v<_Tp&&>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Tp&& __t) const
     noexcept(noexcept(ranges::rbegin(static_cast<const _Tp&&>(__t))))
     -> decltype(      ranges::rbegin(static_cast<const _Tp&&>(__t)))
@@ -123,8 +123,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_RBEGIN_H
+#endif // _LIBCUDACXX___RANGES_RBEGIN_H

diff  --git a/libcxx/include/__ranges/ref_view.h b/libcxx/include/__ranges/ref_view.h
index e69c715fb9e4..0d1190167389 100644
--- a/libcxx/include/__ranges/ref_view.h
+++ b/libcxx/include/__ranges/ref_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_REF_VIEW_H
-#define _LIBCPP___RANGES_REF_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_REF_VIEW_H
+#define _LIBCUDACXX___RANGES_REF_VIEW_H
 
 #include <__config>
 #include <__iterator/concepts.h>
@@ -25,13 +25,13 @@
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
   template<range _Range>
@@ -46,27 +46,27 @@ namespace ranges {
     template<class _Tp>
       requires __
diff erent_from<_Tp, ref_view> &&
         convertible_to<_Tp, _Range&> && requires { __fun(declval<_Tp>()); }
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr ref_view(_Tp&& __t)
       : __range_(std::addressof(static_cast<_Range&>(std::forward<_Tp>(__t))))
     {}
 
-    _LIBCPP_HIDE_FROM_ABI constexpr _Range& base() const { return *__range_; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr _Range& base() const { return *__range_; }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr iterator_t<_Range> begin() const { return ranges::begin(*__range_); }
-    _LIBCPP_HIDE_FROM_ABI constexpr sentinel_t<_Range> end() const { return ranges::end(*__range_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator_t<_Range> begin() const { return ranges::begin(*__range_); }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr sentinel_t<_Range> end() const { return ranges::end(*__range_); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr bool empty() const
       requires requires { ranges::empty(*__range_); }
     { return ranges::empty(*__range_); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto size() const
       requires sized_range<_Range>
     { return ranges::size(*__range_); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto data() const
       requires contiguous_range<_Range>
     { return ranges::data(*__range_); }
@@ -79,8 +79,8 @@ namespace ranges {
   inline constexpr bool enable_borrowed_range<ref_view<_Tp>> = true;
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_REF_VIEW_H
+#endif // _LIBCUDACXX___RANGES_REF_VIEW_H

diff  --git a/libcxx/include/__ranges/rend.h b/libcxx/include/__ranges/rend.h
index e507b2587277..cb898f8da5ee 100644
--- a/libcxx/include/__ranges/rend.h
+++ b/libcxx/include/__ranges/rend.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_REND_H
-#define _LIBCPP___RANGES_REND_H
+#ifndef _LIBCUDACXX___RANGES_REND_H
+#define _LIBCUDACXX___RANGES_REND_H
 
 #include <__concepts/class_or_enum.h>
 #include <__concepts/same_as.h>
@@ -20,13 +20,13 @@
 #include <__utility/auto_cast.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 // [range.access.rend]
 
@@ -38,7 +38,7 @@ concept __member_rend =
   __workaround_52970<_Tp> &&
   requires(_Tp&& __t) {
     ranges::rbegin(__t);
-    { _LIBCPP_AUTO_CAST(__t.rend()) } -> sentinel_for<decltype(ranges::rbegin(__t))>;
+    { _LIBCUDACXX_AUTO_CAST(__t.rend()) } -> sentinel_for<decltype(ranges::rbegin(__t))>;
   };
 
 void rend(auto&) = delete;
@@ -51,7 +51,7 @@ concept __unqualified_rend =
   __class_or_enum<remove_cvref_t<_Tp>> &&
   requires(_Tp&& __t) {
     ranges::rbegin(__t);
-    { _LIBCPP_AUTO_CAST(rend(__t)) } -> sentinel_for<decltype(ranges::rbegin(__t))>;
+    { _LIBCUDACXX_AUTO_CAST(rend(__t)) } -> sentinel_for<decltype(ranges::rbegin(__t))>;
   };
 
 template <class _Tp>
@@ -68,23 +68,23 @@ class __fn {
 public:
   template <class _Tp>
     requires __member_rend<_Tp>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
-    noexcept(noexcept(_LIBCPP_AUTO_CAST(__t.rend())))
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+    noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(__t.rend())))
   {
-    return _LIBCPP_AUTO_CAST(__t.rend());
+    return _LIBCUDACXX_AUTO_CAST(__t.rend());
   }
 
   template <class _Tp>
     requires __unqualified_rend<_Tp>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
-    noexcept(noexcept(_LIBCPP_AUTO_CAST(rend(__t))))
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+    noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(rend(__t))))
   {
-    return _LIBCPP_AUTO_CAST(rend(__t));
+    return _LIBCUDACXX_AUTO_CAST(rend(__t));
   }
 
   template <class _Tp>
     requires __can_reverse<_Tp>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
     noexcept(noexcept(ranges::begin(__t)))
   {
     return std::make_reverse_iterator(ranges::begin(__t));
@@ -106,7 +106,7 @@ namespace __crend {
 struct __fn {
   template <class _Tp>
     requires is_lvalue_reference_v<_Tp&&>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Tp&& __t) const
     noexcept(noexcept(ranges::rend(static_cast<const remove_reference_t<_Tp>&>(__t))))
     -> decltype(      ranges::rend(static_cast<const remove_reference_t<_Tp>&>(__t)))
@@ -114,7 +114,7 @@ struct __fn {
 
   template <class _Tp>
     requires is_rvalue_reference_v<_Tp&&>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Tp&& __t) const
     noexcept(noexcept(ranges::rend(static_cast<const _Tp&&>(__t))))
     -> decltype(      ranges::rend(static_cast<const _Tp&&>(__t)))
@@ -127,8 +127,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_REND_H
+#endif // _LIBCUDACXX___RANGES_REND_H

diff  --git a/libcxx/include/__ranges/reverse_view.h b/libcxx/include/__ranges/reverse_view.h
index b1df8fbc337b..d340b966bd88 100644
--- a/libcxx/include/__ranges/reverse_view.h
+++ b/libcxx/include/__ranges/reverse_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_REVERSE_VIEW_H
-#define _LIBCPP___RANGES_REVERSE_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_REVERSE_VIEW_H
+#define _LIBCUDACXX___RANGES_REVERSE_VIEW_H
 
 #include <__concepts/constructible.h>
 #include <__config>
@@ -27,13 +27,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
   template<view _View>
@@ -43,23 +43,23 @@ namespace ranges {
     // amortized O(1) begin() method.
     static constexpr bool _UseCache = !random_access_range<_View> && !common_range<_View>;
     using _Cache = _If<_UseCache, __non_propagating_cache<reverse_iterator<iterator_t<_View>>>, __empty_cache>;
-    _LIBCPP_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
-    _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _Cache __cached_begin_ = _Cache();
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _View __base_ = _View();
 
   public:
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     reverse_view() requires default_initializable<_View> = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit reverse_view(_View __view) : __base_(std::move(__view)) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _View base() const& requires copy_constructible<_View> { return __base_; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _View base() && { return std::move(__base_); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr reverse_iterator<iterator_t<_View>> begin() {
       if constexpr (_UseCache)
         if (__cached_begin_.__has_value())
@@ -71,32 +71,32 @@ namespace ranges {
       return __tmp;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr reverse_iterator<iterator_t<_View>> begin() requires common_range<_View> {
       return std::make_reverse_iterator(ranges::end(__base_));
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto begin() const requires common_range<const _View> {
       return std::make_reverse_iterator(ranges::end(__base_));
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr reverse_iterator<iterator_t<_View>> end() {
       return std::make_reverse_iterator(ranges::begin(__base_));
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto end() const requires common_range<const _View> {
       return std::make_reverse_iterator(ranges::begin(__base_));
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto size() requires sized_range<_View> {
       return ranges::size(__base_);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto size() const requires sized_range<const _View> {
       return ranges::size(__base_);
     }
@@ -141,7 +141,7 @@ namespace ranges {
     struct __fn : __range_adaptor_closure<__fn> {
       template<class _Range>
         requires __is_reverse_view<remove_cvref_t<_Range>>
-      [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+      [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
       constexpr auto operator()(_Range&& __range) const
         noexcept(noexcept(std::forward<_Range>(__range).base()))
         -> decltype(      std::forward<_Range>(__range).base())
@@ -150,7 +150,7 @@ namespace ranges {
       template<class _Range,
                class _UnwrappedSubrange = typename __unwrapped_reverse_subrange<remove_cvref_t<_Range>>::type>
         requires __is_sized_reverse_subrange<remove_cvref_t<_Range>>
-      [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+      [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
       constexpr auto operator()(_Range&& __range) const
         noexcept(noexcept(_UnwrappedSubrange(__range.end().base(), __range.begin().base(), __range.size())))
         -> decltype(      _UnwrappedSubrange(__range.end().base(), __range.begin().base(), __range.size()))
@@ -159,7 +159,7 @@ namespace ranges {
       template<class _Range,
                class _UnwrappedSubrange = typename __unwrapped_reverse_subrange<remove_cvref_t<_Range>>::type>
         requires __is_unsized_reverse_subrange<remove_cvref_t<_Range>>
-      [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+      [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
       constexpr auto operator()(_Range&& __range) const
         noexcept(noexcept(_UnwrappedSubrange(__range.end().base(), __range.begin().base())))
         -> decltype(      _UnwrappedSubrange(__range.end().base(), __range.begin().base()))
@@ -169,7 +169,7 @@ namespace ranges {
         requires (!__is_reverse_view<remove_cvref_t<_Range>> &&
                   !__is_sized_reverse_subrange<remove_cvref_t<_Range>> &&
                   !__is_unsized_reverse_subrange<remove_cvref_t<_Range>>)
-      [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+      [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
       constexpr auto operator()(_Range&& __range) const
         noexcept(noexcept(reverse_view{std::forward<_Range>(__range)}))
         -> decltype(      reverse_view{std::forward<_Range>(__range)})
@@ -183,8 +183,8 @@ namespace ranges {
   } // namespace views
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_REVERSE_VIEW_H
+#endif // _LIBCUDACXX___RANGES_REVERSE_VIEW_H

diff  --git a/libcxx/include/__ranges/single_view.h b/libcxx/include/__ranges/single_view.h
index 98ebe5f3839f..83db236d500f 100644
--- a/libcxx/include/__ranges/single_view.h
+++ b/libcxx/include/__ranges/single_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_SINGLE_VIEW_H
-#define _LIBCPP___RANGES_SINGLE_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_SINGLE_VIEW_H
+#define _LIBCUDACXX___RANGES_SINGLE_VIEW_H
 
 #include <__config>
 #include <__ranges/copyable_box.h>
@@ -19,13 +19,13 @@
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
   template<copy_constructible _Tp>
@@ -34,40 +34,40 @@ namespace ranges {
     __copyable_box<_Tp> __value_;
 
   public:
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     single_view() requires default_initializable<_Tp> = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit single_view(const _Tp& __t) : __value_(in_place, __t) {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit single_view(_Tp&& __t) : __value_(in_place, std::move(__t)) {}
 
     template<class... _Args>
       requires constructible_from<_Tp, _Args...>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr explicit single_view(in_place_t, _Args&&... __args)
       : __value_{in_place, std::forward<_Args>(__args)...} {}
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _Tp* begin() noexcept { return data(); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr const _Tp* begin() const noexcept { return data(); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _Tp* end() noexcept { return data() + 1; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr const _Tp* end() const noexcept { return data() + 1; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     static constexpr size_t size() noexcept { return 1; }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _Tp* data() noexcept { return __value_.operator->(); }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr const _Tp* data() const noexcept { return __value_.operator->(); }
   };
 
@@ -79,7 +79,7 @@ namespace __single_view {
 
 struct __fn : __range_adaptor_closure<__fn> {
   template<class _Range>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Range&& __range) const
     noexcept(noexcept(single_view<decay_t<_Range&&>>(std::forward<_Range>(__range))))
     -> decltype(      single_view<decay_t<_Range&&>>(std::forward<_Range>(__range)))
@@ -94,8 +94,8 @@ inline namespace __cpo {
 } // namespace views
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_SINGLE_VIEW_H
+#endif // _LIBCUDACXX___RANGES_SINGLE_VIEW_H

diff  --git a/libcxx/include/__ranges/size.h b/libcxx/include/__ranges/size.h
index 0e6d295651a3..5da133b4d4f5 100644
--- a/libcxx/include/__ranges/size.h
+++ b/libcxx/include/__ranges/size.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_SIZE_H
-#define _LIBCPP___RANGES_SIZE_H
+#ifndef _LIBCUDACXX___RANGES_SIZE_H
+#define _LIBCUDACXX___RANGES_SIZE_H
 
 #include <__concepts/class_or_enum.h>
 #include <__config>
@@ -19,13 +19,13 @@
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace ranges {
   template<class>
@@ -47,7 +47,7 @@ concept __member_size =
   __size_enabled<_Tp> &&
   __workaround_52970<_Tp> &&
   requires(_Tp&& __t) {
-    { _LIBCPP_AUTO_CAST(__t.size()) } -> __integer_like;
+    { _LIBCUDACXX_AUTO_CAST(__t.size()) } -> __integer_like;
   };
 
 template <class _Tp>
@@ -56,7 +56,7 @@ concept __unqualified_size =
   !__member_size<_Tp> &&
   __class_or_enum<remove_cvref_t<_Tp>> &&
   requires(_Tp&& __t) {
-    { _LIBCPP_AUTO_CAST(size(__t)) } -> __integer_like;
+    { _LIBCUDACXX_AUTO_CAST(size(__t)) } -> __integer_like;
   };
 
 template <class _Tp>
@@ -73,33 +73,33 @@ struct __fn {
 
   // `[range.prim.size]`: the array case (for rvalues).
   template <class _Tp, size_t _Sz>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr size_t operator()(_Tp (&&)[_Sz]) const noexcept {
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr size_t operator()(_Tp (&&)[_Sz]) const noexcept {
     return _Sz;
   }
 
   // `[range.prim.size]`: the array case (for lvalues).
   template <class _Tp, size_t _Sz>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr size_t operator()(_Tp (&)[_Sz]) const noexcept {
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr size_t operator()(_Tp (&)[_Sz]) const noexcept {
     return _Sz;
   }
 
   // `[range.prim.size]`: `auto(t.size())` is a valid expression.
   template <__member_size _Tp>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __integer_like auto operator()(_Tp&& __t) const
-      noexcept(noexcept(_LIBCPP_AUTO_CAST(__t.size()))) {
-    return _LIBCPP_AUTO_CAST(__t.size());
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr __integer_like auto operator()(_Tp&& __t) const
+      noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(__t.size()))) {
+    return _LIBCUDACXX_AUTO_CAST(__t.size());
   }
 
   // `[range.prim.size]`: `auto(size(t))` is a valid expression.
   template <__unqualified_size _Tp>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __integer_like auto operator()(_Tp&& __t) const
-      noexcept(noexcept(_LIBCPP_AUTO_CAST(size(__t)))) {
-    return _LIBCPP_AUTO_CAST(size(__t));
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr __integer_like auto operator()(_Tp&& __t) const
+      noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(size(__t)))) {
+    return _LIBCUDACXX_AUTO_CAST(size(__t));
   }
 
   // [range.prim.size]: the `to-unsigned-like` case.
   template <__
diff erence _Tp>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Tp&& __t) const
     noexcept(noexcept(std::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t))))
     -> decltype(      std::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t)))
     { return          std::__to_unsigned_like(ranges::end(__t) - ranges::begin(__t));
@@ -120,7 +120,7 @@ namespace __ssize {
 struct __fn {
   template<class _Tp>
     requires requires (_Tp&& __t) { ranges::size(__t); }
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr integral auto operator()(_Tp&& __t) const
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr integral auto operator()(_Tp&& __t) const
     noexcept(noexcept(ranges::size(__t))) {
     using _Signed = make_signed_t<decltype(ranges::size(__t))>;
     if constexpr (sizeof(ptr
diff _t) > sizeof(_Signed))
@@ -136,8 +136,8 @@ inline namespace __cpo {
 } // namespace __cpo
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_SIZE_H
+#endif // _LIBCUDACXX___RANGES_SIZE_H

diff  --git a/libcxx/include/__ranges/subrange.h b/libcxx/include/__ranges/subrange.h
index 7e42da6ce7f9..fcb4cc77f26f 100644
--- a/libcxx/include/__ranges/subrange.h
+++ b/libcxx/include/__ranges/subrange.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_SUBRANGE_H
-#define _LIBCPP___RANGES_SUBRANGE_H
+#ifndef _LIBCUDACXX___RANGES_SUBRANGE_H
+#define _LIBCUDACXX___RANGES_SUBRANGE_H
 
 #include <__assert>
 #include <__concepts/constructible.h>
@@ -30,13 +30,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
   template<class _From, class _To>
@@ -67,14 +67,14 @@ namespace ranges {
     __convertible_to_non_slicing<_Iter, tuple_element_t<0, _Pair>> &&
     convertible_to<_Sent, tuple_element_t<1, _Pair>>;
 
-  enum class _LIBCPP_ENUM_VIS subrange_kind : bool { unsized, sized };
+  enum class _LIBCUDACXX_ENUM_VIS subrange_kind : bool { unsized, sized };
 
   template<input_or_output_iterator _Iter, sentinel_for<_Iter> _Sent = _Iter,
            subrange_kind _Kind = sized_sentinel_for<_Sent, _Iter>
              ? subrange_kind::sized
              : subrange_kind::unsized>
     requires (_Kind == subrange_kind::sized || !sized_sentinel_for<_Sent, _Iter>)
-  class _LIBCPP_TEMPLATE_VIS subrange
+  class _LIBCUDACXX_TEMPLATE_VIS subrange
     : public view_interface<subrange<_Iter, _Sent, _Kind>>
   {
   public:
@@ -85,28 +85,28 @@ namespace ranges {
     static constexpr bool _MustProvideSizeAtConstruction = !_StoreSize; // just to improve compiler diagnostics
     struct _Empty { constexpr _Empty(auto) noexcept { } };
     using _Size = conditional_t<_StoreSize, make_unsigned_t<iter_
diff erence_t<_Iter>>, _Empty>;
-    _LIBCPP_NO_UNIQUE_ADDRESS _Iter __begin_ = _Iter();
-    _LIBCPP_NO_UNIQUE_ADDRESS _Sent __end_ = _Sent();
-    _LIBCPP_NO_UNIQUE_ADDRESS _Size __size_ = 0;
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _Iter __begin_ = _Iter();
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _Sent __end_ = _Sent();
+    _LIBCUDACXX_NO_UNIQUE_ADDRESS _Size __size_ = 0;
 
   public:
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     subrange() requires default_initializable<_Iter> = default;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr subrange(__convertible_to_non_slicing<_Iter> auto __iter, _Sent __sent)
       requires _MustProvideSizeAtConstruction
       : __begin_(std::move(__iter)), __end_(std::move(__sent))
     { }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr subrange(__convertible_to_non_slicing<_Iter> auto __iter, _Sent __sent,
                        make_unsigned_t<iter_
diff erence_t<_Iter>> __n)
       requires (_Kind == subrange_kind::sized)
       : __begin_(std::move(__iter)), __end_(std::move(__sent)), __size_(__n)
     {
       if constexpr (sized_sentinel_for<_Sent, _Iter>)
-        _LIBCPP_ASSERT((__end_ - __begin_) == static_cast<iter_
diff erence_t<_Iter>>(__n),
+        _LIBCUDACXX_ASSERT((__end_ - __begin_) == static_cast<iter_
diff erence_t<_Iter>>(__n),
           "std::ranges::subrange was passed an invalid size hint");
     }
 
@@ -114,7 +114,7 @@ namespace ranges {
       requires borrowed_range<_Range> &&
                __convertible_to_non_slicing<iterator_t<_Range>, _Iter> &&
                convertible_to<sentinel_t<_Range>, _Sent>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr subrange(_Range&& __range)
       requires (!_StoreSize)
       : subrange(ranges::begin(__range), ranges::end(__range))
@@ -124,7 +124,7 @@ namespace ranges {
       requires borrowed_range<_Range> &&
                __convertible_to_non_slicing<iterator_t<_Range>, _Iter> &&
                convertible_to<sentinel_t<_Range>, _Sent>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr subrange(_Range&& __range)
       requires _StoreSize && sized_range<_Range>
       : subrange(__range, ranges::size(__range))
@@ -133,7 +133,7 @@ namespace ranges {
     template<borrowed_range _Range>
       requires __convertible_to_non_slicing<iterator_t<_Range>, _Iter> &&
                convertible_to<sentinel_t<_Range>, _Sent>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr subrange(_Range&& __range, make_unsigned_t<iter_
diff erence_t<_Iter>> __n)
       requires (_Kind == subrange_kind::sized)
       : subrange(ranges::begin(__range), ranges::end(__range), __n)
@@ -141,30 +141,30 @@ namespace ranges {
 
     template<__
diff erent_from<subrange> _Pair>
       requires __pair_like_convertible_from<_Pair, const _Iter&, const _Sent&>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr operator _Pair() const {
       return _Pair(__begin_, __end_);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _Iter begin() const requires copyable<_Iter> {
       return __begin_;
     }
 
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr _Iter begin() requires (!copyable<_Iter>) {
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr _Iter begin() requires (!copyable<_Iter>) {
       return std::move(__begin_);
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr _Sent end() const {
       return __end_;
     }
 
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool empty() const {
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr bool empty() const {
       return __begin_ == __end_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr make_unsigned_t<iter_
diff erence_t<_Iter>> size() const
       requires (_Kind == subrange_kind::sized)
     {
@@ -174,7 +174,7 @@ namespace ranges {
         return std::__to_unsigned_like(__end_ - __begin_);
     }
 
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr subrange next(iter_
diff erence_t<_Iter> __n = 1) const&
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange next(iter_
diff erence_t<_Iter> __n = 1) const&
       requires forward_iterator<_Iter>
     {
       auto __tmp = *this;
@@ -182,12 +182,12 @@ namespace ranges {
       return __tmp;
     }
 
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr subrange next(iter_
diff erence_t<_Iter> __n = 1) && {
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange next(iter_
diff erence_t<_Iter> __n = 1) && {
       advance(__n);
       return std::move(*this);
     }
 
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr subrange prev(iter_
diff erence_t<_Iter> __n = 1) const
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr subrange prev(iter_
diff erence_t<_Iter> __n = 1) const
       requires bidirectional_iterator<_Iter>
     {
       auto __tmp = *this;
@@ -195,7 +195,7 @@ namespace ranges {
       return __tmp;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     constexpr subrange& advance(iter_
diff erence_t<_Iter> __n) {
       if constexpr (bidirectional_iterator<_Iter>) {
         if (__n < 0) {
@@ -231,7 +231,7 @@ namespace ranges {
 
   template<size_t _Index, class _Iter, class _Sent, subrange_kind _Kind>
     requires ((_Index == 0 && copyable<_Iter>) || _Index == 1)
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto get(const subrange<_Iter, _Sent, _Kind>& __subrange) {
     if constexpr (_Index == 0)
       return __subrange.begin();
@@ -241,7 +241,7 @@ namespace ranges {
 
   template<size_t _Index, class _Iter, class _Sent, subrange_kind _Kind>
     requires (_Index < 2)
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto get(subrange<_Iter, _Sent, _Kind>&& __subrange) {
     if constexpr (_Index == 0)
       return __subrange.begin();
@@ -285,8 +285,8 @@ struct tuple_element<1, const ranges::subrange<_Ip, _Sp, _Kp>> {
   using type = _Sp;
 };
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_SUBRANGE_H
+#endif // _LIBCUDACXX___RANGES_SUBRANGE_H

diff  --git a/libcxx/include/__ranges/take_view.h b/libcxx/include/__ranges/take_view.h
index 11d5c9fc36bc..f74d28e315a2 100644
--- a/libcxx/include/__ranges/take_view.h
+++ b/libcxx/include/__ranges/take_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_TAKE_VIEW_H
-#define _LIBCPP___RANGES_TAKE_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_TAKE_VIEW_H
+#define _LIBCUDACXX___RANGES_TAKE_VIEW_H
 
 #include <__algorithm/min.h>
 #include <__algorithm/ranges_min.h>
@@ -36,41 +36,41 @@
 #include <concepts>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
 template<view _View>
 class take_view : public view_interface<take_view<_View>> {
-  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _View __base_ = _View();
   range_
diff erence_t<_View> __count_ = 0;
 
   template<bool> class __sentinel;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   take_view() requires default_initializable<_View> = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr take_view(_View __base, range_
diff erence_t<_View> __count)
     : __base_(std::move(__base)), __count_(__count) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _View base() const& requires copy_constructible<_View> { return __base_; }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _View base() && { return std::move(__base_); }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto begin() requires (!__simple_view<_View>) {
     if constexpr (sized_range<_View>) {
       if constexpr (random_access_range<_View>) {
@@ -85,7 +85,7 @@ class take_view : public view_interface<take_view<_View>> {
     }
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto begin() const requires range<const _View> {
     if constexpr (sized_range<const _View>) {
       if constexpr (random_access_range<const _View>) {
@@ -100,7 +100,7 @@ class take_view : public view_interface<take_view<_View>> {
     }
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto end() requires (!__simple_view<_View>) {
     if constexpr (sized_range<_View>) {
       if constexpr (random_access_range<_View>) {
@@ -113,7 +113,7 @@ class take_view : public view_interface<take_view<_View>> {
     }
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto end() const requires range<const _View> {
     if constexpr (sized_range<const _View>) {
       if constexpr (random_access_range<const _View>) {
@@ -126,13 +126,13 @@ class take_view : public view_interface<take_view<_View>> {
     }
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto size() requires sized_range<_View> {
     auto __n = ranges::size(__base_);
     return ranges::min(__n, static_cast<decltype(__n)>(__count_));
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto size() const requires sized_range<const _View> {
     auto __n = ranges::size(__base_);
     return ranges::min(__n, static_cast<decltype(__n)>(__count_));
@@ -145,34 +145,34 @@ class take_view<_View>::__sentinel {
   using _Base = __maybe_const<_Const, _View>;
   template<bool _OtherConst>
   using _Iter = counted_iterator<iterator_t<__maybe_const<_OtherConst, _View>>>;
-  _LIBCPP_NO_UNIQUE_ADDRESS sentinel_t<_Base> __end_ = sentinel_t<_Base>();
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS sentinel_t<_Base> __end_ = sentinel_t<_Base>();
 
   template<bool>
   friend class take_view<_View>::__sentinel;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   __sentinel() = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr explicit __sentinel(sentinel_t<_Base> __end) : __end_(std::move(__end)) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __sentinel(__sentinel<!_Const> __s)
     requires _Const && convertible_to<sentinel_t<_View>, sentinel_t<_Base>>
     : __end_(std::move(__s.__end_)) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr sentinel_t<_Base> base() const { return __end_; }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(const _Iter<_Const>& __lhs, const __sentinel& __rhs) {
     return __lhs.count() == 0 || __lhs.base() == __rhs.__end_;
   }
 
   template<bool _OtherConst = !_Const>
     requires sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(const _Iter<_Const>& __lhs, const __sentinel& __rhs) {
     return __lhs.count() == 0 || __lhs.base() == __rhs.__end_;
   }
@@ -236,11 +236,11 @@ struct __fn {
   // [range.take.overview]: the `empty_view` case.
   template <class _Range, convertible_to<range_
diff erence_t<_Range>> _Np>
     requires __is_empty_view<remove_cvref_t<_Range>>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Range&& __range, _Np&&) const
-    noexcept(noexcept(_LIBCPP_AUTO_CAST(std::forward<_Range>(__range))))
-    -> decltype(      _LIBCPP_AUTO_CAST(std::forward<_Range>(__range)))
-    { return          _LIBCPP_AUTO_CAST(std::forward<_Range>(__range)); }
+    noexcept(noexcept(_LIBCUDACXX_AUTO_CAST(std::forward<_Range>(__range))))
+    -> decltype(      _LIBCUDACXX_AUTO_CAST(std::forward<_Range>(__range)))
+    { return          _LIBCUDACXX_AUTO_CAST(std::forward<_Range>(__range)); }
 
   // [range.take.overview]: the `span | basic_string_view | subrange` case.
   template <class _Range,
@@ -251,7 +251,7 @@ struct __fn {
               random_access_range<_RawRange> &&
               sized_range<_RawRange> &&
               __is_passthrough_specialization<_RawRange>)
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Range&& __rng, _Np&& __n) const
     noexcept(noexcept(__passthrough_type_t<_RawRange>(
                               ranges::begin(__rng),
@@ -276,7 +276,7 @@ struct __fn {
               random_access_range<_RawRange> &&
               sized_range<_RawRange> &&
               __is_iota_specialization<_RawRange>)
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Range&& __rng, _Np&& __n) const
     noexcept(noexcept(ranges::iota_view(
                               *ranges::begin(__rng),
@@ -305,7 +305,7 @@ struct __fn {
                 sized_range<_RawRange> &&
                 random_access_range<_RawRange>)
              ))
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Range&& __range, _Np&& __n) const
     noexcept(noexcept(take_view(std::forward<_Range>(__range), std::forward<_Np>(__n))))
     -> decltype(      take_view(std::forward<_Range>(__range), std::forward<_Np>(__n)))
@@ -313,7 +313,7 @@ struct __fn {
 
   template <class _Np>
     requires constructible_from<decay_t<_Np>, _Np>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator()(_Np&& __n) const
     noexcept(is_nothrow_constructible_v<decay_t<_Np>, _Np>)
   { return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Np>(__n))); }
@@ -328,10 +328,10 @@ inline namespace __cpo {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANGES_TAKE_VIEW_H
+#endif // _LIBCUDACXX___RANGES_TAKE_VIEW_H

diff  --git a/libcxx/include/__ranges/transform_view.h b/libcxx/include/__ranges/transform_view.h
index c5a7128c366b..231c3655c48a 100644
--- a/libcxx/include/__ranges/transform_view.h
+++ b/libcxx/include/__ranges/transform_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_TRANSFORM_VIEW_H
-#define _LIBCPP___RANGES_TRANSFORM_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_TRANSFORM_VIEW_H
+#define _LIBCUDACXX___RANGES_TRANSFORM_VIEW_H
 
 #include <__compare/three_way_comparable.h>
 #include <__concepts/constructible.h>
@@ -35,13 +35,13 @@
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
@@ -61,28 +61,28 @@ class transform_view : public view_interface<transform_view<_View, _Fn>> {
   template<bool> class __iterator;
   template<bool> class __sentinel;
 
-  _LIBCPP_NO_UNIQUE_ADDRESS __copyable_box<_Fn> __func_;
-  _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS __copyable_box<_Fn> __func_;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS _View __base_ = _View();
 
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   transform_view()
     requires default_initializable<_View> && default_initializable<_Fn> = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr transform_view(_View __base, _Fn __func)
     : __func_(std::in_place, std::move(__func)), __base_(std::move(__base)) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _View base() const& requires copy_constructible<_View> { return __base_; }
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _View base() && { return std::move(__base_); }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator<false> begin() {
     return __iterator<false>{*this, ranges::begin(__base_)};
   }
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator<true> begin() const
     requires range<const _View> &&
              __regular_invocable_with_range_ref<const _Fn&, const _View>
@@ -90,24 +90,24 @@ class transform_view : public view_interface<transform_view<_View, _Fn>> {
     return __iterator<true>(*this, ranges::begin(__base_));
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __sentinel<false> end() {
     return __sentinel<false>(ranges::end(__base_));
   }
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator<false> end()
     requires common_range<_View>
   {
     return __iterator<false>(*this, ranges::end(__base_));
   }
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __sentinel<true> end() const
     requires range<const _View> &&
              __regular_invocable_with_range_ref<const _Fn&, const _View>
   {
     return __sentinel<true>(ranges::end(__base_));
   }
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator<true> end() const
     requires common_range<const _View> &&
              __regular_invocable_with_range_ref<const _Fn&, const _View>
@@ -115,9 +115,9 @@ class transform_view : public view_interface<transform_view<_View, _Fn>> {
     return __iterator<true>(*this, ranges::end(__base_));
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto size() requires sized_range<_View> { return ranges::size(__base_); }
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto size() const requires sized_range<const _View> { return ranges::size(__base_); }
 };
 
@@ -178,48 +178,48 @@ class transform_view<_View, _Fn>::__iterator
   using value_type = remove_cvref_t<invoke_result_t<_Fn&, range_reference_t<_Base>>>;
   using 
diff erence_type = range_
diff erence_t<_Base>;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   __iterator() requires default_initializable<iterator_t<_Base>> = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator(_Parent& __parent, iterator_t<_Base> __current)
     : __parent_(std::addressof(__parent)), __current_(std::move(__current)) {}
 
   // Note: `__i` should always be `__iterator<false>`, but directly using
   // `__iterator<false>` is ill-formed when `_Const` is false
   // (see http://wg21.link/class.copy.ctor#5).
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator(__iterator<!_Const> __i)
     requires _Const && convertible_to<iterator_t<_View>, iterator_t<_Base>>
     : __parent_(__i.__parent_), __current_(std::move(__i.__current_)) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr const iterator_t<_Base>& base() const& noexcept {
     return __current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr iterator_t<_Base> base() && {
     return std::move(__current_);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr decltype(auto) operator*() const
     noexcept(noexcept(std::invoke(*__parent_->__func_, *__current_)))
   {
     return std::invoke(*__parent_->__func_, *__current_);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator& operator++() {
     ++__current_;
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr void operator++(int) { ++__current_; }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator operator++(int)
     requires forward_range<_Base>
   {
@@ -228,7 +228,7 @@ class transform_view<_View, _Fn>::__iterator
     return __tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator& operator--()
     requires bidirectional_range<_Base>
   {
@@ -236,7 +236,7 @@ class transform_view<_View, _Fn>::__iterator
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator operator--(int)
     requires bidirectional_range<_Base>
   {
@@ -245,7 +245,7 @@ class transform_view<_View, _Fn>::__iterator
     return __tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator& operator+=(
diff erence_type __n)
     requires random_access_range<_Base>
   {
@@ -253,7 +253,7 @@ class transform_view<_View, _Fn>::__iterator
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator& operator-=(
diff erence_type __n)
     requires random_access_range<_Base>
   {
@@ -261,7 +261,7 @@ class transform_view<_View, _Fn>::__iterator
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr decltype(auto) operator[](
diff erence_type __n) const
     noexcept(noexcept(std::invoke(*__parent_->__func_, __current_[__n])))
     requires random_access_range<_Base>
@@ -269,77 +269,77 @@ class transform_view<_View, _Fn>::__iterator
     return std::invoke(*__parent_->__func_, __current_[__n]);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(const __iterator& __x, const __iterator& __y)
     requires equality_comparable<iterator_t<_Base>>
   {
     return __x.__current_ == __y.__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator<(const __iterator& __x, const __iterator& __y)
     requires random_access_range<_Base>
   {
     return __x.__current_ < __y.__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator>(const __iterator& __x, const __iterator& __y)
     requires random_access_range<_Base>
   {
     return __x.__current_ > __y.__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator<=(const __iterator& __x, const __iterator& __y)
     requires random_access_range<_Base>
   {
     return __x.__current_ <= __y.__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator>=(const __iterator& __x, const __iterator& __y)
     requires random_access_range<_Base>
   {
     return __x.__current_ >= __y.__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr auto operator<=>(const __iterator& __x, const __iterator& __y)
     requires random_access_range<_Base> && three_way_comparable<iterator_t<_Base>>
   {
     return __x.__current_ <=> __y.__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr __iterator operator+(__iterator __i, 
diff erence_type __n)
     requires random_access_range<_Base>
   {
     return __iterator{*__i.__parent_, __i.__current_ + __n};
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr __iterator operator+(
diff erence_type __n, __iterator __i)
     requires random_access_range<_Base>
   {
     return __iterator{*__i.__parent_, __i.__current_ + __n};
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr __iterator operator-(__iterator __i, 
diff erence_type __n)
     requires random_access_range<_Base>
   {
     return __iterator{*__i.__parent_, __i.__current_ - __n};
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr 
diff erence_type operator-(const __iterator& __x, const __iterator& __y)
     requires sized_sentinel_for<iterator_t<_Base>, iterator_t<_Base>>
   {
     return __x.__current_ - __y.__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr decltype(auto) iter_move(const __iterator& __i)
     noexcept(noexcept(*__i))
   {
@@ -366,33 +366,33 @@ class transform_view<_View, _Fn>::__sentinel {
   friend class transform_view<_View, _Fn>::__sentinel;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   __sentinel() = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr explicit __sentinel(sentinel_t<_Base> __end) : __end_(__end) {}
 
   // Note: `__i` should always be `__sentinel<false>`, but directly using
   // `__sentinel<false>` is ill-formed when `_Const` is false
   // (see http://wg21.link/class.copy.ctor#5).
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __sentinel(__sentinel<!_Const> __i)
     requires _Const && convertible_to<sentinel_t<_View>, sentinel_t<_Base>>
     : __end_(std::move(__i.__end_)) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr sentinel_t<_Base> base() const { return __end_; }
 
   template<bool _OtherConst>
     requires sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
     return __x.__current_ == __y.__end_;
   }
 
   template<bool _OtherConst>
     requires sized_sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr range_
diff erence_t<__maybe_const<_OtherConst, _View>>
   operator-(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
     return __x.__current_ - __y.__end_;
@@ -400,7 +400,7 @@ class transform_view<_View, _Fn>::__sentinel {
 
   template<bool _OtherConst>
     requires sized_sentinel_for<sentinel_t<_Base>, iterator_t<__maybe_const<_OtherConst, _View>>>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr range_
diff erence_t<__maybe_const<_OtherConst, _View>>
   operator-(const __sentinel& __x, const __iterator<_OtherConst>& __y) {
     return __x.__end_ - __y.__current_;
@@ -411,7 +411,7 @@ namespace views {
 namespace __transform {
   struct __fn {
     template<class _Range, class _Fn>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Range&& __range, _Fn&& __f) const
       noexcept(noexcept(transform_view(std::forward<_Range>(__range), std::forward<_Fn>(__f))))
       -> decltype(      transform_view(std::forward<_Range>(__range), std::forward<_Fn>(__f)))
@@ -419,7 +419,7 @@ namespace __transform {
 
     template<class _Fn>
       requires constructible_from<decay_t<_Fn>, _Fn>
-    [[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+    [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
     constexpr auto operator()(_Fn&& __f) const
       noexcept(is_nothrow_constructible_v<decay_t<_Fn>, _Fn>)
     { return __range_adaptor_closure_t(std::__bind_back(*this, std::forward<_Fn>(__f))); }
@@ -433,8 +433,8 @@ inline namespace __cpo {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_TRANSFORM_VIEW_H
+#endif // _LIBCUDACXX___RANGES_TRANSFORM_VIEW_H

diff  --git a/libcxx/include/__ranges/view_interface.h b/libcxx/include/__ranges/view_interface.h
index 4b36e02f7d6b..f52b67f5c530 100644
--- a/libcxx/include/__ranges/view_interface.h
+++ b/libcxx/include/__ranges/view_interface.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_VIEW_INTERFACE_H
-#define _LIBCPP___RANGES_VIEW_INTERFACE_H
+#ifndef _LIBCUDACXX___RANGES_VIEW_INTERFACE_H
+#define _LIBCUDACXX___RANGES_VIEW_INTERFACE_H
 
 #include <__assert>
 #include <__concepts/derived_from.h>
@@ -22,26 +22,26 @@
 #include <__ranges/empty.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
 template<class _Derived>
   requires is_class_v<_Derived> && same_as<_Derived, remove_cv_t<_Derived>>
 class view_interface {
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _Derived& __derived() noexcept {
     static_assert(sizeof(_Derived) && derived_from<_Derived, view_interface> && view<_Derived>);
     return static_cast<_Derived&>(*this);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr _Derived const& __derived() const noexcept {
     static_assert(sizeof(_Derived) && derived_from<_Derived, view_interface> && view<_Derived>);
     return static_cast<_Derived const&>(*this);
@@ -49,21 +49,21 @@ class view_interface {
 
 public:
   template<class _D2 = _Derived>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool empty()
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr bool empty()
     requires forward_range<_D2>
   {
     return ranges::begin(__derived()) == ranges::end(__derived());
   }
 
   template<class _D2 = _Derived>
-  [[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr bool empty() const
+  [[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr bool empty() const
     requires forward_range<const _D2>
   {
     return ranges::begin(__derived()) == ranges::end(__derived());
   }
 
   template<class _D2 = _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr explicit operator bool()
     requires requires (_D2& __t) { ranges::empty(__t); }
   {
@@ -71,7 +71,7 @@ class view_interface {
   }
 
   template<class _D2 = _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr explicit operator bool() const
     requires requires (const _D2& __t) { ranges::empty(__t); }
   {
@@ -79,7 +79,7 @@ class view_interface {
   }
 
   template<class _D2 = _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto data()
     requires contiguous_iterator<iterator_t<_D2>>
   {
@@ -87,7 +87,7 @@ class view_interface {
   }
 
   template<class _D2 = _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto data() const
     requires range<const _D2> && contiguous_iterator<iterator_t<const _D2>>
   {
@@ -95,7 +95,7 @@ class view_interface {
   }
 
   template<class _D2 = _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto size()
     requires forward_range<_D2> && sized_sentinel_for<sentinel_t<_D2>, iterator_t<_D2>>
   {
@@ -103,7 +103,7 @@ class view_interface {
   }
 
   template<class _D2 = _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto size() const
     requires forward_range<const _D2> && sized_sentinel_for<sentinel_t<const _D2>, iterator_t<const _D2>>
   {
@@ -111,54 +111,54 @@ class view_interface {
   }
 
   template<class _D2 = _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr decltype(auto) front()
     requires forward_range<_D2>
   {
-    _LIBCPP_ASSERT(!empty(),
+    _LIBCUDACXX_ASSERT(!empty(),
         "Precondition `!empty()` not satisfied. `.front()` called on an empty view.");
     return *ranges::begin(__derived());
   }
 
   template<class _D2 = _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr decltype(auto) front() const
     requires forward_range<const _D2>
   {
-    _LIBCPP_ASSERT(!empty(),
+    _LIBCUDACXX_ASSERT(!empty(),
         "Precondition `!empty()` not satisfied. `.front()` called on an empty view.");
     return *ranges::begin(__derived());
   }
 
   template<class _D2 = _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr decltype(auto) back()
     requires bidirectional_range<_D2> && common_range<_D2>
   {
-    _LIBCPP_ASSERT(!empty(),
+    _LIBCUDACXX_ASSERT(!empty(),
         "Precondition `!empty()` not satisfied. `.back()` called on an empty view.");
     return *ranges::prev(ranges::end(__derived()));
   }
 
   template<class _D2 = _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr decltype(auto) back() const
     requires bidirectional_range<const _D2> && common_range<const _D2>
   {
-    _LIBCPP_ASSERT(!empty(),
+    _LIBCUDACXX_ASSERT(!empty(),
         "Precondition `!empty()` not satisfied. `.back()` called on an empty view.");
     return *ranges::prev(ranges::end(__derived()));
   }
 
   template<random_access_range _RARange = _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr decltype(auto) operator[](range_
diff erence_t<_RARange> __index)
   {
     return ranges::begin(__derived())[__index];
   }
 
   template<random_access_range _RARange = const _Derived>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr decltype(auto) operator[](range_
diff erence_t<_RARange> __index) const
   {
     return ranges::begin(__derived())[__index];
@@ -167,8 +167,8 @@ class view_interface {
 
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_VIEW_INTERFACE_H
+#endif // _LIBCUDACXX___RANGES_VIEW_INTERFACE_H

diff  --git a/libcxx/include/__ranges/views.h b/libcxx/include/__ranges/views.h
index 8cc5ba3d2aca..1b1596a512c5 100644
--- a/libcxx/include/__ranges/views.h
+++ b/libcxx/include/__ranges/views.h
@@ -7,18 +7,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___RANGES_VIEWS
-#define _LIBCPP___RANGES_VIEWS
+#ifndef _LIBCUDACXX___RANGES_VIEWS
+#define _LIBCUDACXX___RANGES_VIEWS
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
@@ -28,8 +28,8 @@ namespace views { }
 
 namespace views = ranges::views;
 
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___RANGES_VIEWS
+#endif // _LIBCUDACXX___RANGES_VIEWS

diff  --git a/libcxx/include/__ranges/zip_view.h b/libcxx/include/__ranges/zip_view.h
index a8035bc79e12..e03381913e5f 100644
--- a/libcxx/include/__ranges/zip_view.h
+++ b/libcxx/include/__ranges/zip_view.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___RANGES_ZIP_VIEW_H
-#define _LIBCPP___RANGES_ZIP_VIEW_H
+#ifndef _LIBCUDACXX___RANGES_ZIP_VIEW_H
+#define _LIBCUDACXX___RANGES_ZIP_VIEW_H
 
 #include <__config>
 
@@ -35,16 +35,16 @@
 #include <tuple>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 20 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 namespace ranges {
 
@@ -64,7 +64,7 @@ template <class... _Types>
 using __tuple_or_pair = decltype(__tuple_or_pair_test<_Types...>());
 
 template <class _Fun, class _Tuple>
-_LIBCPP_HIDE_FROM_ABI constexpr auto __tuple_transform(_Fun&& __f, _Tuple&& __tuple) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr auto __tuple_transform(_Fun&& __f, _Tuple&& __tuple) {
   return std::apply(
       [&]<class... _Types>(_Types&&... __elements) {
         return __tuple_or_pair<invoke_result_t<_Fun&, _Types>...>(
@@ -74,14 +74,14 @@ _LIBCPP_HIDE_FROM_ABI constexpr auto __tuple_transform(_Fun&& __f, _Tuple&& __tu
 }
 
 template <class _Fun, class _Tuple>
-_LIBCPP_HIDE_FROM_ABI constexpr void __tuple_for_each(_Fun&& __f, _Tuple&& __tuple) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void __tuple_for_each(_Fun&& __f, _Tuple&& __tuple) {
   std::apply(
       [&]<class... _Types>(_Types&&... __elements) { (std::invoke(__f, std::forward<_Types>(__elements)), ...); },
       std::forward<_Tuple>(__tuple));
 }
 
 template <class _Fun, class _Tuple1, class _Tuple2, size_t... _Indices>
-_LIBCPP_HIDE_FROM_ABI constexpr __tuple_or_pair<
+_LIBCUDACXX_HIDE_FROM_ABI constexpr __tuple_or_pair<
     invoke_result_t<_Fun&, typename tuple_element<_Indices, remove_cvref_t<_Tuple1>>::type,
                     typename tuple_element<_Indices, remove_cvref_t<_Tuple2>>::type>...>
 __tuple_zip_transform(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2, index_sequence<_Indices...>) {
@@ -90,13 +90,13 @@ __tuple_zip_transform(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2, index_
 }
 
 template <class _Fun, class _Tuple1, class _Tuple2>
-_LIBCPP_HIDE_FROM_ABI constexpr auto __tuple_zip_transform(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr auto __tuple_zip_transform(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2) {
   return ranges::__tuple_zip_transform(__f, std::forward<_Tuple1>(__tuple1), std::forward<_Tuple2>(__tuple2),
                                        std::make_index_sequence<tuple_size<remove_cvref_t<_Tuple1>>::value>());
 }
 
 template <class _Fun, class _Tuple1, class _Tuple2, size_t... _Indices>
-_LIBCPP_HIDE_FROM_ABI constexpr void __tuple_zip_for_each(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2,
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void __tuple_zip_for_each(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2,
                                                           index_sequence<_Indices...>) {
   (std::invoke(__f, std::get<_Indices>(std::forward<_Tuple1>(__tuple1)),
                std::get<_Indices>(std::forward<_Tuple2>(__tuple2))),
@@ -104,13 +104,13 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __tuple_zip_for_each(_Fun&& __f, _Tuple1&&
 }
 
 template <class _Fun, class _Tuple1, class _Tuple2>
-_LIBCPP_HIDE_FROM_ABI constexpr auto __tuple_zip_for_each(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr auto __tuple_zip_for_each(_Fun&& __f, _Tuple1&& __tuple1, _Tuple2&& __tuple2) {
   return ranges::__tuple_zip_for_each(__f, std::forward<_Tuple1>(__tuple1), std::forward<_Tuple2>(__tuple2),
                                       std::make_index_sequence<tuple_size<remove_cvref_t<_Tuple1>>::value>());
 }
 
 template <class _Tuple1, class _Tuple2>
-_LIBCPP_HIDE_FROM_ABI constexpr bool __tuple_any_equals(const _Tuple1& __tuple1, const _Tuple2& __tuple2) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr bool __tuple_any_equals(const _Tuple1& __tuple1, const _Tuple2& __tuple2) {
   const auto __equals = ranges::__tuple_zip_transform(std::equal_to<>(), __tuple1, __tuple2);
   return std::apply([](auto... __bools) { return (__bools || ...); }, __equals);
 }
@@ -118,7 +118,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __tuple_any_equals(const _Tuple1& __tuple1,
 // abs in cstdlib is not constexpr
 // TODO : remove __abs once P0533R9 is implemented.
 template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp __abs(_Tp __t) {
+_LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp __abs(_Tp __t) {
   return __t < 0 ? -__t : __t;
 }
 
@@ -126,7 +126,7 @@ template <input_range... _Views>
   requires(view<_Views> && ...) && (sizeof...(_Views) > 0)
 class zip_view : public view_interface<zip_view<_Views...>> {
 
-  _LIBCPP_NO_UNIQUE_ADDRESS tuple<_Views...> __views_;
+  _LIBCUDACXX_NO_UNIQUE_ADDRESS tuple<_Views...> __views_;
 
   template <bool>
   class __iterator;
@@ -135,25 +135,25 @@ class zip_view : public view_interface<zip_view<_Views...>> {
   class __sentinel;
 
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   zip_view() = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr explicit zip_view(_Views... __views) : __views_(std::move(__views)...) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto begin()
     requires(!(__simple_view<_Views> && ...)) {
     return __iterator<false>(ranges::__tuple_transform(ranges::begin, __views_));
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto begin() const
     requires(range<const _Views> && ...) {
     return __iterator<true>(ranges::__tuple_transform(ranges::begin, __views_));
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto end()
     requires(!(__simple_view<_Views> && ...)) {
     if constexpr (!__zip_is_common<_Views...>) {
@@ -165,7 +165,7 @@ class zip_view : public view_interface<zip_view<_Views...>> {
     }
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto end() const
     requires(range<const _Views> && ...) {
     if constexpr (!__zip_is_common<const _Views...>) {
@@ -177,7 +177,7 @@ class zip_view : public view_interface<zip_view<_Views...>> {
     }
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto size()
     requires(sized_range<_Views> && ...) {
     return std::apply(
@@ -188,7 +188,7 @@ class zip_view : public view_interface<zip_view<_Views...>> {
         ranges::__tuple_transform(ranges::size, __views_));
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto size() const
     requires(sized_range<const _Views> && ...) {
     return std::apply(
@@ -241,7 +241,7 @@ class zip_view<_Views...>::__iterator : public __zip_view_iterator_category_base
 
   __tuple_or_pair<iterator_t<__maybe_const<_Const, _Views>>...> __current_;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr explicit __iterator(__tuple_or_pair<iterator_t<__maybe_const<_Const, _Views>>...> __current)
       : __current_(std::move(__current)) {}
 
@@ -258,29 +258,29 @@ class zip_view<_Views...>::__iterator : public __zip_view_iterator_category_base
   using value_type = __tuple_or_pair<range_value_t<__maybe_const<_Const, _Views>>...>;
   using 
diff erence_type = common_type_t<range_
diff erence_t<__maybe_const<_Const, _Views>>...>;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   __iterator() = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator(__iterator<!_Const> __i)
     requires _Const && (convertible_to<iterator_t<_Views>, iterator_t<__maybe_const<_Const, _Views>>> && ...)
   : __current_(std::move(__i.__current_)) {}
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator*() const {
     return ranges::__tuple_transform([](auto& __i) -> decltype(auto) { return *__i; }, __current_);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator& operator++() {
     ranges::__tuple_for_each([](auto& __i) { ++__i; }, __current_);
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr void operator++(int) { ++*this; }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator operator++(int)
     requires __zip_all_forward<_Const, _Views...> {
     auto __tmp = *this;
@@ -288,14 +288,14 @@ class zip_view<_Views...>::__iterator : public __zip_view_iterator_category_base
     return __tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator& operator--()
     requires __zip_all_bidirectional<_Const, _Views...> {
     ranges::__tuple_for_each([](auto& __i) { --__i; }, __current_);
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator operator--(int)
     requires __zip_all_bidirectional<_Const, _Views...> {
     auto __tmp = *this;
@@ -303,28 +303,28 @@ class zip_view<_Views...>::__iterator : public __zip_view_iterator_category_base
     return __tmp;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator& operator+=(
diff erence_type __x)
     requires __zip_all_random_access<_Const, _Views...> {
     ranges::__tuple_for_each([&]<class _Iter>(_Iter& __i) { __i += iter_
diff erence_t<_Iter>(__x); }, __current_);
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __iterator& operator-=(
diff erence_type __x)
     requires __zip_all_random_access<_Const, _Views...> {
     ranges::__tuple_for_each([&]<class _Iter>(_Iter& __i) { __i -= iter_
diff erence_t<_Iter>(__x); }, __current_);
     return *this;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto operator[](
diff erence_type __n) const
     requires __zip_all_random_access<_Const, _Views...> {
     return ranges::__tuple_transform(
         [&]<class _Iter>(_Iter& __i) -> decltype(auto) { return __i[iter_
diff erence_t<_Iter>(__n)]; }, __current_);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator==(const __iterator& __x, const __iterator& __y)
     requires(equality_comparable<iterator_t<__maybe_const<_Const, _Views>>> && ...) {
     if constexpr (__zip_all_bidirectional<_Const, _Views...>) {
@@ -334,38 +334,38 @@ class zip_view<_Views...>::__iterator : public __zip_view_iterator_category_base
     }
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator<(const __iterator& __x, const __iterator& __y)
     requires __zip_all_random_access<_Const, _Views...> {
     return __x.__current_ < __y.__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator>(const __iterator& __x, const __iterator& __y)
     requires __zip_all_random_access<_Const, _Views...> {
     return __y < __x;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator<=(const __iterator& __x, const __iterator& __y)
     requires __zip_all_random_access<_Const, _Views...> {
     return !(__y < __x);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr bool operator>=(const __iterator& __x, const __iterator& __y)
     requires __zip_all_random_access<_Const, _Views...> {
     return !(__x < __y);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr auto operator<=>(const __iterator& __x, const __iterator& __y)
     requires __zip_all_random_access<_Const, _Views...> &&
              (three_way_comparable<iterator_t<__maybe_const<_Const, _Views>>> && ...) {
     return __x.__current_ <=> __y.__current_;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr __iterator operator+(const __iterator& __i, 
diff erence_type __n)
     requires __zip_all_random_access<_Const, _Views...> {
     auto __r = __i;
@@ -373,13 +373,13 @@ class zip_view<_Views...>::__iterator : public __zip_view_iterator_category_base
     return __r;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr __iterator operator+(
diff erence_type __n, const __iterator& __i)
     requires __zip_all_random_access<_Const, _Views...> {
     return __i + __n;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr __iterator operator-(const __iterator& __i, 
diff erence_type __n)
     requires __zip_all_random_access<_Const, _Views...> {
     auto __r = __i;
@@ -387,7 +387,7 @@ class zip_view<_Views...>::__iterator : public __zip_view_iterator_category_base
     return __r;
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr 
diff erence_type operator-(const __iterator& __x, const __iterator& __y)
     requires(sized_sentinel_for<iterator_t<__maybe_const<_Const, _Views>>, iterator_t<__maybe_const<_Const, _Views>>> &&
              ...) {
@@ -400,14 +400,14 @@ class zip_view<_Views...>::__iterator : public __zip_view_iterator_category_base
         __
diff s);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr auto iter_move(const __iterator& __i) noexcept(
       (noexcept(ranges::iter_move(declval<const iterator_t<__maybe_const<_Const, _Views>>&>())) && ...) &&
       (is_nothrow_move_constructible_v<range_rvalue_reference_t<__maybe_const<_Const, _Views>>> && ...)) {
     return ranges::__tuple_transform(ranges::iter_move, __i.__current_);
   }
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   friend constexpr void iter_swap(const __iterator& __l, const __iterator& __r) noexcept(
       (noexcept(ranges::iter_swap(declval<const iterator_t<__maybe_const<_Const, _Views>>&>(),
                                   declval<const iterator_t<__maybe_const<_Const, _Views>>&>())) &&
@@ -424,23 +424,23 @@ class zip_view<_Views...>::__sentinel {
 
   __tuple_or_pair<sentinel_t<__maybe_const<_Const, _Views>>...> __end_;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr explicit __sentinel(__tuple_or_pair<sentinel_t<__maybe_const<_Const, _Views>>...> __end) : __end_(__end) {}
 
   friend class zip_view<_Views...>;
 
   // hidden friend cannot access private member of iterator because they are friends of friends
   template <bool _OtherConst>
-  _LIBCPP_HIDE_FROM_ABI static constexpr decltype(auto)
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr decltype(auto)
   __iter_current(zip_view<_Views...>::__iterator<_OtherConst> const& __it) {
     return (__it.__current_);
   }
 
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   __sentinel() = default;
 
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __sentinel(__sentinel<!_Const> __i)
     requires _Const && (convertible_to<sentinel_t<_Views>, sentinel_t<__maybe_const<_Const, _Views>>> && ...)
   : __end_(std::move(__i.__end_)) {}
@@ -448,7 +448,7 @@ class zip_view<_Views...>::__sentinel {
   template <bool _OtherConst>
     requires(sentinel_for<sentinel_t<__maybe_const<_Const, _Views>>, iterator_t<__maybe_const<_OtherConst, _Views>>> &&
              ...)
-  _LIBCPP_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
+  _LIBCUDACXX_HIDE_FROM_ABI friend constexpr bool operator==(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
     return ranges::__tuple_any_equals(__iter_current(__x), __y.__end_);
   }
 
@@ -456,7 +456,7 @@ class zip_view<_Views...>::__sentinel {
     requires(
         sized_sentinel_for<sentinel_t<__maybe_const<_Const, _Views>>, iterator_t<__maybe_const<_OtherConst, _Views>>> &&
         ...)
-  _LIBCPP_HIDE_FROM_ABI friend constexpr common_type_t<range_
diff erence_t<__maybe_const<_OtherConst, _Views>>...>
+  _LIBCUDACXX_HIDE_FROM_ABI friend constexpr common_type_t<range_
diff erence_t<__maybe_const<_OtherConst, _Views>>...>
   operator-(const __iterator<_OtherConst>& __x, const __sentinel& __y) {
     const auto __
diff s = ranges::__tuple_zip_transform(minus<>(), __iter_current(__x), __y.__end_);
     return std::apply(
@@ -472,7 +472,7 @@ class zip_view<_Views...>::__sentinel {
     requires(
         sized_sentinel_for<sentinel_t<__maybe_const<_Const, _Views>>, iterator_t<__maybe_const<_OtherConst, _Views>>> &&
         ...)
-  _LIBCPP_HIDE_FROM_ABI friend constexpr common_type_t<range_
diff erence_t<__maybe_const<_OtherConst, _Views>>...>
+  _LIBCUDACXX_HIDE_FROM_ABI friend constexpr common_type_t<range_
diff erence_t<__maybe_const<_OtherConst, _Views>>...>
   operator-(const __sentinel& __y, const __iterator<_OtherConst>& __x) {
     return -(__x - __y);
   }
@@ -485,10 +485,10 @@ namespace views {
 namespace __zip {
 
 struct __fn {
-  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()() const noexcept { return empty_view<tuple<>>{}; }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()() const noexcept { return empty_view<tuple<>>{}; }
 
   template <class... _Ranges>
-  _LIBCPP_HIDE_FROM_ABI constexpr auto operator()(_Ranges&&... __rs) const
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr auto operator()(_Ranges&&... __rs) const
       noexcept(noexcept(zip_view<all_t<_Ranges&&>...>(std::forward<_Ranges>(__rs)...)))
           -> decltype(zip_view<all_t<_Ranges&&>...>(std::forward<_Ranges>(__rs)...)) {
     return zip_view<all_t<_Ranges>...>(std::forward<_Ranges>(__rs)...);
@@ -502,10 +502,10 @@ inline namespace __cpo {
 } // namespace views
 } // namespace ranges
 
-#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 20 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___RANGES_ZIP_VIEW_H
+#endif // _LIBCUDACXX___RANGES_ZIP_VIEW_H

diff  --git a/libcxx/include/__split_buffer b/libcxx/include/__split_buffer
index 4d40732a75cf..f961f4d1207c 100644
--- a/libcxx/include/__split_buffer
+++ b/libcxx/include/__split_buffer
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___SPLIT_BUFFER
-#define _LIBCPP___SPLIT_BUFFER
+#ifndef _LIBCUDACXX___SPLIT_BUFFER
+#define _LIBCUDACXX___SPLIT_BUFFER
 
 #include <__algorithm/max.h>
 #include <__algorithm/move.h>
@@ -24,15 +24,15 @@
 #include <memory>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _Allocator = allocator<_Tp> >
 struct __split_buffer
@@ -62,107 +62,107 @@ public:
     typedef typename add_lvalue_reference<allocator_type>::type __alloc_ref;
     typedef typename add_lvalue_reference<allocator_type>::type __alloc_const_ref;
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY __alloc_rr&           __alloc() _NOEXCEPT         {return __end_cap_.second();}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const __alloc_rr&     __alloc() const _NOEXCEPT   {return __end_cap_.second();}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY pointer&              __end_cap() _NOEXCEPT       {return __end_cap_.first();}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const pointer&        __end_cap() const _NOEXCEPT {return __end_cap_.first();}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY __alloc_rr&           __alloc() _NOEXCEPT         {return __end_cap_.second();}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY const __alloc_rr&     __alloc() const _NOEXCEPT   {return __end_cap_.second();}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY pointer&              __end_cap() _NOEXCEPT       {return __end_cap_.first();}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY const pointer&        __end_cap() const _NOEXCEPT {return __end_cap_.first();}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     __split_buffer()
         _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     explicit __split_buffer(__alloc_rr& __a);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     explicit __split_buffer(const __alloc_rr& __a);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 ~__split_buffer();
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __split_buffer(size_type __cap, size_type __start, __alloc_rr& __a);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 ~__split_buffer();
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer(__split_buffer&& __c)
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __split_buffer(__split_buffer&& __c)
         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __split_buffer& operator=(__split_buffer&& __c)
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __split_buffer(__split_buffer&& __c, const __alloc_rr& __a);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __split_buffer& operator=(__split_buffer&& __c)
         _NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
                 is_nothrow_move_assignable<allocator_type>::value) ||
                !__alloc_traits::propagate_on_container_move_assignment::value);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY       iterator begin() _NOEXCEPT       {return __begin_;}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT {return __begin_;}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY       iterator end() _NOEXCEPT         {return __end_;}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator end() const _NOEXCEPT   {return __end_;}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY       iterator begin() _NOEXCEPT       {return __begin_;}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY const_iterator begin() const _NOEXCEPT {return __begin_;}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY       iterator end() _NOEXCEPT         {return __end_;}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY const_iterator end() const _NOEXCEPT   {return __end_;}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT
         {__destruct_at_end(__begin_);}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type size() const {return static_cast<size_type>(__end_ - __begin_);}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY bool empty()     const {return __end_ == __begin_;}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type capacity() const {return static_cast<size_type>(__end_cap() - __first_);}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type __front_spare() const {return static_cast<size_type>(__begin_ - __first_);}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type __back_spare() const {return static_cast<size_type>(__end_cap() - __end_);}
-
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY       reference front()       {return *__begin_;}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference front() const {return *__begin_;}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY       reference back()        {return *(__end_ - 1);}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference back() const  {return *(__end_ - 1);}
-
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void push_front(const_reference __x);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void push_front(value_type&& __x);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void push_back(value_type&& __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY size_type size() const {return static_cast<size_type>(__end_ - __begin_);}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY bool empty()     const {return __end_ == __begin_;}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY size_type capacity() const {return static_cast<size_type>(__end_cap() - __first_);}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY size_type __front_spare() const {return static_cast<size_type>(__begin_ - __first_);}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY size_type __back_spare() const {return static_cast<size_type>(__end_cap() - __end_);}
+
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY       reference front()       {return *__begin_;}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY const_reference front() const {return *__begin_;}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY       reference back()        {return *(__end_ - 1);}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY const_reference back() const  {return *(__end_ - 1);}
+
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void push_front(const_reference __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY void push_back(const_reference __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void push_front(value_type&& __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void push_back(value_type&& __x);
     template <class... _Args>
-        _LIBCPP_CONSTEXPR_AFTER_CXX17 void emplace_back(_Args&&... __args);
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void emplace_back(_Args&&... __args);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY void pop_front() {__destruct_at_begin(__begin_+1);}
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY void pop_back() {__destruct_at_end(__end_-1);}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n, const_reference __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n, const_reference __x);
     template <class _InputIter>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIter>::value>
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIter>::value>
         __construct_at_end(_InputIter __first, _InputIter __last);
     template <class _ForwardIterator>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value>
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value>
         __construct_at_end(_ForwardIterator __first, _ForwardIterator __last);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void __destruct_at_begin(pointer __new_begin)
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY void __destruct_at_begin(pointer __new_begin)
         {__destruct_at_begin(__new_begin, is_trivially_destructible<value_type>());}
-        _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
         void __destruct_at_begin(pointer __new_begin, false_type);
-        _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
         void __destruct_at_begin(pointer __new_begin, true_type);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void __destruct_at_end(pointer __new_last) _NOEXCEPT
         {__destruct_at_end(__new_last, false_type());}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
         void __destruct_at_end(pointer __new_last, false_type) _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
         void __destruct_at_end(pointer __new_last, true_type) _NOEXCEPT;
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(__split_buffer& __x)
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void swap(__split_buffer& __x)
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value||
                    __is_nothrow_swappable<__alloc_rr>::value);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
 
 private:
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__split_buffer& __c, true_type)
         _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
         {
-            __alloc() = _VSTD::move(__c.__alloc());
+            __alloc() = _CUDA_VSTD::move(__c.__alloc());
         }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__split_buffer&, false_type) _NOEXCEPT
         {}
 
     struct _ConstructTransaction {
-      _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit _ConstructTransaction(pointer* __p, size_type __n) _NOEXCEPT
+      _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit _ConstructTransaction(pointer* __p, size_type __n) _NOEXCEPT
       : __pos_(*__p), __end_(*__p + __n), __dest_(__p) {
       }
-      _LIBCPP_CONSTEXPR_AFTER_CXX17 ~_ConstructTransaction() {
+      _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 ~_ConstructTransaction() {
         *__dest_ = __pos_;
       }
       pointer __pos_;
@@ -173,7 +173,7 @@ private:
 };
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 __split_buffer<_Tp, _Allocator>::__invariants() const
 {
@@ -204,13 +204,13 @@ __split_buffer<_Tp, _Allocator>::__invariants() const
 //  Precondition:  size() + __n <= capacity()
 //  Postcondition:  size() == size() + __n
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n)
 {
     _ConstructTransaction __tx(&this->__end_, __n);
     for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
-        __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_));
+        __alloc_traits::construct(this->__alloc(), _CUDA_VSTD::__to_address(__tx.__pos_));
     }
 }
 
@@ -221,20 +221,20 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n)
 //  Postcondition:  size() == old size() + __n
 //  Postcondition:  [i] == __x for all i in [size() - __n, __n)
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __split_buffer<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
 {
     _ConstructTransaction __tx(&this->__end_, __n);
     for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
         __alloc_traits::construct(this->__alloc(),
-            _VSTD::__to_address(__tx.__pos_), __x);
+            _CUDA_VSTD::__to_address(__tx.__pos_), __x);
     }
 }
 
 template <class _Tp, class _Allocator>
 template <class _InputIter>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIter>::value>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_exactly_cpp17_input_iterator<_InputIter>::value>
 __split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIter __last)
 {
     __alloc_rr& __a = this->__alloc();
@@ -243,42 +243,42 @@ __split_buffer<_Tp, _Allocator>::__construct_at_end(_InputIter __first, _InputIt
         if (__end_ == __end_cap())
         {
             size_type __old_cap = __end_cap() - __first_;
-            size_type __new_cap = _VSTD::max<size_type>(2 * __old_cap, 8);
+            size_type __new_cap = _CUDA_VSTD::max<size_type>(2 * __old_cap, 8);
             __split_buffer __buf(__new_cap, 0, __a);
             for (pointer __p = __begin_; __p != __end_; ++__p, (void) ++__buf.__end_)
                 __alloc_traits::construct(__buf.__alloc(),
-                        _VSTD::__to_address(__buf.__end_), _VSTD::move(*__p));
+                        _CUDA_VSTD::__to_address(__buf.__end_), _CUDA_VSTD::move(*__p));
             swap(__buf);
         }
-        __alloc_traits::construct(__a, _VSTD::__to_address(this->__end_), *__first);
+        __alloc_traits::construct(__a, _CUDA_VSTD::__to_address(this->__end_), *__first);
         ++this->__end_;
     }
 }
 
 template <class _Tp, class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value>
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __enable_if_t<__is_cpp17_forward_iterator<_ForwardIterator>::value>
 __split_buffer<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last)
 {
-    _ConstructTransaction __tx(&this->__end_, _VSTD::distance(__first, __last));
+    _ConstructTransaction __tx(&this->__end_, _CUDA_VSTD::distance(__first, __last));
     for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, (void) ++__first) {
         __alloc_traits::construct(this->__alloc(),
-            _VSTD::__to_address(__tx.__pos_), *__first);
+            _CUDA_VSTD::__to_address(__tx.__pos_), *__first);
     }
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 inline
 void
 __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, false_type)
 {
     while (__begin_ != __new_begin)
-        __alloc_traits::destroy(__alloc(), _VSTD::__to_address(__begin_++));
+        __alloc_traits::destroy(__alloc(), _CUDA_VSTD::__to_address(__begin_++));
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 inline
 void
 __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, true_type)
@@ -287,18 +287,18 @@ __split_buffer<_Tp, _Allocator>::__destruct_at_begin(pointer __new_begin, true_t
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 __split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, false_type) _NOEXCEPT
 {
     while (__new_last != __end_)
-        __alloc_traits::destroy(__alloc(), _VSTD::__to_address(--__end_));
+        __alloc_traits::destroy(__alloc(), _CUDA_VSTD::__to_address(--__end_));
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 __split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, true_type) _NOEXCEPT
 {
@@ -306,7 +306,7 @@ __split_buffer<_Tp, _Allocator>::__destruct_at_end(pointer __new_last, true_type
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __split_buffer<_Tp, _Allocator>::__split_buffer(size_type __cap, size_type __start, __alloc_rr& __a)
     : __end_cap_(nullptr, __a)
 {
@@ -322,7 +322,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(size_type __cap, size_type __sta
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 inline
 __split_buffer<_Tp, _Allocator>::__split_buffer()
     _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
@@ -331,7 +331,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer()
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 inline
 __split_buffer<_Tp, _Allocator>::__split_buffer(__alloc_rr& __a)
     : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a)
@@ -339,7 +339,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(__alloc_rr& __a)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 inline
 __split_buffer<_Tp, _Allocator>::__split_buffer(const __alloc_rr& __a)
     : __first_(nullptr), __begin_(nullptr), __end_(nullptr), __end_cap_(nullptr, __a)
@@ -347,7 +347,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(const __alloc_rr& __a)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __split_buffer<_Tp, _Allocator>::~__split_buffer()
 {
     clear();
@@ -356,13 +356,13 @@ __split_buffer<_Tp, _Allocator>::~__split_buffer()
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
     _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
-    : __first_(_VSTD::move(__c.__first_)),
-      __begin_(_VSTD::move(__c.__begin_)),
-      __end_(_VSTD::move(__c.__end_)),
-      __end_cap_(_VSTD::move(__c.__end_cap_))
+    : __first_(_CUDA_VSTD::move(__c.__first_)),
+      __begin_(_CUDA_VSTD::move(__c.__begin_)),
+      __end_(_CUDA_VSTD::move(__c.__end_)),
+      __end_cap_(_CUDA_VSTD::move(__c.__end_cap_))
 {
     __c.__first_ = nullptr;
     __c.__begin_ = nullptr;
@@ -371,7 +371,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __alloc_rr& __a)
     : __end_cap_(nullptr, __a)
 {
@@ -398,7 +398,7 @@ __split_buffer<_Tp, _Allocator>::__split_buffer(__split_buffer&& __c, const __al
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __split_buffer<_Tp, _Allocator>&
 __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
     _NOEXCEPT_((__alloc_traits::propagate_on_container_move_assignment::value &&
@@ -419,21 +419,21 @@ __split_buffer<_Tp, _Allocator>::operator=(__split_buffer&& __c)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __split_buffer<_Tp, _Allocator>::swap(__split_buffer& __x)
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value||
                    __is_nothrow_swappable<__alloc_rr>::value)
 {
-    _VSTD::swap(__first_, __x.__first_);
-    _VSTD::swap(__begin_, __x.__begin_);
-    _VSTD::swap(__end_, __x.__end_);
-    _VSTD::swap(__end_cap(), __x.__end_cap());
-    _VSTD::__swap_allocator(__alloc(), __x.__alloc());
+    _CUDA_VSTD::swap(__first_, __x.__first_);
+    _CUDA_VSTD::swap(__begin_, __x.__begin_);
+    _CUDA_VSTD::swap(__end_, __x.__end_);
+    _CUDA_VSTD::swap(__end_cap(), __x.__end_cap());
+    _CUDA_VSTD::__swap_allocator(__alloc(), __x.__alloc());
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __split_buffer<_Tp, _Allocator>::reserve(size_type __n)
 {
@@ -442,43 +442,43 @@ __split_buffer<_Tp, _Allocator>::reserve(size_type __n)
         __split_buffer<value_type, __alloc_rr&> __t(__n, 0, __alloc());
         __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                move_iterator<pointer>(__end_));
-        _VSTD::swap(__first_, __t.__first_);
-        _VSTD::swap(__begin_, __t.__begin_);
-        _VSTD::swap(__end_, __t.__end_);
-        _VSTD::swap(__end_cap(), __t.__end_cap());
+        _CUDA_VSTD::swap(__first_, __t.__first_);
+        _CUDA_VSTD::swap(__begin_, __t.__begin_);
+        _CUDA_VSTD::swap(__end_, __t.__end_);
+        _CUDA_VSTD::swap(__end_cap(), __t.__end_cap());
     }
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __split_buffer<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
 {
     if (capacity() > size())
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             __split_buffer<value_type, __alloc_rr&> __t(size(), 0, __alloc());
             __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                    move_iterator<pointer>(__end_));
             __t.__end_ = __t.__begin_ + (__end_ - __begin_);
-            _VSTD::swap(__first_, __t.__first_);
-            _VSTD::swap(__begin_, __t.__begin_);
-            _VSTD::swap(__end_, __t.__end_);
-            _VSTD::swap(__end_cap(), __t.__end_cap());
-#ifndef _LIBCPP_NO_EXCEPTIONS
+            _CUDA_VSTD::swap(__first_, __t.__first_);
+            _CUDA_VSTD::swap(__begin_, __t.__begin_);
+            _CUDA_VSTD::swap(__end_, __t.__end_);
+            _CUDA_VSTD::swap(__end_cap(), __t.__end_cap());
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
 {
@@ -488,7 +488,7 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
         {
             
diff erence_type __d = __end_cap() - __end_;
             __d = (__d + 1) / 2;
-            __begin_ = _VSTD::move_backward(__begin_, __end_, __end_ + __d);
+            __begin_ = _CUDA_VSTD::move_backward(__begin_, __end_, __end_ + __d);
             __end_ += __d;
         }
         else
@@ -497,18 +497,18 @@ __split_buffer<_Tp, _Allocator>::push_front(const_reference __x)
             __split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 3) / 4, __alloc());
             __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                    move_iterator<pointer>(__end_));
-            _VSTD::swap(__first_, __t.__first_);
-            _VSTD::swap(__begin_, __t.__begin_);
-            _VSTD::swap(__end_, __t.__end_);
-            _VSTD::swap(__end_cap(), __t.__end_cap());
+            _CUDA_VSTD::swap(__first_, __t.__first_);
+            _CUDA_VSTD::swap(__begin_, __t.__begin_);
+            _CUDA_VSTD::swap(__end_, __t.__end_);
+            _CUDA_VSTD::swap(__end_cap(), __t.__end_cap());
         }
     }
-    __alloc_traits::construct(__alloc(), _VSTD::__to_address(__begin_-1), __x);
+    __alloc_traits::construct(__alloc(), _CUDA_VSTD::__to_address(__begin_-1), __x);
     --__begin_;
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
 {
@@ -518,7 +518,7 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
         {
             
diff erence_type __d = __end_cap() - __end_;
             __d = (__d + 1) / 2;
-            __begin_ = _VSTD::move_backward(__begin_, __end_, __end_ + __d);
+            __begin_ = _CUDA_VSTD::move_backward(__begin_, __end_, __end_ + __d);
             __end_ += __d;
         }
         else
@@ -527,20 +527,20 @@ __split_buffer<_Tp, _Allocator>::push_front(value_type&& __x)
             __split_buffer<value_type, __alloc_rr&> __t(__c, (__c + 3) / 4, __alloc());
             __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                    move_iterator<pointer>(__end_));
-            _VSTD::swap(__first_, __t.__first_);
-            _VSTD::swap(__begin_, __t.__begin_);
-            _VSTD::swap(__end_, __t.__end_);
-            _VSTD::swap(__end_cap(), __t.__end_cap());
+            _CUDA_VSTD::swap(__first_, __t.__first_);
+            _CUDA_VSTD::swap(__begin_, __t.__begin_);
+            _CUDA_VSTD::swap(__end_, __t.__end_);
+            _CUDA_VSTD::swap(__end_cap(), __t.__end_cap());
         }
     }
-    __alloc_traits::construct(__alloc(), _VSTD::__to_address(__begin_-1),
-            _VSTD::move(__x));
+    __alloc_traits::construct(__alloc(), _CUDA_VSTD::__to_address(__begin_-1),
+            _CUDA_VSTD::move(__x));
     --__begin_;
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 __split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
 {
@@ -550,7 +550,7 @@ __split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
         {
             
diff erence_type __d = __begin_ - __first_;
             __d = (__d + 1) / 2;
-            __end_ = _VSTD::move(__begin_, __end_, __begin_ - __d);
+            __end_ = _CUDA_VSTD::move(__begin_, __end_, __begin_ - __d);
             __begin_ -= __d;
         }
         else
@@ -559,18 +559,18 @@ __split_buffer<_Tp, _Allocator>::push_back(const_reference __x)
             __split_buffer<value_type, __alloc_rr&> __t(__c, __c / 4, __alloc());
             __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                    move_iterator<pointer>(__end_));
-            _VSTD::swap(__first_, __t.__first_);
-            _VSTD::swap(__begin_, __t.__begin_);
-            _VSTD::swap(__end_, __t.__end_);
-            _VSTD::swap(__end_cap(), __t.__end_cap());
+            _CUDA_VSTD::swap(__first_, __t.__first_);
+            _CUDA_VSTD::swap(__begin_, __t.__begin_);
+            _CUDA_VSTD::swap(__end_, __t.__end_);
+            _CUDA_VSTD::swap(__end_cap(), __t.__end_cap());
         }
     }
-    __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_), __x);
+    __alloc_traits::construct(__alloc(), _CUDA_VSTD::__to_address(__end_), __x);
     ++__end_;
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x)
 {
@@ -580,7 +580,7 @@ __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x)
         {
             
diff erence_type __d = __begin_ - __first_;
             __d = (__d + 1) / 2;
-            __end_ = _VSTD::move(__begin_, __end_, __begin_ - __d);
+            __end_ = _CUDA_VSTD::move(__begin_, __end_, __begin_ - __d);
             __begin_ -= __d;
         }
         else
@@ -589,20 +589,20 @@ __split_buffer<_Tp, _Allocator>::push_back(value_type&& __x)
             __split_buffer<value_type, __alloc_rr&> __t(__c, __c / 4, __alloc());
             __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                    move_iterator<pointer>(__end_));
-            _VSTD::swap(__first_, __t.__first_);
-            _VSTD::swap(__begin_, __t.__begin_);
-            _VSTD::swap(__end_, __t.__end_);
-            _VSTD::swap(__end_cap(), __t.__end_cap());
+            _CUDA_VSTD::swap(__first_, __t.__first_);
+            _CUDA_VSTD::swap(__begin_, __t.__begin_);
+            _CUDA_VSTD::swap(__end_, __t.__end_);
+            _CUDA_VSTD::swap(__end_cap(), __t.__end_cap());
         }
     }
-    __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_),
-            _VSTD::move(__x));
+    __alloc_traits::construct(__alloc(), _CUDA_VSTD::__to_address(__end_),
+            _CUDA_VSTD::move(__x));
     ++__end_;
 }
 
 template <class _Tp, class _Allocator>
 template <class... _Args>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
 {
@@ -612,7 +612,7 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
         {
             
diff erence_type __d = __begin_ - __first_;
             __d = (__d + 1) / 2;
-            __end_ = _VSTD::move(__begin_, __end_, __begin_ - __d);
+            __end_ = _CUDA_VSTD::move(__begin_, __end_, __begin_ - __d);
             __begin_ -= __d;
         }
         else
@@ -621,20 +621,20 @@ __split_buffer<_Tp, _Allocator>::emplace_back(_Args&&... __args)
             __split_buffer<value_type, __alloc_rr&> __t(__c, __c / 4, __alloc());
             __t.__construct_at_end(move_iterator<pointer>(__begin_),
                                    move_iterator<pointer>(__end_));
-            _VSTD::swap(__first_, __t.__first_);
-            _VSTD::swap(__begin_, __t.__begin_);
-            _VSTD::swap(__end_, __t.__end_);
-            _VSTD::swap(__end_cap(), __t.__end_cap());
+            _CUDA_VSTD::swap(__first_, __t.__first_);
+            _CUDA_VSTD::swap(__begin_, __t.__begin_);
+            _CUDA_VSTD::swap(__end_, __t.__end_);
+            _CUDA_VSTD::swap(__end_cap(), __t.__end_cap());
         }
     }
-    __alloc_traits::construct(__alloc(), _VSTD::__to_address(__end_),
-                              _VSTD::forward<_Args>(__args)...);
+    __alloc_traits::construct(__alloc(), _CUDA_VSTD::__to_address(__end_),
+                              _CUDA_VSTD::forward<_Args>(__args)...);
     ++__end_;
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(__split_buffer<_Tp, _Allocator>& __x, __split_buffer<_Tp, _Allocator>& __y)
         _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
@@ -642,8 +642,8 @@ swap(__split_buffer<_Tp, _Allocator>& __x, __split_buffer<_Tp, _Allocator>& __y)
     __x.swap(__y);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___SPLIT_BUFFER
+#endif // _LIBCUDACXX___SPLIT_BUFFER

diff  --git a/libcxx/include/__std_stream b/libcxx/include/__std_stream
index e419e8c03af0..84a77d31f292 100644
--- a/libcxx/include/__std_stream
+++ b/libcxx/include/__std_stream
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___STD_STREAM
-#define _LIBCPP___STD_STREAM
+#ifndef _LIBCUDACXX___STD_STREAM
+#define _LIBCUDACXX___STD_STREAM
 
 #include <__config>
 #include <__locale>
@@ -16,22 +16,22 @@
 #include <istream>
 #include <ostream>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 static const int __limit = 8;
 
 // __stdinbuf
 
 template <class _CharT>
-class _LIBCPP_HIDDEN __stdinbuf
+class _LIBCUDACXX_HIDDEN __stdinbuf
     : public basic_streambuf<_CharT, char_traits<_CharT> >
 {
 public:
@@ -116,7 +116,7 @@ __stdinbuf<_CharT>::__getchar(bool __consume)
         return __result;
     }
     char __extbuf[__limit];
-    int __nread = _VSTD::max(1, __encoding_);
+    int __nread = _CUDA_VSTD::max(1, __encoding_);
     for (int __i = 0; __i < __nread; ++__i)
     {
         int __c = getc(__file_);
@@ -139,7 +139,7 @@ __stdinbuf<_CharT>::__getchar(bool __consume)
                                    &__1buf, &__1buf + 1, __inxt);
             switch (__r)
             {
-            case _VSTD::codecvt_base::ok:
+            case _CUDA_VSTD::codecvt_base::ok:
                 break;
             case codecvt_base::partial:
                 *__st_ = __sv_st;
@@ -155,11 +155,11 @@ __stdinbuf<_CharT>::__getchar(bool __consume)
                 break;
             case codecvt_base::error:
                 return traits_type::eof();
-            case _VSTD::codecvt_base::noconv:
+            case _CUDA_VSTD::codecvt_base::noconv:
                 __1buf = static_cast<char_type>(__extbuf[0]);
                 break;
             }
-        } while (__r == _VSTD::codecvt_base::partial);
+        } while (__r == _CUDA_VSTD::codecvt_base::partial);
     }
     if (!__consume)
     {
@@ -197,9 +197,9 @@ __stdinbuf<_CharT>::pbackfail(int_type __c)
         switch (__cv_->out(*__st_, &__ci, &__ci + 1, __inxt,
                                   __extbuf, __extbuf + sizeof(__extbuf), __enxt))
         {
-        case _VSTD::codecvt_base::ok:
+        case _CUDA_VSTD::codecvt_base::ok:
             break;
-        case _VSTD::codecvt_base::noconv:
+        case _CUDA_VSTD::codecvt_base::noconv:
             __extbuf[0] = static_cast<char>(__last_consumed_);
             __enxt = __extbuf + 1;
             break;
@@ -219,7 +219,7 @@ __stdinbuf<_CharT>::pbackfail(int_type __c)
 // __stdoutbuf
 
 template <class _CharT>
-class _LIBCPP_HIDDEN __stdoutbuf
+class _LIBCUDACXX_HIDDEN __stdoutbuf
     : public basic_streambuf<_CharT, char_traits<_CharT> >
 {
 public:
@@ -354,8 +354,8 @@ __stdoutbuf<_CharT>::imbue(const locale& __loc)
     __always_noconv_ = __cv_->always_noconv();
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___STD_STREAM
+#endif // _LIBCUDACXX___STD_STREAM

diff  --git a/libcxx/include/__string/char_traits.h b/libcxx/include/__string/char_traits.h
index 18ad67b28e16..ace45fa66378 100644
--- a/libcxx/include/__string/char_traits.h
+++ b/libcxx/include/__string/char_traits.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___STRING_CHAR_TRAITS_H
-#define _LIBCPP___STRING_CHAR_TRAITS_H
+#ifndef _LIBCUDACXX___STRING_CHAR_TRAITS_H
+#define _LIBCUDACXX___STRING_CHAR_TRAITS_H
 
 #include <__algorithm/copy_n.h>
 #include <__algorithm/fill_n.h>
@@ -23,21 +23,21 @@
 #include <iosfwd>
 #include <type_traits>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 #   include <cwchar> // for wmemcpy
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS char_traits
+struct _LIBCUDACXX_TEMPLATE_VIS char_traits
 {
     typedef _CharT    char_type;
     typedef int       int_type;
@@ -45,42 +45,42 @@ struct _LIBCPP_TEMPLATE_VIS char_traits
     typedef streampos pos_type;
     typedef mbstate_t state_type;
 
-    static inline void _LIBCPP_CONSTEXPR_AFTER_CXX14
+    static inline void _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
         assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
-    static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
         {return __c1 == __c2;}
-    static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
         {return __c1 < __c2;}
 
-    static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     int compare(const char_type* __s1, const char_type* __s2, size_t __n);
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     size_t length(const char_type* __s);
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const char_type* find(const char_type* __s, size_t __n, const char_type& __a);
-    static _LIBCPP_CONSTEXPR_AFTER_CXX17
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type*       move(char_type* __s1, const char_type* __s2, size_t __n);
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type*       copy(char_type* __s1, const char_type* __s2, size_t __n);
-    _LIBCPP_INLINE_VISIBILITY
-    static _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type*       assign(char_type* __s, size_t __n, char_type __a);
 
-    static inline _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
         {return eq_int_type(__c, eof()) ? ~eof() : __c;}
-    static inline _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
         {return char_type(__c);}
-    static inline _LIBCPP_CONSTEXPR int_type  to_int_type(char_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type  to_int_type(char_type __c) _NOEXCEPT
         {return int_type(__c);}
-    static inline _LIBCPP_CONSTEXPR bool      eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool      eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
         {return __c1 == __c2;}
-    static inline _LIBCPP_CONSTEXPR int_type  eof() _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type  eof() _NOEXCEPT
         {return int_type(EOF);}
 };
 
 template <class _CharT>
-_LIBCPP_CONSTEXPR_AFTER_CXX14 int
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX14 int
 char_traits<_CharT>::compare(const char_type* __s1, const char_type* __s2, size_t __n)
 {
     for (; __n; --__n, ++__s1, ++__s2)
@@ -95,7 +95,7 @@ char_traits<_CharT>::compare(const char_type* __s1, const char_type* __s2, size_
 
 template <class _CharT>
 inline
-_LIBCPP_CONSTEXPR_AFTER_CXX14 size_t
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX14 size_t
 char_traits<_CharT>::length(const char_type* __s)
 {
     size_t __len = 0;
@@ -106,7 +106,7 @@ char_traits<_CharT>::length(const char_type* __s)
 
 template <class _CharT>
 inline
-_LIBCPP_CONSTEXPR_AFTER_CXX14 const _CharT*
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX14 const _CharT*
 char_traits<_CharT>::find(const char_type* __s, size_t __n, const char_type& __a)
 {
     for (; __n; --__n)
@@ -119,7 +119,7 @@ char_traits<_CharT>::find(const char_type* __s, size_t __n, const char_type& __a
 }
 
 template <class _CharT>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 _CharT*
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _CharT*
 char_traits<_CharT>::move(char_type* __s1, const char_type* __s2, size_t __n)
 {
     if (__n == 0) return __s1;
@@ -140,12 +140,12 @@ char_traits<_CharT>::move(char_type* __s1, const char_type* __s2, size_t __n)
 }
 
 template <class _CharT>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _CharT*
 char_traits<_CharT>::copy(char_type* __s1, const char_type* __s2, size_t __n)
 {
-    if (!__libcpp_is_constant_evaluated()) {
-        _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
+    if (!__LIBCUDACXX_is_constant_evaluated()) {
+        _LIBCUDACXX_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
     }
     char_type* __r = __s1;
     for (; __n; --__n, ++__s1, ++__s2)
@@ -154,7 +154,7 @@ char_traits<_CharT>::copy(char_type* __s1, const char_type* __s2, size_t __n)
 }
 
 template <class _CharT>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _CharT*
 char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a)
 {
@@ -165,11 +165,11 @@ char_traits<_CharT>::assign(char_type* __s, size_t __n, char_type __a)
 }
 
 template <class _CharT>
-static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+static inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _CharT* __char_traits_move(_CharT* __dest, const _CharT* __source, size_t __n) _NOEXCEPT
 {
-#ifdef _LIBCPP_COMPILER_GCC
-  if (__libcpp_is_constant_evaluated()) {
+#ifdef _LIBCUDACXX_COMPILER_GCC
+  if (__LIBCUDACXX_is_constant_evaluated()) {
     if (__n == 0)
       return __dest;
     _CharT* __allocation = new _CharT[__n];
@@ -186,7 +186,7 @@ _CharT* __char_traits_move(_CharT* __dest, const _CharT* __source, size_t __n) _
 // char_traits<char>
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS char_traits<char>
+struct _LIBCUDACXX_TEMPLATE_VIS char_traits<char>
 {
     typedef char      char_type;
     typedef int       int_type;
@@ -194,21 +194,21 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char>
     typedef streampos pos_type;
     typedef mbstate_t state_type;
 
-    static inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+    static inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
-    static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
             {return __c1 == __c2;}
-    static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
         {return (unsigned char)__c1 < (unsigned char)__c2;}
 
-    static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
 
-    static inline size_t _LIBCPP_CONSTEXPR_AFTER_CXX14 length(const char_type* __s)  _NOEXCEPT {
+    static inline size_t _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 length(const char_type* __s)  _NOEXCEPT {
       // GCC currently does not support __builtin_strlen during constant evaluation.
       // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70816
-#ifdef _LIBCPP_COMPILER_GCC
-      if (__libcpp_is_constant_evaluated()) {
+#ifdef _LIBCUDACXX_COMPILER_GCC
+      if (__LIBCUDACXX_is_constant_evaluated()) {
         size_t __i = 0;
         for (; __s[__i] != char_type('\0'); ++__i)
             ;
@@ -218,41 +218,41 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char>
       return __builtin_strlen(__s);
     }
 
-    static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
 
-    static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+    static inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
         return std::__char_traits_move(__s1, __s2, __n);
     }
 
-    static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+    static inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
-        if (!__libcpp_is_constant_evaluated())
-            _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
+        if (!__LIBCUDACXX_is_constant_evaluated())
+            _LIBCUDACXX_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
         std::copy_n(__s2, __n, __s1);
         return __s1;
     }
 
-    static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+    static inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
         std::fill_n(__s, __n, __a);
         return __s;
     }
 
-    static inline _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
         {return eq_int_type(__c, eof()) ? ~eof() : __c;}
-    static inline _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
         {return char_type(__c);}
-    static inline _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
         {return int_type((unsigned char)__c);}
-    static inline _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
         {return __c1 == __c2;}
-    static inline _LIBCPP_CONSTEXPR int_type  eof() _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type  eof() _NOEXCEPT
         {return int_type(EOF);}
 };
 
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 int
 char_traits<char>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
 {
@@ -260,8 +260,8 @@ char_traits<char>::compare(const char_type* __s1, const char_type* __s2, size_t
         return 0;
 #if __has_feature(cxx_constexpr_string_builtins)
     return __builtin_memcmp(__s1, __s2, __n);
-#elif _LIBCPP_STD_VER <= 14
-    return _VSTD::memcmp(__s1, __s2, __n);
+#elif _LIBCUDACXX_STD_VER <= 14
+    return _CUDA_VSTD::memcmp(__s1, __s2, __n);
 #else
     for (; __n; --__n, ++__s1, ++__s2)
     {
@@ -274,7 +274,7 @@ char_traits<char>::compare(const char_type* __s1, const char_type* __s2, size_t
 #endif
 }
 
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 const char*
 char_traits<char>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
 {
@@ -282,8 +282,8 @@ char_traits<char>::find(const char_type* __s, size_t __n, const char_type& __a)
         return nullptr;
 #if __has_feature(cxx_constexpr_string_builtins)
     return __builtin_char_memchr(__s, to_int_type(__a), __n);
-#elif _LIBCPP_STD_VER <= 14
-    return (const char_type*) _VSTD::memchr(__s, to_int_type(__a), __n);
+#elif _LIBCUDACXX_STD_VER <= 14
+    return (const char_type*) _CUDA_VSTD::memchr(__s, to_int_type(__a), __n);
 #else
     for (; __n; --__n)
     {
@@ -298,9 +298,9 @@ char_traits<char>::find(const char_type* __s, size_t __n, const char_type& __a)
 
 // char_traits<wchar_t>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t>
+struct _LIBCUDACXX_TEMPLATE_VIS char_traits<wchar_t>
 {
     typedef wchar_t   char_type;
     typedef wint_t    int_type;
@@ -308,52 +308,52 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<wchar_t>
     typedef streampos pos_type;
     typedef mbstate_t state_type;
 
-    static inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+    static inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
-    static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
         {return __c1 == __c2;}
-    static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
         {return __c1 < __c2;}
 
-    static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     int compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
-    static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     size_t length(const char_type* __s) _NOEXCEPT;
-    static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
 
-    static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+    static inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type* move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
         return std::__char_traits_move(__s1, __s2, __n);
     }
 
-    static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+    static inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type* copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
-        if (!__libcpp_is_constant_evaluated())
-            _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
+        if (!__LIBCUDACXX_is_constant_evaluated())
+            _LIBCUDACXX_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
         std::copy_n(__s2, __n, __s1);
         return __s1;
     }
 
-    static inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+    static inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type* assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
         std::fill_n(__s, __n, __a);
         return __s;
     }
 
-    static inline _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
         {return eq_int_type(__c, eof()) ? ~eof() : __c;}
-    static inline _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
         {return char_type(__c);}
-    static inline _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
         {return int_type(__c);}
-    static inline _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
         {return __c1 == __c2;}
-    static inline _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type eof() _NOEXCEPT
         {return int_type(WEOF);}
 };
 
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 int
 char_traits<wchar_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
 {
@@ -361,8 +361,8 @@ char_traits<wchar_t>::compare(const char_type* __s1, const char_type* __s2, size
         return 0;
 #if __has_feature(cxx_constexpr_string_builtins)
     return __builtin_wmemcmp(__s1, __s2, __n);
-#elif _LIBCPP_STD_VER <= 14
-    return _VSTD::wmemcmp(__s1, __s2, __n);
+#elif _LIBCUDACXX_STD_VER <= 14
+    return _CUDA_VSTD::wmemcmp(__s1, __s2, __n);
 #else
     for (; __n; --__n, ++__s1, ++__s2)
     {
@@ -375,14 +375,14 @@ char_traits<wchar_t>::compare(const char_type* __s1, const char_type* __s2, size
 #endif
 }
 
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 size_t
 char_traits<wchar_t>::length(const char_type* __s) _NOEXCEPT
 {
 #if __has_feature(cxx_constexpr_string_builtins)
     return __builtin_wcslen(__s);
-#elif _LIBCPP_STD_VER <= 14
-    return _VSTD::wcslen(__s);
+#elif _LIBCUDACXX_STD_VER <= 14
+    return _CUDA_VSTD::wcslen(__s);
 #else
     size_t __len = 0;
     for (; !eq(*__s, char_type(0)); ++__s)
@@ -391,7 +391,7 @@ char_traits<wchar_t>::length(const char_type* __s) _NOEXCEPT
 #endif
 }
 
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 const wchar_t*
 char_traits<wchar_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
 {
@@ -399,8 +399,8 @@ char_traits<wchar_t>::find(const char_type* __s, size_t __n, const char_type& __
         return nullptr;
 #if __has_feature(cxx_constexpr_string_builtins)
     return __builtin_wmemchr(__s, __a, __n);
-#elif _LIBCPP_STD_VER <= 14
-    return _VSTD::wmemchr(__s, __a, __n);
+#elif _LIBCUDACXX_STD_VER <= 14
+    return _CUDA_VSTD::wmemchr(__s, __a, __n);
 #else
     for (; __n; --__n)
     {
@@ -411,12 +411,12 @@ char_traits<wchar_t>::find(const char_type* __s, size_t __n, const char_type& __
     return nullptr;
 #endif
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t>
+struct _LIBCUDACXX_TEMPLATE_VIS char_traits<char8_t>
 {
     typedef char8_t        char_type;
     typedef unsigned int   int_type;
@@ -437,23 +437,23 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char8_t>
     static constexpr
     size_t           length(const char_type* __s) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY static constexpr
+    _LIBCUDACXX_INLINE_VISIBILITY static constexpr
     const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
 
-    static _LIBCPP_CONSTEXPR_AFTER_CXX17
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type*       move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
         return std::__char_traits_move(__s1, __s2, __n);
     }
 
-    static _LIBCPP_CONSTEXPR_AFTER_CXX17
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type*       copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
-        if (!__libcpp_is_constant_evaluated())
-            _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
+        if (!__LIBCUDACXX_is_constant_evaluated())
+            _LIBCUDACXX_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
         std::copy_n(__s2, __n, __s1);
         return __s1;
     }
 
-    static _LIBCPP_CONSTEXPR_AFTER_CXX17
+    static _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     char_type*       assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
         std::fill_n(__s, __n, __a);
         return __s;
@@ -514,10 +514,10 @@ char_traits<char8_t>::find(const char_type* __s, size_t __n, const char_type& __
     return nullptr;
 }
 
-#endif // _LIBCPP_HAS_NO_CHAR8_T
+#endif // _LIBCUDACXX_HAS_NO_CHAR8_T
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
+struct _LIBCUDACXX_TEMPLATE_VIS char_traits<char16_t>
 {
     typedef char16_t       char_type;
     typedef uint_least16_t int_type;
@@ -525,52 +525,52 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char16_t>
     typedef u16streampos   pos_type;
     typedef mbstate_t      state_type;
 
-    static inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+    static inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
-    static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
         {return __c1 == __c2;}
-    static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
         {return __c1 < __c2;}
 
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     int              compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     size_t           length(const char_type* __s) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static char_type*       move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
         return std::__char_traits_move(__s1, __s2, __n);
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static char_type*       copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
-        if (!__libcpp_is_constant_evaluated())
-            _LIBCPP_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
+        if (!__LIBCUDACXX_is_constant_evaluated())
+            _LIBCUDACXX_ASSERT(__s2 < __s1 || __s2 >= __s1+__n, "char_traits::copy overlapped range");
         std::copy_n(__s2, __n, __s1);
         return __s1;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static char_type*       assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
         std::fill_n(__s, __n, __a);
         return __s;
     }
 
-    static inline _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
         {return eq_int_type(__c, eof()) ? ~eof() : __c;}
-    static inline _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
         {return char_type(__c);}
-    static inline _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
         {return int_type(__c);}
-    static inline _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
         {return __c1 == __c2;}
-    static inline _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type eof() _NOEXCEPT
         {return int_type(0xFFFF);}
 };
 
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 int
 char_traits<char16_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
 {
@@ -584,7 +584,7 @@ char_traits<char16_t>::compare(const char_type* __s1, const char_type* __s2, siz
     return 0;
 }
 
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 size_t
 char_traits<char16_t>::length(const char_type* __s) _NOEXCEPT
 {
@@ -594,7 +594,7 @@ char_traits<char16_t>::length(const char_type* __s) _NOEXCEPT
     return __len;
 }
 
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 const char16_t*
 char_traits<char16_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
 {
@@ -608,7 +608,7 @@ char_traits<char16_t>::find(const char_type* __s, size_t __n, const char_type& _
 }
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS char_traits<char32_t>
+struct _LIBCUDACXX_TEMPLATE_VIS char_traits<char32_t>
 {
     typedef char32_t       char_type;
     typedef uint_least32_t int_type;
@@ -616,50 +616,50 @@ struct _LIBCPP_TEMPLATE_VIS char_traits<char32_t>
     typedef u32streampos   pos_type;
     typedef mbstate_t      state_type;
 
-    static inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+    static inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     void assign(char_type& __c1, const char_type& __c2) _NOEXCEPT {__c1 = __c2;}
-    static inline _LIBCPP_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool eq(char_type __c1, char_type __c2) _NOEXCEPT
         {return __c1 == __c2;}
-    static inline _LIBCPP_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool lt(char_type __c1, char_type __c2) _NOEXCEPT
         {return __c1 < __c2;}
 
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     int              compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     size_t           length(const char_type* __s) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const char_type* find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static char_type*       move(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
         return std::__char_traits_move(__s1, __s2, __n);
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static char_type*       copy(char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT {
         std::copy_n(__s2, __n, __s1);
         return __s1;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static char_type*       assign(char_type* __s, size_t __n, char_type __a) _NOEXCEPT {
         std::fill_n(__s, __n, __a);
         return __s;
     }
 
-    static inline _LIBCPP_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type  not_eof(int_type __c) _NOEXCEPT
         {return eq_int_type(__c, eof()) ? ~eof() : __c;}
-    static inline _LIBCPP_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR char_type to_char_type(int_type __c) _NOEXCEPT
         {return char_type(__c);}
-    static inline _LIBCPP_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type to_int_type(char_type __c) _NOEXCEPT
         {return int_type(__c);}
-    static inline _LIBCPP_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR bool eq_int_type(int_type __c1, int_type __c2) _NOEXCEPT
         {return __c1 == __c2;}
-    static inline _LIBCPP_CONSTEXPR int_type eof() _NOEXCEPT
+    static inline _LIBCUDACXX_CONSTEXPR int_type eof() _NOEXCEPT
         {return int_type(0xFFFFFFFF);}
 };
 
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 int
 char_traits<char32_t>::compare(const char_type* __s1, const char_type* __s2, size_t __n) _NOEXCEPT
 {
@@ -673,7 +673,7 @@ char_traits<char32_t>::compare(const char_type* __s1, const char_type* __s2, siz
     return 0;
 }
 
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 size_t
 char_traits<char32_t>::length(const char_type* __s) _NOEXCEPT
 {
@@ -683,7 +683,7 @@ char_traits<char32_t>::length(const char_type* __s) _NOEXCEPT
     return __len;
 }
 
-inline _LIBCPP_CONSTEXPR_AFTER_CXX14
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
 const char32_t*
 char_traits<char32_t>::find(const char_type* __s, size_t __n, const char_type& __a) _NOEXCEPT
 {
@@ -700,7 +700,7 @@ char_traits<char32_t>::find(const char_type* __s, size_t __n, const char_type& _
 
 // __str_find
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 __str_find(const _CharT *__p, _SizeT __sz,
              _CharT __c, _SizeT __pos) _NOEXCEPT
 {
@@ -713,7 +713,7 @@ __str_find(const _CharT *__p, _SizeT __sz,
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX11 const _CharT *
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 const _CharT *
 __search_substring(const _CharT *__first1, const _CharT *__last1,
                    const _CharT *__first2, const _CharT *__last2) _NOEXCEPT {
   // Take advantage of knowing source and pattern lengths.
@@ -752,7 +752,7 @@ __search_substring(const _CharT *__first1, const _CharT *__last1,
 }
 
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 __str_find(const _CharT *__p, _SizeT __sz,
        const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
@@ -774,7 +774,7 @@ __str_find(const _CharT *__p, _SizeT __sz,
 // __str_rfind
 
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 __str_rfind(const _CharT *__p, _SizeT __sz,
               _CharT __c, _SizeT __pos) _NOEXCEPT
 {
@@ -793,11 +793,11 @@ __str_rfind(const _CharT *__p, _SizeT __sz,
 }
 
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 __str_rfind(const _CharT *__p, _SizeT __sz,
         const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
-    __pos = _VSTD::min(__pos, __sz);
+    __pos = _CUDA_VSTD::min(__pos, __sz);
     if (__n < __sz - __pos)
         __pos += __n;
     else
@@ -810,13 +810,13 @@ __str_rfind(const _CharT *__p, _SizeT __sz,
 
 // __str_find_first_of
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 __str_find_first_of(const _CharT *__p, _SizeT __sz,
                 const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
     if (__pos >= __sz || __n == 0)
         return __npos;
-    const _CharT* __r = _VSTD::__find_first_of_ce
+    const _CharT* __r = _CUDA_VSTD::__find_first_of_ce
         (__p + __pos, __p + __sz, __s, __s + __n, _Traits::eq );
     if (__r == __p + __sz)
         return __npos;
@@ -826,7 +826,7 @@ __str_find_first_of(const _CharT *__p, _SizeT __sz,
 
 // __str_find_last_of
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 __str_find_last_of(const _CharT *__p, _SizeT __sz,
                const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
     {
@@ -849,7 +849,7 @@ __str_find_last_of(const _CharT *__p, _SizeT __sz,
 
 // __str_find_first_not_of
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 __str_find_first_not_of(const _CharT *__p, _SizeT __sz,
                     const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
@@ -865,7 +865,7 @@ __str_find_first_not_of(const _CharT *__p, _SizeT __sz,
 
 
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 __str_find_first_not_of(const _CharT *__p, _SizeT __sz,
                           _CharT __c, _SizeT __pos) _NOEXCEPT
 {
@@ -882,7 +882,7 @@ __str_find_first_not_of(const _CharT *__p, _SizeT __sz,
 
 // __str_find_last_not_of
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 __str_find_last_not_of(const _CharT *__p, _SizeT __sz,
                    const _CharT* __s, _SizeT __pos, _SizeT __n) _NOEXCEPT
 {
@@ -898,7 +898,7 @@ __str_find_last_not_of(const _CharT *__p, _SizeT __sz,
 
 
 template<class _CharT, class _SizeT, class _Traits, _SizeT __npos>
-inline _SizeT _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+inline _SizeT _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 __str_find_last_not_of(const _CharT *__p, _SizeT __sz,
                          _CharT __c, _SizeT __pos) _NOEXCEPT
 {
@@ -913,15 +913,15 @@ __str_find_last_not_of(const _CharT *__p, _SizeT __sz,
 }
 
 template<class _Ptr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 size_t __do_string_hash(_Ptr __p, _Ptr __e)
 {
     typedef typename iterator_traits<_Ptr>::value_type value_type;
     return __murmur2_or_cityhash<size_t>()(__p, (__e-__p)*sizeof(value_type));
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___STRING_CHAR_TRAITS_H
+#endif // _LIBCUDACXX___STRING_CHAR_TRAITS_H

diff  --git a/libcxx/include/__string/extern_template_lists.h b/libcxx/include/__string/extern_template_lists.h
index edbda7cbd004..bc07039d54c6 100644
--- a/libcxx/include/__string/extern_template_lists.h
+++ b/libcxx/include/__string/extern_template_lists.h
@@ -6,18 +6,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___STRING_EXTERN_TEMPLATE_LISTS_H
-#define _LIBCPP___STRING_EXTERN_TEMPLATE_LISTS_H
+#ifndef _LIBCUDACXX___STRING_EXTERN_TEMPLATE_LISTS_H
+#define _LIBCUDACXX___STRING_EXTERN_TEMPLATE_LISTS_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 // We maintain 2 ABI lists:
-// - _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST
-// - _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST
+// - _LIBCUDACXX_STRING_V1_EXTERN_TEMPLATE_LIST
+// - _LIBCUDACXX_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST
 // As the name implies, the ABI lists define the V1 (Stable) and unstable ABI.
 //
 // For unstable, we may explicitly remove function that are external in V1,
@@ -27,105 +27,105 @@
 // For stable, the ABI list should rarely change, except for adding new
 // functions supporting new c++ version / API changes. Typically entries
 // must never be removed from the stable list.
-#define _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_Func, _CharType) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, allocator<_CharType> const&)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::~basic_string()) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::operator=(value_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS const _CharType& basic_string<_CharType>::at(size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::reserve(size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__grow_by(size_type, size_type, size_type, size_type, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::push_back(value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS const basic_string<_CharType>::size_type basic_string<_CharType>::npos) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::erase(size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(value_type const*) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*) const) \
-  _Func(_LIBCPP_FUNC_VIS _CharType& basic_string<_CharType>::at(size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, basic_string const&, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::operator=(basic_string const&)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::iterator basic_string<_CharType>::insert(basic_string::const_iterator, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::resize(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, basic_string const&, size_type, size_type))
+#define _LIBCUDACXX_STRING_V1_EXTERN_TEMPLATE_LIST(_Func, _CharType) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, allocator<_CharType> const&)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::~basic_string()) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::operator=(value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS const _CharType& basic_string<_CharType>::at(size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::reserve(size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__grow_by(size_type, size_type, size_type, size_type, size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, value_type const*)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::push_back(value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS const basic_string<_CharType>::size_type basic_string<_CharType>::npos) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::erase(size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(basic_string const&, size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS int basic_string<_CharType>::compare(value_type const*) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS _CharType& basic_string<_CharType>::at(size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(value_type const*)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, basic_string const&, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::operator=(basic_string const&)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, basic_string const&, size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::iterator basic_string<_CharType>::insert(basic_string::const_iterator, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::resize(size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, basic_string const&, size_type, size_type))
 
-#define _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_Func, _CharType) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::~basic_string()) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::operator=(value_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init_copy_ctor_external(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS const _CharType& basic_string<_CharType>::at(size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_external(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_external(value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::reserve(size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_of(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__grow_by(size_type, size_type, size_type, size_type, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_no_alias<false>(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_no_alias<true>(value_type const*, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::push_back(value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS const basic_string<_CharType>::size_type basic_string<_CharType>::npos) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::__erase_external_with_move(size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(value_type const*) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*) const) \
-  _Func(_LIBCPP_FUNC_VIS _CharType& basic_string<_CharType>::at(size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type const*, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, basic_string const&, size_type, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*, size_type) const) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, basic_string const&, size_type, size_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>::iterator basic_string<_CharType>::insert(basic_string::const_iterator, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS void basic_string<_CharType>::resize(size_type, value_type)) \
-  _Func(_LIBCPP_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, basic_string const&, size_type, size_type))
+#define _LIBCUDACXX_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_Func, _CharType) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, value_type const*)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_not_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::~basic_string()) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_not_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::operator=(value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__init(value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__init_copy_ctor_external(value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS const _CharType& basic_string<_CharType>::at(size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_first_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_external(value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_external(value_type const*)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::reserve(size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(basic_string const&, size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::copy(value_type*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::basic_string(basic_string const&, size_type, size_type, allocator<_CharType> const&)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__init(size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, value_type const*)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find_last_of(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__grow_by(size_type, size_type, size_type, size_type, size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__grow_by_and_replace(size_type, size_type, size_type, size_type, size_type, size_type, value_type const*)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_no_alias<false>(value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::__assign_no_alias<true>(value_type const*, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::push_back(value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::rfind(value_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS const basic_string<_CharType>::size_type basic_string<_CharType>::npos) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::assign(size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::__erase_external_with_move(size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(basic_string const&, size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS int basic_string<_CharType>::compare(value_type const*) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS _CharType& basic_string<_CharType>::at(size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::size_type basic_string<_CharType>::find(value_type const*, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, basic_string const&, size_type, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS int basic_string<_CharType>::compare(size_type, size_type, value_type const*, size_type) const) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::append(value_type const*)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::replace(size_type, size_type, basic_string const&, size_type, size_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>::iterator basic_string<_CharType>::insert(basic_string::const_iterator, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS void basic_string<_CharType>::resize(size_type, value_type)) \
+  _Func(_LIBCUDACXX_FUNC_VIS basic_string<_CharType>& basic_string<_CharType>::insert(size_type, basic_string const&, size_type, size_type))
 
 
-#endif // _LIBCPP___STRING_EXTERN_TEMPLATE_LISTS_H
+#endif // _LIBCUDACXX___STRING_EXTERN_TEMPLATE_LISTS_H

diff  --git a/libcxx/include/__support/android/locale_bionic.h b/libcxx/include/__support/android/locale_bionic.h
index c41e26420fa5..7773b8df7c81 100644
--- a/libcxx/include/__support/android/locale_bionic.h
+++ b/libcxx/include/__support/android/locale_bionic.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H
-#define _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H
+#ifndef _LIBCUDACXX_SUPPORT_ANDROID_LOCALE_BIONIC_H
+#define _LIBCUDACXX_SUPPORT_ANDROID_LOCALE_BIONIC_H
 
 #if defined(__BIONIC__)
 
@@ -46,17 +46,17 @@ extern "C" {
 extern "C" {
 #endif
 
-inline _LIBCPP_HIDE_FROM_ABI float
+inline _LIBCUDACXX_HIDE_FROM_ABI float
 strtof_l(const char* __nptr, char** __endptr, locale_t) {
   return ::strtof(__nptr, __endptr);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI double
+inline _LIBCUDACXX_HIDE_FROM_ABI double
 strtod_l(const char* __nptr, char** __endptr, locale_t) {
   return ::strtod(__nptr, __endptr);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long
+inline _LIBCUDACXX_HIDE_FROM_ABI long
 strtol_l(const char* __nptr, char** __endptr, int __base, locale_t) {
   return ::strtol(__nptr, __endptr, __base);
 }
@@ -72,4 +72,4 @@ strtol_l(const char* __nptr, char** __endptr, int __base, locale_t) {
 #endif // defined(__ANDROID__)
 
 #endif // defined(__BIONIC__)
-#endif // _LIBCPP_SUPPORT_ANDROID_LOCALE_BIONIC_H
+#endif // _LIBCUDACXX_SUPPORT_ANDROID_LOCALE_BIONIC_H

diff  --git a/libcxx/include/__support/fuchsia/xlocale.h b/libcxx/include/__support/fuchsia/xlocale.h
index e8def81480ea..91318d55a714 100644
--- a/libcxx/include/__support/fuchsia/xlocale.h
+++ b/libcxx/include/__support/fuchsia/xlocale.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
-#define _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
+#ifndef _LIBCUDACXX_SUPPORT_FUCHSIA_XLOCALE_H
+#define _LIBCUDACXX_SUPPORT_FUCHSIA_XLOCALE_H
 
 #if defined(__Fuchsia__)
 
@@ -19,4 +19,4 @@
 
 #endif // defined(__Fuchsia__)
 
-#endif // _LIBCPP_SUPPORT_FUCHSIA_XLOCALE_H
+#endif // _LIBCUDACXX_SUPPORT_FUCHSIA_XLOCALE_H

diff  --git a/libcxx/include/__support/ibm/gettod_zos.h b/libcxx/include/__support/ibm/gettod_zos.h
index 2b2d927bae5c..aaa5aef5d993 100644
--- a/libcxx/include/__support/ibm/gettod_zos.h
+++ b/libcxx/include/__support/ibm/gettod_zos.h
@@ -7,12 +7,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_IBM_GETTOD_ZOS_H
-#define _LIBCPP_SUPPORT_IBM_GETTOD_ZOS_H
+#ifndef _LIBCUDACXX_SUPPORT_IBM_GETTOD_ZOS_H
+#define _LIBCUDACXX_SUPPORT_IBM_GETTOD_ZOS_H
 
 #include <time.h>
 
-inline _LIBCPP_HIDE_FROM_ABI int
+inline _LIBCUDACXX_HIDE_FROM_ABI int
 gettimeofdayMonotonic(struct timespec64* Output) {
 
   // The POSIX gettimeofday() function is not available on z/OS. Therefore,
@@ -51,4 +51,4 @@ gettimeofdayMonotonic(struct timespec64* Output) {
   return 0;
 }
 
-#endif // _LIBCPP_SUPPORT_IBM_GETTOD_ZOS_H
+#endif // _LIBCUDACXX_SUPPORT_IBM_GETTOD_ZOS_H

diff  --git a/libcxx/include/__support/ibm/locale_mgmt_zos.h b/libcxx/include/__support/ibm/locale_mgmt_zos.h
index 90ad2c2c8612..3c069b07d436 100644
--- a/libcxx/include/__support/ibm/locale_mgmt_zos.h
+++ b/libcxx/include/__support/ibm/locale_mgmt_zos.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_ZOS_H
-#define _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_ZOS_H
+#ifndef _LIBCUDACXX_SUPPORT_IBM_LOCALE_MGMT_ZOS_H
+#define _LIBCUDACXX_SUPPORT_IBM_LOCALE_MGMT_ZOS_H
 
 #if defined(__MVS__)
 #include <locale.h>
@@ -50,4 +50,4 @@ locale_t uselocale(locale_t newloc);
 }
 #endif
 #endif // defined(__MVS__)
-#endif // _LIBCPP_SUPPORT_IBM_LOCALE_MGMT_ZOS_H
+#endif // _LIBCUDACXX_SUPPORT_IBM_LOCALE_MGMT_ZOS_H

diff  --git a/libcxx/include/__support/ibm/nanosleep.h b/libcxx/include/__support/ibm/nanosleep.h
index 9c6b976c0003..c104a04bd0c0 100644
--- a/libcxx/include/__support/ibm/nanosleep.h
+++ b/libcxx/include/__support/ibm/nanosleep.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_IBM_NANOSLEEP_H
-#define _LIBCPP_SUPPORT_IBM_NANOSLEEP_H
+#ifndef _LIBCUDACXX_SUPPORT_IBM_NANOSLEEP_H
+#define _LIBCUDACXX_SUPPORT_IBM_NANOSLEEP_H
 
 #include <unistd.h>
 
@@ -52,4 +52,4 @@ inline int nanosleep(const struct timespec* __req, struct timespec* __rem) {
   return 0;
 }
 
-#endif // _LIBCPP_SUPPORT_IBM_NANOSLEEP_H
+#endif // _LIBCUDACXX_SUPPORT_IBM_NANOSLEEP_H

diff  --git a/libcxx/include/__support/ibm/xlocale.h b/libcxx/include/__support/ibm/xlocale.h
index 5a09212c6a92..b3f66aa9649c 100644
--- a/libcxx/include/__support/ibm/xlocale.h
+++ b/libcxx/include/__support/ibm/xlocale.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_IBM_XLOCALE_H
-#define _LIBCPP_SUPPORT_IBM_XLOCALE_H
+#ifndef _LIBCUDACXX_SUPPORT_IBM_XLOCALE_H
+#define _LIBCUDACXX_SUPPORT_IBM_XLOCALE_H
 
 #if defined(__MVS__)
 #include <__support/ibm/locale_mgmt_zos.h>
@@ -55,49 +55,49 @@ struct __setAndRestore {
 
 // The following are not POSIX routines.  These are quick-and-dirty hacks
 // to make things pretend to work
-inline _LIBCPP_HIDE_FROM_ABI long long
+inline _LIBCUDACXX_HIDE_FROM_ABI long long
 strtoll_l(const char *__nptr, char **__endptr, int __base, locale_t locale) {
   __setAndRestore __newloc(locale);
   return ::strtoll(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long
+inline _LIBCUDACXX_HIDE_FROM_ABI long
 strtol_l(const char *__nptr, char **__endptr, int __base, locale_t locale) {
   __setAndRestore __newloc(locale);
   return ::strtol(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI double
+inline _LIBCUDACXX_HIDE_FROM_ABI double
 strtod_l(const char *__nptr, char **__endptr, locale_t locale) {
   __setAndRestore __newloc(locale);
   return ::strtod(__nptr, __endptr);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI float
+inline _LIBCUDACXX_HIDE_FROM_ABI float
 strtof_l(const char *__nptr, char **__endptr, locale_t locale) {
   __setAndRestore __newloc(locale);
   return ::strtof(__nptr, __endptr);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long double
+inline _LIBCUDACXX_HIDE_FROM_ABI long double
 strtold_l(const char *__nptr, char **__endptr, locale_t locale) {
   __setAndRestore __newloc(locale);
   return ::strtold(__nptr, __endptr);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI unsigned long long
+inline _LIBCUDACXX_HIDE_FROM_ABI unsigned long long
 strtoull_l(const char *__nptr, char **__endptr, int __base, locale_t locale) {
   __setAndRestore __newloc(locale);
   return ::strtoull(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI unsigned long
+inline _LIBCUDACXX_HIDE_FROM_ABI unsigned long
 strtoul_l(const char *__nptr, char **__endptr, int __base, locale_t locale) {
   __setAndRestore __newloc(locale);
   return ::strtoul(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int
+inline _LIBCUDACXX_HIDE_FROM_ABI int
 vasprintf(char **strp, const char *fmt, va_list ap) {
   const size_t buff_size = 256;
   if ((*strp = (char *)malloc(buff_size)) == NULL) {
@@ -106,7 +106,7 @@ vasprintf(char **strp, const char *fmt, va_list ap) {
 
   va_list ap_copy;
   // va_copy may not be provided by the C library in C++ 03 mode.
-#if defined(_LIBCPP_CXX03_LANG) && __has_builtin(__builtin_va_copy)
+#if defined(_LIBCUDACXX_CXX03_LANG) && __has_builtin(__builtin_va_copy)
   __builtin_va_copy(ap_copy, ap);
 #else
   va_copy(ap_copy, ap);
@@ -126,4 +126,4 @@ vasprintf(char **strp, const char *fmt, va_list ap) {
 #ifdef __cplusplus
 }
 #endif
-#endif // _LIBCPP_SUPPORT_IBM_XLOCALE_H
+#endif // _LIBCUDACXX_SUPPORT_IBM_XLOCALE_H

diff  --git a/libcxx/include/__support/musl/xlocale.h b/libcxx/include/__support/musl/xlocale.h
index f564c87885ac..84b657c9e5f1 100644
--- a/libcxx/include/__support/musl/xlocale.h
+++ b/libcxx/include/__support/musl/xlocale.h
@@ -14,8 +14,8 @@
 // in Musl.
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_MUSL_XLOCALE_H
-#define _LIBCPP_SUPPORT_MUSL_XLOCALE_H
+#ifndef _LIBCUDACXX_SUPPORT_MUSL_XLOCALE_H
+#define _LIBCUDACXX_SUPPORT_MUSL_XLOCALE_H
 
 #include <cstdlib>
 #include <cwchar>
@@ -24,27 +24,27 @@
 extern "C" {
 #endif
 
-inline _LIBCPP_HIDE_FROM_ABI long long
+inline _LIBCUDACXX_HIDE_FROM_ABI long long
 strtoll_l(const char *__nptr, char **__endptr, int __base, locale_t) {
   return ::strtoll(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI unsigned long long
+inline _LIBCUDACXX_HIDE_FROM_ABI unsigned long long
 strtoull_l(const char *__nptr, char **__endptr, int __base, locale_t) {
   return ::strtoull(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long long
+inline _LIBCUDACXX_HIDE_FROM_ABI long long
 wcstoll_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) {
   return ::wcstoll(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long long
+inline _LIBCUDACXX_HIDE_FROM_ABI long long
 wcstoull_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) {
   return ::wcstoull(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long double
+inline _LIBCUDACXX_HIDE_FROM_ABI long double
 wcstold_l(const wchar_t *__nptr, wchar_t **__endptr, locale_t) {
   return ::wcstold(__nptr, __endptr);
 }
@@ -53,4 +53,4 @@ wcstold_l(const wchar_t *__nptr, wchar_t **__endptr, locale_t) {
 }
 #endif
 
-#endif // _LIBCPP_SUPPORT_MUSL_XLOCALE_H
+#endif // _LIBCUDACXX_SUPPORT_MUSL_XLOCALE_H

diff  --git a/libcxx/include/__support/newlib/xlocale.h b/libcxx/include/__support/newlib/xlocale.h
index b75f9263a4c4..aada809e679f 100644
--- a/libcxx/include/__support/newlib/xlocale.h
+++ b/libcxx/include/__support/newlib/xlocale.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H
-#define _LIBCPP_SUPPORT_NEWLIB_XLOCALE_H
+#ifndef _LIBCUDACXX_SUPPORT_NEWLIB_XLOCALE_H
+#define _LIBCUDACXX_SUPPORT_NEWLIB_XLOCALE_H
 
 #if defined(_NEWLIB_VERSION)
 

diff  --git a/libcxx/include/__support/openbsd/xlocale.h b/libcxx/include/__support/openbsd/xlocale.h
index 2be8dc7a0085..f4d0d1d0abd9 100644
--- a/libcxx/include/__support/openbsd/xlocale.h
+++ b/libcxx/include/__support/openbsd/xlocale.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_OPENBSD_XLOCALE_H
-#define _LIBCPP_SUPPORT_OPENBSD_XLOCALE_H
+#ifndef _LIBCUDACXX_SUPPORT_OPENBSD_XLOCALE_H
+#define _LIBCUDACXX_SUPPORT_OPENBSD_XLOCALE_H
 
 #include <__support/xlocale/__strtonum_fallback.h>
 #include <clocale>
@@ -21,12 +21,12 @@ extern "C" {
 #endif
 
 
-inline _LIBCPP_HIDE_FROM_ABI long
+inline _LIBCUDACXX_HIDE_FROM_ABI long
 strtol_l(const char *__nptr, char **__endptr, int __base, locale_t) {
   return ::strtol(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI unsigned long
+inline _LIBCUDACXX_HIDE_FROM_ABI unsigned long
 strtoul_l(const char *__nptr, char **__endptr, int __base, locale_t) {
   return ::strtoul(__nptr, __endptr, __base);
 }

diff  --git a/libcxx/include/__support/solaris/xlocale.h b/libcxx/include/__support/solaris/xlocale.h
index 999102a81167..57e15af49ce2 100644
--- a/libcxx/include/__support/solaris/xlocale.h
+++ b/libcxx/include/__support/solaris/xlocale.h
@@ -32,37 +32,37 @@ struct lconv *localeconv(void);
 struct lconv *localeconv_l(locale_t __l);
 
 // FIXME: These are quick-and-dirty hacks to make things pretend to work
-inline _LIBCPP_HIDE_FROM_ABI long long
+inline _LIBCUDACXX_HIDE_FROM_ABI long long
 strtoll_l(const char *__nptr, char **__endptr, int __base, locale_t __loc) {
   return ::strtoll(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long
+inline _LIBCUDACXX_HIDE_FROM_ABI long
 strtol_l(const char *__nptr, char **__endptr, int __base, locale_t __loc) {
   return ::strtol(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI unsigned long long
+inline _LIBCUDACXX_HIDE_FROM_ABI unsigned long long
 strtoull_l(const char *__nptr, char **__endptr, int __base, locale_t __loc) 
   return ::strtoull(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI unsigned long
+inline _LIBCUDACXX_HIDE_FROM_ABI unsigned long
 strtoul_l(const char *__nptr, char **__endptr, int __base, locale_t __loc) {
   return ::strtoul(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI float
+inline _LIBCUDACXX_HIDE_FROM_ABI float
 strtof_l(const char *__nptr, char **__endptr, locale_t __loc) {
   return ::strtof(__nptr, __endptr);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI double
+inline _LIBCUDACXX_HIDE_FROM_ABI double
 strtod_l(const char *__nptr, char **__endptr, locale_t __loc) {
   return ::strtod(__nptr, __endptr);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long double
+inline _LIBCUDACXX_HIDE_FROM_ABI long double
 strtold_l(const char *__nptr, char **__endptr, locale_t __loc) {
   return ::strtold(__nptr, __endptr);
 }

diff  --git a/libcxx/include/__support/win32/limits_msvc_win32.h b/libcxx/include/__support/win32/limits_msvc_win32.h
index 87e4e7db668f..7cdbd85c569c 100644
--- a/libcxx/include/__support/win32/limits_msvc_win32.h
+++ b/libcxx/include/__support/win32/limits_msvc_win32.h
@@ -7,10 +7,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
-#define _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
+#ifndef _LIBCUDACXX_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
+#define _LIBCUDACXX_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
 
-#if !defined(_LIBCPP_MSVCRT)
+#if !defined(_LIBCUDACXX_MSVCRT)
 #error "This header complements the Microsoft C Runtime library, and should not be included otherwise."
 #endif
 #if defined(__clang__)
@@ -68,4 +68,4 @@
 #define __builtin_nanl(__dummmy) _LNan._Long_double
 #define __builtin_nansl(__dummy) _LSnan._Long_double
 
-#endif // _LIBCPP_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H
+#endif // _LIBCUDACXX_SUPPORT_WIN32_LIMITS_MSVC_WIN32_H

diff  --git a/libcxx/include/__support/win32/locale_win32.h b/libcxx/include/__support/win32/locale_win32.h
index 8127f286b6f3..6c10d6947f62 100644
--- a/libcxx/include/__support/win32/locale_win32.h
+++ b/libcxx/include/__support/win32/locale_win32.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
-#define _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
+#ifndef _LIBCUDACXX_SUPPORT_WIN32_LOCALE_WIN32_H
+#define _LIBCUDACXX_SUPPORT_WIN32_LOCALE_WIN32_H
 
 #include <__config>
 #include <cstddef>
@@ -216,20 +216,20 @@ decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l );
 #define strtoll_l _strtoi64_l
 #define strtoull_l _strtoui64_l
 #define strtod_l _strtod_l
-#if defined(_LIBCPP_MSVCRT)
+#if defined(_LIBCUDACXX_MSVCRT)
 #define strtof_l _strtof_l
 #define strtold_l _strtold_l
 #else
-_LIBCPP_FUNC_VIS float strtof_l(const char*, char**, locale_t);
-_LIBCPP_FUNC_VIS long double strtold_l(const char*, char**, locale_t);
+_LIBCUDACXX_FUNC_VIS float strtof_l(const char*, char**, locale_t);
+_LIBCUDACXX_FUNC_VIS long double strtold_l(const char*, char**, locale_t);
 #endif
-inline _LIBCPP_HIDE_FROM_ABI int
+inline _LIBCUDACXX_HIDE_FROM_ABI int
 islower_l(int __c, _locale_t __loc)
 {
  return _islower_l((int)__c, __loc);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int
+inline _LIBCUDACXX_HIDE_FROM_ABI int
 isupper_l(int __c, _locale_t __loc)
 {
  return _isupper_l((int)__c, __loc);
@@ -255,7 +255,7 @@ isupper_l(int __c, _locale_t __loc)
 #define towupper_l _towupper_l
 #define towlower_l _towlower_l
 #if defined(__MINGW32__) && __MSVCRT_VERSION__ < 0x0800
-_LIBCPP_FUNC_VIS size_t strftime_l(char *ret, size_t n, const char *format,
+_LIBCUDACXX_FUNC_VIS size_t strftime_l(char *ret, size_t n, const char *format,
                                    const struct tm *tm, locale_t loc);
 #else
 #define strftime_l _strftime_l
@@ -264,9 +264,9 @@ _LIBCPP_FUNC_VIS size_t strftime_l(char *ret, size_t n, const char *format,
 #define sprintf_l( __s, __l, __f, ... ) _sprintf_l( __s, __f, __l, __VA_ARGS__ )
 #define vsprintf_l( __s, __l, __f, ... ) _vsprintf_l( __s, __f, __l, __VA_ARGS__ )
 #define vsnprintf_l( __s, __n, __l, __f, ... ) _vsnprintf_l( __s, __n, __f, __l, __VA_ARGS__ )
-_LIBCPP_FUNC_VIS int snprintf_l(char *__ret, size_t __n, locale_t __loc, const char *__format, ...);
-_LIBCPP_FUNC_VIS int asprintf_l( char **__ret, locale_t __loc, const char *__format, ... );
-_LIBCPP_FUNC_VIS int vasprintf_l( char **__ret, locale_t __loc, const char *__format, va_list __ap );
+_LIBCUDACXX_FUNC_VIS int snprintf_l(char *__ret, size_t __n, locale_t __loc, const char *__format, ...);
+_LIBCUDACXX_FUNC_VIS int asprintf_l( char **__ret, locale_t __loc, const char *__format, ... );
+_LIBCUDACXX_FUNC_VIS int vasprintf_l( char **__ret, locale_t __loc, const char *__format, va_list __ap );
 
 // not-so-pressing FIXME: use locale to determine blank characters
 inline int isblank_l( int __c, locale_t /*loc*/ )
@@ -278,4 +278,4 @@ inline int iswblank_l( wint_t __c, locale_t /*loc*/ )
     return ( __c == L' ' || __c == L'\t' );
 }
 
-#endif // _LIBCPP_SUPPORT_WIN32_LOCALE_WIN32_H
+#endif // _LIBCUDACXX_SUPPORT_WIN32_LOCALE_WIN32_H

diff  --git a/libcxx/include/__support/xlocale/__nop_locale_mgmt.h b/libcxx/include/__support/xlocale/__nop_locale_mgmt.h
index 3d26183fafed..c70b93dfa71f 100644
--- a/libcxx/include/__support/xlocale/__nop_locale_mgmt.h
+++ b/libcxx/include/__support/xlocale/__nop_locale_mgmt.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
-#define _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
+#ifndef _LIBCUDACXX_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
+#define _LIBCUDACXX_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
 
 #ifdef __cplusplus
 extern "C" {
@@ -17,21 +17,21 @@ extern "C" {
 // Patch over lack of extended locale support
 typedef void *locale_t;
 
-inline _LIBCPP_HIDE_FROM_ABI locale_t
+inline _LIBCUDACXX_HIDE_FROM_ABI locale_t
 duplocale(locale_t) {
   return NULL;
 }
 
-inline _LIBCPP_HIDE_FROM_ABI void
+inline _LIBCUDACXX_HIDE_FROM_ABI void
 freelocale(locale_t) {
 }
 
-inline _LIBCPP_HIDE_FROM_ABI locale_t
+inline _LIBCUDACXX_HIDE_FROM_ABI locale_t
 newlocale(int, const char *, locale_t) {
   return NULL;
 }
 
-inline _LIBCPP_HIDE_FROM_ABI locale_t
+inline _LIBCUDACXX_HIDE_FROM_ABI locale_t
 uselocale(locale_t) {
   return NULL;
 }
@@ -53,4 +53,4 @@ uselocale(locale_t) {
 } // extern "C"
 #endif
 
-#endif // _LIBCPP_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H
+#endif // _LIBCUDACXX_SUPPORT_XLOCALE_NOP_LOCALE_MGMT_H

diff  --git a/libcxx/include/__support/xlocale/__posix_l_fallback.h b/libcxx/include/__support/xlocale/__posix_l_fallback.h
index 294149eb8ff9..bea428344916 100644
--- a/libcxx/include/__support/xlocale/__posix_l_fallback.h
+++ b/libcxx/include/__support/xlocale/__posix_l_fallback.h
@@ -12,147 +12,147 @@
 // Android's bionic and Newlib).
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
-#define _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
+#ifndef _LIBCUDACXX_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
+#define _LIBCUDACXX_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-inline _LIBCPP_HIDE_FROM_ABI int isalnum_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int isalnum_l(int __c, locale_t) {
   return ::isalnum(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int isalpha_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int isalpha_l(int __c, locale_t) {
   return ::isalpha(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int isblank_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int isblank_l(int __c, locale_t) {
   return ::isblank(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iscntrl_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iscntrl_l(int __c, locale_t) {
   return ::iscntrl(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int isdigit_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int isdigit_l(int __c, locale_t) {
   return ::isdigit(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int isgraph_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int isgraph_l(int __c, locale_t) {
   return ::isgraph(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int islower_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int islower_l(int __c, locale_t) {
   return ::islower(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int isprint_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int isprint_l(int __c, locale_t) {
   return ::isprint(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int ispunct_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int ispunct_l(int __c, locale_t) {
   return ::ispunct(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int isspace_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int isspace_l(int __c, locale_t) {
   return ::isspace(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int isupper_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int isupper_l(int __c, locale_t) {
   return ::isupper(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int isxdigit_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int isxdigit_l(int __c, locale_t) {
   return ::isxdigit(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswalnum_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswalnum_l(wint_t __c, locale_t) {
   return ::iswalnum(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswalpha_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswalpha_l(wint_t __c, locale_t) {
   return ::iswalpha(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswblank_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswblank_l(wint_t __c, locale_t) {
   return ::iswblank(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswcntrl_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswcntrl_l(wint_t __c, locale_t) {
   return ::iswcntrl(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswdigit_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswdigit_l(wint_t __c, locale_t) {
   return ::iswdigit(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswgraph_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswgraph_l(wint_t __c, locale_t) {
   return ::iswgraph(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswlower_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswlower_l(wint_t __c, locale_t) {
   return ::iswlower(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswprint_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswprint_l(wint_t __c, locale_t) {
   return ::iswprint(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswpunct_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswpunct_l(wint_t __c, locale_t) {
   return ::iswpunct(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswspace_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswspace_l(wint_t __c, locale_t) {
   return ::iswspace(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswupper_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswupper_l(wint_t __c, locale_t) {
   return ::iswupper(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int iswxdigit_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int iswxdigit_l(wint_t __c, locale_t) {
   return ::iswxdigit(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int toupper_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int toupper_l(int __c, locale_t) {
   return ::toupper(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int tolower_l(int __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI int tolower_l(int __c, locale_t) {
   return ::tolower(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI wint_t towupper_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI wint_t towupper_l(wint_t __c, locale_t) {
   return ::towupper(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI wint_t towlower_l(wint_t __c, locale_t) {
+inline _LIBCUDACXX_HIDE_FROM_ABI wint_t towlower_l(wint_t __c, locale_t) {
   return ::towlower(__c);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int
+inline _LIBCUDACXX_HIDE_FROM_ABI int
 strcoll_l(const char *__s1, const char *__s2, locale_t) {
   return ::strcoll(__s1, __s2);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI size_t
+inline _LIBCUDACXX_HIDE_FROM_ABI size_t
 strxfrm_l(char *__dest, const char *__src, size_t __n, locale_t) {
   return ::strxfrm(__dest, __src, __n);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI size_t
+inline _LIBCUDACXX_HIDE_FROM_ABI size_t
 strftime_l(char *__s, size_t __max, const char *__format, const struct tm *__tm,
            locale_t) {
   return ::strftime(__s, __max, __format, __tm);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI int
+inline _LIBCUDACXX_HIDE_FROM_ABI int
 wcscoll_l(const wchar_t *__ws1, const wchar_t *__ws2, locale_t) {
   return ::wcscoll(__ws1, __ws2);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI size_t
+inline _LIBCUDACXX_HIDE_FROM_ABI size_t
 wcsxfrm_l(wchar_t *__dest, const wchar_t *__src, size_t __n, locale_t) {
   return ::wcsxfrm(__dest, __src, __n);
 }
@@ -161,4 +161,4 @@ wcsxfrm_l(wchar_t *__dest, const wchar_t *__src, size_t __n, locale_t) {
 }
 #endif
 
-#endif // _LIBCPP_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H
+#endif // _LIBCUDACXX_SUPPORT_XLOCALE_POSIX_L_FALLBACK_H

diff  --git a/libcxx/include/__support/xlocale/__strtonum_fallback.h b/libcxx/include/__support/xlocale/__strtonum_fallback.h
index 19780909b2c5..66f55b7293a0 100644
--- a/libcxx/include/__support/xlocale/__strtonum_fallback.h
+++ b/libcxx/include/__support/xlocale/__strtonum_fallback.h
@@ -12,49 +12,49 @@
 // convert strings to some numeric type.
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
-#define _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
+#ifndef _LIBCUDACXX_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
+#define _LIBCUDACXX_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-inline _LIBCPP_HIDE_FROM_ABI float
+inline _LIBCUDACXX_HIDE_FROM_ABI float
 strtof_l(const char *__nptr, char **__endptr, locale_t) {
   return ::strtof(__nptr, __endptr);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI double
+inline _LIBCUDACXX_HIDE_FROM_ABI double
 strtod_l(const char *__nptr, char **__endptr, locale_t) {
   return ::strtod(__nptr, __endptr);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long double
+inline _LIBCUDACXX_HIDE_FROM_ABI long double
 strtold_l(const char *__nptr, char **__endptr, locale_t) {
   return ::strtold(__nptr, __endptr);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long long
+inline _LIBCUDACXX_HIDE_FROM_ABI long long
 strtoll_l(const char *__nptr, char **__endptr, int __base, locale_t) {
   return ::strtoll(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI unsigned long long
+inline _LIBCUDACXX_HIDE_FROM_ABI unsigned long long
 strtoull_l(const char *__nptr, char **__endptr, int __base, locale_t) {
   return ::strtoull(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long long
+inline _LIBCUDACXX_HIDE_FROM_ABI long long
 wcstoll_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) {
   return ::wcstoll(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI unsigned long long
+inline _LIBCUDACXX_HIDE_FROM_ABI unsigned long long
 wcstoull_l(const wchar_t *__nptr, wchar_t **__endptr, int __base, locale_t) {
   return ::wcstoull(__nptr, __endptr, __base);
 }
 
-inline _LIBCPP_HIDE_FROM_ABI long double
+inline _LIBCUDACXX_HIDE_FROM_ABI long double
 wcstold_l(const wchar_t *__nptr, wchar_t **__endptr, locale_t) {
   return ::wcstold(__nptr, __endptr);
 }
@@ -63,4 +63,4 @@ wcstold_l(const wchar_t *__nptr, wchar_t **__endptr, locale_t) {
 }
 #endif
 
-#endif // _LIBCPP_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H
+#endif // _LIBCUDACXX_SUPPORT_XLOCALE_STRTONUM_FALLBACK_H

diff  --git a/libcxx/include/__thread/poll_with_backoff.h b/libcxx/include/__thread/poll_with_backoff.h
index 0bbafd186657..e1f3e0ff32ed 100644
--- a/libcxx/include/__thread/poll_with_backoff.h
+++ b/libcxx/include/__thread/poll_with_backoff.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___THREAD_POLL_WITH_BACKOFF_H
-#define _LIBCPP___THREAD_POLL_WITH_BACKOFF_H
+#ifndef _LIBCUDACXX___THREAD_POLL_WITH_BACKOFF_H
+#define _LIBCUDACXX___THREAD_POLL_WITH_BACKOFF_H
 
 #include <__availability>
 #include <__chrono/duration.h>
@@ -17,13 +17,13 @@
 #include <__config>
 #include <__filesystem/file_time_type.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-static _LIBCPP_CONSTEXPR const int __libcpp_polling_count = 64;
+static _LIBCUDACXX_CONSTEXPR const int __LIBCUDACXX_polling_count = 64;
 
 // Polls a thread for a condition given by a predicate, and backs off based on a backoff policy
 // before polling again.
@@ -37,13 +37,13 @@ static _LIBCPP_CONSTEXPR const int __libcpp_polling_count = 64;
 // - __max_elapsed is the maximum duration to try polling for. If the maximum duration is exceeded,
 //   the polling loop will return false to report a timeout.
 template<class _Fn, class _BFn>
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI
-bool __libcpp_thread_poll_with_backoff(_Fn&& __f, _BFn&& __bf, chrono::nanoseconds __max_elapsed = chrono::nanoseconds::zero()) {
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_HIDE_FROM_ABI
+bool __LIBCUDACXX_thread_poll_with_backoff(_Fn&& __f, _BFn&& __bf, chrono::nanoseconds __max_elapsed = chrono::nanoseconds::zero()) {
     auto const __start = chrono::high_resolution_clock::now();
     for (int __count = 0;;) {
       if (__f())
         return true; // _Fn completion means success
-      if (__count < __libcpp_polling_count) {
+      if (__count < __LIBCUDACXX_polling_count) {
         __count += 1;
         continue;
       }
@@ -62,12 +62,12 @@ bool __libcpp_thread_poll_with_backoff(_Fn&& __f, _BFn&& __bf, chrono::nanosecon
 // so this should most likely only be used on single-threaded systems where there
 // are no other threads to compete with.
 struct __spinning_backoff_policy {
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
   bool operator()(chrono::nanoseconds const&) const {
       return false;
   }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___THREAD_POLL_WITH_BACKOFF_H
+#endif // _LIBCUDACXX___THREAD_POLL_WITH_BACKOFF_H

diff  --git a/libcxx/include/__thread/timed_backoff_policy.h b/libcxx/include/__thread/timed_backoff_policy.h
index 28fe75d6fd80..56ddb1274b61 100644
--- a/libcxx/include/__thread/timed_backoff_policy.h
+++ b/libcxx/include/__thread/timed_backoff_policy.h
@@ -6,40 +6,40 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP___THREAD_TIMED_BACKOFF_POLICY_H
-#define _LIBCPP___THREAD_TIMED_BACKOFF_POLICY_H
+#ifndef _LIBCUDACXX___THREAD_TIMED_BACKOFF_POLICY_H
+#define _LIBCUDACXX___THREAD_TIMED_BACKOFF_POLICY_H
 
 #include <__config>
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 
 #  include <__chrono/duration.h>
 #  include <__threading_support>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-struct __libcpp_timed_backoff_policy {
-  _LIBCPP_INLINE_VISIBILITY
+struct __LIBCUDACXX_timed_backoff_policy {
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool operator()(chrono::nanoseconds __elapsed) const
   {
       if(__elapsed > chrono::milliseconds(128))
-          __libcpp_thread_sleep_for(chrono::milliseconds(8));
+          __LIBCUDACXX_thread_sleep_for(chrono::milliseconds(8));
       else if(__elapsed > chrono::microseconds(64))
-          __libcpp_thread_sleep_for(__elapsed / 2);
+          __LIBCUDACXX_thread_sleep_for(__elapsed / 2);
       else if(__elapsed > chrono::microseconds(4))
-        __libcpp_thread_yield();
+        __LIBCUDACXX_thread_yield();
       else
         {} // poll
       return false;
   }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_HAS_NO_THREADS
+#endif // _LIBCUDACXX_HAS_NO_THREADS
 
-#endif // _LIBCPP___THREAD_TIMED_BACKOFF_POLICY_H
+#endif // _LIBCUDACXX___THREAD_TIMED_BACKOFF_POLICY_H

diff  --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support
index a7f0da972a8d..ecd5ab3d3d6b 100644
--- a/libcxx/include/__threading_support
+++ b/libcxx/include/__threading_support
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___THREADING_SUPPORT
-#define _LIBCPP___THREADING_SUPPORT
+#ifndef _LIBCUDACXX___THREADING_SUPPORT
+#define _LIBCUDACXX___THREADING_SUPPORT
 
 #include <__availability>
 #include <__chrono/convert_to_timespec.h>
@@ -23,239 +23,239 @@
 # include <__support/ibm/nanosleep.h>
 #endif
 
-#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+#ifndef _LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER
 #  pragma GCC system_header
 #endif
 
-#if defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
+#if defined(_LIBCUDACXX_HAS_THREAD_API_EXTERNAL)
 # include <__external_threading>
-#elif !defined(_LIBCPP_HAS_NO_THREADS)
+#elif !defined(_LIBCUDACXX_HAS_NO_THREADS)
 
-#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+#if defined(_LIBCUDACXX_HAS_THREAD_API_PTHREAD)
 # include <pthread.h>
 # include <sched.h>
-#elif defined(_LIBCPP_HAS_THREAD_API_C11)
+#elif defined(_LIBCUDACXX_HAS_THREAD_API_C11)
 # include <threads.h>
 #endif
 
-#if defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \
-    defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL) || \
-    defined(_LIBCPP_HAS_THREAD_API_WIN32)
-#define _LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_FUNC_VIS
+#if defined(_LIBCUDACXX_HAS_THREAD_LIBRARY_EXTERNAL) || \
+    defined(_LIBCUDACXX_BUILDING_THREAD_LIBRARY_EXTERNAL) || \
+    defined(_LIBCUDACXX_HAS_THREAD_API_WIN32)
+#define _LIBCUDACXX_THREAD_ABI_VISIBILITY _LIBCUDACXX_FUNC_VIS
 #else
-#define _LIBCPP_THREAD_ABI_VISIBILITY inline _LIBCPP_INLINE_VISIBILITY
+#define _LIBCUDACXX_THREAD_ABI_VISIBILITY inline _LIBCUDACXX_INLINE_VISIBILITY
 #endif
 
 #if defined(__FreeBSD__) && defined(__clang__) && __has_attribute(no_thread_safety_analysis)
-#define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS __attribute__((no_thread_safety_analysis))
+#define _LIBCUDACXX_NO_THREAD_SAFETY_ANALYSIS __attribute__((no_thread_safety_analysis))
 #else
-#define _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
+#define _LIBCUDACXX_NO_THREAD_SAFETY_ANALYSIS
 #endif
 
-typedef ::timespec __libcpp_timespec_t;
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+typedef ::timespec __LIBCUDACXX_timespec_t;
+#endif // !defined(_LIBCUDACXX_HAS_NO_THREADS)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 
-#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+#if defined(_LIBCUDACXX_HAS_THREAD_API_PTHREAD)
 // Mutex
-typedef pthread_mutex_t __libcpp_mutex_t;
-#define _LIBCPP_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
+typedef pthread_mutex_t __LIBCUDACXX_mutex_t;
+#define _LIBCUDACXX_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
 
-typedef pthread_mutex_t __libcpp_recursive_mutex_t;
+typedef pthread_mutex_t __LIBCUDACXX_recursive_mutex_t;
 
 // Condition Variable
-typedef pthread_cond_t __libcpp_condvar_t;
-#define _LIBCPP_CONDVAR_INITIALIZER PTHREAD_COND_INITIALIZER
+typedef pthread_cond_t __LIBCUDACXX_condvar_t;
+#define _LIBCUDACXX_CONDVAR_INITIALIZER PTHREAD_COND_INITIALIZER
 
 // Execute once
-typedef pthread_once_t __libcpp_exec_once_flag;
-#define _LIBCPP_EXEC_ONCE_INITIALIZER PTHREAD_ONCE_INIT
+typedef pthread_once_t __LIBCUDACXX_exec_once_flag;
+#define _LIBCUDACXX_EXEC_ONCE_INITIALIZER PTHREAD_ONCE_INIT
 
 // Thread id
 #if defined(__MVS__)
-  typedef unsigned long long __libcpp_thread_id;
+  typedef unsigned long long __LIBCUDACXX_thread_id;
 #else
-  typedef pthread_t __libcpp_thread_id;
+  typedef pthread_t __LIBCUDACXX_thread_id;
 #endif
 
 // Thread
-#define _LIBCPP_NULL_THREAD ((__libcpp_thread_t()))
-typedef pthread_t __libcpp_thread_t;
+#define _LIBCUDACXX_NULL_THREAD ((__LIBCUDACXX_thread_t()))
+typedef pthread_t __LIBCUDACXX_thread_t;
 
 // Thread Local Storage
-typedef pthread_key_t __libcpp_tls_key;
+typedef pthread_key_t __LIBCUDACXX_tls_key;
 
-#define _LIBCPP_TLS_DESTRUCTOR_CC
-#elif defined(_LIBCPP_HAS_THREAD_API_C11)
+#define _LIBCUDACXX_TLS_DESTRUCTOR_CC
+#elif defined(_LIBCUDACXX_HAS_THREAD_API_C11)
 // Mutex
-typedef mtx_t __libcpp_mutex_t;
+typedef mtx_t __LIBCUDACXX_mutex_t;
 // mtx_t is a struct so using {} for initialization is valid.
-#define _LIBCPP_MUTEX_INITIALIZER {}
+#define _LIBCUDACXX_MUTEX_INITIALIZER {}
 
-typedef mtx_t __libcpp_recursive_mutex_t;
+typedef mtx_t __LIBCUDACXX_recursive_mutex_t;
 
 // Condition Variable
-typedef cnd_t __libcpp_condvar_t;
+typedef cnd_t __LIBCUDACXX_condvar_t;
 // cnd_t is a struct so using {} for initialization is valid.
-#define _LIBCPP_CONDVAR_INITIALIZER {}
+#define _LIBCUDACXX_CONDVAR_INITIALIZER {}
 
 // Execute once
-typedef once_flag __libcpp_exec_once_flag;
-#define _LIBCPP_EXEC_ONCE_INITIALIZER ONCE_FLAG_INIT
+typedef once_flag __LIBCUDACXX_exec_once_flag;
+#define _LIBCUDACXX_EXEC_ONCE_INITIALIZER ONCE_FLAG_INIT
 
 // Thread id
-typedef thrd_t __libcpp_thread_id;
+typedef thrd_t __LIBCUDACXX_thread_id;
 
 // Thread
-#define _LIBCPP_NULL_THREAD 0U
+#define _LIBCUDACXX_NULL_THREAD 0U
 
-typedef thrd_t __libcpp_thread_t;
+typedef thrd_t __LIBCUDACXX_thread_t;
 
 // Thread Local Storage
-typedef tss_t __libcpp_tls_key;
+typedef tss_t __LIBCUDACXX_tls_key;
 
-#define _LIBCPP_TLS_DESTRUCTOR_CC
-#elif !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
+#define _LIBCUDACXX_TLS_DESTRUCTOR_CC
+#elif !defined(_LIBCUDACXX_HAS_THREAD_API_EXTERNAL)
 // Mutex
-typedef void* __libcpp_mutex_t;
-#define _LIBCPP_MUTEX_INITIALIZER 0
+typedef void* __LIBCUDACXX_mutex_t;
+#define _LIBCUDACXX_MUTEX_INITIALIZER 0
 
 #if defined(_M_IX86) || defined(__i386__) || defined(_M_ARM) || defined(__arm__)
-typedef void* __libcpp_recursive_mutex_t[6];
+typedef void* __LIBCUDACXX_recursive_mutex_t[6];
 #elif defined(_M_AMD64) || defined(__x86_64__) || defined(_M_ARM64) || defined(__aarch64__)
-typedef void* __libcpp_recursive_mutex_t[5];
+typedef void* __LIBCUDACXX_recursive_mutex_t[5];
 #else
 # error Unsupported architecture
 #endif
 
 // Condition Variable
-typedef void* __libcpp_condvar_t;
-#define _LIBCPP_CONDVAR_INITIALIZER 0
+typedef void* __LIBCUDACXX_condvar_t;
+#define _LIBCUDACXX_CONDVAR_INITIALIZER 0
 
 // Execute Once
-typedef void* __libcpp_exec_once_flag;
-#define _LIBCPP_EXEC_ONCE_INITIALIZER 0
+typedef void* __LIBCUDACXX_exec_once_flag;
+#define _LIBCUDACXX_EXEC_ONCE_INITIALIZER 0
 
 // Thread ID
-typedef long __libcpp_thread_id;
+typedef long __LIBCUDACXX_thread_id;
 
 // Thread
-#define _LIBCPP_NULL_THREAD 0U
+#define _LIBCUDACXX_NULL_THREAD 0U
 
-typedef void* __libcpp_thread_t;
+typedef void* __LIBCUDACXX_thread_t;
 
 // Thread Local Storage
-typedef long __libcpp_tls_key;
+typedef long __LIBCUDACXX_tls_key;
 
-#define _LIBCPP_TLS_DESTRUCTOR_CC __stdcall
-#endif // !defined(_LIBCPP_HAS_THREAD_API_PTHREAD) && !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
+#define _LIBCUDACXX_TLS_DESTRUCTOR_CC __stdcall
+#endif // !defined(_LIBCUDACXX_HAS_THREAD_API_PTHREAD) && !defined(_LIBCUDACXX_HAS_THREAD_API_EXTERNAL)
 
-#if !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
+#if !defined(_LIBCUDACXX_HAS_THREAD_API_EXTERNAL)
 // Mutex
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_recursive_mutex_init(__LIBCUDACXX_recursive_mutex_t *__m);
 
-_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
-int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY _LIBCUDACXX_NO_THREAD_SAFETY_ANALYSIS
+int __LIBCUDACXX_recursive_mutex_lock(__LIBCUDACXX_recursive_mutex_t *__m);
 
-_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
-bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY _LIBCUDACXX_NO_THREAD_SAFETY_ANALYSIS
+bool __LIBCUDACXX_recursive_mutex_trylock(__LIBCUDACXX_recursive_mutex_t *__m);
 
-_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
-int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY _LIBCUDACXX_NO_THREAD_SAFETY_ANALYSIS
+int __LIBCUDACXX_recursive_mutex_unlock(__LIBCUDACXX_recursive_mutex_t *__m);
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_recursive_mutex_destroy(__LIBCUDACXX_recursive_mutex_t *__m);
 
-_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
-int __libcpp_mutex_lock(__libcpp_mutex_t *__m);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY _LIBCUDACXX_NO_THREAD_SAFETY_ANALYSIS
+int __LIBCUDACXX_mutex_lock(__LIBCUDACXX_mutex_t *__m);
 
-_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
-bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY _LIBCUDACXX_NO_THREAD_SAFETY_ANALYSIS
+bool __LIBCUDACXX_mutex_trylock(__LIBCUDACXX_mutex_t *__m);
 
-_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
-int __libcpp_mutex_unlock(__libcpp_mutex_t *__m);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY _LIBCUDACXX_NO_THREAD_SAFETY_ANALYSIS
+int __LIBCUDACXX_mutex_unlock(__LIBCUDACXX_mutex_t *__m);
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_mutex_destroy(__libcpp_mutex_t *__m);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_mutex_destroy(__LIBCUDACXX_mutex_t *__m);
 
 // Condition variable
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_condvar_signal(__libcpp_condvar_t* __cv);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_condvar_signal(__LIBCUDACXX_condvar_t* __cv);
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_condvar_broadcast(__libcpp_condvar_t* __cv);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_condvar_broadcast(__LIBCUDACXX_condvar_t* __cv);
 
-_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
-int __libcpp_condvar_wait(__libcpp_condvar_t* __cv, __libcpp_mutex_t* __m);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY _LIBCUDACXX_NO_THREAD_SAFETY_ANALYSIS
+int __LIBCUDACXX_condvar_wait(__LIBCUDACXX_condvar_t* __cv, __LIBCUDACXX_mutex_t* __m);
 
-_LIBCPP_THREAD_ABI_VISIBILITY _LIBCPP_NO_THREAD_SAFETY_ANALYSIS
-int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
-                               __libcpp_timespec_t *__ts);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY _LIBCUDACXX_NO_THREAD_SAFETY_ANALYSIS
+int __LIBCUDACXX_condvar_timedwait(__LIBCUDACXX_condvar_t *__cv, __LIBCUDACXX_mutex_t *__m,
+                               __LIBCUDACXX_timespec_t *__ts);
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_condvar_destroy(__libcpp_condvar_t* __cv);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_condvar_destroy(__LIBCUDACXX_condvar_t* __cv);
 
 // Execute once
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_execute_once(__libcpp_exec_once_flag *__flag,
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_execute_once(__LIBCUDACXX_exec_once_flag *__flag,
                           void (*__init_routine)());
 
 // Thread id
-_LIBCPP_THREAD_ABI_VISIBILITY
-bool __libcpp_thread_id_equal(__libcpp_thread_id __t1, __libcpp_thread_id __t2);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+bool __LIBCUDACXX_thread_id_equal(__LIBCUDACXX_thread_id __t1, __LIBCUDACXX_thread_id __t2);
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-bool __libcpp_thread_id_less(__libcpp_thread_id __t1, __libcpp_thread_id __t2);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+bool __LIBCUDACXX_thread_id_less(__LIBCUDACXX_thread_id __t1, __LIBCUDACXX_thread_id __t2);
 
 // Thread
-_LIBCPP_THREAD_ABI_VISIBILITY
-bool __libcpp_thread_isnull(const __libcpp_thread_t *__t);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+bool __LIBCUDACXX_thread_isnull(const __LIBCUDACXX_thread_t *__t);
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_thread_create(__LIBCUDACXX_thread_t *__t, void *(*__func)(void *),
                            void *__arg);
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-__libcpp_thread_id __libcpp_thread_get_current_id();
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+__LIBCUDACXX_thread_id __LIBCUDACXX_thread_get_current_id();
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+__LIBCUDACXX_thread_id __LIBCUDACXX_thread_get_id(const __LIBCUDACXX_thread_t *__t);
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_thread_join(__libcpp_thread_t *__t);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_thread_join(__LIBCUDACXX_thread_t *__t);
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_thread_detach(__libcpp_thread_t *__t);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_thread_detach(__LIBCUDACXX_thread_t *__t);
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-void __libcpp_thread_yield();
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+void __LIBCUDACXX_thread_yield();
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+void __LIBCUDACXX_thread_sleep_for(const chrono::nanoseconds& __ns);
 
 // Thread local storage
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_tls_create(__libcpp_tls_key* __key,
-                        void(_LIBCPP_TLS_DESTRUCTOR_CC* __at_exit)(void*));
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_tls_create(__LIBCUDACXX_tls_key* __key,
+                        void(_LIBCUDACXX_TLS_DESTRUCTOR_CC* __at_exit)(void*));
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-void *__libcpp_tls_get(__libcpp_tls_key __key);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+void *__LIBCUDACXX_tls_get(__LIBCUDACXX_tls_key __key);
 
-_LIBCPP_THREAD_ABI_VISIBILITY
-int __libcpp_tls_set(__libcpp_tls_key __key, void *__p);
+_LIBCUDACXX_THREAD_ABI_VISIBILITY
+int __LIBCUDACXX_tls_set(__LIBCUDACXX_tls_key __key, void *__p);
 
-#endif // !defined(_LIBCPP_HAS_THREAD_API_EXTERNAL)
+#endif // !defined(_LIBCUDACXX_HAS_THREAD_API_EXTERNAL)
 
-#if (!defined(_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL) || \
-     defined(_LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL))
+#if (!defined(_LIBCUDACXX_HAS_THREAD_LIBRARY_EXTERNAL) || \
+     defined(_LIBCUDACXX_BUILDING_THREAD_LIBRARY_EXTERNAL))
 
-#if defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+#if defined(_LIBCUDACXX_HAS_THREAD_API_PTHREAD)
 
-int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_init(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   pthread_mutexattr_t attr;
   int __ec = pthread_mutexattr_init(&attr);
@@ -279,110 +279,110 @@ int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m)
   return 0;
 }
 
-int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_lock(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   return pthread_mutex_lock(__m);
 }
 
-bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
+bool __LIBCUDACXX_recursive_mutex_trylock(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   return pthread_mutex_trylock(__m) == 0;
 }
 
-int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_unlock(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   return pthread_mutex_unlock(__m);
 }
 
-int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_destroy(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   return pthread_mutex_destroy(__m);
 }
 
-int __libcpp_mutex_lock(__libcpp_mutex_t *__m)
+int __LIBCUDACXX_mutex_lock(__LIBCUDACXX_mutex_t *__m)
 {
   return pthread_mutex_lock(__m);
 }
 
-bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
+bool __LIBCUDACXX_mutex_trylock(__LIBCUDACXX_mutex_t *__m)
 {
   return pthread_mutex_trylock(__m) == 0;
 }
 
-int __libcpp_mutex_unlock(__libcpp_mutex_t *__m)
+int __LIBCUDACXX_mutex_unlock(__LIBCUDACXX_mutex_t *__m)
 {
   return pthread_mutex_unlock(__m);
 }
 
-int __libcpp_mutex_destroy(__libcpp_mutex_t *__m)
+int __LIBCUDACXX_mutex_destroy(__LIBCUDACXX_mutex_t *__m)
 {
   return pthread_mutex_destroy(__m);
 }
 
 // Condition Variable
-int __libcpp_condvar_signal(__libcpp_condvar_t *__cv)
+int __LIBCUDACXX_condvar_signal(__LIBCUDACXX_condvar_t *__cv)
 {
   return pthread_cond_signal(__cv);
 }
 
-int __libcpp_condvar_broadcast(__libcpp_condvar_t *__cv)
+int __LIBCUDACXX_condvar_broadcast(__LIBCUDACXX_condvar_t *__cv)
 {
   return pthread_cond_broadcast(__cv);
 }
 
-int __libcpp_condvar_wait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m)
+int __LIBCUDACXX_condvar_wait(__LIBCUDACXX_condvar_t *__cv, __LIBCUDACXX_mutex_t *__m)
 {
   return pthread_cond_wait(__cv, __m);
 }
 
-int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
-                               __libcpp_timespec_t *__ts)
+int __LIBCUDACXX_condvar_timedwait(__LIBCUDACXX_condvar_t *__cv, __LIBCUDACXX_mutex_t *__m,
+                               __LIBCUDACXX_timespec_t *__ts)
 {
   return pthread_cond_timedwait(__cv, __m, __ts);
 }
 
-int __libcpp_condvar_destroy(__libcpp_condvar_t *__cv)
+int __LIBCUDACXX_condvar_destroy(__LIBCUDACXX_condvar_t *__cv)
 {
   return pthread_cond_destroy(__cv);
 }
 
 // Execute once
-int __libcpp_execute_once(__libcpp_exec_once_flag *__flag,
+int __LIBCUDACXX_execute_once(__LIBCUDACXX_exec_once_flag *__flag,
                           void (*__init_routine)()) {
   return pthread_once(__flag, __init_routine);
 }
 
 // Thread id
 // Returns non-zero if the thread ids are equal, otherwise 0
-bool __libcpp_thread_id_equal(__libcpp_thread_id __t1, __libcpp_thread_id __t2)
+bool __LIBCUDACXX_thread_id_equal(__LIBCUDACXX_thread_id __t1, __LIBCUDACXX_thread_id __t2)
 {
   return __t1 == __t2;
 }
 
 // Returns non-zero if t1 < t2, otherwise 0
-bool __libcpp_thread_id_less(__libcpp_thread_id __t1, __libcpp_thread_id __t2)
+bool __LIBCUDACXX_thread_id_less(__LIBCUDACXX_thread_id __t1, __LIBCUDACXX_thread_id __t2)
 {
   return __t1 < __t2;
 }
 
 // Thread
-bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) {
-  return __libcpp_thread_get_id(__t) == 0;
+bool __LIBCUDACXX_thread_isnull(const __LIBCUDACXX_thread_t *__t) {
+  return __LIBCUDACXX_thread_get_id(__t) == 0;
 }
 
-int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
+int __LIBCUDACXX_thread_create(__LIBCUDACXX_thread_t *__t, void *(*__func)(void *),
                            void *__arg)
 {
   return pthread_create(__t, nullptr, __func, __arg);
 }
 
-__libcpp_thread_id __libcpp_thread_get_current_id()
+__LIBCUDACXX_thread_id __LIBCUDACXX_thread_get_current_id()
 {
-  const __libcpp_thread_t thread = pthread_self();
-  return __libcpp_thread_get_id(&thread);
+  const __LIBCUDACXX_thread_t thread = pthread_self();
+  return __LIBCUDACXX_thread_get_id(&thread);
 }
 
-__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t)
+__LIBCUDACXX_thread_id __LIBCUDACXX_thread_get_id(const __LIBCUDACXX_thread_t *__t)
 {
 #if defined(__MVS__)
   return __t->__;
@@ -391,123 +391,123 @@ __libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t)
 #endif
 }
 
-int __libcpp_thread_join(__libcpp_thread_t *__t)
+int __LIBCUDACXX_thread_join(__LIBCUDACXX_thread_t *__t)
 {
   return pthread_join(*__t, nullptr);
 }
 
-int __libcpp_thread_detach(__libcpp_thread_t *__t)
+int __LIBCUDACXX_thread_detach(__LIBCUDACXX_thread_t *__t)
 {
   return pthread_detach(*__t);
 }
 
-void __libcpp_thread_yield()
+void __LIBCUDACXX_thread_yield()
 {
   sched_yield();
 }
 
-void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
+void __LIBCUDACXX_thread_sleep_for(const chrono::nanoseconds& __ns)
 {
-   __libcpp_timespec_t __ts = _VSTD::__convert_to_timespec<__libcpp_timespec_t>(__ns);
+   __LIBCUDACXX_timespec_t __ts = _CUDA_VSTD::__convert_to_timespec<__LIBCUDACXX_timespec_t>(__ns);
    while (nanosleep(&__ts, &__ts) == -1 && errno == EINTR);
 }
 
 // Thread local storage
-int __libcpp_tls_create(__libcpp_tls_key *__key, void (*__at_exit)(void *))
+int __LIBCUDACXX_tls_create(__LIBCUDACXX_tls_key *__key, void (*__at_exit)(void *))
 {
   return pthread_key_create(__key, __at_exit);
 }
 
-void *__libcpp_tls_get(__libcpp_tls_key __key)
+void *__LIBCUDACXX_tls_get(__LIBCUDACXX_tls_key __key)
 {
   return pthread_getspecific(__key);
 }
 
-int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
+int __LIBCUDACXX_tls_set(__LIBCUDACXX_tls_key __key, void *__p)
 {
     return pthread_setspecific(__key, __p);
 }
 
-#elif defined(_LIBCPP_HAS_THREAD_API_C11)
+#elif defined(_LIBCUDACXX_HAS_THREAD_API_C11)
 
-int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_init(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   return mtx_init(__m, mtx_plain | mtx_recursive) == thrd_success ? 0 : EINVAL;
 }
 
-int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_lock(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   return mtx_lock(__m) == thrd_success ? 0 : EINVAL;
 }
 
-bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
+bool __LIBCUDACXX_recursive_mutex_trylock(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   return mtx_trylock(__m) == thrd_success;
 }
 
-int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_unlock(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   return mtx_unlock(__m) == thrd_success ? 0 : EINVAL;
 }
 
-int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_destroy(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   mtx_destroy(__m);
   return 0;
 }
 
-int __libcpp_mutex_lock(__libcpp_mutex_t *__m)
+int __LIBCUDACXX_mutex_lock(__LIBCUDACXX_mutex_t *__m)
 {
   return mtx_lock(__m) == thrd_success ? 0 : EINVAL;
 }
 
-bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
+bool __LIBCUDACXX_mutex_trylock(__LIBCUDACXX_mutex_t *__m)
 {
   return mtx_trylock(__m) == thrd_success;
 }
 
-int __libcpp_mutex_unlock(__libcpp_mutex_t *__m)
+int __LIBCUDACXX_mutex_unlock(__LIBCUDACXX_mutex_t *__m)
 {
   return mtx_unlock(__m) == thrd_success ? 0 : EINVAL;
 }
 
-int __libcpp_mutex_destroy(__libcpp_mutex_t *__m)
+int __LIBCUDACXX_mutex_destroy(__LIBCUDACXX_mutex_t *__m)
 {
   mtx_destroy(__m);
   return 0;
 }
 
 // Condition Variable
-int __libcpp_condvar_signal(__libcpp_condvar_t *__cv)
+int __LIBCUDACXX_condvar_signal(__LIBCUDACXX_condvar_t *__cv)
 {
   return cnd_signal(__cv) == thrd_success ? 0 : EINVAL;
 }
 
-int __libcpp_condvar_broadcast(__libcpp_condvar_t *__cv)
+int __LIBCUDACXX_condvar_broadcast(__LIBCUDACXX_condvar_t *__cv)
 {
   return cnd_broadcast(__cv) == thrd_success ? 0 : EINVAL;
 }
 
-int __libcpp_condvar_wait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m)
+int __LIBCUDACXX_condvar_wait(__LIBCUDACXX_condvar_t *__cv, __LIBCUDACXX_mutex_t *__m)
 {
   return cnd_wait(__cv, __m) == thrd_success ? 0 : EINVAL;
 }
 
-int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
+int __LIBCUDACXX_condvar_timedwait(__LIBCUDACXX_condvar_t *__cv, __LIBCUDACXX_mutex_t *__m,
                                timespec *__ts)
 {
   int __ec = cnd_timedwait(__cv, __m, __ts);
   return __ec == thrd_timedout ? ETIMEDOUT : __ec;
 }
 
-int __libcpp_condvar_destroy(__libcpp_condvar_t *__cv)
+int __LIBCUDACXX_condvar_destroy(__LIBCUDACXX_condvar_t *__cv)
 {
   cnd_destroy(__cv);
   return 0;
 }
 
 // Execute once
-int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
+int __LIBCUDACXX_execute_once(__LIBCUDACXX_exec_once_flag *flag,
                           void (*init_routine)(void)) {
   ::call_once(flag, init_routine);
   return 0;
@@ -515,72 +515,72 @@ int __libcpp_execute_once(__libcpp_exec_once_flag *flag,
 
 // Thread id
 // Returns non-zero if the thread ids are equal, otherwise 0
-bool __libcpp_thread_id_equal(__libcpp_thread_id t1, __libcpp_thread_id t2)
+bool __LIBCUDACXX_thread_id_equal(__LIBCUDACXX_thread_id t1, __LIBCUDACXX_thread_id t2)
 {
   return thrd_equal(t1, t2) != 0;
 }
 
 // Returns non-zero if t1 < t2, otherwise 0
-bool __libcpp_thread_id_less(__libcpp_thread_id t1, __libcpp_thread_id t2)
+bool __LIBCUDACXX_thread_id_less(__LIBCUDACXX_thread_id t1, __LIBCUDACXX_thread_id t2)
 {
   return t1 < t2;
 }
 
 // Thread
-bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) {
-  return __libcpp_thread_get_id(__t) == 0;
+bool __LIBCUDACXX_thread_isnull(const __LIBCUDACXX_thread_t *__t) {
+  return __LIBCUDACXX_thread_get_id(__t) == 0;
 }
 
-int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
+int __LIBCUDACXX_thread_create(__LIBCUDACXX_thread_t *__t, void *(*__func)(void *),
                            void *__arg)
 {
   int __ec = thrd_create(__t, reinterpret_cast<thrd_start_t>(__func), __arg);
   return __ec == thrd_nomem ? ENOMEM : __ec;
 }
 
-__libcpp_thread_id __libcpp_thread_get_current_id()
+__LIBCUDACXX_thread_id __LIBCUDACXX_thread_get_current_id()
 {
   return thrd_current();
 }
 
-__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t)
+__LIBCUDACXX_thread_id __LIBCUDACXX_thread_get_id(const __LIBCUDACXX_thread_t *__t)
 {
   return *__t;
 }
 
-int __libcpp_thread_join(__libcpp_thread_t *__t)
+int __LIBCUDACXX_thread_join(__LIBCUDACXX_thread_t *__t)
 {
   return thrd_join(*__t, nullptr) == thrd_success ? 0 : EINVAL;
 }
 
-int __libcpp_thread_detach(__libcpp_thread_t *__t)
+int __LIBCUDACXX_thread_detach(__LIBCUDACXX_thread_t *__t)
 {
   return thrd_detach(*__t) == thrd_success ? 0 : EINVAL;
 }
 
-void __libcpp_thread_yield()
+void __LIBCUDACXX_thread_yield()
 {
   thrd_yield();
 }
 
-void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
+void __LIBCUDACXX_thread_sleep_for(const chrono::nanoseconds& __ns)
 {
-   __libcpp_timespec_t __ts = _VSTD::__convert_to_timespec<__libcpp_timespec_t>(__ns);
+   __LIBCUDACXX_timespec_t __ts = _CUDA_VSTD::__convert_to_timespec<__LIBCUDACXX_timespec_t>(__ns);
   thrd_sleep(&__ts, nullptr);
 }
 
 // Thread local storage
-int __libcpp_tls_create(__libcpp_tls_key *__key, void (*__at_exit)(void *))
+int __LIBCUDACXX_tls_create(__LIBCUDACXX_tls_key *__key, void (*__at_exit)(void *))
 {
   return tss_create(__key, __at_exit) == thrd_success ? 0 : EINVAL;
 }
 
-void *__libcpp_tls_get(__libcpp_tls_key __key)
+void *__LIBCUDACXX_tls_get(__LIBCUDACXX_tls_key __key)
 {
   return tss_get(__key);
 }
 
-int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
+int __LIBCUDACXX_tls_set(__LIBCUDACXX_tls_key __key, void *__p)
 {
   return tss_set(__key, __p) == thrd_success ? 0 : EINVAL;
 }
@@ -588,90 +588,90 @@ int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
 #endif
 
 
-#endif // !_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL || _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL
+#endif // !_LIBCUDACXX_HAS_THREAD_LIBRARY_EXTERNAL || _LIBCUDACXX_BUILDING_THREAD_LIBRARY_EXTERNAL
 
-class _LIBCPP_TYPE_VIS thread;
-class _LIBCPP_TYPE_VIS __thread_id;
+class _LIBCUDACXX_TYPE_VIS thread;
+class _LIBCUDACXX_TYPE_VIS __thread_id;
 
 namespace this_thread
 {
 
-_LIBCPP_INLINE_VISIBILITY __thread_id get_id() _NOEXCEPT;
+_LIBCUDACXX_INLINE_VISIBILITY __thread_id get_id() _NOEXCEPT;
 
 } // namespace this_thread
 
 template<> struct hash<__thread_id>;
 
-class _LIBCPP_TEMPLATE_VIS __thread_id
+class _LIBCUDACXX_TEMPLATE_VIS __thread_id
 {
     // FIXME: pthread_t is a pointer on Darwin but a long on Linux.
     // NULL is the no-thread value on Darwin.  Someone needs to check
     // on other platforms.  We assume 0 works everywhere for now.
-    __libcpp_thread_id __id_;
+    __LIBCUDACXX_thread_id __id_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __thread_id() _NOEXCEPT : __id_(0) {}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(__thread_id __x, __thread_id __y) _NOEXCEPT
         { // don't pass id==0 to underlying routines
         if (__x.__id_ == 0) return __y.__id_ == 0;
         if (__y.__id_ == 0) return false;
-        return __libcpp_thread_id_equal(__x.__id_, __y.__id_);
+        return __LIBCUDACXX_thread_id_equal(__x.__id_, __y.__id_);
         }
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(__thread_id __x, __thread_id __y) _NOEXCEPT
         {return !(__x == __y);}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator< (__thread_id __x, __thread_id __y) _NOEXCEPT
         { // id==0 is always less than any other thread_id
         if (__x.__id_ == 0) return __y.__id_ != 0;
         if (__y.__id_ == 0) return false;
-        return  __libcpp_thread_id_less(__x.__id_, __y.__id_);
+        return  __LIBCUDACXX_thread_id_less(__x.__id_, __y.__id_);
         }
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator<=(__thread_id __x, __thread_id __y) _NOEXCEPT
         {return !(__y < __x);}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator> (__thread_id __x, __thread_id __y) _NOEXCEPT
         {return   __y < __x ;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator>=(__thread_id __x, __thread_id __y) _NOEXCEPT
         {return !(__x < __y);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __reset() { __id_ = 0; }
 
     template<class _CharT, class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream<_CharT, _Traits>&
     operator<<(basic_ostream<_CharT, _Traits>& __os, __thread_id __id);
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
-    __thread_id(__libcpp_thread_id __id) : __id_(__id) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    __thread_id(__LIBCUDACXX_thread_id __id) : __id_(__id) {}
 
     friend __thread_id this_thread::get_id() _NOEXCEPT;
-    friend class _LIBCPP_TYPE_VIS thread;
-    friend struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>;
+    friend class _LIBCUDACXX_TYPE_VIS thread;
+    friend struct _LIBCUDACXX_TEMPLATE_VIS hash<__thread_id>;
 };
 
 namespace this_thread
 {
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __thread_id
 get_id() _NOEXCEPT
 {
-    return __libcpp_thread_get_current_id();
+    return __LIBCUDACXX_thread_get_current_id();
 }
 
 } // namespace this_thread
 
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // !_LIBCUDACXX_HAS_NO_THREADS
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___THREADING_SUPPORT
+#endif // _LIBCUDACXX___THREADING_SUPPORT

diff  --git a/libcxx/include/__tree b/libcxx/include/__tree
index 59525a03047a..4d4c9d880e62 100644
--- a/libcxx/include/__tree
+++ b/libcxx/include/__tree
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TREE
-#define _LIBCPP___TREE
+#ifndef _LIBCUDACXX___TREE
+#define _LIBCUDACXX___TREE
 
 #include <__algorithm/min.h>
 #include <__assert>
@@ -24,26 +24,26 @@
 #include <memory>
 #include <stdexcept>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS map;
-template <class, class, class, class> class _LIBCPP_TEMPLATE_VIS multimap;
-template <class, class, class> class _LIBCPP_TEMPLATE_VIS set;
-template <class, class, class> class _LIBCPP_TEMPLATE_VIS multiset;
+template <class, class, class, class> class _LIBCUDACXX_TEMPLATE_VIS map;
+template <class, class, class, class> class _LIBCUDACXX_TEMPLATE_VIS multimap;
+template <class, class, class> class _LIBCUDACXX_TEMPLATE_VIS set;
+template <class, class, class> class _LIBCUDACXX_TEMPLATE_VIS multiset;
 
 template <class _Tp, class _Compare, class _Allocator> class __tree;
 template <class _Tp, class _NodePtr, class _DiffType>
-    class _LIBCPP_TEMPLATE_VIS __tree_iterator;
+    class _LIBCUDACXX_TEMPLATE_VIS __tree_iterator;
 template <class _Tp, class _ConstNodePtr, class _DiffType>
-    class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;
+    class _LIBCUDACXX_TEMPLATE_VIS __tree_const_iterator;
 
 template <class _Pointer> class __tree_end_node;
 template <class _VoidPtr> class __tree_node_base;
@@ -53,8 +53,8 @@ template <class _Key, class _Value>
 struct __value_type;
 
 template <class _Allocator> class __map_node_destructor;
-template <class _TreeIterator> class _LIBCPP_TEMPLATE_VIS __map_iterator;
-template <class _TreeIterator> class _LIBCPP_TEMPLATE_VIS __map_const_iterator;
+template <class _TreeIterator> class _LIBCUDACXX_TEMPLATE_VIS __map_iterator;
+template <class _TreeIterator> class _LIBCUDACXX_TEMPLATE_VIS __map_const_iterator;
 
 /*
 
@@ -80,7 +80,7 @@ __root, have a non-null __parent_ field.
 // Returns:  true if __x is a left child of its parent, else false
 // Precondition:  __x != nullptr.
 template <class _NodePtr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 __tree_is_left_child(_NodePtr __x) _NOEXCEPT
 {
@@ -114,10 +114,10 @@ __tree_sub_invariant(_NodePtr __x)
         if (__x->__right_ && !__x->__right_->__is_black_)
             return 0;
     }
-    unsigned __h = _VSTD::__tree_sub_invariant(__x->__left_);
+    unsigned __h = _CUDA_VSTD::__tree_sub_invariant(__x->__left_);
     if (__h == 0)
         return 0;  // invalid left subtree
-    if (__h != _VSTD::__tree_sub_invariant(__x->__right_))
+    if (__h != _CUDA_VSTD::__tree_sub_invariant(__x->__right_))
         return 0;  // invalid or 
diff erent height right subtree
     return __h + __x->__is_black_;  // return black height of this node
 }
@@ -134,22 +134,22 @@ __tree_invariant(_NodePtr __root)
     // check __x->__parent_ consistency
     if (__root->__parent_ == nullptr)
         return false;
-    if (!_VSTD::__tree_is_left_child(__root))
+    if (!_CUDA_VSTD::__tree_is_left_child(__root))
         return false;
     // root must be black
     if (!__root->__is_black_)
         return false;
     // do normal node checks
-    return _VSTD::__tree_sub_invariant(__root) != 0;
+    return _CUDA_VSTD::__tree_sub_invariant(__root) != 0;
 }
 
 // Returns:  pointer to the left-most node under __x.
 template <class _NodePtr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _NodePtr
 __tree_min(_NodePtr __x) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__x != nullptr, "Root node shouldn't be null");
+    _LIBCUDACXX_ASSERT(__x != nullptr, "Root node shouldn't be null");
     while (__x->__left_ != nullptr)
         __x = __x->__left_;
     return __x;
@@ -157,11 +157,11 @@ __tree_min(_NodePtr __x) _NOEXCEPT
 
 // Returns:  pointer to the right-most node under __x.
 template <class _NodePtr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _NodePtr
 __tree_max(_NodePtr __x) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__x != nullptr, "Root node shouldn't be null");
+    _LIBCUDACXX_ASSERT(__x != nullptr, "Root node shouldn't be null");
     while (__x->__right_ != nullptr)
         __x = __x->__right_;
     return __x;
@@ -172,23 +172,23 @@ template <class _NodePtr>
 _NodePtr
 __tree_next(_NodePtr __x) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
+    _LIBCUDACXX_ASSERT(__x != nullptr, "node shouldn't be null");
     if (__x->__right_ != nullptr)
-        return _VSTD::__tree_min(__x->__right_);
-    while (!_VSTD::__tree_is_left_child(__x))
+        return _CUDA_VSTD::__tree_min(__x->__right_);
+    while (!_CUDA_VSTD::__tree_is_left_child(__x))
         __x = __x->__parent_unsafe();
     return __x->__parent_unsafe();
 }
 
 template <class _EndNodePtr, class _NodePtr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _EndNodePtr
 __tree_next_iter(_NodePtr __x) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
+    _LIBCUDACXX_ASSERT(__x != nullptr, "node shouldn't be null");
     if (__x->__right_ != nullptr)
-        return static_cast<_EndNodePtr>(_VSTD::__tree_min(__x->__right_));
-    while (!_VSTD::__tree_is_left_child(__x))
+        return static_cast<_EndNodePtr>(_CUDA_VSTD::__tree_min(__x->__right_));
+    while (!_CUDA_VSTD::__tree_is_left_child(__x))
         __x = __x->__parent_unsafe();
     return static_cast<_EndNodePtr>(__x->__parent_);
 }
@@ -196,15 +196,15 @@ __tree_next_iter(_NodePtr __x) _NOEXCEPT
 // Returns:  pointer to the previous in-order node before __x.
 // Note: __x may be the end node.
 template <class _NodePtr, class _EndNodePtr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _NodePtr
 __tree_prev_iter(_EndNodePtr __x) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
+    _LIBCUDACXX_ASSERT(__x != nullptr, "node shouldn't be null");
     if (__x->__left_ != nullptr)
-        return _VSTD::__tree_max(__x->__left_);
+        return _CUDA_VSTD::__tree_max(__x->__left_);
     _NodePtr __xx = static_cast<_NodePtr>(__x);
-    while (_VSTD::__tree_is_left_child(__xx))
+    while (_CUDA_VSTD::__tree_is_left_child(__xx))
         __xx = __xx->__parent_unsafe();
     return __xx->__parent_unsafe();
 }
@@ -214,7 +214,7 @@ template <class _NodePtr>
 _NodePtr
 __tree_leaf(_NodePtr __x) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
+    _LIBCUDACXX_ASSERT(__x != nullptr, "node shouldn't be null");
     while (true)
     {
         if (__x->__left_ != nullptr)
@@ -238,14 +238,14 @@ template <class _NodePtr>
 void
 __tree_left_rotate(_NodePtr __x) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
-    _LIBCPP_ASSERT(__x->__right_ != nullptr, "node should have a right child");
+    _LIBCUDACXX_ASSERT(__x != nullptr, "node shouldn't be null");
+    _LIBCUDACXX_ASSERT(__x->__right_ != nullptr, "node should have a right child");
     _NodePtr __y = __x->__right_;
     __x->__right_ = __y->__left_;
     if (__x->__right_ != nullptr)
         __x->__right_->__set_parent(__x);
     __y->__parent_ = __x->__parent_;
-    if (_VSTD::__tree_is_left_child(__x))
+    if (_CUDA_VSTD::__tree_is_left_child(__x))
         __x->__parent_->__left_ = __y;
     else
         __x->__parent_unsafe()->__right_ = __y;
@@ -259,14 +259,14 @@ template <class _NodePtr>
 void
 __tree_right_rotate(_NodePtr __x) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__x != nullptr, "node shouldn't be null");
-    _LIBCPP_ASSERT(__x->__left_ != nullptr, "node should have a left child");
+    _LIBCUDACXX_ASSERT(__x != nullptr, "node shouldn't be null");
+    _LIBCUDACXX_ASSERT(__x->__left_ != nullptr, "node should have a left child");
     _NodePtr __y = __x->__left_;
     __x->__left_ = __y->__right_;
     if (__x->__left_ != nullptr)
         __x->__left_->__set_parent(__x);
     __y->__parent_ = __x->__parent_;
-    if (_VSTD::__tree_is_left_child(__x))
+    if (_CUDA_VSTD::__tree_is_left_child(__x))
         __x->__parent_->__left_ = __y;
     else
         __x->__parent_unsafe()->__right_ = __y;
@@ -285,13 +285,13 @@ template <class _NodePtr>
 void
 __tree_balance_after_insert(_NodePtr __root, _NodePtr __x) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__root != nullptr, "Root of the tree shouldn't be null");
-    _LIBCPP_ASSERT(__x != nullptr, "Can't attach null node to a leaf");
+    _LIBCUDACXX_ASSERT(__root != nullptr, "Root of the tree shouldn't be null");
+    _LIBCUDACXX_ASSERT(__x != nullptr, "Can't attach null node to a leaf");
     __x->__is_black_ = __x == __root;
     while (__x != __root && !__x->__parent_unsafe()->__is_black_)
     {
         // __x->__parent_ != __root because __x->__parent_->__is_black == false
-        if (_VSTD::__tree_is_left_child(__x->__parent_unsafe()))
+        if (_CUDA_VSTD::__tree_is_left_child(__x->__parent_unsafe()))
         {
             _NodePtr __y = __x->__parent_unsafe()->__parent_unsafe()->__right_;
             if (__y != nullptr && !__y->__is_black_)
@@ -304,16 +304,16 @@ __tree_balance_after_insert(_NodePtr __root, _NodePtr __x) _NOEXCEPT
             }
             else
             {
-                if (!_VSTD::__tree_is_left_child(__x))
+                if (!_CUDA_VSTD::__tree_is_left_child(__x))
                 {
                     __x = __x->__parent_unsafe();
-                    _VSTD::__tree_left_rotate(__x);
+                    _CUDA_VSTD::__tree_left_rotate(__x);
                 }
                 __x = __x->__parent_unsafe();
                 __x->__is_black_ = true;
                 __x = __x->__parent_unsafe();
                 __x->__is_black_ = false;
-                _VSTD::__tree_right_rotate(__x);
+                _CUDA_VSTD::__tree_right_rotate(__x);
                 break;
             }
         }
@@ -330,16 +330,16 @@ __tree_balance_after_insert(_NodePtr __root, _NodePtr __x) _NOEXCEPT
             }
             else
             {
-                if (_VSTD::__tree_is_left_child(__x))
+                if (_CUDA_VSTD::__tree_is_left_child(__x))
                 {
                     __x = __x->__parent_unsafe();
-                    _VSTD::__tree_right_rotate(__x);
+                    _CUDA_VSTD::__tree_right_rotate(__x);
                 }
                 __x = __x->__parent_unsafe();
                 __x->__is_black_ = true;
                 __x = __x->__parent_unsafe();
                 __x->__is_black_ = false;
-                _VSTD::__tree_left_rotate(__x);
+                _CUDA_VSTD::__tree_left_rotate(__x);
                 break;
             }
         }
@@ -355,15 +355,15 @@ template <class _NodePtr>
 void
 __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__root != nullptr, "Root node should not be null");
-    _LIBCPP_ASSERT(__z != nullptr, "The node to remove should not be null");
-    _LIBCPP_DEBUG_ASSERT(__tree_invariant(__root), "The tree invariants should hold");
+    _LIBCUDACXX_ASSERT(__root != nullptr, "Root node should not be null");
+    _LIBCUDACXX_ASSERT(__z != nullptr, "The node to remove should not be null");
+    _LIBCUDACXX_DEBUG_ASSERT(__tree_invariant(__root), "The tree invariants should hold");
     // __z will be removed from the tree.  Client still needs to destruct/deallocate it
     // __y is either __z, or if __z has two children, __tree_next(__z).
     // __y will have at most one child.
     // __y will be the initial hole in the tree (make the hole at a leaf)
     _NodePtr __y = (__z->__left_ == nullptr || __z->__right_ == nullptr) ?
-                    __z : _VSTD::__tree_next(__z);
+                    __z : _CUDA_VSTD::__tree_next(__z);
     // __x is __y's possibly null single child
     _NodePtr __x = __y->__left_ != nullptr ? __y->__left_ : __y->__right_;
     // __w is __x's possibly null uncle (will become __x's sibling)
@@ -371,7 +371,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
     // link __x to __y's parent, and find __w
     if (__x != nullptr)
         __x->__parent_ = __y->__parent_;
-    if (_VSTD::__tree_is_left_child(__y))
+    if (_CUDA_VSTD::__tree_is_left_child(__y))
     {
         __y->__parent_->__left_ = __x;
         if (__y != __root)
@@ -392,7 +392,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
     {
         // __z->__left_ != nulptr but __z->__right_ might == __x == nullptr
         __y->__parent_ = __z->__parent_;
-        if (_VSTD::__tree_is_left_child(__z))
+        if (_CUDA_VSTD::__tree_is_left_child(__z))
             __y->__parent_->__left_ = __y;
         else
             __y->__parent_unsafe()->__right_ = __y;
@@ -432,13 +432,13 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
             //     with a non-null black child).
             while (true)
             {
-                if (!_VSTD::__tree_is_left_child(__w))  // if x is left child
+                if (!_CUDA_VSTD::__tree_is_left_child(__w))  // if x is left child
                 {
                     if (!__w->__is_black_)
                     {
                         __w->__is_black_ = true;
                         __w->__parent_unsafe()->__is_black_ = false;
-                        _VSTD::__tree_left_rotate(__w->__parent_unsafe());
+                        _CUDA_VSTD::__tree_left_rotate(__w->__parent_unsafe());
                         // __x is still valid
                         // reset __root only if necessary
                         if (__root == __w->__left_)
@@ -459,7 +459,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
                             break;
                         }
                         // reset sibling, and it still can't be null
-                        __w = _VSTD::__tree_is_left_child(__x) ?
+                        __w = _CUDA_VSTD::__tree_is_left_child(__x) ?
                                     __x->__parent_unsafe()->__right_ :
                                     __x->__parent_->__left_;
                         // continue;
@@ -471,7 +471,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
                             // __w left child is non-null and red
                             __w->__left_->__is_black_ = true;
                             __w->__is_black_ = false;
-                            _VSTD::__tree_right_rotate(__w);
+                            _CUDA_VSTD::__tree_right_rotate(__w);
                             // __w is known not to be root, so root hasn't changed
                             // reset sibling, and it still can't be null
                             __w = __w->__parent_unsafe();
@@ -480,7 +480,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
                         __w->__is_black_ = __w->__parent_unsafe()->__is_black_;
                         __w->__parent_unsafe()->__is_black_ = true;
                         __w->__right_->__is_black_ = true;
-                        _VSTD::__tree_left_rotate(__w->__parent_unsafe());
+                        _CUDA_VSTD::__tree_left_rotate(__w->__parent_unsafe());
                         break;
                     }
                 }
@@ -490,7 +490,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
                     {
                         __w->__is_black_ = true;
                         __w->__parent_unsafe()->__is_black_ = false;
-                        _VSTD::__tree_right_rotate(__w->__parent_unsafe());
+                        _CUDA_VSTD::__tree_right_rotate(__w->__parent_unsafe());
                         // __x is still valid
                         // reset __root only if necessary
                         if (__root == __w->__right_)
@@ -511,7 +511,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
                             break;
                         }
                         // reset sibling, and it still can't be null
-                        __w = _VSTD::__tree_is_left_child(__x) ?
+                        __w = _CUDA_VSTD::__tree_is_left_child(__x) ?
                                     __x->__parent_unsafe()->__right_ :
                                     __x->__parent_->__left_;
                         // continue;
@@ -523,7 +523,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
                             // __w right child is non-null and red
                             __w->__right_->__is_black_ = true;
                             __w->__is_black_ = false;
-                            _VSTD::__tree_left_rotate(__w);
+                            _CUDA_VSTD::__tree_left_rotate(__w);
                             // __w is known not to be root, so root hasn't changed
                             // reset sibling, and it still can't be null
                             __w = __w->__parent_unsafe();
@@ -532,7 +532,7 @@ __tree_remove(_NodePtr __root, _NodePtr __z) _NOEXCEPT
                         __w->__is_black_ = __w->__parent_unsafe()->__is_black_;
                         __w->__parent_unsafe()->__is_black_ = true;
                         __w->__left_->__is_black_ = true;
-                        _VSTD::__tree_right_rotate(__w->__parent_unsafe());
+                        _CUDA_VSTD::__tree_right_rotate(__w->__parent_unsafe());
                         break;
                     }
                 }
@@ -563,21 +563,21 @@ struct __tree_key_value_types {
   typedef _Tp __container_value_type;
   static const bool __is_map = false;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static key_type const& __get_key(_Tp const& __v) {
     return __v;
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __container_value_type const& __get_value(__node_value_type const& __v) {
     return __v;
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __container_value_type* __get_ptr(__node_value_type& __n) {
-    return _VSTD::addressof(__n);
+    return _CUDA_VSTD::addressof(__n);
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __container_value_type&& __move(__node_value_type& __v) {
-    return _VSTD::move(__v);
+    return _CUDA_VSTD::move(__v);
   }
 };
 
@@ -590,38 +590,38 @@ struct __tree_key_value_types<__value_type<_Key, _Tp> > {
   typedef __container_value_type                       __map_value_type;
   static const bool __is_map = true;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static key_type const&
   __get_key(__node_value_type const& __t) {
     return __t.__get_value().first;
   }
 
   template <class _Up>
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __enable_if_t<__is_same_uncvref<_Up, __container_value_type>::value, key_type const&>
   __get_key(_Up& __t) {
     return __t.first;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __container_value_type const&
   __get_value(__node_value_type const& __t) {
     return __t.__get_value();
   }
 
   template <class _Up>
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __enable_if_t<__is_same_uncvref<_Up, __container_value_type>::value, __container_value_type const&>
   __get_value(_Up& __t) {
     return __t;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __container_value_type* __get_ptr(__node_value_type& __n) {
-    return _VSTD::addressof(__n.__get_value());
+    return _CUDA_VSTD::addressof(__n.__get_value());
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static pair<key_type&&, mapped_type&&> __move(__node_value_type& __v) {
     return __v.__move();
   }
@@ -638,7 +638,7 @@ struct __tree_node_base_types {
   typedef __tree_end_node<__node_base_pointer>                  __end_node_type;
   typedef typename __rebind_pointer<_VoidPtr, __end_node_type>::type
                                                              __end_node_pointer;
-#if defined(_LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB)
+#if defined(_LIBCUDACXX_ABI_TREE_REMOVE_NODE_POINTER_UB)
   typedef __end_node_pointer __parent_pointer;
 #else
   typedef typename conditional<
@@ -687,7 +687,7 @@ public:
                                                       __node_value_type_pointer;
   typedef typename __rebind_pointer<_VoidPtr, const __node_value_type>::type
                                                 __const_node_value_type_pointer;
-#if defined(_LIBCPP_ABI_TREE_REMOVE_NODE_POINTER_UB)
+#if defined(_LIBCUDACXX_ABI_TREE_REMOVE_NODE_POINTER_UB)
   typedef typename __base::__end_node_pointer __iter_pointer;
 #else
   typedef typename conditional<
@@ -718,12 +718,12 @@ public:
     typedef _Pointer pointer;
     pointer __left_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __tree_end_node() _NOEXCEPT : __left_() {}
 };
 
 template <class _VoidPtr>
-class _LIBCPP_STANDALONE_DEBUG __tree_node_base
+class _LIBCUDACXX_STANDALONE_DEBUG __tree_node_base
     : public __tree_node_base_types<_VoidPtr>::__end_node_type
 {
     typedef __tree_node_base_types<_VoidPtr> _NodeBaseTypes;
@@ -736,10 +736,10 @@ public:
     __parent_pointer __parent_;
     bool __is_black_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer __parent_unsafe() const { return static_cast<pointer>(__parent_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __set_parent(pointer __p) {
         __parent_ = static_cast<__parent_pointer>(__p);
     }
@@ -751,7 +751,7 @@ private:
 };
 
 template <class _Tp, class _VoidPtr>
-class _LIBCPP_STANDALONE_DEBUG __tree_node
+class _LIBCUDACXX_STANDALONE_DEBUG __tree_node
     : public __tree_node_base<_VoidPtr>
 {
 public:
@@ -786,13 +786,13 @@ public:
     __tree_node_destructor(const __tree_node_destructor &) = default;
     __tree_node_destructor& operator=(const __tree_node_destructor&) = delete;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __tree_node_destructor(allocator_type& __na, bool __val = false) _NOEXCEPT
         : __na_(__na),
           __value_constructed(__val)
         {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator()(pointer __p) _NOEXCEPT
     {
         if (__value_constructed)
@@ -804,7 +804,7 @@ public:
     template <class> friend class __map_node_destructor;
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _NodeType, class _Alloc>
 struct __generic_container_node_destructor;
 template <class _Tp, class _VoidPtr, class _Alloc>
@@ -816,7 +816,7 @@ struct __generic_container_node_destructor<__tree_node<_Tp, _VoidPtr>, _Alloc>
 #endif
 
 template <class _Tp, class _NodePtr, class _DiffType>
-class _LIBCPP_TEMPLATE_VIS __tree_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __tree_iterator
 {
     typedef __tree_node_types<_NodePtr>                     _NodeTypes;
     typedef _NodePtr                                        __node_pointer;
@@ -834,62 +834,62 @@ public:
     typedef value_type&                                    reference;
     typedef typename _NodeTypes::__node_value_type_pointer pointer;
 
-    _LIBCPP_INLINE_VISIBILITY __tree_iterator() _NOEXCEPT
-#if _LIBCPP_STD_VER > 11
+    _LIBCUDACXX_INLINE_VISIBILITY __tree_iterator() _NOEXCEPT
+#if _LIBCUDACXX_STD_VER > 11
     : __ptr_(nullptr)
 #endif
     {}
 
-    _LIBCPP_INLINE_VISIBILITY reference operator*() const
+    _LIBCUDACXX_INLINE_VISIBILITY reference operator*() const
         {return __get_np()->__value_;}
-    _LIBCPP_INLINE_VISIBILITY pointer operator->() const
+    _LIBCUDACXX_INLINE_VISIBILITY pointer operator->() const
         {return pointer_traits<pointer>::pointer_to(__get_np()->__value_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __tree_iterator& operator++() {
       __ptr_ = static_cast<__iter_pointer>(
-          _VSTD::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_)));
+          _CUDA_VSTD::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_)));
       return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __tree_iterator operator++(int)
         {__tree_iterator __t(*this); ++(*this); return __t;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __tree_iterator& operator--() {
-      __ptr_ = static_cast<__iter_pointer>(_VSTD::__tree_prev_iter<__node_base_pointer>(
+      __ptr_ = static_cast<__iter_pointer>(_CUDA_VSTD::__tree_prev_iter<__node_base_pointer>(
           static_cast<__end_node_pointer>(__ptr_)));
       return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __tree_iterator operator--(int)
         {__tree_iterator __t(*this); --(*this); return __t;}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const __tree_iterator& __x, const __tree_iterator& __y)
         {return __x.__ptr_ == __y.__ptr_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const __tree_iterator& __x, const __tree_iterator& __y)
         {return !(__x == __y);}
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __tree_iterator(__node_pointer __p) _NOEXCEPT : __ptr_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __tree_iterator(__end_node_pointer __p) _NOEXCEPT : __ptr_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __node_pointer __get_np() const { return static_cast<__node_pointer>(__ptr_); }
     template <class, class, class> friend class __tree;
-    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __map_iterator;
-    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
-    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
-    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS set;
-    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS multiset;
+    template <class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS __tree_const_iterator;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __map_iterator;
+    template <class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS map;
+    template <class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS multimap;
+    template <class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS set;
+    template <class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS multiset;
 };
 
 template <class _Tp, class _NodePtr, class _DiffType>
-class _LIBCPP_TEMPLATE_VIS __tree_const_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __tree_const_iterator
 {
     typedef __tree_node_types<_NodePtr>                     _NodeTypes;
     typedef typename _NodeTypes::__node_pointer             __node_pointer;
@@ -907,8 +907,8 @@ public:
     typedef const value_type&                                    reference;
     typedef typename _NodeTypes::__const_node_value_type_pointer pointer;
 
-    _LIBCPP_INLINE_VISIBILITY __tree_const_iterator() _NOEXCEPT
-#if _LIBCPP_STD_VER > 11
+    _LIBCUDACXX_INLINE_VISIBILITY __tree_const_iterator() _NOEXCEPT
+#if _LIBCUDACXX_STD_VER > 11
     : __ptr_(nullptr)
 #endif
     {}
@@ -917,66 +917,66 @@ private:
     typedef __tree_iterator<value_type, __node_pointer, 
diff erence_type>
                                                            __non_const_iterator;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __tree_const_iterator(__non_const_iterator __p) _NOEXCEPT
         : __ptr_(__p.__ptr_) {}
 
-    _LIBCPP_INLINE_VISIBILITY reference operator*() const
+    _LIBCUDACXX_INLINE_VISIBILITY reference operator*() const
         {return __get_np()->__value_;}
-    _LIBCPP_INLINE_VISIBILITY pointer operator->() const
+    _LIBCUDACXX_INLINE_VISIBILITY pointer operator->() const
         {return pointer_traits<pointer>::pointer_to(__get_np()->__value_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __tree_const_iterator& operator++() {
       __ptr_ = static_cast<__iter_pointer>(
-          _VSTD::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_)));
+          _CUDA_VSTD::__tree_next_iter<__end_node_pointer>(static_cast<__node_base_pointer>(__ptr_)));
       return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __tree_const_iterator operator++(int)
         {__tree_const_iterator __t(*this); ++(*this); return __t;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __tree_const_iterator& operator--() {
-      __ptr_ = static_cast<__iter_pointer>(_VSTD::__tree_prev_iter<__node_base_pointer>(
+      __ptr_ = static_cast<__iter_pointer>(_CUDA_VSTD::__tree_prev_iter<__node_base_pointer>(
           static_cast<__end_node_pointer>(__ptr_)));
       return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __tree_const_iterator operator--(int)
         {__tree_const_iterator __t(*this); --(*this); return __t;}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const __tree_const_iterator& __x, const __tree_const_iterator& __y)
         {return __x.__ptr_ == __y.__ptr_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const __tree_const_iterator& __x, const __tree_const_iterator& __y)
         {return !(__x == __y);}
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __tree_const_iterator(__node_pointer __p) _NOEXCEPT
         : __ptr_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __tree_const_iterator(__end_node_pointer __p) _NOEXCEPT
         : __ptr_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __node_pointer __get_np() const { return static_cast<__node_pointer>(__ptr_); }
 
     template <class, class, class> friend class __tree;
-    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
-    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
-    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS set;
-    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS multiset;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __map_const_iterator;
+    template <class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS map;
+    template <class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS multimap;
+    template <class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS set;
+    template <class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS multiset;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __map_const_iterator;
 
 };
 
 template<class _Tp, class _Compare>
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_DIAGNOSE_WARNING(!__invokable<_Compare const&, _Tp const&, _Tp const&>::value,
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_DIAGNOSE_WARNING(!__invokable<_Compare const&, _Tp const&, _Tp const&>::value,
         "the specified comparator type does not provide a viable const call operator")
 #endif
 int __diagnose_non_const_comparator();
@@ -1040,14 +1040,14 @@ private:
     __compressed_pair<size_type, value_compare>        __pair3_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __iter_pointer __end_node() _NOEXCEPT
     {
         return static_cast<__iter_pointer>(
                 pointer_traits<__end_node_ptr>::pointer_to(__pair1_.first())
         );
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __iter_pointer __end_node() const _NOEXCEPT
     {
         return static_cast<__iter_pointer>(
@@ -1056,39 +1056,39 @@ public:
             )
         );
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           __node_allocator& __node_alloc() _NOEXCEPT {return __pair1_.second();}
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const __node_allocator& __node_alloc() const _NOEXCEPT
         {return __pair1_.second();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           __iter_pointer& __begin_node() _NOEXCEPT {return __begin_node_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const __iter_pointer& __begin_node() const _NOEXCEPT {return __begin_node_;}
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type __alloc() const _NOEXCEPT
         {return allocator_type(__node_alloc());}
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           size_type& size() _NOEXCEPT {return __pair3_.first();}
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const size_type& size() const _NOEXCEPT {return __pair3_.first();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           value_compare& value_comp() _NOEXCEPT {return __pair3_.second();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const value_compare& value_comp() const _NOEXCEPT
         {return __pair3_.second();}
 public:
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __node_pointer __root() const _NOEXCEPT
         {return static_cast<__node_pointer>(__end_node()->__left_);}
 
     __node_base_pointer* __root_ptr() const _NOEXCEPT {
-        return _VSTD::addressof(__end_node()->__left_);
+        return _CUDA_VSTD::addressof(__end_node()->__left_);
     }
 
     typedef __tree_iterator<value_type, __node_pointer, 
diff erence_type>             iterator;
@@ -1118,25 +1118,25 @@ public:
             is_nothrow_move_assignable<__node_allocator>::value);
     ~__tree();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator begin()  _NOEXCEPT {return       iterator(__begin_node());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin() const _NOEXCEPT {return const_iterator(__begin_node());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator end() _NOEXCEPT {return       iterator(__end_node());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end() const _NOEXCEPT {return const_iterator(__end_node());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT
-        {return _VSTD::min<size_type>(
+        {return _CUDA_VSTD::min<size_type>(
                 __node_traits::max_size(__node_alloc()),
                 numeric_limits<
diff erence_type >::max());}
 
     void clear() _NOEXCEPT;
 
     void swap(__tree& __t)
-#if _LIBCPP_STD_VER <= 11
+#if _LIBCUDACXX_STD_VER <= 11
         _NOEXCEPT_(
             __is_nothrow_swappable<value_compare>::value
             && (!__node_traits::propagate_on_container_swap::value ||
@@ -1166,185 +1166,185 @@ public:
     iterator __emplace_hint_multi(const_iterator __p, _Args&&... __args);
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __emplace_unique(_Pp&& __x) {
-        return __emplace_unique_extract_key(_VSTD::forward<_Pp>(__x),
+        return __emplace_unique_extract_key(_CUDA_VSTD::forward<_Pp>(__x),
                                             __can_extract_key<_Pp, key_type>());
     }
 
     template <class _First, class _Second>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__can_extract_map_key<_First, key_type, __container_value_type>::value, pair<iterator, bool> >
     __emplace_unique(_First&& __f, _Second&& __s) {
-        return __emplace_unique_key_args(__f, _VSTD::forward<_First>(__f),
-                                              _VSTD::forward<_Second>(__s));
+        return __emplace_unique_key_args(__f, _CUDA_VSTD::forward<_First>(__f),
+                                              _CUDA_VSTD::forward<_Second>(__s));
     }
 
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __emplace_unique(_Args&&... __args) {
-        return __emplace_unique_impl(_VSTD::forward<_Args>(__args)...);
+        return __emplace_unique_impl(_CUDA_VSTD::forward<_Args>(__args)...);
     }
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool>
     __emplace_unique_extract_key(_Pp&& __x, __extract_key_fail_tag) {
-      return __emplace_unique_impl(_VSTD::forward<_Pp>(__x));
+      return __emplace_unique_impl(_CUDA_VSTD::forward<_Pp>(__x));
     }
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool>
     __emplace_unique_extract_key(_Pp&& __x, __extract_key_self_tag) {
-      return __emplace_unique_key_args(__x, _VSTD::forward<_Pp>(__x));
+      return __emplace_unique_key_args(__x, _CUDA_VSTD::forward<_Pp>(__x));
     }
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool>
     __emplace_unique_extract_key(_Pp&& __x, __extract_key_first_tag) {
-      return __emplace_unique_key_args(__x.first, _VSTD::forward<_Pp>(__x));
+      return __emplace_unique_key_args(__x.first, _CUDA_VSTD::forward<_Pp>(__x));
     }
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __emplace_hint_unique(const_iterator __p, _Pp&& __x) {
-        return __emplace_hint_unique_extract_key(__p, _VSTD::forward<_Pp>(__x),
+        return __emplace_hint_unique_extract_key(__p, _CUDA_VSTD::forward<_Pp>(__x),
                                             __can_extract_key<_Pp, key_type>());
     }
 
     template <class _First, class _Second>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__can_extract_map_key<_First, key_type, __container_value_type>::value, iterator>
     __emplace_hint_unique(const_iterator __p, _First&& __f, _Second&& __s) {
         return __emplace_hint_unique_key_args(__p, __f,
-                                              _VSTD::forward<_First>(__f),
-                                              _VSTD::forward<_Second>(__s)).first;
+                                              _CUDA_VSTD::forward<_First>(__f),
+                                              _CUDA_VSTD::forward<_Second>(__s)).first;
     }
 
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __emplace_hint_unique(const_iterator __p, _Args&&... __args) {
-        return __emplace_hint_unique_impl(__p, _VSTD::forward<_Args>(__args)...);
+        return __emplace_hint_unique_impl(__p, _CUDA_VSTD::forward<_Args>(__args)...);
     }
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator
     __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_fail_tag) {
-      return __emplace_hint_unique_impl(__p, _VSTD::forward<_Pp>(__x));
+      return __emplace_hint_unique_impl(__p, _CUDA_VSTD::forward<_Pp>(__x));
     }
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator
     __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_self_tag) {
-      return __emplace_hint_unique_key_args(__p, __x, _VSTD::forward<_Pp>(__x)).first;
+      return __emplace_hint_unique_key_args(__p, __x, _CUDA_VSTD::forward<_Pp>(__x)).first;
     }
 
     template <class _Pp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator
     __emplace_hint_unique_extract_key(const_iterator __p, _Pp&& __x, __extract_key_first_tag) {
-      return __emplace_hint_unique_key_args(__p, __x.first, _VSTD::forward<_Pp>(__x)).first;
+      return __emplace_hint_unique_key_args(__p, __x.first, _CUDA_VSTD::forward<_Pp>(__x)).first;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __insert_unique(const __container_value_type& __v) {
         return __emplace_unique_key_args(_NodeTypes::__get_key(__v), __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __insert_unique(const_iterator __p, const __container_value_type& __v) {
         return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), __v).first;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __insert_unique(__container_value_type&& __v) {
-        return __emplace_unique_key_args(_NodeTypes::__get_key(__v), _VSTD::move(__v));
+        return __emplace_unique_key_args(_NodeTypes::__get_key(__v), _CUDA_VSTD::move(__v));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __insert_unique(const_iterator __p, __container_value_type&& __v) {
-        return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), _VSTD::move(__v)).first;
+        return __emplace_hint_unique_key_args(__p, _NodeTypes::__get_key(__v), _CUDA_VSTD::move(__v)).first;
     }
 
     template <class _Vp,
               class = __enable_if_t<!is_same<typename __unconstref<_Vp>::type, __container_value_type>::value> >
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __insert_unique(_Vp&& __v) {
-        return __emplace_unique(_VSTD::forward<_Vp>(__v));
+        return __emplace_unique(_CUDA_VSTD::forward<_Vp>(__v));
     }
 
     template <class _Vp,
               class = __enable_if_t<!is_same<typename __unconstref<_Vp>::type, __container_value_type>::value> >
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __insert_unique(const_iterator __p, _Vp&& __v) {
-        return __emplace_hint_unique(__p, _VSTD::forward<_Vp>(__v));
+        return __emplace_hint_unique(__p, _CUDA_VSTD::forward<_Vp>(__v));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __insert_multi(__container_value_type&& __v) {
-        return __emplace_multi(_VSTD::move(__v));
+        return __emplace_multi(_CUDA_VSTD::move(__v));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __insert_multi(const_iterator __p, __container_value_type&& __v) {
-        return __emplace_hint_multi(__p, _VSTD::move(__v));
+        return __emplace_hint_multi(__p, _CUDA_VSTD::move(__v));
     }
 
     template <class _Vp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __insert_multi(_Vp&& __v) {
-        return __emplace_multi(_VSTD::forward<_Vp>(__v));
+        return __emplace_multi(_CUDA_VSTD::forward<_Vp>(__v));
     }
 
     template <class _Vp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __insert_multi(const_iterator __p, _Vp&& __v) {
-        return __emplace_hint_multi(__p, _VSTD::forward<_Vp>(__v));
+        return __emplace_hint_multi(__p, _CUDA_VSTD::forward<_Vp>(__v));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> __node_assign_unique(const __container_value_type& __v, __node_pointer __dest);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __node_insert_multi(__node_pointer __nd);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __node_insert_multi(const_iterator __p, __node_pointer __nd);
 
 
-    _LIBCPP_INLINE_VISIBILITY iterator
+    _LIBCUDACXX_INLINE_VISIBILITY iterator
     __remove_node_pointer(__node_pointer) _NOEXCEPT;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     template <class _NodeHandle, class _InsertReturnType>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _InsertReturnType __node_handle_insert_unique(_NodeHandle&&);
     template <class _NodeHandle>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __node_handle_insert_unique(const_iterator, _NodeHandle&&);
     template <class _Tree>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __node_handle_merge_unique(_Tree& __source);
 
     template <class _NodeHandle>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __node_handle_insert_multi(_NodeHandle&&);
     template <class _NodeHandle>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator __node_handle_insert_multi(const_iterator, _NodeHandle&&);
     template <class _Tree>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __node_handle_merge_multi(_Tree& __source);
 
 
     template <class _NodeHandle>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _NodeHandle __node_handle_extract(key_type const&);
     template <class _NodeHandle>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _NodeHandle __node_handle_extract(const_iterator);
 #endif
 
@@ -1370,7 +1370,7 @@ public:
         size_type __count_multi(const _Key& __k) const;
 
     template <class _Key>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator lower_bound(const _Key& __v)
             {return __lower_bound(__v, __root(), __end_node());}
     template <class _Key>
@@ -1378,7 +1378,7 @@ public:
                                __node_pointer __root,
                                __iter_pointer __result);
     template <class _Key>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         const_iterator lower_bound(const _Key& __v) const
             {return __lower_bound(__v, __root(), __end_node());}
     template <class _Key>
@@ -1386,7 +1386,7 @@ public:
                                      __node_pointer __root,
                                      __iter_pointer __result) const;
     template <class _Key>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator upper_bound(const _Key& __v)
             {return __upper_bound(__v, __root(), __end_node());}
     template <class _Key>
@@ -1394,7 +1394,7 @@ public:
                                __node_pointer __root,
                                __iter_pointer __result);
     template <class _Key>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         const_iterator upper_bound(const _Key& __v) const
             {return __upper_bound(__v, __root(), __end_node());}
     template <class _Key>
@@ -1433,7 +1433,7 @@ private:
     __node_base_pointer&
         __find_equal(__parent_pointer& __parent, const _Key& __v);
     template <class _Key>
-    _LIBCPP_INLINE_VISIBILITY __node_base_pointer&
+    _LIBCUDACXX_INLINE_VISIBILITY __node_base_pointer&
     __find_equal(__parent_pointer& __parent, const _Key& __v) const {
       return const_cast<__tree*>(this)->__find_equal(__parent, __v);
     }
@@ -1448,19 +1448,19 @@ private:
 
     void destroy(__node_pointer __nd) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const __tree& __t)
         {__copy_assign_alloc(__t, integral_constant<bool,
              __node_traits::propagate_on_container_copy_assignment::value>());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const __tree& __t, true_type)
         {
         if (__node_alloc() != __t.__node_alloc())
             clear();
         __node_alloc() = __t.__node_alloc();
         }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const __tree&, false_type) {}
 
     void __move_assign(__tree& __t, false_type);
@@ -1468,7 +1468,7 @@ private:
         _NOEXCEPT_(is_nothrow_move_assignable<value_compare>::value &&
                    is_nothrow_move_assignable<__node_allocator>::value);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__tree& __t)
         _NOEXCEPT_(
             !__node_traits::propagate_on_container_move_assignment::value ||
@@ -1476,26 +1476,26 @@ private:
         {__move_assign_alloc(__t, integral_constant<bool,
              __node_traits::propagate_on_container_move_assignment::value>());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__tree& __t, true_type)
         _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value)
-        {__node_alloc() = _VSTD::move(__t.__node_alloc());}
-    _LIBCPP_INLINE_VISIBILITY
+        {__node_alloc() = _CUDA_VSTD::move(__t.__node_alloc());}
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__tree&, false_type) _NOEXCEPT {}
 
     struct _DetachedTreeCache {
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       explicit _DetachedTreeCache(__tree *__t) _NOEXCEPT : __t_(__t),
         __cache_root_(__detach_from_tree(__t)) {
           __advance();
         }
 
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       __node_pointer __get() const _NOEXCEPT {
         return __cache_elem_;
       }
 
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       void __advance() _NOEXCEPT {
         __cache_elem_ = __cache_root_;
         if (__cache_root_) {
@@ -1503,7 +1503,7 @@ private:
         }
       }
 
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       ~_DetachedTreeCache() {
         __t_->destroy(__cache_elem_);
         if (__cache_root_) {
@@ -1517,9 +1517,9 @@ private:
        _DetachedTreeCache& operator=(_DetachedTreeCache const&) = delete;
 
     private:
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       static __node_pointer __detach_from_tree(__tree *__t) _NOEXCEPT;
-      _LIBCPP_INLINE_VISIBILITY
+      _LIBCUDACXX_INLINE_VISIBILITY
       static __node_pointer __detach_next(__node_pointer) _NOEXCEPT;
 
       __tree *__t_;
@@ -1528,8 +1528,8 @@ private:
     };
 
 
-    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
-    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
+    template <class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS map;
+    template <class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS multimap;
 };
 
 template <class _Tp, class _Compare, class _Allocator>
@@ -1589,27 +1589,27 @@ __tree<_Tp, _Compare, _Allocator>::_DetachedTreeCache::__detach_next(__node_poin
 {
     if (__cache->__parent_ == nullptr)
         return nullptr;
-    if (_VSTD::__tree_is_left_child(static_cast<__node_base_pointer>(__cache)))
+    if (_CUDA_VSTD::__tree_is_left_child(static_cast<__node_base_pointer>(__cache)))
     {
         __cache->__parent_->__left_ = nullptr;
         __cache = static_cast<__node_pointer>(__cache->__parent_);
         if (__cache->__right_ == nullptr)
             return __cache;
-        return static_cast<__node_pointer>(_VSTD::__tree_leaf(__cache->__right_));
+        return static_cast<__node_pointer>(_CUDA_VSTD::__tree_leaf(__cache->__right_));
     }
     // __cache is right child
     __cache->__parent_unsafe()->__right_ = nullptr;
     __cache = static_cast<__node_pointer>(__cache->__parent_);
     if (__cache->__left_ == nullptr)
         return __cache;
-    return static_cast<__node_pointer>(_VSTD::__tree_leaf(__cache->__left_));
+    return static_cast<__node_pointer>(_CUDA_VSTD::__tree_leaf(__cache->__left_));
 }
 
 template <class _Tp, class _Compare, class _Allocator>
 __tree<_Tp, _Compare, _Allocator>&
 __tree<_Tp, _Compare, _Allocator>::operator=(const __tree& __t)
 {
-    if (this != _VSTD::addressof(__t))
+    if (this != _CUDA_VSTD::addressof(__t))
     {
         value_comp() = __t.value_comp();
         __copy_assign_alloc(__t);
@@ -1679,9 +1679,9 @@ __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t)
     _NOEXCEPT_(
         is_nothrow_move_constructible<__node_allocator>::value &&
         is_nothrow_move_constructible<value_compare>::value)
-    : __begin_node_(_VSTD::move(__t.__begin_node_)),
-      __pair1_(_VSTD::move(__t.__pair1_)),
-      __pair3_(_VSTD::move(__t.__pair3_))
+    : __begin_node_(_CUDA_VSTD::move(__t.__begin_node_)),
+      __pair1_(_CUDA_VSTD::move(__t.__pair1_)),
+      __pair3_(_CUDA_VSTD::move(__t.__pair3_))
 {
     if (size() == 0)
         __begin_node() = __end_node();
@@ -1697,7 +1697,7 @@ __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t)
 template <class _Tp, class _Compare, class _Allocator>
 __tree<_Tp, _Compare, _Allocator>::__tree(__tree&& __t, const allocator_type& __a)
     : __pair1_(__default_init_tag(), __node_allocator(__a)),
-      __pair3_(0, _VSTD::move(__t.value_comp()))
+      __pair3_(0, _CUDA_VSTD::move(__t.value_comp()))
 {
     if (__a == __t.__alloc())
     {
@@ -1730,7 +1730,7 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, true_type)
     __begin_node_ = __t.__begin_node_;
     __pair1_.first() = __t.__pair1_.first();
     __move_assign_alloc(__t);
-    __pair3_ = _VSTD::move(__t.__pair3_);
+    __pair3_ = _CUDA_VSTD::move(__t.__pair3_);
     if (size() == 0)
         __begin_node() = __end_node();
     else
@@ -1750,13 +1750,13 @@ __tree<_Tp, _Compare, _Allocator>::__move_assign(__tree& __t, false_type)
         __move_assign(__t, true_type());
     else
     {
-        value_comp() = _VSTD::move(__t.value_comp());
+        value_comp() = _CUDA_VSTD::move(__t.value_comp());
         const_iterator __e = end();
         if (size() != 0)
         {
             _DetachedTreeCache __cache(this);
             while (__cache.__get() != nullptr && __t.size() != 0) {
-              __cache.__get()->__value_ = _VSTD::move(__t.remove(__t.begin())->__value_);
+              __cache.__get()->__value_ = _CUDA_VSTD::move(__t.remove(__t.begin())->__value_);
               __node_insert_multi(__cache.__get());
               __cache.__advance();
             }
@@ -1805,7 +1805,7 @@ __tree<_Tp, _Compare, _Allocator>::destroy(__node_pointer __nd) _NOEXCEPT
 template <class _Tp, class _Compare, class _Allocator>
 void
 __tree<_Tp, _Compare, _Allocator>::swap(__tree& __t)
-#if _LIBCPP_STD_VER <= 11
+#if _LIBCUDACXX_STD_VER <= 11
         _NOEXCEPT_(
             __is_nothrow_swappable<value_compare>::value
             && (!__node_traits::propagate_on_container_swap::value ||
@@ -1815,10 +1815,10 @@ __tree<_Tp, _Compare, _Allocator>::swap(__tree& __t)
         _NOEXCEPT_(__is_nothrow_swappable<value_compare>::value)
 #endif
 {
-    using _VSTD::swap;
+    using _CUDA_VSTD::swap;
     swap(__begin_node_, __t.__begin_node_);
     swap(__pair1_.first(), __t.__pair1_.first());
-    _VSTD::__swap_allocator(__node_alloc(), __t.__node_alloc());
+    _CUDA_VSTD::__swap_allocator(__node_alloc(), __t.__node_alloc());
     __pair3_.swap(__t.__pair3_);
     if (size() == 0)
         __begin_node() = __end_node();
@@ -1974,7 +1974,7 @@ __tree<_Tp, _Compare, _Allocator>::__find_equal(__parent_pointer& __parent,
             if (value_comp()(__v, __nd->__value_))
             {
                 if (__nd->__left_ != nullptr) {
-                    __nd_ptr = _VSTD::addressof(__nd->__left_);
+                    __nd_ptr = _CUDA_VSTD::addressof(__nd->__left_);
                     __nd = static_cast<__node_pointer>(__nd->__left_);
                 } else {
                     __parent = static_cast<__parent_pointer>(__nd);
@@ -1984,7 +1984,7 @@ __tree<_Tp, _Compare, _Allocator>::__find_equal(__parent_pointer& __parent,
             else if (value_comp()(__nd->__value_, __v))
             {
                 if (__nd->__right_ != nullptr) {
-                    __nd_ptr = _VSTD::addressof(__nd->__right_);
+                    __nd_ptr = _CUDA_VSTD::addressof(__nd->__right_);
                     __nd = static_cast<__node_pointer>(__nd->__right_);
                 } else {
                     __parent = static_cast<__parent_pointer>(__nd);
@@ -2041,10 +2041,10 @@ __tree<_Tp, _Compare, _Allocator>::__find_equal(const_iterator __hint,
     else if (value_comp()(*__hint, __v))  // check after
     {
         // *__hint < __v
-        const_iterator __next = _VSTD::next(__hint);
+        const_iterator __next = _CUDA_VSTD::next(__hint);
         if (__next == end() || value_comp()(__v, *__next))
         {
-            // *__hint < __v < *_VSTD::next(__hint)
+            // *__hint < __v < *_CUDA_VSTD::next(__hint)
             if (__hint.__get_np()->__right_ == nullptr)
             {
                 __parent = static_cast<__parent_pointer>(__hint.__ptr_);
@@ -2077,7 +2077,7 @@ void __tree<_Tp, _Compare, _Allocator>::__insert_node_at(
     __child = __new_node;
     if (__begin_node()->__left_ != nullptr)
         __begin_node() = static_cast<__iter_pointer>(__begin_node()->__left_);
-    _VSTD::__tree_balance_after_insert(__end_node()->__left_, __child);
+    _CUDA_VSTD::__tree_balance_after_insert(__end_node()->__left_, __child);
     ++size();
 }
 
@@ -2092,7 +2092,7 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_unique_key_args(_Key const& __k, _A
     bool __inserted = false;
     if (__child == nullptr)
     {
-        __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
+        __node_holder __h = __construct_node(_CUDA_VSTD::forward<_Args>(__args)...);
         __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
         __r = __h.release();
         __inserted = true;
@@ -2113,7 +2113,7 @@ __tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_key_args(
     bool __inserted = false;
     if (__child == nullptr)
     {
-        __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
+        __node_holder __h = __construct_node(_CUDA_VSTD::forward<_Args>(__args)...);
         __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
         __r = __h.release();
         __inserted = true;
@@ -2130,7 +2130,7 @@ __tree<_Tp, _Compare, _Allocator>::__construct_node(_Args&& ...__args)
                   "Cannot construct from __value_type");
     __node_allocator& __na = __node_alloc();
     __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
-    __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), _VSTD::forward<_Args>(__args)...);
+    __node_traits::construct(__na, _NodeTypes::__get_ptr(__h->__value_), _CUDA_VSTD::forward<_Args>(__args)...);
     __h.get_deleter().__value_constructed = true;
     return __h;
 }
@@ -2141,7 +2141,7 @@ template <class... _Args>
 pair<typename __tree<_Tp, _Compare, _Allocator>::iterator, bool>
 __tree<_Tp, _Compare, _Allocator>::__emplace_unique_impl(_Args&&... __args)
 {
-    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
+    __node_holder __h = __construct_node(_CUDA_VSTD::forward<_Args>(__args)...);
     __parent_pointer __parent;
     __node_base_pointer& __child = __find_equal(__parent, __h->__value_);
     __node_pointer __r = static_cast<__node_pointer>(__child);
@@ -2160,7 +2160,7 @@ template <class... _Args>
 typename __tree<_Tp, _Compare, _Allocator>::iterator
 __tree<_Tp, _Compare, _Allocator>::__emplace_hint_unique_impl(const_iterator __p, _Args&&... __args)
 {
-    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
+    __node_holder __h = __construct_node(_CUDA_VSTD::forward<_Args>(__args)...);
     __parent_pointer __parent;
     __node_base_pointer __dummy;
     __node_base_pointer& __child = __find_equal(__p, __parent, __dummy, __h->__value_);
@@ -2178,7 +2178,7 @@ template <class... _Args>
 typename __tree<_Tp, _Compare, _Allocator>::iterator
 __tree<_Tp, _Compare, _Allocator>::__emplace_multi(_Args&&... __args)
 {
-    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
+    __node_holder __h = __construct_node(_CUDA_VSTD::forward<_Args>(__args)...);
     __parent_pointer __parent;
     __node_base_pointer& __child = __find_leaf_high(__parent, _NodeTypes::__get_key(__h->__value_));
     __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
@@ -2191,7 +2191,7 @@ typename __tree<_Tp, _Compare, _Allocator>::iterator
 __tree<_Tp, _Compare, _Allocator>::__emplace_hint_multi(const_iterator __p,
                                                         _Args&&... __args)
 {
-    __node_holder __h = __construct_node(_VSTD::forward<_Args>(__args)...);
+    __node_holder __h = __construct_node(_CUDA_VSTD::forward<_Args>(__args)...);
     __parent_pointer __parent;
     __node_base_pointer& __child = __find_leaf(__p, __parent, _NodeTypes::__get_key(__h->__value_));
     __insert_node_at(__parent, __child, static_cast<__node_base_pointer>(__h.get()));
@@ -2247,15 +2247,15 @@ __tree<_Tp, _Compare, _Allocator>::__remove_node_pointer(__node_pointer __ptr) _
     if (__begin_node() == __ptr)
         __begin_node() = __r.__ptr_;
     --size();
-    _VSTD::__tree_remove(__end_node()->__left_,
+    _CUDA_VSTD::__tree_remove(__end_node()->__left_,
                          static_cast<__node_base_pointer>(__ptr));
     return __r;
 }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, class _Compare, class _Allocator>
 template <class _NodeHandle, class _InsertReturnType>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _InsertReturnType
 __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(
     _NodeHandle&& __nh)
@@ -2270,7 +2270,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(
     if (__child != nullptr)
         return _InsertReturnType{
             iterator(static_cast<__node_pointer>(__child)),
-            false, _VSTD::move(__nh)};
+            false, _CUDA_VSTD::move(__nh)};
 
     __insert_node_at(__parent, __child,
                      static_cast<__node_base_pointer>(__ptr));
@@ -2280,7 +2280,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(
 
 template <class _Tp, class _Compare, class _Allocator>
 template <class _NodeHandle>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename __tree<_Tp, _Compare, _Allocator>::iterator
 __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(
     const_iterator __hint, _NodeHandle&& __nh)
@@ -2306,7 +2306,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_unique(
 
 template <class _Tp, class _Compare, class _Allocator>
 template <class _NodeHandle>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _NodeHandle
 __tree<_Tp, _Compare, _Allocator>::__node_handle_extract(key_type const& __key)
 {
@@ -2318,7 +2318,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_extract(key_type const& __key)
 
 template <class _Tp, class _Compare, class _Allocator>
 template <class _NodeHandle>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _NodeHandle
 __tree<_Tp, _Compare, _Allocator>::__node_handle_extract(const_iterator __p)
 {
@@ -2329,7 +2329,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_extract(const_iterator __p)
 
 template <class _Tp, class _Compare, class _Allocator>
 template <class _Tree>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void
 __tree<_Tp, _Compare, _Allocator>::__node_handle_merge_unique(_Tree& __source)
 {
@@ -2353,7 +2353,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_merge_unique(_Tree& __source)
 
 template <class _Tp, class _Compare, class _Allocator>
 template <class _NodeHandle>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename __tree<_Tp, _Compare, _Allocator>::iterator
 __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_multi(_NodeHandle&& __nh)
 {
@@ -2370,7 +2370,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_multi(_NodeHandle&& __nh
 
 template <class _Tp, class _Compare, class _Allocator>
 template <class _NodeHandle>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename __tree<_Tp, _Compare, _Allocator>::iterator
 __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_multi(
     const_iterator __hint, _NodeHandle&& __nh)
@@ -2389,7 +2389,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_insert_multi(
 
 template <class _Tp, class _Compare, class _Allocator>
 template <class _Tree>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void
 __tree<_Tp, _Compare, _Allocator>::__node_handle_merge_multi(_Tree& __source)
 {
@@ -2409,7 +2409,7 @@ __tree<_Tp, _Compare, _Allocator>::__node_handle_merge_multi(_Tree& __source)
     }
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
 template <class _Tp, class _Compare, class _Allocator>
 typename __tree<_Tp, _Compare, _Allocator>::iterator
@@ -2516,7 +2516,7 @@ __tree<_Tp, _Compare, _Allocator>::__count_multi(const _Key& __k) const
         else if (value_comp()(__rt->__value_, __k))
             __rt = static_cast<__node_pointer>(__rt->__right_);
         else
-            return _VSTD::distance(
+            return _CUDA_VSTD::distance(
                 __lower_bound(__k, static_cast<__node_pointer>(__rt->__left_), static_cast<__iter_pointer>(__rt)),
                 __upper_bound(__k, static_cast<__node_pointer>(__rt->__right_), __result)
             );
@@ -2626,7 +2626,7 @@ __tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k)
             return _Pp(iterator(__rt),
                       iterator(
                           __rt->__right_ != nullptr ?
-                              static_cast<__iter_pointer>(_VSTD::__tree_min(__rt->__right_))
+                              static_cast<__iter_pointer>(_CUDA_VSTD::__tree_min(__rt->__right_))
                             : __result));
     }
     return _Pp(iterator(__result), iterator(__result));
@@ -2654,7 +2654,7 @@ __tree<_Tp, _Compare, _Allocator>::__equal_range_unique(const _Key& __k) const
             return _Pp(const_iterator(__rt),
                       const_iterator(
                           __rt->__right_ != nullptr ?
-                              static_cast<__iter_pointer>(_VSTD::__tree_min(__rt->__right_))
+                              static_cast<__iter_pointer>(_CUDA_VSTD::__tree_min(__rt->__right_))
                             : __result));
     }
     return _Pp(const_iterator(__result), const_iterator(__result));
@@ -2723,13 +2723,13 @@ __tree<_Tp, _Compare, _Allocator>::remove(const_iterator __p) _NOEXCEPT
             __begin_node() = static_cast<__iter_pointer>(__np->__parent_);
     }
     --size();
-    _VSTD::__tree_remove(__end_node()->__left_,
+    _CUDA_VSTD::__tree_remove(__end_node()->__left_,
                          static_cast<__node_base_pointer>(__np));
     return __node_holder(__np, _Dp(__node_alloc(), true));
 }
 
 template <class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(__tree<_Tp, _Compare, _Allocator>& __x,
      __tree<_Tp, _Compare, _Allocator>& __y)
@@ -2738,8 +2738,8 @@ swap(__tree<_Tp, _Compare, _Allocator>& __x,
     __x.swap(__y);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___TREE
+#endif // _LIBCUDACXX___TREE

diff  --git a/libcxx/include/__tuple b/libcxx/include/__tuple
index f85036e7af1d..e775bda935a3 100644
--- a/libcxx/include/__tuple
+++ b/libcxx/include/__tuple
@@ -7,70 +7,70 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TUPLE
-#define _LIBCPP___TUPLE
+#ifndef _LIBCUDACXX___TUPLE
+#define _LIBCUDACXX___TUPLE
 
 #include <__config>
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size;
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS tuple_size;
 
-#if !defined(_LIBCPP_CXX03_LANG)
+#if !defined(_LIBCUDACXX_CXX03_LANG)
 template <class _Tp, class...>
 using __enable_if_tuple_size_imp = _Tp;
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
     const _Tp,
     __enable_if_t<!is_volatile<_Tp>::value>,
     integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
     : public integral_constant<size_t, tuple_size<_Tp>::value> {};
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
     volatile _Tp,
     __enable_if_t<!is_const<_Tp>::value>,
     integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
     : public integral_constant<size_t, tuple_size<_Tp>::value> {};
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_size<__enable_if_tuple_size_imp<
     const volatile _Tp,
     integral_constant<size_t, sizeof(tuple_size<_Tp>)>>>
     : public integral_constant<size_t, tuple_size<_Tp>::value> {};
 
 #else
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const _Tp> : public tuple_size<_Tp> {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<volatile _Tp> : public tuple_size<_Tp> {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS tuple_size<const _Tp> : public tuple_size<_Tp> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS tuple_size<volatile _Tp> : public tuple_size<_Tp> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS tuple_size<const volatile _Tp> : public tuple_size<_Tp> {};
 #endif
 
-template <size_t _Ip, class _Tp> struct _LIBCPP_TEMPLATE_VIS tuple_element;
+template <size_t _Ip, class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS tuple_element;
 
 template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const _Tp>
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_element<_Ip, const _Tp>
 {
-    typedef _LIBCPP_NODEBUG typename add_const<typename tuple_element<_Ip, _Tp>::type>::type type;
+    typedef _LIBCUDACXX_NODEBUG typename add_const<typename tuple_element<_Ip, _Tp>::type>::type type;
 };
 
 template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp>
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_element<_Ip, volatile _Tp>
 {
-    typedef _LIBCPP_NODEBUG typename add_volatile<typename tuple_element<_Ip, _Tp>::type>::type type;
+    typedef _LIBCUDACXX_NODEBUG typename add_volatile<typename tuple_element<_Ip, _Tp>::type>::type type;
 };
 
 template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp>
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_element<_Ip, const volatile _Tp>
 {
-    typedef _LIBCPP_NODEBUG typename add_cv<typename tuple_element<_Ip, _Tp>::type>::type type;
+    typedef _LIBCUDACXX_NODEBUG typename add_cv<typename tuple_element<_Ip, _Tp>::type>::type type;
 };
 
 template <class _Tp> struct __tuple_like : false_type {};
@@ -81,7 +81,7 @@ template <class _Tp> struct __tuple_like<const volatile _Tp> : public __tuple_li
 
 // tuple specializations
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <size_t...> struct __tuple_indices {};
 
@@ -94,12 +94,12 @@ struct __integer_sequence {
   using __to_tuple_indices = __tuple_indices<(_Values + _Sp)...>;
 };
 
-#if !__has_builtin(__make_integer_seq) || defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
+#if !__has_builtin(__make_integer_seq) || defined(_LIBCUDACXX_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
 namespace __detail {
 
 template<typename _Tp, size_t ..._Extra> struct __repeat;
 template<typename _Tp, _Tp ..._Np, size_t ..._Extra> struct __repeat<__integer_sequence<_Tp, _Np...>, _Extra...> {
-  typedef _LIBCPP_NODEBUG __integer_sequence<_Tp,
+  typedef _LIBCUDACXX_NODEBUG __integer_sequence<_Tp,
                            _Np...,
                            sizeof...(_Np) + _Np...,
                            2 * sizeof...(_Np) + _Np...,
@@ -134,7 +134,7 @@ template<> struct __parity<7> { template<size_t _Np> struct __pmake : __repeat<t
 
 } // namespace detail
 
-#endif // !__has_builtin(__make_integer_seq) || defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
+#endif // !__has_builtin(__make_integer_seq) || defined(_LIBCUDACXX_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
 
 #if __has_builtin(__make_integer_seq)
 template <size_t _Ep, size_t _Sp>
@@ -156,93 +156,93 @@ struct __make_tuple_indices
 };
 
 
-template <class ..._Tp> class _LIBCPP_TEMPLATE_VIS tuple;
+template <class ..._Tp> class _LIBCUDACXX_TEMPLATE_VIS tuple;
 
 template <class... _Tp> struct __tuple_like<tuple<_Tp...> > : true_type {};
 
 template <class ..._Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<tuple<_Tp...> >
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_size<tuple<_Tp...> >
     : public integral_constant<size_t, sizeof...(_Tp)>
 {
 };
 
 template <size_t _Ip, class ..._Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 typename tuple_element<_Ip, tuple<_Tp...> >::type&
 get(tuple<_Tp...>&) _NOEXCEPT;
 
 template <size_t _Ip, class ..._Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const typename tuple_element<_Ip, tuple<_Tp...> >::type&
 get(const tuple<_Tp...>&) _NOEXCEPT;
 
 template <size_t _Ip, class ..._Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 typename tuple_element<_Ip, tuple<_Tp...> >::type&&
 get(tuple<_Tp...>&&) _NOEXCEPT;
 
 template <size_t _Ip, class ..._Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
 get(const tuple<_Tp...>&&) _NOEXCEPT;
 
-#endif // !defined(_LIBCPP_CXX03_LANG)
+#endif // !defined(_LIBCUDACXX_CXX03_LANG)
 
 // pair specializations
 
 template <class _T1, class _T2> struct __tuple_like<pair<_T1, _T2> > : true_type {};
 
 template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 typename tuple_element<_Ip, pair<_T1, _T2> >::type&
 get(pair<_T1, _T2>&) _NOEXCEPT;
 
 template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
 get(const pair<_T1, _T2>&) _NOEXCEPT;
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
 get(pair<_T1, _T2>&&) _NOEXCEPT;
 
 template <size_t _Ip, class _T1, class _T2>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
 get(const pair<_T1, _T2>&&) _NOEXCEPT;
 #endif
 
 // array specializations
 
-template <class _Tp, size_t _Size> struct _LIBCPP_TEMPLATE_VIS array;
+template <class _Tp, size_t _Size> struct _LIBCUDACXX_TEMPLATE_VIS array;
 
 template <class _Tp, size_t _Size> struct __tuple_like<array<_Tp, _Size> > : true_type {};
 
 template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp&
 get(array<_Tp, _Size>&) _NOEXCEPT;
 
 template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const _Tp&
 get(const array<_Tp, _Size>&) _NOEXCEPT;
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp&&
 get(array<_Tp, _Size>&&) _NOEXCEPT;
 
 template <size_t _Ip, class _Tp, size_t _Size>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const _Tp&&
 get(const array<_Tp, _Size>&&) _NOEXCEPT;
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 // __tuple_types
 
@@ -253,7 +253,7 @@ template <class ..._Tp> struct __tuple_types {};
 namespace __indexer_detail {
 
 template <size_t _Idx, class _Tp>
-struct __indexed { using type _LIBCPP_NODEBUG = _Tp; };
+struct __indexed { using type _LIBCUDACXX_NODEBUG = _Tp; };
 
 template <class _Types, class _Indexes> struct __indexer;
 
@@ -268,7 +268,7 @@ __indexed<_Idx, _Tp> __at_index(__indexed<_Idx, _Tp> const&);
 } // namespace __indexer_detail
 
 template <size_t _Idx, class ..._Types>
-using __type_pack_element _LIBCPP_NODEBUG = typename decltype(
+using __type_pack_element _LIBCUDACXX_NODEBUG = typename decltype(
     __indexer_detail::__at_index<_Idx>(
         __indexer_detail::__indexer<
             __tuple_types<_Types...>,
@@ -278,15 +278,15 @@ using __type_pack_element _LIBCPP_NODEBUG = typename decltype(
 #endif
 
 template <size_t _Ip, class ..._Types>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...> >
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_element<_Ip, __tuple_types<_Types...> >
 {
     static_assert(_Ip < sizeof...(_Types), "tuple_element index out of range");
-    typedef _LIBCPP_NODEBUG __type_pack_element<_Ip, _Types...> type;
+    typedef _LIBCUDACXX_NODEBUG __type_pack_element<_Ip, _Types...> type;
 };
 
 
 template <class ..._Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<__tuple_types<_Tp...> >
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_size<__tuple_types<_Tp...> >
     : public integral_constant<size_t, sizeof...(_Tp)>
 {
 };
@@ -301,34 +301,34 @@ struct __apply_cv_mf<false, false, false> {
 };
 template <>
 struct __apply_cv_mf<false, true, false> {
-  template <class _Tp> using __apply _LIBCPP_NODEBUG = const _Tp;
+  template <class _Tp> using __apply _LIBCUDACXX_NODEBUG = const _Tp;
 };
 template <>
 struct __apply_cv_mf<false, false, true> {
-  template <class _Tp> using __apply _LIBCPP_NODEBUG = volatile _Tp;
+  template <class _Tp> using __apply _LIBCUDACXX_NODEBUG = volatile _Tp;
 };
 template <>
 struct __apply_cv_mf<false, true, true> {
-  template <class _Tp> using __apply _LIBCPP_NODEBUG = const volatile _Tp;
+  template <class _Tp> using __apply _LIBCUDACXX_NODEBUG = const volatile _Tp;
 };
 template <>
 struct __apply_cv_mf<true, false, false> {
-  template <class _Tp> using __apply _LIBCPP_NODEBUG = _Tp&;
+  template <class _Tp> using __apply _LIBCUDACXX_NODEBUG = _Tp&;
 };
 template <>
 struct __apply_cv_mf<true, true, false> {
-  template <class _Tp> using __apply _LIBCPP_NODEBUG = const _Tp&;
+  template <class _Tp> using __apply _LIBCUDACXX_NODEBUG = const _Tp&;
 };
 template <>
 struct __apply_cv_mf<true, false, true> {
-  template <class _Tp> using __apply _LIBCPP_NODEBUG = volatile _Tp&;
+  template <class _Tp> using __apply _LIBCUDACXX_NODEBUG = volatile _Tp&;
 };
 template <>
 struct __apply_cv_mf<true, true, true> {
-  template <class _Tp> using __apply _LIBCPP_NODEBUG = const volatile _Tp&;
+  template <class _Tp> using __apply _LIBCUDACXX_NODEBUG = const volatile _Tp&;
 };
 template <class _Tp, class _RawTp = typename remove_reference<_Tp>::type>
-using __apply_cv_t _LIBCPP_NODEBUG = __apply_cv_mf<
+using __apply_cv_t _LIBCUDACXX_NODEBUG = __apply_cv_mf<
     is_lvalue_reference<_Tp>::value,
     is_const<_RawTp>::value,
     is_volatile<_RawTp>::value>;
@@ -347,7 +347,7 @@ template <template <class...> class _Tuple, class ..._Types, size_t ..._Idx>
 struct __make_tuple_types_flat<_Tuple<_Types...>, __tuple_indices<_Idx...>> {
   // Specialization for pair, tuple, and __tuple_types
   template <class _Tp, class _ApplyFn = __apply_cv_t<_Tp>>
-  using __apply_quals _LIBCPP_NODEBUG = __tuple_types<
+  using __apply_quals _LIBCUDACXX_NODEBUG = __tuple_types<
       typename _ApplyFn::template __apply<__type_pack_element<_Idx, _Types...>>...
     >;
 };
@@ -375,12 +375,12 @@ struct __make_tuple_types
 
 template <class ..._Types, size_t _Ep>
 struct __make_tuple_types<tuple<_Types...>, _Ep, 0, true> {
-  typedef _LIBCPP_NODEBUG __tuple_types<_Types...> type;
+  typedef _LIBCUDACXX_NODEBUG __tuple_types<_Types...> type;
 };
 
 template <class ..._Types, size_t _Ep>
 struct __make_tuple_types<__tuple_types<_Types...>, _Ep, 0, true> {
-  typedef _LIBCPP_NODEBUG __tuple_types<_Types...> type;
+  typedef _LIBCUDACXX_NODEBUG __tuple_types<_Types...> type;
 };
 
 template <bool ..._Preds>
@@ -452,14 +452,14 @@ struct __tuple_assignable<_Tp, _Up, true, true>
 
 
 template <size_t _Ip, class ..._Tp>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> >
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_element<_Ip, tuple<_Tp...> >
 {
-    typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
+    typedef _LIBCUDACXX_NODEBUG typename tuple_element<_Ip, __tuple_types<_Tp...> >::type type;
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <size_t _Ip, class ..._Tp>
-using tuple_element_t _LIBCPP_NODEBUG = typename tuple_element <_Ip, _Tp...>::type;
+using tuple_element_t _LIBCUDACXX_NODEBUG = typename tuple_element <_Ip, _Tp...>::type;
 #endif
 
 template <bool _IsTuple, class _SizeTrait, size_t _Expected>
@@ -470,12 +470,12 @@ struct __tuple_like_with_size_imp<true, _SizeTrait, _Expected>
     : integral_constant<bool, _SizeTrait::value == _Expected> {};
 
 template <class _Tuple, size_t _ExpectedSize, class _RawTuple = __uncvref_t<_Tuple> >
-using __tuple_like_with_size _LIBCPP_NODEBUG = __tuple_like_with_size_imp<
+using __tuple_like_with_size _LIBCUDACXX_NODEBUG = __tuple_like_with_size_imp<
                                    __tuple_like<_RawTuple>::value,
                                    tuple_size<_RawTuple>, _ExpectedSize
                               >;
 
-struct _LIBCPP_TYPE_VIS __check_tuple_constructor_fail {
+struct _LIBCUDACXX_TYPE_VIS __check_tuple_constructor_fail {
 
     static constexpr bool __enable_explicit_default() { return false; }
     static constexpr bool __enable_implicit_default() { return false; }
@@ -486,9 +486,9 @@ struct _LIBCPP_TYPE_VIS __check_tuple_constructor_fail {
     template <class ...>
     static constexpr bool __enable_assign() { return false; }
 };
-#endif // !defined(_LIBCPP_CXX03_LANG)
+#endif // !defined(_LIBCUDACXX_CXX03_LANG)
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <bool _CanCopy, bool _CanMove>
 struct __sfinae_ctor_base {};
@@ -543,8 +543,8 @@ struct __sfinae_assign_base<false, true> {
   __sfinae_assign_base& operator=(__sfinae_assign_base const&) = delete;
   __sfinae_assign_base& operator=(__sfinae_assign_base&&) = default;
 };
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TUPLE
+#endif // _LIBCUDACXX___TUPLE

diff  --git a/libcxx/include/__type_traits/add_const.h b/libcxx/include/__type_traits/add_const.h
index c616a13f8408..66bf7d22b6f1 100644
--- a/libcxx/include/__type_traits/add_const.h
+++ b/libcxx/include/__type_traits/add_const.h
@@ -6,25 +6,25 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_ADD_CONST_H
-#define _LIBCPP___TYPE_TRAITS_ADD_CONST_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_ADD_CONST_H
+#define _LIBCUDACXX___TYPE_TRAITS_ADD_CONST_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_const {
-  typedef _LIBCPP_NODEBUG const _Tp type;
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS add_const {
+  typedef _LIBCUDACXX_NODEBUG const _Tp type;
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using add_const_t = typename add_const<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_ADD_CONST_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_ADD_CONST_H

diff  --git a/libcxx/include/__type_traits/add_cv.h b/libcxx/include/__type_traits/add_cv.h
index 8a85353f16c0..8f94750d5d72 100644
--- a/libcxx/include/__type_traits/add_cv.h
+++ b/libcxx/include/__type_traits/add_cv.h
@@ -6,25 +6,25 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_ADD_CV_H
-#define _LIBCPP___TYPE_TRAITS_ADD_CV_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_ADD_CV_H
+#define _LIBCUDACXX___TYPE_TRAITS_ADD_CV_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_cv {
-  typedef _LIBCPP_NODEBUG const volatile _Tp type;
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS add_cv {
+  typedef _LIBCUDACXX_NODEBUG const volatile _Tp type;
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using add_cv_t = typename add_cv<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_ADD_CV_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_ADD_CV_H

diff  --git a/libcxx/include/__type_traits/add_lvalue_reference.h b/libcxx/include/__type_traits/add_lvalue_reference.h
index 0d1ee4185c8c..66010d1ecf7e 100644
--- a/libcxx/include/__type_traits/add_lvalue_reference.h
+++ b/libcxx/include/__type_traits/add_lvalue_reference.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H
-#define _LIBCPP___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H
+#define _LIBCUDACXX___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H
 
 #include <__config>
 #include <__type_traits/is_referenceable.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_lvalue_reference_impl            { typedef _LIBCPP_NODEBUG _Tp  type; };
-template <class _Tp                                       > struct __add_lvalue_reference_impl<_Tp, true> { typedef _LIBCPP_NODEBUG _Tp& type; };
+template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_lvalue_reference_impl            { typedef _LIBCUDACXX_NODEBUG _Tp  type; };
+template <class _Tp                                       > struct __add_lvalue_reference_impl<_Tp, true> { typedef _LIBCUDACXX_NODEBUG _Tp& type; };
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_lvalue_reference
-{typedef _LIBCPP_NODEBUG typename  __add_lvalue_reference_impl<_Tp>::type type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS add_lvalue_reference
+{typedef _LIBCUDACXX_NODEBUG typename  __add_lvalue_reference_impl<_Tp>::type type;};
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using add_lvalue_reference_t = typename add_lvalue_reference<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_ADD_LVALUE_REFERENCE_H

diff  --git a/libcxx/include/__type_traits/add_pointer.h b/libcxx/include/__type_traits/add_pointer.h
index aea2490c5d0c..25062a80ce39 100644
--- a/libcxx/include/__type_traits/add_pointer.h
+++ b/libcxx/include/__type_traits/add_pointer.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_ADD_POINTER_H
-#define _LIBCPP___TYPE_TRAITS_ADD_POINTER_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_ADD_POINTER_H
+#define _LIBCUDACXX___TYPE_TRAITS_ADD_POINTER_H
 
 #include <__config>
 #include <__type_traits/is_referenceable.h>
@@ -15,27 +15,27 @@
 #include <__type_traits/remove_cv.h>
 #include <__type_traits/remove_reference.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp,
         bool = __is_referenceable<_Tp>::value ||
                 _IsSame<typename remove_cv<_Tp>::type, void>::value>
 struct __add_pointer_impl
-    {typedef _LIBCPP_NODEBUG typename remove_reference<_Tp>::type* type;};
+    {typedef _LIBCUDACXX_NODEBUG typename remove_reference<_Tp>::type* type;};
 template <class _Tp> struct __add_pointer_impl<_Tp, false>
-    {typedef _LIBCPP_NODEBUG _Tp type;};
+    {typedef _LIBCUDACXX_NODEBUG _Tp type;};
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_pointer
-    {typedef _LIBCPP_NODEBUG typename __add_pointer_impl<_Tp>::type type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS add_pointer
+    {typedef _LIBCUDACXX_NODEBUG typename __add_pointer_impl<_Tp>::type type;};
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using add_pointer_t = typename add_pointer<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_ADD_POINTER_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_ADD_POINTER_H

diff  --git a/libcxx/include/__type_traits/add_rvalue_reference.h b/libcxx/include/__type_traits/add_rvalue_reference.h
index b2a1428095d8..468effc2fe52 100644
--- a/libcxx/include/__type_traits/add_rvalue_reference.h
+++ b/libcxx/include/__type_traits/add_rvalue_reference.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_ADD_RVALUE_REFERENCE_H
-#define _LIBCPP___TYPE_TRAITS_ADD_RVALUE_REFERENCE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_ADD_RVALUE_REFERENCE_H
+#define _LIBCUDACXX___TYPE_TRAITS_ADD_RVALUE_REFERENCE_H
 
 #include <__config>
 #include <__type_traits/is_referenceable.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_rvalue_reference_impl            { typedef _LIBCPP_NODEBUG _Tp   type; };
-template <class _Tp                                       > struct __add_rvalue_reference_impl<_Tp, true> { typedef _LIBCPP_NODEBUG _Tp&& type; };
+template <class _Tp, bool = __is_referenceable<_Tp>::value> struct __add_rvalue_reference_impl            { typedef _LIBCUDACXX_NODEBUG _Tp   type; };
+template <class _Tp                                       > struct __add_rvalue_reference_impl<_Tp, true> { typedef _LIBCUDACXX_NODEBUG _Tp&& type; };
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_rvalue_reference
-{typedef _LIBCPP_NODEBUG typename __add_rvalue_reference_impl<_Tp>::type type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS add_rvalue_reference
+{typedef _LIBCUDACXX_NODEBUG typename __add_rvalue_reference_impl<_Tp>::type type;};
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using add_rvalue_reference_t = typename add_rvalue_reference<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_ADD_RVALUE_REFERENCE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_ADD_RVALUE_REFERENCE_H

diff  --git a/libcxx/include/__type_traits/add_volatile.h b/libcxx/include/__type_traits/add_volatile.h
index 73b1cb8418fe..1021487ba398 100644
--- a/libcxx/include/__type_traits/add_volatile.h
+++ b/libcxx/include/__type_traits/add_volatile.h
@@ -6,25 +6,25 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_ADD_VOLATILE_H
-#define _LIBCPP___TYPE_TRAITS_ADD_VOLATILE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_ADD_VOLATILE_H
+#define _LIBCUDACXX___TYPE_TRAITS_ADD_VOLATILE_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS add_volatile {
-  typedef _LIBCPP_NODEBUG volatile _Tp type;
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS add_volatile {
+  typedef _LIBCUDACXX_NODEBUG volatile _Tp type;
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using add_volatile_t = typename add_volatile<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_ADD_VOLATILE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_ADD_VOLATILE_H

diff  --git a/libcxx/include/__type_traits/aligned_storage.h b/libcxx/include/__type_traits/aligned_storage.h
index 9659a90ae50c..c912b7df19a9 100644
--- a/libcxx/include/__type_traits/aligned_storage.h
+++ b/libcxx/include/__type_traits/aligned_storage.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_ALIGNED_STORAGE_H
-#define _LIBCPP___TYPE_TRAITS_ALIGNED_STORAGE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_ALIGNED_STORAGE_H
+#define _LIBCUDACXX___TYPE_TRAITS_ALIGNED_STORAGE_H
 
 #include <__config>
 #include <__type_traits/conditional.h>
@@ -16,16 +16,16 @@
 #include <__type_traits/type_list.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
 struct __align_type
 {
-    static const size_t value = _LIBCPP_PREFERRED_ALIGNOF(_Tp);
+    static const size_t value = _LIBCUDACXX_PREFERRED_ALIGNOF(_Tp);
     typedef _Tp type;
 };
 
@@ -91,7 +91,7 @@ struct __find_max_align<__type_list<_Hp, _Tp>, _Len>
     : public integral_constant<size_t, __select_align<_Len, _Hp::value, __find_max_align<_Tp, _Len>::value>::value> {};
 
 template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
-struct _LIBCPP_TEMPLATE_VIS aligned_storage
+struct _LIBCUDACXX_TEMPLATE_VIS aligned_storage
 {
     typedef typename __find_pod<__all_types, _Align>::type _Aligner;
     union type
@@ -101,14 +101,14 @@ struct _LIBCPP_TEMPLATE_VIS aligned_storage
     };
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <size_t _Len, size_t _Align = __find_max_align<__all_types, _Len>::value>
     using aligned_storage_t = typename aligned_storage<_Len, _Align>::type;
 #endif
 
 #define _CREATE_ALIGNED_STORAGE_SPECIALIZATION(n) \
 template <size_t _Len>\
-struct _LIBCPP_TEMPLATE_VIS aligned_storage<_Len, n>\
+struct _LIBCUDACXX_TEMPLATE_VIS aligned_storage<_Len, n>\
 {\
     struct _ALIGNAS(n) type\
     {\
@@ -131,12 +131,12 @@ _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x800);
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x1000);
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x2000);
 // PE/COFF does not support alignment beyond 8192 (=0x2000)
-#if !defined(_LIBCPP_OBJECT_FORMAT_COFF)
+#if !defined(_LIBCUDACXX_OBJECT_FORMAT_COFF)
 _CREATE_ALIGNED_STORAGE_SPECIALIZATION(0x4000);
-#endif // !defined(_LIBCPP_OBJECT_FORMAT_COFF)
+#endif // !defined(_LIBCUDACXX_OBJECT_FORMAT_COFF)
 
 #undef _CREATE_ALIGNED_STORAGE_SPECIALIZATION
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_ALIGNED_STORAGE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_ALIGNED_STORAGE_H

diff  --git a/libcxx/include/__type_traits/aligned_union.h b/libcxx/include/__type_traits/aligned_union.h
index 31eb9353a9e2..c5bb41f05d44 100644
--- a/libcxx/include/__type_traits/aligned_union.h
+++ b/libcxx/include/__type_traits/aligned_union.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_ALIGNED_UNION_H
-#define _LIBCPP___TYPE_TRAITS_ALIGNED_UNION_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_ALIGNED_UNION_H
+#define _LIBCUDACXX___TYPE_TRAITS_ALIGNED_UNION_H
 
 #include <__config>
 #include <__type_traits/aligned_storage.h>
 #include <__type_traits/integral_constant.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <size_t _I0, size_t ..._In>
 struct __static_max;
@@ -39,17 +39,17 @@ struct __static_max<_I0, _I1, _In...>
 template <size_t _Len, class _Type0, class ..._Types>
 struct aligned_union
 {
-    static const size_t alignment_value = __static_max<_LIBCPP_PREFERRED_ALIGNOF(_Type0),
-                                                       _LIBCPP_PREFERRED_ALIGNOF(_Types)...>::value;
+    static const size_t alignment_value = __static_max<_LIBCUDACXX_PREFERRED_ALIGNOF(_Type0),
+                                                       _LIBCUDACXX_PREFERRED_ALIGNOF(_Types)...>::value;
     static const size_t __len = __static_max<_Len, sizeof(_Type0),
                                              sizeof(_Types)...>::value;
     typedef typename aligned_storage<__len, alignment_value>::type type;
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <size_t _Len, class ..._Types> using aligned_union_t = typename aligned_union<_Len, _Types...>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_ALIGNED_UNION_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_ALIGNED_UNION_H

diff  --git a/libcxx/include/__type_traits/alignment_of.h b/libcxx/include/__type_traits/alignment_of.h
index 65c603058ffa..a99ae740f8c8 100644
--- a/libcxx/include/__type_traits/alignment_of.h
+++ b/libcxx/include/__type_traits/alignment_of.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_ALIGNMENT_OF_H
-#define _LIBCPP___TYPE_TRAITS_ALIGNMENT_OF_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_ALIGNMENT_OF_H
+#define _LIBCUDACXX___TYPE_TRAITS_ALIGNMENT_OF_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS alignment_of
-    : public integral_constant<size_t, _LIBCPP_ALIGNOF(_Tp)> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS alignment_of
+    : public integral_constant<size_t, _LIBCUDACXX_ALIGNOF(_Tp)> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr size_t alignment_of_v = alignment_of<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_ALIGNMENT_OF_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_ALIGNMENT_OF_H

diff  --git a/libcxx/include/__type_traits/apply_cv.h b/libcxx/include/__type_traits/apply_cv.h
index 4a5aab48a723..6a6fa03db044 100644
--- a/libcxx/include/__type_traits/apply_cv.h
+++ b/libcxx/include/__type_traits/apply_cv.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_APPLY_CV_H
-#define _LIBCPP___TYPE_TRAITS_APPLY_CV_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_APPLY_CV_H
+#define _LIBCUDACXX___TYPE_TRAITS_APPLY_CV_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
@@ -16,23 +16,23 @@
 #include <__type_traits/remove_reference.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _Up, bool = is_const<typename remove_reference<_Tp>::type>::value,
                              bool = is_volatile<typename remove_reference<_Tp>::type>::value>
 struct __apply_cv
 {
-    typedef _LIBCPP_NODEBUG _Up type;
+    typedef _LIBCUDACXX_NODEBUG _Up type;
 };
 
 template <class _Tp, class _Up>
 struct __apply_cv<_Tp, _Up, true, false>
 {
-    typedef _LIBCPP_NODEBUG const _Up type;
+    typedef _LIBCUDACXX_NODEBUG const _Up type;
 };
 
 template <class _Tp, class _Up>
@@ -71,6 +71,6 @@ struct __apply_cv<_Tp&, _Up, true, true>
     typedef const volatile _Up& type;
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_APPLY_CV_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_APPLY_CV_H

diff  --git a/libcxx/include/__type_traits/common_reference.h b/libcxx/include/__type_traits/common_reference.h
index 559d39858ec8..5e5af230a1f7 100644
--- a/libcxx/include/__type_traits/common_reference.h
+++ b/libcxx/include/__type_traits/common_reference.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_COMMON_REFERENCE_H
-#define _LIBCPP___TYPE_TRAITS_COMMON_REFERENCE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_COMMON_REFERENCE_H
+#define _LIBCUDACXX___TYPE_TRAITS_COMMON_REFERENCE_H
 
 #include <__config>
 #include <__type_traits/common_type.h>
@@ -20,14 +20,14 @@
 #include <__type_traits/remove_reference.h>
 #include <__utility/declval.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // common_reference
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 // Let COND_RES(X, Y) be:
 template <class _Xp, class _Yp>
 using __cond_res =
@@ -181,8 +181,8 @@ struct common_reference<_Tp, _Up, _Vp, _Rest...>
 // bullet 5 - Otherwise, there shall be no member `type`.
 template <class...> struct common_reference {};
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_COMMON_REFERENCE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_COMMON_REFERENCE_H

diff  --git a/libcxx/include/__type_traits/common_type.h b/libcxx/include/__type_traits/common_type.h
index 55321e9936dd..24e167668236 100644
--- a/libcxx/include/__type_traits/common_type.h
+++ b/libcxx/include/__type_traits/common_type.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_COMMON_TYPE_H
-#define _LIBCPP___TYPE_TRAITS_COMMON_TYPE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_COMMON_TYPE_H
+#define _LIBCUDACXX___TYPE_TRAITS_COMMON_TYPE_H
 
 #include <__config>
 #include <__type_traits/conditional.h>
@@ -17,13 +17,13 @@
 #include <__type_traits/void_t.h>
 #include <__utility/declval.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 // Let COND_RES(X, Y) be:
 template <class _Tp, class _Up>
 using __cond_type = decltype(false ? declval<_Tp>() : declval<_Up>());
@@ -52,7 +52,7 @@ struct __common_type2_imp<_Tp, _Up,
                                             true ? declval<_Tp>() : declval<_Up>()
                                             )>::type>
 {
-  typedef _LIBCPP_NODEBUG typename decay<decltype(
+  typedef _LIBCUDACXX_NODEBUG typename decay<decltype(
                          true ? declval<_Tp>() : declval<_Up>()
                          )>::type type;
 };
@@ -61,14 +61,14 @@ template <class, class = void>
 struct __common_type_impl {};
 
 // Clang provides variadic templates in C++03 as an extension.
-#if !defined(_LIBCPP_CXX03_LANG) || defined(__clang__)
-# define _LIBCPP_OPTIONAL_PACK(...) , __VA_ARGS__
+#if !defined(_LIBCUDACXX_CXX03_LANG) || defined(__clang__)
+# define _LIBCUDACXX_OPTIONAL_PACK(...) , __VA_ARGS__
 template <class... _Tp>
 struct __common_types;
 template <class... _Tp>
-struct _LIBCPP_TEMPLATE_VIS common_type;
+struct _LIBCUDACXX_TEMPLATE_VIS common_type;
 #else
-# define _LIBCPP_OPTIONAL_PACK(...)
+# define _LIBCUDACXX_OPTIONAL_PACK(...)
 struct __no_arg;
 template <class _Tp, class _Up, class = __no_arg>
 struct __common_types;
@@ -78,7 +78,7 @@ struct common_type {
   static_assert(sizeof(_Unused) == 0,
                 "common_type accepts at most 3 arguments in C++03");
 };
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Up>
 struct __common_type_impl<
@@ -88,30 +88,30 @@ struct __common_type_impl<
   typedef typename common_type<_Tp, _Up>::type type;
 };
 
-template <class _Tp, class _Up, class _Vp _LIBCPP_OPTIONAL_PACK(class... _Rest)>
+template <class _Tp, class _Up, class _Vp _LIBCUDACXX_OPTIONAL_PACK(class... _Rest)>
 struct __common_type_impl<
-    __common_types<_Tp, _Up, _Vp _LIBCPP_OPTIONAL_PACK(_Rest...)>,
+    __common_types<_Tp, _Up, _Vp _LIBCUDACXX_OPTIONAL_PACK(_Rest...)>,
     typename __void_t<typename common_type<_Tp, _Up>::type>::type>
     : __common_type_impl<__common_types<typename common_type<_Tp, _Up>::type,
-                                        _Vp _LIBCPP_OPTIONAL_PACK(_Rest...)> > {
+                                        _Vp _LIBCUDACXX_OPTIONAL_PACK(_Rest...)> > {
 };
 
 // bullet 1 - sizeof...(Tp) == 0
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS common_type<> {};
+struct _LIBCUDACXX_TEMPLATE_VIS common_type<> {};
 
 // bullet 2 - sizeof...(Tp) == 1
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS common_type<_Tp>
+struct _LIBCUDACXX_TEMPLATE_VIS common_type<_Tp>
     : public common_type<_Tp, _Tp> {};
 
 // bullet 3 - sizeof...(Tp) == 2
 
 // sub-bullet 1 - "If is_same_v<T1, D1> is false or ..."
 template <class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up>
+struct _LIBCUDACXX_TEMPLATE_VIS common_type<_Tp, _Up>
     : conditional<
         _IsSame<_Tp, typename decay<_Tp>::type>::value && _IsSame<_Up, typename decay<_Up>::type>::value,
         __common_type2_imp<_Tp, _Up>,
@@ -121,18 +121,18 @@ struct _LIBCPP_TEMPLATE_VIS common_type<_Tp, _Up>
 
 // bullet 4 - sizeof...(Tp) > 2
 
-template <class _Tp, class _Up, class _Vp _LIBCPP_OPTIONAL_PACK(class... _Rest)>
-struct _LIBCPP_TEMPLATE_VIS
-    common_type<_Tp, _Up, _Vp _LIBCPP_OPTIONAL_PACK(_Rest...)>
+template <class _Tp, class _Up, class _Vp _LIBCUDACXX_OPTIONAL_PACK(class... _Rest)>
+struct _LIBCUDACXX_TEMPLATE_VIS
+    common_type<_Tp, _Up, _Vp _LIBCUDACXX_OPTIONAL_PACK(_Rest...)>
     : __common_type_impl<
-          __common_types<_Tp, _Up, _Vp _LIBCPP_OPTIONAL_PACK(_Rest...)> > {};
+          __common_types<_Tp, _Up, _Vp _LIBCUDACXX_OPTIONAL_PACK(_Rest...)> > {};
 
-#undef _LIBCPP_OPTIONAL_PACK
+#undef _LIBCUDACXX_OPTIONAL_PACK
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class ..._Tp> using common_type_t = typename common_type<_Tp...>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_COMMON_TYPE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_COMMON_TYPE_H

diff  --git a/libcxx/include/__type_traits/conditional.h b/libcxx/include/__type_traits/conditional.h
index 4b1a560ddc7c..91a5fe78eda8 100644
--- a/libcxx/include/__type_traits/conditional.h
+++ b/libcxx/include/__type_traits/conditional.h
@@ -6,16 +6,16 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_CONDITIONAL_H
-#define _LIBCPP___TYPE_TRAITS_CONDITIONAL_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_CONDITIONAL_H
+#define _LIBCUDACXX___TYPE_TRAITS_CONDITIONAL_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <bool>
 struct _IfImpl;
@@ -23,24 +23,24 @@ struct _IfImpl;
 template <>
 struct _IfImpl<true> {
   template <class _IfRes, class _ElseRes>
-  using _Select _LIBCPP_NODEBUG = _IfRes;
+  using _Select _LIBCUDACXX_NODEBUG = _IfRes;
 };
 
 template <>
 struct _IfImpl<false> {
   template <class _IfRes, class _ElseRes>
-  using _Select _LIBCPP_NODEBUG = _ElseRes;
+  using _Select _LIBCUDACXX_NODEBUG = _ElseRes;
 };
 
 template <bool _Cond, class _IfRes, class _ElseRes>
-using _If _LIBCPP_NODEBUG = typename _IfImpl<_Cond>::template _Select<_IfRes, _ElseRes>;
+using _If _LIBCUDACXX_NODEBUG = typename _IfImpl<_Cond>::template _Select<_IfRes, _ElseRes>;
 
 template <bool _Bp, class _If, class _Then>
-    struct _LIBCPP_TEMPLATE_VIS conditional {typedef _If type;};
+    struct _LIBCUDACXX_TEMPLATE_VIS conditional {typedef _If type;};
 template <class _If, class _Then>
-    struct _LIBCPP_TEMPLATE_VIS conditional<false, _If, _Then> {typedef _Then type;};
+    struct _LIBCUDACXX_TEMPLATE_VIS conditional<false, _If, _Then> {typedef _Then type;};
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <bool _Bp, class _IfRes, class _ElseRes>
 using conditional_t = typename conditional<_Bp, _IfRes, _ElseRes>::type;
 #endif
@@ -48,6 +48,6 @@ using conditional_t = typename conditional<_Bp, _IfRes, _ElseRes>::type;
 // Helper so we can use "conditional_t" in all language versions.
 template <bool _Bp, class _If, class _Then> using __conditional_t = typename conditional<_Bp, _If, _Then>::type;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_CONDITIONAL_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_CONDITIONAL_H

diff  --git a/libcxx/include/__type_traits/conjunction.h b/libcxx/include/__type_traits/conjunction.h
index 45fe5cdca351..6260d771df35 100644
--- a/libcxx/include/__type_traits/conjunction.h
+++ b/libcxx/include/__type_traits/conjunction.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_CONJUNCTION_H
-#define _LIBCPP___TYPE_TRAITS_CONJUNCTION_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_CONJUNCTION_H
+#define _LIBCUDACXX___TYPE_TRAITS_CONJUNCTION_H
 
 #include <__config>
 #include <__type_traits/conditional.h>
 #include <__type_traits/enable_if.h>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _Arg, class... _Args>
 struct __conjunction_impl {
@@ -38,7 +38,7 @@ struct conjunction : __conjunction_impl<true_type, _Args...>::type {};
 template<class... _Args>
 inline constexpr bool conjunction_v = conjunction<_Args...>::value;
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
 template <class...>
 using __expand_to_true = true_type;
@@ -50,8 +50,8 @@ template <class...>
 false_type __and_helper(...);
 
 template <class... _Pred>
-using _And _LIBCPP_NODEBUG = decltype(__and_helper<_Pred...>(0));
+using _And _LIBCUDACXX_NODEBUG = decltype(__and_helper<_Pred...>(0));
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_CONJUNCTION_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_CONJUNCTION_H

diff  --git a/libcxx/include/__type_traits/copy_cv.h b/libcxx/include/__type_traits/copy_cv.h
index 8e9bfe0a522f..8810b0cff59c 100644
--- a/libcxx/include/__type_traits/copy_cv.h
+++ b/libcxx/include/__type_traits/copy_cv.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_COPY_CV_H
-#define _LIBCPP___TYPE_TRAITS_COPY_CV_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_COPY_CV_H
+#define _LIBCUDACXX___TYPE_TRAITS_COPY_CV_H
 
 #include <__config>
 #include <__type_traits/add_const.h>
 #include <__type_traits/add_cv.h>
 #include <__type_traits/add_volatile.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Let COPYCV(FROM, TO) be an alias for type TO with the addition of FROM's
 // top-level cv-qualifiers.
@@ -49,6 +49,6 @@ struct __copy_cv<const volatile _From, _To>
 template <class _From, class _To>
 using __copy_cv_t = typename __copy_cv<_From, _To>::type;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_COPY_CV_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_COPY_CV_H

diff  --git a/libcxx/include/__type_traits/copy_cvref.h b/libcxx/include/__type_traits/copy_cvref.h
index 69b97ac1cb17..182b2eb7f771 100644
--- a/libcxx/include/__type_traits/copy_cvref.h
+++ b/libcxx/include/__type_traits/copy_cvref.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_COPY_CVREF_H
-#define _LIBCPP___TYPE_TRAITS_COPY_CVREF_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_COPY_CVREF_H
+#define _LIBCUDACXX___TYPE_TRAITS_COPY_CVREF_H
 
 #include <__config>
 #include <__type_traits/add_lvalue_reference.h>
 #include <__type_traits/add_rvalue_reference.h>
 #include <__type_traits/copy_cv.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _From, class _To>
 struct __copy_cvref
@@ -41,6 +41,6 @@ struct __copy_cvref<_From&&, _To>
 template <class _From, class _To>
 using __copy_cvref_t = typename __copy_cvref<_From, _To>::type;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_COPY_CVREF_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_COPY_CVREF_H

diff  --git a/libcxx/include/__type_traits/decay.h b/libcxx/include/__type_traits/decay.h
index d47ad03fe008..3dfa8bd22dfb 100644
--- a/libcxx/include/__type_traits/decay.h
+++ b/libcxx/include/__type_traits/decay.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_DECAY_H
-#define _LIBCPP___TYPE_TRAITS_DECAY_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_DECAY_H
+#define _LIBCUDACXX___TYPE_TRAITS_DECAY_H
 
 #include <__config>
 #include <__type_traits/add_pointer.h>
@@ -20,21 +20,21 @@
 #include <__type_traits/remove_extent.h>
 #include <__type_traits/remove_reference.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Up, bool>
 struct __decay {
-    typedef _LIBCPP_NODEBUG typename remove_cv<_Up>::type type;
+    typedef _LIBCUDACXX_NODEBUG typename remove_cv<_Up>::type type;
 };
 
 template <class _Up>
 struct __decay<_Up, true> {
 public:
-    typedef _LIBCPP_NODEBUG typename conditional
+    typedef _LIBCUDACXX_NODEBUG typename conditional
                      <
                          is_array<_Up>::value,
                          typename remove_extent<_Up>::type*,
@@ -48,18 +48,18 @@ struct __decay<_Up, true> {
 };
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS decay
+struct _LIBCUDACXX_TEMPLATE_VIS decay
 {
 private:
-    typedef _LIBCPP_NODEBUG typename remove_reference<_Tp>::type _Up;
+    typedef _LIBCUDACXX_NODEBUG typename remove_reference<_Tp>::type _Up;
 public:
-    typedef _LIBCPP_NODEBUG typename __decay<_Up, __is_referenceable<_Up>::value>::type type;
+    typedef _LIBCUDACXX_NODEBUG typename __decay<_Up, __is_referenceable<_Up>::value>::type type;
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using decay_t = typename decay<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_DECAY_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_DECAY_H

diff  --git a/libcxx/include/__type_traits/disjunction.h b/libcxx/include/__type_traits/disjunction.h
index 6c6d1a8f21b6..0f11e5e6d69d 100644
--- a/libcxx/include/__type_traits/disjunction.h
+++ b/libcxx/include/__type_traits/disjunction.h
@@ -6,18 +6,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_DISJUNCTION_H
-#define _LIBCPP___TYPE_TRAITS_DISJUNCTION_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_DISJUNCTION_H
+#define _LIBCUDACXX___TYPE_TRAITS_DISJUNCTION_H
 
 #include <__config>
 #include <__type_traits/conditional.h>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <bool>
 struct _OrImpl;
@@ -25,7 +25,7 @@ struct _OrImpl;
 template <>
 struct _OrImpl<true> {
   template <class _Res, class _First, class... _Rest>
-  using _Result _LIBCPP_NODEBUG =
+  using _Result _LIBCUDACXX_NODEBUG =
       typename _OrImpl<!bool(_First::value) && sizeof...(_Rest) != 0>::template _Result<_First, _Rest...>;
 };
 
@@ -36,9 +36,9 @@ struct _OrImpl<false> {
 };
 
 template <class... _Args>
-using _Or _LIBCPP_NODEBUG = typename _OrImpl<sizeof...(_Args) != 0>::template _Result<false_type, _Args...>;
+using _Or _LIBCUDACXX_NODEBUG = typename _OrImpl<sizeof...(_Args) != 0>::template _Result<false_type, _Args...>;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class... _Args>
 struct disjunction : _Or<_Args...> {};
@@ -46,8 +46,8 @@ struct disjunction : _Or<_Args...> {};
 template <class... _Args>
 inline constexpr bool disjunction_v = _Or<_Args...>::value;
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_DISJUNCTION_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_DISJUNCTION_H

diff  --git a/libcxx/include/__type_traits/enable_if.h b/libcxx/include/__type_traits/enable_if.h
index c5e8df45ea58..fb6bb63936e6 100644
--- a/libcxx/include/__type_traits/enable_if.h
+++ b/libcxx/include/__type_traits/enable_if.h
@@ -6,26 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_ENABLE_IF_H
-#define _LIBCPP___TYPE_TRAITS_ENABLE_IF_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_ENABLE_IF_H
+#define _LIBCUDACXX___TYPE_TRAITS_ENABLE_IF_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <bool, class _Tp = void> struct _LIBCPP_TEMPLATE_VIS enable_if {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS enable_if<true, _Tp> {typedef _Tp type;};
+template <bool, class _Tp = void> struct _LIBCUDACXX_TEMPLATE_VIS enable_if {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS enable_if<true, _Tp> {typedef _Tp type;};
 
-template <bool _Bp, class _Tp = void> using __enable_if_t _LIBCPP_NODEBUG = typename enable_if<_Bp, _Tp>::type;
+template <bool _Bp, class _Tp = void> using __enable_if_t _LIBCUDACXX_NODEBUG = typename enable_if<_Bp, _Tp>::type;
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <bool _Bp, class _Tp = void> using enable_if_t = typename enable_if<_Bp, _Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_ENABLE_IF_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_ENABLE_IF_H

diff  --git a/libcxx/include/__type_traits/extent.h b/libcxx/include/__type_traits/extent.h
index 0a4d84e05e23..7697aa7eec2a 100644
--- a/libcxx/include/__type_traits/extent.h
+++ b/libcxx/include/__type_traits/extent.h
@@ -6,50 +6,50 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_EXTENT_H
-#define _LIBCPP___TYPE_TRAITS_EXTENT_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_EXTENT_H
+#define _LIBCUDACXX___TYPE_TRAITS_EXTENT_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__array_extent)
 
 template<class _Tp, size_t _Dim = 0>
-struct _LIBCPP_TEMPLATE_VIS extent
+struct _LIBCUDACXX_TEMPLATE_VIS extent
     : integral_constant<size_t, __array_extent(_Tp, _Dim)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, unsigned _Ip = 0>
 inline constexpr size_t extent_v = __array_extent(_Tp, _Ip);
 #endif
 
 #else // __has_builtin(__array_extent)
 
-template <class _Tp, unsigned _Ip = 0> struct _LIBCPP_TEMPLATE_VIS extent
+template <class _Tp, unsigned _Ip = 0> struct _LIBCUDACXX_TEMPLATE_VIS extent
     : public integral_constant<size_t, 0> {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], 0>
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS extent<_Tp[], 0>
     : public integral_constant<size_t, 0> {};
-template <class _Tp, unsigned _Ip> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[], _Ip>
+template <class _Tp, unsigned _Ip> struct _LIBCUDACXX_TEMPLATE_VIS extent<_Tp[], _Ip>
     : public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
-template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], 0>
+template <class _Tp, size_t _Np> struct _LIBCUDACXX_TEMPLATE_VIS extent<_Tp[_Np], 0>
     : public integral_constant<size_t, _Np> {};
-template <class _Tp, size_t _Np, unsigned _Ip> struct _LIBCPP_TEMPLATE_VIS extent<_Tp[_Np], _Ip>
+template <class _Tp, size_t _Np, unsigned _Ip> struct _LIBCUDACXX_TEMPLATE_VIS extent<_Tp[_Np], _Ip>
     : public integral_constant<size_t, extent<_Tp, _Ip-1>::value> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, unsigned _Ip = 0>
 inline constexpr size_t extent_v = extent<_Tp, _Ip>::value;
 #endif
 
 #endif // __has_builtin(__array_extent)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_EXTENT_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_EXTENT_H

diff  --git a/libcxx/include/__type_traits/has_unique_object_representation.h b/libcxx/include/__type_traits/has_unique_object_representation.h
index d6f75c9ce5c9..0ea1f56b4b7d 100644
--- a/libcxx/include/__type_traits/has_unique_object_representation.h
+++ b/libcxx/include/__type_traits/has_unique_object_representation.h
@@ -6,23 +6,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H
-#define _LIBCPP___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H
+#define _LIBCUDACXX___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/remove_all_extents.h>
 #include <__type_traits/remove_cv.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_unique_object_representations
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS has_unique_object_representations
     : public integral_constant<bool,
        __has_unique_object_representations(remove_cv_t<remove_all_extents_t<_Tp>>)> {};
 
@@ -31,6 +31,6 @@ inline constexpr bool has_unique_object_representations_v = has_unique_object_re
 
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_HAS_UNIQUE_OBJECT_REPRESENTATION_H

diff  --git a/libcxx/include/__type_traits/has_virtual_destructor.h b/libcxx/include/__type_traits/has_virtual_destructor.h
index 1f0bd188b717..871d22950784 100644
--- a/libcxx/include/__type_traits/has_virtual_destructor.h
+++ b/libcxx/include/__type_traits/has_virtual_destructor.h
@@ -6,35 +6,35 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_H
-#define _LIBCPP___TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_H
+#define _LIBCUDACXX___TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__has_virtual_destructor)
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS has_virtual_destructor
     : public integral_constant<bool, __has_virtual_destructor(_Tp)> {};
 
 #else
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS has_virtual_destructor
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS has_virtual_destructor
     : public false_type {};
 
 #endif
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool has_virtual_destructor_v = has_virtual_destructor<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_HAS_VIRTUAL_DESTRUCTOR_H

diff  --git a/libcxx/include/__type_traits/integral_constant.h b/libcxx/include/__type_traits/integral_constant.h
index 2449d1a906e8..c54fa4b6f7a4 100644
--- a/libcxx/include/__type_traits/integral_constant.h
+++ b/libcxx/include/__type_traits/integral_constant.h
@@ -6,45 +6,45 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_INTEGRAL_CONSTANT_H
-#define _LIBCPP___TYPE_TRAITS_INTEGRAL_CONSTANT_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_INTEGRAL_CONSTANT_H
+#define _LIBCUDACXX___TYPE_TRAITS_INTEGRAL_CONSTANT_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, _Tp __v>
-struct _LIBCPP_TEMPLATE_VIS integral_constant
+struct _LIBCUDACXX_TEMPLATE_VIS integral_constant
 {
-  static _LIBCPP_CONSTEXPR const _Tp      value = __v;
+  static _LIBCUDACXX_CONSTEXPR const _Tp      value = __v;
   typedef _Tp               value_type;
   typedef integral_constant type;
-  _LIBCPP_INLINE_VISIBILITY
-  _LIBCPP_CONSTEXPR operator value_type() const _NOEXCEPT {return value;}
-#if _LIBCPP_STD_VER > 11
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR operator value_type() const _NOEXCEPT {return value;}
+#if _LIBCUDACXX_STD_VER > 11
+  _LIBCUDACXX_INLINE_VISIBILITY
   constexpr value_type operator ()() const _NOEXCEPT {return value;}
 #endif
 };
 
 template <class _Tp, _Tp __v>
-_LIBCPP_CONSTEXPR const _Tp integral_constant<_Tp, __v>::value;
+_LIBCUDACXX_CONSTEXPR const _Tp integral_constant<_Tp, __v>::value;
 
 typedef integral_constant<bool, true>  true_type;
 typedef integral_constant<bool, false> false_type;
 
 template <bool _Val>
-using _BoolConstant _LIBCPP_NODEBUG = integral_constant<bool, _Val>;
+using _BoolConstant _LIBCUDACXX_NODEBUG = integral_constant<bool, _Val>;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <bool __b>
 using bool_constant = integral_constant<bool, __b>;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_INTEGRAL_CONSTANT_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_INTEGRAL_CONSTANT_H

diff  --git a/libcxx/include/__type_traits/is_abstract.h b/libcxx/include/__type_traits/is_abstract.h
index c74b3284f75d..b52c23be1835 100644
--- a/libcxx/include/__type_traits/is_abstract.h
+++ b/libcxx/include/__type_traits/is_abstract.h
@@ -6,26 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_ABSTRACT_H
-#define _LIBCPP___TYPE_TRAITS_IS_ABSTRACT_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_ABSTRACT_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_ABSTRACT_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_abstract
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_abstract
     : public integral_constant<bool, __is_abstract(_Tp)> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_abstract_v = __is_abstract(_Tp);
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_ABSTRACT_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_ABSTRACT_H

diff  --git a/libcxx/include/__type_traits/is_aggregate.h b/libcxx/include/__type_traits/is_aggregate.h
index ea9de84f96d0..116753b96a96 100644
--- a/libcxx/include/__type_traits/is_aggregate.h
+++ b/libcxx/include/__type_traits/is_aggregate.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_AGGREGATE_H
-#define _LIBCPP___TYPE_TRAITS_IS_AGGREGATE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_AGGREGATE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_AGGREGATE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS
 is_aggregate : public integral_constant<bool, __is_aggregate(_Tp)> {};
 
 template <class _Tp>
 inline constexpr bool is_aggregate_v = __is_aggregate(_Tp);
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_AGGREGATE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_AGGREGATE_H

diff  --git a/libcxx/include/__type_traits/is_arithmetic.h b/libcxx/include/__type_traits/is_arithmetic.h
index 6d631f41c7d4..e29134b7a1ce 100644
--- a/libcxx/include/__type_traits/is_arithmetic.h
+++ b/libcxx/include/__type_traits/is_arithmetic.h
@@ -6,29 +6,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_ARITHMETIC_H
-#define _LIBCPP___TYPE_TRAITS_IS_ARITHMETIC_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_ARITHMETIC_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_ARITHMETIC_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_floating_point.h>
 #include <__type_traits/is_integral.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_arithmetic
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_arithmetic
     : public integral_constant<bool, is_integral<_Tp>::value      ||
                                      is_floating_point<_Tp>::value> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_arithmetic_v = is_arithmetic<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_ARITHMETIC_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_ARITHMETIC_H

diff  --git a/libcxx/include/__type_traits/is_array.h b/libcxx/include/__type_traits/is_array.h
index bc105908982c..64c29cf4d8b8 100644
--- a/libcxx/include/__type_traits/is_array.h
+++ b/libcxx/include/__type_traits/is_array.h
@@ -6,47 +6,47 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_ARRAY_H
-#define _LIBCPP___TYPE_TRAITS_IS_ARRAY_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_ARRAY_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_ARRAY_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // TODO: Clang incorrectly reports that __is_array is true for T[0].
 //       Re-enable the branch once https://llvm.org/PR54705 is fixed.
 #if __has_builtin(__is_array) && 0
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_array : _BoolConstant<__is_array(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_array : _BoolConstant<__is_array(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_array_v = __is_array(_Tp);
 #endif
 
 #else
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_array
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_array
     : public false_type {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[]>
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_array<_Tp[]>
     : public true_type {};
-template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS is_array<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCUDACXX_TEMPLATE_VIS is_array<_Tp[_Np]>
     : public true_type {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_array_v = is_array<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_array)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_ARRAY_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_ARRAY_H

diff  --git a/libcxx/include/__type_traits/is_assignable.h b/libcxx/include/__type_traits/is_assignable.h
index b8cb6df9df4a..aea18fc950c0 100644
--- a/libcxx/include/__type_traits/is_assignable.h
+++ b/libcxx/include/__type_traits/is_assignable.h
@@ -6,26 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_ASSIGNABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_ASSIGNABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_ASSIGNABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_ASSIGNABLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template<typename, typename _Tp> struct __select_2nd { typedef _LIBCPP_NODEBUG _Tp type; };
+template<typename, typename _Tp> struct __select_2nd { typedef _LIBCUDACXX_NODEBUG _Tp type; };
 
 #if __has_builtin(__is_assignable)
 
 template<class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS is_assignable : _BoolConstant<__is_assignable(_Tp, _Up)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_assignable : _BoolConstant<__is_assignable(_Tp, _Up)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, class _Arg>
 inline constexpr bool is_assignable_v = __is_assignable(_Tp, _Arg);
 #endif
@@ -42,7 +42,7 @@ false_type __is_assignable_test(...);
 
 template <class _Tp, class _Arg, bool = is_void<_Tp>::value || is_void<_Arg>::value>
 struct __is_assignable_imp
-    : public decltype((_VSTD::__is_assignable_test<_Tp, _Arg>(0))) {};
+    : public decltype((_CUDA_VSTD::__is_assignable_test<_Tp, _Arg>(0))) {};
 
 template <class _Tp, class _Arg>
 struct __is_assignable_imp<_Tp, _Arg, true>
@@ -54,13 +54,13 @@ template <class _Tp, class _Arg>
 struct is_assignable
     : public __is_assignable_imp<_Tp, _Arg> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, class _Arg>
 inline constexpr bool is_assignable_v = is_assignable<_Tp, _Arg>::value;
 #endif
 
 #endif // __has_builtin(__is_assignable)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_ASSIGNABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_ASSIGNABLE_H

diff  --git a/libcxx/include/__type_traits/is_base_of.h b/libcxx/include/__type_traits/is_base_of.h
index 0e6dec0b5ee0..202848736afd 100644
--- a/libcxx/include/__type_traits/is_base_of.h
+++ b/libcxx/include/__type_traits/is_base_of.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_BASE_OF_H
-#define _LIBCPP___TYPE_TRAITS_IS_BASE_OF_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_BASE_OF_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_BASE_OF_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Bp, class _Dp>
-struct _LIBCPP_TEMPLATE_VIS is_base_of
+struct _LIBCUDACXX_TEMPLATE_VIS is_base_of
     : public integral_constant<bool, __is_base_of(_Bp, _Dp)> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Bp, class _Dp>
 inline constexpr bool is_base_of_v = __is_base_of(_Bp, _Dp);
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_BASE_OF_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_BASE_OF_H

diff  --git a/libcxx/include/__type_traits/is_bounded_array.h b/libcxx/include/__type_traits/is_bounded_array.h
index 27de9dfd3864..b0ccad74ec52 100644
--- a/libcxx/include/__type_traits/is_bounded_array.h
+++ b/libcxx/include/__type_traits/is_bounded_array.h
@@ -6,26 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_BOUNDED_ARRAY_H
-#define _LIBCPP___TYPE_TRAITS_IS_BOUNDED_ARRAY_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_BOUNDED_ARRAY_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_BOUNDED_ARRAY_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class>                 struct _LIBCPP_TEMPLATE_VIS __libcpp_is_bounded_array           : false_type {};
-template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS __libcpp_is_bounded_array<_Tp[_Np]> : true_type {};
+template <class>                 struct _LIBCUDACXX_TEMPLATE_VIS __LIBCUDACXX_is_bounded_array           : false_type {};
+template <class _Tp, size_t _Np> struct _LIBCUDACXX_TEMPLATE_VIS __LIBCUDACXX_is_bounded_array<_Tp[_Np]> : true_type {};
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-template <class>                 struct _LIBCPP_TEMPLATE_VIS is_bounded_array           : false_type {};
-template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS is_bounded_array<_Tp[_Np]> : true_type {};
+template <class>                 struct _LIBCUDACXX_TEMPLATE_VIS is_bounded_array           : false_type {};
+template <class _Tp, size_t _Np> struct _LIBCUDACXX_TEMPLATE_VIS is_bounded_array<_Tp[_Np]> : true_type {};
 
 template <class _Tp>
 inline constexpr
@@ -33,6 +33,6 @@ bool is_bounded_array_v  = is_bounded_array<_Tp>::value;
 
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_BOUNDED_ARRAY_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_BOUNDED_ARRAY_H

diff  --git a/libcxx/include/__type_traits/is_callable.h b/libcxx/include/__type_traits/is_callable.h
index 73f894dce94c..c6d5eb84ec5b 100644
--- a/libcxx/include/__type_traits/is_callable.h
+++ b/libcxx/include/__type_traits/is_callable.h
@@ -6,18 +6,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_CALLABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_CALLABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_CALLABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_CALLABLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__utility/declval.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _Func, class... _Args, class = decltype(std::declval<_Func>()(std::declval<_Args>()...))>
 true_type __is_callable_helper(int);
@@ -27,6 +27,6 @@ false_type __is_callable_helper(...);
 template<class _Func, class... _Args>
 struct __is_callable : decltype(__is_callable_helper<_Func, _Args...>(0)) {};
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_CALLABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_CALLABLE_H

diff  --git a/libcxx/include/__type_traits/is_class.h b/libcxx/include/__type_traits/is_class.h
index cddaeae6e8a9..f20f39741256 100644
--- a/libcxx/include/__type_traits/is_class.h
+++ b/libcxx/include/__type_traits/is_class.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_CLASS_H
-#define _LIBCPP___TYPE_TRAITS_IS_CLASS_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_CLASS_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_CLASS_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_union.h>
 #include <__type_traits/remove_cv.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_class
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_class
     : public integral_constant<bool, __is_class(_Tp)> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_class_v = __is_class(_Tp);
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_CLASS_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_CLASS_H

diff  --git a/libcxx/include/__type_traits/is_compound.h b/libcxx/include/__type_traits/is_compound.h
index 1395ed8d417f..eaef5e585089 100644
--- a/libcxx/include/__type_traits/is_compound.h
+++ b/libcxx/include/__type_traits/is_compound.h
@@ -6,41 +6,41 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_COMPOUND_H
-#define _LIBCPP___TYPE_TRAITS_IS_COMPOUND_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_COMPOUND_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_COMPOUND_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_fundamental.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_compound)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_compound : _BoolConstant<__is_compound(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_compound : _BoolConstant<__is_compound(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_compound_v = __is_compound(_Tp);
 #endif
 
 #else // __has_builtin(__is_compound)
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_compound
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_compound
     : public integral_constant<bool, !is_fundamental<_Tp>::value> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_compound_v = is_compound<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_compound)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_COMPOUND_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_COMPOUND_H

diff  --git a/libcxx/include/__type_traits/is_const.h b/libcxx/include/__type_traits/is_const.h
index 42b892c58d50..efb66db20926 100644
--- a/libcxx/include/__type_traits/is_const.h
+++ b/libcxx/include/__type_traits/is_const.h
@@ -6,40 +6,40 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_CONST_H
-#define _LIBCPP___TYPE_TRAITS_IS_CONST_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_CONST_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_CONST_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_const)
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_const : _BoolConstant<__is_const(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_const : _BoolConstant<__is_const(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_const_v = __is_const(_Tp);
 #endif
 
 #else
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_const            : public false_type {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_const<_Tp const> : public true_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_const            : public false_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_const<_Tp const> : public true_type {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_const_v = is_const<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_const)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_CONST_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_CONST_H

diff  --git a/libcxx/include/__type_traits/is_constant_evaluated.h b/libcxx/include/__type_traits/is_constant_evaluated.h
index de5ff6c43f40..2aa37bd7040d 100644
--- a/libcxx/include/__type_traits/is_constant_evaluated.h
+++ b/libcxx/include/__type_traits/is_constant_evaluated.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
-#define _LIBCPP___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
-_LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+_LIBCUDACXX_INLINE_VISIBILITY
 inline constexpr bool is_constant_evaluated() noexcept {
   return __builtin_is_constant_evaluated();
 }
 #endif
 
-inline _LIBCPP_CONSTEXPR
-bool __libcpp_is_constant_evaluated() _NOEXCEPT { return __builtin_is_constant_evaluated(); }
+inline _LIBCUDACXX_CONSTEXPR
+bool __LIBCUDACXX_is_constant_evaluated() _NOEXCEPT { return __builtin_is_constant_evaluated(); }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_CONSTANT_EVALUATED_H

diff  --git a/libcxx/include/__type_traits/is_constructible.h b/libcxx/include/__type_traits/is_constructible.h
index 9a96c3df13e8..30d7870194b2 100644
--- a/libcxx/include/__type_traits/is_constructible.h
+++ b/libcxx/include/__type_traits/is_constructible.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_IS_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_IS_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_IS_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_IS_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class ..._Args>
-struct _LIBCPP_TEMPLATE_VIS is_constructible
+struct _LIBCUDACXX_TEMPLATE_VIS is_constructible
     : public integral_constant<bool, __is_constructible(_Tp, _Args...)>
 { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, class ..._Args>
 inline constexpr bool is_constructible_v = is_constructible<_Tp, _Args...>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_IS_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_IS_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_convertible.h b/libcxx/include/__type_traits/is_convertible.h
index 7e49cd4e6a31..f660a1aca939 100644
--- a/libcxx/include/__type_traits/is_convertible.h
+++ b/libcxx/include/__type_traits/is_convertible.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_CONVERTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_CONVERTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_CONVERTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_CONVERTIBLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
@@ -18,18 +18,18 @@
 #include <__utility/declval.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK)
+#if __has_builtin(__is_convertible_to) && !defined(_LIBCUDACXX_USE_IS_CONVERTIBLE_FALLBACK)
 
-template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS is_convertible
+template <class _T1, class _T2> struct _LIBCUDACXX_TEMPLATE_VIS is_convertible
     : public integral_constant<bool, __is_convertible_to(_T1, _T2)> {};
 
-#else  // __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK)
+#else  // __has_builtin(__is_convertible_to) && !defined(_LIBCUDACXX_USE_IS_CONVERTIBLE_FALLBACK)
 
 namespace __is_convertible_imp
 {
@@ -89,20 +89,20 @@ template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 1, 3> : public
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 2, 3> : public false_type {};
 template <class _T1, class _T2> struct __is_convertible<_T1, _T2, 3, 3> : public true_type {};
 
-template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS is_convertible
+template <class _T1, class _T2> struct _LIBCUDACXX_TEMPLATE_VIS is_convertible
     : public __is_convertible<_T1, _T2>
 {
     static const size_t __complete_check1 = __is_convertible_check<_T1>::__v;
     static const size_t __complete_check2 = __is_convertible_check<_T2>::__v;
 };
 
-#endif // __has_builtin(__is_convertible_to) && !defined(_LIBCPP_USE_IS_CONVERTIBLE_FALLBACK)
+#endif // __has_builtin(__is_convertible_to) && !defined(_LIBCUDACXX_USE_IS_CONVERTIBLE_FALLBACK)
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _From, class _To>
 inline constexpr bool is_convertible_v = is_convertible<_From, _To>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_CONVERTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_CONVERTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_copy_assignable.h b/libcxx/include/__type_traits/is_copy_assignable.h
index e46b1249459e..bbae42297206 100644
--- a/libcxx/include/__type_traits/is_copy_assignable.h
+++ b/libcxx/include/__type_traits/is_copy_assignable.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_COPY_ASSIGNABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_COPY_ASSIGNABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_COPY_ASSIGNABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_COPY_ASSIGNABLE_H
 
 #include <__config>
 #include <__type_traits/add_const.h>
@@ -15,21 +15,21 @@
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_assignable.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_copy_assignable
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_copy_assignable
     : public is_assignable<typename add_lvalue_reference<_Tp>::type,
                   typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_copy_assignable_v = is_copy_assignable<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_COPY_ASSIGNABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_COPY_ASSIGNABLE_H

diff  --git a/libcxx/include/__type_traits/is_copy_constructible.h b/libcxx/include/__type_traits/is_copy_constructible.h
index 18dc27f2ef75..14aa4268b417 100644
--- a/libcxx/include/__type_traits/is_copy_constructible.h
+++ b/libcxx/include/__type_traits/is_copy_constructible.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/add_const.h>
@@ -15,22 +15,22 @@
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_constructible.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_copy_constructible
+struct _LIBCUDACXX_TEMPLATE_VIS is_copy_constructible
     : public is_constructible<_Tp,
                   typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_copy_constructible_v = is_copy_constructible<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_COPY_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_core_convertible.h b/libcxx/include/__type_traits/is_core_convertible.h
index 1ce407913052..574eb23ce470 100644
--- a/libcxx/include/__type_traits/is_core_convertible.h
+++ b/libcxx/include/__type_traits/is_core_convertible.h
@@ -6,17 +6,17 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // [conv.general]/3 says "E is convertible to T" whenever "T t=E;" is well-formed.
 // We can't test for that, but we can test implicit convertibility by passing it
@@ -31,6 +31,6 @@ struct __is_core_convertible<_Tp, _Up, decltype(
     static_cast<void(*)(_Up)>(0) ( static_cast<_Tp(*)()>(0)() )
 )> : public true_type {};
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_CORE_CONVERTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_default_constructible.h b/libcxx/include/__type_traits/is_default_constructible.h
index a6368413d6b4..d7bf96197fa7 100644
--- a/libcxx/include/__type_traits/is_default_constructible.h
+++ b/libcxx/include/__type_traits/is_default_constructible.h
@@ -6,29 +6,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_constructible.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_default_constructible
+struct _LIBCUDACXX_TEMPLATE_VIS is_default_constructible
     : public is_constructible<_Tp>
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_default_constructible_v = is_default_constructible<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_DEFAULT_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_destructible.h b/libcxx/include/__type_traits/is_destructible.h
index 5e9ac5579fdd..886ecff2cc96 100644
--- a/libcxx/include/__type_traits/is_destructible.h
+++ b/libcxx/include/__type_traits/is_destructible.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_DESTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_DESTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_DESTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_DESTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
@@ -16,18 +16,18 @@
 #include <__type_traits/remove_all_extents.h>
 #include <__utility/declval.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_destructible)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_destructible : _BoolConstant<__is_destructible(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_destructible : _BoolConstant<__is_destructible(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_destructible_v = __is_destructible(_Tp);
 #endif
@@ -90,13 +90,13 @@ template <>
 struct is_destructible<void>
     : public false_type {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_destructible_v = is_destructible<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_destructible)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_DESTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_DESTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_empty.h b/libcxx/include/__type_traits/is_empty.h
index 042b4e68074c..ef6c8624845c 100644
--- a/libcxx/include/__type_traits/is_empty.h
+++ b/libcxx/include/__type_traits/is_empty.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_EMPTY_H
-#define _LIBCPP___TYPE_TRAITS_IS_EMPTY_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_EMPTY_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_EMPTY_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_empty
+struct _LIBCUDACXX_TEMPLATE_VIS is_empty
     : public integral_constant<bool, __is_empty(_Tp)> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_empty_v = __is_empty(_Tp);
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_EMPTY_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_EMPTY_H

diff  --git a/libcxx/include/__type_traits/is_enum.h b/libcxx/include/__type_traits/is_enum.h
index bf6921c88c94..3e30241293ea 100644
--- a/libcxx/include/__type_traits/is_enum.h
+++ b/libcxx/include/__type_traits/is_enum.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_ENUM_H
-#define _LIBCPP___TYPE_TRAITS_IS_ENUM_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_ENUM_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_ENUM_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/remove_cv.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_enum
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_enum
     : public integral_constant<bool, __is_enum(_Tp)> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_enum_v = __is_enum(_Tp);
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_ENUM_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_ENUM_H

diff  --git a/libcxx/include/__type_traits/is_final.h b/libcxx/include/__type_traits/is_final.h
index 74ced23a14e0..015e324e0c4d 100644
--- a/libcxx/include/__type_traits/is_final.h
+++ b/libcxx/include/__type_traits/is_final.h
@@ -6,31 +6,31 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_FINAL_H
-#define _LIBCPP___TYPE_TRAITS_IS_FINAL_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_FINAL_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_FINAL_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS
-__libcpp_is_final : public integral_constant<bool, __is_final(_Tp)> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS
+__LIBCUDACXX_is_final : public integral_constant<bool, __is_final(_Tp)> {};
 
-#if _LIBCPP_STD_VER > 11
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS
+#if _LIBCUDACXX_STD_VER > 11
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS
 is_final : public integral_constant<bool, __is_final(_Tp)> {};
 #endif
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_final_v = __is_final(_Tp);
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_FINAL_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_FINAL_H

diff  --git a/libcxx/include/__type_traits/is_floating_point.h b/libcxx/include/__type_traits/is_floating_point.h
index d93e5d99d07b..cf165bbe65c6 100644
--- a/libcxx/include/__type_traits/is_floating_point.h
+++ b/libcxx/include/__type_traits/is_floating_point.h
@@ -6,32 +6,32 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_FLOATING_POINT_H
-#define _LIBCPP___TYPE_TRAITS_IS_FLOATING_POINT_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_FLOATING_POINT_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_FLOATING_POINT_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/remove_cv.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct __libcpp_is_floating_point              : public false_type {};
-template <>          struct __libcpp_is_floating_point<float>       : public true_type {};
-template <>          struct __libcpp_is_floating_point<double>      : public true_type {};
-template <>          struct __libcpp_is_floating_point<long double> : public true_type {};
+template <class _Tp> struct __LIBCUDACXX_is_floating_point              : public false_type {};
+template <>          struct __LIBCUDACXX_is_floating_point<float>       : public true_type {};
+template <>          struct __LIBCUDACXX_is_floating_point<double>      : public true_type {};
+template <>          struct __LIBCUDACXX_is_floating_point<long double> : public true_type {};
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_floating_point
-    : public __libcpp_is_floating_point<typename remove_cv<_Tp>::type> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_floating_point
+    : public __LIBCUDACXX_is_floating_point<typename remove_cv<_Tp>::type> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_floating_point_v = is_floating_point<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_FLOATING_POINT_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_FLOATING_POINT_H

diff  --git a/libcxx/include/__type_traits/is_function.h b/libcxx/include/__type_traits/is_function.h
index 53f34b39eb9a..1bb958b10bfc 100644
--- a/libcxx/include/__type_traits/is_function.h
+++ b/libcxx/include/__type_traits/is_function.h
@@ -6,38 +6,38 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_FUNCTIONAL_H
-#define _LIBCPP___TYPE_TRAITS_IS_FUNCTIONAL_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_FUNCTIONAL_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_FUNCTIONAL_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_const.h>
 #include <__type_traits/is_reference.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_function)
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_function : integral_constant<bool, __is_function(_Tp)> {};
+struct _LIBCUDACXX_TEMPLATE_VIS is_function : integral_constant<bool, __is_function(_Tp)> {};
 
 #else
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_function
+struct _LIBCUDACXX_TEMPLATE_VIS is_function
     : public integral_constant<bool, !(is_reference<_Tp>::value || is_const<const _Tp>::value)> {};
 
 #endif // __has_builtin(__is_function)
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_function_v = is_function<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_FUNCTIONAL_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_FUNCTIONAL_H

diff  --git a/libcxx/include/__type_traits/is_fundamental.h b/libcxx/include/__type_traits/is_fundamental.h
index 46f81a103583..4d96ae7570f6 100644
--- a/libcxx/include/__type_traits/is_fundamental.h
+++ b/libcxx/include/__type_traits/is_fundamental.h
@@ -6,44 +6,44 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_FUNDAMENTAL_H
-#define _LIBCPP___TYPE_TRAITS_IS_FUNDAMENTAL_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_FUNDAMENTAL_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_FUNDAMENTAL_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_null_pointer.h>
 #include <__type_traits/is_void.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_fundamental)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_fundamental : _BoolConstant<__is_fundamental(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_fundamental : _BoolConstant<__is_fundamental(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_fundamental_v = __is_fundamental(_Tp);
 #endif
 
 #else // __has_builtin(__is_fundamental)
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_fundamental
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_fundamental
     : public integral_constant<bool, is_void<_Tp>::value        ||
                                      __is_nullptr_t<_Tp>::value ||
                                      is_arithmetic<_Tp>::value> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_fundamental_v = is_fundamental<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_fundamental)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_FUNDAMENTAL_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_FUNDAMENTAL_H

diff  --git a/libcxx/include/__type_traits/is_integral.h b/libcxx/include/__type_traits/is_integral.h
index c1c573a75e0a..3e0475c188c1 100644
--- a/libcxx/include/__type_traits/is_integral.h
+++ b/libcxx/include/__type_traits/is_integral.h
@@ -6,67 +6,67 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_INTEGRAL_H
-#define _LIBCPP___TYPE_TRAITS_IS_INTEGRAL_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_INTEGRAL_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_INTEGRAL_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/remove_cv.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct __libcpp_is_integral                     { enum { value = 0 }; };
-template <>          struct __libcpp_is_integral<bool>               { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<char>               { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<signed char>        { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<unsigned char>      { enum { value = 1 }; };
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <>          struct __libcpp_is_integral<wchar_t>            { enum { value = 1 }; };
+template <class _Tp> struct __LIBCUDACXX_is_integral                     { enum { value = 0 }; };
+template <>          struct __LIBCUDACXX_is_integral<bool>               { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<char>               { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<signed char>        { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<unsigned char>      { enum { value = 1 }; };
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+template <>          struct __LIBCUDACXX_is_integral<wchar_t>            { enum { value = 1 }; };
 #endif
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-template <>          struct __libcpp_is_integral<char8_t>            { enum { value = 1 }; };
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
+template <>          struct __LIBCUDACXX_is_integral<char8_t>            { enum { value = 1 }; };
 #endif
-template <>          struct __libcpp_is_integral<char16_t>           { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<char32_t>           { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<short>              { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<unsigned short>     { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<int>                { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<unsigned int>       { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<long>               { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<unsigned long>      { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<long long>          { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<unsigned long long> { enum { value = 1 }; };
-#ifndef _LIBCPP_HAS_NO_INT128
-template <>          struct __libcpp_is_integral<__int128_t>         { enum { value = 1 }; };
-template <>          struct __libcpp_is_integral<__uint128_t>        { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<char16_t>           { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<char32_t>           { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<short>              { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<unsigned short>     { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<int>                { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<unsigned int>       { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<long>               { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<unsigned long>      { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<long long>          { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<unsigned long long> { enum { value = 1 }; };
+#ifndef _LIBCUDACXX_HAS_NO_INT128
+template <>          struct __LIBCUDACXX_is_integral<__int128_t>         { enum { value = 1 }; };
+template <>          struct __LIBCUDACXX_is_integral<__uint128_t>        { enum { value = 1 }; };
 #endif
 
 #if __has_builtin(__is_integral)
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_integral : _BoolConstant<__is_integral(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_integral : _BoolConstant<__is_integral(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_integral_v = __is_integral(_Tp);
 #endif
 
 #else
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_integral
-    : public _BoolConstant<__libcpp_is_integral<typename remove_cv<_Tp>::type>::value> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_integral
+    : public _BoolConstant<__LIBCUDACXX_is_integral<typename remove_cv<_Tp>::type>::value> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_integral_v = is_integral<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_integral)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_INTEGRAL_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_INTEGRAL_H

diff  --git a/libcxx/include/__type_traits/is_literal_type.h b/libcxx/include/__type_traits/is_literal_type.h
index df525ecee208..3e6b30c92802 100644
--- a/libcxx/include/__type_traits/is_literal_type.h
+++ b/libcxx/include/__type_traits/is_literal_type.h
@@ -6,29 +6,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_LITERAL_TYPE
-#define _LIBCPP___TYPE_TRAITS_IS_LITERAL_TYPE
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_LITERAL_TYPE
+#define _LIBCUDACXX___TYPE_TRAITS_IS_LITERAL_TYPE
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 is_literal_type
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 is_literal_type
     : public integral_constant<bool, __is_literal_type(_Tp)>
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX17 inline constexpr bool is_literal_type_v = is_literal_type<_Tp>::value;
-#endif // _LIBCPP_STD_VER > 14
-#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
+_LIBCUDACXX_DEPRECATED_IN_CXX17 inline constexpr bool is_literal_type_v = is_literal_type<_Tp>::value;
+#endif // _LIBCUDACXX_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_LITERAL_TYPE
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_LITERAL_TYPE

diff  --git a/libcxx/include/__type_traits/is_member_function_pointer.h b/libcxx/include/__type_traits/is_member_function_pointer.h
index 2d2ff81e091a..1ff194fc8c5a 100644
--- a/libcxx/include/__type_traits/is_member_function_pointer.h
+++ b/libcxx/include/__type_traits/is_member_function_pointer.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
-#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
@@ -15,20 +15,20 @@
 #include <__type_traits/remove_cv.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct __libcpp_is_member_pointer {
+template <class _Tp> struct __LIBCUDACXX_is_member_pointer {
   enum {
     __is_member = false,
     __is_func = false,
     __is_obj = false
   };
 };
-template <class _Tp, class _Up> struct __libcpp_is_member_pointer<_Tp _Up::*> {
+template <class _Tp, class _Up> struct __LIBCUDACXX_is_member_pointer<_Tp _Up::*> {
   enum {
     __is_member = true,
     __is_func = is_function<_Tp>::value,
@@ -39,26 +39,26 @@ template <class _Tp, class _Up> struct __libcpp_is_member_pointer<_Tp _Up::*> {
 #if __has_builtin(__is_member_function_pointer)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer
+struct _LIBCUDACXX_TEMPLATE_VIS is_member_function_pointer
     : _BoolConstant<__is_member_function_pointer(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_member_function_pointer_v = __is_member_function_pointer(_Tp);
 #endif
 
 #else // __has_builtin(__is_member_function_pointer)
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_function_pointer
-    : public _BoolConstant< __libcpp_is_member_pointer<typename remove_cv<_Tp>::type>::__is_func > {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_member_function_pointer
+    : public _BoolConstant< __LIBCUDACXX_is_member_pointer<typename remove_cv<_Tp>::type>::__is_func > {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_member_function_pointer_v = is_member_function_pointer<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_member_function_pointer)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H

diff  --git a/libcxx/include/__type_traits/is_member_object_pointer.h b/libcxx/include/__type_traits/is_member_object_pointer.h
index 250a22c97440..05eb475ed8dd 100644
--- a/libcxx/include/__type_traits/is_member_object_pointer.h
+++ b/libcxx/include/__type_traits/is_member_object_pointer.h
@@ -6,41 +6,41 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H
-#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_OBJECT_POINTER_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_member_object_pointer)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer
+struct _LIBCUDACXX_TEMPLATE_VIS is_member_object_pointer
     : _BoolConstant<__is_member_object_pointer(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_member_object_pointer_v = __is_member_object_pointer(_Tp);
 #endif
 
 #else // __has_builtin(__is_member_object_pointer)
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_object_pointer
-    : public _BoolConstant< __libcpp_is_member_pointer<typename remove_cv<_Tp>::type>::__is_obj >  {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_member_object_pointer
+    : public _BoolConstant< __LIBCUDACXX_is_member_pointer<typename remove_cv<_Tp>::type>::__is_obj >  {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_member_object_pointer_v = is_member_object_pointer<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_member_object_pointer)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_FUNCTION_POINTER_H

diff  --git a/libcxx/include/__type_traits/is_member_pointer.h b/libcxx/include/__type_traits/is_member_pointer.h
index 448bcc23d55e..9e9752a8792d 100644
--- a/libcxx/include/__type_traits/is_member_pointer.h
+++ b/libcxx/include/__type_traits/is_member_pointer.h
@@ -6,40 +6,40 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_MEMBER_POINTER_H
-#define _LIBCPP___TYPE_TRAITS_IS_MEMBER_POINTER_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_POINTER_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_POINTER_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_member_pointer)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_member_pointer : _BoolConstant<__is_member_pointer(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_member_pointer_v = __is_member_pointer(_Tp);
 #endif
 
 #else // __has_builtin(__is_member_pointer)
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_member_pointer
- : public _BoolConstant< __libcpp_is_member_pointer<typename remove_cv<_Tp>::type>::__is_member > {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_member_pointer
+ : public _BoolConstant< __LIBCUDACXX_is_member_pointer<typename remove_cv<_Tp>::type>::__is_member > {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_member_pointer_v = is_member_pointer<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_member_pointer)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_MEMBER_POINTER_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_MEMBER_POINTER_H

diff  --git a/libcxx/include/__type_traits/is_move_assignable.h b/libcxx/include/__type_traits/is_move_assignable.h
index 1e8aa23bea37..3cb653df48d5 100644
--- a/libcxx/include/__type_traits/is_move_assignable.h
+++ b/libcxx/include/__type_traits/is_move_assignable.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_MOVE_ASSIGNABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_MOVE_ASSIGNABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_MOVE_ASSIGNABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_MOVE_ASSIGNABLE_H
 
 #include <__config>
 #include <__type_traits/add_const.h>
@@ -16,21 +16,21 @@
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_assignable.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_move_assignable
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_move_assignable
     : public is_assignable<typename add_lvalue_reference<_Tp>::type,
                            typename add_rvalue_reference<_Tp>::type> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_move_assignable_v = is_move_assignable<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_MOVE_ASSIGNABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_MOVE_ASSIGNABLE_H

diff  --git a/libcxx/include/__type_traits/is_move_constructible.h b/libcxx/include/__type_traits/is_move_constructible.h
index 228cee7efffa..64fd7ec8d1e5 100644
--- a/libcxx/include/__type_traits/is_move_constructible.h
+++ b/libcxx/include/__type_traits/is_move_constructible.h
@@ -6,30 +6,30 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/add_rvalue_reference.h>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_constructible.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_move_constructible
+struct _LIBCUDACXX_TEMPLATE_VIS is_move_constructible
     : public is_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_move_constructible_v = is_move_constructible<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_MOVE_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_nothrow_assignable.h b/libcxx/include/__type_traits/is_nothrow_assignable.h
index e3ce33ece895..0a01828ab4a0 100644
--- a/libcxx/include/__type_traits/is_nothrow_assignable.h
+++ b/libcxx/include/__type_traits/is_nothrow_assignable.h
@@ -6,54 +6,54 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_H
 
 #include <__config>
 #include <__type_traits/add_const.h>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_nothrow_assignable)
 
 template <class _Tp, class _Arg>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_assignable
     : public integral_constant<bool, __is_nothrow_assignable(_Tp, _Arg)> {};
 
 #else
 
-template <bool, class _Tp, class _Arg> struct __libcpp_is_nothrow_assignable;
+template <bool, class _Tp, class _Arg> struct __LIBCUDACXX_is_nothrow_assignable;
 
 template <class _Tp, class _Arg>
-struct __libcpp_is_nothrow_assignable<false, _Tp, _Arg>
+struct __LIBCUDACXX_is_nothrow_assignable<false, _Tp, _Arg>
     : public false_type
 {
 };
 
 template <class _Tp, class _Arg>
-struct __libcpp_is_nothrow_assignable<true, _Tp, _Arg>
+struct __LIBCUDACXX_is_nothrow_assignable<true, _Tp, _Arg>
     : public integral_constant<bool, noexcept(declval<_Tp>() = declval<_Arg>()) >
 {
 };
 
 template <class _Tp, class _Arg>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_assignable
-    : public __libcpp_is_nothrow_assignable<is_assignable<_Tp, _Arg>::value, _Tp, _Arg>
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_assignable
+    : public __LIBCUDACXX_is_nothrow_assignable<is_assignable<_Tp, _Arg>::value, _Tp, _Arg>
 {
 };
 
 #endif // __has_builtin(__is_nothrow_assignable)
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, class _Arg>
 inline constexpr bool is_nothrow_assignable_v = is_nothrow_assignable<_Tp, _Arg>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_ASSIGNABLE_H

diff  --git a/libcxx/include/__type_traits/is_nothrow_constructible.h b/libcxx/include/__type_traits/is_nothrow_constructible.h
index 92d6e8343e03..5c75e75a5f73 100644
--- a/libcxx/include/__type_traits/is_nothrow_constructible.h
+++ b/libcxx/include/__type_traits/is_nothrow_constructible.h
@@ -6,31 +6,31 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__utility/declval.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_nothrow_constructible)
 
 template <class _Tp, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_constructible
     : public integral_constant<bool, __is_nothrow_constructible(_Tp, _Args...)> {};
 
 #else
 
-template <bool, bool, class _Tp, class... _Args> struct __libcpp_is_nothrow_constructible;
+template <bool, bool, class _Tp, class... _Args> struct __LIBCUDACXX_is_nothrow_constructible;
 
 template <class _Tp, class... _Args>
-struct __libcpp_is_nothrow_constructible</*is constructible*/true, /*is reference*/false, _Tp, _Args...>
+struct __LIBCUDACXX_is_nothrow_constructible</*is constructible*/true, /*is reference*/false, _Tp, _Args...>
     : public integral_constant<bool, noexcept(_Tp(declval<_Args>()...))>
 {
 };
@@ -39,37 +39,37 @@ template <class _Tp>
 void __implicit_conversion_to(_Tp) noexcept { }
 
 template <class _Tp, class _Arg>
-struct __libcpp_is_nothrow_constructible</*is constructible*/true, /*is reference*/true, _Tp, _Arg>
-    : public integral_constant<bool, noexcept(_VSTD::__implicit_conversion_to<_Tp>(declval<_Arg>()))>
+struct __LIBCUDACXX_is_nothrow_constructible</*is constructible*/true, /*is reference*/true, _Tp, _Arg>
+    : public integral_constant<bool, noexcept(_CUDA_VSTD::__implicit_conversion_to<_Tp>(declval<_Arg>()))>
 {
 };
 
 template <class _Tp, bool _IsReference, class... _Args>
-struct __libcpp_is_nothrow_constructible</*is constructible*/false, _IsReference, _Tp, _Args...>
+struct __LIBCUDACXX_is_nothrow_constructible</*is constructible*/false, _IsReference, _Tp, _Args...>
     : public false_type
 {
 };
 
 template <class _Tp, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible
-    : __libcpp_is_nothrow_constructible<is_constructible<_Tp, _Args...>::value, is_reference<_Tp>::value, _Tp, _Args...>
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_constructible
+    : __LIBCUDACXX_is_nothrow_constructible<is_constructible<_Tp, _Args...>::value, is_reference<_Tp>::value, _Tp, _Args...>
 {
 };
 
 template <class _Tp, size_t _Ns>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_constructible<_Tp[_Ns]>
-    : __libcpp_is_nothrow_constructible<is_constructible<_Tp>::value, is_reference<_Tp>::value, _Tp>
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_constructible<_Tp[_Ns]>
+    : __LIBCUDACXX_is_nothrow_constructible<is_constructible<_Tp>::value, is_reference<_Tp>::value, _Tp>
 {
 };
 
 #endif // __has_builtin(__is_nothrow_constructible)
 
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, class ..._Args>
 inline constexpr bool is_nothrow_constructible_v = is_nothrow_constructible<_Tp, _Args...>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_nothrow_convertible.h b/libcxx/include/__type_traits/is_nothrow_convertible.h
index 712b6f2cf4b8..809dc8c75758 100644
--- a/libcxx/include/__type_traits/is_nothrow_convertible.h
+++ b/libcxx/include/__type_traits/is_nothrow_convertible.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H
 
 #include <__config>
 #include <__type_traits/conjunction.h>
@@ -18,19 +18,19 @@
 #include <__type_traits/lazy.h>
 #include <__utility/declval.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <typename _Tp>
 static void __test_noexcept(_Tp) noexcept;
 
 template<typename _Fm, typename _To>
-static bool_constant<noexcept(_VSTD::__test_noexcept<_To>(declval<_Fm>()))>
+static bool_constant<noexcept(_CUDA_VSTD::__test_noexcept<_To>(declval<_Fm>()))>
 __is_nothrow_convertible_test();
 
 template <typename _Fm, typename _To>
@@ -46,8 +46,8 @@ struct is_nothrow_convertible : _Or<
 template <typename _Fm, typename _To>
 inline constexpr bool is_nothrow_convertible_v = is_nothrow_convertible<_Fm, _To>::value;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_CONVERTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_nothrow_copy_assignable.h b/libcxx/include/__type_traits/is_nothrow_copy_assignable.h
index 8c4b8fd1628b..61a81d0d0cc0 100644
--- a/libcxx/include/__type_traits/is_nothrow_copy_assignable.h
+++ b/libcxx/include/__type_traits/is_nothrow_copy_assignable.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H
 
 #include <__config>
 #include <__type_traits/add_const.h>
@@ -15,21 +15,21 @@
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_nothrow_assignable.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_assignable
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_copy_assignable
     : public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type,
                   typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_nothrow_copy_assignable_v = is_nothrow_copy_assignable<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_ASSIGNABLE_H

diff  --git a/libcxx/include/__type_traits/is_nothrow_copy_constructible.h b/libcxx/include/__type_traits/is_nothrow_copy_constructible.h
index 966df860e4b8..e0a6690e616f 100644
--- a/libcxx/include/__type_traits/is_nothrow_copy_constructible.h
+++ b/libcxx/include/__type_traits/is_nothrow_copy_constructible.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/add_const.h>
@@ -15,21 +15,21 @@
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_nothrow_constructible.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_copy_constructible
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_copy_constructible
     : public is_nothrow_constructible<_Tp,
                   typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_nothrow_copy_constructible_v = is_nothrow_copy_constructible<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_COPY_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_nothrow_default_constructible.h b/libcxx/include/__type_traits/is_nothrow_default_constructible.h
index addf359ec3d6..02afb13a2cdd 100644
--- a/libcxx/include/__type_traits/is_nothrow_default_constructible.h
+++ b/libcxx/include/__type_traits/is_nothrow_default_constructible.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_nothrow_constructible.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_default_constructible
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_default_constructible
     : public is_nothrow_constructible<_Tp>
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_nothrow_default_constructible_v = is_nothrow_default_constructible<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_nothrow_destructible.h b/libcxx/include/__type_traits/is_nothrow_destructible.h
index 4763ae84086a..e2f459ce73fb 100644
--- a/libcxx/include/__type_traits/is_nothrow_destructible.h
+++ b/libcxx/include/__type_traits/is_nothrow_destructible.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/add_const.h>
@@ -19,72 +19,72 @@
 #include <__utility/declval.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if !defined(_LIBCPP_CXX03_LANG)
+#if !defined(_LIBCUDACXX_CXX03_LANG)
 
-template <bool, class _Tp> struct __libcpp_is_nothrow_destructible;
+template <bool, class _Tp> struct __LIBCUDACXX_is_nothrow_destructible;
 
 template <class _Tp>
-struct __libcpp_is_nothrow_destructible<false, _Tp>
+struct __LIBCUDACXX_is_nothrow_destructible<false, _Tp>
     : public false_type
 {
 };
 
 template <class _Tp>
-struct __libcpp_is_nothrow_destructible<true, _Tp>
+struct __LIBCUDACXX_is_nothrow_destructible<true, _Tp>
     : public integral_constant<bool, noexcept(declval<_Tp>().~_Tp()) >
 {
 };
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
-    : public __libcpp_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp>
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_destructible
+    : public __LIBCUDACXX_is_nothrow_destructible<is_destructible<_Tp>::value, _Tp>
 {
 };
 
 template <class _Tp, size_t _Ns>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[_Ns]>
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_destructible<_Tp[_Ns]>
     : public is_nothrow_destructible<_Tp>
 {
 };
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&>
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_destructible<_Tp&>
     : public true_type
 {
 };
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp&&>
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_destructible<_Tp&&>
     : public true_type
 {
 };
 
 #else
 
-template <class _Tp> struct __libcpp_nothrow_destructor
+template <class _Tp> struct __LIBCUDACXX_nothrow_destructor
     : public integral_constant<bool, is_scalar<_Tp>::value ||
                                      is_reference<_Tp>::value> {};
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible
-    : public __libcpp_nothrow_destructor<typename remove_all_extents<_Tp>::type> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_destructible
+    : public __LIBCUDACXX_nothrow_destructor<typename remove_all_extents<_Tp>::type> {};
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_destructible<_Tp[]>
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_destructible<_Tp[]>
     : public false_type {};
 
 #endif
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_nothrow_destructible_v = is_nothrow_destructible<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_DESTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_nothrow_move_assignable.h b/libcxx/include/__type_traits/is_nothrow_move_assignable.h
index 44cea1f9cd56..b0c93eca11f8 100644
--- a/libcxx/include/__type_traits/is_nothrow_move_assignable.h
+++ b/libcxx/include/__type_traits/is_nothrow_move_assignable.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_H
 
 #include <__config>
 #include <__type_traits/add_lvalue_reference.h>
@@ -15,22 +15,22 @@
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_nothrow_assignable.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_assignable
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_move_assignable
     : public is_nothrow_assignable<typename add_lvalue_reference<_Tp>::type,
                                      typename add_rvalue_reference<_Tp>::type>
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_nothrow_move_assignable_v = is_nothrow_move_assignable<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_MOVE_ASSIGNABLE_H

diff  --git a/libcxx/include/__type_traits/is_nothrow_move_constructible.h b/libcxx/include/__type_traits/is_nothrow_move_constructible.h
index e3b1171a4826..9b0e11e79aa9 100644
--- a/libcxx/include/__type_traits/is_nothrow_move_constructible.h
+++ b/libcxx/include/__type_traits/is_nothrow_move_constructible.h
@@ -6,29 +6,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/add_rvalue_reference.h>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_nothrow_constructible.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_nothrow_move_constructible
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_move_constructible
     : public is_nothrow_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_nothrow_move_constructible_v = is_nothrow_move_constructible<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_NOTHROW_MOVE_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_null_pointer.h b/libcxx/include/__type_traits/is_null_pointer.h
index f81cb9aadb2f..6e2277315f91 100644
--- a/libcxx/include/__type_traits/is_null_pointer.h
+++ b/libcxx/include/__type_traits/is_null_pointer.h
@@ -6,36 +6,36 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_NULL_POINTER_H
-#define _LIBCPP___TYPE_TRAITS_IS_NULL_POINTER_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_NULL_POINTER_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_NULL_POINTER_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/remove_cv.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp> struct __is_nullptr_t_impl       : public false_type {};
 template <>          struct __is_nullptr_t_impl<nullptr_t> : public true_type {};
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS __is_nullptr_t
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS __is_nullptr_t
     : public __is_nullptr_t_impl<typename remove_cv<_Tp>::type> {};
 
-#if _LIBCPP_STD_VER > 11
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_null_pointer
+#if _LIBCUDACXX_STD_VER > 11
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_null_pointer
     : public __is_nullptr_t_impl<typename remove_cv<_Tp>::type> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_null_pointer_v = is_null_pointer<_Tp>::value;
 #endif
-#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER > 11
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_NULL_POINTER_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_NULL_POINTER_H

diff  --git a/libcxx/include/__type_traits/is_object.h b/libcxx/include/__type_traits/is_object.h
index 943f1a736cd5..dca1892efb6a 100644
--- a/libcxx/include/__type_traits/is_object.h
+++ b/libcxx/include/__type_traits/is_object.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_OBJECT_H
-#define _LIBCPP___TYPE_TRAITS_IS_OBJECT_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_OBJECT_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_OBJECT_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
@@ -16,37 +16,37 @@
 #include <__type_traits/is_scalar.h>
 #include <__type_traits/is_union.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_object)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_object : _BoolConstant<__is_object(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_object : _BoolConstant<__is_object(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_object_v = __is_object(_Tp);
 #endif
 
 #else // __has_builtin(__is_object)
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_object
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_object
     : public integral_constant<bool, is_scalar<_Tp>::value ||
                                      is_array<_Tp>::value  ||
                                      is_union<_Tp>::value  ||
                                      is_class<_Tp>::value  > {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_object_v = is_object<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_object)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_OBJECT_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_OBJECT_H

diff  --git a/libcxx/include/__type_traits/is_pod.h b/libcxx/include/__type_traits/is_pod.h
index 497060e00557..8743ef79575b 100644
--- a/libcxx/include/__type_traits/is_pod.h
+++ b/libcxx/include/__type_traits/is_pod.h
@@ -6,26 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_POD_H
-#define _LIBCPP___TYPE_TRAITS_IS_POD_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_POD_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_POD_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_pod)
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pod
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_pod
     : public integral_constant<bool, __is_pod(_Tp)> {};
 
 #else
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pod
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_pod
     : public integral_constant<bool, is_trivially_default_constructible<_Tp>::value   &&
                                      is_trivially_copy_constructible<_Tp>::value      &&
                                      is_trivially_copy_assignable<_Tp>::value    &&
@@ -33,11 +33,11 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pod
 
 #endif // __has_builtin(__is_pod)
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_pod_v = is_pod<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_POD_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_POD_H

diff  --git a/libcxx/include/__type_traits/is_pointer.h b/libcxx/include/__type_traits/is_pointer.h
index 63c82ae4715c..9788bc2e0337 100644
--- a/libcxx/include/__type_traits/is_pointer.h
+++ b/libcxx/include/__type_traits/is_pointer.h
@@ -6,52 +6,52 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_POINTER_H
-#define _LIBCPP___TYPE_TRAITS_IS_POINTER_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_POINTER_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_POINTER_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/remove_cv.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_pointer)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_pointer : _BoolConstant<__is_pointer(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_pointer : _BoolConstant<__is_pointer(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_pointer_v = __is_pointer(_Tp);
 #endif
 
 #else // __has_builtin(__is_pointer)
 
-template <class _Tp> struct __libcpp_is_pointer       : public false_type {};
-template <class _Tp> struct __libcpp_is_pointer<_Tp*> : public true_type {};
+template <class _Tp> struct __LIBCUDACXX_is_pointer       : public false_type {};
+template <class _Tp> struct __LIBCUDACXX_is_pointer<_Tp*> : public true_type {};
 
-template <class _Tp> struct __libcpp_remove_objc_qualifiers { typedef _Tp type; };
-#if defined(_LIBCPP_HAS_OBJC_ARC)
-template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __strong> { typedef _Tp type; };
-template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __weak> { typedef _Tp type; };
-template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __autoreleasing> { typedef _Tp type; };
-template <class _Tp> struct __libcpp_remove_objc_qualifiers<_Tp __unsafe_unretained> { typedef _Tp type; };
+template <class _Tp> struct __LIBCUDACXX_remove_objc_qualifiers { typedef _Tp type; };
+#if defined(_LIBCUDACXX_HAS_OBJC_ARC)
+template <class _Tp> struct __LIBCUDACXX_remove_objc_qualifiers<_Tp __strong> { typedef _Tp type; };
+template <class _Tp> struct __LIBCUDACXX_remove_objc_qualifiers<_Tp __weak> { typedef _Tp type; };
+template <class _Tp> struct __LIBCUDACXX_remove_objc_qualifiers<_Tp __autoreleasing> { typedef _Tp type; };
+template <class _Tp> struct __LIBCUDACXX_remove_objc_qualifiers<_Tp __unsafe_unretained> { typedef _Tp type; };
 #endif
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_pointer
-    : public __libcpp_is_pointer<typename __libcpp_remove_objc_qualifiers<typename remove_cv<_Tp>::type>::type> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_pointer
+    : public __LIBCUDACXX_is_pointer<typename __LIBCUDACXX_remove_objc_qualifiers<typename remove_cv<_Tp>::type>::type> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_pointer_v = is_pointer<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_pointer)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_POINTER_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_POINTER_H

diff  --git a/libcxx/include/__type_traits/is_polymorphic.h b/libcxx/include/__type_traits/is_polymorphic.h
index 96da48abeeec..c95a1dacb2fe 100644
--- a/libcxx/include/__type_traits/is_polymorphic.h
+++ b/libcxx/include/__type_traits/is_polymorphic.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_POLYMORPHIC_H
-#define _LIBCPP___TYPE_TRAITS_IS_POLYMORPHIC_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_POLYMORPHIC_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_POLYMORPHIC_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_polymorphic
+struct _LIBCUDACXX_TEMPLATE_VIS is_polymorphic
     : public integral_constant<bool, __is_polymorphic(_Tp)> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_polymorphic_v = __is_polymorphic(_Tp);
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_POLYMORPHIC_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_POLYMORPHIC_H

diff  --git a/libcxx/include/__type_traits/is_primary_template.h b/libcxx/include/__type_traits/is_primary_template.h
index a9bebcf7e64c..00727ef3ea81 100644
--- a/libcxx/include/__type_traits/is_primary_template.h
+++ b/libcxx/include/__type_traits/is_primary_template.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
-#define _LIBCPP___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
 
 #include <__config>
 #include <__type_traits/enable_if.h>
 #include <__type_traits/is_same.h>
 #include <__type_traits/is_valid_expansion.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
 using __test_for_primary_template = __enable_if_t<
@@ -29,6 +29,6 @@ using __is_primary_template = _IsValidExpansion<
     __test_for_primary_template, _Tp
   >;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_PRIMARY_TEMPLATE_H

diff  --git a/libcxx/include/__type_traits/is_reference.h b/libcxx/include/__type_traits/is_reference.h
index 27ca2ddb5a72..8470b9e41016 100644
--- a/libcxx/include/__type_traits/is_reference.h
+++ b/libcxx/include/__type_traits/is_reference.h
@@ -6,32 +6,32 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_REFERENCE_H
-#define _LIBCPP___TYPE_TRAITS_IS_REFERENCE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_lvalue_reference) && \
     __has_builtin(__is_rvalue_reference) && \
     __has_builtin(__is_reference)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_lvalue_reference : _BoolConstant<__is_lvalue_reference(_Tp)> { };
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference : _BoolConstant<__is_rvalue_reference(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_rvalue_reference : _BoolConstant<__is_rvalue_reference(_Tp)> { };
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_reference : _BoolConstant<__is_reference(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_reference : _BoolConstant<__is_reference(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_reference_v = __is_reference(_Tp);
 template <class _Tp>
@@ -42,17 +42,17 @@ inline constexpr bool is_rvalue_reference_v = __is_rvalue_reference(_Tp);
 
 #else // __has_builtin(__is_lvalue_reference) && etc...
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference       : public false_type {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_lvalue_reference<_Tp&> : public true_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_lvalue_reference       : public false_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_lvalue_reference<_Tp&> : public true_type {};
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference        : public false_type {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_rvalue_reference<_Tp&&> : public true_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_rvalue_reference        : public false_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_rvalue_reference<_Tp&&> : public true_type {};
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_reference        : public false_type {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&>  : public true_type {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_reference<_Tp&&> : public true_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_reference        : public false_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_reference<_Tp&>  : public true_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_reference<_Tp&&> : public true_type {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_reference_v = is_reference<_Tp>::value;
 
@@ -65,6 +65,6 @@ inline constexpr bool is_rvalue_reference_v = is_rvalue_reference<_Tp>::value;
 
 #endif // __has_builtin(__is_lvalue_reference) && etc...
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_REFERENCE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCE_H

diff  --git a/libcxx/include/__type_traits/is_reference_wrapper.h b/libcxx/include/__type_traits/is_reference_wrapper.h
index cd391bb07e78..ded683ad792f 100644
--- a/libcxx/include/__type_traits/is_reference_wrapper.h
+++ b/libcxx/include/__type_traits/is_reference_wrapper.h
@@ -6,26 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_REFERENCE_WRAPPER_H
-#define _LIBCPP___TYPE_TRAITS_IS_REFERENCE_WRAPPER_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCE_WRAPPER_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCE_WRAPPER_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/remove_cv.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> class _LIBCPP_TEMPLATE_VIS reference_wrapper;
+template <class _Tp> class _LIBCUDACXX_TEMPLATE_VIS reference_wrapper;
 
 template <class _Tp> struct __is_reference_wrapper_impl : public false_type {};
 template <class _Tp> struct __is_reference_wrapper_impl<reference_wrapper<_Tp> > : public true_type {};
 template <class _Tp> struct __is_reference_wrapper
     : public __is_reference_wrapper_impl<typename remove_cv<_Tp>::type> {};
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_ENABLE_IF_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_ENABLE_IF_H

diff  --git a/libcxx/include/__type_traits/is_referenceable.h b/libcxx/include/__type_traits/is_referenceable.h
index b97631cc39dd..32c796b2e7a6 100644
--- a/libcxx/include/__type_traits/is_referenceable.h
+++ b/libcxx/include/__type_traits/is_referenceable.h
@@ -6,18 +6,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_REFERENCEABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_REFERENCEABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCEABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCEABLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_same.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 struct __is_referenceable_impl {
     template <class _Tp> static _Tp& __test(int);
@@ -28,6 +28,6 @@ template <class _Tp>
 struct __is_referenceable : integral_constant<bool,
     _IsNotSame<decltype(__is_referenceable_impl::__test<_Tp>(0)), false_type>::value> {};
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_REFERENCEABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_REFERENCEABLE_H

diff  --git a/libcxx/include/__type_traits/is_same.h b/libcxx/include/__type_traits/is_same.h
index 6fa0afbc18ca..56dde9fe9555 100644
--- a/libcxx/include/__type_traits/is_same.h
+++ b/libcxx/include/__type_traits/is_same.h
@@ -6,22 +6,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_SAME_H
-#define _LIBCPP___TYPE_TRAITS_IS_SAME_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_SAME_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_SAME_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS is_same : _BoolConstant<__is_same(_Tp, _Up)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_same : _BoolConstant<__is_same(_Tp, _Up)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, class _Up>
 inline constexpr bool is_same_v = __is_same(_Tp, _Up);
 #endif
@@ -39,6 +39,6 @@ using _IsSame = _BoolConstant<__is_same(_Tp, _Up)>;
 template <class _Tp, class _Up>
 using _IsNotSame = _BoolConstant<!__is_same(_Tp, _Up)>;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_SAME_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_SAME_H

diff  --git a/libcxx/include/__type_traits/is_scalar.h b/libcxx/include/__type_traits/is_scalar.h
index ee856dbbfec7..a69856748e86 100644
--- a/libcxx/include/__type_traits/is_scalar.h
+++ b/libcxx/include/__type_traits/is_scalar.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_SCALAR_H
-#define _LIBCPP___TYPE_TRAITS_IS_SCALAR_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_SCALAR_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_SCALAR_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
@@ -16,18 +16,18 @@
 #include <__type_traits/is_member_pointer.h>
 #include <__type_traits/is_pointer.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_scalar)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_scalar : _BoolConstant<__is_scalar(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_scalar : _BoolConstant<__is_scalar(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_scalar_v = __is_scalar(_Tp);
 #endif
@@ -35,11 +35,11 @@ inline constexpr bool is_scalar_v = __is_scalar(_Tp);
 #else // __has_builtin(__is_scalar)
 
 template <class _Tp> struct __is_block : false_type {};
-#if defined(_LIBCPP_HAS_EXTENSION_BLOCKS)
+#if defined(_LIBCUDACXX_HAS_EXTENSION_BLOCKS)
 template <class _Rp, class ..._Args> struct __is_block<_Rp (^)(_Args...)> : true_type {};
 #endif
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_scalar
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_scalar
     : public integral_constant<bool, is_arithmetic<_Tp>::value     ||
                                      is_member_pointer<_Tp>::value ||
                                      is_pointer<_Tp>::value        ||
@@ -47,15 +47,15 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_scalar
                                      __is_block<_Tp>::value        ||
                                      is_enum<_Tp>::value           > {};
 
-template <> struct _LIBCPP_TEMPLATE_VIS is_scalar<nullptr_t> : public true_type {};
+template <> struct _LIBCUDACXX_TEMPLATE_VIS is_scalar<nullptr_t> : public true_type {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_scalar_v = is_scalar<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_scalar)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_SCALAR_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_SCALAR_H

diff  --git a/libcxx/include/__type_traits/is_scoped_enum.h b/libcxx/include/__type_traits/is_scoped_enum.h
index 85a412813304..ce75d0875f8c 100644
--- a/libcxx/include/__type_traits/is_scoped_enum.h
+++ b/libcxx/include/__type_traits/is_scoped_enum.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H
-#define _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_SCOPED_ENUM_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_SCOPED_ENUM_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
@@ -15,13 +15,13 @@
 #include <__type_traits/is_enum.h>
 #include <__type_traits/underlying_type.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 template <class _Tp, bool = is_enum_v<_Tp> >
 struct __is_scoped_enum_helper : false_type {};
 
@@ -30,13 +30,13 @@ struct __is_scoped_enum_helper<_Tp, true>
     : public bool_constant<!is_convertible_v<_Tp, underlying_type_t<_Tp> > > {};
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_scoped_enum
+struct _LIBCUDACXX_TEMPLATE_VIS is_scoped_enum
     : public __is_scoped_enum_helper<_Tp> {};
 
 template <class _Tp>
 inline constexpr bool is_scoped_enum_v = is_scoped_enum<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_SCOPED_ENUM_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_SCOPED_ENUM_H

diff  --git a/libcxx/include/__type_traits/is_signed.h b/libcxx/include/__type_traits/is_signed.h
index e9722c9b2192..25b1f6679657 100644
--- a/libcxx/include/__type_traits/is_signed.h
+++ b/libcxx/include/__type_traits/is_signed.h
@@ -6,24 +6,24 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_SIGNED_H
-#define _LIBCPP___TYPE_TRAITS_IS_SIGNED_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_SIGNED_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_SIGNED_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_signed)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_signed : _BoolConstant<__is_signed(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_signed : _BoolConstant<__is_signed(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_signed_v = __is_signed(_Tp);
 #endif
@@ -31,25 +31,25 @@ inline constexpr bool is_signed_v = __is_signed(_Tp);
 #else // __has_builtin(__is_signed)
 
 template <class _Tp, bool = is_integral<_Tp>::value>
-struct __libcpp_is_signed_impl : public _BoolConstant<(_Tp(-1) < _Tp(0))> {};
+struct __LIBCUDACXX_is_signed_impl : public _BoolConstant<(_Tp(-1) < _Tp(0))> {};
 
 template <class _Tp>
-struct __libcpp_is_signed_impl<_Tp, false> : public true_type {};  // floating point
+struct __LIBCUDACXX_is_signed_impl<_Tp, false> : public true_type {};  // floating point
 
 template <class _Tp, bool = is_arithmetic<_Tp>::value>
-struct __libcpp_is_signed : public __libcpp_is_signed_impl<_Tp> {};
+struct __LIBCUDACXX_is_signed : public __LIBCUDACXX_is_signed_impl<_Tp> {};
 
-template <class _Tp> struct __libcpp_is_signed<_Tp, false> : public false_type {};
+template <class _Tp> struct __LIBCUDACXX_is_signed<_Tp, false> : public false_type {};
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_signed : public __libcpp_is_signed<_Tp> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_signed : public __LIBCUDACXX_is_signed<_Tp> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_signed_v = is_signed<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_signed)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_SIGNED_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_SIGNED_H

diff  --git a/libcxx/include/__type_traits/is_signed_integer.h b/libcxx/include/__type_traits/is_signed_integer.h
index 95aa11bfa1b5..204b051f79b2 100644
--- a/libcxx/include/__type_traits/is_signed_integer.h
+++ b/libcxx/include/__type_traits/is_signed_integer.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_SIGNED_INTEGER_H
-#define _LIBCPP___TYPE_TRAITS_IS_SIGNED_INTEGER_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_SIGNED_INTEGER_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_SIGNED_INTEGER_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct __libcpp_is_signed_integer : public false_type {};
-template <> struct __libcpp_is_signed_integer<signed char>      : public true_type {};
-template <> struct __libcpp_is_signed_integer<signed short>     : public true_type {};
-template <> struct __libcpp_is_signed_integer<signed int>       : public true_type {};
-template <> struct __libcpp_is_signed_integer<signed long>      : public true_type {};
-template <> struct __libcpp_is_signed_integer<signed long long> : public true_type {};
-#ifndef _LIBCPP_HAS_NO_INT128
-template <> struct __libcpp_is_signed_integer<__int128_t>       : public true_type {};
+template <class _Tp> struct __LIBCUDACXX_is_signed_integer : public false_type {};
+template <> struct __LIBCUDACXX_is_signed_integer<signed char>      : public true_type {};
+template <> struct __LIBCUDACXX_is_signed_integer<signed short>     : public true_type {};
+template <> struct __LIBCUDACXX_is_signed_integer<signed int>       : public true_type {};
+template <> struct __LIBCUDACXX_is_signed_integer<signed long>      : public true_type {};
+template <> struct __LIBCUDACXX_is_signed_integer<signed long long> : public true_type {};
+#ifndef _LIBCUDACXX_HAS_NO_INT128
+template <> struct __LIBCUDACXX_is_signed_integer<__int128_t>       : public true_type {};
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_SIGNED_INTEGER_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_SIGNED_INTEGER_H

diff  --git a/libcxx/include/__type_traits/is_standard_layout.h b/libcxx/include/__type_traits/is_standard_layout.h
index 0d8b5f480f0c..016de766a394 100644
--- a/libcxx/include/__type_traits/is_standard_layout.h
+++ b/libcxx/include/__type_traits/is_standard_layout.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_STANDARD_LAYOUT_H
-#define _LIBCPP___TYPE_TRAITS_IS_STANDARD_LAYOUT_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_STANDARD_LAYOUT_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_STANDARD_LAYOUT_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_standard_layout
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_standard_layout
 #if __has_builtin(__is_standard_layout)
     : public integral_constant<bool, __is_standard_layout(_Tp)>
 #else
@@ -26,11 +26,11 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_standard_layout
 #endif
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_standard_layout_v = is_standard_layout<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_STANDARD_LAYOUT_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_STANDARD_LAYOUT_H

diff  --git a/libcxx/include/__type_traits/is_trivial.h b/libcxx/include/__type_traits/is_trivial.h
index 73c2093d4082..675f3c6efba1 100644
--- a/libcxx/include/__type_traits/is_trivial.h
+++ b/libcxx/include/__type_traits/is_trivial.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIAL_H
-#define _LIBCPP___TYPE_TRAITS_IS_TRIVIAL_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIAL_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIAL_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivial
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_trivial
 #if __has_builtin(__is_trivial)
     : public integral_constant<bool, __is_trivial(_Tp)>
 #else
@@ -27,11 +27,11 @@ template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivial
 #endif
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_trivial_v = is_trivial<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIAL_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIAL_H

diff  --git a/libcxx/include/__type_traits/is_trivially_assignable.h b/libcxx/include/__type_traits/is_trivially_assignable.h
index 01540f959efe..8e828dcaaba9 100644
--- a/libcxx/include/__type_traits/is_trivially_assignable.h
+++ b/libcxx/include/__type_traits/is_trivially_assignable.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _Arg>
 struct is_trivially_assignable
     : integral_constant<bool, __is_trivially_assignable(_Tp, _Arg)>
 { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, class _Arg>
 inline constexpr bool is_trivially_assignable_v = is_trivially_assignable<_Tp, _Arg>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_ASSIGNABLE_H

diff  --git a/libcxx/include/__type_traits/is_trivially_constructible.h b/libcxx/include/__type_traits/is_trivially_constructible.h
index 92ea58005f84..4a65d667dcf3 100644
--- a/libcxx/include/__type_traits/is_trivially_constructible.h
+++ b/libcxx/include/__type_traits/is_trivially_constructible.h
@@ -6,29 +6,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS is_trivially_constructible
+struct _LIBCUDACXX_TEMPLATE_VIS is_trivially_constructible
     : integral_constant<bool, __is_trivially_constructible(_Tp, _Args...)>
 {
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp, class... _Args>
 inline constexpr bool is_trivially_constructible_v = is_trivially_constructible<_Tp, _Args...>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_trivially_copy_assignable.h b/libcxx/include/__type_traits/is_trivially_copy_assignable.h
index 066d763884b0..cf8551f0bbca 100644
--- a/libcxx/include/__type_traits/is_trivially_copy_assignable.h
+++ b/libcxx/include/__type_traits/is_trivially_copy_assignable.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_H
 
 #include <__config>
 #include <__type_traits/add_const.h>
@@ -15,21 +15,21 @@
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_trivially_assignable.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_assignable
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_trivially_copy_assignable
     : public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type,
                   typename add_lvalue_reference<typename add_const<_Tp>::type>::type> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_trivially_copy_assignable_v = is_trivially_copy_assignable<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_COPY_ASSIGNABLE_H

diff  --git a/libcxx/include/__type_traits/is_trivially_copy_constructible.h b/libcxx/include/__type_traits/is_trivially_copy_constructible.h
index e0c054d775d6..f8460766d839 100644
--- a/libcxx/include/__type_traits/is_trivially_copy_constructible.h
+++ b/libcxx/include/__type_traits/is_trivially_copy_constructible.h
@@ -6,29 +6,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/add_lvalue_reference.h>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_trivially_constructible.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copy_constructible
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_trivially_copy_constructible
     : public is_trivially_constructible<_Tp, typename add_lvalue_reference<const _Tp>::type>
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_trivially_copy_constructible_v = is_trivially_copy_constructible<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_COPY_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_trivially_copyable.h b/libcxx/include/__type_traits/is_trivially_copyable.h
index 3b7665217292..9cc3545697c6 100644
--- a/libcxx/include/__type_traits/is_trivially_copyable.h
+++ b/libcxx/include/__type_traits/is_trivially_copyable.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_copyable
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_trivially_copyable
     : public integral_constant<bool, __is_trivially_copyable(_Tp)>
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_trivially_copyable_v = is_trivially_copyable<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_COPYABLE_H

diff  --git a/libcxx/include/__type_traits/is_trivially_default_constructible.h b/libcxx/include/__type_traits/is_trivially_default_constructible.h
index 822fa9c910c9..ec02da534045 100644
--- a/libcxx/include/__type_traits/is_trivially_default_constructible.h
+++ b/libcxx/include/__type_traits/is_trivially_default_constructible.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_trivially_constructible.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_default_constructible
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_trivially_default_constructible
     : public is_trivially_constructible<_Tp>
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_trivially_default_constructible_v = is_trivially_default_constructible<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_trivially_destructible.h b/libcxx/include/__type_traits/is_trivially_destructible.h
index 3376c3eeff43..81c06c20904e 100644
--- a/libcxx/include/__type_traits/is_trivially_destructible.h
+++ b/libcxx/include/__type_traits/is_trivially_destructible.h
@@ -6,47 +6,47 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_trivially_destructible)
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_trivially_destructible
     : public integral_constant<bool, __is_trivially_destructible(_Tp)> {};
 
 #elif __has_builtin(__has_trivial_destructor)
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_trivially_destructible
     : public integral_constant<bool, is_destructible<_Tp>::value && __has_trivial_destructor(_Tp)> {};
 
 #else
 
-template <class _Tp> struct __libcpp_trivial_destructor
+template <class _Tp> struct __LIBCUDACXX_trivial_destructor
     : public integral_constant<bool, is_scalar<_Tp>::value ||
                                      is_reference<_Tp>::value> {};
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible
-    : public __libcpp_trivial_destructor<typename remove_all_extents<_Tp>::type> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_trivially_destructible
+    : public __LIBCUDACXX_trivial_destructor<typename remove_all_extents<_Tp>::type> {};
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_destructible<_Tp[]>
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_trivially_destructible<_Tp[]>
     : public false_type {};
 
 #endif // __has_builtin(__is_trivially_destructible)
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_trivially_destructible_v = is_trivially_destructible<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_DESTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_trivially_move_assignable.h b/libcxx/include/__type_traits/is_trivially_move_assignable.h
index fc033a40dea8..7b6799a2d09a 100644
--- a/libcxx/include/__type_traits/is_trivially_move_assignable.h
+++ b/libcxx/include/__type_traits/is_trivially_move_assignable.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_H
 
 #include <__config>
 #include <__type_traits/add_lvalue_reference.h>
@@ -15,22 +15,22 @@
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_trivially_assignable.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_move_assignable
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_trivially_move_assignable
     : public is_trivially_assignable<typename add_lvalue_reference<_Tp>::type,
                                      typename add_rvalue_reference<_Tp>::type>
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_trivially_move_assignable_v = is_trivially_move_assignable<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_MOVE_ASSIGNABLE_H

diff  --git a/libcxx/include/__type_traits/is_trivially_move_constructible.h b/libcxx/include/__type_traits/is_trivially_move_constructible.h
index be005cc26406..d6e78d69bd88 100644
--- a/libcxx/include/__type_traits/is_trivially_move_constructible.h
+++ b/libcxx/include/__type_traits/is_trivially_move_constructible.h
@@ -6,29 +6,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_H
-#define _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_H
 
 #include <__config>
 #include <__type_traits/add_rvalue_reference.h>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_trivially_constructible.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_trivially_move_constructible
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_trivially_move_constructible
     : public is_trivially_constructible<_Tp, typename add_rvalue_reference<_Tp>::type>
     {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_trivially_move_constructible_v = is_trivially_move_constructible<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE_H

diff  --git a/libcxx/include/__type_traits/is_unbounded_array.h b/libcxx/include/__type_traits/is_unbounded_array.h
index 11a12607e1e0..f01b3ee2997e 100644
--- a/libcxx/include/__type_traits/is_unbounded_array.h
+++ b/libcxx/include/__type_traits/is_unbounded_array.h
@@ -6,25 +6,25 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_UNBOUNDED_ARRAY_H
-#define _LIBCPP___TYPE_TRAITS_IS_UNBOUNDED_ARRAY_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_UNBOUNDED_ARRAY_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_UNBOUNDED_ARRAY_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class>     struct _LIBCPP_TEMPLATE_VIS __libcpp_is_unbounded_array        : false_type {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS __libcpp_is_unbounded_array<_Tp[]> : true_type {};
+template <class>     struct _LIBCUDACXX_TEMPLATE_VIS __LIBCUDACXX_is_unbounded_array        : false_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS __LIBCUDACXX_is_unbounded_array<_Tp[]> : true_type {};
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-template <class>     struct _LIBCPP_TEMPLATE_VIS is_unbounded_array        : false_type {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_unbounded_array<_Tp[]> : true_type {};
+template <class>     struct _LIBCUDACXX_TEMPLATE_VIS is_unbounded_array        : false_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_unbounded_array<_Tp[]> : true_type {};
 
 template <class _Tp>
 inline constexpr
@@ -32,6 +32,6 @@ bool is_unbounded_array_v  = is_unbounded_array<_Tp>::value;
 
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_UNBOUNDED_ARRAY_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_UNBOUNDED_ARRAY_H

diff  --git a/libcxx/include/__type_traits/is_union.h b/libcxx/include/__type_traits/is_union.h
index 3e8cffe034d4..8abebceae2c4 100644
--- a/libcxx/include/__type_traits/is_union.h
+++ b/libcxx/include/__type_traits/is_union.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_UNION_H
-#define _LIBCPP___TYPE_TRAITS_IS_UNION_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_UNION_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_UNION_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/remove_cv.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_union
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_union
     : public integral_constant<bool, __is_union(_Tp)> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_union_v = __is_union(_Tp);
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_UNION_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_UNION_H

diff  --git a/libcxx/include/__type_traits/is_unsigned.h b/libcxx/include/__type_traits/is_unsigned.h
index 17cd909d5478..fb62d2ab6c6e 100644
--- a/libcxx/include/__type_traits/is_unsigned.h
+++ b/libcxx/include/__type_traits/is_unsigned.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_H
-#define _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_UNSIGNED_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_UNSIGNED_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_arithmetic.h>
 #include <__type_traits/is_integral.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Before AppleClang 14, __is_unsigned returned true for enums with signed underlying type.
-#if __has_builtin(__is_unsigned) && !(defined(_LIBCPP_APPLE_CLANG_VER) && _LIBCPP_APPLE_CLANG_VER < 1400)
+#if __has_builtin(__is_unsigned) && !(defined(_LIBCUDACXX_APPLE_CLANG_VER) && _LIBCUDACXX_APPLE_CLANG_VER < 1400)
 
 template<class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_unsigned : _BoolConstant<__is_unsigned(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_unsigned : _BoolConstant<__is_unsigned(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_unsigned_v = __is_unsigned(_Tp);
 #endif
@@ -34,25 +34,25 @@ inline constexpr bool is_unsigned_v = __is_unsigned(_Tp);
 #else // __has_builtin(__is_unsigned)
 
 template <class _Tp, bool = is_integral<_Tp>::value>
-struct __libcpp_is_unsigned_impl : public _BoolConstant<(_Tp(0) < _Tp(-1))> {};
+struct __LIBCUDACXX_is_unsigned_impl : public _BoolConstant<(_Tp(0) < _Tp(-1))> {};
 
 template <class _Tp>
-struct __libcpp_is_unsigned_impl<_Tp, false> : public false_type {};  // floating point
+struct __LIBCUDACXX_is_unsigned_impl<_Tp, false> : public false_type {};  // floating point
 
 template <class _Tp, bool = is_arithmetic<_Tp>::value>
-struct __libcpp_is_unsigned : public __libcpp_is_unsigned_impl<_Tp> {};
+struct __LIBCUDACXX_is_unsigned : public __LIBCUDACXX_is_unsigned_impl<_Tp> {};
 
-template <class _Tp> struct __libcpp_is_unsigned<_Tp, false> : public false_type {};
+template <class _Tp> struct __LIBCUDACXX_is_unsigned<_Tp, false> : public false_type {};
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_unsigned : public __libcpp_is_unsigned<_Tp> {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_unsigned : public __LIBCUDACXX_is_unsigned<_Tp> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_unsigned_v = is_unsigned<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_unsigned)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_UNSIGNED_H

diff  --git a/libcxx/include/__type_traits/is_unsigned_integer.h b/libcxx/include/__type_traits/is_unsigned_integer.h
index 54b29acd9ea3..a124ae526ce5 100644
--- a/libcxx/include/__type_traits/is_unsigned_integer.h
+++ b/libcxx/include/__type_traits/is_unsigned_integer.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_INTEGER_H
-#define _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_INTEGER_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_UNSIGNED_INTEGER_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_UNSIGNED_INTEGER_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct __libcpp_is_unsigned_integer : public false_type {};
-template <> struct __libcpp_is_unsigned_integer<unsigned char>      : public true_type {};
-template <> struct __libcpp_is_unsigned_integer<unsigned short>     : public true_type {};
-template <> struct __libcpp_is_unsigned_integer<unsigned int>       : public true_type {};
-template <> struct __libcpp_is_unsigned_integer<unsigned long>      : public true_type {};
-template <> struct __libcpp_is_unsigned_integer<unsigned long long> : public true_type {};
-#ifndef _LIBCPP_HAS_NO_INT128
-template <> struct __libcpp_is_unsigned_integer<__uint128_t>        : public true_type {};
+template <class _Tp> struct __LIBCUDACXX_is_unsigned_integer : public false_type {};
+template <> struct __LIBCUDACXX_is_unsigned_integer<unsigned char>      : public true_type {};
+template <> struct __LIBCUDACXX_is_unsigned_integer<unsigned short>     : public true_type {};
+template <> struct __LIBCUDACXX_is_unsigned_integer<unsigned int>       : public true_type {};
+template <> struct __LIBCUDACXX_is_unsigned_integer<unsigned long>      : public true_type {};
+template <> struct __LIBCUDACXX_is_unsigned_integer<unsigned long long> : public true_type {};
+#ifndef _LIBCUDACXX_HAS_NO_INT128
+template <> struct __LIBCUDACXX_is_unsigned_integer<__uint128_t>        : public true_type {};
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_UNSIGNED_INTEGER_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_UNSIGNED_INTEGER_H

diff  --git a/libcxx/include/__type_traits/is_valid_expansion.h b/libcxx/include/__type_traits/is_valid_expansion.h
index c45db7509e41..08f14dce641b 100644
--- a/libcxx/include/__type_traits/is_valid_expansion.h
+++ b/libcxx/include/__type_traits/is_valid_expansion.h
@@ -6,17 +6,17 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_VALID_EXPANSION_H
-#define _LIBCPP___TYPE_TRAITS_IS_VALID_EXPANSION_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_VALID_EXPANSION_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_VALID_EXPANSION_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <template <class...> class _Templ, class ..._Args, class = _Templ<_Args...> >
 true_type __sfinae_test_impl(int);
@@ -24,8 +24,8 @@ template <template <class...> class, class ...>
 false_type __sfinae_test_impl(...);
 
 template <template <class ...> class _Templ, class ..._Args>
-using _IsValidExpansion _LIBCPP_NODEBUG = decltype(__sfinae_test_impl<_Templ, _Args...>(0));
+using _IsValidExpansion _LIBCUDACXX_NODEBUG = decltype(__sfinae_test_impl<_Templ, _Args...>(0));
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_VALID_EXPANSION_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_VALID_EXPANSION_H

diff  --git a/libcxx/include/__type_traits/is_void.h b/libcxx/include/__type_traits/is_void.h
index 4cebf18633b2..90e3c055cd37 100644
--- a/libcxx/include/__type_traits/is_void.h
+++ b/libcxx/include/__type_traits/is_void.h
@@ -6,40 +6,40 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_VOID_H
-#define _LIBCPP___TYPE_TRAITS_IS_VOID_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_VOID_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_VOID_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_void)
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_void : _BoolConstant<__is_void(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_void : _BoolConstant<__is_void(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_void_v = __is_void(_Tp);
 #endif
 
 #else
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_void
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_void
     : public is_same<typename remove_cv<_Tp>::type, void> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_void_v = is_void<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_void)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_VOID_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_VOID_H

diff  --git a/libcxx/include/__type_traits/is_volatile.h b/libcxx/include/__type_traits/is_volatile.h
index fb922679d62b..364be7822199 100644
--- a/libcxx/include/__type_traits/is_volatile.h
+++ b/libcxx/include/__type_traits/is_volatile.h
@@ -6,40 +6,40 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_IS_VOLATILE_H
-#define _LIBCPP___TYPE_TRAITS_IS_VOLATILE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_IS_VOLATILE_H
+#define _LIBCUDACXX___TYPE_TRAITS_IS_VOLATILE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if __has_builtin(__is_volatile)
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_volatile : _BoolConstant<__is_volatile(_Tp)> { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_volatile : _BoolConstant<__is_volatile(_Tp)> { };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_volatile_v = __is_volatile(_Tp);
 #endif
 
 #else
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_volatile               : public false_type {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS is_volatile<_Tp volatile> : public true_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_volatile               : public false_type {};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS is_volatile<_Tp volatile> : public true_type {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_volatile_v = is_volatile<_Tp>::value;
 #endif
 
 #endif // __has_builtin(__is_volatile)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_IS_VOLATILE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_IS_VOLATILE_H

diff  --git a/libcxx/include/__type_traits/lazy.h b/libcxx/include/__type_traits/lazy.h
index 6874b06f3c5a..060ddffd1504 100644
--- a/libcxx/include/__type_traits/lazy.h
+++ b/libcxx/include/__type_traits/lazy.h
@@ -6,20 +6,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_LAZY_H
-#define _LIBCPP___TYPE_TRAITS_LAZY_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_LAZY_H
+#define _LIBCUDACXX___TYPE_TRAITS_LAZY_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <template <class...> class _Func, class ..._Args>
 struct _Lazy : _Func<_Args...> {};
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_LAZY_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_LAZY_H

diff  --git a/libcxx/include/__type_traits/make_32_64_or_128_bit.h b/libcxx/include/__type_traits/make_32_64_or_128_bit.h
index 87340eac7fb1..fe7329f75b3d 100644
--- a/libcxx/include/__type_traits/make_32_64_or_128_bit.h
+++ b/libcxx/include/__type_traits/make_32_64_or_128_bit.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_MAKE_32_64_OR_128_BIT_H
-#define _LIBCPP___TYPE_TRAITS_MAKE_32_64_OR_128_BIT_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_MAKE_32_64_OR_128_BIT_H
+#define _LIBCUDACXX___TYPE_TRAITS_MAKE_32_64_OR_128_BIT_H
 
 #include <__config>
 #include <__type_traits/conditional.h>
@@ -17,24 +17,24 @@
 #include <__type_traits/make_unsigned.h>
 #include <cstdint>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 /// Helper to promote an integral to smallest 32, 64, or 128 bit representation.
 ///
 /// The restriction is the same as the integral version of to_char.
 template <class _Tp>
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
   requires (is_signed_v<_Tp> || is_unsigned_v<_Tp> || is_same_v<_Tp, char>)
 #endif
 using __make_32_64_or_128_bit_t =
   __copy_unsigned_t<_Tp,
     __conditional_t<sizeof(_Tp) <= sizeof(int32_t),    int32_t,
     __conditional_t<sizeof(_Tp) <= sizeof(int64_t),    int64_t,
-#ifndef _LIBCPP_HAS_NO_INT128
+#ifndef _LIBCUDACXX_HAS_NO_INT128
     __conditional_t<sizeof(_Tp) <= sizeof(__int128_t), __int128_t,
     /* else */                                         void>
 #else
@@ -43,6 +43,6 @@ using __make_32_64_or_128_bit_t =
     > >
   >;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_MAKE_32_64_OR_128_BIT_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_MAKE_32_64_OR_128_BIT_H

diff  --git a/libcxx/include/__type_traits/make_signed.h b/libcxx/include/__type_traits/make_signed.h
index fbc31172a978..6353023ddba8 100644
--- a/libcxx/include/__type_traits/make_signed.h
+++ b/libcxx/include/__type_traits/make_signed.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_MAKE_SIGNED_H
-#define _LIBCPP___TYPE_TRAITS_MAKE_SIGNED_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_MAKE_SIGNED_H
+#define _LIBCUDACXX___TYPE_TRAITS_MAKE_SIGNED_H
 
 #include <__config>
 #include <__type_traits/apply_cv.h>
@@ -17,11 +17,11 @@
 #include <__type_traits/remove_cv.h>
 #include <__type_traits/type_list.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 typedef
     __type_list<signed char,
@@ -29,11 +29,11 @@ typedef
     __type_list<signed int,
     __type_list<signed long,
     __type_list<signed long long,
-#ifndef _LIBCPP_HAS_NO_INT128
+#ifndef _LIBCUDACXX_HAS_NO_INT128
     __type_list<__int128_t,
 #endif
     __nat
-#ifndef _LIBCPP_HAS_NO_INT128
+#ifndef _LIBCUDACXX_HAS_NO_INT128
     >
 #endif
     > > > > > __signed_types;
@@ -56,21 +56,21 @@ template <> struct __make_signed<  signed long,      true> {typedef long      ty
 template <> struct __make_signed<unsigned long,      true> {typedef long      type;};
 template <> struct __make_signed<  signed long long, true> {typedef long long type;};
 template <> struct __make_signed<unsigned long long, true> {typedef long long type;};
-#ifndef _LIBCPP_HAS_NO_INT128
+#ifndef _LIBCUDACXX_HAS_NO_INT128
 template <> struct __make_signed<__int128_t,         true> {typedef __int128_t type;};
 template <> struct __make_signed<__uint128_t,        true> {typedef __int128_t type;};
 #endif
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS make_signed
+struct _LIBCUDACXX_TEMPLATE_VIS make_signed
 {
     typedef typename __apply_cv<_Tp, typename __make_signed<typename remove_cv<_Tp>::type>::type>::type type;
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using make_signed_t = typename make_signed<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_MAKE_SIGNED_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_MAKE_SIGNED_H

diff  --git a/libcxx/include/__type_traits/make_unsigned.h b/libcxx/include/__type_traits/make_unsigned.h
index 8110a5ca9609..8fea076229b6 100644
--- a/libcxx/include/__type_traits/make_unsigned.h
+++ b/libcxx/include/__type_traits/make_unsigned.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_MAKE_UNSIGNED_H
-#define _LIBCPP___TYPE_TRAITS_MAKE_UNSIGNED_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_MAKE_UNSIGNED_H
+#define _LIBCUDACXX___TYPE_TRAITS_MAKE_UNSIGNED_H
 
 #include <__config>
 #include <__type_traits/apply_cv.h>
@@ -19,11 +19,11 @@
 #include <__type_traits/remove_cv.h>
 #include <__type_traits/type_list.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 typedef
     __type_list<unsigned char,
@@ -31,11 +31,11 @@ typedef
     __type_list<unsigned int,
     __type_list<unsigned long,
     __type_list<unsigned long long,
-#ifndef _LIBCPP_HAS_NO_INT128
+#ifndef _LIBCUDACXX_HAS_NO_INT128
     __type_list<__uint128_t,
 #endif
     __nat
-#ifndef _LIBCPP_HAS_NO_INT128
+#ifndef _LIBCUDACXX_HAS_NO_INT128
     >
 #endif
     > > > > > __unsigned_types;
@@ -58,24 +58,24 @@ template <> struct __make_unsigned<  signed long,      true> {typedef unsigned l
 template <> struct __make_unsigned<unsigned long,      true> {typedef unsigned long      type;};
 template <> struct __make_unsigned<  signed long long, true> {typedef unsigned long long type;};
 template <> struct __make_unsigned<unsigned long long, true> {typedef unsigned long long type;};
-#ifndef _LIBCPP_HAS_NO_INT128
+#ifndef _LIBCUDACXX_HAS_NO_INT128
 template <> struct __make_unsigned<__int128_t,         true> {typedef __uint128_t        type;};
 template <> struct __make_unsigned<__uint128_t,        true> {typedef __uint128_t        type;};
 #endif
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS make_unsigned
+struct _LIBCUDACXX_TEMPLATE_VIS make_unsigned
 {
     typedef typename __apply_cv<_Tp, typename __make_unsigned<typename remove_cv<_Tp>::type>::type>::type type;
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using make_unsigned_t = typename make_unsigned<_Tp>::type;
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 typename make_unsigned<_Tp>::type __to_unsigned_like(_Tp __x) noexcept {
     return static_cast<typename make_unsigned<_Tp>::type>(__x);
 }
@@ -84,6 +84,6 @@ typename make_unsigned<_Tp>::type __to_unsigned_like(_Tp __x) noexcept {
 template <class _Tp, class _Up>
 using __copy_unsigned_t = __conditional_t<is_unsigned<_Tp>::value, typename make_unsigned<_Up>::type, _Up>;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_MAKE_UNSIGNED_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_MAKE_UNSIGNED_H

diff  --git a/libcxx/include/__type_traits/nat.h b/libcxx/include/__type_traits/nat.h
index 5216ef520420..7f5d026cdea4 100644
--- a/libcxx/include/__type_traits/nat.h
+++ b/libcxx/include/__type_traits/nat.h
@@ -6,20 +6,20 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_NAT_H
-#define _LIBCPP___TYPE_TRAITS_NAT_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_NAT_H
+#define _LIBCUDACXX___TYPE_TRAITS_NAT_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 struct __nat
 {
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     __nat() = delete;
     __nat(const __nat&) = delete;
     __nat& operator=(const __nat&) = delete;
@@ -27,6 +27,6 @@ struct __nat
 #endif
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_NAT_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_NAT_H

diff  --git a/libcxx/include/__type_traits/negation.h b/libcxx/include/__type_traits/negation.h
index 92f205fb838e..9506c58060fa 100644
--- a/libcxx/include/__type_traits/negation.h
+++ b/libcxx/include/__type_traits/negation.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_NEGATION_H
-#define _LIBCPP___TYPE_TRAITS_NEGATION_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_NEGATION_H
+#define _LIBCUDACXX___TYPE_TRAITS_NEGATION_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Pred>
 struct _Not : _BoolConstant<!_Pred::value> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 struct negation : _Not<_Tp> {};
 template<class _Tp>
 inline constexpr bool negation_v = negation<_Tp>::value;
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_NEGATION_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_NEGATION_H

diff  --git a/libcxx/include/__type_traits/promote.h b/libcxx/include/__type_traits/promote.h
index a9226a74b300..f6a60fe16022 100644
--- a/libcxx/include/__type_traits/promote.h
+++ b/libcxx/include/__type_traits/promote.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_PROMOTE_H
-#define _LIBCPP___TYPE_TRAITS_PROMOTE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_PROMOTE_H
+#define _LIBCUDACXX___TYPE_TRAITS_PROMOTE_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
@@ -15,11 +15,11 @@
 #include <__utility/declval.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
 struct __numeric_type
@@ -90,6 +90,6 @@ class __promote_imp<_A1, void, void, true>
 template <class _A1, class _A2 = void, class _A3 = void>
 class __promote : public __promote_imp<_A1, _A2, _A3> {};
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_PROMOTE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_PROMOTE_H

diff  --git a/libcxx/include/__type_traits/rank.h b/libcxx/include/__type_traits/rank.h
index 193d3fd129a1..ab0084d8d8e7 100644
--- a/libcxx/include/__type_traits/rank.h
+++ b/libcxx/include/__type_traits/rank.h
@@ -6,31 +6,31 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_RANK_H
-#define _LIBCPP___TYPE_TRAITS_RANK_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_RANK_H
+#define _LIBCUDACXX___TYPE_TRAITS_RANK_H
 
 #include <__config>
 #include <__type_traits/integral_constant.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS rank
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS rank
     : public integral_constant<size_t, 0> {};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[]>
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS rank<_Tp[]>
     : public integral_constant<size_t, rank<_Tp>::value + 1> {};
-template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS rank<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCUDACXX_TEMPLATE_VIS rank<_Tp[_Np]>
     : public integral_constant<size_t, rank<_Tp>::value + 1> {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr size_t rank_v = rank<_Tp>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_RANK_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_RANK_H

diff  --git a/libcxx/include/__type_traits/remove_all_extents.h b/libcxx/include/__type_traits/remove_all_extents.h
index 075e3acabb44..3f84ccb2ebb4 100644
--- a/libcxx/include/__type_traits/remove_all_extents.h
+++ b/libcxx/include/__type_traits/remove_all_extents.h
@@ -6,29 +6,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_ALL_EXTENTS_H
-#define _LIBCPP___TYPE_TRAITS_REMOVE_ALL_EXTENTS_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_REMOVE_ALL_EXTENTS_H
+#define _LIBCUDACXX___TYPE_TRAITS_REMOVE_ALL_EXTENTS_H
 
 #include <__config>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_all_extents
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_all_extents
     {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[]>
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_all_extents<_Tp[]>
     {typedef typename remove_all_extents<_Tp>::type type;};
-template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS remove_all_extents<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCUDACXX_TEMPLATE_VIS remove_all_extents<_Tp[_Np]>
     {typedef typename remove_all_extents<_Tp>::type type;};
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using remove_all_extents_t = typename remove_all_extents<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_REMOVE_ALL_EXTENTS_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_REMOVE_ALL_EXTENTS_H

diff  --git a/libcxx/include/__type_traits/remove_const.h b/libcxx/include/__type_traits/remove_const.h
index 8efc893e965a..7704896df4ee 100644
--- a/libcxx/include/__type_traits/remove_const.h
+++ b/libcxx/include/__type_traits/remove_const.h
@@ -6,23 +6,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_CONST_H
-#define _LIBCPP___TYPE_TRAITS_REMOVE_CONST_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_REMOVE_CONST_H
+#define _LIBCUDACXX___TYPE_TRAITS_REMOVE_CONST_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_const            {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_const<const _Tp> {typedef _Tp type;};
-#if _LIBCPP_STD_VER > 11
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_const            {typedef _Tp type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_const<const _Tp> {typedef _Tp type;};
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using remove_const_t = typename remove_const<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_REMOVE_CONST_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_REMOVE_CONST_H

diff  --git a/libcxx/include/__type_traits/remove_cv.h b/libcxx/include/__type_traits/remove_cv.h
index ce1e4e45c6d1..356cf92725fd 100644
--- a/libcxx/include/__type_traits/remove_cv.h
+++ b/libcxx/include/__type_traits/remove_cv.h
@@ -6,25 +6,25 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_CV_H
-#define _LIBCPP___TYPE_TRAITS_REMOVE_CV_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_REMOVE_CV_H
+#define _LIBCUDACXX___TYPE_TRAITS_REMOVE_CV_H
 
 #include <__config>
 #include <__type_traits/remove_const.h>
 #include <__type_traits/remove_volatile.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_cv
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_cv
 {typedef typename remove_volatile<typename remove_const<_Tp>::type>::type type;};
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using remove_cv_t = typename remove_cv<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_REMOVE_CV_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_REMOVE_CV_H

diff  --git a/libcxx/include/__type_traits/remove_cvref.h b/libcxx/include/__type_traits/remove_cvref.h
index d937501fedce..19be1f8d268c 100644
--- a/libcxx/include/__type_traits/remove_cvref.h
+++ b/libcxx/include/__type_traits/remove_cvref.h
@@ -6,36 +6,36 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_CVREF_H
-#define _LIBCPP___TYPE_TRAITS_REMOVE_CVREF_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_REMOVE_CVREF_H
+#define _LIBCUDACXX___TYPE_TRAITS_REMOVE_CVREF_H
 
 #include <__config>
 #include <__type_traits/is_same.h>
 #include <__type_traits/remove_cv.h>
 #include <__type_traits/remove_reference.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-using __uncvref_t _LIBCPP_NODEBUG = typename remove_cv<typename remove_reference<_Tp>::type>::type;
+using __uncvref_t _LIBCUDACXX_NODEBUG = typename remove_cv<typename remove_reference<_Tp>::type>::type;
 
 template <class _Tp, class _Up>
 struct __is_same_uncvref : _IsSame<__uncvref_t<_Tp>, __uncvref_t<_Up> > {};
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 // remove_cvref - same as __uncvref
 template <class _Tp>
 struct remove_cvref {
-    using type _LIBCPP_NODEBUG = __uncvref_t<_Tp>;
+    using type _LIBCUDACXX_NODEBUG = __uncvref_t<_Tp>;
 };
 
 template <class _Tp> using remove_cvref_t = typename remove_cvref<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_REMOVE_CVREF_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_REMOVE_CVREF_H

diff  --git a/libcxx/include/__type_traits/remove_extent.h b/libcxx/include/__type_traits/remove_extent.h
index e353de361616..b833e57273a9 100644
--- a/libcxx/include/__type_traits/remove_extent.h
+++ b/libcxx/include/__type_traits/remove_extent.h
@@ -6,29 +6,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_EXTENT_H
-#define _LIBCPP___TYPE_TRAITS_REMOVE_EXTENT_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_REMOVE_EXTENT_H
+#define _LIBCUDACXX___TYPE_TRAITS_REMOVE_EXTENT_H
 
 #include <__config>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_extent
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_extent
     {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[]>
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_extent<_Tp[]>
     {typedef _Tp type;};
-template <class _Tp, size_t _Np> struct _LIBCPP_TEMPLATE_VIS remove_extent<_Tp[_Np]>
+template <class _Tp, size_t _Np> struct _LIBCUDACXX_TEMPLATE_VIS remove_extent<_Tp[_Np]>
     {typedef _Tp type;};
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using remove_extent_t = typename remove_extent<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_REMOVE_EXTENT_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_REMOVE_EXTENT_H

diff  --git a/libcxx/include/__type_traits/remove_pointer.h b/libcxx/include/__type_traits/remove_pointer.h
index 50cde3829470..af25ac92d267 100644
--- a/libcxx/include/__type_traits/remove_pointer.h
+++ b/libcxx/include/__type_traits/remove_pointer.h
@@ -6,27 +6,27 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_POINTER_H
-#define _LIBCPP___TYPE_TRAITS_REMOVE_POINTER_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_REMOVE_POINTER_H
+#define _LIBCUDACXX___TYPE_TRAITS_REMOVE_POINTER_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer                      {typedef _LIBCPP_NODEBUG _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp*>                {typedef _LIBCPP_NODEBUG _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const>          {typedef _LIBCPP_NODEBUG _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* volatile>       {typedef _LIBCPP_NODEBUG _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_pointer<_Tp* const volatile> {typedef _LIBCPP_NODEBUG _Tp type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_pointer                      {typedef _LIBCUDACXX_NODEBUG _Tp type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_pointer<_Tp*>                {typedef _LIBCUDACXX_NODEBUG _Tp type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_pointer<_Tp* const>          {typedef _LIBCUDACXX_NODEBUG _Tp type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_pointer<_Tp* volatile>       {typedef _LIBCUDACXX_NODEBUG _Tp type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_pointer<_Tp* const volatile> {typedef _LIBCUDACXX_NODEBUG _Tp type;};
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using remove_pointer_t = typename remove_pointer<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_REMOVE_POINTER_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_REMOVE_POINTER_H

diff  --git a/libcxx/include/__type_traits/remove_reference.h b/libcxx/include/__type_traits/remove_reference.h
index a69e48dc584b..79e614c8b6f5 100644
--- a/libcxx/include/__type_traits/remove_reference.h
+++ b/libcxx/include/__type_traits/remove_reference.h
@@ -6,26 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H
-#define _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_REMOVE_REFERENCE_H
+#define _LIBCUDACXX___TYPE_TRAITS_REMOVE_REFERENCE_H
 
 #include <__config>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference        {typedef _LIBCPP_NODEBUG _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&>  {typedef _LIBCPP_NODEBUG _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCPP_NODEBUG _Tp type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_reference        {typedef _LIBCUDACXX_NODEBUG _Tp type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_reference<_Tp&>  {typedef _LIBCUDACXX_NODEBUG _Tp type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_reference<_Tp&&> {typedef _LIBCUDACXX_NODEBUG _Tp type;};
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using remove_reference_t = typename remove_reference<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_REMOVE_REFERENCE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_REMOVE_REFERENCE_H

diff  --git a/libcxx/include/__type_traits/remove_volatile.h b/libcxx/include/__type_traits/remove_volatile.h
index 79f64c46a27d..722819f49265 100644
--- a/libcxx/include/__type_traits/remove_volatile.h
+++ b/libcxx/include/__type_traits/remove_volatile.h
@@ -6,23 +6,23 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_REMOVE_VOLATILE_H
-#define _LIBCPP___TYPE_TRAITS_REMOVE_VOLATILE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_REMOVE_VOLATILE_H
+#define _LIBCUDACXX___TYPE_TRAITS_REMOVE_VOLATILE_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_volatile               {typedef _Tp type;};
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS remove_volatile<volatile _Tp> {typedef _Tp type;};
-#if _LIBCPP_STD_VER > 11
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_volatile               {typedef _Tp type;};
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS remove_volatile<volatile _Tp> {typedef _Tp type;};
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using remove_volatile_t = typename remove_volatile<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_REMOVE_VOLATILE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_REMOVE_VOLATILE_H

diff  --git a/libcxx/include/__type_traits/type_identity.h b/libcxx/include/__type_traits/type_identity.h
index 42e52b16725b..e470b31f40ed 100644
--- a/libcxx/include/__type_traits/type_identity.h
+++ b/libcxx/include/__type_traits/type_identity.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_TYPE_IDENTITY_H
-#define _LIBCPP___TYPE_TRAITS_TYPE_IDENTITY_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_TYPE_IDENTITY_H
+#define _LIBCUDACXX___TYPE_TRAITS_TYPE_IDENTITY_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
 struct __type_identity { typedef _Tp type; };
 
 template <class _Tp>
-using __type_identity_t _LIBCPP_NODEBUG = typename __type_identity<_Tp>::type;
+using __type_identity_t _LIBCUDACXX_NODEBUG = typename __type_identity<_Tp>::type;
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template<class _Tp> struct type_identity { typedef _Tp type; };
 template<class _Tp> using type_identity_t = typename type_identity<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_TYPE_IDENTITY_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_TYPE_IDENTITY_H

diff  --git a/libcxx/include/__type_traits/type_list.h b/libcxx/include/__type_traits/type_list.h
index 5a9e3319a1d4..cea868fc5235 100644
--- a/libcxx/include/__type_traits/type_list.h
+++ b/libcxx/include/__type_traits/type_list.h
@@ -6,17 +6,17 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_TYPE_LIST_H
-#define _LIBCPP___TYPE_TRAITS_TYPE_LIST_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_TYPE_LIST_H
+#define _LIBCUDACXX___TYPE_TRAITS_TYPE_LIST_H
 
 #include <__config>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Hp, class _Tp>
 struct __type_list
@@ -30,15 +30,15 @@ template <class _TypeList, size_t _Size, bool = _Size <= sizeof(typename _TypeLi
 template <class _Hp, class _Tp, size_t _Size>
 struct __find_first<__type_list<_Hp, _Tp>, _Size, true>
 {
-    typedef _LIBCPP_NODEBUG _Hp type;
+    typedef _LIBCUDACXX_NODEBUG _Hp type;
 };
 
 template <class _Hp, class _Tp, size_t _Size>
 struct __find_first<__type_list<_Hp, _Tp>, _Size, false>
 {
-    typedef _LIBCPP_NODEBUG typename __find_first<_Tp, _Size>::type type;
+    typedef _LIBCUDACXX_NODEBUG typename __find_first<_Tp, _Size>::type type;
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_TYPE_LIST_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_TYPE_LIST_H

diff  --git a/libcxx/include/__type_traits/underlying_type.h b/libcxx/include/__type_traits/underlying_type.h
index 1c8db6432371..44141178430f 100644
--- a/libcxx/include/__type_traits/underlying_type.h
+++ b/libcxx/include/__type_traits/underlying_type.h
@@ -6,17 +6,17 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_UNDERLYING_TYPE_H
-#define _LIBCPP___TYPE_TRAITS_UNDERLYING_TYPE_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_UNDERLYING_TYPE_H
+#define _LIBCUDACXX___TYPE_TRAITS_UNDERLYING_TYPE_H
 
 #include <__config>
 #include <__type_traits/is_enum.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, bool = is_enum<_Tp>::value> struct __underlying_type_impl;
 
@@ -32,10 +32,10 @@ struct __underlying_type_impl<_Tp, true>
 template <class _Tp>
 struct underlying_type : __underlying_type_impl<_Tp, is_enum<_Tp>::value> {};
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp> using underlying_type_t = typename underlying_type<_Tp>::type;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_UNDERLYING_TYPE_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_UNDERLYING_TYPE_H

diff  --git a/libcxx/include/__type_traits/void_t.h b/libcxx/include/__type_traits/void_t.h
index a71ab5e4b07f..56d24870e271 100644
--- a/libcxx/include/__type_traits/void_t.h
+++ b/libcxx/include/__type_traits/void_t.h
@@ -6,24 +6,24 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___TYPE_TRAITS_VOID_T_H
-#define _LIBCPP___TYPE_TRAITS_VOID_T_H
+#ifndef _LIBCUDACXX___TYPE_TRAITS_VOID_T_H
+#define _LIBCUDACXX___TYPE_TRAITS_VOID_T_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class...> using void_t = void;
 #endif
 
 template <class>
 struct __void_t { typedef void type; };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___TYPE_TRAITS_VOID_T_H
+#endif // _LIBCUDACXX___TYPE_TRAITS_VOID_T_H

diff  --git a/libcxx/include/__utility/as_const.h b/libcxx/include/__utility/as_const.h
index be7dd8c7cf23..a288fda6570e 100644
--- a/libcxx/include/__utility/as_const.h
+++ b/libcxx/include/__utility/as_const.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_AS_CONST_H
-#define _LIBCPP___UTILITY_AS_CONST_H
+#ifndef _LIBCUDACXX___UTILITY_AS_CONST_H
+#define _LIBCUDACXX___UTILITY_AS_CONST_H
 
 #include <__config>
 #include <__utility/forward.h>
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
-_LIBCPP_NODISCARD_EXT constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { return __t; }
+_LIBCUDACXX_NODISCARD_EXT constexpr add_const_t<_Tp>& as_const(_Tp& __t) noexcept { return __t; }
 
 template <class _Tp>
 void as_const(const _Tp&&) = delete;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_AS_CONST_H
+#endif // _LIBCUDACXX___UTILITY_AS_CONST_H

diff  --git a/libcxx/include/__utility/auto_cast.h b/libcxx/include/__utility/auto_cast.h
index e9079443959f..524d5e4fe95f 100644
--- a/libcxx/include/__utility/auto_cast.h
+++ b/libcxx/include/__utility/auto_cast.h
@@ -7,16 +7,16 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_AUTO_CAST_H
-#define _LIBCPP___UTILITY_AUTO_CAST_H
+#ifndef _LIBCUDACXX___UTILITY_AUTO_CAST_H
+#define _LIBCUDACXX___UTILITY_AUTO_CAST_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#define _LIBCPP_AUTO_CAST(expr) static_cast<typename decay<decltype((expr))>::type>(expr)
+#define _LIBCUDACXX_AUTO_CAST(expr) static_cast<typename decay<decltype((expr))>::type>(expr)
 
-#endif // _LIBCPP___UTILITY_AUTO_CAST_H
+#endif // _LIBCUDACXX___UTILITY_AUTO_CAST_H

diff  --git a/libcxx/include/__utility/cmp.h b/libcxx/include/__utility/cmp.h
index 3cfd98106705..caaa6d1838ea 100644
--- a/libcxx/include/__utility/cmp.h
+++ b/libcxx/include/__utility/cmp.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_CMP_H
-#define _LIBCPP___UTILITY_CMP_H
+#ifndef _LIBCUDACXX___UTILITY_CMP_H
+#define _LIBCUDACXX___UTILITY_CMP_H
 
 #include <__config>
 #include <__utility/forward.h>
@@ -15,32 +15,32 @@
 #include <limits>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template<class _Tp, class... _Up>
 struct _IsSameAsAny : _Or<_IsSame<_Tp, _Up>...> {};
 
 template<class _Tp>
 concept __is_safe_integral_cmp = is_integral_v<_Tp> &&
                       !_IsSameAsAny<_Tp, bool, char, char16_t, char32_t
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
                                     , char8_t
 #endif
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
                                     , wchar_t
 #endif
                                     >::value;
 
 template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool cmp_equal(_Tp __t, _Up __u) noexcept
 {
   if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>)
@@ -52,14 +52,14 @@ bool cmp_equal(_Tp __t, _Up __u) noexcept
 }
 
 template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool cmp_not_equal(_Tp __t, _Up __u) noexcept
 {
-  return !_VSTD::cmp_equal(__t, __u);
+  return !_CUDA_VSTD::cmp_equal(__t, __u);
 }
 
 template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool cmp_less(_Tp __t, _Up __u) noexcept
 {
   if constexpr (is_signed_v<_Tp> == is_signed_v<_Up>)
@@ -71,37 +71,37 @@ bool cmp_less(_Tp __t, _Up __u) noexcept
 }
 
 template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool cmp_greater(_Tp __t, _Up __u) noexcept
 {
-  return _VSTD::cmp_less(__u, __t);
+  return _CUDA_VSTD::cmp_less(__u, __t);
 }
 
 template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool cmp_less_equal(_Tp __t, _Up __u) noexcept
 {
-  return !_VSTD::cmp_greater(__t, __u);
+  return !_CUDA_VSTD::cmp_greater(__t, __u);
 }
 
 template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool cmp_greater_equal(_Tp __t, _Up __u) noexcept
 {
-  return !_VSTD::cmp_less(__t, __u);
+  return !_CUDA_VSTD::cmp_less(__t, __u);
 }
 
 template<__is_safe_integral_cmp _Tp, __is_safe_integral_cmp _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool in_range(_Up __u) noexcept
 {
-  return _VSTD::cmp_less_equal(__u, numeric_limits<_Tp>::max()) &&
-         _VSTD::cmp_greater_equal(__u, numeric_limits<_Tp>::min());
+  return _CUDA_VSTD::cmp_less_equal(__u, numeric_limits<_Tp>::max()) &&
+         _CUDA_VSTD::cmp_greater_equal(__u, numeric_limits<_Tp>::min());
 }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP___UTILITY_CMP_H
+#endif // _LIBCUDACXX___UTILITY_CMP_H

diff  --git a/libcxx/include/__utility/declval.h b/libcxx/include/__utility/declval.h
index 97fd1eba91c6..29f2dcf42345 100644
--- a/libcxx/include/__utility/declval.h
+++ b/libcxx/include/__utility/declval.h
@@ -6,29 +6,29 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_DECLVAL_H
-#define _LIBCPP___UTILITY_DECLVAL_H
+#ifndef _LIBCUDACXX___UTILITY_DECLVAL_H
+#define _LIBCUDACXX___UTILITY_DECLVAL_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Suppress deprecation notice for volatile-qualified return type resulting
 // from volatile-qualified types _Tp.
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Tp>
 _Tp&& __declval(int);
 template <class _Tp>
 _Tp __declval(long);
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 template <class _Tp>
 decltype(__declval<_Tp>(0)) declval() _NOEXCEPT;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_DECLVAL_H
+#endif // _LIBCUDACXX___UTILITY_DECLVAL_H

diff  --git a/libcxx/include/__utility/exchange.h b/libcxx/include/__utility/exchange.h
index d9b3c151755f..607cfd915731 100644
--- a/libcxx/include/__utility/exchange.h
+++ b/libcxx/include/__utility/exchange.h
@@ -6,32 +6,32 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_EXCHANGE_H
-#define _LIBCPP___UTILITY_EXCHANGE_H
+#ifndef _LIBCUDACXX___UTILITY_EXCHANGE_H
+#define _LIBCUDACXX___UTILITY_EXCHANGE_H
 
 #include <__config>
 #include <__utility/forward.h>
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template<class _T1, class _T2 = _T1>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 _T1 exchange(_T1& __obj, _T2&& __new_value)
     noexcept(is_nothrow_move_constructible<_T1>::value && is_nothrow_assignable<_T1&, _T2>::value)
 {
-    _T1 __old_value = _VSTD::move(__obj);
-    __obj = _VSTD::forward<_T2>(__new_value);
+    _T1 __old_value = _CUDA_VSTD::move(__obj);
+    __obj = _CUDA_VSTD::forward<_T2>(__new_value);
     return __old_value;
 }
-#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER > 11
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_EXCHANGE_H
+#endif // _LIBCUDACXX___UTILITY_EXCHANGE_H

diff  --git a/libcxx/include/__utility/forward.h b/libcxx/include/__utility/forward.h
index 03ca16d9f955..e6d0ff1f5b4a 100644
--- a/libcxx/include/__utility/forward.h
+++ b/libcxx/include/__utility/forward.h
@@ -7,32 +7,32 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_FORWARD_H
-#define _LIBCPP___UTILITY_FORWARD_H
+#ifndef _LIBCUDACXX___UTILITY_FORWARD_H
+#define _LIBCUDACXX___UTILITY_FORWARD_H
 
 #include <__config>
 #include <__type_traits/is_reference.h>
 #include <__type_traits/remove_reference.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR _Tp&&
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR _Tp&&
 forward(typename remove_reference<_Tp>::type& __t) _NOEXCEPT {
   return static_cast<_Tp&&>(__t);
 }
 
 template <class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR _Tp&&
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR _Tp&&
 forward(typename remove_reference<_Tp>::type&& __t) _NOEXCEPT {
   static_assert(!is_lvalue_reference<_Tp>::value, "cannot forward an rvalue as an lvalue");
   return static_cast<_Tp&&>(__t);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_FORWARD_H
+#endif // _LIBCUDACXX___UTILITY_FORWARD_H

diff  --git a/libcxx/include/__utility/in_place.h b/libcxx/include/__utility/in_place.h
index 7a4973fa0407..243c38845b11 100644
--- a/libcxx/include/__utility/in_place.h
+++ b/libcxx/include/__utility/in_place.h
@@ -6,34 +6,34 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_IN_PLACE_H
-#define _LIBCPP___UTILITY_IN_PLACE_H
+#ifndef _LIBCUDACXX___UTILITY_IN_PLACE_H
+#define _LIBCUDACXX___UTILITY_IN_PLACE_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
-struct _LIBCPP_TYPE_VIS in_place_t {
+struct _LIBCUDACXX_TYPE_VIS in_place_t {
     explicit in_place_t() = default;
 };
 inline constexpr in_place_t in_place{};
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS in_place_type_t {
+struct _LIBCUDACXX_TEMPLATE_VIS in_place_type_t {
     explicit in_place_type_t() = default;
 };
 template <class _Tp>
 inline constexpr in_place_type_t<_Tp> in_place_type{};
 
 template <size_t _Idx>
-struct _LIBCPP_TEMPLATE_VIS in_place_index_t {
+struct _LIBCUDACXX_TEMPLATE_VIS in_place_index_t {
     explicit in_place_index_t() = default;
 };
 template <size_t _Idx>
@@ -51,8 +51,8 @@ template <size_t _Idx> struct __is_inplace_index_imp<in_place_index_t<_Idx>> : t
 template <class _Tp>
 using __is_inplace_index = __is_inplace_index_imp<__uncvref_t<_Tp>>;
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_IN_PLACE_H
+#endif // _LIBCUDACXX___UTILITY_IN_PLACE_H

diff  --git a/libcxx/include/__utility/integer_sequence.h b/libcxx/include/__utility/integer_sequence.h
index 633f1333e247..91e8a3424764 100644
--- a/libcxx/include/__utility/integer_sequence.h
+++ b/libcxx/include/__utility/integer_sequence.h
@@ -6,28 +6,28 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_INTEGER_SEQUENCE_H
-#define _LIBCPP___UTILITY_INTEGER_SEQUENCE_H
+#ifndef _LIBCUDACXX___UTILITY_INTEGER_SEQUENCE_H
+#define _LIBCUDACXX___UTILITY_INTEGER_SEQUENCE_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 
 template<class _Tp, _Tp... _Ip>
-struct _LIBCPP_TEMPLATE_VIS integer_sequence
+struct _LIBCUDACXX_TEMPLATE_VIS integer_sequence
 {
     typedef _Tp value_type;
     static_assert( is_integral<_Tp>::value,
                   "std::integer_sequence can only be instantiated with an integral type" );
     static
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr
     size_t
     size() noexcept { return sizeof...(_Ip); }
@@ -36,14 +36,14 @@ struct _LIBCPP_TEMPLATE_VIS integer_sequence
 template<size_t... _Ip>
     using index_sequence = integer_sequence<size_t, _Ip...>;
 
-#if __has_builtin(__make_integer_seq) && !defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
+#if __has_builtin(__make_integer_seq) && !defined(_LIBCUDACXX_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
 
 template <class _Tp, _Tp _Ep>
-using __make_integer_sequence _LIBCPP_NODEBUG = __make_integer_seq<integer_sequence, _Tp, _Ep>;
+using __make_integer_sequence _LIBCUDACXX_NODEBUG = __make_integer_seq<integer_sequence, _Tp, _Ep>;
 
 #else
 
-template<typename _Tp, _Tp _Np> using __make_integer_sequence_unchecked _LIBCPP_NODEBUG =
+template<typename _Tp, _Tp _Np> using __make_integer_sequence_unchecked _LIBCUDACXX_NODEBUG =
   typename __detail::__make<_Np>::type::template __convert<integer_sequence, _Tp>;
 
 template <class _Tp, _Tp _Ep>
@@ -54,11 +54,11 @@ struct __make_integer_sequence_checked
     static_assert(0 <= _Ep, "std::make_integer_sequence must have a non-negative sequence length");
     // Workaround GCC bug by preventing bad installations when 0 <= _Ep
     // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68929
-    typedef _LIBCPP_NODEBUG __make_integer_sequence_unchecked<_Tp, 0 <= _Ep ? _Ep : 0> type;
+    typedef _LIBCUDACXX_NODEBUG __make_integer_sequence_unchecked<_Tp, 0 <= _Ep ? _Ep : 0> type;
 };
 
 template <class _Tp, _Tp _Ep>
-using __make_integer_sequence _LIBCPP_NODEBUG = typename __make_integer_sequence_checked<_Tp, _Ep>::type;
+using __make_integer_sequence _LIBCUDACXX_NODEBUG = typename __make_integer_sequence_checked<_Tp, _Ep>::type;
 
 #endif
 
@@ -71,8 +71,8 @@ template<size_t _Np>
 template<class... _Tp>
     using index_sequence_for = make_index_sequence<sizeof...(_Tp)>;
 
-#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER > 11
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_INTEGER_SEQUENCE_H
+#endif // _LIBCUDACXX___UTILITY_INTEGER_SEQUENCE_H

diff  --git a/libcxx/include/__utility/move.h b/libcxx/include/__utility/move.h
index da0d986093d6..1e597cbf7fb5 100644
--- a/libcxx/include/__utility/move.h
+++ b/libcxx/include/__utility/move.h
@@ -7,22 +7,22 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_MOVE_H
-#define _LIBCPP___UTILITY_MOVE_H
+#ifndef _LIBCUDACXX___UTILITY_MOVE_H
+#define _LIBCUDACXX___UTILITY_MOVE_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR typename remove_reference<_Tp>::type&&
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR typename remove_reference<_Tp>::type&&
 move(_Tp&& __t) _NOEXCEPT {
-  typedef _LIBCPP_NODEBUG typename remove_reference<_Tp>::type _Up;
+  typedef _LIBCUDACXX_NODEBUG typename remove_reference<_Tp>::type _Up;
   return static_cast<_Up&&>(__t);
 }
 
@@ -32,11 +32,11 @@ using __move_if_noexcept_result_t =
                          _Tp&&>::type;
 
 template <class _Tp>
-_LIBCPP_NODISCARD_EXT inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 __move_if_noexcept_result_t<_Tp>
+_LIBCUDACXX_NODISCARD_EXT inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 __move_if_noexcept_result_t<_Tp>
 move_if_noexcept(_Tp& __x) _NOEXCEPT {
-  return _VSTD::move(__x);
+  return _CUDA_VSTD::move(__x);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_MOVE_H
+#endif // _LIBCUDACXX___UTILITY_MOVE_H

diff  --git a/libcxx/include/__utility/pair.h b/libcxx/include/__utility/pair.h
index 97635c2e61b5..b6c5a8f11317 100644
--- a/libcxx/include/__utility/pair.h
+++ b/libcxx/include/__utility/pair.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_PAIR_H
-#define _LIBCPP___UTILITY_PAIR_H
+#ifndef _LIBCUDACXX___UTILITY_PAIR_H
+#define _LIBCUDACXX___UTILITY_PAIR_H
 
 #include <__compare/common_comparison_category.h>
 #include <__compare/synth_three_way.h>
@@ -20,25 +20,25 @@
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
+#if defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
 template <class, class>
 struct __non_trivially_copyable_base {
-  _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
   __non_trivially_copyable_base() _NOEXCEPT {}
-  _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
   __non_trivially_copyable_base(__non_trivially_copyable_base const&) _NOEXCEPT {}
 };
 #endif
 
 template <class _T1, class _T2>
-struct _LIBCPP_TEMPLATE_VIS pair
-#if defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
+struct _LIBCUDACXX_TEMPLATE_VIS pair
+#if defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
 : private __non_trivially_copyable_base<_T1, _T2>
 #endif
 {
@@ -48,25 +48,25 @@ struct _LIBCPP_TEMPLATE_VIS pair
     _T1 first;
     _T2 second;
 
-#if !defined(_LIBCPP_CXX03_LANG)
+#if !defined(_LIBCUDACXX_CXX03_LANG)
     pair(pair const&) = default;
     pair(pair&&) = default;
 #else
   // Use the implicitly declared copy constructor in C++03
 #endif
 
-#ifdef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifdef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair() : first(), second() {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair(_T1 const& __t1, _T2 const& __t2) : first(__t1), second(__t2) {}
 
     template <class _U1, class _U2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair& operator=(pair const& __p) {
         first = __p.first;
         second = __p.second;
@@ -105,7 +105,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
     };
 
     template <bool _MaybeEnable>
-    using _CheckArgsDep _LIBCPP_NODEBUG = typename conditional<
+    using _CheckArgsDep _LIBCUDACXX_NODEBUG = typename conditional<
       _MaybeEnable, _CheckArgs, __check_tuple_constructor_fail>::type;
 
     struct _CheckTupleLikeConstructor {
@@ -127,7 +127,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
     };
 
     template <class _Tuple>
-    using _CheckTLC _LIBCPP_NODEBUG = typename conditional<
+    using _CheckTLC _LIBCUDACXX_NODEBUG = typename conditional<
         __tuple_like_with_size<_Tuple, 2>::value
             && !is_same<typename decay<_Tuple>::type, pair>::value,
         _CheckTupleLikeConstructor,
@@ -137,7 +137,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
     template<bool _Dummy = true, typename enable_if<
             _CheckArgsDep<_Dummy>::__enable_explicit_default()
     >::type* = nullptr>
-    explicit _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    explicit _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     pair() _NOEXCEPT_(is_nothrow_default_constructible<first_type>::value &&
                       is_nothrow_default_constructible<second_type>::value)
         : first(), second() {}
@@ -145,7 +145,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
     template<bool _Dummy = true, typename enable_if<
             _CheckArgsDep<_Dummy>::__enable_implicit_default()
     >::type* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     pair() _NOEXCEPT_(is_nothrow_default_constructible<first_type>::value &&
                       is_nothrow_default_constructible<second_type>::value)
         : first(), second() {}
@@ -153,7 +153,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
     template <bool _Dummy = true, typename enable_if<
              _CheckArgsDep<_Dummy>::template __enable_explicit<_T1 const&, _T2 const&>()
     >::type* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit pair(_T1 const& __t1, _T2 const& __t2)
         _NOEXCEPT_(is_nothrow_copy_constructible<first_type>::value &&
                    is_nothrow_copy_constructible<second_type>::value)
@@ -162,44 +162,44 @@ struct _LIBCPP_TEMPLATE_VIS pair
     template<bool _Dummy = true, typename enable_if<
             _CheckArgsDep<_Dummy>::template __enable_implicit<_T1 const&, _T2 const&>()
     >::type* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     pair(_T1 const& __t1, _T2 const& __t2)
         _NOEXCEPT_(is_nothrow_copy_constructible<first_type>::value &&
                    is_nothrow_copy_constructible<second_type>::value)
         : first(__t1), second(__t2) {}
 
     template <
-#if _LIBCPP_STD_VER > 20 // http://wg21.link/P1951
+#if _LIBCUDACXX_STD_VER > 20 // http://wg21.link/P1951
         class _U1 = _T1, class _U2 = _T2,
 #else
         class _U1, class _U2,
 #endif
         typename enable_if<_CheckArgs::template __enable_explicit<_U1, _U2>()>::type* = nullptr
     >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit pair(_U1&& __u1, _U2&& __u2)
         _NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
                     is_nothrow_constructible<second_type, _U2>::value))
-        : first(_VSTD::forward<_U1>(__u1)), second(_VSTD::forward<_U2>(__u2)) {}
+        : first(_CUDA_VSTD::forward<_U1>(__u1)), second(_CUDA_VSTD::forward<_U2>(__u2)) {}
 
     template <
-#if _LIBCPP_STD_VER > 20 // http://wg21.link/P1951
+#if _LIBCUDACXX_STD_VER > 20 // http://wg21.link/P1951
         class _U1 = _T1, class _U2 = _T2,
 #else
         class _U1, class _U2,
 #endif
         typename enable_if<_CheckArgs::template __enable_implicit<_U1, _U2>()>::type* = nullptr
     >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     pair(_U1&& __u1, _U2&& __u2)
         _NOEXCEPT_((is_nothrow_constructible<first_type, _U1>::value &&
                     is_nothrow_constructible<second_type, _U2>::value))
-        : first(_VSTD::forward<_U1>(__u1)), second(_VSTD::forward<_U2>(__u2)) {}
+        : first(_CUDA_VSTD::forward<_U1>(__u1)), second(_CUDA_VSTD::forward<_U2>(__u2)) {}
 
     template<class _U1, class _U2, typename enable_if<
             _CheckArgs::template __enable_explicit<_U1 const&, _U2 const&>()
     >::type* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit pair(pair<_U1, _U2> const& __p)
         _NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const&>::value &&
                     is_nothrow_constructible<second_type, _U2 const&>::value))
@@ -208,7 +208,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
     template<class _U1, class _U2, typename enable_if<
             _CheckArgs::template __enable_implicit<_U1 const&, _U2 const&>()
     >::type* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     pair(pair<_U1, _U2> const& __p)
         _NOEXCEPT_((is_nothrow_constructible<first_type, _U1 const&>::value &&
                     is_nothrow_constructible<second_type, _U2 const&>::value))
@@ -217,39 +217,39 @@ struct _LIBCPP_TEMPLATE_VIS pair
     template<class _U1, class _U2, typename enable_if<
             _CheckArgs::template __enable_explicit<_U1, _U2>()
     >::type* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit pair(pair<_U1, _U2>&&__p)
         _NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
                     is_nothrow_constructible<second_type, _U2&&>::value))
-        : first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {}
+        : first(_CUDA_VSTD::forward<_U1>(__p.first)), second(_CUDA_VSTD::forward<_U2>(__p.second)) {}
 
     template<class _U1, class _U2, typename enable_if<
             _CheckArgs::template __enable_implicit<_U1, _U2>()
     >::type* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     pair(pair<_U1, _U2>&& __p)
         _NOEXCEPT_((is_nothrow_constructible<first_type, _U1&&>::value &&
                     is_nothrow_constructible<second_type, _U2&&>::value))
-        : first(_VSTD::forward<_U1>(__p.first)), second(_VSTD::forward<_U2>(__p.second)) {}
+        : first(_CUDA_VSTD::forward<_U1>(__p.first)), second(_CUDA_VSTD::forward<_U2>(__p.second)) {}
 
     template<class _Tuple, typename enable_if<
             _CheckTLC<_Tuple>::template __enable_explicit<_Tuple>()
     >::type* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit pair(_Tuple&& __p)
-        : first(_VSTD::get<0>(_VSTD::forward<_Tuple>(__p))),
-          second(_VSTD::get<1>(_VSTD::forward<_Tuple>(__p))) {}
+        : first(_CUDA_VSTD::get<0>(_CUDA_VSTD::forward<_Tuple>(__p))),
+          second(_CUDA_VSTD::get<1>(_CUDA_VSTD::forward<_Tuple>(__p))) {}
 
     template<class _Tuple, typename enable_if<
             _CheckTLC<_Tuple>::template __enable_implicit<_Tuple>()
     >::type* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     pair(_Tuple&& __p)
-        : first(_VSTD::get<0>(_VSTD::forward<_Tuple>(__p))),
-          second(_VSTD::get<1>(_VSTD::forward<_Tuple>(__p))) {}
+        : first(_CUDA_VSTD::get<0>(_CUDA_VSTD::forward<_Tuple>(__p))),
+          second(_CUDA_VSTD::get<1>(_CUDA_VSTD::forward<_Tuple>(__p))) {}
 
     template <class... _Args1, class... _Args2>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     pair(piecewise_construct_t __pc,
          tuple<_Args1...> __first_args, tuple<_Args2...> __second_args)
         _NOEXCEPT_((is_nothrow_constructible<first_type, _Args1...>::value &&
@@ -258,7 +258,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
                 typename __make_tuple_indices<sizeof...(_Args1)>::type(),
                 typename __make_tuple_indices<sizeof...(_Args2) >::type()) {}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     pair& operator=(typename conditional<
                         is_copy_assignable<first_type>::value &&
                         is_copy_assignable<second_type>::value,
@@ -271,7 +271,7 @@ struct _LIBCPP_TEMPLATE_VIS pair
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     pair& operator=(typename conditional<
                         is_move_assignable<first_type>::value &&
                         is_move_assignable<second_type>::value,
@@ -279,43 +279,43 @@ struct _LIBCPP_TEMPLATE_VIS pair
         _NOEXCEPT_(is_nothrow_move_assignable<first_type>::value &&
                    is_nothrow_move_assignable<second_type>::value)
     {
-        first = _VSTD::forward<first_type>(__p.first);
-        second = _VSTD::forward<second_type>(__p.second);
+        first = _CUDA_VSTD::forward<first_type>(__p.first);
+        second = _CUDA_VSTD::forward<second_type>(__p.second);
         return *this;
     }
 
     template <class _Tuple, typename enable_if<
             _CheckTLC<_Tuple>::template __enable_assign<_Tuple>()
      >::type* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     pair& operator=(_Tuple&& __p) {
-        first = _VSTD::get<0>(_VSTD::forward<_Tuple>(__p));
-        second = _VSTD::get<1>(_VSTD::forward<_Tuple>(__p));
+        first = _CUDA_VSTD::get<0>(_CUDA_VSTD::forward<_Tuple>(__p));
+        second = _CUDA_VSTD::get<1>(_CUDA_VSTD::forward<_Tuple>(__p));
         return *this;
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void
     swap(pair& __p) _NOEXCEPT_(__is_nothrow_swappable<first_type>::value &&
                                __is_nothrow_swappable<second_type>::value)
     {
-        using _VSTD::swap;
+        using _CUDA_VSTD::swap;
         swap(first,  __p.first);
         swap(second, __p.second);
     }
 private:
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class... _Args1, class... _Args2, size_t... _I1, size_t... _I2>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     pair(piecewise_construct_t,
          tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args,
          __tuple_indices<_I1...>, __tuple_indices<_I2...>);
 #endif
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template<class _T1, class _T2>
 pair(_T1, _T2) -> pair<_T1, _T2>;
 #endif
@@ -323,32 +323,32 @@ pair(_T1, _T2) -> pair<_T1, _T2>;
 // [pairs.spec], specialized algorithms
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator==(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
 {
     return __x.first == __y.first && __x.second == __y.second;
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _T1, class _T2>
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 common_comparison_category_t<
         __synth_three_way_result<_T1>,
         __synth_three_way_result<_T2> >
 operator<=>(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
 {
-    if (auto __c = _VSTD::__synth_three_way(__x.first, __y.first); __c != 0) {
+    if (auto __c = _CUDA_VSTD::__synth_three_way(__x.first, __y.first); __c != 0) {
       return __c;
     }
-    return _VSTD::__synth_three_way(__x.second, __y.second);
+    return _CUDA_VSTD::__synth_three_way(__x.second, __y.second);
 }
 
-#else // _LIBCPP_STD_VER > 17
+#else // _LIBCUDACXX_STD_VER > 17
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator!=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
 {
@@ -356,7 +356,7 @@ operator!=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
 }
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator< (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
 {
@@ -364,7 +364,7 @@ operator< (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
 }
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator> (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
 {
@@ -372,7 +372,7 @@ operator> (const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
 }
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator>=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
 {
@@ -380,16 +380,16 @@ operator>=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
 }
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator<=(const pair<_T1,_T2>& __x, const pair<_T1,_T2>& __y)
 {
     return !(__y < __x);
 }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 template <class _T1, class _T2, class _U1, class _U2, template<class> class _TQual, template<class> class _UQual>
     requires requires { typename pair<common_reference_t<_TQual<_T1>, _UQual<_U1>>,
                                       common_reference_t<_TQual<_T2>, _UQual<_U2>>>; }
@@ -403,10 +403,10 @@ template <class _T1, class _T2, class _U1, class _U2>
 struct common_type<pair<_T1, _T2>, pair<_U1, _U2>> {
     using type = pair<common_type_t<_T1, _U1>, common_type_t<_T2, _U2>>;
 };
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename enable_if
 <
     __is_swappable<_T1>::value &&
@@ -420,49 +420,49 @@ swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y)
     __x.swap(__y);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
 make_pair(_T1&& __t1, _T2&& __t2)
 {
     return pair<typename __unwrap_ref_decay<_T1>::type, typename __unwrap_ref_decay<_T2>::type>
-               (_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2));
+               (_CUDA_VSTD::forward<_T1>(__t1), _CUDA_VSTD::forward<_T2>(__t2));
 }
 
-#else  // _LIBCPP_CXX03_LANG
+#else  // _LIBCUDACXX_CXX03_LANG
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 pair<_T1,_T2>
 make_pair(_T1 __x, _T2 __y)
 {
     return pair<_T1, _T2>(__x, __y);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _T1, class _T2>
-  struct _LIBCPP_TEMPLATE_VIS tuple_size<pair<_T1, _T2> >
+  struct _LIBCUDACXX_TEMPLATE_VIS tuple_size<pair<_T1, _T2> >
     : public integral_constant<size_t, 2> {};
 
 template <size_t _Ip, class _T1, class _T2>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, pair<_T1, _T2> >
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_element<_Ip, pair<_T1, _T2> >
 {
     static_assert(_Ip < 2, "Index out of bounds in std::tuple_element<std::pair<T1, T2>>");
 };
 
 template <class _T1, class _T2>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<0, pair<_T1, _T2> >
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_element<0, pair<_T1, _T2> >
 {
-    typedef _LIBCPP_NODEBUG _T1 type;
+    typedef _LIBCUDACXX_NODEBUG _T1 type;
 };
 
 template <class _T1, class _T2>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<1, pair<_T1, _T2> >
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_element<1, pair<_T1, _T2> >
 {
-    typedef _LIBCPP_NODEBUG _T2 type;
+    typedef _LIBCUDACXX_NODEBUG _T2 type;
 };
 
 template <size_t _Ip> struct __get_pair;
@@ -472,29 +472,29 @@ struct __get_pair<0>
 {
     template <class _T1, class _T2>
     static
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     _T1&
     get(pair<_T1, _T2>& __p) _NOEXCEPT {return __p.first;}
 
     template <class _T1, class _T2>
     static
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const _T1&
     get(const pair<_T1, _T2>& __p) _NOEXCEPT {return __p.first;}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _T1, class _T2>
     static
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     _T1&&
-    get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<_T1>(__p.first);}
+    get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _CUDA_VSTD::forward<_T1>(__p.first);}
 
     template <class _T1, class _T2>
     static
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const _T1&&
-    get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<const _T1>(__p.first);}
-#endif // _LIBCPP_CXX03_LANG
+    get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return _CUDA_VSTD::forward<const _T1>(__p.first);}
+#endif // _LIBCUDACXX_CXX03_LANG
 };
 
 template <>
@@ -502,33 +502,33 @@ struct __get_pair<1>
 {
     template <class _T1, class _T2>
     static
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     _T2&
     get(pair<_T1, _T2>& __p) _NOEXCEPT {return __p.second;}
 
     template <class _T1, class _T2>
     static
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const _T2&
     get(const pair<_T1, _T2>& __p) _NOEXCEPT {return __p.second;}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _T1, class _T2>
     static
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     _T2&&
-    get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<_T2>(__p.second);}
+    get(pair<_T1, _T2>&& __p) _NOEXCEPT {return _CUDA_VSTD::forward<_T2>(__p.second);}
 
     template <class _T1, class _T2>
     static
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const _T2&&
-    get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return _VSTD::forward<const _T2>(__p.second);}
-#endif // _LIBCPP_CXX03_LANG
+    get(const pair<_T1, _T2>&& __p) _NOEXCEPT {return _CUDA_VSTD::forward<const _T2>(__p.second);}
+#endif // _LIBCUDACXX_CXX03_LANG
 };
 
 template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 typename tuple_element<_Ip, pair<_T1, _T2> >::type&
 get(pair<_T1, _T2>& __p) _NOEXCEPT
 {
@@ -536,90 +536,90 @@ get(pair<_T1, _T2>& __p) _NOEXCEPT
 }
 
 template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&
 get(const pair<_T1, _T2>& __p) _NOEXCEPT
 {
     return __get_pair<_Ip>::get(__p);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
 get(pair<_T1, _T2>&& __p) _NOEXCEPT
 {
-    return __get_pair<_Ip>::get(_VSTD::move(__p));
+    return __get_pair<_Ip>::get(_CUDA_VSTD::move(__p));
 }
 
 template <size_t _Ip, class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const typename tuple_element<_Ip, pair<_T1, _T2> >::type&&
 get(const pair<_T1, _T2>&& __p) _NOEXCEPT
 {
-    return __get_pair<_Ip>::get(_VSTD::move(__p));
+    return __get_pair<_Ip>::get(_CUDA_VSTD::move(__p));
 }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1 & get(pair<_T1, _T2>& __p) _NOEXCEPT
 {
     return __get_pair<0>::get(__p);
 }
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1 const & get(pair<_T1, _T2> const& __p) _NOEXCEPT
 {
     return __get_pair<0>::get(__p);
 }
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1 && get(pair<_T1, _T2>&& __p) _NOEXCEPT
 {
-    return __get_pair<0>::get(_VSTD::move(__p));
+    return __get_pair<0>::get(_CUDA_VSTD::move(__p));
 }
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1 const && get(pair<_T1, _T2> const&& __p) _NOEXCEPT
 {
-    return __get_pair<0>::get(_VSTD::move(__p));
+    return __get_pair<0>::get(_CUDA_VSTD::move(__p));
 }
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1 & get(pair<_T2, _T1>& __p) _NOEXCEPT
 {
     return __get_pair<1>::get(__p);
 }
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1 const & get(pair<_T2, _T1> const& __p) _NOEXCEPT
 {
     return __get_pair<1>::get(__p);
 }
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1 && get(pair<_T2, _T1>&& __p) _NOEXCEPT
 {
-    return __get_pair<1>::get(_VSTD::move(__p));
+    return __get_pair<1>::get(_CUDA_VSTD::move(__p));
 }
 
 template <class _T1, class _T2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1 const && get(pair<_T2, _T1> const&& __p) _NOEXCEPT
 {
-    return __get_pair<1>::get(_VSTD::move(__p));
+    return __get_pair<1>::get(_CUDA_VSTD::move(__p));
 }
 
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_PAIR_H
+#endif // _LIBCUDACXX___UTILITY_PAIR_H

diff  --git a/libcxx/include/__utility/piecewise_construct.h b/libcxx/include/__utility/piecewise_construct.h
index 3cc86fef2a0f..b8b861032594 100644
--- a/libcxx/include/__utility/piecewise_construct.h
+++ b/libcxx/include/__utility/piecewise_construct.h
@@ -6,24 +6,24 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_PIECEWISE_CONSTRUCT_H
-#define _LIBCPP___UTILITY_PIECEWISE_CONSTRUCT_H
+#ifndef _LIBCUDACXX___UTILITY_PIECEWISE_CONSTRUCT_H
+#define _LIBCUDACXX___UTILITY_PIECEWISE_CONSTRUCT_H
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-struct _LIBCPP_TEMPLATE_VIS piecewise_construct_t { explicit piecewise_construct_t() = default; };
-#if defined(_LIBCPP_CXX03_LANG) || defined(_LIBCPP_BUILDING_LIBRARY)
-extern _LIBCPP_EXPORTED_FROM_ABI const piecewise_construct_t piecewise_construct;// = piecewise_construct_t();
+struct _LIBCUDACXX_TEMPLATE_VIS piecewise_construct_t { explicit piecewise_construct_t() = default; };
+#if defined(_LIBCUDACXX_CXX03_LANG) || defined(_LIBCUDACXX_BUILDING_LIBRARY)
+extern _LIBCUDACXX_EXPORTED_FROM_ABI const piecewise_construct_t piecewise_construct;// = piecewise_construct_t();
 #else
 /* inline */ constexpr piecewise_construct_t piecewise_construct = piecewise_construct_t();
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_PIECEWISE_CONSTRUCT_H
+#endif // _LIBCUDACXX___UTILITY_PIECEWISE_CONSTRUCT_H

diff  --git a/libcxx/include/__utility/priority_tag.h b/libcxx/include/__utility/priority_tag.h
index e51ba6bfcc05..1eab017ba7f6 100644
--- a/libcxx/include/__utility/priority_tag.h
+++ b/libcxx/include/__utility/priority_tag.h
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_PRIORITY_TAG_H
-#define _LIBCPP___UTILITY_PRIORITY_TAG_H
+#ifndef _LIBCUDACXX___UTILITY_PRIORITY_TAG_H
+#define _LIBCUDACXX___UTILITY_PRIORITY_TAG_H
 
 #include <__config>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<size_t _Ip> struct __priority_tag : __priority_tag<_Ip - 1> {};
 template<> struct __priority_tag<0> {};
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_PRIORITY_TAG_H
+#endif // _LIBCUDACXX___UTILITY_PRIORITY_TAG_H

diff  --git a/libcxx/include/__utility/rel_ops.h b/libcxx/include/__utility/rel_ops.h
index 2577e94e91f6..e71705de7ba5 100644
--- a/libcxx/include/__utility/rel_ops.h
+++ b/libcxx/include/__utility/rel_ops.h
@@ -6,25 +6,25 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_REL_OPS_H
-#define _LIBCPP___UTILITY_REL_OPS_H
+#ifndef _LIBCUDACXX___UTILITY_REL_OPS_H
+#define _LIBCUDACXX___UTILITY_REL_OPS_H
 
 #include <__config>
 #include <__utility/forward.h>
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace rel_ops
 {
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const _Tp& __x, const _Tp& __y)
 {
@@ -32,7 +32,7 @@ operator!=(const _Tp& __x, const _Tp& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator> (const _Tp& __x, const _Tp& __y)
 {
@@ -40,7 +40,7 @@ operator> (const _Tp& __x, const _Tp& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const _Tp& __x, const _Tp& __y)
 {
@@ -48,7 +48,7 @@ operator<=(const _Tp& __x, const _Tp& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const _Tp& __x, const _Tp& __y)
 {
@@ -57,6 +57,6 @@ operator>=(const _Tp& __x, const _Tp& __y)
 
 } // namespace rel_ops
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_REL_OPS_H
+#endif // _LIBCUDACXX___UTILITY_REL_OPS_H

diff  --git a/libcxx/include/__utility/swap.h b/libcxx/include/__utility/swap.h
index f9e7f36678ba..bd17b4c192a2 100644
--- a/libcxx/include/__utility/swap.h
+++ b/libcxx/include/__utility/swap.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_SWAP_H
-#define _LIBCPP___UTILITY_SWAP_H
+#ifndef _LIBCUDACXX___UTILITY_SWAP_H
+#define _LIBCUDACXX___UTILITY_SWAP_H
 
 #include <__config>
 #include <__utility/declval.h>
@@ -15,13 +15,13 @@
 #include <cstddef>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Tp>
 using __swap_result_t = typename enable_if<is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value>::type;
 #else
@@ -30,21 +30,21 @@ using __swap_result_t = void;
 #endif
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY __swap_result_t<_Tp> _LIBCPP_CONSTEXPR_AFTER_CXX17 swap(_Tp& __x, _Tp& __y)
+inline _LIBCUDACXX_INLINE_VISIBILITY __swap_result_t<_Tp> _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 swap(_Tp& __x, _Tp& __y)
     _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value&& is_nothrow_move_assignable<_Tp>::value) {
-  _Tp __t(_VSTD::move(__x));
-  __x = _VSTD::move(__y);
-  __y = _VSTD::move(__t);
+  _Tp __t(_CUDA_VSTD::move(__x));
+  __x = _CUDA_VSTD::move(__y);
+  __y = _CUDA_VSTD::move(__t);
 }
 
 template <class _Tp, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if<__is_swappable<_Tp>::value>::type
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 typename enable_if<__is_swappable<_Tp>::value>::type
 swap(_Tp (&__a)[_Np], _Tp (&__b)[_Np]) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) {
   for (size_t __i = 0; __i != _Np; ++__i) {
     swap(__a[__i], __b[__i]);
   }
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_SWAP_H
+#endif // _LIBCUDACXX___UTILITY_SWAP_H

diff  --git a/libcxx/include/__utility/to_underlying.h b/libcxx/include/__utility/to_underlying.h
index 3428406e8d3a..669c1662c9f7 100644
--- a/libcxx/include/__utility/to_underlying.h
+++ b/libcxx/include/__utility/to_underlying.h
@@ -7,34 +7,34 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_TO_UNDERLYING_H
-#define _LIBCPP___UTILITY_TO_UNDERLYING_H
+#ifndef _LIBCUDACXX___UTILITY_TO_UNDERLYING_H
+#define _LIBCUDACXX___UTILITY_TO_UNDERLYING_H
 
 #include <__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr typename underlying_type<_Tp>::type
+_LIBCUDACXX_INLINE_VISIBILITY constexpr typename underlying_type<_Tp>::type
 __to_underlying(_Tp __val) noexcept {
   return static_cast<typename underlying_type<_Tp>::type>(__val);
 }
-#endif // !_LIBCPP_CXX03_LANG
+#endif // !_LIBCUDACXX_CXX03_LANG
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 template <class _Tp>
-_LIBCPP_NODISCARD_EXT _LIBCPP_INLINE_VISIBILITY constexpr underlying_type_t<_Tp>
+_LIBCUDACXX_NODISCARD_EXT _LIBCUDACXX_INLINE_VISIBILITY constexpr underlying_type_t<_Tp>
 to_underlying(_Tp __val) noexcept {
-  return _VSTD::__to_underlying(__val);
+  return _CUDA_VSTD::__to_underlying(__val);
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_TO_UNDERLYING_H
+#endif // _LIBCUDACXX___UTILITY_TO_UNDERLYING_H

diff  --git a/libcxx/include/__utility/transaction.h b/libcxx/include/__utility/transaction.h
index e2cc43820845..c0fb02cb69d9 100644
--- a/libcxx/include/__utility/transaction.h
+++ b/libcxx/include/__utility/transaction.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_TRANSACTION_H
-#define _LIBCPP___UTILITY_TRANSACTION_H
+#ifndef _LIBCUDACXX___UTILITY_TRANSACTION_H
+#define _LIBCUDACXX___UTILITY_TRANSACTION_H
 
 #include <__config>
 #include <__utility/exchange.h>
 #include <__utility/move.h>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // __transaction is a helper class for writing code with the strong exception guarantee.
 //
@@ -31,7 +31,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 // they can be moved around for convenience.
 //
 // __transaction can help greatly simplify code that would normally be cluttered by
-// `#if _LIBCPP_NO_EXCEPTIONS`. For example:
+// `#if _LIBCUDACXX_NO_EXCEPTIONS`. For example:
 //
 //    template <class Iterator, class Size, class OutputIterator>
 //    Iterator uninitialized_copy_n(Iterator iter, Size n, OutputIterator out) {
@@ -51,16 +51,16 @@ template <class _Rollback>
 struct __transaction {
     __transaction() = delete;
 
-    _LIBCPP_HIDE_FROM_ABI
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit __transaction(_Rollback __rollback)
-        : __rollback_(_VSTD::move(__rollback))
+    _LIBCUDACXX_HIDE_FROM_ABI
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit __transaction(_Rollback __rollback)
+        : __rollback_(_CUDA_VSTD::move(__rollback))
         , __completed_(false)
     { }
 
-    _LIBCPP_HIDE_FROM_ABI
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __transaction(__transaction&& __other)
+    _LIBCUDACXX_HIDE_FROM_ABI
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __transaction(__transaction&& __other)
         _NOEXCEPT_(is_nothrow_move_constructible<_Rollback>::value)
-        : __rollback_(_VSTD::move(__other.__rollback_))
+        : __rollback_(_CUDA_VSTD::move(__other.__rollback_))
         , __completed_(__other.__completed_)
     {
         __other.__completed_ = true;
@@ -70,13 +70,13 @@ struct __transaction {
     __transaction& operator=(__transaction const&) = delete;
     __transaction& operator=(__transaction&&) = delete;
 
-    _LIBCPP_HIDE_FROM_ABI
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __complete() _NOEXCEPT {
+    _LIBCUDACXX_HIDE_FROM_ABI
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __complete() _NOEXCEPT {
         __completed_ = true;
     }
 
-    _LIBCPP_HIDE_FROM_ABI
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 ~__transaction() {
+    _LIBCUDACXX_HIDE_FROM_ABI
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 ~__transaction() {
         if (!__completed_)
             __rollback_();
     }
@@ -87,10 +87,10 @@ struct __transaction {
 };
 
 template <class _Rollback>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR __transaction<_Rollback> __make_transaction(_Rollback __rollback) {
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR __transaction<_Rollback> __make_transaction(_Rollback __rollback) {
   return __transaction<_Rollback>(std::move(__rollback));
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___UTILITY_TRANSACTION_H
+#endif // _LIBCUDACXX___UTILITY_TRANSACTION_H

diff  --git a/libcxx/include/__utility/unreachable.h b/libcxx/include/__utility/unreachable.h
index 485edb227c92..666a358e5d26 100644
--- a/libcxx/include/__utility/unreachable.h
+++ b/libcxx/include/__utility/unreachable.h
@@ -6,19 +6,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___UTILITY_UNREACHABLE_H
-#define _LIBCPP___UTILITY_UNREACHABLE_H
+#ifndef _LIBCUDACXX___UTILITY_UNREACHABLE_H
+#define _LIBCUDACXX___UTILITY_UNREACHABLE_H
 
 #include <__config>
 #include <cstdlib>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI inline void __libcpp_unreachable()
+_LIBCUDACXX_NORETURN _LIBCUDACXX_HIDE_FROM_ABI inline void __LIBCUDACXX_unreachable()
 {
 #if __has_builtin(__builtin_unreachable)
   __builtin_unreachable();
@@ -27,12 +27,12 @@ _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI inline void __libcpp_unreachable()
 #endif
 }
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 
-[[noreturn]] _LIBCPP_HIDE_FROM_ABI inline void unreachable() { __libcpp_unreachable(); }
+[[noreturn]] _LIBCUDACXX_HIDE_FROM_ABI inline void unreachable() { __LIBCUDACXX_unreachable(); }
 
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 #endif

diff  --git a/libcxx/include/__variant/monostate.h b/libcxx/include/__variant/monostate.h
index b389c3b56b36..6c1b871241fe 100644
--- a/libcxx/include/__variant/monostate.h
+++ b/libcxx/include/__variant/monostate.h
@@ -7,54 +7,54 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___VARIANT_MONOSTATE_H
-#define _LIBCPP___VARIANT_MONOSTATE_H
+#ifndef _LIBCUDACXX___VARIANT_MONOSTATE_H
+#define _LIBCUDACXX___VARIANT_MONOSTATE_H
 
 #include <__config>
 #include <__functional/hash.h>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
-struct _LIBCPP_TEMPLATE_VIS monostate {};
+struct _LIBCUDACXX_TEMPLATE_VIS monostate {};
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator<(monostate, monostate) noexcept { return false; }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator>(monostate, monostate) noexcept { return false; }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator<=(monostate, monostate) noexcept { return true; }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator>=(monostate, monostate) noexcept { return true; }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator==(monostate, monostate) noexcept { return true; }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator!=(monostate, monostate) noexcept { return false; }
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<monostate> {
+struct _LIBCUDACXX_TEMPLATE_VIS hash<monostate> {
   using argument_type = monostate;
   using result_type = size_t;
 
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   result_type operator()(const argument_type&) const _NOEXCEPT {
     return 66740831; // return a fundamentally attractive random value.
   }
 };
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___VARIANT_MONOSTATE_H
+#endif // _LIBCUDACXX___VARIANT_MONOSTATE_H

diff  --git a/libcxx/include/__verbose_abort b/libcxx/include/__verbose_abort
index 3c9cba824ce0..cb0daccd4768 100644
--- a/libcxx/include/__verbose_abort
+++ b/libcxx/include/__verbose_abort
@@ -7,45 +7,45 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP___VERBOSE_ABORT
-#define _LIBCPP___VERBOSE_ABORT
+#ifndef _LIBCUDACXX___VERBOSE_ABORT
+#define _LIBCUDACXX___VERBOSE_ABORT
 
 #include <__availability>
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-// Provide a default implementation of __libcpp_verbose_abort if we know that neither the built
+// Provide a default implementation of __LIBCUDACXX_verbose_abort if we know that neither the built
 // library not the user is providing one. Otherwise, just declare it and use the one from the
 // built library or the one provided by the user.
 //
 // We can't provide a great implementation because it needs to be pretty much
 // dependency-free (this is included everywhere else in the library).
-#if defined(_LIBCPP_HAS_NO_VERBOSE_ABORT_IN_LIBRARY) && !defined(_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED)
+#if defined(_LIBCUDACXX_HAS_NO_VERBOSE_ABORT_IN_LIBRARY) && !defined(_LIBCUDACXX_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED)
 
 extern "C" void abort();
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_NORETURN _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 2) _LIBCPP_HIDE_FROM_ABI inline
-void __libcpp_verbose_abort(const char *, ...) {
+_LIBCUDACXX_NORETURN _LIBCUDACXX_ATTRIBUTE_FORMAT(__printf__, 1, 2) _LIBCUDACXX_HIDE_FROM_ABI inline
+void __LIBCUDACXX_verbose_abort(const char *, ...) {
   ::abort();
   __builtin_unreachable(); // never reached, but needed to tell the compiler that the function never returns
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 #else
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_NORETURN _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 2)
-void __libcpp_verbose_abort(const char *__format, ...);
+_LIBCUDACXX_NORETURN _LIBCUDACXX_OVERRIDABLE_FUNC_VIS _LIBCUDACXX_ATTRIBUTE_FORMAT(__printf__, 1, 2)
+void __LIBCUDACXX_verbose_abort(const char *__format, ...);
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 #endif
 
-#endif // _LIBCPP___VERBOSE_ABORT
+#endif // _LIBCUDACXX___VERBOSE_ABORT

diff  --git a/libcxx/include/algorithm b/libcxx/include/algorithm
index 69ada038747c..d9c3be8ab084 100644
--- a/libcxx/include/algorithm
+++ b/libcxx/include/algorithm
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_ALGORITHM
-#define _LIBCPP_ALGORITHM
+#ifndef _LIBCUDACXX_ALGORITHM
+#define _LIBCUDACXX_ALGORITHM
 
 /*
     algorithm synopsis
@@ -1899,7 +1899,7 @@ template <class BidirectionalIterator, class Compare>
 #include <__algorithm/unwrap_iter.h>
 #include <__algorithm/upper_bound.h>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <chrono>
 #  include <iterator>
 #  include <utility>
@@ -1908,12 +1908,12 @@ template <class BidirectionalIterator, class Compare>
 // standard-mandated includes
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
+#if defined(_LIBCUDACXX_HAS_PARALLEL_ALGORITHMS) && _LIBCUDACXX_STD_VER >= 17
 #   include <__pstl_algorithm>
 #endif
 
-#endif // _LIBCPP_ALGORITHM
+#endif // _LIBCUDACXX_ALGORITHM

diff  --git a/libcxx/include/any b/libcxx/include/any
index 66f7488e5441..2280d0d748b4 100644
--- a/libcxx/include/any
+++ b/libcxx/include/any
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_ANY
-#define _LIBCPP_ANY
+#ifndef _LIBCUDACXX_ANY
+#define _LIBCUDACXX_ANY
 
 /*
    any synopsis
@@ -94,47 +94,47 @@ namespace std {
 #include <typeinfo>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <chrono>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 namespace std {
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
+class _LIBCUDACXX_EXCEPTION_ABI _LIBCUDACXX_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
 {
 public:
     virtual const char* what() const _NOEXCEPT;
 };
 } // namespace std
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST
 void __throw_bad_any_cast()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw bad_any_cast();
 #else
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
 // Forward declarations
-class _LIBCPP_TEMPLATE_VIS any;
+class _LIBCUDACXX_TEMPLATE_VIS any;
 
 template <class _ValueType>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 add_pointer_t<add_const_t<_ValueType>>
 any_cast(any const *) _NOEXCEPT;
 
 template <class _ValueType>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 add_pointer_t<_ValueType> any_cast(any *) _NOEXCEPT;
 
 namespace __any_imp
@@ -161,20 +161,20 @@ namespace __any_imp
   template <class _Tp> struct _LargeHandler;
 
   template <class _Tp>
-  struct  _LIBCPP_TEMPLATE_VIS __unique_typeinfo { static constexpr int __id = 0; };
+  struct  _LIBCUDACXX_TEMPLATE_VIS __unique_typeinfo { static constexpr int __id = 0; };
   template <class _Tp> constexpr int __unique_typeinfo<_Tp>::__id;
 
   template <class _Tp>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   constexpr const void* __get_fallback_typeid() {
       return &__unique_typeinfo<remove_cv_t<remove_reference_t<_Tp>>>::__id;
   }
 
   template <class _Tp>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   bool __compare_typeid(type_info const* __id, const void* __fallback_id)
   {
-#if !defined(_LIBCPP_NO_RTTI)
+#if !defined(_LIBCUDACXX_NO_RTTI)
       if (__id && *__id == typeid(_Tp))
           return true;
 #endif
@@ -189,20 +189,20 @@ namespace __any_imp
 
 } // namespace __any_imp
 
-class _LIBCPP_TEMPLATE_VIS any
+class _LIBCUDACXX_TEMPLATE_VIS any
 {
 public:
   // construct/destruct
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   constexpr any() _NOEXCEPT : __h(nullptr) {}
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   any(any const & __other) : __h(nullptr)
   {
     if (__other.__h) __other.__call(_Action::_Copy, this);
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   any(any && __other) _NOEXCEPT : __h(nullptr)
   {
     if (__other.__h) __other.__call(_Action::_Move, this);
@@ -216,7 +216,7 @@ public:
         !__is_inplace_type<_ValueType>::value &&
         is_copy_constructible<_Tp>::value>
     >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   any(_ValueType && __value);
 
   template <class _ValueType, class ..._Args,
@@ -226,7 +226,7 @@ public:
         is_copy_constructible<_Tp>::value
     >
   >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   explicit any(in_place_type_t<_ValueType>, _Args&&... __args);
 
   template <class _ValueType, class _Up, class ..._Args,
@@ -235,22 +235,22 @@ public:
         is_constructible<_Tp, initializer_list<_Up>&, _Args...>::value &&
         is_copy_constructible<_Tp>::value>
   >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   explicit any(in_place_type_t<_ValueType>, initializer_list<_Up>, _Args&&... __args);
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   ~any() { this->reset(); }
 
   // assignments
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   any & operator=(any const & __rhs) {
     any(__rhs).swap(*this);
     return *this;
   }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   any & operator=(any && __rhs) _NOEXCEPT {
-    any(_VSTD::move(__rhs)).swap(*this);
+    any(_CUDA_VSTD::move(__rhs)).swap(*this);
     return *this;
   }
 
@@ -261,7 +261,7 @@ public:
           !is_same<_Tp, any>::value
           && is_copy_constructible<_Tp>::value>
     >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   any & operator=(_ValueType && __rhs);
 
   template <class _ValueType, class ..._Args,
@@ -270,7 +270,7 @@ public:
         is_constructible<_Tp, _Args...>::value &&
         is_copy_constructible<_Tp>::value>
     >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   _Tp& emplace(_Args&&...);
 
   template <class _ValueType, class _Up, class ..._Args,
@@ -279,22 +279,22 @@ public:
         is_constructible<_Tp, initializer_list<_Up>&, _Args...>::value &&
         is_copy_constructible<_Tp>::value>
   >
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   _Tp& emplace(initializer_list<_Up>, _Args&&...);
 
   // 6.3.3 any modifiers
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void reset() _NOEXCEPT { if (__h) this->__call(_Action::_Destroy); }
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void swap(any & __rhs) _NOEXCEPT;
 
   // 6.3.4 any observers
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool has_value() const _NOEXCEPT { return __h != nullptr; }
 
-#if !defined(_LIBCPP_NO_RTTI)
-  _LIBCPP_INLINE_VISIBILITY
+#if !defined(_LIBCUDACXX_NO_RTTI)
+  _LIBCUDACXX_INLINE_VISIBILITY
   const type_info & type() const _NOEXCEPT {
     if (__h) {
         return *static_cast<type_info const *>(this->__call(_Action::_TypeInfo));
@@ -315,7 +315,7 @@ private:
         __any_imp::_Buffer __buf;
     };
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void * __call(_Action __a, any * __other = nullptr,
                   type_info const * __info = nullptr,
                    const void* __fallback_info = nullptr) const
@@ -323,7 +323,7 @@ private:
         return __h(__a, this, __other, __info, __fallback_info);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void * __call(_Action __a, any * __other = nullptr,
                   type_info const * __info = nullptr,
                   const void* __fallback_info = nullptr)
@@ -351,9 +351,9 @@ private:
 namespace __any_imp
 {
   template <class _Tp>
-  struct _LIBCPP_TEMPLATE_VIS _SmallHandler
+  struct _LIBCUDACXX_TEMPLATE_VIS _SmallHandler
   {
-     _LIBCPP_INLINE_VISIBILITY
+     _LIBCUDACXX_INLINE_VISIBILITY
      static void* __handle(_Action __act, any const * __this, any * __other,
                            type_info const * __info, const void* __fallback_info)
      {
@@ -373,23 +373,23 @@ namespace __any_imp
         case _Action::_TypeInfo:
           return __type_info();
         }
-        __libcpp_unreachable();
+        __LIBCUDACXX_unreachable();
     }
 
     template <class ..._Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static _Tp& __create(any & __dest, _Args&&... __args) {
         typedef allocator<_Tp> _Alloc;
         typedef allocator_traits<_Alloc> _ATraits;
         _Alloc __a;
         _Tp * __ret = static_cast<_Tp*>(static_cast<void*>(&__dest.__s.__buf));
-        _ATraits::construct(__a, __ret, _VSTD::forward<_Args>(__args)...);
+        _ATraits::construct(__a, __ret, _CUDA_VSTD::forward<_Args>(__args)...);
         __dest.__h = &_SmallHandler::__handle;
         return *__ret;
     }
 
   private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void __destroy(any & __this) {
         typedef allocator<_Tp> _Alloc;
         typedef allocator_traits<_Alloc> _ATraits;
@@ -399,20 +399,20 @@ namespace __any_imp
         __this.__h = nullptr;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void __copy(any const & __this, any & __dest) {
         _SmallHandler::__create(__dest, *static_cast<_Tp const *>(
             static_cast<void const *>(&__this.__s.__buf)));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void __move(any & __this, any & __dest) {
-        _SmallHandler::__create(__dest, _VSTD::move(
+        _SmallHandler::__create(__dest, _CUDA_VSTD::move(
             *static_cast<_Tp*>(static_cast<void*>(&__this.__s.__buf))));
         __destroy(__this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void* __get(any & __this,
                        type_info const * __info,
                        const void* __fallback_id)
@@ -422,10 +422,10 @@ namespace __any_imp
         return nullptr;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void* __type_info()
     {
-#if !defined(_LIBCPP_NO_RTTI)
+#if !defined(_LIBCUDACXX_NO_RTTI)
         return const_cast<void*>(static_cast<void const *>(&typeid(_Tp)));
 #else
         return nullptr;
@@ -434,9 +434,9 @@ namespace __any_imp
   };
 
   template <class _Tp>
-  struct _LIBCPP_TEMPLATE_VIS _LargeHandler
+  struct _LIBCUDACXX_TEMPLATE_VIS _LargeHandler
   {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void* __handle(_Action __act, any const * __this,
                           any * __other, type_info const * __info,
                           void const* __fallback_info)
@@ -457,11 +457,11 @@ namespace __any_imp
         case _Action::_TypeInfo:
           return __type_info();
         }
-        __libcpp_unreachable();
+        __LIBCUDACXX_unreachable();
     }
 
     template <class ..._Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static _Tp& __create(any & __dest, _Args&&... __args) {
         typedef allocator<_Tp> _Alloc;
         typedef allocator_traits<_Alloc> _ATraits;
@@ -469,7 +469,7 @@ namespace __any_imp
         _Alloc __a;
         unique_ptr<_Tp, _Dp> __hold(_ATraits::allocate(__a, 1), _Dp(__a, 1));
         _Tp * __ret = __hold.get();
-        _ATraits::construct(__a, __ret, _VSTD::forward<_Args>(__args)...);
+        _ATraits::construct(__a, __ret, _CUDA_VSTD::forward<_Args>(__args)...);
         __dest.__s.__ptr = __hold.release();
         __dest.__h = &_LargeHandler::__handle;
         return *__ret;
@@ -477,7 +477,7 @@ namespace __any_imp
 
   private:
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void __destroy(any & __this){
         typedef allocator<_Tp> _Alloc;
         typedef allocator_traits<_Alloc> _ATraits;
@@ -488,19 +488,19 @@ namespace __any_imp
         __this.__h = nullptr;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void __copy(any const & __this, any & __dest) {
         _LargeHandler::__create(__dest, *static_cast<_Tp const *>(__this.__s.__ptr));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void __move(any & __this, any & __dest) {
       __dest.__s.__ptr = __this.__s.__ptr;
       __dest.__h = &_LargeHandler::__handle;
       __this.__h = nullptr;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void* __get(any & __this, type_info const * __info,
                        void const* __fallback_info)
     {
@@ -510,10 +510,10 @@ namespace __any_imp
 
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void* __type_info()
     {
-#if !defined(_LIBCPP_NO_RTTI)
+#if !defined(_LIBCUDACXX_NO_RTTI)
         return const_cast<void*>(static_cast<void const *>(&typeid(_Tp)));
 #else
         return nullptr;
@@ -527,42 +527,42 @@ namespace __any_imp
 template <class _ValueType, class _Tp, class>
 any::any(_ValueType && __v) : __h(nullptr)
 {
-  __any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_ValueType>(__v));
+  __any_imp::_Handler<_Tp>::__create(*this, _CUDA_VSTD::forward<_ValueType>(__v));
 }
 
 template <class _ValueType, class ..._Args, class _Tp, class>
 any::any(in_place_type_t<_ValueType>, _Args&&... __args) {
-  __any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_Args>(__args)...);
+  __any_imp::_Handler<_Tp>::__create(*this, _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 template <class _ValueType, class _Up, class ..._Args, class _Tp, class>
 any::any(in_place_type_t<_ValueType>, initializer_list<_Up> __il, _Args&&... __args) {
-  __any_imp::_Handler<_Tp>::__create(*this, __il, _VSTD::forward<_Args>(__args)...);
+  __any_imp::_Handler<_Tp>::__create(*this, __il, _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 template <class _ValueType, class, class>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 any & any::operator=(_ValueType && __v)
 {
-  any(_VSTD::forward<_ValueType>(__v)).swap(*this);
+  any(_CUDA_VSTD::forward<_ValueType>(__v)).swap(*this);
   return *this;
 }
 
 template <class _ValueType, class ..._Args, class _Tp, class>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _Tp& any::emplace(_Args&&... __args) {
   reset();
-  return __any_imp::_Handler<_Tp>::__create(*this, _VSTD::forward<_Args>(__args)...);
+  return __any_imp::_Handler<_Tp>::__create(*this, _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 template <class _ValueType, class _Up, class ..._Args, class _Tp, class>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _Tp& any::emplace(initializer_list<_Up> __il, _Args&&... __args) {
   reset();
-  return __any_imp::_Handler<_Tp>::__create(*this, __il, _VSTD::forward<_Args>(__args)...);
+  return __any_imp::_Handler<_Tp>::__create(*this, __il, _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void any::swap(any & __rhs) _NOEXCEPT
 {
     if (this == &__rhs)
@@ -583,93 +583,93 @@ void any::swap(any & __rhs) _NOEXCEPT
 
 // 6.4 Non-member functions
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void swap(any & __lhs, any & __rhs) _NOEXCEPT
 {
     __lhs.swap(__rhs);
 }
 
 template <class _Tp, class ..._Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 any make_any(_Args&&... __args) {
-    return any(in_place_type<_Tp>, _VSTD::forward<_Args>(__args)...);
+    return any(in_place_type<_Tp>, _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 template <class _Tp, class _Up, class ..._Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 any make_any(initializer_list<_Up> __il, _Args&&... __args) {
-    return any(in_place_type<_Tp>, __il, _VSTD::forward<_Args>(__args)...);
+    return any(in_place_type<_Tp>, __il, _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST
 _ValueType any_cast(any const & __v)
 {
     using _RawValueType = __uncvref_t<_ValueType>;
     static_assert(is_constructible<_ValueType, _RawValueType const &>::value,
                   "ValueType is required to be a const lvalue reference "
                   "or a CopyConstructible type");
-    auto __tmp = _VSTD::any_cast<add_const_t<_RawValueType>>(&__v);
+    auto __tmp = _CUDA_VSTD::any_cast<add_const_t<_RawValueType>>(&__v);
     if (__tmp == nullptr)
         __throw_bad_any_cast();
     return static_cast<_ValueType>(*__tmp);
 }
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST
 _ValueType any_cast(any & __v)
 {
     using _RawValueType = __uncvref_t<_ValueType>;
     static_assert(is_constructible<_ValueType, _RawValueType &>::value,
                   "ValueType is required to be an lvalue reference "
                   "or a CopyConstructible type");
-    auto __tmp = _VSTD::any_cast<_RawValueType>(&__v);
+    auto __tmp = _CUDA_VSTD::any_cast<_RawValueType>(&__v);
     if (__tmp == nullptr)
         __throw_bad_any_cast();
     return static_cast<_ValueType>(*__tmp);
 }
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST
 _ValueType any_cast(any && __v)
 {
     using _RawValueType = __uncvref_t<_ValueType>;
     static_assert(is_constructible<_ValueType, _RawValueType>::value,
                   "ValueType is required to be an rvalue reference "
                   "or a CopyConstructible type");
-    auto __tmp = _VSTD::any_cast<_RawValueType>(&__v);
+    auto __tmp = _CUDA_VSTD::any_cast<_RawValueType>(&__v);
     if (__tmp == nullptr)
         __throw_bad_any_cast();
-    return static_cast<_ValueType>(_VSTD::move(*__tmp));
+    return static_cast<_ValueType>(_CUDA_VSTD::move(*__tmp));
 }
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 add_pointer_t<add_const_t<_ValueType>>
 any_cast(any const * __any) _NOEXCEPT
 {
     static_assert(!is_reference<_ValueType>::value,
                   "_ValueType may not be a reference.");
-    return _VSTD::any_cast<_ValueType>(const_cast<any *>(__any));
+    return _CUDA_VSTD::any_cast<_ValueType>(const_cast<any *>(__any));
 }
 
 template <class _RetType>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _RetType __pointer_or_func_cast(void* __p, /*IsFunction*/false_type) noexcept {
   return static_cast<_RetType>(__p);
 }
 
 template <class _RetType>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _RetType __pointer_or_func_cast(void*, /*IsFunction*/true_type) noexcept {
   return nullptr;
 }
 
 template <class _ValueType>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 add_pointer_t<_ValueType>
 any_cast(any * __any) _NOEXCEPT
 {
@@ -679,20 +679,20 @@ any_cast(any * __any) _NOEXCEPT
     typedef typename add_pointer<_ValueType>::type _ReturnType;
     if (__any && __any->__h) {
       void *__p = __any->__call(_Action::_Get, nullptr,
-#if !defined(_LIBCPP_NO_RTTI)
+#if !defined(_LIBCUDACXX_NO_RTTI)
                           &typeid(_ValueType),
 #else
                           nullptr,
 #endif
                           __any_imp::__get_fallback_typeid<_ValueType>());
-        return _VSTD::__pointer_or_func_cast<_ReturnType>(
+        return _CUDA_VSTD::__pointer_or_func_cast<_ReturnType>(
             __p, is_function<_ValueType>{});
     }
     return nullptr;
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_ANY
+#endif // _LIBCUDACXX_ANY

diff  --git a/libcxx/include/array b/libcxx/include/array
index 867dd6b1bcc6..291779b64bfc 100644
--- a/libcxx/include/array
+++ b/libcxx/include/array
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_ARRAY
-#define _LIBCPP_ARRAY
+#ifndef _LIBCUDACXX_ARRAY
+#define _LIBCUDACXX_ARRAY
 
 /*
     array synopsis
@@ -123,7 +123,7 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #  include <iterator>
 #  include <utility>
@@ -142,14 +142,14 @@ template <size_t I, class T, size_t N> const T&& get(const array<T, N>&&) noexce
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS array
+struct _LIBCUDACXX_TEMPLATE_VIS array
 {
     // types:
     typedef array __self;
@@ -162,97 +162,97 @@ struct _LIBCPP_TEMPLATE_VIS array
     typedef const value_type*                     const_pointer;
     typedef size_t                                size_type;
     typedef ptr
diff _t                             
diff erence_type;
-    typedef _VSTD::reverse_iterator<iterator>       reverse_iterator;
-    typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<iterator>       reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
 
     _Tp __elems_[_Size];
 
     // No explicit construct/copy/destroy for aggregate type
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void fill(const value_type& __u) {
-        _VSTD::fill_n(data(), _Size, __u);
+        _CUDA_VSTD::fill_n(data(), _Size, __u);
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void swap(array& __a) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value) {
-        _VSTD::swap_ranges(data(), data() + _Size, __a.data());
+        _CUDA_VSTD::swap_ranges(data(), data() + _Size, __a.data());
     }
 
     // iterators:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     iterator begin() _NOEXCEPT {return iterator(data());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_iterator begin() const _NOEXCEPT {return const_iterator(data());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     iterator end() _NOEXCEPT {return iterator(data() + _Size);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_iterator end() const _NOEXCEPT {return const_iterator(data() + _Size);}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator rbegin() const _NOEXCEPT {return const_reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator rend() _NOEXCEPT {return reverse_iterator(begin());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator rend() const _NOEXCEPT {return const_reverse_iterator(begin());}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_iterator cbegin() const _NOEXCEPT {return begin();}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_iterator cend() const _NOEXCEPT {return end();}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator crend() const _NOEXCEPT {return rend();}
 
     // capacity:
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR size_type size() const _NOEXCEPT {return _Size;}
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR size_type max_size() const _NOEXCEPT {return _Size;}
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR bool empty() const _NOEXCEPT {return _Size == 0;}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR size_type size() const _NOEXCEPT {return _Size;}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR size_type max_size() const _NOEXCEPT {return _Size;}
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR bool empty() const _NOEXCEPT {return _Size == 0;}
 
     // element access:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reference operator[](size_type __n) _NOEXCEPT {
-        _LIBCPP_ASSERT(__n < _Size, "out-of-bounds access in std::array<T, N>");
+        _LIBCUDACXX_ASSERT(__n < _Size, "out-of-bounds access in std::array<T, N>");
         return __elems_[__n];
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const_reference operator[](size_type __n) const _NOEXCEPT {
-        _LIBCPP_ASSERT(__n < _Size, "out-of-bounds access in std::array<T, N>");
+        _LIBCUDACXX_ASSERT(__n < _Size, "out-of-bounds access in std::array<T, N>");
         return __elems_[__n];
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX14 reference at(size_type __n)
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 reference at(size_type __n)
     {
         if (__n >= _Size)
             __throw_out_of_range("array::at");
         return __elems_[__n];
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference at(size_type __n) const
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 const_reference at(size_type __n) const
     {
         if (__n >= _Size)
             __throw_out_of_range("array::at");
         return __elems_[__n];
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reference front()             _NOEXCEPT {return (*this)[0];}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference front() const _NOEXCEPT {return (*this)[0];}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14 reference back()              _NOEXCEPT {return (*this)[_Size - 1];}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const_reference back() const  _NOEXCEPT {return (*this)[_Size - 1];}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 reference front()             _NOEXCEPT {return (*this)[0];}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 const_reference front() const _NOEXCEPT {return (*this)[0];}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 reference back()              _NOEXCEPT {return (*this)[_Size - 1];}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 const_reference back() const  _NOEXCEPT {return (*this)[_Size - 1];}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     value_type* data() _NOEXCEPT {return __elems_;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const value_type* data() const _NOEXCEPT {return __elems_;}
 };
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0>
+struct _LIBCUDACXX_TEMPLATE_VIS array<_Tp, 0>
 {
     // types:
     typedef array __self;
@@ -265,8 +265,8 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0>
     typedef const value_type*                     const_pointer;
     typedef size_t                                size_type;
     typedef ptr
diff _t                             
diff erence_type;
-    typedef _VSTD::reverse_iterator<iterator>       reverse_iterator;
-    typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<iterator>       reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
 
     typedef typename conditional<is_const<_Tp>::value, const char,
                                 char>::type _CharType;
@@ -274,112 +274,112 @@ struct _LIBCPP_TEMPLATE_VIS array<_Tp, 0>
     struct  _ArrayInStructT { _Tp __data_[1]; };
     _ALIGNAS_TYPE(_ArrayInStructT) _CharType __elems_[sizeof(_ArrayInStructT)];
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     value_type* data() _NOEXCEPT {return nullptr;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const value_type* data() const _NOEXCEPT {return nullptr;}
 
     // No explicit construct/copy/destroy for aggregate type
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void fill(const value_type&) {
       static_assert(!is_const<_Tp>::value,
                     "cannot fill zero-sized array of type 'const T'");
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void swap(array&) _NOEXCEPT {
       static_assert(!is_const<_Tp>::value,
                     "cannot swap zero-sized array of type 'const T'");
     }
 
     // iterators:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     iterator begin() _NOEXCEPT {return iterator(data());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_iterator begin() const _NOEXCEPT {return const_iterator(data());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     iterator end() _NOEXCEPT {return iterator(data());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_iterator end() const _NOEXCEPT {return const_iterator(data());}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator rbegin() const _NOEXCEPT {return const_reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reverse_iterator rend() _NOEXCEPT {return reverse_iterator(begin());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator rend() const _NOEXCEPT {return const_reverse_iterator(begin());}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_iterator cbegin() const _NOEXCEPT {return begin();}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_iterator cend() const _NOEXCEPT {return end();}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     const_reverse_iterator crend() const _NOEXCEPT {return rend();}
 
     // capacity:
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR size_type size() const _NOEXCEPT {return 0; }
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR size_type max_size() const _NOEXCEPT {return 0;}
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR bool empty() const _NOEXCEPT {return true;}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR size_type size() const _NOEXCEPT {return 0; }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR size_type max_size() const _NOEXCEPT {return 0;}
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR bool empty() const _NOEXCEPT {return true;}
 
     // element access:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reference operator[](size_type) _NOEXCEPT {
-      _LIBCPP_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
-      __libcpp_unreachable();
+      _LIBCUDACXX_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
+      __LIBCUDACXX_unreachable();
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const_reference operator[](size_type) const _NOEXCEPT {
-      _LIBCPP_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
-      __libcpp_unreachable();
+      _LIBCUDACXX_ASSERT(false, "cannot call array<T, 0>::operator[] on a zero-sized array");
+      __LIBCUDACXX_unreachable();
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reference at(size_type) {
       __throw_out_of_range("array<T, 0>::at");
-      __libcpp_unreachable();
+      __LIBCUDACXX_unreachable();
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const_reference at(size_type) const {
       __throw_out_of_range("array<T, 0>::at");
-      __libcpp_unreachable();
+      __LIBCUDACXX_unreachable();
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reference front() _NOEXCEPT {
-      _LIBCPP_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
-      __libcpp_unreachable();
+      _LIBCUDACXX_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
+      __LIBCUDACXX_unreachable();
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const_reference front() const _NOEXCEPT {
-      _LIBCPP_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
-      __libcpp_unreachable();
+      _LIBCUDACXX_ASSERT(false, "cannot call array<T, 0>::front() on a zero-sized array");
+      __LIBCUDACXX_unreachable();
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX14
     reference back() _NOEXCEPT {
-      _LIBCPP_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
-      __libcpp_unreachable();
+      _LIBCUDACXX_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
+      __LIBCUDACXX_unreachable();
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const_reference back() const _NOEXCEPT {
-      _LIBCPP_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
-      __libcpp_unreachable();
+      _LIBCUDACXX_ASSERT(false, "cannot call array<T, 0>::back() on a zero-sized array");
+      __LIBCUDACXX_unreachable();
     }
 };
 
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template<class _Tp, class... _Args,
          class = enable_if_t<__all<_IsSame<_Tp, _Args>::value...>::value>
          >
@@ -388,56 +388,56 @@ array(_Tp, _Args...)
 #endif
 
 template <class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 operator==(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
 {
-    return _VSTD::equal(__x.begin(), __x.end(), __y.begin());
+    return _CUDA_VSTD::equal(__x.begin(), __x.end(), __y.begin());
 }
 
 template <class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 operator!=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
 {
     return !(__x == __y);
 }
 
 template <class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 operator<(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
 {
-    return _VSTD::lexicographical_compare(__x.begin(), __x.end(),
+    return _CUDA_VSTD::lexicographical_compare(__x.begin(), __x.end(),
                                           __y.begin(), __y.end());
 }
 
 template <class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 operator>(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
 {
     return __y < __x;
 }
 
 template <class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 operator<=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
 {
     return !(__y < __x);
 }
 
 template <class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 operator>=(const array<_Tp, _Size>& __x, const array<_Tp, _Size>& __y)
 {
     return !(__x < __y);
 }
 
 template <class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t<_Size == 0 || __is_swappable<_Tp>::value, void>
 swap(array<_Tp, _Size>& __x, array<_Tp, _Size>& __y)
                                   _NOEXCEPT_(noexcept(__x.swap(__y)))
@@ -446,18 +446,18 @@ swap(array<_Tp, _Size>& __x, array<_Tp, _Size>& __y)
 }
 
 template <class _Tp, size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS tuple_size<array<_Tp, _Size> >
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_size<array<_Tp, _Size> >
     : public integral_constant<size_t, _Size> {};
 
 template <size_t _Ip, class _Tp, size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> >
+struct _LIBCUDACXX_TEMPLATE_VIS tuple_element<_Ip, array<_Tp, _Size> >
 {
     static_assert(_Ip < _Size, "Index out of bounds in std::tuple_element<> (std::array)");
     typedef _Tp type;
 };
 
 template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp&
 get(array<_Tp, _Size>& __a) _NOEXCEPT
 {
@@ -466,7 +466,7 @@ get(array<_Tp, _Size>& __a) _NOEXCEPT
 }
 
 template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const _Tp&
 get(const array<_Tp, _Size>& __a) _NOEXCEPT
 {
@@ -475,39 +475,39 @@ get(const array<_Tp, _Size>& __a) _NOEXCEPT
 }
 
 template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp&&
 get(array<_Tp, _Size>&& __a) _NOEXCEPT
 {
     static_assert(_Ip < _Size, "Index out of bounds in std::get<> (std::array &&)");
-    return _VSTD::move(__a.__elems_[_Ip]);
+    return _CUDA_VSTD::move(__a.__elems_[_Ip]);
 }
 
 template <size_t _Ip, class _Tp, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const _Tp&&
 get(const array<_Tp, _Size>&& __a) _NOEXCEPT
 {
     static_assert(_Ip < _Size, "Index out of bounds in std::get<> (const std::array &&)");
-    return _VSTD::move(__a.__elems_[_Ip]);
+    return _CUDA_VSTD::move(__a.__elems_[_Ip]);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <typename _Tp, size_t _Size, size_t... _Index>
-_LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
+_LIBCUDACXX_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
 __to_array_lvalue_impl(_Tp (&__arr)[_Size], index_sequence<_Index...>) {
   return {{__arr[_Index]...}};
 }
 
 template <typename _Tp, size_t _Size, size_t... _Index>
-_LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
+_LIBCUDACXX_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
 __to_array_rvalue_impl(_Tp(&&__arr)[_Size], index_sequence<_Index...>) {
-  return {{_VSTD::move(__arr[_Index])...}};
+  return {{_CUDA_VSTD::move(__arr[_Index])...}};
 }
 
 template <typename _Tp, size_t _Size>
-_LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
+_LIBCUDACXX_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
 to_array(_Tp (&__arr)[_Size]) noexcept(is_nothrow_constructible_v<_Tp, _Tp&>) {
   static_assert(
       !is_array_v<_Tp>,
@@ -515,11 +515,11 @@ to_array(_Tp (&__arr)[_Size]) noexcept(is_nothrow_constructible_v<_Tp, _Tp&>) {
   static_assert(
       is_constructible_v<_Tp, _Tp&>,
       "[array.creation]/1: to_array requires copy constructible elements.");
-  return _VSTD::__to_array_lvalue_impl(__arr, make_index_sequence<_Size>());
+  return _CUDA_VSTD::__to_array_lvalue_impl(__arr, make_index_sequence<_Size>());
 }
 
 template <typename _Tp, size_t _Size>
-_LIBCPP_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
+_LIBCUDACXX_INLINE_VISIBILITY constexpr array<remove_cv_t<_Tp>, _Size>
 to_array(_Tp(&&__arr)[_Size]) noexcept(is_nothrow_move_constructible_v<_Tp>) {
   static_assert(
       !is_array_v<_Tp>,
@@ -527,12 +527,12 @@ to_array(_Tp(&&__arr)[_Size]) noexcept(is_nothrow_move_constructible_v<_Tp>) {
   static_assert(
       is_move_constructible_v<_Tp>,
       "[array.creation]/4: to_array requires move constructible elements.");
-  return _VSTD::__to_array_rvalue_impl(_VSTD::move(__arr),
+  return _CUDA_VSTD::__to_array_rvalue_impl(_CUDA_VSTD::move(__arr),
                                        make_index_sequence<_Size>());
 }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_ARRAY
+#endif // _LIBCUDACXX_ARRAY

diff  --git a/libcxx/include/atomic b/libcxx/include/atomic
index 92da4820e928..d536c9138c05 100644
--- a/libcxx/include/atomic
+++ b/libcxx/include/atomic
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_ATOMIC
-#define _LIBCPP_ATOMIC
+#ifndef _LIBCUDACXX_ATOMIC
+#define _LIBCUDACXX_ATOMIC
 
 /*
     atomic synopsis
@@ -530,42 +530,42 @@ template <class T>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 # include <__threading_support>
 #endif
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <chrono>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifdef _LIBCPP_HAS_NO_ATOMIC_HEADER
+#ifdef _LIBCUDACXX_HAS_NO_ATOMIC_HEADER
 # error <atomic> is not implemented
 #endif
 #ifdef kill_dependency
 # error <atomic> is incompatible with <stdatomic.h> before C++23. Please compile with -std=c++23.
 #endif
 
-#define _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m) \
-  _LIBCPP_DIAGNOSE_WARNING(__m == memory_order_consume || \
+#define _LIBCUDACXX_CHECK_STORE_MEMORY_ORDER(__m) \
+  _LIBCUDACXX_DIAGNOSE_WARNING(__m == memory_order_consume || \
                            __m == memory_order_acquire || \
                            __m == memory_order_acq_rel,   \
                         "memory order argument to atomic operation is invalid")
 
-#define _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m) \
-  _LIBCPP_DIAGNOSE_WARNING(__m == memory_order_release || \
+#define _LIBCUDACXX_CHECK_LOAD_MEMORY_ORDER(__m) \
+  _LIBCUDACXX_DIAGNOSE_WARNING(__m == memory_order_release || \
                            __m == memory_order_acq_rel,   \
                         "memory order argument to atomic operation is invalid")
 
-#define _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__m, __f) \
-  _LIBCPP_DIAGNOSE_WARNING(__f == memory_order_release || \
+#define _LIBCUDACXX_CHECK_EXCHANGE_MEMORY_ORDER(__m, __f) \
+  _LIBCUDACXX_DIAGNOSE_WARNING(__f == memory_order_release || \
                            __f == memory_order_acq_rel,   \
                         "memory order argument to atomic operation is invalid")
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Figure out what the underlying type for `memory_order` would be if it were
 // declared as an unscoped enum (accounting for -fshort-enums). Use this result
@@ -581,7 +581,7 @@ enum __legacy_memory_order {
 
 typedef underlying_type<__legacy_memory_order>::type __memory_order_underlying_t;
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 enum class memory_order : __memory_order_underlying_t {
   relaxed = __mo_relaxed,
@@ -610,28 +610,28 @@ typedef enum memory_order {
   memory_order_seq_cst = __mo_seq_cst,
 } memory_order;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-template <typename _Tp> _LIBCPP_INLINE_VISIBILITY
+template <typename _Tp> _LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_nonatomic_compare_equal(_Tp const& __lhs, _Tp const& __rhs) {
-    return _VSTD::memcmp(&__lhs, &__rhs, sizeof(_Tp)) == 0;
+    return _CUDA_VSTD::memcmp(&__lhs, &__rhs, sizeof(_Tp)) == 0;
 }
 
 static_assert((is_same<underlying_type<memory_order>::type, __memory_order_underlying_t>::value),
   "unexpected underlying type for std::memory_order");
 
-#if defined(_LIBCPP_HAS_GCC_ATOMIC_IMP) || \
-    defined(_LIBCPP_ATOMIC_ONLY_USE_BUILTINS)
+#if defined(_LIBCUDACXX_HAS_GCC_ATOMIC_IMP) || \
+    defined(_LIBCUDACXX_ATOMIC_ONLY_USE_BUILTINS)
 
 // [atomics.types.generic]p1 guarantees _Tp is trivially copyable. Because
 // the default operator= in an object is not volatile, a byte-by-byte copy
 // is required.
-template <typename _Tp, typename _Tv> _LIBCPP_INLINE_VISIBILITY
+template <typename _Tp, typename _Tv> _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if<is_assignable<_Tp&, _Tv>::value>::type
 __cxx_atomic_assign_volatile(_Tp& __a_value, _Tv const& __val) {
   __a_value = __val;
 }
-template <typename _Tp, typename _Tv> _LIBCPP_INLINE_VISIBILITY
+template <typename _Tp, typename _Tv> _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if<is_assignable<_Tp&, _Tv>::value>::type
 __cxx_atomic_assign_volatile(_Tp volatile& __a_value, _Tv volatile const& __val) {
   volatile char* __to = reinterpret_cast<volatile char*>(&__a_value);
@@ -643,23 +643,23 @@ __cxx_atomic_assign_volatile(_Tp volatile& __a_value, _Tv volatile const& __val)
 
 #endif
 
-#if defined(_LIBCPP_HAS_GCC_ATOMIC_IMP)
+#if defined(_LIBCUDACXX_HAS_GCC_ATOMIC_IMP)
 
 template <typename _Tp>
 struct __cxx_atomic_base_impl {
 
-  _LIBCPP_INLINE_VISIBILITY
-#ifndef _LIBCPP_CXX03_LANG
+  _LIBCUDACXX_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
     __cxx_atomic_base_impl() _NOEXCEPT = default;
 #else
     __cxx_atomic_base_impl() _NOEXCEPT : __a_value() {}
-#endif // _LIBCPP_CXX03_LANG
-  _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp value) _NOEXCEPT
+#endif // _LIBCUDACXX_CXX03_LANG
+  _LIBCUDACXX_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp value) _NOEXCEPT
     : __a_value(value) {}
   _Tp __a_value;
 };
 
-_LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR int __to_gcc_order(memory_order __order) {
+_LIBCUDACXX_INLINE_VISIBILITY inline _LIBCUDACXX_CONSTEXPR int __to_gcc_order(memory_order __order) {
   // Avoid switch statement to make this a constexpr.
   return __order == memory_order_relaxed ? __ATOMIC_RELAXED:
          (__order == memory_order_acquire ? __ATOMIC_ACQUIRE:
@@ -669,7 +669,7 @@ _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR int __to_gcc_order(memory_ord
               __ATOMIC_CONSUME))));
 }
 
-_LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR int __to_gcc_failure_order(memory_order __order) {
+_LIBCUDACXX_INLINE_VISIBILITY inline _LIBCUDACXX_CONSTEXPR int __to_gcc_failure_order(memory_order __order) {
   // Avoid switch statement to make this a constexpr.
   return __order == memory_order_relaxed ? __ATOMIC_RELAXED:
          (__order == memory_order_acquire ? __ATOMIC_ACQUIRE:
@@ -680,29 +680,29 @@ _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR int __to_gcc_failure_order(me
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_init(volatile __cxx_atomic_base_impl<_Tp>* __a,  _Tp __val) {
   __cxx_atomic_assign_volatile(__a->__a_value, __val);
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_init(__cxx_atomic_base_impl<_Tp>* __a,  _Tp __val) {
   __a->__a_value = __val;
 }
 
-_LIBCPP_INLINE_VISIBILITY inline
+_LIBCUDACXX_INLINE_VISIBILITY inline
 void __cxx_atomic_thread_fence(memory_order __order) {
   __atomic_thread_fence(__to_gcc_order(__order));
 }
 
-_LIBCPP_INLINE_VISIBILITY inline
+_LIBCUDACXX_INLINE_VISIBILITY inline
 void __cxx_atomic_signal_fence(memory_order __order) {
   __atomic_signal_fence(__to_gcc_order(__order));
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_store(volatile __cxx_atomic_base_impl<_Tp>* __a,  _Tp __val,
                         memory_order __order) {
   __atomic_store(&__a->__a_value, &__val,
@@ -710,7 +710,7 @@ void __cxx_atomic_store(volatile __cxx_atomic_base_impl<_Tp>* __a,  _Tp __val,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp>* __a,  _Tp __val,
                         memory_order __order) {
   __atomic_store(&__a->__a_value, &__val,
@@ -718,7 +718,7 @@ void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp>* __a,  _Tp __val,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_load(const volatile __cxx_atomic_base_impl<_Tp>* __a,
                       memory_order __order) {
   _Tp __ret;
@@ -728,7 +728,7 @@ _Tp __cxx_atomic_load(const volatile __cxx_atomic_base_impl<_Tp>* __a,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_load(const __cxx_atomic_base_impl<_Tp>* __a, memory_order __order) {
   _Tp __ret;
   __atomic_load(&__a->__a_value, &__ret,
@@ -737,7 +737,7 @@ _Tp __cxx_atomic_load(const __cxx_atomic_base_impl<_Tp>* __a, memory_order __ord
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_exchange(volatile __cxx_atomic_base_impl<_Tp>* __a,
                           _Tp __value, memory_order __order) {
   _Tp __ret;
@@ -747,7 +747,7 @@ _Tp __cxx_atomic_exchange(volatile __cxx_atomic_base_impl<_Tp>* __a,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp>* __a, _Tp __value,
                           memory_order __order) {
   _Tp __ret;
@@ -757,7 +757,7 @@ _Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp>* __a, _Tp __value,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_strong(
     volatile __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value,
     memory_order __success, memory_order __failure) {
@@ -768,7 +768,7 @@ bool __cxx_atomic_compare_exchange_strong(
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_strong(
     __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value, memory_order __success,
     memory_order __failure) {
@@ -779,7 +779,7 @@ bool __cxx_atomic_compare_exchange_strong(
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_weak(
     volatile __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value,
     memory_order __success, memory_order __failure) {
@@ -790,7 +790,7 @@ bool __cxx_atomic_compare_exchange_weak(
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_weak(
     __cxx_atomic_base_impl<_Tp>* __a, _Tp* __expected, _Tp __value, memory_order __success,
     memory_order __failure) {
@@ -814,7 +814,7 @@ template <typename _Tp, int n>
 struct __skip_amt<_Tp[n]> { };
 
 template <typename _Tp, typename _Td>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_add(volatile __cxx_atomic_base_impl<_Tp>* __a,
                            _Td __delta, memory_order __order) {
   return __atomic_fetch_add(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
@@ -822,7 +822,7 @@ _Tp __cxx_atomic_fetch_add(volatile __cxx_atomic_base_impl<_Tp>* __a,
 }
 
 template <typename _Tp, typename _Td>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp>* __a, _Td __delta,
                            memory_order __order) {
   return __atomic_fetch_add(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
@@ -830,7 +830,7 @@ _Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp>* __a, _Td __delta,
 }
 
 template <typename _Tp, typename _Td>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_sub(volatile __cxx_atomic_base_impl<_Tp>* __a,
                            _Td __delta, memory_order __order) {
   return __atomic_fetch_sub(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
@@ -838,7 +838,7 @@ _Tp __cxx_atomic_fetch_sub(volatile __cxx_atomic_base_impl<_Tp>* __a,
 }
 
 template <typename _Tp, typename _Td>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp>* __a, _Td __delta,
                            memory_order __order) {
   return __atomic_fetch_sub(&__a->__a_value, __delta * __skip_amt<_Tp>::value,
@@ -846,7 +846,7 @@ _Tp __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp>* __a, _Td __delta,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_and(volatile __cxx_atomic_base_impl<_Tp>* __a,
                            _Tp __pattern, memory_order __order) {
   return __atomic_fetch_and(&__a->__a_value, __pattern,
@@ -854,7 +854,7 @@ _Tp __cxx_atomic_fetch_and(volatile __cxx_atomic_base_impl<_Tp>* __a,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_and(__cxx_atomic_base_impl<_Tp>* __a,
                            _Tp __pattern, memory_order __order) {
   return __atomic_fetch_and(&__a->__a_value, __pattern,
@@ -862,7 +862,7 @@ _Tp __cxx_atomic_fetch_and(__cxx_atomic_base_impl<_Tp>* __a,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_or(volatile __cxx_atomic_base_impl<_Tp>* __a,
                           _Tp __pattern, memory_order __order) {
   return __atomic_fetch_or(&__a->__a_value, __pattern,
@@ -870,7 +870,7 @@ _Tp __cxx_atomic_fetch_or(volatile __cxx_atomic_base_impl<_Tp>* __a,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_or(__cxx_atomic_base_impl<_Tp>* __a, _Tp __pattern,
                           memory_order __order) {
   return __atomic_fetch_or(&__a->__a_value, __pattern,
@@ -878,7 +878,7 @@ _Tp __cxx_atomic_fetch_or(__cxx_atomic_base_impl<_Tp>* __a, _Tp __pattern,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_xor(volatile __cxx_atomic_base_impl<_Tp>* __a,
                            _Tp __pattern, memory_order __order) {
   return __atomic_fetch_xor(&__a->__a_value, __pattern,
@@ -886,7 +886,7 @@ _Tp __cxx_atomic_fetch_xor(volatile __cxx_atomic_base_impl<_Tp>* __a,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp>* __a, _Tp __pattern,
                            memory_order __order) {
   return __atomic_fetch_xor(&__a->__a_value, __pattern,
@@ -895,81 +895,81 @@ _Tp __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp>* __a, _Tp __pattern,
 
 #define __cxx_atomic_is_lock_free(__s) __atomic_is_lock_free(__s, 0)
 
-#elif defined(_LIBCPP_HAS_C_ATOMIC_IMP)
+#elif defined(_LIBCUDACXX_HAS_C_ATOMIC_IMP)
 
 template <typename _Tp>
 struct __cxx_atomic_base_impl {
 
-  _LIBCPP_INLINE_VISIBILITY
-#ifndef _LIBCPP_CXX03_LANG
+  _LIBCUDACXX_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
     __cxx_atomic_base_impl() _NOEXCEPT = default;
 #else
     __cxx_atomic_base_impl() _NOEXCEPT : __a_value() {}
-#endif // _LIBCPP_CXX03_LANG
-  _LIBCPP_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp __value) _NOEXCEPT
+#endif // _LIBCUDACXX_CXX03_LANG
+  _LIBCUDACXX_CONSTEXPR explicit __cxx_atomic_base_impl(_Tp __value) _NOEXCEPT
     : __a_value(__value) {}
-  _LIBCPP_DISABLE_EXTENSION_WARNING _Atomic(_Tp) __a_value;
+  _LIBCUDACXX_DISABLE_EXTENSION_WARNING _Atomic(_Tp) __a_value;
 };
 
 #define __cxx_atomic_is_lock_free(__s) __c11_atomic_is_lock_free(__s)
 
-_LIBCPP_INLINE_VISIBILITY inline
+_LIBCUDACXX_INLINE_VISIBILITY inline
 void __cxx_atomic_thread_fence(memory_order __order) _NOEXCEPT {
     __c11_atomic_thread_fence(static_cast<__memory_order_underlying_t>(__order));
 }
 
-_LIBCPP_INLINE_VISIBILITY inline
+_LIBCUDACXX_INLINE_VISIBILITY inline
 void __cxx_atomic_signal_fence(memory_order __order) _NOEXCEPT {
     __c11_atomic_signal_fence(static_cast<__memory_order_underlying_t>(__order));
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_init(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __val) _NOEXCEPT {
     __c11_atomic_init(&__a->__a_value, __val);
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_init(__cxx_atomic_base_impl<_Tp> * __a, _Tp __val) _NOEXCEPT {
     __c11_atomic_init(&__a->__a_value, __val);
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __val, memory_order __order) _NOEXCEPT {
     __c11_atomic_store(&__a->__a_value, __val, static_cast<__memory_order_underlying_t>(__order));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_store(__cxx_atomic_base_impl<_Tp> * __a, _Tp __val, memory_order __order) _NOEXCEPT {
     __c11_atomic_store(&__a->__a_value, __val, static_cast<__memory_order_underlying_t>(__order));
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_load(__cxx_atomic_base_impl<_Tp> const volatile* __a, memory_order __order) _NOEXCEPT {
     using __ptr_type = typename remove_const<decltype(__a->__a_value)>::type*;
     return __c11_atomic_load(const_cast<__ptr_type>(&__a->__a_value), static_cast<__memory_order_underlying_t>(__order));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_load(__cxx_atomic_base_impl<_Tp> const* __a, memory_order __order) _NOEXCEPT {
     using __ptr_type = typename remove_const<decltype(__a->__a_value)>::type*;
     return __c11_atomic_load(const_cast<__ptr_type>(&__a->__a_value), static_cast<__memory_order_underlying_t>(__order));
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __value, memory_order __order) _NOEXCEPT {
     return __c11_atomic_exchange(&__a->__a_value, __value, static_cast<__memory_order_underlying_t>(__order));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_exchange(__cxx_atomic_base_impl<_Tp> * __a, _Tp __value, memory_order __order) _NOEXCEPT {
     return __c11_atomic_exchange(&__a->__a_value, __value, static_cast<__memory_order_underlying_t>(__order));
 }
 
-_LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR memory_order __to_failure_order(memory_order __order) {
+_LIBCUDACXX_INLINE_VISIBILITY inline _LIBCUDACXX_CONSTEXPR memory_order __to_failure_order(memory_order __order) {
   // Avoid switch statement to make this a constexpr.
   return __order == memory_order_release ? memory_order_relaxed:
          (__order == memory_order_acq_rel ? memory_order_acquire:
@@ -977,107 +977,107 @@ _LIBCPP_INLINE_VISIBILITY inline _LIBCPP_CONSTEXPR memory_order __to_failure_ord
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) _NOEXCEPT {
     return __c11_atomic_compare_exchange_strong(&__a->__a_value, __expected, __value, static_cast<__memory_order_underlying_t>(__success), static_cast<__memory_order_underlying_t>(__to_failure_order(__failure)));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_base_impl<_Tp> * __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) _NOEXCEPT {
     return __c11_atomic_compare_exchange_strong(&__a->__a_value, __expected, __value, static_cast<__memory_order_underlying_t>(__success), static_cast<__memory_order_underlying_t>(__to_failure_order(__failure)));
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) _NOEXCEPT {
     return __c11_atomic_compare_exchange_weak(&__a->__a_value, __expected, __value, static_cast<__memory_order_underlying_t>(__success), static_cast<__memory_order_underlying_t>(__to_failure_order(__failure)));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_base_impl<_Tp> * __a, _Tp* __expected, _Tp __value, memory_order __success, memory_order __failure) _NOEXCEPT {
     return __c11_atomic_compare_exchange_weak(&__a->__a_value, __expected, __value,  static_cast<__memory_order_underlying_t>(__success), static_cast<__memory_order_underlying_t>(__to_failure_order(__failure)));
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __delta, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_add(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp> * __a, _Tp __delta, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_add(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order));
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp* __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp*> volatile* __a, ptr
diff _t __delta, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_add(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp* __cxx_atomic_fetch_add(__cxx_atomic_base_impl<_Tp*> * __a, ptr
diff _t __delta, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_add(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order));
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __delta, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_sub(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp> * __a, _Tp __delta, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_sub(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp* __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp*> volatile* __a, ptr
diff _t __delta, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_sub(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp* __cxx_atomic_fetch_sub(__cxx_atomic_base_impl<_Tp*> * __a, ptr
diff _t __delta, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_sub(&__a->__a_value, __delta, static_cast<__memory_order_underlying_t>(__order));
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_and(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_and(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_and(__cxx_atomic_base_impl<_Tp> * __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_and(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order));
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_or(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_or(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_or(__cxx_atomic_base_impl<_Tp> * __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_or(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order));
 }
 
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp> volatile* __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_xor(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order));
 }
 template<class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_xor(__cxx_atomic_base_impl<_Tp> * __a, _Tp __pattern, memory_order __order) _NOEXCEPT {
     return __c11_atomic_fetch_xor(&__a->__a_value, __pattern, static_cast<__memory_order_underlying_t>(__order));
 }
 
-#endif // _LIBCPP_HAS_GCC_ATOMIC_IMP, _LIBCPP_HAS_C_ATOMIC_IMP
+#endif // _LIBCUDACXX_HAS_GCC_ATOMIC_IMP, _LIBCUDACXX_HAS_C_ATOMIC_IMP
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp kill_dependency(_Tp __y) _NOEXCEPT
 {
     return __y;
@@ -1086,7 +1086,7 @@ _Tp kill_dependency(_Tp __y) _NOEXCEPT
 #if defined(__CLANG_ATOMIC_BOOL_LOCK_FREE)
 # define ATOMIC_BOOL_LOCK_FREE      __CLANG_ATOMIC_BOOL_LOCK_FREE
 # define ATOMIC_CHAR_LOCK_FREE      __CLANG_ATOMIC_CHAR_LOCK_FREE
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 # define ATOMIC_CHAR8_T_LOCK_FREE   __CLANG_ATOMIC_CHAR8_T_LOCK_FREE
 #endif
 # define ATOMIC_CHAR16_T_LOCK_FREE  __CLANG_ATOMIC_CHAR16_T_LOCK_FREE
@@ -1100,7 +1100,7 @@ _Tp kill_dependency(_Tp __y) _NOEXCEPT
 #elif defined(__GCC_ATOMIC_BOOL_LOCK_FREE)
 # define ATOMIC_BOOL_LOCK_FREE      __GCC_ATOMIC_BOOL_LOCK_FREE
 # define ATOMIC_CHAR_LOCK_FREE      __GCC_ATOMIC_CHAR_LOCK_FREE
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 # define ATOMIC_CHAR8_T_LOCK_FREE   __GCC_ATOMIC_CHAR8_T_LOCK_FREE
 #endif
 # define ATOMIC_CHAR16_T_LOCK_FREE  __GCC_ATOMIC_CHAR16_T_LOCK_FREE
@@ -1113,43 +1113,43 @@ _Tp kill_dependency(_Tp __y) _NOEXCEPT
 # define ATOMIC_POINTER_LOCK_FREE   __GCC_ATOMIC_POINTER_LOCK_FREE
 #endif
 
-#ifdef _LIBCPP_ATOMIC_ONLY_USE_BUILTINS
+#ifdef _LIBCUDACXX_ATOMIC_ONLY_USE_BUILTINS
 
 template<typename _Tp>
 struct __cxx_atomic_lock_impl {
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   __cxx_atomic_lock_impl() _NOEXCEPT
     : __a_value(), __a_lock(0) {}
-  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR explicit
+  _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR explicit
   __cxx_atomic_lock_impl(_Tp value) _NOEXCEPT
     : __a_value(value), __a_lock(0) {}
 
   _Tp __a_value;
-  mutable __cxx_atomic_base_impl<_LIBCPP_ATOMIC_FLAG_TYPE> __a_lock;
+  mutable __cxx_atomic_base_impl<_LIBCUDACXX_ATOMIC_FLAG_TYPE> __a_lock;
 
-  _LIBCPP_INLINE_VISIBILITY void __lock() const volatile {
-    while(1 == __cxx_atomic_exchange(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(true), memory_order_acquire))
+  _LIBCUDACXX_INLINE_VISIBILITY void __lock() const volatile {
+    while(1 == __cxx_atomic_exchange(&__a_lock, _LIBCUDACXX_ATOMIC_FLAG_TYPE(true), memory_order_acquire))
         /*spin*/;
   }
-  _LIBCPP_INLINE_VISIBILITY void __lock() const {
-    while(1 == __cxx_atomic_exchange(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(true), memory_order_acquire))
+  _LIBCUDACXX_INLINE_VISIBILITY void __lock() const {
+    while(1 == __cxx_atomic_exchange(&__a_lock, _LIBCUDACXX_ATOMIC_FLAG_TYPE(true), memory_order_acquire))
         /*spin*/;
   }
-  _LIBCPP_INLINE_VISIBILITY void __unlock() const volatile {
-    __cxx_atomic_store(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(false), memory_order_release);
+  _LIBCUDACXX_INLINE_VISIBILITY void __unlock() const volatile {
+    __cxx_atomic_store(&__a_lock, _LIBCUDACXX_ATOMIC_FLAG_TYPE(false), memory_order_release);
   }
-  _LIBCPP_INLINE_VISIBILITY void __unlock() const {
-    __cxx_atomic_store(&__a_lock, _LIBCPP_ATOMIC_FLAG_TYPE(false), memory_order_release);
+  _LIBCUDACXX_INLINE_VISIBILITY void __unlock() const {
+    __cxx_atomic_store(&__a_lock, _LIBCUDACXX_ATOMIC_FLAG_TYPE(false), memory_order_release);
   }
-  _LIBCPP_INLINE_VISIBILITY _Tp __read() const volatile {
+  _LIBCUDACXX_INLINE_VISIBILITY _Tp __read() const volatile {
     __lock();
     _Tp __old;
     __cxx_atomic_assign_volatile(__old, __a_value);
     __unlock();
     return __old;
   }
-  _LIBCPP_INLINE_VISIBILITY _Tp __read() const {
+  _LIBCUDACXX_INLINE_VISIBILITY _Tp __read() const {
     __lock();
     _Tp __old = __a_value;
     __unlock();
@@ -1158,25 +1158,25 @@ struct __cxx_atomic_lock_impl {
 };
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_init(volatile __cxx_atomic_lock_impl<_Tp>* __a,  _Tp __val) {
   __cxx_atomic_assign_volatile(__a->__a_value, __val);
 }
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_init(__cxx_atomic_lock_impl<_Tp>* __a,  _Tp __val) {
   __a->__a_value = __val;
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_store(volatile __cxx_atomic_lock_impl<_Tp>* __a,  _Tp __val, memory_order) {
   __a->__lock();
   __cxx_atomic_assign_volatile(__a->__a_value, __val);
   __a->__unlock();
 }
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __cxx_atomic_store(__cxx_atomic_lock_impl<_Tp>* __a,  _Tp __val, memory_order) {
   __a->__lock();
   __a->__a_value = __val;
@@ -1184,18 +1184,18 @@ void __cxx_atomic_store(__cxx_atomic_lock_impl<_Tp>* __a,  _Tp __val, memory_ord
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_load(const volatile __cxx_atomic_lock_impl<_Tp>* __a, memory_order) {
   return __a->__read();
 }
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_load(const __cxx_atomic_lock_impl<_Tp>* __a, memory_order) {
   return __a->__read();
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_exchange(volatile __cxx_atomic_lock_impl<_Tp>* __a, _Tp __value, memory_order) {
   __a->__lock();
   _Tp __old;
@@ -1205,7 +1205,7 @@ _Tp __cxx_atomic_exchange(volatile __cxx_atomic_lock_impl<_Tp>* __a, _Tp __value
   return __old;
 }
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_exchange(__cxx_atomic_lock_impl<_Tp>* __a, _Tp __value, memory_order) {
   __a->__lock();
   _Tp __old = __a->__a_value;
@@ -1215,13 +1215,13 @@ _Tp __cxx_atomic_exchange(__cxx_atomic_lock_impl<_Tp>* __a, _Tp __value, memory_
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_strong(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                                           _Tp* __expected, _Tp __value, memory_order, memory_order) {
   _Tp __temp;
   __a->__lock();
   __cxx_atomic_assign_volatile(__temp, __a->__a_value);
-  bool __ret = (_VSTD::memcmp(&__temp, __expected, sizeof(_Tp)) == 0);
+  bool __ret = (_CUDA_VSTD::memcmp(&__temp, __expected, sizeof(_Tp)) == 0);
   if(__ret)
     __cxx_atomic_assign_volatile(__a->__a_value, __value);
   else
@@ -1230,27 +1230,27 @@ bool __cxx_atomic_compare_exchange_strong(volatile __cxx_atomic_lock_impl<_Tp>*
   return __ret;
 }
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_strong(__cxx_atomic_lock_impl<_Tp>* __a,
                                           _Tp* __expected, _Tp __value, memory_order, memory_order) {
   __a->__lock();
-  bool __ret = (_VSTD::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0);
+  bool __ret = (_CUDA_VSTD::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0);
   if(__ret)
-    _VSTD::memcpy(&__a->__a_value, &__value, sizeof(_Tp));
+    _CUDA_VSTD::memcpy(&__a->__a_value, &__value, sizeof(_Tp));
   else
-    _VSTD::memcpy(__expected, &__a->__a_value, sizeof(_Tp));
+    _CUDA_VSTD::memcpy(__expected, &__a->__a_value, sizeof(_Tp));
   __a->__unlock();
   return __ret;
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_weak(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                                         _Tp* __expected, _Tp __value, memory_order, memory_order) {
   _Tp __temp;
   __a->__lock();
   __cxx_atomic_assign_volatile(__temp, __a->__a_value);
-  bool __ret = (_VSTD::memcmp(&__temp, __expected, sizeof(_Tp)) == 0);
+  bool __ret = (_CUDA_VSTD::memcmp(&__temp, __expected, sizeof(_Tp)) == 0);
   if(__ret)
     __cxx_atomic_assign_volatile(__a->__a_value, __value);
   else
@@ -1259,21 +1259,21 @@ bool __cxx_atomic_compare_exchange_weak(volatile __cxx_atomic_lock_impl<_Tp>* __
   return __ret;
 }
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool __cxx_atomic_compare_exchange_weak(__cxx_atomic_lock_impl<_Tp>* __a,
                                         _Tp* __expected, _Tp __value, memory_order, memory_order) {
   __a->__lock();
-  bool __ret = (_VSTD::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0);
+  bool __ret = (_CUDA_VSTD::memcmp(&__a->__a_value, __expected, sizeof(_Tp)) == 0);
   if(__ret)
-    _VSTD::memcpy(&__a->__a_value, &__value, sizeof(_Tp));
+    _CUDA_VSTD::memcpy(&__a->__a_value, &__value, sizeof(_Tp));
   else
-    _VSTD::memcpy(__expected, &__a->__a_value, sizeof(_Tp));
+    _CUDA_VSTD::memcpy(__expected, &__a->__a_value, sizeof(_Tp));
   __a->__unlock();
   return __ret;
 }
 
 template <typename _Tp, typename _Td>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_add(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                            _Td __delta, memory_order) {
   __a->__lock();
@@ -1284,7 +1284,7 @@ _Tp __cxx_atomic_fetch_add(volatile __cxx_atomic_lock_impl<_Tp>* __a,
   return __old;
 }
 template <typename _Tp, typename _Td>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_add(__cxx_atomic_lock_impl<_Tp>* __a,
                            _Td __delta, memory_order) {
   __a->__lock();
@@ -1295,7 +1295,7 @@ _Tp __cxx_atomic_fetch_add(__cxx_atomic_lock_impl<_Tp>* __a,
 }
 
 template <typename _Tp, typename _Td>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp* __cxx_atomic_fetch_add(volatile __cxx_atomic_lock_impl<_Tp*>* __a,
                            ptr
diff _t __delta, memory_order) {
   __a->__lock();
@@ -1306,7 +1306,7 @@ _Tp* __cxx_atomic_fetch_add(volatile __cxx_atomic_lock_impl<_Tp*>* __a,
   return __old;
 }
 template <typename _Tp, typename _Td>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp* __cxx_atomic_fetch_add(__cxx_atomic_lock_impl<_Tp*>* __a,
                            ptr
diff _t __delta, memory_order) {
   __a->__lock();
@@ -1317,7 +1317,7 @@ _Tp* __cxx_atomic_fetch_add(__cxx_atomic_lock_impl<_Tp*>* __a,
 }
 
 template <typename _Tp, typename _Td>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_sub(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                            _Td __delta, memory_order) {
   __a->__lock();
@@ -1328,7 +1328,7 @@ _Tp __cxx_atomic_fetch_sub(volatile __cxx_atomic_lock_impl<_Tp>* __a,
   return __old;
 }
 template <typename _Tp, typename _Td>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_sub(__cxx_atomic_lock_impl<_Tp>* __a,
                            _Td __delta, memory_order) {
   __a->__lock();
@@ -1339,7 +1339,7 @@ _Tp __cxx_atomic_fetch_sub(__cxx_atomic_lock_impl<_Tp>* __a,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_and(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                            _Tp __pattern, memory_order) {
   __a->__lock();
@@ -1350,7 +1350,7 @@ _Tp __cxx_atomic_fetch_and(volatile __cxx_atomic_lock_impl<_Tp>* __a,
   return __old;
 }
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_and(__cxx_atomic_lock_impl<_Tp>* __a,
                            _Tp __pattern, memory_order) {
   __a->__lock();
@@ -1361,7 +1361,7 @@ _Tp __cxx_atomic_fetch_and(__cxx_atomic_lock_impl<_Tp>* __a,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_or(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                           _Tp __pattern, memory_order) {
   __a->__lock();
@@ -1372,7 +1372,7 @@ _Tp __cxx_atomic_fetch_or(volatile __cxx_atomic_lock_impl<_Tp>* __a,
   return __old;
 }
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_or(__cxx_atomic_lock_impl<_Tp>* __a,
                           _Tp __pattern, memory_order) {
   __a->__lock();
@@ -1383,7 +1383,7 @@ _Tp __cxx_atomic_fetch_or(__cxx_atomic_lock_impl<_Tp>* __a,
 }
 
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_xor(volatile __cxx_atomic_lock_impl<_Tp>* __a,
                            _Tp __pattern, memory_order) {
   __a->__lock();
@@ -1394,7 +1394,7 @@ _Tp __cxx_atomic_fetch_xor(volatile __cxx_atomic_lock_impl<_Tp>* __a,
   return __old;
 }
 template <typename _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __cxx_atomic_fetch_xor(__cxx_atomic_lock_impl<_Tp>* __a,
                            _Tp __pattern, memory_order) {
   __a->__lock();
@@ -1417,12 +1417,12 @@ template<> struct __cxx_is_always_lock_free<bool> { enum { __value = 2 == ATOMIC
 template<> struct __cxx_is_always_lock_free<char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; };
 template<> struct __cxx_is_always_lock_free<signed char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; };
 template<> struct __cxx_is_always_lock_free<unsigned char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; };
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 template<> struct __cxx_is_always_lock_free<char8_t> { enum { __value = 2 == ATOMIC_CHAR8_T_LOCK_FREE }; };
 #endif
 template<> struct __cxx_is_always_lock_free<char16_t> { enum { __value = 2 == ATOMIC_CHAR16_T_LOCK_FREE }; };
 template<> struct __cxx_is_always_lock_free<char32_t> { enum { __value = 2 == ATOMIC_CHAR32_T_LOCK_FREE }; };
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template<> struct __cxx_is_always_lock_free<wchar_t> { enum { __value = 2 == ATOMIC_WCHAR_T_LOCK_FREE }; };
 #endif
 template<> struct __cxx_is_always_lock_free<short> { enum { __value = 2 == ATOMIC_SHORT_LOCK_FREE }; };
@@ -1445,13 +1445,13 @@ template <typename _Tp,
 #else
 template <typename _Tp,
           typename _Base = __cxx_atomic_base_impl<_Tp> >
-#endif //_LIBCPP_ATOMIC_ONLY_USE_BUILTINS
+#endif //_LIBCUDACXX_ATOMIC_ONLY_USE_BUILTINS
 struct __cxx_atomic_impl : public _Base {
     static_assert(is_trivially_copyable<_Tp>::value,
       "std::atomic<T> requires that 'T' be a trivially copyable type");
 
-  _LIBCPP_INLINE_VISIBILITY __cxx_atomic_impl() _NOEXCEPT = default;
-  _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR explicit __cxx_atomic_impl(_Tp __value) _NOEXCEPT
+  _LIBCUDACXX_INLINE_VISIBILITY __cxx_atomic_impl() _NOEXCEPT = default;
+  _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR explicit __cxx_atomic_impl(_Tp __value) _NOEXCEPT
     : _Base(__value) {}
 };
 
@@ -1463,44 +1463,44 @@ struct __cxx_atomic_impl : public _Base {
 
 using __cxx_atomic_contention_t = __cxx_atomic_impl<__cxx_contention_t>;
 
-#if defined(_LIBCPP_HAS_NO_THREADS)
-#   define _LIBCPP_HAS_NO_PLATFORM_WAIT
+#if defined(_LIBCUDACXX_HAS_NO_THREADS)
+#   define _LIBCUDACXX_HAS_NO_PLATFORM_WAIT
 #endif
 
 // TODO:
-// _LIBCPP_HAS_NO_PLATFORM_WAIT is currently a "dead" macro, in the sense that
+// _LIBCUDACXX_HAS_NO_PLATFORM_WAIT is currently a "dead" macro, in the sense that
 // it is not tied anywhere into the build system or even documented. We should
 // clean it up because it is technically never defined except when threads are
 // disabled. We should clean it up in its own changeset in case we break "bad"
 // users.
-#ifndef _LIBCPP_HAS_NO_PLATFORM_WAIT
+#ifndef _LIBCUDACXX_HAS_NO_PLATFORM_WAIT
 
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*);
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*);
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile*);
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(void const volatile*, __cxx_contention_t);
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*);
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*);
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_EXPORTED_FROM_ABI __cxx_contention_t __LIBCUDACXX_atomic_monitor(void const volatile*);
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_EXPORTED_FROM_ABI void __LIBCUDACXX_atomic_wait(void const volatile*, __cxx_contention_t);
 
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile*);
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile*);
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile*);
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t);
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile*);
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile*);
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_EXPORTED_FROM_ABI __cxx_contention_t __LIBCUDACXX_atomic_monitor(__cxx_atomic_contention_t const volatile*);
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_EXPORTED_FROM_ABI void __LIBCUDACXX_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t);
 
 template <class _Atp, class _Fn>
-struct __libcpp_atomic_wait_backoff_impl {
+struct __LIBCUDACXX_atomic_wait_backoff_impl {
     _Atp* __a;
     _Fn __test_fn;
-    _LIBCPP_AVAILABILITY_SYNC
-    _LIBCPP_INLINE_VISIBILITY bool operator()(chrono::nanoseconds __elapsed) const
+    _LIBCUDACXX_AVAILABILITY_SYNC
+    _LIBCUDACXX_INLINE_VISIBILITY bool operator()(chrono::nanoseconds __elapsed) const
     {
         if(__elapsed > chrono::microseconds(64))
         {
-            auto const __monitor = __libcpp_atomic_monitor(__a);
+            auto const __monitor = __LIBCUDACXX_atomic_monitor(__a);
             if(__test_fn())
                 return true;
-            __libcpp_atomic_wait(__a, __monitor);
+            __LIBCUDACXX_atomic_wait(__a, __monitor);
         }
         else if(__elapsed > chrono::microseconds(4))
-            __libcpp_thread_yield();
+            __LIBCUDACXX_thread_yield();
         else
             {} // poll
         return false;
@@ -1508,46 +1508,46 @@ struct __libcpp_atomic_wait_backoff_impl {
 };
 
 template <class _Atp, class _Fn>
-_LIBCPP_AVAILABILITY_SYNC
-_LIBCPP_INLINE_VISIBILITY bool __cxx_atomic_wait(_Atp* __a, _Fn && __test_fn)
+_LIBCUDACXX_AVAILABILITY_SYNC
+_LIBCUDACXX_INLINE_VISIBILITY bool __cxx_atomic_wait(_Atp* __a, _Fn && __test_fn)
 {
-    __libcpp_atomic_wait_backoff_impl<_Atp, typename decay<_Fn>::type> __backoff_fn = {__a, __test_fn};
-    return __libcpp_thread_poll_with_backoff(__test_fn, __backoff_fn);
+    __LIBCUDACXX_atomic_wait_backoff_impl<_Atp, typename decay<_Fn>::type> __backoff_fn = {__a, __test_fn};
+    return __LIBCUDACXX_thread_poll_with_backoff(__test_fn, __backoff_fn);
 }
 
-#else // _LIBCPP_HAS_NO_PLATFORM_WAIT
+#else // _LIBCUDACXX_HAS_NO_PLATFORM_WAIT
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY void __cxx_atomic_notify_all(__cxx_atomic_impl<_Tp> const volatile*) { }
+_LIBCUDACXX_INLINE_VISIBILITY void __cxx_atomic_notify_all(__cxx_atomic_impl<_Tp> const volatile*) { }
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY void __cxx_atomic_notify_one(__cxx_atomic_impl<_Tp> const volatile*) { }
+_LIBCUDACXX_INLINE_VISIBILITY void __cxx_atomic_notify_one(__cxx_atomic_impl<_Tp> const volatile*) { }
 template <class _Atp, class _Fn>
-_LIBCPP_INLINE_VISIBILITY bool __cxx_atomic_wait(_Atp*, _Fn && __test_fn)
+_LIBCUDACXX_INLINE_VISIBILITY bool __cxx_atomic_wait(_Atp*, _Fn && __test_fn)
 {
-#if defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(_LIBCUDACXX_HAS_NO_THREADS)
     using _Policy = __spinning_backoff_policy;
 #else
-    using _Policy = __libcpp_timed_backoff_policy;
+    using _Policy = __LIBCUDACXX_timed_backoff_policy;
 #endif
-    return __libcpp_thread_poll_with_backoff(__test_fn, _Policy());
+    return __LIBCUDACXX_thread_poll_with_backoff(__test_fn, _Policy());
 }
 
-#endif // _LIBCPP_HAS_NO_PLATFORM_WAIT
+#endif // _LIBCUDACXX_HAS_NO_PLATFORM_WAIT
 
 template <class _Atp, class _Tp>
 struct __cxx_atomic_wait_test_fn_impl {
     _Atp* __a;
     _Tp __val;
     memory_order __order;
-    _LIBCPP_INLINE_VISIBILITY bool operator()() const
+    _LIBCUDACXX_INLINE_VISIBILITY bool operator()() const
     {
         return !__cxx_nonatomic_compare_equal(__cxx_atomic_load(__a, __order), __val);
     }
 };
 
 template <class _Atp, class _Tp>
-_LIBCPP_AVAILABILITY_SYNC
-_LIBCPP_INLINE_VISIBILITY bool __cxx_atomic_wait(_Atp* __a, _Tp const __val, memory_order __order)
+_LIBCUDACXX_AVAILABILITY_SYNC
+_LIBCUDACXX_INLINE_VISIBILITY bool __cxx_atomic_wait(_Atp* __a, _Tp const __val, memory_order __order)
 {
     __cxx_atomic_wait_test_fn_impl<_Atp, _Tp> __test_fn = {__a, __val, __order};
     return __cxx_atomic_wait(__a, __test_fn);
@@ -1561,100 +1561,100 @@ struct __atomic_base  // false
     mutable __cxx_atomic_impl<_Tp> __a_;
 
 #if defined(__cpp_lib_atomic_is_always_lock_free)
-  static _LIBCPP_CONSTEXPR bool is_always_lock_free = __atomic_always_lock_free(sizeof(__a_), 0);
+  static _LIBCUDACXX_CONSTEXPR bool is_always_lock_free = __atomic_always_lock_free(sizeof(__a_), 0);
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool is_lock_free() const volatile _NOEXCEPT
         {return __cxx_atomic_is_lock_free(sizeof(_Tp));}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool is_lock_free() const _NOEXCEPT
         {return static_cast<__atomic_base const volatile*>(this)->is_lock_free();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void store(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
-      _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m)
+      _LIBCUDACXX_CHECK_STORE_MEMORY_ORDER(__m)
         {__cxx_atomic_store(&__a_, __d, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void store(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT
-      _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m)
+      _LIBCUDACXX_CHECK_STORE_MEMORY_ORDER(__m)
         {__cxx_atomic_store(&__a_, __d, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp load(memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT
-      _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
+      _LIBCUDACXX_CHECK_LOAD_MEMORY_ORDER(__m)
         {return __cxx_atomic_load(&__a_, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp load(memory_order __m = memory_order_seq_cst) const _NOEXCEPT
-      _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
+      _LIBCUDACXX_CHECK_LOAD_MEMORY_ORDER(__m)
         {return __cxx_atomic_load(&__a_, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator _Tp() const volatile _NOEXCEPT {return load();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator _Tp() const _NOEXCEPT          {return load();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
         {return __cxx_atomic_exchange(&__a_, __d, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp exchange(_Tp __d, memory_order __m = memory_order_seq_cst) _NOEXCEPT
         {return __cxx_atomic_exchange(&__a_, __d, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool compare_exchange_weak(_Tp& __e, _Tp __d,
                                memory_order __s, memory_order __f) volatile _NOEXCEPT
-      _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
+      _LIBCUDACXX_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
         {return __cxx_atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool compare_exchange_weak(_Tp& __e, _Tp __d,
                                memory_order __s, memory_order __f) _NOEXCEPT
-      _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
+      _LIBCUDACXX_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
         {return __cxx_atomic_compare_exchange_weak(&__a_, &__e, __d, __s, __f);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool compare_exchange_strong(_Tp& __e, _Tp __d,
                                  memory_order __s, memory_order __f) volatile _NOEXCEPT
-      _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
+      _LIBCUDACXX_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
         {return __cxx_atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool compare_exchange_strong(_Tp& __e, _Tp __d,
                                  memory_order __s, memory_order __f) _NOEXCEPT
-      _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
+      _LIBCUDACXX_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
         {return __cxx_atomic_compare_exchange_strong(&__a_, &__e, __d, __s, __f);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool compare_exchange_weak(_Tp& __e, _Tp __d,
                               memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
         {return __cxx_atomic_compare_exchange_weak(&__a_, &__e, __d, __m, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool compare_exchange_weak(_Tp& __e, _Tp __d,
                                memory_order __m = memory_order_seq_cst) _NOEXCEPT
         {return __cxx_atomic_compare_exchange_weak(&__a_, &__e, __d, __m, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool compare_exchange_strong(_Tp& __e, _Tp __d,
                               memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
         {return __cxx_atomic_compare_exchange_strong(&__a_, &__e, __d, __m, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool compare_exchange_strong(_Tp& __e, _Tp __d,
                                  memory_order __m = memory_order_seq_cst) _NOEXCEPT
         {return __cxx_atomic_compare_exchange_strong(&__a_, &__e, __d, __m, __m);}
 
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT
         {__cxx_atomic_wait(&__a_, __v, __m);}
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY void wait(_Tp __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT
         {__cxx_atomic_wait(&__a_, __v, __m);}
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY void notify_one() volatile _NOEXCEPT
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY void notify_one() volatile _NOEXCEPT
         {__cxx_atomic_notify_one(&__a_);}
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY void notify_one() _NOEXCEPT
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY void notify_one() _NOEXCEPT
         {__cxx_atomic_notify_one(&__a_);}
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY void notify_all() volatile _NOEXCEPT
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY void notify_all() volatile _NOEXCEPT
         {__cxx_atomic_notify_all(&__a_);}
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY void notify_all() _NOEXCEPT
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY void notify_all() _NOEXCEPT
         {__cxx_atomic_notify_all(&__a_);}
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY constexpr
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr
     __atomic_base() noexcept(is_nothrow_default_constructible_v<_Tp>) : __a_(_Tp()) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __atomic_base() _NOEXCEPT = default;
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     __atomic_base(_Tp __d) _NOEXCEPT : __a_(__d) {}
 
     __atomic_base(const __atomic_base&) = delete;
@@ -1662,7 +1662,7 @@ struct __atomic_base  // false
 
 #if defined(__cpp_lib_atomic_is_always_lock_free)
 template <class _Tp, bool __b>
-_LIBCPP_CONSTEXPR bool __atomic_base<_Tp, __b>::is_always_lock_free;
+_LIBCUDACXX_CONSTEXPR bool __atomic_base<_Tp, __b>::is_always_lock_free;
 #endif
 
 // atomic<Integral>
@@ -1673,78 +1673,78 @@ struct __atomic_base<_Tp, true>
 {
     typedef __atomic_base<_Tp, false> __base;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __atomic_base() _NOEXCEPT = default;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __base(__d) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR __atomic_base(_Tp __d) _NOEXCEPT : __base(__d) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
         {return __cxx_atomic_fetch_add(&this->__a_, __op, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp fetch_add(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
         {return __cxx_atomic_fetch_add(&this->__a_, __op, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
         {return __cxx_atomic_fetch_sub(&this->__a_, __op, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp fetch_sub(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
         {return __cxx_atomic_fetch_sub(&this->__a_, __op, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
         {return __cxx_atomic_fetch_and(&this->__a_, __op, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp fetch_and(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
         {return __cxx_atomic_fetch_and(&this->__a_, __op, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
         {return __cxx_atomic_fetch_or(&this->__a_, __op, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp fetch_or(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
         {return __cxx_atomic_fetch_or(&this->__a_, __op, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
         {return __cxx_atomic_fetch_xor(&this->__a_, __op, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp fetch_xor(_Tp __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT
         {return __cxx_atomic_fetch_xor(&this->__a_, __op, __m);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator++(int) volatile _NOEXCEPT      {return fetch_add(_Tp(1));}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator++(int) _NOEXCEPT               {return fetch_add(_Tp(1));}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator--(int) volatile _NOEXCEPT      {return fetch_sub(_Tp(1));}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator--(int) _NOEXCEPT               {return fetch_sub(_Tp(1));}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator++() volatile _NOEXCEPT         {return fetch_add(_Tp(1)) + _Tp(1);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator++() _NOEXCEPT                  {return fetch_add(_Tp(1)) + _Tp(1);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator--() volatile _NOEXCEPT         {return fetch_sub(_Tp(1)) - _Tp(1);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator--() _NOEXCEPT                  {return fetch_sub(_Tp(1)) - _Tp(1);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator+=(_Tp __op) volatile _NOEXCEPT {return fetch_add(__op) + __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator+=(_Tp __op) _NOEXCEPT          {return fetch_add(__op) + __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator-=(_Tp __op) volatile _NOEXCEPT {return fetch_sub(__op) - __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator-=(_Tp __op) _NOEXCEPT          {return fetch_sub(__op) - __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator&=(_Tp __op) volatile _NOEXCEPT {return fetch_and(__op) & __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator&=(_Tp __op) _NOEXCEPT          {return fetch_and(__op) & __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator|=(_Tp __op) volatile _NOEXCEPT {return fetch_or(__op) | __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator|=(_Tp __op) _NOEXCEPT          {return fetch_or(__op) | __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator^=(_Tp __op) volatile _NOEXCEPT {return fetch_xor(__op) ^ __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator^=(_Tp __op) _NOEXCEPT          {return fetch_xor(__op) ^ __op;}
 };
 
@@ -1758,21 +1758,21 @@ struct atomic
     typedef _Tp value_type;
     typedef value_type 
diff erence_type;
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY
     atomic() = default;
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     atomic() _NOEXCEPT = default;
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR atomic(_Tp __d) _NOEXCEPT : __base(__d) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR atomic(_Tp __d) _NOEXCEPT : __base(__d) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator=(_Tp __d) volatile _NOEXCEPT
         {__base::store(__d); return __d;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator=(_Tp __d) _NOEXCEPT
         {__base::store(__d); return __d;}
 
@@ -1790,70 +1790,70 @@ struct atomic<_Tp*>
     typedef _Tp* value_type;
     typedef ptr
diff _t 
diff erence_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     atomic() _NOEXCEPT = default;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR atomic(_Tp* __d) _NOEXCEPT : __base(__d) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR atomic(_Tp* __d) _NOEXCEPT : __base(__d) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator=(_Tp* __d) volatile _NOEXCEPT
         {__base::store(__d); return __d;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator=(_Tp* __d) _NOEXCEPT
         {__base::store(__d); return __d;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* fetch_add(ptr
diff _t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
         // __atomic_fetch_add accepts function pointers, guard against them.
         static_assert(!is_function<typename remove_pointer<_Tp>::type>::value, "Pointer to function isn't allowed");
         return __cxx_atomic_fetch_add(&this->__a_, __op, __m);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* fetch_add(ptr
diff _t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
         // __atomic_fetch_add accepts function pointers, guard against them.
         static_assert(!is_function<typename remove_pointer<_Tp>::type>::value, "Pointer to function isn't allowed");
         return __cxx_atomic_fetch_add(&this->__a_, __op, __m);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* fetch_sub(ptr
diff _t __op, memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT {
         // __atomic_fetch_add accepts function pointers, guard against them.
         static_assert(!is_function<typename remove_pointer<_Tp>::type>::value, "Pointer to function isn't allowed");
         return __cxx_atomic_fetch_sub(&this->__a_, __op, __m);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* fetch_sub(ptr
diff _t __op, memory_order __m = memory_order_seq_cst) _NOEXCEPT {
         // __atomic_fetch_add accepts function pointers, guard against them.
         static_assert(!is_function<typename remove_pointer<_Tp>::type>::value, "Pointer to function isn't allowed");
         return __cxx_atomic_fetch_sub(&this->__a_, __op, __m);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator++(int) volatile _NOEXCEPT            {return fetch_add(1);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator++(int) _NOEXCEPT                     {return fetch_add(1);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator--(int) volatile _NOEXCEPT            {return fetch_sub(1);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator--(int) _NOEXCEPT                     {return fetch_sub(1);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator++() volatile _NOEXCEPT               {return fetch_add(1) + 1;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator++() _NOEXCEPT                        {return fetch_add(1) + 1;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator--() volatile _NOEXCEPT               {return fetch_sub(1) - 1;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator--() _NOEXCEPT                        {return fetch_sub(1) - 1;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator+=(ptr
diff _t __op) volatile _NOEXCEPT {return fetch_add(__op) + __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator+=(ptr
diff _t __op) _NOEXCEPT          {return fetch_add(__op) + __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator-=(ptr
diff _t __op) volatile _NOEXCEPT {return fetch_sub(__op) - __op;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp* operator-=(ptr
diff _t __op) _NOEXCEPT          {return fetch_sub(__op) - __op;}
 
     atomic& operator=(const atomic&) = delete;
@@ -1863,7 +1863,7 @@ struct atomic<_Tp*>
 // atomic_is_lock_free
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_is_lock_free(const volatile atomic<_Tp>* __o) _NOEXCEPT
 {
@@ -1871,7 +1871,7 @@ atomic_is_lock_free(const volatile atomic<_Tp>* __o) _NOEXCEPT
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_is_lock_free(const atomic<_Tp>* __o) _NOEXCEPT
 {
@@ -1881,7 +1881,7 @@ atomic_is_lock_free(const atomic<_Tp>* __o) _NOEXCEPT
 // atomic_init
 
 template <class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX20 _LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_init(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 {
@@ -1889,7 +1889,7 @@ atomic_init(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NO
 }
 
 template <class _Tp>
-_LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_IN_CXX20 _LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_init(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 {
@@ -1899,7 +1899,7 @@ atomic_init(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 // atomic_store
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_store(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 {
@@ -1907,7 +1907,7 @@ atomic_store(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _N
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_store(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 {
@@ -1917,19 +1917,19 @@ atomic_store(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 // atomic_store_explicit
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_store_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT
-  _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m)
+  _LIBCUDACXX_CHECK_STORE_MEMORY_ORDER(__m)
 {
     __o->store(__d, __m);
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_store_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT
-  _LIBCPP_CHECK_STORE_MEMORY_ORDER(__m)
+  _LIBCUDACXX_CHECK_STORE_MEMORY_ORDER(__m)
 {
     __o->store(__d, __m);
 }
@@ -1937,7 +1937,7 @@ atomic_store_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, me
 // atomic_load
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 atomic_load(const volatile atomic<_Tp>* __o) _NOEXCEPT
 {
@@ -1945,7 +1945,7 @@ atomic_load(const volatile atomic<_Tp>* __o) _NOEXCEPT
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 atomic_load(const atomic<_Tp>* __o) _NOEXCEPT
 {
@@ -1955,19 +1955,19 @@ atomic_load(const atomic<_Tp>* __o) _NOEXCEPT
 // atomic_load_explicit
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 atomic_load_explicit(const volatile atomic<_Tp>* __o, memory_order __m) _NOEXCEPT
-  _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
+  _LIBCUDACXX_CHECK_LOAD_MEMORY_ORDER(__m)
 {
     return __o->load(__m);
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 atomic_load_explicit(const atomic<_Tp>* __o, memory_order __m) _NOEXCEPT
-  _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
+  _LIBCUDACXX_CHECK_LOAD_MEMORY_ORDER(__m)
 {
     return __o->load(__m);
 }
@@ -1975,7 +1975,7 @@ atomic_load_explicit(const atomic<_Tp>* __o, memory_order __m) _NOEXCEPT
 // atomic_exchange
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 atomic_exchange(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 {
@@ -1983,7 +1983,7 @@ atomic_exchange(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d)
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 atomic_exchange(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 {
@@ -1993,7 +1993,7 @@ atomic_exchange(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d) _NOEXCEP
 // atomic_exchange_explicit
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 atomic_exchange_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT
 {
@@ -2001,7 +2001,7 @@ atomic_exchange_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 atomic_exchange_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d, memory_order __m) _NOEXCEPT
 {
@@ -2011,7 +2011,7 @@ atomic_exchange_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __d,
 // atomic_compare_exchange_weak
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_compare_exchange_weak(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 {
@@ -2019,7 +2019,7 @@ atomic_compare_exchange_weak(volatile atomic<_Tp>* __o, typename atomic<_Tp>::va
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_compare_exchange_weak(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 {
@@ -2029,7 +2029,7 @@ atomic_compare_exchange_weak(atomic<_Tp>* __o, typename atomic<_Tp>::value_type*
 // atomic_compare_exchange_strong
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_compare_exchange_strong(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 {
@@ -2037,7 +2037,7 @@ atomic_compare_exchange_strong(volatile atomic<_Tp>* __o, typename atomic<_Tp>::
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_compare_exchange_strong(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d) _NOEXCEPT
 {
@@ -2047,22 +2047,22 @@ atomic_compare_exchange_strong(atomic<_Tp>* __o, typename atomic<_Tp>::value_typ
 // atomic_compare_exchange_weak_explicit
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_compare_exchange_weak_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e,
                                       typename atomic<_Tp>::value_type __d,
                                       memory_order __s, memory_order __f) _NOEXCEPT
-  _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
+  _LIBCUDACXX_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
 {
     return __o->compare_exchange_weak(*__e, __d, __s, __f);
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_compare_exchange_weak_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d,
                                       memory_order __s, memory_order __f) _NOEXCEPT
-  _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
+  _LIBCUDACXX_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
 {
     return __o->compare_exchange_weak(*__e, __d, __s, __f);
 }
@@ -2070,23 +2070,23 @@ atomic_compare_exchange_weak_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::va
 // atomic_compare_exchange_strong_explicit
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_compare_exchange_strong_explicit(volatile atomic<_Tp>* __o,
                                         typename atomic<_Tp>::value_type* __e, typename atomic<_Tp>::value_type __d,
                                         memory_order __s, memory_order __f) _NOEXCEPT
-  _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
+  _LIBCUDACXX_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
 {
     return __o->compare_exchange_strong(*__e, __d, __s, __f);
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_compare_exchange_strong_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type* __e,
                                         typename atomic<_Tp>::value_type __d,
                                         memory_order __s, memory_order __f) _NOEXCEPT
-  _LIBCPP_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
+  _LIBCUDACXX_CHECK_EXCHANGE_MEMORY_ORDER(__s, __f)
 {
     return __o->compare_exchange_strong(*__e, __d, __s, __f);
 }
@@ -2094,7 +2094,7 @@ atomic_compare_exchange_strong_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::
 // atomic_wait
 
 template <class _Tp>
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
 void atomic_wait(const volatile atomic<_Tp>* __o,
                  typename atomic<_Tp>::value_type __v) _NOEXCEPT
 {
@@ -2102,7 +2102,7 @@ void atomic_wait(const volatile atomic<_Tp>* __o,
 }
 
 template <class _Tp>
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
 void atomic_wait(const atomic<_Tp>* __o,
                  typename atomic<_Tp>::value_type __v) _NOEXCEPT
 {
@@ -2112,21 +2112,21 @@ void atomic_wait(const atomic<_Tp>* __o,
 // atomic_wait_explicit
 
 template <class _Tp>
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
 void atomic_wait_explicit(const volatile atomic<_Tp>* __o,
                           typename atomic<_Tp>::value_type __v,
                           memory_order __m) _NOEXCEPT
-  _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
+  _LIBCUDACXX_CHECK_LOAD_MEMORY_ORDER(__m)
 {
     return __o->wait(__v, __m);
 }
 
 template <class _Tp>
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
 void atomic_wait_explicit(const atomic<_Tp>* __o,
                           typename atomic<_Tp>::value_type __v,
                           memory_order __m) _NOEXCEPT
-  _LIBCPP_CHECK_LOAD_MEMORY_ORDER(__m)
+  _LIBCUDACXX_CHECK_LOAD_MEMORY_ORDER(__m)
 {
     return __o->wait(__v, __m);
 }
@@ -2134,13 +2134,13 @@ void atomic_wait_explicit(const atomic<_Tp>* __o,
 // atomic_notify_one
 
 template <class _Tp>
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
 void atomic_notify_one(volatile atomic<_Tp>* __o) _NOEXCEPT
 {
     __o->notify_one();
 }
 template <class _Tp>
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
 void atomic_notify_one(atomic<_Tp>* __o) _NOEXCEPT
 {
     __o->notify_one();
@@ -2149,13 +2149,13 @@ void atomic_notify_one(atomic<_Tp>* __o) _NOEXCEPT
 // atomic_notify_one
 
 template <class _Tp>
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
 void atomic_notify_all(volatile atomic<_Tp>* __o) _NOEXCEPT
 {
     __o->notify_all();
 }
 template <class _Tp>
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
 void atomic_notify_all(atomic<_Tp>* __o) _NOEXCEPT
 {
     __o->notify_all();
@@ -2164,7 +2164,7 @@ void atomic_notify_all(atomic<_Tp>* __o) _NOEXCEPT
 // atomic_fetch_add
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 atomic_fetch_add(volatile atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence_type __op) _NOEXCEPT
 {
@@ -2172,7 +2172,7 @@ atomic_fetch_add(volatile atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence_typ
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 atomic_fetch_add(atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence_type __op) _NOEXCEPT
 {
@@ -2182,14 +2182,14 @@ atomic_fetch_add(atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence_type __op) _
 // atomic_fetch_add_explicit
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp atomic_fetch_add_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence_type __op, memory_order __m) _NOEXCEPT
 {
     return __o->fetch_add(__op, __m);
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp atomic_fetch_add_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence_type __op, memory_order __m) _NOEXCEPT
 {
     return __o->fetch_add(__op, __m);
@@ -2198,14 +2198,14 @@ _Tp atomic_fetch_add_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence
 // atomic_fetch_sub
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp atomic_fetch_sub(volatile atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence_type __op) _NOEXCEPT
 {
     return __o->fetch_sub(__op);
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp atomic_fetch_sub(atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence_type __op) _NOEXCEPT
 {
     return __o->fetch_sub(__op);
@@ -2214,14 +2214,14 @@ _Tp atomic_fetch_sub(atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence_type __o
 // atomic_fetch_sub_explicit
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp atomic_fetch_sub_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence_type __op, memory_order __m) _NOEXCEPT
 {
     return __o->fetch_sub(__op, __m);
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp atomic_fetch_sub_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence_type __op, memory_order __m) _NOEXCEPT
 {
     return __o->fetch_sub(__op, __m);
@@ -2230,7 +2230,7 @@ _Tp atomic_fetch_sub_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::
diff erence
 // atomic_fetch_and
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2242,7 +2242,7 @@ atomic_fetch_and(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __o
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2256,7 +2256,7 @@ atomic_fetch_and(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXC
 // atomic_fetch_and_explicit
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2268,7 +2268,7 @@ atomic_fetch_and_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2282,7 +2282,7 @@ atomic_fetch_and_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __o
 // atomic_fetch_or
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2294,7 +2294,7 @@ atomic_fetch_or(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2308,7 +2308,7 @@ atomic_fetch_or(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXCE
 // atomic_fetch_or_explicit
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2320,7 +2320,7 @@ atomic_fetch_or_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2334,7 +2334,7 @@ atomic_fetch_or_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op
 // atomic_fetch_xor
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2346,7 +2346,7 @@ atomic_fetch_xor(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value_type __o
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2360,7 +2360,7 @@ atomic_fetch_xor(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __op) _NOEXC
 // atomic_fetch_xor_explicit
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2372,7 +2372,7 @@ atomic_fetch_xor_explicit(volatile atomic<_Tp>* __o, typename atomic<_Tp>::value
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value && !is_same<_Tp, bool>::value,
@@ -2387,56 +2387,56 @@ atomic_fetch_xor_explicit(atomic<_Tp>* __o, typename atomic<_Tp>::value_type __o
 
 typedef struct atomic_flag
 {
-    __cxx_atomic_impl<_LIBCPP_ATOMIC_FLAG_TYPE> __a_;
+    __cxx_atomic_impl<_LIBCUDACXX_ATOMIC_FLAG_TYPE> __a_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool test(memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT
-        {return _LIBCPP_ATOMIC_FLAG_TYPE(true) == __cxx_atomic_load(&__a_, __m);}
-    _LIBCPP_INLINE_VISIBILITY
+        {return _LIBCUDACXX_ATOMIC_FLAG_TYPE(true) == __cxx_atomic_load(&__a_, __m);}
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool test(memory_order __m = memory_order_seq_cst) const _NOEXCEPT
-        {return _LIBCPP_ATOMIC_FLAG_TYPE(true) == __cxx_atomic_load(&__a_, __m);}
+        {return _LIBCUDACXX_ATOMIC_FLAG_TYPE(true) == __cxx_atomic_load(&__a_, __m);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool test_and_set(memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
-        {return __cxx_atomic_exchange(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(true), __m);}
-    _LIBCPP_INLINE_VISIBILITY
+        {return __cxx_atomic_exchange(&__a_, _LIBCUDACXX_ATOMIC_FLAG_TYPE(true), __m);}
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool test_and_set(memory_order __m = memory_order_seq_cst) _NOEXCEPT
-        {return __cxx_atomic_exchange(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(true), __m);}
-    _LIBCPP_INLINE_VISIBILITY
+        {return __cxx_atomic_exchange(&__a_, _LIBCUDACXX_ATOMIC_FLAG_TYPE(true), __m);}
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear(memory_order __m = memory_order_seq_cst) volatile _NOEXCEPT
-        {__cxx_atomic_store(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(false), __m);}
-    _LIBCPP_INLINE_VISIBILITY
+        {__cxx_atomic_store(&__a_, _LIBCUDACXX_ATOMIC_FLAG_TYPE(false), __m);}
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear(memory_order __m = memory_order_seq_cst) _NOEXCEPT
-        {__cxx_atomic_store(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(false), __m);}
+        {__cxx_atomic_store(&__a_, _LIBCUDACXX_ATOMIC_FLAG_TYPE(false), __m);}
 
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void wait(bool __v, memory_order __m = memory_order_seq_cst) const volatile _NOEXCEPT
-        {__cxx_atomic_wait(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(__v), __m);}
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+        {__cxx_atomic_wait(&__a_, _LIBCUDACXX_ATOMIC_FLAG_TYPE(__v), __m);}
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void wait(bool __v, memory_order __m = memory_order_seq_cst) const _NOEXCEPT
-        {__cxx_atomic_wait(&__a_, _LIBCPP_ATOMIC_FLAG_TYPE(__v), __m);}
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+        {__cxx_atomic_wait(&__a_, _LIBCUDACXX_ATOMIC_FLAG_TYPE(__v), __m);}
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void notify_one() volatile _NOEXCEPT
         {__cxx_atomic_notify_one(&__a_);}
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void notify_one() _NOEXCEPT
         {__cxx_atomic_notify_one(&__a_);}
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void notify_all() volatile _NOEXCEPT
         {__cxx_atomic_notify_all(&__a_);}
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void notify_all() _NOEXCEPT
         {__cxx_atomic_notify_all(&__a_);}
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY constexpr
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr
     atomic_flag() _NOEXCEPT : __a_(false) {}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     atomic_flag() _NOEXCEPT = default;
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     atomic_flag(bool __b) _NOEXCEPT : __a_(__b) {} // EXTENSION
 
     atomic_flag(const atomic_flag&) = delete;
@@ -2446,105 +2446,105 @@ typedef struct atomic_flag
 } atomic_flag;
 
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_flag_test(const volatile atomic_flag* __o) _NOEXCEPT
 {
     return __o->test();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_flag_test(const atomic_flag* __o) _NOEXCEPT
 {
     return __o->test();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_flag_test_explicit(const volatile atomic_flag* __o, memory_order __m) _NOEXCEPT
 {
     return __o->test(__m);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_flag_test_explicit(const atomic_flag* __o, memory_order __m) _NOEXCEPT
 {
     return __o->test(__m);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_flag_test_and_set(volatile atomic_flag* __o) _NOEXCEPT
 {
     return __o->test_and_set();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_flag_test_and_set(atomic_flag* __o) _NOEXCEPT
 {
     return __o->test_and_set();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_flag_test_and_set_explicit(volatile atomic_flag* __o, memory_order __m) _NOEXCEPT
 {
     return __o->test_and_set(__m);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 atomic_flag_test_and_set_explicit(atomic_flag* __o, memory_order __m) _NOEXCEPT
 {
     return __o->test_and_set(__m);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_flag_clear(volatile atomic_flag* __o) _NOEXCEPT
 {
     __o->clear();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_flag_clear(atomic_flag* __o) _NOEXCEPT
 {
     __o->clear();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_flag_clear_explicit(volatile atomic_flag* __o, memory_order __m) _NOEXCEPT
 {
     __o->clear(__m);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_flag_clear_explicit(atomic_flag* __o, memory_order __m) _NOEXCEPT
 {
     __o->clear(__m);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_SYNC
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_SYNC
 void
 atomic_flag_wait(const volatile atomic_flag* __o, bool __v) _NOEXCEPT
 {
     __o->wait(__v);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_SYNC
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_SYNC
 void
 atomic_flag_wait(const atomic_flag* __o, bool __v) _NOEXCEPT
 {
     __o->wait(__v);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_SYNC
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_SYNC
 void
 atomic_flag_wait_explicit(const volatile atomic_flag* __o,
                           bool __v, memory_order __m) _NOEXCEPT
@@ -2552,7 +2552,7 @@ atomic_flag_wait_explicit(const volatile atomic_flag* __o,
     __o->wait(__v, __m);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_SYNC
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_SYNC
 void
 atomic_flag_wait_explicit(const atomic_flag* __o,
                           bool __v, memory_order __m) _NOEXCEPT
@@ -2560,28 +2560,28 @@ atomic_flag_wait_explicit(const atomic_flag* __o,
     __o->wait(__v, __m);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_SYNC
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_SYNC
 void
 atomic_flag_notify_one(volatile atomic_flag* __o) _NOEXCEPT
 {
     __o->notify_one();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_SYNC
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_SYNC
 void
 atomic_flag_notify_one(atomic_flag* __o) _NOEXCEPT
 {
     __o->notify_one();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_SYNC
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_SYNC
 void
 atomic_flag_notify_all(volatile atomic_flag* __o) _NOEXCEPT
 {
     __o->notify_all();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_AVAILABILITY_SYNC
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_AVAILABILITY_SYNC
 void
 atomic_flag_notify_all(atomic_flag* __o) _NOEXCEPT
 {
@@ -2590,14 +2590,14 @@ atomic_flag_notify_all(atomic_flag* __o) _NOEXCEPT
 
 // fences
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_thread_fence(memory_order __m) _NOEXCEPT
 {
     __cxx_atomic_thread_fence(__m);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 atomic_signal_fence(memory_order __m) _NOEXCEPT
 {
@@ -2618,12 +2618,12 @@ typedef atomic<long>               atomic_long;
 typedef atomic<unsigned long>      atomic_ulong;
 typedef atomic<long long>          atomic_llong;
 typedef atomic<unsigned long long> atomic_ullong;
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 typedef atomic<char8_t>            atomic_char8_t;
 #endif
 typedef atomic<char16_t>           atomic_char16_t;
 typedef atomic<char32_t>           atomic_char32_t;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef atomic<wchar_t>            atomic_wchar_t;
 #endif
 
@@ -2664,42 +2664,42 @@ typedef atomic<uintmax_t> atomic_uintmax_t;
 // atomic_*_lock_free : prefer the contention type most highly, then the largest lock-free type
 
 #ifdef __cpp_lib_atomic_is_always_lock_free
-# define _LIBCPP_CONTENTION_LOCK_FREE __atomic_always_lock_free(sizeof(__cxx_contention_t), 0)
+# define _LIBCUDACXX_CONTENTION_LOCK_FREE __atomic_always_lock_free(sizeof(__cxx_contention_t), 0)
 #else
-# define _LIBCPP_CONTENTION_LOCK_FREE false
+# define _LIBCUDACXX_CONTENTION_LOCK_FREE false
 #endif
 
 #if ATOMIC_LLONG_LOCK_FREE == 2
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, long long>::type          __libcpp_signed_lock_free;
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned long long>::type __libcpp_unsigned_lock_free;
+typedef conditional<_LIBCUDACXX_CONTENTION_LOCK_FREE, __cxx_contention_t, long long>::type          __LIBCUDACXX_signed_lock_free;
+typedef conditional<_LIBCUDACXX_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned long long>::type __LIBCUDACXX_unsigned_lock_free;
 #elif ATOMIC_INT_LOCK_FREE == 2
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, int>::type                __libcpp_signed_lock_free;
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned int>::type       __libcpp_unsigned_lock_free;
+typedef conditional<_LIBCUDACXX_CONTENTION_LOCK_FREE, __cxx_contention_t, int>::type                __LIBCUDACXX_signed_lock_free;
+typedef conditional<_LIBCUDACXX_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned int>::type       __LIBCUDACXX_unsigned_lock_free;
 #elif ATOMIC_SHORT_LOCK_FREE == 2
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, short>::type              __libcpp_signed_lock_free;
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned short>::type     __libcpp_unsigned_lock_free;
+typedef conditional<_LIBCUDACXX_CONTENTION_LOCK_FREE, __cxx_contention_t, short>::type              __LIBCUDACXX_signed_lock_free;
+typedef conditional<_LIBCUDACXX_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned short>::type     __LIBCUDACXX_unsigned_lock_free;
 #elif ATOMIC_CHAR_LOCK_FREE == 2
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, char>::type               __libcpp_signed_lock_free;
-typedef conditional<_LIBCPP_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char>::type      __libcpp_unsigned_lock_free;
+typedef conditional<_LIBCUDACXX_CONTENTION_LOCK_FREE, __cxx_contention_t, char>::type               __LIBCUDACXX_signed_lock_free;
+typedef conditional<_LIBCUDACXX_CONTENTION_LOCK_FREE, __cxx_contention_t, unsigned char>::type      __LIBCUDACXX_unsigned_lock_free;
 #else
     // No signed/unsigned lock-free types
-#define _LIBCPP_NO_LOCK_FREE_TYPES
+#define _LIBCUDACXX_NO_LOCK_FREE_TYPES
 #endif
 
-#if !defined(_LIBCPP_NO_LOCK_FREE_TYPES)
-typedef atomic<__libcpp_signed_lock_free> atomic_signed_lock_free;
-typedef atomic<__libcpp_unsigned_lock_free> atomic_unsigned_lock_free;
+#if !defined(_LIBCUDACXX_NO_LOCK_FREE_TYPES)
+typedef atomic<__LIBCUDACXX_signed_lock_free> atomic_signed_lock_free;
+typedef atomic<__LIBCUDACXX_unsigned_lock_free> atomic_unsigned_lock_free;
 #endif
 
 #define ATOMIC_FLAG_INIT {false}
 #define ATOMIC_VAR_INIT(__v) {__v}
 
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
-# if defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER >= 1400
+#if _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS)
+# if defined(_LIBCUDACXX_CLANG_VER) && _LIBCUDACXX_CLANG_VER >= 1400
 #  pragma clang deprecated(ATOMIC_VAR_INIT)
 # endif
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_DISABLE_DEPRECATION_WARNINGS)
+#endif // _LIBCUDACXX_STD_VER > 17 && !defined(_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_ATOMIC
+#endif // _LIBCUDACXX_ATOMIC

diff  --git a/libcxx/include/barrier b/libcxx/include/barrier
index 00518035283f..c269d07de541 100644
--- a/libcxx/include/barrier
+++ b/libcxx/include/barrier
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_BARRIER
-#define _LIBCPP_BARRIER
+#ifndef _LIBCUDACXX_BARRIER
+#define _LIBCUDACXX_BARRIER
 
 /*
     barrier synopsis
@@ -53,30 +53,30 @@ namespace std
 #include <limits>
 #include <memory>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifdef _LIBCPP_HAS_NO_THREADS
+#ifdef _LIBCUDACXX_HAS_NO_THREADS
 # error "<barrier> is not supported since libc++ has been configured without support for threads."
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 struct __empty_completion
 {
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     void operator()() noexcept
     {
     }
 };
 
-#ifndef _LIBCPP_HAS_NO_TREE_BARRIER
+#ifndef _LIBCUDACXX_HAS_NO_TREE_BARRIER
 
 /*
 
@@ -96,14 +96,14 @@ using __barrier_phase_t = uint8_t;
 
 class __barrier_algorithm_base;
 
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_EXPORTED_FROM_ABI
 __barrier_algorithm_base* __construct_barrier_algorithm_base(ptr
diff _t& __expected);
 
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_EXPORTED_FROM_ABI
 bool __arrive_barrier_algorithm_base(__barrier_algorithm_base* __barrier,
                                      __barrier_phase_t __old_phase);
 
-_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI
+_LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_EXPORTED_FROM_ABI
 void __destroy_barrier_algorithm_base(__barrier_algorithm_base* __barrier);
 
 template<class _CompletionF>
@@ -122,14 +122,14 @@ public:
         return numeric_limits<ptr
diff _t>::max();
     }
 
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     __barrier_base(ptr
diff _t __expected, _CompletionF __completion = _CompletionF())
             : __expected_(__expected), __base_(__construct_barrier_algorithm_base(this->__expected_),
                                                &__destroy_barrier_algorithm_base),
               __expected_adjustment_(0), __completion_(std::move(__completion)), __phase_(0)
     {
     }
-    [[nodiscard]] _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    [[nodiscard]] _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     arrival_token arrive(ptr
diff _t __update)
     {
         auto const __old_phase = __phase_.load(memory_order_relaxed);
@@ -143,15 +143,15 @@ public:
             }
         return __old_phase;
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void wait(arrival_token&& __old_phase) const
     {
         auto const __test_fn = [this, __old_phase]() -> bool {
             return __phase_.load(memory_order_acquire) != __old_phase;
         };
-        __libcpp_thread_poll_with_backoff(__test_fn, __libcpp_timed_backoff_policy());
+        __LIBCUDACXX_thread_poll_with_backoff(__test_fn, __LIBCUDACXX_timed_backoff_policy());
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void arrive_and_drop()
     {
         __expected_adjustment_.fetch_sub(1, memory_order_relaxed);
@@ -188,12 +188,12 @@ public:
         return numeric_limits<ptr
diff _t>::max();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __barrier_base(ptr
diff _t __expected, _CompletionF __completion = _CompletionF())
         : __expected(__expected), __arrived(__expected), __completion(std::move(__completion)), __phase(false)
     {
     }
-    [[nodiscard]] _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    [[nodiscard]] _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     arrival_token arrive(ptr
diff _t update)
     {
         auto const __old_phase = __phase.load(memory_order_relaxed);
@@ -207,12 +207,12 @@ public:
         }
         return __old_phase;
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void wait(arrival_token&& __old_phase) const
     {
         __phase.wait(__old_phase, memory_order_acquire);
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void arrive_and_drop()
     {
         __expected.fetch_sub(1, memory_order_relaxed);
@@ -231,7 +231,7 @@ class __barrier_base<__empty_completion> {
 
     __atomic_base<uint64_t>   __phase_arrived_expected;
 
-    static _LIBCPP_INLINE_VISIBILITY
+    static _LIBCUDACXX_INLINE_VISIBILITY
     constexpr uint64_t __init(ptr
diff _t __count) _NOEXCEPT
     {
         return ((uint64_t(1u << 31) - __count) << 32)
@@ -245,12 +245,12 @@ public:
         return ptr
diff _t(1u << 31) - 1;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit inline __barrier_base(ptr
diff _t __count, __empty_completion = __empty_completion())
         : __phase_arrived_expected(__init(__count))
     {
     }
-    [[nodiscard]] inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    [[nodiscard]] inline _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     arrival_token arrive(ptr
diff _t update)
     {
         auto const __inc = __arrived_unit * update;
@@ -261,16 +261,16 @@ public:
         }
         return __old & __phase_bit;
     }
-    inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void wait(arrival_token&& __phase) const
     {
         auto const __test_fn = [=]() -> bool {
             uint64_t const __current = __phase_arrived_expected.load(memory_order_acquire);
             return ((__current & __phase_bit) != __phase);
         };
-        __libcpp_thread_poll_with_backoff(__test_fn, __libcpp_timed_backoff_policy());
+        __LIBCUDACXX_thread_poll_with_backoff(__test_fn, __LIBCUDACXX_timed_backoff_policy());
     }
-    inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void arrive_and_drop()
     {
         __phase_arrived_expected.fetch_add(__expected_unit, memory_order_relaxed);
@@ -278,7 +278,7 @@ public:
     }
 };
 
-#endif // !_LIBCPP_HAS_NO_TREE_BARRIER
+#endif // !_LIBCUDACXX_HAS_NO_TREE_BARRIER
 
 template<class _CompletionF = __empty_completion>
 class barrier {
@@ -291,40 +291,40 @@ public:
         return __barrier_base<_CompletionF>::max();
     }
 
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     barrier(ptr
diff _t __count, _CompletionF __completion = _CompletionF())
-        : __b(__count, _VSTD::move(__completion)) {
+        : __b(__count, _CUDA_VSTD::move(__completion)) {
     }
 
     barrier(barrier const&) = delete;
     barrier& operator=(barrier const&) = delete;
 
-    [[nodiscard]] _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    [[nodiscard]] _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     arrival_token arrive(ptr
diff _t __update = 1)
     {
         return __b.arrive(__update);
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void wait(arrival_token&& __phase) const
     {
-        __b.wait(_VSTD::move(__phase));
+        __b.wait(_CUDA_VSTD::move(__phase));
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void arrive_and_wait()
     {
         wait(arrive());
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void arrive_and_drop()
     {
         __b.arrive_and_drop();
     }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER >= 14
+#endif // _LIBCUDACXX_STD_VER >= 14
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif //_LIBCPP_BARRIER
+#endif //_LIBCUDACXX_BARRIER

diff  --git a/libcxx/include/bit b/libcxx/include/bit
index 15bc13a504b1..d8f9c50b8bba 100644
--- a/libcxx/include/bit
+++ b/libcxx/include/bit
@@ -7,8 +7,8 @@
 //
 //===---------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_BIT
-#define _LIBCPP_BIT
+#ifndef _LIBCUDACXX_BIT
+#define _LIBCUDACXX_BIT
 
 /*
     bit synopsis
@@ -64,35 +64,35 @@ namespace std {
 #include <__assert> // all public C++ headers provide the assertion handler
 #include <__bit/bit_cast.h>
 #include <__bit/byteswap.h>
-#include <__bits> // __libcpp_clz
+#include <__bits> // __LIBCUDACXX_clz
 #include <__concepts/arithmetic.h>
 #include <__config>
 #include <limits>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <iosfwd>
 #endif
 
-#if defined(_LIBCPP_COMPILER_MSVC)
+#if defined(_LIBCUDACXX_COMPILER_MSVC)
 #  include <intrin.h>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template<class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp __rotr(_Tp __t, unsigned int __cnt) _NOEXCEPT
 {
-    static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__rotr requires an unsigned integer type");
+    static_assert(__LIBCUDACXX_is_unsigned_integer<_Tp>::value, "__rotr requires an unsigned integer type");
     const unsigned int __dig = numeric_limits<_Tp>::digits;
     if ((__cnt % __dig) == 0)
         return __t;
@@ -100,21 +100,21 @@ _Tp __rotr(_Tp __t, unsigned int __cnt) _NOEXCEPT
 }
 
 template<class _Tp>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 int __countl_zero(_Tp __t) _NOEXCEPT
 {
-    static_assert(__libcpp_is_unsigned_integer<_Tp>::value, "__countl_zero requires an unsigned integer type");
+    static_assert(__LIBCUDACXX_is_unsigned_integer<_Tp>::value, "__countl_zero requires an unsigned integer type");
     if (__t == 0)
         return numeric_limits<_Tp>::digits;
 
     if      (sizeof(_Tp) <= sizeof(unsigned int))
-        return std::__libcpp_clz(static_cast<unsigned int>(__t))
+        return std::__LIBCUDACXX_clz(static_cast<unsigned int>(__t))
               - (numeric_limits<unsigned int>::digits - numeric_limits<_Tp>::digits);
     else if (sizeof(_Tp) <= sizeof(unsigned long))
-        return std::__libcpp_clz(static_cast<unsigned long>(__t))
+        return std::__LIBCUDACXX_clz(static_cast<unsigned long>(__t))
               - (numeric_limits<unsigned long>::digits - numeric_limits<_Tp>::digits);
     else if (sizeof(_Tp) <= sizeof(unsigned long long))
-        return std::__libcpp_clz(static_cast<unsigned long long>(__t))
+        return std::__LIBCUDACXX_clz(static_cast<unsigned long long>(__t))
               - (numeric_limits<unsigned long long>::digits - numeric_limits<_Tp>::digits);
     else
     {
@@ -131,42 +131,42 @@ int __countl_zero(_Tp __t) _NOEXCEPT
     }
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp rotl(_Tp __t, unsigned int __cnt) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp rotl(_Tp __t, unsigned int __cnt) noexcept {
   const unsigned int __dig = numeric_limits<_Tp>::digits;
   if ((__cnt % __dig) == 0)
     return __t;
   return (__t << (__cnt % __dig)) | (__t >> (__dig - (__cnt % __dig)));
 }
 
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp rotr(_Tp __t, unsigned int __cnt) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp rotr(_Tp __t, unsigned int __cnt) noexcept {
   return std::__rotr(__t, __cnt);
 }
 
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr int countl_zero(_Tp __t) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr int countl_zero(_Tp __t) noexcept {
   return std::__countl_zero(__t);
 }
 
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr int countl_one(_Tp __t) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr int countl_one(_Tp __t) noexcept {
   return __t != numeric_limits<_Tp>::max() ? std::countl_zero(static_cast<_Tp>(~__t)) : numeric_limits<_Tp>::digits;
 }
 
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr int countr_zero(_Tp __t) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr int countr_zero(_Tp __t) noexcept {
   if (__t == 0)
     return numeric_limits<_Tp>::digits;
 
   if (sizeof(_Tp) <= sizeof(unsigned int))
-    return std::__libcpp_ctz(static_cast<unsigned int>(__t));
+    return std::__LIBCUDACXX_ctz(static_cast<unsigned int>(__t));
   else if (sizeof(_Tp) <= sizeof(unsigned long))
-    return std::__libcpp_ctz(static_cast<unsigned long>(__t));
+    return std::__LIBCUDACXX_ctz(static_cast<unsigned long>(__t));
   else if (sizeof(_Tp) <= sizeof(unsigned long long))
-    return std::__libcpp_ctz(static_cast<unsigned long long>(__t));
+    return std::__LIBCUDACXX_ctz(static_cast<unsigned long long>(__t));
   else {
     int __ret = 0;
     const unsigned int __ulldigits = numeric_limits<unsigned long long>::digits;
@@ -174,55 +174,55 @@ _LIBCPP_HIDE_FROM_ABI constexpr int countr_zero(_Tp __t) noexcept {
       __ret += __ulldigits;
       __t >>= __ulldigits;
     }
-    return __ret + std::__libcpp_ctz(static_cast<unsigned long long>(__t));
+    return __ret + std::__LIBCUDACXX_ctz(static_cast<unsigned long long>(__t));
   }
 }
 
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr int countr_one(_Tp __t) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr int countr_one(_Tp __t) noexcept {
   return __t != numeric_limits<_Tp>::max() ? std::countr_zero(static_cast<_Tp>(~__t)) : numeric_limits<_Tp>::digits;
 }
 
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr int popcount(_Tp __t) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr int popcount(_Tp __t) noexcept {
   if (sizeof(_Tp) <= sizeof(unsigned int))
-    return std::__libcpp_popcount(static_cast<unsigned int>(__t));
+    return std::__LIBCUDACXX_popcount(static_cast<unsigned int>(__t));
   else if (sizeof(_Tp) <= sizeof(unsigned long))
-    return std::__libcpp_popcount(static_cast<unsigned long>(__t));
+    return std::__LIBCUDACXX_popcount(static_cast<unsigned long>(__t));
   else if (sizeof(_Tp) <= sizeof(unsigned long long))
-    return std::__libcpp_popcount(static_cast<unsigned long long>(__t));
+    return std::__LIBCUDACXX_popcount(static_cast<unsigned long long>(__t));
   else {
     int __ret = 0;
     while (__t != 0) {
-      __ret += std::__libcpp_popcount(static_cast<unsigned long long>(__t));
+      __ret += std::__LIBCUDACXX_popcount(static_cast<unsigned long long>(__t));
       __t >>= numeric_limits<unsigned long long>::digits;
     }
     return __ret;
   }
 }
 
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr bool has_single_bit(_Tp __t) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr bool has_single_bit(_Tp __t) noexcept {
   return __t != 0 && (((__t & (__t - 1)) == 0));
 }
 
 // integral log base 2
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp __bit_log2(_Tp __t) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp __bit_log2(_Tp __t) noexcept {
   return numeric_limits<_Tp>::digits - 1 - std::countl_zero(__t);
 }
 
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp bit_floor(_Tp __t) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp bit_floor(_Tp __t) noexcept {
   return __t == 0 ? 0 : _Tp{1} << std::__bit_log2(__t);
 }
 
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr _Tp bit_ceil(_Tp __t) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr _Tp bit_ceil(_Tp __t) noexcept {
   if (__t < 2)
     return 1;
   const unsigned __n = numeric_limits<_Tp>::digits - std::countl_zero((_Tp)(__t - 1u));
-  _LIBCPP_ASSERT(__n != numeric_limits<_Tp>::digits, "Bad input to bit_ceil");
+  _LIBCUDACXX_ASSERT(__n != numeric_limits<_Tp>::digits, "Bad input to bit_ceil");
 
   if constexpr (sizeof(_Tp) >= sizeof(unsigned))
     return _Tp{1} << __n;
@@ -233,27 +233,27 @@ _LIBCPP_HIDE_FROM_ABI constexpr _Tp bit_ceil(_Tp __t) noexcept {
   }
 }
 
-template <__libcpp_unsigned_integer _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr int bit_width(_Tp __t) noexcept {
+template <__LIBCUDACXX_unsigned_integer _Tp>
+_LIBCUDACXX_HIDE_FROM_ABI constexpr int bit_width(_Tp __t) noexcept {
   return __t == 0 ? 0 : std::__bit_log2(__t) + 1;
 }
 
 enum class endian {
   little = 0xDEAD,
   big = 0xFACE,
-#  if defined(_LIBCPP_LITTLE_ENDIAN)
+#  if defined(_LIBCUDACXX_LITTLE_ENDIAN)
   native = little
-#  elif defined(_LIBCPP_BIG_ENDIAN)
+#  elif defined(_LIBCUDACXX_BIG_ENDIAN)
   native = big
 #  else
   native = 0xCAFE
 #  endif
 };
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_BIT
+#endif // _LIBCUDACXX_BIT

diff  --git a/libcxx/include/bitset b/libcxx/include/bitset
index 0f997cef8316..f8639322aa5a 100644
--- a/libcxx/include/bitset
+++ b/libcxx/include/bitset
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_BITSET
-#define _LIBCPP_BITSET
+#ifndef _LIBCUDACXX_BITSET
+#define _LIBCUDACXX_BITSET
 
 /*
     bitset synopsis
@@ -127,15 +127,15 @@ template <size_t N> struct hash<std::bitset<N>>;
 #include <iosfwd>
 #include <string>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <size_t _N_words, size_t _Size>
 class __bitset;
@@ -172,68 +172,68 @@ protected:
     typedef __bit_iterator<__bitset, false>            iterator;
     typedef __bit_iterator<__bitset, true>             const_iterator;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR __bitset() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
-    explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long __v) _NOEXCEPT;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR __bitset() _NOEXCEPT;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    explicit _LIBCUDACXX_CONSTEXPR __bitset(unsigned long long __v) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY reference __make_ref(size_t __pos) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY reference __make_ref(size_t __pos) _NOEXCEPT
         {return reference(__first_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __make_ref(size_t __pos) const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR const_reference __make_ref(size_t __pos) const _NOEXCEPT
         {return const_reference(__first_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);}
-    _LIBCPP_INLINE_VISIBILITY iterator __make_iter(size_t __pos) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY iterator __make_iter(size_t __pos) _NOEXCEPT
         {return iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}
-    _LIBCPP_INLINE_VISIBILITY const_iterator __make_iter(size_t __pos) const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY const_iterator __make_iter(size_t __pos) const _NOEXCEPT
         {return const_iterator(__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator&=(const __bitset& __v) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator|=(const __bitset& __v) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator^=(const __bitset& __v) _NOEXCEPT;
 
     void flip() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY unsigned long to_ulong() const
+    _LIBCUDACXX_INLINE_VISIBILITY unsigned long to_ulong() const
         {return to_ulong(integral_constant<bool, _Size < sizeof(unsigned long) * CHAR_BIT>());}
-    _LIBCPP_INLINE_VISIBILITY unsigned long long to_ullong() const
+    _LIBCUDACXX_INLINE_VISIBILITY unsigned long long to_ullong() const
         {return to_ullong(integral_constant<bool, _Size < sizeof(unsigned long long) * CHAR_BIT>());}
 
     bool all() const _NOEXCEPT;
     bool any() const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t __hash_code() const _NOEXCEPT;
 private:
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
     void __init(unsigned long long __v, false_type) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __init(unsigned long long __v, true_type) _NOEXCEPT;
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
     unsigned long to_ulong(false_type) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unsigned long to_ulong(true_type) const;
     unsigned long long to_ullong(false_type) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unsigned long long to_ullong(true_type) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unsigned long long to_ullong(true_type, false_type) const;
     unsigned long long to_ullong(true_type, true_type) const;
 };
 
 template <size_t _N_words, size_t _Size>
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 __bitset<_N_words, _Size>::__bitset() _NOEXCEPT
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     : __first_{0}
 #endif
 {
-#ifdef _LIBCPP_CXX03_LANG
-    _VSTD::fill_n(__first_, _N_words, __storage_type(0));
+#ifdef _LIBCUDACXX_CXX03_LANG
+    _CUDA_VSTD::fill_n(__first_, _N_words, __storage_type(0));
 #endif
 }
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
 
 template <size_t _N_words, size_t _Size>
 void
@@ -247,13 +247,13 @@ __bitset<_N_words, _Size>::__init(unsigned long long __v, false_type) _NOEXCEPT
         else
             __t[__i] = static_cast<__storage_type>(__v);
 
-    _VSTD::copy(__t, __t + sizeof(__t)/sizeof(__t[0]), __first_);
-    _VSTD::fill(__first_ + sizeof(__t)/sizeof(__t[0]), __first_ + sizeof(__first_)/sizeof(__first_[0]),
+    _CUDA_VSTD::copy(__t, __t + sizeof(__t)/sizeof(__t[0]), __first_);
+    _CUDA_VSTD::fill(__first_ + sizeof(__t)/sizeof(__t[0]), __first_ + sizeof(__first_)/sizeof(__first_[0]),
                __storage_type(0));
 }
 
 template <size_t _N_words, size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 __bitset<_N_words, _Size>::__init(unsigned long long __v, true_type) _NOEXCEPT
 {
@@ -261,16 +261,16 @@ __bitset<_N_words, _Size>::__init(unsigned long long __v, true_type) _NOEXCEPT
     if (_Size < __bits_per_word)
         __first_[0] &= ( 1ULL << _Size ) - 1;
 
-    _VSTD::fill(__first_ + 1, __first_ + sizeof(__first_)/sizeof(__first_[0]), __storage_type(0));
+    _CUDA_VSTD::fill(__first_ + 1, __first_ + sizeof(__first_)/sizeof(__first_[0]), __storage_type(0));
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <size_t _N_words, size_t _Size>
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 #if __SIZEOF_SIZE_T__ == 8
     : __first_{__v}
 #elif __SIZEOF_SIZE_T__ == 4
@@ -282,7 +282,7 @@ __bitset<_N_words, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
 #endif
 #endif
 {
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
     __init(__v, integral_constant<bool, sizeof(unsigned long long) == sizeof(__storage_type)>());
 #endif
 }
@@ -338,7 +338,7 @@ unsigned long
 __bitset<_N_words, _Size>::to_ulong(false_type) const
 {
     const_iterator __e = __make_iter(_Size);
-    const_iterator __i = _VSTD::find(__make_iter(sizeof(unsigned long) * CHAR_BIT), __e, true);
+    const_iterator __i = _CUDA_VSTD::find(__make_iter(sizeof(unsigned long) * CHAR_BIT), __e, true);
     if (__i != __e)
         __throw_overflow_error("bitset to_ulong overflow error");
 
@@ -358,7 +358,7 @@ unsigned long long
 __bitset<_N_words, _Size>::to_ullong(false_type) const
 {
     const_iterator __e = __make_iter(_Size);
-    const_iterator __i = _VSTD::find(__make_iter(sizeof(unsigned long long) * CHAR_BIT), __e, true);
+    const_iterator __i = _CUDA_VSTD::find(__make_iter(sizeof(unsigned long long) * CHAR_BIT), __e, true);
     if (__i != __e)
         __throw_overflow_error("bitset to_ullong overflow error");
 
@@ -468,47 +468,47 @@ protected:
     typedef __bit_iterator<__bitset, false>            iterator;
     typedef __bit_iterator<__bitset, true>             const_iterator;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR __bitset() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
-    explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long __v) _NOEXCEPT;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR __bitset() _NOEXCEPT;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    explicit _LIBCUDACXX_CONSTEXPR __bitset(unsigned long long __v) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY reference __make_ref(size_t __pos) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY reference __make_ref(size_t __pos) _NOEXCEPT
         {return reference(&__first_, __storage_type(1) << __pos);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __make_ref(size_t __pos) const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR const_reference __make_ref(size_t __pos) const _NOEXCEPT
         {return const_reference(&__first_, __storage_type(1) << __pos);}
-    _LIBCPP_INLINE_VISIBILITY iterator __make_iter(size_t __pos) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY iterator __make_iter(size_t __pos) _NOEXCEPT
         {return iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}
-    _LIBCPP_INLINE_VISIBILITY const_iterator __make_iter(size_t __pos) const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY const_iterator __make_iter(size_t __pos) const _NOEXCEPT
         {return const_iterator(&__first_ + __pos / __bits_per_word, __pos % __bits_per_word);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator&=(const __bitset& __v) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator|=(const __bitset& __v) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator^=(const __bitset& __v) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void flip() _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unsigned long to_ulong() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unsigned long long to_ullong() const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool all() const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool any() const _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t __hash_code() const _NOEXCEPT;
 };
 
 template <size_t _Size>
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 __bitset<1, _Size>::__bitset() _NOEXCEPT
     : __first_(0)
 {
@@ -516,7 +516,7 @@ __bitset<1, _Size>::__bitset() _NOEXCEPT
 
 template <size_t _Size>
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 __bitset<1, _Size>::__bitset(unsigned long long __v) _NOEXCEPT
     : __first_(
         _Size == __bits_per_word ? static_cast<__storage_type>(__v)
@@ -625,52 +625,52 @@ protected:
     typedef __bit_iterator<__bitset, false>            iterator;
     typedef __bit_iterator<__bitset, true>             const_iterator;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR __bitset() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
-    explicit _LIBCPP_CONSTEXPR __bitset(unsigned long long) _NOEXCEPT;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR __bitset() _NOEXCEPT;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    explicit _LIBCUDACXX_CONSTEXPR __bitset(unsigned long long) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY reference __make_ref(size_t) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY reference __make_ref(size_t) _NOEXCEPT
         {return reference(nullptr, 1);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR const_reference __make_ref(size_t) const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR const_reference __make_ref(size_t) const _NOEXCEPT
         {return const_reference(nullptr, 1);}
-    _LIBCPP_INLINE_VISIBILITY iterator __make_iter(size_t) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY iterator __make_iter(size_t) _NOEXCEPT
         {return iterator(nullptr, 0);}
-    _LIBCPP_INLINE_VISIBILITY const_iterator __make_iter(size_t) const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY const_iterator __make_iter(size_t) const _NOEXCEPT
         {return const_iterator(nullptr, 0);}
 
-    _LIBCPP_INLINE_VISIBILITY void operator&=(const __bitset&) _NOEXCEPT {}
-    _LIBCPP_INLINE_VISIBILITY void operator|=(const __bitset&) _NOEXCEPT {}
-    _LIBCPP_INLINE_VISIBILITY void operator^=(const __bitset&) _NOEXCEPT {}
+    _LIBCUDACXX_INLINE_VISIBILITY void operator&=(const __bitset&) _NOEXCEPT {}
+    _LIBCUDACXX_INLINE_VISIBILITY void operator|=(const __bitset&) _NOEXCEPT {}
+    _LIBCUDACXX_INLINE_VISIBILITY void operator^=(const __bitset&) _NOEXCEPT {}
 
-    _LIBCPP_INLINE_VISIBILITY void flip() _NOEXCEPT {}
+    _LIBCUDACXX_INLINE_VISIBILITY void flip() _NOEXCEPT {}
 
-    _LIBCPP_INLINE_VISIBILITY unsigned long to_ulong() const {return 0;}
-    _LIBCPP_INLINE_VISIBILITY unsigned long long to_ullong() const {return 0;}
+    _LIBCUDACXX_INLINE_VISIBILITY unsigned long to_ulong() const {return 0;}
+    _LIBCUDACXX_INLINE_VISIBILITY unsigned long long to_ullong() const {return 0;}
 
-    _LIBCPP_INLINE_VISIBILITY bool all() const _NOEXCEPT {return true;}
-    _LIBCPP_INLINE_VISIBILITY bool any() const _NOEXCEPT {return false;}
+    _LIBCUDACXX_INLINE_VISIBILITY bool all() const _NOEXCEPT {return true;}
+    _LIBCUDACXX_INLINE_VISIBILITY bool any() const _NOEXCEPT {return false;}
 
-    _LIBCPP_INLINE_VISIBILITY size_t __hash_code() const _NOEXCEPT {return 0;}
+    _LIBCUDACXX_INLINE_VISIBILITY size_t __hash_code() const _NOEXCEPT {return 0;}
 };
 
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 __bitset<0, 0>::__bitset() _NOEXCEPT
 {
 }
 
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 __bitset<0, 0>::__bitset(unsigned long long) _NOEXCEPT
 {
 }
 
-template <size_t _Size> class _LIBCPP_TEMPLATE_VIS bitset;
+template <size_t _Size> class _LIBCUDACXX_TEMPLATE_VIS bitset;
 template <size_t _Size> struct hash<bitset<_Size> >;
 
 template <size_t _Size>
-class _LIBCPP_TEMPLATE_VIS bitset
+class _LIBCUDACXX_TEMPLATE_VIS bitset
     : private __bitset<_Size == 0 ? 0 : (_Size - 1) / (sizeof(size_t) * CHAR_BIT) + 1, _Size>
 {
 public:
@@ -682,8 +682,8 @@ public:
     typedef typename base::const_reference const_reference;
 
     // 23.3.5.1 constructors:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR bitset() _NOEXCEPT {}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR bitset() _NOEXCEPT {}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
         bitset(unsigned long long __v) _NOEXCEPT : base(__v) {}
     template<class _CharT, class = __enable_if_t<_IsCharLikeType<_CharT>::value> >
         explicit bitset(const _CharT* __str,
@@ -697,72 +697,72 @@ public:
                         _CharT __zero = _CharT('0'), _CharT __one = _CharT('1'));
 
     // 23.3.5.2 bitset operations:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bitset& operator&=(const bitset& __rhs) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bitset& operator|=(const bitset& __rhs) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bitset& operator^=(const bitset& __rhs) _NOEXCEPT;
     bitset& operator<<=(size_t __pos) _NOEXCEPT;
     bitset& operator>>=(size_t __pos) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bitset& set() _NOEXCEPT;
     bitset& set(size_t __pos, bool __val = true);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bitset& reset() _NOEXCEPT;
     bitset& reset(size_t __pos);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bitset  operator~() const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bitset& flip() _NOEXCEPT;
     bitset& flip(size_t __pos);
 
     // element access:
-#ifdef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR            bool operator[](size_t __p) const {return base::__make_ref(__p);}
+#ifdef _LIBCUDACXX_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR            bool operator[](size_t __p) const {return base::__make_ref(__p);}
 #else
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const_reference operator[](size_t __p) const {return base::__make_ref(__p);}
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR const_reference operator[](size_t __p) const {return base::__make_ref(__p);}
 #endif
-    _LIBCPP_HIDE_FROM_ABI                         reference operator[](size_t __p)       {return base::__make_ref(__p);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_HIDE_FROM_ABI                         reference operator[](size_t __p)       {return base::__make_ref(__p);}
+    _LIBCUDACXX_INLINE_VISIBILITY
     unsigned long to_ulong() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unsigned long long to_ullong() const;
     template <class _CharT, class _Traits, class _Allocator>
         basic_string<_CharT, _Traits, _Allocator> to_string(_CharT __zero = _CharT('0'),
                                                             _CharT __one = _CharT('1')) const;
     template <class _CharT, class _Traits>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         basic_string<_CharT, _Traits, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'),
                                                                     _CharT __one = _CharT('1')) const;
     template <class _CharT>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > to_string(_CharT __zero = _CharT('0'),
                                                                                 _CharT __one = _CharT('1')) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_string<char, char_traits<char>, allocator<char> > to_string(char __zero = '0',
                                                                       char __one = '1') const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t count() const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR size_t size() const _NOEXCEPT {return _Size;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR size_t size() const _NOEXCEPT {return _Size;}
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const bitset& __rhs) const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const bitset& __rhs) const _NOEXCEPT;
     bool test(size_t __pos) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool all() const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool any() const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY bool none() const _NOEXCEPT {return !any();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY bool none() const _NOEXCEPT {return !any();}
+    _LIBCUDACXX_INLINE_VISIBILITY
     bitset operator<<(size_t __pos) const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bitset operator>>(size_t __pos) const _NOEXCEPT;
 
 private:
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t __hash_code() const _NOEXCEPT {return base::__hash_code();}
 
     friend struct hash<bitset>;
@@ -774,19 +774,19 @@ bitset<_Size>::bitset(const _CharT* __str,
                       typename basic_string<_CharT>::size_type __n,
                       _CharT __zero, _CharT __one)
 {
-    size_t __rlen = _VSTD::min(__n, char_traits<_CharT>::length(__str));
+    size_t __rlen = _CUDA_VSTD::min(__n, char_traits<_CharT>::length(__str));
     for (size_t __i = 0; __i < __rlen; ++__i)
         if (__str[__i] != __zero && __str[__i] != __one)
             __throw_invalid_argument("bitset string ctor has invalid argument");
 
-    size_t _Mp = _VSTD::min(__rlen, _Size);
+    size_t _Mp = _CUDA_VSTD::min(__rlen, _Size);
     size_t __i = 0;
     for (; __i < _Mp; ++__i)
     {
         _CharT __c = __str[_Mp - 1 - __i];
         (*this)[__i] = (__c == __one);
     }
-    _VSTD::fill(base::__make_iter(__i), base::__make_iter(_Size), false);
+    _CUDA_VSTD::fill(base::__make_iter(__i), base::__make_iter(_Size), false);
 }
 
 template <size_t _Size>
@@ -799,19 +799,19 @@ bitset<_Size>::bitset(const basic_string<_CharT,_Traits,_Allocator>& __str,
     if (__pos > __str.size())
         __throw_out_of_range("bitset string pos out of range");
 
-    size_t __rlen = _VSTD::min(__n, __str.size() - __pos);
+    size_t __rlen = _CUDA_VSTD::min(__n, __str.size() - __pos);
     for (size_t __i = __pos; __i < __pos + __rlen; ++__i)
         if (!_Traits::eq(__str[__i], __zero) && !_Traits::eq(__str[__i], __one))
             __throw_invalid_argument("bitset string ctor has invalid argument");
 
-    size_t _Mp = _VSTD::min(__rlen, _Size);
+    size_t _Mp = _CUDA_VSTD::min(__rlen, _Size);
     size_t __i = 0;
     for (; __i < _Mp; ++__i)
     {
         _CharT __c = __str[__pos + _Mp - 1 - __i];
         (*this)[__i] = _Traits::eq(__c, __one);
     }
-    _VSTD::fill(base::__make_iter(__i), base::__make_iter(_Size), false);
+    _CUDA_VSTD::fill(base::__make_iter(__i), base::__make_iter(_Size), false);
 }
 
 template <size_t _Size>
@@ -845,9 +845,9 @@ template <size_t _Size>
 bitset<_Size>&
 bitset<_Size>::operator<<=(size_t __pos) _NOEXCEPT
 {
-    __pos = _VSTD::min(__pos, _Size);
-    _VSTD::copy_backward(base::__make_iter(0), base::__make_iter(_Size - __pos), base::__make_iter(_Size));
-    _VSTD::fill_n(base::__make_iter(0), __pos, false);
+    __pos = _CUDA_VSTD::min(__pos, _Size);
+    _CUDA_VSTD::copy_backward(base::__make_iter(0), base::__make_iter(_Size - __pos), base::__make_iter(_Size));
+    _CUDA_VSTD::fill_n(base::__make_iter(0), __pos, false);
     return *this;
 }
 
@@ -855,9 +855,9 @@ template <size_t _Size>
 bitset<_Size>&
 bitset<_Size>::operator>>=(size_t __pos) _NOEXCEPT
 {
-    __pos = _VSTD::min(__pos, _Size);
-    _VSTD::copy(base::__make_iter(__pos), base::__make_iter(_Size), base::__make_iter(0));
-    _VSTD::fill_n(base::__make_iter(_Size - __pos), __pos, false);
+    __pos = _CUDA_VSTD::min(__pos, _Size);
+    _CUDA_VSTD::copy(base::__make_iter(__pos), base::__make_iter(_Size), base::__make_iter(0));
+    _CUDA_VSTD::fill_n(base::__make_iter(_Size - __pos), __pos, false);
     return *this;
 }
 
@@ -866,7 +866,7 @@ inline
 bitset<_Size>&
 bitset<_Size>::set() _NOEXCEPT
 {
-    _VSTD::fill_n(base::__make_iter(0), _Size, true);
+    _CUDA_VSTD::fill_n(base::__make_iter(0), _Size, true);
     return *this;
 }
 
@@ -886,7 +886,7 @@ inline
 bitset<_Size>&
 bitset<_Size>::reset() _NOEXCEPT
 {
-    _VSTD::fill_n(base::__make_iter(0), _Size, false);
+    _CUDA_VSTD::fill_n(base::__make_iter(0), _Size, false);
     return *this;
 }
 
@@ -993,7 +993,7 @@ inline
 size_t
 bitset<_Size>::count() const _NOEXCEPT
 {
-    return static_cast<size_t>(_VSTD::__count_bool_true(base::__make_iter(0), _Size));
+    return static_cast<size_t>(_CUDA_VSTD::__count_bool_true(base::__make_iter(0), _Size));
 }
 
 template <size_t _Size>
@@ -1001,7 +1001,7 @@ inline
 bool
 bitset<_Size>::operator==(const bitset& __rhs) const _NOEXCEPT
 {
-    return _VSTD::equal(base::__make_iter(0), base::__make_iter(_Size), __rhs.__make_iter(0));
+    return _CUDA_VSTD::equal(base::__make_iter(0), base::__make_iter(_Size), __rhs.__make_iter(0));
 }
 
 template <size_t _Size>
@@ -1059,7 +1059,7 @@ bitset<_Size>::operator>>(size_t __pos) const _NOEXCEPT
 }
 
 template <size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bitset<_Size>
 operator&(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
 {
@@ -1069,7 +1069,7 @@ operator&(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
 }
 
 template <size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bitset<_Size>
 operator|(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
 {
@@ -1079,7 +1079,7 @@ operator|(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
 }
 
 template <size_t _Size>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bitset<_Size>
 operator^(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
 {
@@ -1089,10 +1089,10 @@ operator^(const bitset<_Size>& __x, const bitset<_Size>& __y) _NOEXCEPT
 }
 
 template <size_t _Size>
-struct _LIBCPP_TEMPLATE_VIS hash<bitset<_Size> >
+struct _LIBCUDACXX_TEMPLATE_VIS hash<bitset<_Size> >
     : public __unary_function<bitset<_Size>, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const bitset<_Size>& __bs) const _NOEXCEPT
         {return __bs.__hash_code();}
 };
@@ -1105,8 +1105,8 @@ template <class _CharT, class _Traits, size_t _Size>
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x);
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_BITSET
+#endif // _LIBCUDACXX_BITSET

diff  --git a/libcxx/include/cassert b/libcxx/include/cassert
index 28fc0b10e9f4..acc56d05341e 100644
--- a/libcxx/include/cassert
+++ b/libcxx/include/cassert
@@ -20,6 +20,6 @@ Macros:
 #include <__config>
 #include <assert.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif

diff  --git a/libcxx/include/ccomplex b/libcxx/include/ccomplex
index cf05c7a91081..ee95c3e13988 100644
--- a/libcxx/include/ccomplex
+++ b/libcxx/include/ccomplex
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CCOMPLEX
-#define _LIBCPP_CCOMPLEX
+#ifndef _LIBCUDACXX_CCOMPLEX
+#define _LIBCUDACXX_CCOMPLEX
 
 /*
     ccomplex synopsis
@@ -20,8 +20,8 @@
 #include <__assert> // all public C++ headers provide the assertion handler
 #include <complex>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_CCOMPLEX
+#endif // _LIBCUDACXX_CCOMPLEX

diff  --git a/libcxx/include/cctype b/libcxx/include/cctype
index 248f8d98000f..6018d81ca16e 100644
--- a/libcxx/include/cctype
+++ b/libcxx/include/cctype
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CCTYPE
-#define _LIBCPP_CCTYPE
+#ifndef _LIBCUDACXX_CCTYPE
+#define _LIBCUDACXX_CCTYPE
 
 /*
     cctype synopsis
@@ -38,11 +38,11 @@ int toupper(int c);
 #include <__config>
 #include <ctype.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #ifdef isalnum
 #undef isalnum
@@ -101,21 +101,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 #endif
 
 
-using ::isalnum _LIBCPP_USING_IF_EXISTS;
-using ::isalpha _LIBCPP_USING_IF_EXISTS;
-using ::isblank _LIBCPP_USING_IF_EXISTS;
-using ::iscntrl _LIBCPP_USING_IF_EXISTS;
-using ::isdigit _LIBCPP_USING_IF_EXISTS;
-using ::isgraph _LIBCPP_USING_IF_EXISTS;
-using ::islower _LIBCPP_USING_IF_EXISTS;
-using ::isprint _LIBCPP_USING_IF_EXISTS;
-using ::ispunct _LIBCPP_USING_IF_EXISTS;
-using ::isspace _LIBCPP_USING_IF_EXISTS;
-using ::isupper _LIBCPP_USING_IF_EXISTS;
-using ::isxdigit _LIBCPP_USING_IF_EXISTS;
-using ::tolower _LIBCPP_USING_IF_EXISTS;
-using ::toupper _LIBCPP_USING_IF_EXISTS;
-
-_LIBCPP_END_NAMESPACE_STD
-
-#endif // _LIBCPP_CCTYPE
+using ::isalnum _LIBCUDACXX_USING_IF_EXISTS;
+using ::isalpha _LIBCUDACXX_USING_IF_EXISTS;
+using ::isblank _LIBCUDACXX_USING_IF_EXISTS;
+using ::iscntrl _LIBCUDACXX_USING_IF_EXISTS;
+using ::isdigit _LIBCUDACXX_USING_IF_EXISTS;
+using ::isgraph _LIBCUDACXX_USING_IF_EXISTS;
+using ::islower _LIBCUDACXX_USING_IF_EXISTS;
+using ::isprint _LIBCUDACXX_USING_IF_EXISTS;
+using ::ispunct _LIBCUDACXX_USING_IF_EXISTS;
+using ::isspace _LIBCUDACXX_USING_IF_EXISTS;
+using ::isupper _LIBCUDACXX_USING_IF_EXISTS;
+using ::isxdigit _LIBCUDACXX_USING_IF_EXISTS;
+using ::tolower _LIBCUDACXX_USING_IF_EXISTS;
+using ::toupper _LIBCUDACXX_USING_IF_EXISTS;
+
+_LIBCUDACXX_END_NAMESPACE_STD
+
+#endif // _LIBCUDACXX_CCTYPE

diff  --git a/libcxx/include/cerrno b/libcxx/include/cerrno
index e9eacd35effe..7a4e7c56ae22 100644
--- a/libcxx/include/cerrno
+++ b/libcxx/include/cerrno
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CERRNO
-#define _LIBCPP_CERRNO
+#ifndef _LIBCUDACXX_CERRNO
+#define _LIBCUDACXX_CERRNO
 
 /*
     cerrno synopsis
@@ -26,8 +26,8 @@ Macros:
 #include <__config>
 #include <errno.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_CERRNO
+#endif // _LIBCUDACXX_CERRNO

diff  --git a/libcxx/include/cfenv b/libcxx/include/cfenv
index e42b46680d15..bca525c0206e 100644
--- a/libcxx/include/cfenv
+++ b/libcxx/include/cfenv
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CFENV
-#define _LIBCPP_CFENV
+#ifndef _LIBCUDACXX_CFENV
+#define _LIBCUDACXX_CFENV
 
 /*
     cfenv synopsis
@@ -56,27 +56,27 @@ int feupdateenv(const fenv_t* envp);
 #include <__config>
 #include <fenv.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-using ::fenv_t _LIBCPP_USING_IF_EXISTS;
-using ::fexcept_t _LIBCPP_USING_IF_EXISTS;
+using ::fenv_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::fexcept_t _LIBCUDACXX_USING_IF_EXISTS;
 
-using ::feclearexcept _LIBCPP_USING_IF_EXISTS;
-using ::fegetexceptflag _LIBCPP_USING_IF_EXISTS;
-using ::feraiseexcept _LIBCPP_USING_IF_EXISTS;
-using ::fesetexceptflag _LIBCPP_USING_IF_EXISTS;
-using ::fetestexcept _LIBCPP_USING_IF_EXISTS;
-using ::fegetround _LIBCPP_USING_IF_EXISTS;
-using ::fesetround _LIBCPP_USING_IF_EXISTS;
-using ::fegetenv _LIBCPP_USING_IF_EXISTS;
-using ::feholdexcept _LIBCPP_USING_IF_EXISTS;
-using ::fesetenv _LIBCPP_USING_IF_EXISTS;
-using ::feupdateenv _LIBCPP_USING_IF_EXISTS;
+using ::feclearexcept _LIBCUDACXX_USING_IF_EXISTS;
+using ::fegetexceptflag _LIBCUDACXX_USING_IF_EXISTS;
+using ::feraiseexcept _LIBCUDACXX_USING_IF_EXISTS;
+using ::fesetexceptflag _LIBCUDACXX_USING_IF_EXISTS;
+using ::fetestexcept _LIBCUDACXX_USING_IF_EXISTS;
+using ::fegetround _LIBCUDACXX_USING_IF_EXISTS;
+using ::fesetround _LIBCUDACXX_USING_IF_EXISTS;
+using ::fegetenv _LIBCUDACXX_USING_IF_EXISTS;
+using ::feholdexcept _LIBCUDACXX_USING_IF_EXISTS;
+using ::fesetenv _LIBCUDACXX_USING_IF_EXISTS;
+using ::feupdateenv _LIBCUDACXX_USING_IF_EXISTS;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_CFENV
+#endif // _LIBCUDACXX_CFENV

diff  --git a/libcxx/include/cfloat b/libcxx/include/cfloat
index 36a7c51cdda5..19eadff7e62e 100644
--- a/libcxx/include/cfloat
+++ b/libcxx/include/cfloat
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CFLOAT
-#define _LIBCPP_CFLOAT
+#ifndef _LIBCUDACXX_CFLOAT
+#define _LIBCUDACXX_CFLOAT
 
 /*
     cfloat synopsis
@@ -73,8 +73,8 @@ Macros:
 #include <__config>
 #include <float.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_CFLOAT
+#endif // _LIBCUDACXX_CFLOAT

diff  --git a/libcxx/include/charconv b/libcxx/include/charconv
index 4f00755a83bb..2cbdfd42da37 100644
--- a/libcxx/include/charconv
+++ b/libcxx/include/charconv
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CHARCONV
-#define _LIBCPP_CHARCONV
+#ifndef _LIBCUDACXX_CHARCONV
+#define _LIBCUDACXX_CHARCONV
 
 /*
     charconv synopsis
@@ -97,20 +97,20 @@ namespace std {
 #include <limits>
 #include <type_traits>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <iosfwd>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 to_chars_result to_chars(char*, char*, bool, int = 10) = delete;
 from_chars_result from_chars(const char*, const char*, bool, int = 10) = delete;
@@ -119,10 +119,10 @@ namespace __itoa
 {
 
 template <typename _Tp, typename = void>
-struct _LIBCPP_HIDDEN __traits_base;
+struct _LIBCUDACXX_HIDDEN __traits_base;
 
 template <typename _Tp>
-struct _LIBCPP_HIDDEN __traits_base<_Tp, __enable_if_t<sizeof(_Tp) <= sizeof(uint32_t)>>
+struct _LIBCUDACXX_HIDDEN __traits_base<_Tp, __enable_if_t<sizeof(_Tp) <= sizeof(uint32_t)>>
 {
     using type = uint32_t;
 
@@ -130,26 +130,26 @@ struct _LIBCPP_HIDDEN __traits_base<_Tp, __enable_if_t<sizeof(_Tp) <= sizeof(uin
     ///
     /// The algorithm is based on
     /// http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10
-    /// Instead of using IntegerLogBase2 it uses __libcpp_clz. Since that
+    /// Instead of using IntegerLogBase2 it uses __LIBCUDACXX_clz. Since that
     /// function requires its input to have at least one bit set the value of
     /// zero is set to one. This means the first element of the lookup table is
     /// zero.
-    static _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v)
+    static _LIBCUDACXX_HIDE_FROM_ABI int __width(_Tp __v)
     {
-        auto __t = (32 - std::__libcpp_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
+        auto __t = (32 - std::__LIBCUDACXX_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
         return __t - (__v < __table<>::__pow10_32[__t]) + 1;
     }
 
-    static _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v)
+    static _LIBCUDACXX_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v)
     {
         return __itoa::__base_10_u32(__p, __v);
     }
 
-    static _LIBCPP_HIDE_FROM_ABI decltype(__table<>::__pow10_32)& __pow() { return __table<>::__pow10_32; }
+    static _LIBCUDACXX_HIDE_FROM_ABI decltype(__table<>::__pow10_32)& __pow() { return __table<>::__pow10_32; }
 };
 
 template <typename _Tp>
-struct _LIBCPP_HIDDEN
+struct _LIBCUDACXX_HIDDEN
     __traits_base<_Tp, __enable_if_t<sizeof(_Tp) == sizeof(uint64_t)>> {
   using type = uint64_t;
 
@@ -157,24 +157,24 @@ struct _LIBCPP_HIDDEN
   ///
   /// The algorithm is based on
   /// http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10
-  /// Instead of using IntegerLogBase2 it uses __libcpp_clz. Since that
+  /// Instead of using IntegerLogBase2 it uses __LIBCUDACXX_clz. Since that
   /// function requires its input to have at least one bit set the value of
   /// zero is set to one. This means the first element of the lookup table is
   /// zero.
-  static _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v) {
-    auto __t = (64 - std::__libcpp_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
+  static _LIBCUDACXX_HIDE_FROM_ABI int __width(_Tp __v) {
+    auto __t = (64 - std::__LIBCUDACXX_clz(static_cast<type>(__v | 1))) * 1233 >> 12;
     return __t - (__v < __table<>::__pow10_64[__t]) + 1;
   }
 
-  static _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v) { return __itoa::__base_10_u64(__p, __v); }
+  static _LIBCUDACXX_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v) { return __itoa::__base_10_u64(__p, __v); }
 
-  static _LIBCPP_HIDE_FROM_ABI decltype(__table<>::__pow10_64)& __pow() { return __table<>::__pow10_64; }
+  static _LIBCUDACXX_HIDE_FROM_ABI decltype(__table<>::__pow10_64)& __pow() { return __table<>::__pow10_64; }
 };
 
 
-#  ifndef _LIBCPP_HAS_NO_INT128
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
 template <typename _Tp>
-struct _LIBCPP_HIDDEN
+struct _LIBCUDACXX_HIDDEN
     __traits_base<_Tp, __enable_if_t<sizeof(_Tp) == sizeof(__uint128_t)> > {
   using type = __uint128_t;
 
@@ -182,29 +182,29 @@ struct _LIBCPP_HIDDEN
   ///
   /// The algorithm is based on
   /// http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog10
-  /// Instead of using IntegerLogBase2 it uses __libcpp_clz. Since that
+  /// Instead of using IntegerLogBase2 it uses __LIBCUDACXX_clz. Since that
   /// function requires its input to have at least one bit set the value of
   /// zero is set to one. This means the first element of the lookup table is
   /// zero.
-  static _LIBCPP_HIDE_FROM_ABI int __width(_Tp __v) {
-    _LIBCPP_ASSERT(__v > numeric_limits<uint64_t>::max(), "The optimizations for this algorithm fail when this isn't true.");
+  static _LIBCUDACXX_HIDE_FROM_ABI int __width(_Tp __v) {
+    _LIBCUDACXX_ASSERT(__v > numeric_limits<uint64_t>::max(), "The optimizations for this algorithm fail when this isn't true.");
     // There's always a bit set in the upper 64-bits.
-    auto __t = (128 - std::__libcpp_clz(static_cast<uint64_t>(__v >> 64))) * 1233 >> 12;
-    _LIBCPP_ASSERT(__t >= __table<>::__pow10_128_offset, "Index out of bounds");
+    auto __t = (128 - std::__LIBCUDACXX_clz(static_cast<uint64_t>(__v >> 64))) * 1233 >> 12;
+    _LIBCUDACXX_ASSERT(__t >= __table<>::__pow10_128_offset, "Index out of bounds");
     // __t is adjusted since the lookup table misses the lower entries.
     return __t - (__v < __table<>::__pow10_128[__t - __table<>::__pow10_128_offset]) + 1;
   }
 
-  static _LIBCPP_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v) { return __itoa::__base_10_u128(__p, __v); }
+  static _LIBCUDACXX_HIDE_FROM_ABI char* __convert(char* __p, _Tp __v) { return __itoa::__base_10_u128(__p, __v); }
 
   // TODO FMT This pow function should get an index.
   // By moving this to its own header it can be reused by the pow function in to_chars_base_10.
-  static _LIBCPP_HIDE_FROM_ABI decltype(__table<>::__pow10_128)& __pow() { return __table<>::__pow10_128; }
+  static _LIBCUDACXX_HIDE_FROM_ABI decltype(__table<>::__pow10_128)& __pow() { return __table<>::__pow10_128; }
 };
 #endif
 
 template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCUDACXX_HIDE_FROM_ABI bool
 __mul_overflowed(unsigned char __a, _Tp __b, unsigned char& __r)
 {
     auto __c = __a * __b;
@@ -213,7 +213,7 @@ __mul_overflowed(unsigned char __a, _Tp __b, unsigned char& __r)
 }
 
 template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCUDACXX_HIDE_FROM_ABI bool
 __mul_overflowed(unsigned short __a, _Tp __b, unsigned short& __r)
 {
     auto __c = __a * __b;
@@ -222,11 +222,11 @@ __mul_overflowed(unsigned short __a, _Tp __b, unsigned short& __r)
 }
 
 template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCUDACXX_HIDE_FROM_ABI bool
 __mul_overflowed(_Tp __a, _Tp __b, _Tp& __r)
 {
     static_assert(is_unsigned<_Tp>::value, "");
-#if !defined(_LIBCPP_COMPILER_MSVC)
+#if !defined(_LIBCUDACXX_COMPILER_MSVC)
     return __builtin_mul_overflow(__a, __b, &__r);
 #else
     bool __did = __b && (numeric_limits<_Tp>::max() / __b) < __a;
@@ -236,21 +236,21 @@ __mul_overflowed(_Tp __a, _Tp __b, _Tp& __r)
 }
 
 template <typename _Tp, typename _Up>
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCUDACXX_HIDE_FROM_ABI bool
 __mul_overflowed(_Tp __a, _Up __b, _Tp& __r)
 {
     return __mul_overflowed(__a, static_cast<_Tp>(__b), __r);
 }
 
 template <typename _Tp>
-struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
+struct _LIBCUDACXX_HIDDEN __traits : __traits_base<_Tp>
 {
     static constexpr int digits = numeric_limits<_Tp>::digits10 + 1;
     using __traits_base<_Tp>::__pow;
     using typename __traits_base<_Tp>::type;
 
     // precondition: at least one non-zero character available
-    static _LIBCPP_HIDE_FROM_ABI char const*
+    static _LIBCUDACXX_HIDE_FROM_ABI char const*
     __read(char const* __p, char const* __ep, type& __a, type& __b)
     {
         type __cprod[digits];
@@ -271,7 +271,7 @@ struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
     }
 
     template <typename _It1, typename _It2, class _Up>
-    static _LIBCPP_HIDE_FROM_ABI _Up
+    static _LIBCUDACXX_HIDE_FROM_ABI _Up
     __inner_product(_It1 __first1, _It1 __last1, _It2 __first2, _Up __init)
     {
         for (; __first1 < __last1; ++__first1, ++__first2)
@@ -283,7 +283,7 @@ struct _LIBCPP_HIDDEN __traits : __traits_base<_Tp>
 }  // namespace __itoa
 
 template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI _Tp
+inline _LIBCUDACXX_HIDE_FROM_ABI _Tp
 __complement(_Tp __x)
 {
     static_assert(is_unsigned<_Tp>::value, "cast to unsigned first");
@@ -291,7 +291,7 @@ __complement(_Tp __x)
 }
 
 template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI to_chars_result
 __to_chars_itoa(char* __first, char* __last, _Tp __value, true_type)
 {
     auto __x = __to_unsigned_like(__value);
@@ -305,7 +305,7 @@ __to_chars_itoa(char* __first, char* __last, _Tp __value, true_type)
 }
 
 template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI to_chars_result
 __to_chars_itoa(char* __first, char* __last, _Tp __value, false_type)
 {
     using __tx = __itoa::__traits<_Tp>;
@@ -317,9 +317,9 @@ __to_chars_itoa(char* __first, char* __last, _Tp __value, false_type)
         return {__last, errc::value_too_large};
 }
 
-#  ifndef _LIBCPP_HAS_NO_INT128
+#  ifndef _LIBCUDACXX_HAS_NO_INT128
 template <>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI to_chars_result
 __to_chars_itoa(char* __first, char* __last, __uint128_t __value, false_type)
 {
     // When the value fits in 64-bits use the 64-bit code path. This reduces
@@ -340,7 +340,7 @@ __to_chars_itoa(char* __first, char* __last, __uint128_t __value, false_type)
 #endif
 
 template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI to_chars_result
 __to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
                     true_type)
 {
@@ -357,20 +357,20 @@ __to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
 namespace __itoa {
 
 template <unsigned _Base>
-struct _LIBCPP_HIDDEN __integral;
+struct _LIBCUDACXX_HIDDEN __integral;
 
 template <>
-struct _LIBCPP_HIDDEN __integral<2> {
+struct _LIBCUDACXX_HIDDEN __integral<2> {
   template <typename _Tp>
-  _LIBCPP_HIDE_FROM_ABI static constexpr int __width(_Tp __value) noexcept {
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr int __width(_Tp __value) noexcept {
     // If value == 0 still need one digit. If the value != this has no
     // effect since the code scans for the most significant bit set. (Note
-    // that __libcpp_clz doesn't work for 0.)
-    return numeric_limits<_Tp>::digits - std::__libcpp_clz(__value | 1);
+    // that __LIBCUDACXX_clz doesn't work for 0.)
+    return numeric_limits<_Tp>::digits - std::__LIBCUDACXX_clz(__value | 1);
   }
 
   template <typename _Tp>
-  _LIBCPP_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
+  _LIBCUDACXX_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
     ptr
diff _t __cap = __last - __first;
     int __n = __width(__value);
     if (__n > __cap)
@@ -395,17 +395,17 @@ struct _LIBCPP_HIDDEN __integral<2> {
 };
 
 template <>
-struct _LIBCPP_HIDDEN __integral<8> {
+struct _LIBCUDACXX_HIDDEN __integral<8> {
   template <typename _Tp>
-  _LIBCPP_HIDE_FROM_ABI static constexpr int __width(_Tp __value) noexcept {
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr int __width(_Tp __value) noexcept {
     // If value == 0 still need one digit. If the value != this has no
     // effect since the code scans for the most significat bit set. (Note
-    // that __libcpp_clz doesn't work for 0.)
-    return ((numeric_limits<_Tp>::digits - std::__libcpp_clz(__value | 1)) + 2) / 3;
+    // that __LIBCUDACXX_clz doesn't work for 0.)
+    return ((numeric_limits<_Tp>::digits - std::__LIBCUDACXX_clz(__value | 1)) + 2) / 3;
   }
 
   template <typename _Tp>
-  _LIBCPP_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
+  _LIBCUDACXX_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
     ptr
diff _t __cap = __last - __first;
     int __n = __width(__value);
     if (__n > __cap)
@@ -431,17 +431,17 @@ struct _LIBCPP_HIDDEN __integral<8> {
 };
 
 template <>
-struct _LIBCPP_HIDDEN __integral<16> {
+struct _LIBCUDACXX_HIDDEN __integral<16> {
   template <typename _Tp>
-  _LIBCPP_HIDE_FROM_ABI static constexpr int __width(_Tp __value) noexcept {
+  _LIBCUDACXX_HIDE_FROM_ABI static constexpr int __width(_Tp __value) noexcept {
     // If value == 0 still need one digit. If the value != this has no
     // effect since the code scans for the most significat bit set. (Note
-    // that __libcpp_clz doesn't work for 0.)
-    return (numeric_limits<_Tp>::digits - std::__libcpp_clz(__value | 1) + 3) / 4;
+    // that __LIBCUDACXX_clz doesn't work for 0.)
+    return (numeric_limits<_Tp>::digits - std::__LIBCUDACXX_clz(__value | 1) + 3) / 4;
   }
 
   template <typename _Tp>
-  _LIBCPP_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
+  _LIBCUDACXX_HIDE_FROM_ABI static to_chars_result __to_chars(char* __first, char* __last, _Tp __value) {
     ptr
diff _t __cap = __last - __first;
     int __n = __width(__value);
     if (__n > __cap)
@@ -470,36 +470,36 @@ struct _LIBCPP_HIDDEN __integral<16> {
 
 template <unsigned _Base, typename _Tp,
           typename enable_if<(sizeof(_Tp) >= sizeof(unsigned)), int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI int
+_LIBCUDACXX_HIDE_FROM_ABI int
 __to_chars_integral_width(_Tp __value) {
   return __itoa::__integral<_Base>::__width(__value);
 }
 
 template <unsigned _Base, typename _Tp,
           typename enable_if<(sizeof(_Tp) < sizeof(unsigned)), int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI int
+_LIBCUDACXX_HIDE_FROM_ABI int
 __to_chars_integral_width(_Tp __value) {
   return std::__to_chars_integral_width<_Base>(static_cast<unsigned>(__value));
 }
 
 template <unsigned _Base, typename _Tp,
           typename enable_if<(sizeof(_Tp) >= sizeof(unsigned)), int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI to_chars_result
+_LIBCUDACXX_HIDE_FROM_ABI to_chars_result
 __to_chars_integral(char* __first, char* __last, _Tp __value) {
   return __itoa::__integral<_Base>::__to_chars(__first, __last, __value);
 }
 
 template <unsigned _Base, typename _Tp,
           typename enable_if<(sizeof(_Tp) < sizeof(unsigned)), int>::type = 0>
-_LIBCPP_HIDE_FROM_ABI to_chars_result
+_LIBCUDACXX_HIDE_FROM_ABI to_chars_result
 __to_chars_integral(char* __first, char* __last, _Tp __value) {
   return std::__to_chars_integral<_Base>(__first, __last, static_cast<unsigned>(__value));
 }
 
 template <typename _Tp>
-_LIBCPP_HIDE_FROM_ABI int
+_LIBCUDACXX_HIDE_FROM_ABI int
 __to_chars_integral_width(_Tp __value, unsigned __base) {
-  _LIBCPP_ASSERT(__value >= 0, "The function requires a non-negative value.");
+  _LIBCUDACXX_ASSERT(__value >= 0, "The function requires a non-negative value.");
 
   unsigned __base_2 = __base * __base;
   unsigned __base_3 = __base_2 * __base;
@@ -520,11 +520,11 @@ __to_chars_integral_width(_Tp __value, unsigned __base) {
     __r += 4;
   }
 
-  __libcpp_unreachable();
+  __LIBCUDACXX_unreachable();
 }
 
 template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI to_chars_result
 __to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
                     false_type)
 {
@@ -556,7 +556,7 @@ __to_chars_integral(char* __first, char* __last, _Tp __value, int __base,
 }
 
 template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI to_chars_result
 to_chars(char* __first, char* __last, _Tp __value)
 {
   using _Type = __make_32_64_or_128_bit_t<_Tp>;
@@ -565,17 +565,17 @@ to_chars(char* __first, char* __last, _Tp __value)
 }
 
 template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI to_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI to_chars_result
 to_chars(char* __first, char* __last, _Tp __value, int __base)
 {
-  _LIBCPP_ASSERT(2 <= __base && __base <= 36, "base not in [2, 36]");
+  _LIBCUDACXX_ASSERT(2 <= __base && __base <= 36, "base not in [2, 36]");
 
   using _Type = __make_32_64_or_128_bit_t<_Tp>;
   return std::__to_chars_integral(__first, __last, static_cast<_Type>(__value), __base, is_signed<_Tp>());
 }
 
 template <typename _It, typename _Tp, typename _Fn, typename... _Ts>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI from_chars_result
 __sign_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, _Ts... __args)
 {
     using __tl = numeric_limits<_Tp>;
@@ -615,22 +615,22 @@ __sign_combinator(_It __first, _It __last, _Tp& __value, _Fn __f, _Ts... __args)
 }
 
 template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI bool
+inline _LIBCUDACXX_HIDE_FROM_ABI bool
 __in_pattern(_Tp __c)
 {
     return '0' <= __c && __c <= '9';
 }
 
-struct _LIBCPP_HIDDEN __in_pattern_result
+struct _LIBCUDACXX_HIDDEN __in_pattern_result
 {
     bool __ok;
     int __val;
 
-    explicit _LIBCPP_HIDE_FROM_ABI operator bool() const { return __ok; }
+    explicit _LIBCUDACXX_HIDE_FROM_ABI operator bool() const { return __ok; }
 };
 
 template <typename _Tp>
-inline _LIBCPP_HIDE_FROM_ABI __in_pattern_result
+inline _LIBCUDACXX_HIDE_FROM_ABI __in_pattern_result
 __in_pattern(_Tp __c, int __base)
 {
     if (__base <= 10)
@@ -644,7 +644,7 @@ __in_pattern(_Tp __c, int __base)
 }
 
 template <typename _It, typename _Tp, typename _Fn, typename... _Ts>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI from_chars_result
 __subject_seq_combinator(_It __first, _It __last, _Tp& __value, _Fn __f,
                          _Ts... __args)
 {
@@ -681,7 +681,7 @@ __subject_seq_combinator(_It __first, _It __last, _Tp& __value, _Fn __f,
 }
 
 template <typename _Tp, typename enable_if<is_unsigned<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI from_chars_result
 __from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
 {
     using __tx = __itoa::__traits<_Tp>;
@@ -707,7 +707,7 @@ __from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
 }
 
 template <typename _Tp, typename enable_if<is_signed<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI from_chars_result
 __from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
 {
     using __t = decltype(__to_unsigned_like(__value));
@@ -715,7 +715,7 @@ __from_chars_atoi(const char* __first, const char* __last, _Tp& __value)
 }
 
 template <typename _Tp, typename enable_if<is_unsigned<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI from_chars_result
 __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
                       int __base)
 {
@@ -762,7 +762,7 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
 }
 
 template <typename _Tp, typename enable_if<is_signed<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI from_chars_result
 __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
                       int __base)
 {
@@ -772,56 +772,56 @@ __from_chars_integral(const char* __first, const char* __last, _Tp& __value,
 }
 
 template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI from_chars_result
 from_chars(const char* __first, const char* __last, _Tp& __value)
 {
     return __from_chars_atoi(__first, __last, __value);
 }
 
 template <typename _Tp, typename enable_if<is_integral<_Tp>::value, int>::type = 0>
-inline _LIBCPP_HIDE_FROM_ABI from_chars_result
+inline _LIBCUDACXX_HIDE_FROM_ABI from_chars_result
 from_chars(const char* __first, const char* __last, _Tp& __value, int __base)
 {
-    _LIBCPP_ASSERT(2 <= __base && __base <= 36, "base not in [2, 36]");
+    _LIBCUDACXX_ASSERT(2 <= __base && __base <= 36, "base not in [2, 36]");
     return __from_chars_integral(__first, __last, __value, __base);
 }
 
 // Floating-point implementation starts here.
 // Unlike the other parts of charconv this is only available in C++17 and newer.
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS
+_LIBCUDACXX_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCUDACXX_FUNC_VIS
 to_chars_result to_chars(char* __first, char* __last, float __value);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS
+_LIBCUDACXX_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCUDACXX_FUNC_VIS
 to_chars_result to_chars(char* __first, char* __last, double __value);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS
+_LIBCUDACXX_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCUDACXX_FUNC_VIS
 to_chars_result to_chars(char* __first, char* __last, long double __value);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS
+_LIBCUDACXX_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCUDACXX_FUNC_VIS
 to_chars_result to_chars(char* __first, char* __last, float __value, chars_format __fmt);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS
+_LIBCUDACXX_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCUDACXX_FUNC_VIS
 to_chars_result to_chars(char* __first, char* __last, double __value, chars_format __fmt);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS
+_LIBCUDACXX_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCUDACXX_FUNC_VIS
 to_chars_result to_chars(char* __first, char* __last, long double __value, chars_format __fmt);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS
+_LIBCUDACXX_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCUDACXX_FUNC_VIS
 to_chars_result to_chars(char* __first, char* __last, float __value, chars_format __fmt, int __precision);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS
+_LIBCUDACXX_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCUDACXX_FUNC_VIS
 to_chars_result to_chars(char* __first, char* __last, double __value, chars_format __fmt, int __precision);
 
-_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_FUNC_VIS
+_LIBCUDACXX_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCUDACXX_FUNC_VIS
 to_chars_result to_chars(char* __first, char* __last, long double __value, chars_format __fmt, int __precision);
 
-#  endif // _LIBCPP_STD_VER > 14
-#endif // _LIBCPP_CXX03_LANG
+#  endif // _LIBCUDACXX_STD_VER > 14
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_CHARCONV
+#endif // _LIBCUDACXX_CHARCONV

diff  --git a/libcxx/include/chrono b/libcxx/include/chrono
index 2af5fbcc5165..fef84abce769 100644
--- a/libcxx/include/chrono
+++ b/libcxx/include/chrono
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CHRONO
-#define _LIBCPP_CHRONO
+#ifndef _LIBCUDACXX_CHRONO
+#define _LIBCUDACXX_CHRONO
 
 /*
     chrono synopsis
@@ -718,8 +718,8 @@ constexpr chrono::year                                  operator ""y(unsigned lo
 // standard-mandated includes
 #include <compare>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_CHRONO
+#endif // _LIBCUDACXX_CHRONO

diff  --git a/libcxx/include/cinttypes b/libcxx/include/cinttypes
index a4cfe961cc55..aa646257314d 100644
--- a/libcxx/include/cinttypes
+++ b/libcxx/include/cinttypes
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CINTTYPES
-#define _LIBCPP_CINTTYPES
+#ifndef _LIBCUDACXX_CINTTYPES
+#define _LIBCUDACXX_CINTTYPES
 
 /*
     cinttypes synopsis
@@ -239,20 +239,20 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
 #include <cstdint>
 #include <inttypes.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-using ::imaxdiv_t _LIBCPP_USING_IF_EXISTS;
-using ::imaxabs _LIBCPP_USING_IF_EXISTS;
-using ::imaxdiv _LIBCPP_USING_IF_EXISTS;
-using ::strtoimax _LIBCPP_USING_IF_EXISTS;
-using ::strtoumax _LIBCPP_USING_IF_EXISTS;
-using ::wcstoimax _LIBCPP_USING_IF_EXISTS;
-using ::wcstoumax _LIBCPP_USING_IF_EXISTS;
+using ::imaxdiv_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::imaxabs _LIBCUDACXX_USING_IF_EXISTS;
+using ::imaxdiv _LIBCUDACXX_USING_IF_EXISTS;
+using ::strtoimax _LIBCUDACXX_USING_IF_EXISTS;
+using ::strtoumax _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcstoimax _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcstoumax _LIBCUDACXX_USING_IF_EXISTS;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_CINTTYPES
+#endif // _LIBCUDACXX_CINTTYPES

diff  --git a/libcxx/include/ciso646 b/libcxx/include/ciso646
index e0cd722495ed..cccae3dbac8f 100644
--- a/libcxx/include/ciso646
+++ b/libcxx/include/ciso646
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CISO646
-#define _LIBCPP_CISO646
+#ifndef _LIBCUDACXX_CISO646
+#define _LIBCUDACXX_CISO646
 
 /*
     ciso646 synopsis
@@ -18,8 +18,8 @@
 #include <__assert> // all public C++ headers provide the assertion handler
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_CISO646
+#endif // _LIBCUDACXX_CISO646

diff  --git a/libcxx/include/climits b/libcxx/include/climits
index 16800a652f6d..874293658509 100644
--- a/libcxx/include/climits
+++ b/libcxx/include/climits
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CLIMITS
-#define _LIBCPP_CLIMITS
+#ifndef _LIBCUDACXX_CLIMITS
+#define _LIBCUDACXX_CLIMITS
 
 /*
     climits synopsis
@@ -41,8 +41,8 @@ Macros:
 #include <__config>
 #include <limits.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_CLIMITS
+#endif // _LIBCUDACXX_CLIMITS

diff  --git a/libcxx/include/clocale b/libcxx/include/clocale
index 892604207532..8783085dc110 100644
--- a/libcxx/include/clocale
+++ b/libcxx/include/clocale
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CLOCALE
-#define _LIBCPP_CLOCALE
+#ifndef _LIBCUDACXX_CLOCALE
+#define _LIBCUDACXX_CLOCALE
 
 /*
     clocale synopsis
@@ -38,16 +38,16 @@ lconv* localeconv();
 #include <__config>
 #include <locale.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-using ::lconv _LIBCPP_USING_IF_EXISTS;
-using ::setlocale _LIBCPP_USING_IF_EXISTS;
-using ::localeconv _LIBCPP_USING_IF_EXISTS;
+using ::lconv _LIBCUDACXX_USING_IF_EXISTS;
+using ::setlocale _LIBCUDACXX_USING_IF_EXISTS;
+using ::localeconv _LIBCUDACXX_USING_IF_EXISTS;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_CLOCALE
+#endif // _LIBCUDACXX_CLOCALE

diff  --git a/libcxx/include/cmath b/libcxx/include/cmath
index 4d81eed339d8..1d091afa653f 100644
--- a/libcxx/include/cmath
+++ b/libcxx/include/cmath
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CMATH
-#define _LIBCPP_CMATH
+#ifndef _LIBCUDACXX_CMATH
+#define _LIBCUDACXX_CMATH
 
 /*
     cmath synopsis
@@ -310,232 +310,232 @@ constexpr long double lerp(long double a, long double b, long double t) noexcept
 #include <type_traits>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-using ::signbit _LIBCPP_USING_IF_EXISTS;
-using ::fpclassify _LIBCPP_USING_IF_EXISTS;
-using ::isfinite _LIBCPP_USING_IF_EXISTS;
-using ::isinf _LIBCPP_USING_IF_EXISTS;
-using ::isnan _LIBCPP_USING_IF_EXISTS;
-using ::isnormal _LIBCPP_USING_IF_EXISTS;
-using ::isgreater _LIBCPP_USING_IF_EXISTS;
-using ::isgreaterequal _LIBCPP_USING_IF_EXISTS;
-using ::isless _LIBCPP_USING_IF_EXISTS;
-using ::islessequal _LIBCPP_USING_IF_EXISTS;
-using ::islessgreater _LIBCPP_USING_IF_EXISTS;
-using ::isunordered _LIBCPP_USING_IF_EXISTS;
-using ::isunordered _LIBCPP_USING_IF_EXISTS;
-
-using ::float_t _LIBCPP_USING_IF_EXISTS;
-using ::double_t _LIBCPP_USING_IF_EXISTS;
-
-using ::abs _LIBCPP_USING_IF_EXISTS;
-
-using ::acos _LIBCPP_USING_IF_EXISTS;
-using ::acosf _LIBCPP_USING_IF_EXISTS;
-using ::asin _LIBCPP_USING_IF_EXISTS;
-using ::asinf _LIBCPP_USING_IF_EXISTS;
-using ::atan _LIBCPP_USING_IF_EXISTS;
-using ::atanf _LIBCPP_USING_IF_EXISTS;
-using ::atan2 _LIBCPP_USING_IF_EXISTS;
-using ::atan2f _LIBCPP_USING_IF_EXISTS;
-using ::ceil _LIBCPP_USING_IF_EXISTS;
-using ::ceilf _LIBCPP_USING_IF_EXISTS;
-using ::cos _LIBCPP_USING_IF_EXISTS;
-using ::cosf _LIBCPP_USING_IF_EXISTS;
-using ::cosh _LIBCPP_USING_IF_EXISTS;
-using ::coshf _LIBCPP_USING_IF_EXISTS;
-
-using ::exp _LIBCPP_USING_IF_EXISTS;
-using ::expf _LIBCPP_USING_IF_EXISTS;
-
-using ::fabs _LIBCPP_USING_IF_EXISTS;
-using ::fabsf _LIBCPP_USING_IF_EXISTS;
-using ::floor _LIBCPP_USING_IF_EXISTS;
-using ::floorf _LIBCPP_USING_IF_EXISTS;
-
-using ::fmod _LIBCPP_USING_IF_EXISTS;
-using ::fmodf _LIBCPP_USING_IF_EXISTS;
-
-using ::frexp _LIBCPP_USING_IF_EXISTS;
-using ::frexpf _LIBCPP_USING_IF_EXISTS;
-using ::ldexp _LIBCPP_USING_IF_EXISTS;
-using ::ldexpf _LIBCPP_USING_IF_EXISTS;
-
-using ::log _LIBCPP_USING_IF_EXISTS;
-using ::logf _LIBCPP_USING_IF_EXISTS;
-
-using ::log10 _LIBCPP_USING_IF_EXISTS;
-using ::log10f _LIBCPP_USING_IF_EXISTS;
-using ::modf _LIBCPP_USING_IF_EXISTS;
-using ::modff _LIBCPP_USING_IF_EXISTS;
-
-using ::pow _LIBCPP_USING_IF_EXISTS;
-using ::powf _LIBCPP_USING_IF_EXISTS;
-
-using ::sin _LIBCPP_USING_IF_EXISTS;
-using ::sinf _LIBCPP_USING_IF_EXISTS;
-using ::sinh _LIBCPP_USING_IF_EXISTS;
-using ::sinhf _LIBCPP_USING_IF_EXISTS;
-
-using ::sqrt _LIBCPP_USING_IF_EXISTS;
-using ::sqrtf _LIBCPP_USING_IF_EXISTS;
-using ::tan _LIBCPP_USING_IF_EXISTS;
-using ::tanf _LIBCPP_USING_IF_EXISTS;
-
-using ::tanh _LIBCPP_USING_IF_EXISTS;
-using ::tanhf _LIBCPP_USING_IF_EXISTS;
-
-using ::acosh _LIBCPP_USING_IF_EXISTS;
-using ::acoshf _LIBCPP_USING_IF_EXISTS;
-using ::asinh _LIBCPP_USING_IF_EXISTS;
-using ::asinhf _LIBCPP_USING_IF_EXISTS;
-using ::atanh _LIBCPP_USING_IF_EXISTS;
-using ::atanhf _LIBCPP_USING_IF_EXISTS;
-using ::cbrt _LIBCPP_USING_IF_EXISTS;
-using ::cbrtf _LIBCPP_USING_IF_EXISTS;
-
-using ::copysign _LIBCPP_USING_IF_EXISTS;
-using ::copysignf _LIBCPP_USING_IF_EXISTS;
-
-using ::erf _LIBCPP_USING_IF_EXISTS;
-using ::erff _LIBCPP_USING_IF_EXISTS;
-using ::erfc _LIBCPP_USING_IF_EXISTS;
-using ::erfcf _LIBCPP_USING_IF_EXISTS;
-using ::exp2 _LIBCPP_USING_IF_EXISTS;
-using ::exp2f _LIBCPP_USING_IF_EXISTS;
-using ::expm1 _LIBCPP_USING_IF_EXISTS;
-using ::expm1f _LIBCPP_USING_IF_EXISTS;
-using ::fdim _LIBCPP_USING_IF_EXISTS;
-using ::fdimf _LIBCPP_USING_IF_EXISTS;
-using ::fmaf _LIBCPP_USING_IF_EXISTS;
-using ::fma _LIBCPP_USING_IF_EXISTS;
-using ::fmax _LIBCPP_USING_IF_EXISTS;
-using ::fmaxf _LIBCPP_USING_IF_EXISTS;
-using ::fmin _LIBCPP_USING_IF_EXISTS;
-using ::fminf _LIBCPP_USING_IF_EXISTS;
-using ::hypot _LIBCPP_USING_IF_EXISTS;
-using ::hypotf _LIBCPP_USING_IF_EXISTS;
-using ::ilogb _LIBCPP_USING_IF_EXISTS;
-using ::ilogbf _LIBCPP_USING_IF_EXISTS;
-using ::lgamma _LIBCPP_USING_IF_EXISTS;
-using ::lgammaf _LIBCPP_USING_IF_EXISTS;
-using ::llrint _LIBCPP_USING_IF_EXISTS;
-using ::llrintf _LIBCPP_USING_IF_EXISTS;
-using ::llround _LIBCPP_USING_IF_EXISTS;
-using ::llroundf _LIBCPP_USING_IF_EXISTS;
-using ::log1p _LIBCPP_USING_IF_EXISTS;
-using ::log1pf _LIBCPP_USING_IF_EXISTS;
-using ::log2 _LIBCPP_USING_IF_EXISTS;
-using ::log2f _LIBCPP_USING_IF_EXISTS;
-using ::logb _LIBCPP_USING_IF_EXISTS;
-using ::logbf _LIBCPP_USING_IF_EXISTS;
-using ::lrint _LIBCPP_USING_IF_EXISTS;
-using ::lrintf _LIBCPP_USING_IF_EXISTS;
-using ::lround _LIBCPP_USING_IF_EXISTS;
-using ::lroundf _LIBCPP_USING_IF_EXISTS;
-
-using ::nan _LIBCPP_USING_IF_EXISTS;
-using ::nanf _LIBCPP_USING_IF_EXISTS;
-
-using ::nearbyint _LIBCPP_USING_IF_EXISTS;
-using ::nearbyintf _LIBCPP_USING_IF_EXISTS;
-using ::nextafter _LIBCPP_USING_IF_EXISTS;
-using ::nextafterf _LIBCPP_USING_IF_EXISTS;
-using ::nexttoward _LIBCPP_USING_IF_EXISTS;
-using ::nexttowardf _LIBCPP_USING_IF_EXISTS;
-using ::remainder _LIBCPP_USING_IF_EXISTS;
-using ::remainderf _LIBCPP_USING_IF_EXISTS;
-using ::remquo _LIBCPP_USING_IF_EXISTS;
-using ::remquof _LIBCPP_USING_IF_EXISTS;
-using ::rint _LIBCPP_USING_IF_EXISTS;
-using ::rintf _LIBCPP_USING_IF_EXISTS;
-using ::round _LIBCPP_USING_IF_EXISTS;
-using ::roundf _LIBCPP_USING_IF_EXISTS;
-using ::scalbln _LIBCPP_USING_IF_EXISTS;
-using ::scalblnf _LIBCPP_USING_IF_EXISTS;
-using ::scalbn _LIBCPP_USING_IF_EXISTS;
-using ::scalbnf _LIBCPP_USING_IF_EXISTS;
-using ::tgamma _LIBCPP_USING_IF_EXISTS;
-using ::tgammaf _LIBCPP_USING_IF_EXISTS;
-using ::trunc _LIBCPP_USING_IF_EXISTS;
-using ::truncf _LIBCPP_USING_IF_EXISTS;
-
-using ::acosl _LIBCPP_USING_IF_EXISTS;
-using ::asinl _LIBCPP_USING_IF_EXISTS;
-using ::atanl _LIBCPP_USING_IF_EXISTS;
-using ::atan2l _LIBCPP_USING_IF_EXISTS;
-using ::ceill _LIBCPP_USING_IF_EXISTS;
-using ::cosl _LIBCPP_USING_IF_EXISTS;
-using ::coshl _LIBCPP_USING_IF_EXISTS;
-using ::expl _LIBCPP_USING_IF_EXISTS;
-using ::fabsl _LIBCPP_USING_IF_EXISTS;
-using ::floorl _LIBCPP_USING_IF_EXISTS;
-using ::fmodl _LIBCPP_USING_IF_EXISTS;
-using ::frexpl _LIBCPP_USING_IF_EXISTS;
-using ::ldexpl _LIBCPP_USING_IF_EXISTS;
-using ::logl _LIBCPP_USING_IF_EXISTS;
-using ::log10l _LIBCPP_USING_IF_EXISTS;
-using ::modfl _LIBCPP_USING_IF_EXISTS;
-using ::powl _LIBCPP_USING_IF_EXISTS;
-using ::sinl _LIBCPP_USING_IF_EXISTS;
-using ::sinhl _LIBCPP_USING_IF_EXISTS;
-using ::sqrtl _LIBCPP_USING_IF_EXISTS;
-using ::tanl _LIBCPP_USING_IF_EXISTS;
-
-using ::tanhl _LIBCPP_USING_IF_EXISTS;
-using ::acoshl _LIBCPP_USING_IF_EXISTS;
-using ::asinhl _LIBCPP_USING_IF_EXISTS;
-using ::atanhl _LIBCPP_USING_IF_EXISTS;
-using ::cbrtl _LIBCPP_USING_IF_EXISTS;
-
-using ::copysignl _LIBCPP_USING_IF_EXISTS;
-
-using ::erfl _LIBCPP_USING_IF_EXISTS;
-using ::erfcl _LIBCPP_USING_IF_EXISTS;
-using ::exp2l _LIBCPP_USING_IF_EXISTS;
-using ::expm1l _LIBCPP_USING_IF_EXISTS;
-using ::fdiml _LIBCPP_USING_IF_EXISTS;
-using ::fmal _LIBCPP_USING_IF_EXISTS;
-using ::fmaxl _LIBCPP_USING_IF_EXISTS;
-using ::fminl _LIBCPP_USING_IF_EXISTS;
-using ::hypotl _LIBCPP_USING_IF_EXISTS;
-using ::ilogbl _LIBCPP_USING_IF_EXISTS;
-using ::lgammal _LIBCPP_USING_IF_EXISTS;
-using ::llrintl _LIBCPP_USING_IF_EXISTS;
-using ::llroundl _LIBCPP_USING_IF_EXISTS;
-using ::log1pl _LIBCPP_USING_IF_EXISTS;
-using ::log2l _LIBCPP_USING_IF_EXISTS;
-using ::logbl _LIBCPP_USING_IF_EXISTS;
-using ::lrintl _LIBCPP_USING_IF_EXISTS;
-using ::lroundl _LIBCPP_USING_IF_EXISTS;
-using ::nanl _LIBCPP_USING_IF_EXISTS;
-using ::nearbyintl _LIBCPP_USING_IF_EXISTS;
-using ::nextafterl _LIBCPP_USING_IF_EXISTS;
-using ::nexttowardl _LIBCPP_USING_IF_EXISTS;
-using ::remainderl _LIBCPP_USING_IF_EXISTS;
-using ::remquol _LIBCPP_USING_IF_EXISTS;
-using ::rintl _LIBCPP_USING_IF_EXISTS;
-using ::roundl _LIBCPP_USING_IF_EXISTS;
-using ::scalblnl _LIBCPP_USING_IF_EXISTS;
-using ::scalbnl _LIBCPP_USING_IF_EXISTS;
-using ::tgammal _LIBCPP_USING_IF_EXISTS;
-using ::truncl _LIBCPP_USING_IF_EXISTS;
-
-#if _LIBCPP_STD_VER > 14
-inline _LIBCPP_INLINE_VISIBILITY float       hypot(       float __x,       float __y,       float __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
-inline _LIBCPP_INLINE_VISIBILITY double      hypot(      double __x,      double __y,      double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
-inline _LIBCPP_INLINE_VISIBILITY long double hypot( long double __x, long double __y, long double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
+
+using ::signbit _LIBCUDACXX_USING_IF_EXISTS;
+using ::fpclassify _LIBCUDACXX_USING_IF_EXISTS;
+using ::isfinite _LIBCUDACXX_USING_IF_EXISTS;
+using ::isinf _LIBCUDACXX_USING_IF_EXISTS;
+using ::isnan _LIBCUDACXX_USING_IF_EXISTS;
+using ::isnormal _LIBCUDACXX_USING_IF_EXISTS;
+using ::isgreater _LIBCUDACXX_USING_IF_EXISTS;
+using ::isgreaterequal _LIBCUDACXX_USING_IF_EXISTS;
+using ::isless _LIBCUDACXX_USING_IF_EXISTS;
+using ::islessequal _LIBCUDACXX_USING_IF_EXISTS;
+using ::islessgreater _LIBCUDACXX_USING_IF_EXISTS;
+using ::isunordered _LIBCUDACXX_USING_IF_EXISTS;
+using ::isunordered _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::float_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::double_t _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::abs _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::acos _LIBCUDACXX_USING_IF_EXISTS;
+using ::acosf _LIBCUDACXX_USING_IF_EXISTS;
+using ::asin _LIBCUDACXX_USING_IF_EXISTS;
+using ::asinf _LIBCUDACXX_USING_IF_EXISTS;
+using ::atan _LIBCUDACXX_USING_IF_EXISTS;
+using ::atanf _LIBCUDACXX_USING_IF_EXISTS;
+using ::atan2 _LIBCUDACXX_USING_IF_EXISTS;
+using ::atan2f _LIBCUDACXX_USING_IF_EXISTS;
+using ::ceil _LIBCUDACXX_USING_IF_EXISTS;
+using ::ceilf _LIBCUDACXX_USING_IF_EXISTS;
+using ::cos _LIBCUDACXX_USING_IF_EXISTS;
+using ::cosf _LIBCUDACXX_USING_IF_EXISTS;
+using ::cosh _LIBCUDACXX_USING_IF_EXISTS;
+using ::coshf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::exp _LIBCUDACXX_USING_IF_EXISTS;
+using ::expf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::fabs _LIBCUDACXX_USING_IF_EXISTS;
+using ::fabsf _LIBCUDACXX_USING_IF_EXISTS;
+using ::floor _LIBCUDACXX_USING_IF_EXISTS;
+using ::floorf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::fmod _LIBCUDACXX_USING_IF_EXISTS;
+using ::fmodf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::frexp _LIBCUDACXX_USING_IF_EXISTS;
+using ::frexpf _LIBCUDACXX_USING_IF_EXISTS;
+using ::ldexp _LIBCUDACXX_USING_IF_EXISTS;
+using ::ldexpf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::log _LIBCUDACXX_USING_IF_EXISTS;
+using ::logf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::log10 _LIBCUDACXX_USING_IF_EXISTS;
+using ::log10f _LIBCUDACXX_USING_IF_EXISTS;
+using ::modf _LIBCUDACXX_USING_IF_EXISTS;
+using ::modff _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::pow _LIBCUDACXX_USING_IF_EXISTS;
+using ::powf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::sin _LIBCUDACXX_USING_IF_EXISTS;
+using ::sinf _LIBCUDACXX_USING_IF_EXISTS;
+using ::sinh _LIBCUDACXX_USING_IF_EXISTS;
+using ::sinhf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::sqrt _LIBCUDACXX_USING_IF_EXISTS;
+using ::sqrtf _LIBCUDACXX_USING_IF_EXISTS;
+using ::tan _LIBCUDACXX_USING_IF_EXISTS;
+using ::tanf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::tanh _LIBCUDACXX_USING_IF_EXISTS;
+using ::tanhf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::acosh _LIBCUDACXX_USING_IF_EXISTS;
+using ::acoshf _LIBCUDACXX_USING_IF_EXISTS;
+using ::asinh _LIBCUDACXX_USING_IF_EXISTS;
+using ::asinhf _LIBCUDACXX_USING_IF_EXISTS;
+using ::atanh _LIBCUDACXX_USING_IF_EXISTS;
+using ::atanhf _LIBCUDACXX_USING_IF_EXISTS;
+using ::cbrt _LIBCUDACXX_USING_IF_EXISTS;
+using ::cbrtf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::copysign _LIBCUDACXX_USING_IF_EXISTS;
+using ::copysignf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::erf _LIBCUDACXX_USING_IF_EXISTS;
+using ::erff _LIBCUDACXX_USING_IF_EXISTS;
+using ::erfc _LIBCUDACXX_USING_IF_EXISTS;
+using ::erfcf _LIBCUDACXX_USING_IF_EXISTS;
+using ::exp2 _LIBCUDACXX_USING_IF_EXISTS;
+using ::exp2f _LIBCUDACXX_USING_IF_EXISTS;
+using ::expm1 _LIBCUDACXX_USING_IF_EXISTS;
+using ::expm1f _LIBCUDACXX_USING_IF_EXISTS;
+using ::fdim _LIBCUDACXX_USING_IF_EXISTS;
+using ::fdimf _LIBCUDACXX_USING_IF_EXISTS;
+using ::fmaf _LIBCUDACXX_USING_IF_EXISTS;
+using ::fma _LIBCUDACXX_USING_IF_EXISTS;
+using ::fmax _LIBCUDACXX_USING_IF_EXISTS;
+using ::fmaxf _LIBCUDACXX_USING_IF_EXISTS;
+using ::fmin _LIBCUDACXX_USING_IF_EXISTS;
+using ::fminf _LIBCUDACXX_USING_IF_EXISTS;
+using ::hypot _LIBCUDACXX_USING_IF_EXISTS;
+using ::hypotf _LIBCUDACXX_USING_IF_EXISTS;
+using ::ilogb _LIBCUDACXX_USING_IF_EXISTS;
+using ::ilogbf _LIBCUDACXX_USING_IF_EXISTS;
+using ::lgamma _LIBCUDACXX_USING_IF_EXISTS;
+using ::lgammaf _LIBCUDACXX_USING_IF_EXISTS;
+using ::llrint _LIBCUDACXX_USING_IF_EXISTS;
+using ::llrintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::llround _LIBCUDACXX_USING_IF_EXISTS;
+using ::llroundf _LIBCUDACXX_USING_IF_EXISTS;
+using ::log1p _LIBCUDACXX_USING_IF_EXISTS;
+using ::log1pf _LIBCUDACXX_USING_IF_EXISTS;
+using ::log2 _LIBCUDACXX_USING_IF_EXISTS;
+using ::log2f _LIBCUDACXX_USING_IF_EXISTS;
+using ::logb _LIBCUDACXX_USING_IF_EXISTS;
+using ::logbf _LIBCUDACXX_USING_IF_EXISTS;
+using ::lrint _LIBCUDACXX_USING_IF_EXISTS;
+using ::lrintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::lround _LIBCUDACXX_USING_IF_EXISTS;
+using ::lroundf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::nan _LIBCUDACXX_USING_IF_EXISTS;
+using ::nanf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::nearbyint _LIBCUDACXX_USING_IF_EXISTS;
+using ::nearbyintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::nextafter _LIBCUDACXX_USING_IF_EXISTS;
+using ::nextafterf _LIBCUDACXX_USING_IF_EXISTS;
+using ::nexttoward _LIBCUDACXX_USING_IF_EXISTS;
+using ::nexttowardf _LIBCUDACXX_USING_IF_EXISTS;
+using ::remainder _LIBCUDACXX_USING_IF_EXISTS;
+using ::remainderf _LIBCUDACXX_USING_IF_EXISTS;
+using ::remquo _LIBCUDACXX_USING_IF_EXISTS;
+using ::remquof _LIBCUDACXX_USING_IF_EXISTS;
+using ::rint _LIBCUDACXX_USING_IF_EXISTS;
+using ::rintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::round _LIBCUDACXX_USING_IF_EXISTS;
+using ::roundf _LIBCUDACXX_USING_IF_EXISTS;
+using ::scalbln _LIBCUDACXX_USING_IF_EXISTS;
+using ::scalblnf _LIBCUDACXX_USING_IF_EXISTS;
+using ::scalbn _LIBCUDACXX_USING_IF_EXISTS;
+using ::scalbnf _LIBCUDACXX_USING_IF_EXISTS;
+using ::tgamma _LIBCUDACXX_USING_IF_EXISTS;
+using ::tgammaf _LIBCUDACXX_USING_IF_EXISTS;
+using ::trunc _LIBCUDACXX_USING_IF_EXISTS;
+using ::truncf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::acosl _LIBCUDACXX_USING_IF_EXISTS;
+using ::asinl _LIBCUDACXX_USING_IF_EXISTS;
+using ::atanl _LIBCUDACXX_USING_IF_EXISTS;
+using ::atan2l _LIBCUDACXX_USING_IF_EXISTS;
+using ::ceill _LIBCUDACXX_USING_IF_EXISTS;
+using ::cosl _LIBCUDACXX_USING_IF_EXISTS;
+using ::coshl _LIBCUDACXX_USING_IF_EXISTS;
+using ::expl _LIBCUDACXX_USING_IF_EXISTS;
+using ::fabsl _LIBCUDACXX_USING_IF_EXISTS;
+using ::floorl _LIBCUDACXX_USING_IF_EXISTS;
+using ::fmodl _LIBCUDACXX_USING_IF_EXISTS;
+using ::frexpl _LIBCUDACXX_USING_IF_EXISTS;
+using ::ldexpl _LIBCUDACXX_USING_IF_EXISTS;
+using ::logl _LIBCUDACXX_USING_IF_EXISTS;
+using ::log10l _LIBCUDACXX_USING_IF_EXISTS;
+using ::modfl _LIBCUDACXX_USING_IF_EXISTS;
+using ::powl _LIBCUDACXX_USING_IF_EXISTS;
+using ::sinl _LIBCUDACXX_USING_IF_EXISTS;
+using ::sinhl _LIBCUDACXX_USING_IF_EXISTS;
+using ::sqrtl _LIBCUDACXX_USING_IF_EXISTS;
+using ::tanl _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::tanhl _LIBCUDACXX_USING_IF_EXISTS;
+using ::acoshl _LIBCUDACXX_USING_IF_EXISTS;
+using ::asinhl _LIBCUDACXX_USING_IF_EXISTS;
+using ::atanhl _LIBCUDACXX_USING_IF_EXISTS;
+using ::cbrtl _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::copysignl _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::erfl _LIBCUDACXX_USING_IF_EXISTS;
+using ::erfcl _LIBCUDACXX_USING_IF_EXISTS;
+using ::exp2l _LIBCUDACXX_USING_IF_EXISTS;
+using ::expm1l _LIBCUDACXX_USING_IF_EXISTS;
+using ::fdiml _LIBCUDACXX_USING_IF_EXISTS;
+using ::fmal _LIBCUDACXX_USING_IF_EXISTS;
+using ::fmaxl _LIBCUDACXX_USING_IF_EXISTS;
+using ::fminl _LIBCUDACXX_USING_IF_EXISTS;
+using ::hypotl _LIBCUDACXX_USING_IF_EXISTS;
+using ::ilogbl _LIBCUDACXX_USING_IF_EXISTS;
+using ::lgammal _LIBCUDACXX_USING_IF_EXISTS;
+using ::llrintl _LIBCUDACXX_USING_IF_EXISTS;
+using ::llroundl _LIBCUDACXX_USING_IF_EXISTS;
+using ::log1pl _LIBCUDACXX_USING_IF_EXISTS;
+using ::log2l _LIBCUDACXX_USING_IF_EXISTS;
+using ::logbl _LIBCUDACXX_USING_IF_EXISTS;
+using ::lrintl _LIBCUDACXX_USING_IF_EXISTS;
+using ::lroundl _LIBCUDACXX_USING_IF_EXISTS;
+using ::nanl _LIBCUDACXX_USING_IF_EXISTS;
+using ::nearbyintl _LIBCUDACXX_USING_IF_EXISTS;
+using ::nextafterl _LIBCUDACXX_USING_IF_EXISTS;
+using ::nexttowardl _LIBCUDACXX_USING_IF_EXISTS;
+using ::remainderl _LIBCUDACXX_USING_IF_EXISTS;
+using ::remquol _LIBCUDACXX_USING_IF_EXISTS;
+using ::rintl _LIBCUDACXX_USING_IF_EXISTS;
+using ::roundl _LIBCUDACXX_USING_IF_EXISTS;
+using ::scalblnl _LIBCUDACXX_USING_IF_EXISTS;
+using ::scalbnl _LIBCUDACXX_USING_IF_EXISTS;
+using ::tgammal _LIBCUDACXX_USING_IF_EXISTS;
+using ::truncl _LIBCUDACXX_USING_IF_EXISTS;
+
+#if _LIBCUDACXX_STD_VER > 14
+inline _LIBCUDACXX_INLINE_VISIBILITY float       hypot(       float __x,       float __y,       float __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
+inline _LIBCUDACXX_INLINE_VISIBILITY double      hypot(      double __x,      double __y,      double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
+inline _LIBCUDACXX_INLINE_VISIBILITY long double hypot( long double __x, long double __y, long double __z ) { return sqrt(__x*__x + __y*__y + __z*__z); }
 
 template <class _A1, class _A2, class _A3>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if_t
 <
     is_arithmetic<_A1>::value &&
@@ -554,9 +554,9 @@ hypot(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) _NOEXCEPT
 #endif
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
-__libcpp_isnan_or_builtin(_A1 __lcpp_x) _NOEXCEPT
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
+__LIBCUDACXX_isnan_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_isnan)
     return __builtin_isnan(__lcpp_x);
@@ -566,17 +566,17 @@ __libcpp_isnan_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 }
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
-__libcpp_isnan_or_builtin(_A1 __lcpp_x) _NOEXCEPT
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
+__LIBCUDACXX_isnan_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
     return isnan(__lcpp_x);
 }
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
-__libcpp_isinf_or_builtin(_A1 __lcpp_x) _NOEXCEPT
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
+__LIBCUDACXX_isinf_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_isinf)
     return __builtin_isinf(__lcpp_x);
@@ -586,17 +586,17 @@ __libcpp_isinf_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 }
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
-__libcpp_isinf_or_builtin(_A1 __lcpp_x) _NOEXCEPT
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
+__LIBCUDACXX_isinf_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
     return isinf(__lcpp_x);
 }
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
-__libcpp_isfinite_or_builtin(_A1 __lcpp_x) _NOEXCEPT
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR typename enable_if<is_floating_point<_A1>::value, bool>::type
+__LIBCUDACXX_isfinite_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_isfinite)
     return __builtin_isfinite(__lcpp_x);
@@ -606,14 +606,14 @@ __libcpp_isfinite_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 }
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
-__libcpp_isfinite_or_builtin(_A1 __lcpp_x) _NOEXCEPT
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR typename enable_if<!is_floating_point<_A1>::value, bool>::type
+__LIBCUDACXX_isfinite_or_builtin(_A1 __lcpp_x) _NOEXCEPT
 {
     return isfinite(__lcpp_x);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <typename _Fp>
 constexpr
 _Fp __lerp(_Fp __a, _Fp __b, _Fp __t) noexcept {
@@ -638,7 +638,7 @@ constexpr long double
 lerp(long double __a, long double __b, long double __t) _NOEXCEPT { return __lerp(__a, __b, __t); }
 
 template <class _A1, class _A2, class _A3>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 constexpr typename enable_if_t
 <
     is_arithmetic<_A1>::value &&
@@ -654,10 +654,10 @@ lerp(_A1 __a, _A2 __b, _A3 __t) noexcept
                     _IsSame<_A3, __result_type>::value));
     return __lerp((__result_type)__a, (__result_type)__b, (__result_type)__t);
 }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_CMATH
+#endif // _LIBCUDACXX_CMATH

diff  --git a/libcxx/include/codecvt b/libcxx/include/codecvt
index 9f18a7b1a989..1b85270a0842 100644
--- a/libcxx/include/codecvt
+++ b/libcxx/include/codecvt
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CODECVT
-#define _LIBCPP_CODECVT
+#ifndef _LIBCUDACXX_CODECVT
+#define _LIBCUDACXX_CODECVT
 
 /*
     codecvt synopsis
@@ -59,13 +59,13 @@ class codecvt_utf8_utf16
 #include <__locale>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-enum _LIBCPP_DEPRECATED_IN_CXX17 codecvt_mode
+enum _LIBCUDACXX_DEPRECATED_IN_CXX17 codecvt_mode
 {
     consume_header = 4,
     generate_header = 2,
@@ -76,27 +76,27 @@ enum _LIBCPP_DEPRECATED_IN_CXX17 codecvt_mode
 
 template <class _Elem> class __codecvt_utf8;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8<wchar_t>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf8<wchar_t>
     : public codecvt<wchar_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
     codecvt_mode _Mode_;
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 public:
     typedef wchar_t   intern_type;
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
-    _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf8(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 protected:
     virtual result
         do_out(state_type& __st,
@@ -115,11 +115,11 @@ protected:
                           size_t __mx) const;
     virtual int do_max_length() const _NOEXCEPT;
 };
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8<char16_t>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf8<char16_t>
     : public codecvt<char16_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
@@ -129,12 +129,12 @@ public:
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf8(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 protected:
     virtual result
@@ -155,9 +155,9 @@ protected:
     virtual int do_max_length() const _NOEXCEPT;
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8<char32_t>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf8<char32_t>
     : public codecvt<char32_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
@@ -167,12 +167,12 @@ public:
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf8(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 protected:
     virtual result
@@ -193,47 +193,47 @@ protected:
     virtual int do_max_length() const _NOEXCEPT;
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Elem, unsigned long _Maxcode = 0x10ffff,
           codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 codecvt_utf8
     : public __codecvt_utf8<_Elem>
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt_utf8(size_t __refs = 0)
         : __codecvt_utf8<_Elem>(__refs, _Maxcode, _Mode) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~codecvt_utf8() {}
 };
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 // codecvt_utf16
 
 template <class _Elem, bool _LittleEndian> class __codecvt_utf16;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<wchar_t, false>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf16<wchar_t, false>
     : public codecvt<wchar_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
     codecvt_mode _Mode_;
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 public:
     typedef wchar_t   intern_type;
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
-    _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 protected:
     virtual result
         do_out(state_type& __st,
@@ -254,25 +254,25 @@ protected:
 };
 
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<wchar_t, true>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf16<wchar_t, true>
     : public codecvt<wchar_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
     codecvt_mode _Mode_;
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 public:
     typedef wchar_t   intern_type;
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
-    _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 protected:
     virtual result
         do_out(state_type& __st,
@@ -291,11 +291,11 @@ protected:
                           size_t __mx) const;
     virtual int do_max_length() const _NOEXCEPT;
 };
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, false>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf16<char16_t, false>
     : public codecvt<char16_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
@@ -305,12 +305,12 @@ public:
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 protected:
     virtual result
@@ -331,9 +331,9 @@ protected:
     virtual int do_max_length() const _NOEXCEPT;
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<char16_t, true>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf16<char16_t, true>
     : public codecvt<char16_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
@@ -343,12 +343,12 @@ public:
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 protected:
     virtual result
@@ -369,9 +369,9 @@ protected:
     virtual int do_max_length() const _NOEXCEPT;
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, false>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf16<char32_t, false>
     : public codecvt<char32_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
@@ -381,12 +381,12 @@ public:
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 protected:
     virtual result
@@ -407,9 +407,9 @@ protected:
     virtual int do_max_length() const _NOEXCEPT;
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf16<char32_t, true>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf16<char32_t, true>
     : public codecvt<char32_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
@@ -419,12 +419,12 @@ public:
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf16(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 protected:
     virtual result
@@ -445,47 +445,47 @@ protected:
     virtual int do_max_length() const _NOEXCEPT;
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Elem, unsigned long _Maxcode = 0x10ffff,
           codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf16
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 codecvt_utf16
     : public __codecvt_utf16<_Elem, _Mode & little_endian>
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt_utf16(size_t __refs = 0)
         : __codecvt_utf16<_Elem, _Mode & little_endian>(__refs, _Maxcode, _Mode) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~codecvt_utf16() {}
 };
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 // codecvt_utf8_utf16
 
 template <class _Elem> class __codecvt_utf8_utf16;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<wchar_t>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf8_utf16<wchar_t>
     : public codecvt<wchar_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
     codecvt_mode _Mode_;
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 public:
     typedef wchar_t   intern_type;
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
-    _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf8_utf16(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<wchar_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 protected:
     virtual result
         do_out(state_type& __st,
@@ -504,11 +504,11 @@ protected:
                           size_t __mx) const;
     virtual int do_max_length() const _NOEXCEPT;
 };
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char32_t>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf8_utf16<char32_t>
     : public codecvt<char32_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
@@ -518,12 +518,12 @@ public:
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf8_utf16(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<char32_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 protected:
     virtual result
@@ -544,9 +544,9 @@ protected:
     virtual int do_max_length() const _NOEXCEPT;
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <>
-class _LIBCPP_TYPE_VIS __codecvt_utf8_utf16<char16_t>
+class _LIBCUDACXX_TYPE_VIS __codecvt_utf8_utf16<char16_t>
     : public codecvt<char16_t, char, mbstate_t>
 {
     unsigned long _Maxcode_;
@@ -556,12 +556,12 @@ public:
     typedef char      extern_type;
     typedef mbstate_t state_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __codecvt_utf8_utf16(size_t __refs, unsigned long __maxcode,
                             codecvt_mode __mode)
         : codecvt<char16_t, char, mbstate_t>(__refs), _Maxcode_(__maxcode),
           _Mode_(__mode) {}
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 protected:
     virtual result
@@ -582,22 +582,22 @@ protected:
     virtual int do_max_length() const _NOEXCEPT;
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Elem, unsigned long _Maxcode = 0x10ffff,
           codecvt_mode _Mode = (codecvt_mode)0>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 codecvt_utf8_utf16
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 codecvt_utf8_utf16
     : public __codecvt_utf8_utf16<_Elem>
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit codecvt_utf8_utf16(size_t __refs = 0)
         : __codecvt_utf8_utf16<_Elem>(__refs, _Maxcode, _Mode) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~codecvt_utf8_utf16() {}
 };
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_CODECVT
+#endif // _LIBCUDACXX_CODECVT

diff  --git a/libcxx/include/compare b/libcxx/include/compare
index 6aa1abefd3ef..c34b24df50eb 100644
--- a/libcxx/include/compare
+++ b/libcxx/include/compare
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_COMPARE
-#define _LIBCPP_COMPARE
+#ifndef _LIBCUDACXX_COMPARE
+#define _LIBCUDACXX_COMPARE
 
 /*
     compare synopsis
@@ -156,8 +156,8 @@ namespace std {
 #include <__config>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_COMPARE
+#endif // _LIBCUDACXX_COMPARE

diff  --git a/libcxx/include/complex b/libcxx/include/complex
index 87a4e5872497..8dc97d880389 100644
--- a/libcxx/include/complex
+++ b/libcxx/include/complex
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_COMPLEX
-#define _LIBCPP_COMPLEX
+#ifndef _LIBCUDACXX_COMPLEX
+#define _LIBCUDACXX_COMPLEX
 
 /*
     complex synopsis
@@ -239,23 +239,23 @@ template<class T> complex<T> tanh (const complex<T>&);
 #include <type_traits>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <sstream> // for std::basic_ostringstream
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template<class _Tp> class _LIBCPP_TEMPLATE_VIS complex;
+template<class _Tp> class _LIBCUDACXX_TEMPLATE_VIS complex;
 
 template<class _Tp> complex<_Tp> operator*(const complex<_Tp>& __z, const complex<_Tp>& __w);
 template<class _Tp> complex<_Tp> operator/(const complex<_Tp>& __x, const complex<_Tp>& __y);
 
 template<class _Tp>
-class _LIBCPP_TEMPLATE_VIS complex
+class _LIBCUDACXX_TEMPLATE_VIS complex
 {
 public:
     typedef _Tp value_type;
@@ -263,111 +263,111 @@ private:
     value_type __re_;
     value_type __im_;
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     complex(const value_type& __re = value_type(), const value_type& __im = value_type())
         : __re_(__re), __im_(__im) {}
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     complex(const complex<_Xp>& __c)
         : __re_(__c.real()), __im_(__c.imag()) {}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 value_type real() const {return __re_;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 value_type imag() const {return __im_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 value_type real() const {return __re_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 value_type imag() const {return __im_;}
 
-    _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
-    _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
+    _LIBCUDACXX_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
+    _LIBCUDACXX_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
 
-    _LIBCPP_INLINE_VISIBILITY complex& operator= (const value_type& __re)
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator= (const value_type& __re)
         {__re_ = __re; __im_ = value_type(); return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator+=(const value_type& __re) {__re_ += __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator-=(const value_type& __re) {__re_ -= __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator*=(const value_type& __re) {__re_ *= __re; __im_ *= __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator/=(const value_type& __re) {__re_ /= __re; __im_ /= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator+=(const value_type& __re) {__re_ += __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator-=(const value_type& __re) {__re_ -= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator*=(const value_type& __re) {__re_ *= __re; __im_ *= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator/=(const value_type& __re) {__re_ /= __re; __im_ /= __re; return *this;}
 
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
         {
             __re_ = __c.real();
             __im_ = __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
         {
             __re_ += __c.real();
             __im_ += __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
         {
             __re_ -= __c.real();
             __im_ -= __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
         {
             *this = *this * complex(__c.real(), __c.imag());
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
         {
             *this = *this / complex(__c.real(), __c.imag());
             return *this;
         }
 };
 
-template<> class _LIBCPP_TEMPLATE_VIS complex<double>;
-template<> class _LIBCPP_TEMPLATE_VIS complex<long double>;
+template<> class _LIBCUDACXX_TEMPLATE_VIS complex<double>;
+template<> class _LIBCUDACXX_TEMPLATE_VIS complex<long double>;
 
 template<>
-class _LIBCPP_TEMPLATE_VIS complex<float>
+class _LIBCUDACXX_TEMPLATE_VIS complex<float>
 {
     float __re_;
     float __im_;
 public:
     typedef float value_type;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR complex(float __re = 0.0f, float __im = 0.0f)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR complex(float __re = 0.0f, float __im = 0.0f)
         : __re_(__re), __im_(__im) {}
-    _LIBCPP_INLINE_VISIBILITY
-    explicit _LIBCPP_CONSTEXPR complex(const complex<double>& __c);
-    _LIBCPP_INLINE_VISIBILITY
-    explicit _LIBCPP_CONSTEXPR complex(const complex<long double>& __c);
+    _LIBCUDACXX_INLINE_VISIBILITY
+    explicit _LIBCUDACXX_CONSTEXPR complex(const complex<double>& __c);
+    _LIBCUDACXX_INLINE_VISIBILITY
+    explicit _LIBCUDACXX_CONSTEXPR complex(const complex<long double>& __c);
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR float real() const {return __re_;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR float imag() const {return __im_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR float real() const {return __re_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR float imag() const {return __im_;}
 
-    _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
-    _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
+    _LIBCUDACXX_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
+    _LIBCUDACXX_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
 
-    _LIBCPP_INLINE_VISIBILITY complex& operator= (float __re)
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator= (float __re)
         {__re_ = __re; __im_ = value_type(); return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator+=(float __re) {__re_ += __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator-=(float __re) {__re_ -= __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator*=(float __re) {__re_ *= __re; __im_ *= __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator/=(float __re) {__re_ /= __re; __im_ /= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator+=(float __re) {__re_ += __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator-=(float __re) {__re_ -= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator*=(float __re) {__re_ *= __re; __im_ *= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator/=(float __re) {__re_ /= __re; __im_ /= __re; return *this;}
 
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
         {
             __re_ = __c.real();
             __im_ = __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
         {
             __re_ += __c.real();
             __im_ += __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
         {
             __re_ -= __c.real();
             __im_ -= __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
         {
             *this = *this * complex(__c.real(), __c.imag());
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
         {
             *this = *this / complex(__c.real(), __c.imag());
             return *this;
@@ -375,57 +375,57 @@ public:
 };
 
 template<>
-class _LIBCPP_TEMPLATE_VIS complex<double>
+class _LIBCUDACXX_TEMPLATE_VIS complex<double>
 {
     double __re_;
     double __im_;
 public:
     typedef double value_type;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR complex(double __re = 0.0, double __im = 0.0)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR complex(double __re = 0.0, double __im = 0.0)
         : __re_(__re), __im_(__im) {}
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR complex(const complex<float>& __c);
-    _LIBCPP_INLINE_VISIBILITY
-    explicit _LIBCPP_CONSTEXPR complex(const complex<long double>& __c);
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR complex(const complex<float>& __c);
+    _LIBCUDACXX_INLINE_VISIBILITY
+    explicit _LIBCUDACXX_CONSTEXPR complex(const complex<long double>& __c);
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR double real() const {return __re_;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR double imag() const {return __im_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR double real() const {return __re_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR double imag() const {return __im_;}
 
-    _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
-    _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
+    _LIBCUDACXX_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
+    _LIBCUDACXX_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
 
-    _LIBCPP_INLINE_VISIBILITY complex& operator= (double __re)
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator= (double __re)
         {__re_ = __re; __im_ = value_type(); return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator+=(double __re) {__re_ += __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator-=(double __re) {__re_ -= __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator*=(double __re) {__re_ *= __re; __im_ *= __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator/=(double __re) {__re_ /= __re; __im_ /= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator+=(double __re) {__re_ += __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator-=(double __re) {__re_ -= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator*=(double __re) {__re_ *= __re; __im_ *= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator/=(double __re) {__re_ /= __re; __im_ /= __re; return *this;}
 
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
         {
             __re_ = __c.real();
             __im_ = __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
         {
             __re_ += __c.real();
             __im_ += __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
         {
             __re_ -= __c.real();
             __im_ -= __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
         {
             *this = *this * complex(__c.real(), __c.imag());
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
         {
             *this = *this / complex(__c.real(), __c.imag());
             return *this;
@@ -433,57 +433,57 @@ public:
 };
 
 template<>
-class _LIBCPP_TEMPLATE_VIS complex<long double>
+class _LIBCUDACXX_TEMPLATE_VIS complex<long double>
 {
     long double __re_;
     long double __im_;
 public:
     typedef long double value_type;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR complex(long double __re = 0.0L, long double __im = 0.0L)
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR complex(long double __re = 0.0L, long double __im = 0.0L)
         : __re_(__re), __im_(__im) {}
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR complex(const complex<float>& __c);
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR complex(const complex<double>& __c);
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR complex(const complex<float>& __c);
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR complex(const complex<double>& __c);
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR long double real() const {return __re_;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR long double imag() const {return __im_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR long double real() const {return __re_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR long double imag() const {return __im_;}
 
-    _LIBCPP_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
-    _LIBCPP_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
+    _LIBCUDACXX_INLINE_VISIBILITY void real(value_type __re) {__re_ = __re;}
+    _LIBCUDACXX_INLINE_VISIBILITY void imag(value_type __im) {__im_ = __im;}
 
-    _LIBCPP_INLINE_VISIBILITY complex& operator= (long double __re)
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator= (long double __re)
         {__re_ = __re; __im_ = value_type(); return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator+=(long double __re) {__re_ += __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator-=(long double __re) {__re_ -= __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator*=(long double __re) {__re_ *= __re; __im_ *= __re; return *this;}
-    _LIBCPP_INLINE_VISIBILITY complex& operator/=(long double __re) {__re_ /= __re; __im_ /= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator+=(long double __re) {__re_ += __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator-=(long double __re) {__re_ -= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator*=(long double __re) {__re_ *= __re; __im_ *= __re; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY complex& operator/=(long double __re) {__re_ /= __re; __im_ /= __re; return *this;}
 
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator= (const complex<_Xp>& __c)
         {
             __re_ = __c.real();
             __im_ = __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator+=(const complex<_Xp>& __c)
         {
             __re_ += __c.real();
             __im_ += __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator-=(const complex<_Xp>& __c)
         {
             __re_ -= __c.real();
             __im_ -= __c.imag();
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator*=(const complex<_Xp>& __c)
         {
             *this = *this * complex(__c.real(), __c.imag());
             return *this;
         }
-    template<class _Xp> _LIBCPP_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
+    template<class _Xp> _LIBCUDACXX_INLINE_VISIBILITY complex& operator/=(const complex<_Xp>& __c)
         {
             *this = *this / complex(__c.real(), __c.imag());
             return *this;
@@ -491,39 +491,39 @@ public:
 };
 
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 complex<float>::complex(const complex<double>& __c)
     : __re_(__c.real()), __im_(__c.imag()) {}
 
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 complex<float>::complex(const complex<long double>& __c)
     : __re_(__c.real()), __im_(__c.imag()) {}
 
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 complex<double>::complex(const complex<float>& __c)
     : __re_(__c.real()), __im_(__c.imag()) {}
 
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 complex<double>::complex(const complex<long double>& __c)
     : __re_(__c.real()), __im_(__c.imag()) {}
 
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 complex<long double>::complex(const complex<float>& __c)
     : __re_(__c.real()), __im_(__c.imag()) {}
 
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 complex<long double>::complex(const complex<double>& __c)
     : __re_(__c.real()), __im_(__c.imag()) {}
 
 // 26.3.6 operators:
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
 {
@@ -533,7 +533,7 @@ operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator+(const complex<_Tp>& __x, const _Tp& __y)
 {
@@ -543,7 +543,7 @@ operator+(const complex<_Tp>& __x, const _Tp& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator+(const _Tp& __x, const complex<_Tp>& __y)
 {
@@ -553,7 +553,7 @@ operator+(const _Tp& __x, const complex<_Tp>& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
 {
@@ -563,7 +563,7 @@ operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator-(const complex<_Tp>& __x, const _Tp& __y)
 {
@@ -573,7 +573,7 @@ operator-(const complex<_Tp>& __x, const _Tp& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator-(const _Tp& __x, const complex<_Tp>& __y)
 {
@@ -596,39 +596,39 @@ operator*(const complex<_Tp>& __z, const complex<_Tp>& __w)
     _Tp __bc = __b * __c;
     _Tp __x = __ac - __bd;
     _Tp __y = __ad + __bc;
-    if (__libcpp_isnan_or_builtin(__x) && __libcpp_isnan_or_builtin(__y))
+    if (__LIBCUDACXX_isnan_or_builtin(__x) && __LIBCUDACXX_isnan_or_builtin(__y))
     {
         bool __recalc = false;
-        if (__libcpp_isinf_or_builtin(__a) || __libcpp_isinf_or_builtin(__b))
+        if (__LIBCUDACXX_isinf_or_builtin(__a) || __LIBCUDACXX_isinf_or_builtin(__b))
         {
-            __a = copysign(__libcpp_isinf_or_builtin(__a) ? _Tp(1) : _Tp(0), __a);
-            __b = copysign(__libcpp_isinf_or_builtin(__b) ? _Tp(1) : _Tp(0), __b);
-            if (__libcpp_isnan_or_builtin(__c))
+            __a = copysign(__LIBCUDACXX_isinf_or_builtin(__a) ? _Tp(1) : _Tp(0), __a);
+            __b = copysign(__LIBCUDACXX_isinf_or_builtin(__b) ? _Tp(1) : _Tp(0), __b);
+            if (__LIBCUDACXX_isnan_or_builtin(__c))
                 __c = copysign(_Tp(0), __c);
-            if (__libcpp_isnan_or_builtin(__d))
+            if (__LIBCUDACXX_isnan_or_builtin(__d))
                 __d = copysign(_Tp(0), __d);
             __recalc = true;
         }
-        if (__libcpp_isinf_or_builtin(__c) || __libcpp_isinf_or_builtin(__d))
+        if (__LIBCUDACXX_isinf_or_builtin(__c) || __LIBCUDACXX_isinf_or_builtin(__d))
         {
-            __c = copysign(__libcpp_isinf_or_builtin(__c) ? _Tp(1) : _Tp(0), __c);
-            __d = copysign(__libcpp_isinf_or_builtin(__d) ? _Tp(1) : _Tp(0), __d);
-            if (__libcpp_isnan_or_builtin(__a))
+            __c = copysign(__LIBCUDACXX_isinf_or_builtin(__c) ? _Tp(1) : _Tp(0), __c);
+            __d = copysign(__LIBCUDACXX_isinf_or_builtin(__d) ? _Tp(1) : _Tp(0), __d);
+            if (__LIBCUDACXX_isnan_or_builtin(__a))
                 __a = copysign(_Tp(0), __a);
-            if (__libcpp_isnan_or_builtin(__b))
+            if (__LIBCUDACXX_isnan_or_builtin(__b))
                 __b = copysign(_Tp(0), __b);
             __recalc = true;
         }
-        if (!__recalc && (__libcpp_isinf_or_builtin(__ac) || __libcpp_isinf_or_builtin(__bd) ||
-                          __libcpp_isinf_or_builtin(__ad) || __libcpp_isinf_or_builtin(__bc)))
+        if (!__recalc && (__LIBCUDACXX_isinf_or_builtin(__ac) || __LIBCUDACXX_isinf_or_builtin(__bd) ||
+                          __LIBCUDACXX_isinf_or_builtin(__ad) || __LIBCUDACXX_isinf_or_builtin(__bc)))
         {
-            if (__libcpp_isnan_or_builtin(__a))
+            if (__LIBCUDACXX_isnan_or_builtin(__a))
                 __a = copysign(_Tp(0), __a);
-            if (__libcpp_isnan_or_builtin(__b))
+            if (__LIBCUDACXX_isnan_or_builtin(__b))
                 __b = copysign(_Tp(0), __b);
-            if (__libcpp_isnan_or_builtin(__c))
+            if (__LIBCUDACXX_isnan_or_builtin(__c))
                 __c = copysign(_Tp(0), __c);
-            if (__libcpp_isnan_or_builtin(__d))
+            if (__LIBCUDACXX_isnan_or_builtin(__d))
                 __d = copysign(_Tp(0), __d);
             __recalc = true;
         }
@@ -642,7 +642,7 @@ operator*(const complex<_Tp>& __z, const complex<_Tp>& __w)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator*(const complex<_Tp>& __x, const _Tp& __y)
 {
@@ -652,7 +652,7 @@ operator*(const complex<_Tp>& __x, const _Tp& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator*(const _Tp& __x, const complex<_Tp>& __y)
 {
@@ -671,7 +671,7 @@ operator/(const complex<_Tp>& __z, const complex<_Tp>& __w)
     _Tp __c = __w.real();
     _Tp __d = __w.imag();
     _Tp __logbw = logb(fmax(fabs(__c), fabs(__d)));
-    if (__libcpp_isfinite_or_builtin(__logbw))
+    if (__LIBCUDACXX_isfinite_or_builtin(__logbw))
     {
         __ilogbw = static_cast<int>(__logbw);
         __c = scalbn(__c, -__ilogbw);
@@ -680,24 +680,24 @@ operator/(const complex<_Tp>& __z, const complex<_Tp>& __w)
     _Tp __denom = __c * __c + __d * __d;
     _Tp __x = scalbn((__a * __c + __b * __d) / __denom, -__ilogbw);
     _Tp __y = scalbn((__b * __c - __a * __d) / __denom, -__ilogbw);
-    if (__libcpp_isnan_or_builtin(__x) && __libcpp_isnan_or_builtin(__y))
+    if (__LIBCUDACXX_isnan_or_builtin(__x) && __LIBCUDACXX_isnan_or_builtin(__y))
     {
-        if ((__denom == _Tp(0)) && (!__libcpp_isnan_or_builtin(__a) || !__libcpp_isnan_or_builtin(__b)))
+        if ((__denom == _Tp(0)) && (!__LIBCUDACXX_isnan_or_builtin(__a) || !__LIBCUDACXX_isnan_or_builtin(__b)))
         {
             __x = copysign(_Tp(INFINITY), __c) * __a;
             __y = copysign(_Tp(INFINITY), __c) * __b;
         }
-        else if ((__libcpp_isinf_or_builtin(__a) || __libcpp_isinf_or_builtin(__b)) && __libcpp_isfinite_or_builtin(__c) && __libcpp_isfinite_or_builtin(__d))
+        else if ((__LIBCUDACXX_isinf_or_builtin(__a) || __LIBCUDACXX_isinf_or_builtin(__b)) && __LIBCUDACXX_isfinite_or_builtin(__c) && __LIBCUDACXX_isfinite_or_builtin(__d))
         {
-            __a = copysign(__libcpp_isinf_or_builtin(__a) ? _Tp(1) : _Tp(0), __a);
-            __b = copysign(__libcpp_isinf_or_builtin(__b) ? _Tp(1) : _Tp(0), __b);
+            __a = copysign(__LIBCUDACXX_isinf_or_builtin(__a) ? _Tp(1) : _Tp(0), __a);
+            __b = copysign(__LIBCUDACXX_isinf_or_builtin(__b) ? _Tp(1) : _Tp(0), __b);
             __x = _Tp(INFINITY) * (__a * __c + __b * __d);
             __y = _Tp(INFINITY) * (__b * __c - __a * __d);
         }
-        else if (__libcpp_isinf_or_builtin(__logbw) && __logbw > _Tp(0) && __libcpp_isfinite_or_builtin(__a) && __libcpp_isfinite_or_builtin(__b))
+        else if (__LIBCUDACXX_isinf_or_builtin(__logbw) && __logbw > _Tp(0) && __LIBCUDACXX_isfinite_or_builtin(__a) && __LIBCUDACXX_isfinite_or_builtin(__b))
         {
-            __c = copysign(__libcpp_isinf_or_builtin(__c) ? _Tp(1) : _Tp(0), __c);
-            __d = copysign(__libcpp_isinf_or_builtin(__d) ? _Tp(1) : _Tp(0), __d);
+            __c = copysign(__LIBCUDACXX_isinf_or_builtin(__c) ? _Tp(1) : _Tp(0), __c);
+            __d = copysign(__LIBCUDACXX_isinf_or_builtin(__d) ? _Tp(1) : _Tp(0), __d);
             __x = _Tp(0) * (__a * __c + __b * __d);
             __y = _Tp(0) * (__b * __c - __a * __d);
         }
@@ -706,7 +706,7 @@ operator/(const complex<_Tp>& __z, const complex<_Tp>& __w)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator/(const complex<_Tp>& __x, const _Tp& __y)
 {
@@ -714,7 +714,7 @@ operator/(const complex<_Tp>& __x, const _Tp& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator/(const _Tp& __x, const complex<_Tp>& __y)
 {
@@ -724,7 +724,7 @@ operator/(const _Tp& __x, const complex<_Tp>& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator+(const complex<_Tp>& __x)
 {
@@ -732,7 +732,7 @@ operator+(const complex<_Tp>& __x)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 operator-(const complex<_Tp>& __x)
 {
@@ -740,7 +740,7 @@ operator-(const complex<_Tp>& __x)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
 {
@@ -748,7 +748,7 @@ operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator==(const complex<_Tp>& __x, const _Tp& __y)
 {
@@ -756,7 +756,7 @@ operator==(const complex<_Tp>& __x, const _Tp& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator==(const _Tp& __x, const complex<_Tp>& __y)
 {
@@ -764,7 +764,7 @@ operator==(const _Tp& __x, const complex<_Tp>& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
 {
@@ -772,7 +772,7 @@ operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator!=(const complex<_Tp>& __x, const _Tp& __y)
 {
@@ -780,7 +780,7 @@ operator!=(const complex<_Tp>& __x, const _Tp& __y)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator!=(const _Tp& __x, const complex<_Tp>& __y)
 {
@@ -792,11 +792,11 @@ operator!=(const _Tp& __x, const complex<_Tp>& __y)
 template <class _Tp, bool = is_integral<_Tp>::value,
                      bool = is_floating_point<_Tp>::value
                      >
-struct __libcpp_complex_overload_traits {};
+struct __LIBCUDACXX_complex_overload_traits {};
 
 // Integral Types
 template <class _Tp>
-struct __libcpp_complex_overload_traits<_Tp, true, false>
+struct __LIBCUDACXX_complex_overload_traits<_Tp, true, false>
 {
     typedef double _ValueType;
     typedef complex<double> _ComplexType;
@@ -804,7 +804,7 @@ struct __libcpp_complex_overload_traits<_Tp, true, false>
 
 // Floating point types
 template <class _Tp>
-struct __libcpp_complex_overload_traits<_Tp, false, true>
+struct __LIBCUDACXX_complex_overload_traits<_Tp, false, true>
 {
     typedef _Tp _ValueType;
     typedef complex<_Tp> _ComplexType;
@@ -813,7 +813,7 @@ struct __libcpp_complex_overload_traits<_Tp, false, true>
 // real
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp
 real(const complex<_Tp>& __c)
 {
@@ -821,8 +821,8 @@ real(const complex<_Tp>& __c)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-typename __libcpp_complex_overload_traits<_Tp>::_ValueType
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
+typename __LIBCUDACXX_complex_overload_traits<_Tp>::_ValueType
 real(_Tp __re)
 {
     return __re;
@@ -831,7 +831,7 @@ real(_Tp __re)
 // imag
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 _Tp
 imag(const complex<_Tp>& __c)
 {
@@ -839,8 +839,8 @@ imag(const complex<_Tp>& __c)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
-typename __libcpp_complex_overload_traits<_Tp>::_ValueType
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
+typename __LIBCUDACXX_complex_overload_traits<_Tp>::_ValueType
 imag(_Tp)
 {
     return 0;
@@ -849,7 +849,7 @@ imag(_Tp)
 // abs
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 abs(const complex<_Tp>& __c)
 {
@@ -859,7 +859,7 @@ abs(const complex<_Tp>& __c)
 // arg
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 arg(const complex<_Tp>& __c)
 {
@@ -867,7 +867,7 @@ arg(const complex<_Tp>& __c)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if<
     is_same<_Tp, long double>::value,
     long double
@@ -878,7 +878,7 @@ arg(_Tp __re)
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value || is_same<_Tp, double>::value,
@@ -890,7 +890,7 @@ arg(_Tp __re)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if<
     is_same<_Tp, float>::value,
     float
@@ -903,30 +903,30 @@ arg(_Tp __re)
 // norm
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _Tp
 norm(const complex<_Tp>& __c)
 {
-    if (__libcpp_isinf_or_builtin(__c.real()))
+    if (__LIBCUDACXX_isinf_or_builtin(__c.real()))
         return abs(__c.real());
-    if (__libcpp_isinf_or_builtin(__c.imag()))
+    if (__LIBCUDACXX_isinf_or_builtin(__c.imag()))
         return abs(__c.imag());
     return __c.real() * __c.real() + __c.imag() * __c.imag();
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-typename __libcpp_complex_overload_traits<_Tp>::_ValueType
+inline _LIBCUDACXX_INLINE_VISIBILITY
+typename __LIBCUDACXX_complex_overload_traits<_Tp>::_ValueType
 norm(_Tp __re)
 {
-    typedef typename __libcpp_complex_overload_traits<_Tp>::_ValueType _ValueType;
+    typedef typename __LIBCUDACXX_complex_overload_traits<_Tp>::_ValueType _ValueType;
     return static_cast<_ValueType>(__re) * __re;
 }
 
 // conj
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 conj(const complex<_Tp>& __c)
 {
@@ -934,11 +934,11 @@ conj(const complex<_Tp>& __c)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-typename __libcpp_complex_overload_traits<_Tp>::_ComplexType
+inline _LIBCUDACXX_INLINE_VISIBILITY
+typename __LIBCUDACXX_complex_overload_traits<_Tp>::_ComplexType
 conj(_Tp __re)
 {
-    typedef typename __libcpp_complex_overload_traits<_Tp>::_ComplexType _ComplexType;
+    typedef typename __LIBCUDACXX_complex_overload_traits<_Tp>::_ComplexType _ComplexType;
     return _ComplexType(__re);
 }
 
@@ -947,40 +947,40 @@ conj(_Tp __re)
 // proj
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 proj(const complex<_Tp>& __c)
 {
     complex<_Tp> __r = __c;
-    if (__libcpp_isinf_or_builtin(__c.real()) || __libcpp_isinf_or_builtin(__c.imag()))
+    if (__LIBCUDACXX_isinf_or_builtin(__c.real()) || __LIBCUDACXX_isinf_or_builtin(__c.imag()))
         __r = complex<_Tp>(INFINITY, copysign(_Tp(0), __c.imag()));
     return __r;
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_floating_point<_Tp>::value,
-    typename __libcpp_complex_overload_traits<_Tp>::_ComplexType
+    typename __LIBCUDACXX_complex_overload_traits<_Tp>::_ComplexType
 >::type
 proj(_Tp __re)
 {
-    if (__libcpp_isinf_or_builtin(__re))
+    if (__LIBCUDACXX_isinf_or_builtin(__re))
         __re = abs(__re);
     return complex<_Tp>(__re);
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_integral<_Tp>::value,
-    typename __libcpp_complex_overload_traits<_Tp>::_ComplexType
+    typename __LIBCUDACXX_complex_overload_traits<_Tp>::_ComplexType
 >::type
 proj(_Tp __re)
 {
-    typedef typename __libcpp_complex_overload_traits<_Tp>::_ComplexType _ComplexType;
+    typedef typename __LIBCUDACXX_complex_overload_traits<_Tp>::_ComplexType _ComplexType;
     return _ComplexType(__re);
 }
 
@@ -990,25 +990,25 @@ template<class _Tp>
 complex<_Tp>
 polar(const _Tp& __rho, const _Tp& __theta = _Tp())
 {
-    if (__libcpp_isnan_or_builtin(__rho) || signbit(__rho))
+    if (__LIBCUDACXX_isnan_or_builtin(__rho) || signbit(__rho))
         return complex<_Tp>(_Tp(NAN), _Tp(NAN));
-    if (__libcpp_isnan_or_builtin(__theta))
+    if (__LIBCUDACXX_isnan_or_builtin(__theta))
     {
-        if (__libcpp_isinf_or_builtin(__rho))
+        if (__LIBCUDACXX_isinf_or_builtin(__rho))
             return complex<_Tp>(__rho, __theta);
         return complex<_Tp>(__theta, __theta);
     }
-    if (__libcpp_isinf_or_builtin(__theta))
+    if (__LIBCUDACXX_isinf_or_builtin(__theta))
     {
-        if (__libcpp_isinf_or_builtin(__rho))
+        if (__LIBCUDACXX_isinf_or_builtin(__rho))
             return complex<_Tp>(__rho, _Tp(NAN));
         return complex<_Tp>(_Tp(NAN), _Tp(NAN));
     }
     _Tp __x = __rho * cos(__theta);
-    if (__libcpp_isnan_or_builtin(__x))
+    if (__LIBCUDACXX_isnan_or_builtin(__x))
         __x = 0;
     _Tp __y = __rho * sin(__theta);
-    if (__libcpp_isnan_or_builtin(__y))
+    if (__LIBCUDACXX_isnan_or_builtin(__y))
         __y = 0;
     return complex<_Tp>(__x, __y);
 }
@@ -1016,7 +1016,7 @@ polar(const _Tp& __rho, const _Tp& __theta = _Tp())
 // log
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 log(const complex<_Tp>& __x)
 {
@@ -1026,7 +1026,7 @@ log(const complex<_Tp>& __x)
 // log10
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 log10(const complex<_Tp>& __x)
 {
@@ -1039,13 +1039,13 @@ template<class _Tp>
 complex<_Tp>
 sqrt(const complex<_Tp>& __x)
 {
-    if (__libcpp_isinf_or_builtin(__x.imag()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.imag()))
         return complex<_Tp>(_Tp(INFINITY), __x.imag());
-    if (__libcpp_isinf_or_builtin(__x.real()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.real()))
     {
         if (__x.real() > _Tp(0))
-            return complex<_Tp>(__x.real(), __libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : copysign(_Tp(0), __x.imag()));
-        return complex<_Tp>(__libcpp_isnan_or_builtin(__x.imag()) ? __x.imag() : _Tp(0), copysign(__x.real(), __x.imag()));
+            return complex<_Tp>(__x.real(), __LIBCUDACXX_isnan_or_builtin(__x.imag()) ? __x.imag() : copysign(_Tp(0), __x.imag()));
+        return complex<_Tp>(__LIBCUDACXX_isnan_or_builtin(__x.imag()) ? __x.imag() : _Tp(0), copysign(__x.real(), __x.imag()));
     }
     return polar(sqrt(abs(__x)), arg(__x) / _Tp(2));
 }
@@ -1060,16 +1060,16 @@ exp(const complex<_Tp>& __x)
     if (__i == 0) {
         return complex<_Tp>(exp(__x.real()), copysign(_Tp(0), __x.imag()));
     }
-    if (__libcpp_isinf_or_builtin(__x.real()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.real()))
     {
         if (__x.real() < _Tp(0))
         {
-            if (!__libcpp_isfinite_or_builtin(__i))
+            if (!__LIBCUDACXX_isfinite_or_builtin(__i))
                 __i = _Tp(1);
         }
-        else if (__i == 0 || !__libcpp_isfinite_or_builtin(__i))
+        else if (__i == 0 || !__LIBCUDACXX_isfinite_or_builtin(__i))
         {
-            if (__libcpp_isinf_or_builtin(__i))
+            if (__LIBCUDACXX_isinf_or_builtin(__i))
                 __i = _Tp(NAN);
             return complex<_Tp>(__x.real(), __i);
         }
@@ -1081,7 +1081,7 @@ exp(const complex<_Tp>& __x)
 // pow
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
 {
@@ -1089,16 +1089,16 @@ pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
 }
 
 template<class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<typename __promote<_Tp, _Up>::type>
 pow(const complex<_Tp>& __x, const complex<_Up>& __y)
 {
     typedef complex<typename __promote<_Tp, _Up>::type> result_type;
-    return _VSTD::pow(result_type(__x), result_type(__y));
+    return _CUDA_VSTD::pow(result_type(__x), result_type(__y));
 }
 
 template<class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_arithmetic<_Up>::value,
@@ -1107,11 +1107,11 @@ typename enable_if
 pow(const complex<_Tp>& __x, const _Up& __y)
 {
     typedef complex<typename __promote<_Tp, _Up>::type> result_type;
-    return _VSTD::pow(result_type(__x), result_type(__y));
+    return _CUDA_VSTD::pow(result_type(__x), result_type(__y));
 }
 
 template<class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_arithmetic<_Tp>::value,
@@ -1120,13 +1120,13 @@ typename enable_if
 pow(const _Tp& __x, const complex<_Up>& __y)
 {
     typedef complex<typename __promote<_Tp, _Up>::type> result_type;
-    return _VSTD::pow(result_type(__x), result_type(__y));
+    return _CUDA_VSTD::pow(result_type(__x), result_type(__y));
 }
 
 // __sqr, computes pow(x, 2)
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 __sqr(const complex<_Tp>& __x)
 {
@@ -1141,23 +1141,23 @@ complex<_Tp>
 asinh(const complex<_Tp>& __x)
 {
     const _Tp __pi(atan2(+0., -0.));
-    if (__libcpp_isinf_or_builtin(__x.real()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.real()))
     {
-        if (__libcpp_isnan_or_builtin(__x.imag()))
+        if (__LIBCUDACXX_isnan_or_builtin(__x.imag()))
             return __x;
-        if (__libcpp_isinf_or_builtin(__x.imag()))
+        if (__LIBCUDACXX_isinf_or_builtin(__x.imag()))
             return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag()));
         return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
     }
-    if (__libcpp_isnan_or_builtin(__x.real()))
+    if (__LIBCUDACXX_isnan_or_builtin(__x.real()))
     {
-        if (__libcpp_isinf_or_builtin(__x.imag()))
+        if (__LIBCUDACXX_isinf_or_builtin(__x.imag()))
             return complex<_Tp>(__x.imag(), __x.real());
         if (__x.imag() == 0)
             return __x;
         return complex<_Tp>(__x.real(), __x.real());
     }
-    if (__libcpp_isinf_or_builtin(__x.imag()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.imag()))
         return complex<_Tp>(copysign(__x.imag(), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
     complex<_Tp> __z = log(__x + sqrt(__sqr(__x) + _Tp(1)));
     return complex<_Tp>(copysign(__z.real(), __x.real()), copysign(__z.imag(), __x.imag()));
@@ -1170,11 +1170,11 @@ complex<_Tp>
 acosh(const complex<_Tp>& __x)
 {
     const _Tp __pi(atan2(+0., -0.));
-    if (__libcpp_isinf_or_builtin(__x.real()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.real()))
     {
-        if (__libcpp_isnan_or_builtin(__x.imag()))
+        if (__LIBCUDACXX_isnan_or_builtin(__x.imag()))
             return complex<_Tp>(abs(__x.real()), __x.imag());
-        if (__libcpp_isinf_or_builtin(__x.imag()))
+        if (__LIBCUDACXX_isinf_or_builtin(__x.imag()))
         {
             if (__x.real() > 0)
                 return complex<_Tp>(__x.real(), copysign(__pi * _Tp(0.25), __x.imag()));
@@ -1185,13 +1185,13 @@ acosh(const complex<_Tp>& __x)
             return complex<_Tp>(-__x.real(), copysign(__pi, __x.imag()));
         return complex<_Tp>(__x.real(), copysign(_Tp(0), __x.imag()));
     }
-    if (__libcpp_isnan_or_builtin(__x.real()))
+    if (__LIBCUDACXX_isnan_or_builtin(__x.real()))
     {
-        if (__libcpp_isinf_or_builtin(__x.imag()))
+        if (__LIBCUDACXX_isinf_or_builtin(__x.imag()))
             return complex<_Tp>(abs(__x.imag()), __x.real());
         return complex<_Tp>(__x.real(), __x.real());
     }
-    if (__libcpp_isinf_or_builtin(__x.imag()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.imag()))
         return complex<_Tp>(abs(__x.imag()), copysign(__pi/_Tp(2), __x.imag()));
     complex<_Tp> __z = log(__x + sqrt(__sqr(__x) - _Tp(1)));
     return complex<_Tp>(copysign(__z.real(), _Tp(0)), copysign(__z.imag(), __x.imag()));
@@ -1204,21 +1204,21 @@ complex<_Tp>
 atanh(const complex<_Tp>& __x)
 {
     const _Tp __pi(atan2(+0., -0.));
-    if (__libcpp_isinf_or_builtin(__x.imag()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.imag()))
     {
         return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
     }
-    if (__libcpp_isnan_or_builtin(__x.imag()))
+    if (__LIBCUDACXX_isnan_or_builtin(__x.imag()))
     {
-        if (__libcpp_isinf_or_builtin(__x.real()) || __x.real() == 0)
+        if (__LIBCUDACXX_isinf_or_builtin(__x.real()) || __x.real() == 0)
             return complex<_Tp>(copysign(_Tp(0), __x.real()), __x.imag());
         return complex<_Tp>(__x.imag(), __x.imag());
     }
-    if (__libcpp_isnan_or_builtin(__x.real()))
+    if (__LIBCUDACXX_isnan_or_builtin(__x.real()))
     {
         return complex<_Tp>(__x.real(), __x.real());
     }
-    if (__libcpp_isinf_or_builtin(__x.real()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.real()))
     {
         return complex<_Tp>(copysign(_Tp(0), __x.real()), copysign(__pi/_Tp(2), __x.imag()));
     }
@@ -1236,11 +1236,11 @@ template<class _Tp>
 complex<_Tp>
 sinh(const complex<_Tp>& __x)
 {
-    if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.real()) && !__LIBCUDACXX_isfinite_or_builtin(__x.imag()))
         return complex<_Tp>(__x.real(), _Tp(NAN));
-    if (__x.real() == 0 && !__libcpp_isfinite_or_builtin(__x.imag()))
+    if (__x.real() == 0 && !__LIBCUDACXX_isfinite_or_builtin(__x.imag()))
         return complex<_Tp>(__x.real(), _Tp(NAN));
-    if (__x.imag() == 0 && !__libcpp_isfinite_or_builtin(__x.real()))
+    if (__x.imag() == 0 && !__LIBCUDACXX_isfinite_or_builtin(__x.real()))
         return __x;
     return complex<_Tp>(sinh(__x.real()) * cos(__x.imag()), cosh(__x.real()) * sin(__x.imag()));
 }
@@ -1251,13 +1251,13 @@ template<class _Tp>
 complex<_Tp>
 cosh(const complex<_Tp>& __x)
 {
-    if (__libcpp_isinf_or_builtin(__x.real()) && !__libcpp_isfinite_or_builtin(__x.imag()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.real()) && !__LIBCUDACXX_isfinite_or_builtin(__x.imag()))
         return complex<_Tp>(abs(__x.real()), _Tp(NAN));
-    if (__x.real() == 0 && !__libcpp_isfinite_or_builtin(__x.imag()))
+    if (__x.real() == 0 && !__LIBCUDACXX_isfinite_or_builtin(__x.imag()))
         return complex<_Tp>(_Tp(NAN), __x.real());
     if (__x.real() == 0 && __x.imag() == 0)
         return complex<_Tp>(_Tp(1), __x.imag());
-    if (__x.imag() == 0 && !__libcpp_isfinite_or_builtin(__x.real()))
+    if (__x.imag() == 0 && !__LIBCUDACXX_isfinite_or_builtin(__x.real()))
         return complex<_Tp>(abs(__x.real()), __x.imag());
     return complex<_Tp>(cosh(__x.real()) * cos(__x.imag()), sinh(__x.real()) * sin(__x.imag()));
 }
@@ -1268,19 +1268,19 @@ template<class _Tp>
 complex<_Tp>
 tanh(const complex<_Tp>& __x)
 {
-    if (__libcpp_isinf_or_builtin(__x.real()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.real()))
     {
-        if (!__libcpp_isfinite_or_builtin(__x.imag()))
+        if (!__LIBCUDACXX_isfinite_or_builtin(__x.imag()))
             return complex<_Tp>(copysign(_Tp(1), __x.real()), _Tp(0));
         return complex<_Tp>(copysign(_Tp(1), __x.real()), copysign(_Tp(0), sin(_Tp(2) * __x.imag())));
     }
-    if (__libcpp_isnan_or_builtin(__x.real()) && __x.imag() == 0)
+    if (__LIBCUDACXX_isnan_or_builtin(__x.real()) && __x.imag() == 0)
         return __x;
     _Tp __2r(_Tp(2) * __x.real());
     _Tp __2i(_Tp(2) * __x.imag());
     _Tp __d(cosh(__2r) + cos(__2i));
     _Tp __2rsh(sinh(__2r));
-    if (__libcpp_isinf_or_builtin(__2rsh) && __libcpp_isinf_or_builtin(__d))
+    if (__LIBCUDACXX_isinf_or_builtin(__2rsh) && __LIBCUDACXX_isinf_or_builtin(__d))
         return complex<_Tp>(__2rsh > _Tp(0) ? _Tp(1) : _Tp(-1),
                             __2i > _Tp(0) ? _Tp(0) : _Tp(-0.));
     return  complex<_Tp>(__2rsh/__d, sin(__2i)/__d);
@@ -1303,11 +1303,11 @@ complex<_Tp>
 acos(const complex<_Tp>& __x)
 {
     const _Tp __pi(atan2(+0., -0.));
-    if (__libcpp_isinf_or_builtin(__x.real()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.real()))
     {
-        if (__libcpp_isnan_or_builtin(__x.imag()))
+        if (__LIBCUDACXX_isnan_or_builtin(__x.imag()))
             return complex<_Tp>(__x.imag(), __x.real());
-        if (__libcpp_isinf_or_builtin(__x.imag()))
+        if (__LIBCUDACXX_isinf_or_builtin(__x.imag()))
         {
             if (__x.real() < _Tp(0))
                 return complex<_Tp>(_Tp(0.75) * __pi, -__x.imag());
@@ -1317,13 +1317,13 @@ acos(const complex<_Tp>& __x)
             return complex<_Tp>(__pi, signbit(__x.imag()) ? -__x.real() : __x.real());
         return complex<_Tp>(_Tp(0), signbit(__x.imag()) ? __x.real() : -__x.real());
     }
-    if (__libcpp_isnan_or_builtin(__x.real()))
+    if (__LIBCUDACXX_isnan_or_builtin(__x.real()))
     {
-        if (__libcpp_isinf_or_builtin(__x.imag()))
+        if (__LIBCUDACXX_isinf_or_builtin(__x.imag()))
             return complex<_Tp>(__x.real(), -__x.imag());
         return complex<_Tp>(__x.real(), __x.real());
     }
-    if (__libcpp_isinf_or_builtin(__x.imag()))
+    if (__LIBCUDACXX_isinf_or_builtin(__x.imag()))
         return complex<_Tp>(__pi/_Tp(2), -__x.imag());
     if (__x.real() == 0 && (__x.imag() == 0 || isnan(__x.imag())))
         return complex<_Tp>(__pi/_Tp(2), -__x.imag());
@@ -1356,7 +1356,7 @@ sin(const complex<_Tp>& __x)
 // cos
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 complex<_Tp>
 cos(const complex<_Tp>& __x)
 {
@@ -1435,7 +1435,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
     return __is;
 }
 
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 template<class _Tp, class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
@@ -1447,9 +1447,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
     __s << '(' << __x.real() << ',' << __x.imag() << ')';
     return __os << __s.str();
 }
-#endif // !_LIBCPP_HAS_NO_LOCALIZATION
+#endif // !_LIBCUDACXX_HAS_NO_LOCALIZATION
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 // Literal suffix for complex number literals [complex.literals]
 inline namespace literals
 {
@@ -1490,6 +1490,6 @@ inline namespace literals
 } // namespace literals
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_COMPLEX
+#endif // _LIBCUDACXX_COMPLEX

diff  --git a/libcxx/include/complex.h b/libcxx/include/complex.h
index a2814669c7d4..1071e4a6733c 100644
--- a/libcxx/include/complex.h
+++ b/libcxx/include/complex.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_COMPLEX_H
-#define _LIBCPP_COMPLEX_H
+#ifndef _LIBCUDACXX_COMPLEX_H
+#define _LIBCUDACXX_COMPLEX_H
 
 /*
     complex.h synopsis
@@ -19,7 +19,7 @@
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -33,4 +33,4 @@
 
 #endif // __cplusplus
 
-#endif // _LIBCPP_COMPLEX_H
+#endif // _LIBCUDACXX_COMPLEX_H

diff  --git a/libcxx/include/concepts b/libcxx/include/concepts
index 301256ca7ef7..060a09efaad0 100644
--- a/libcxx/include/concepts
+++ b/libcxx/include/concepts
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CONCEPTS
-#define _LIBCPP_CONCEPTS
+#ifndef _LIBCUDACXX_CONCEPTS
+#define _LIBCUDACXX_CONCEPTS
 
 /*
     concepts synopsis
@@ -155,8 +155,8 @@ namespace std {
 #include <__config>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_CONCEPTS
+#endif // _LIBCUDACXX_CONCEPTS

diff  --git a/libcxx/include/condition_variable b/libcxx/include/condition_variable
index 92088f3e1b22..f8998e5ae8df 100644
--- a/libcxx/include/condition_variable
+++ b/libcxx/include/condition_variable
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CONDITION_VARIABLE
-#define _LIBCPP_CONDITION_VARIABLE
+#ifndef _LIBCUDACXX_CONDITION_VARIABLE
+#define _LIBCUDACXX_CONDITION_VARIABLE
 
 /*
     condition_variable synopsis
@@ -112,56 +112,56 @@ public:
 #include <memory>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS condition_variable_any
+class _LIBCUDACXX_TYPE_VIS condition_variable_any
 {
     condition_variable __cv_;
     shared_ptr<mutex>  __mut_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     condition_variable_any();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void notify_one() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void notify_all() _NOEXCEPT;
 
     template <class _Lock>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         void wait(_Lock& __lock);
     template <class _Lock, class _Predicate>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void wait(_Lock& __lock, _Predicate __pred);
 
     template <class _Lock, class _Clock, class _Duration>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         cv_status
         wait_until(_Lock& __lock,
                    const chrono::time_point<_Clock, _Duration>& __t);
 
     template <class _Lock, class _Clock, class _Duration, class _Predicate>
         bool
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         wait_until(_Lock& __lock,
                    const chrono::time_point<_Clock, _Duration>& __t,
                    _Predicate __pred);
 
     template <class _Lock, class _Rep, class _Period>
         cv_status
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         wait_for(_Lock& __lock,
                  const chrono::duration<_Rep, _Period>& __d);
 
     template <class _Lock, class _Rep, class _Period, class _Predicate>
         bool
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         wait_for(_Lock& __lock,
                  const chrono::duration<_Rep, _Period>& __d,
                  _Predicate __pred);
@@ -257,14 +257,14 @@ condition_variable_any::wait_for(_Lock& __lock,
                                  _Predicate __pred)
 {
     return wait_until(__lock, chrono::steady_clock::now() + __d,
-                      _VSTD::move(__pred));
+                      _CUDA_VSTD::move(__pred));
 }
 
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 void notify_all_at_thread_exit(condition_variable&, unique_lock<mutex>);
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // !_LIBCUDACXX_HAS_NO_THREADS
 
-#endif // _LIBCPP_CONDITION_VARIABLE
+#endif // _LIBCUDACXX_CONDITION_VARIABLE

diff  --git a/libcxx/include/coroutine b/libcxx/include/coroutine
index 6582f5554ed0..6a66a00b9c91 100644
--- a/libcxx/include/coroutine
+++ b/libcxx/include/coroutine
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_COROUTINE
-#define _LIBCPP_COROUTINE
+#ifndef _LIBCUDACXX_COROUTINE
+#define _LIBCUDACXX_COROUTINE
 
 /**
     coroutine synopsis
@@ -46,15 +46,15 @@ struct suspend_always;
 #include <__coroutine/trivial_awaitables.h>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <iosfwd>
 #endif
 
 // standard-mandated includes
 #include <compare>
 
-#ifndef _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER
+#ifndef _LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_COROUTINE
+#endif // _LIBCUDACXX_COROUTINE

diff  --git a/libcxx/include/csetjmp b/libcxx/include/csetjmp
index 4f40bcbf61e9..bd135edd4c23 100644
--- a/libcxx/include/csetjmp
+++ b/libcxx/include/csetjmp
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CSETJMP
-#define _LIBCPP_CSETJMP
+#ifndef _LIBCUDACXX_CSETJMP
+#define _LIBCUDACXX_CSETJMP
 
 /*
     csetjmp synopsis
@@ -34,15 +34,15 @@ void longjmp(jmp_buf env, int val);
 #include <__config>
 #include <setjmp.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-using ::jmp_buf _LIBCPP_USING_IF_EXISTS;
-using ::longjmp _LIBCPP_USING_IF_EXISTS;
+using ::jmp_buf _LIBCUDACXX_USING_IF_EXISTS;
+using ::longjmp _LIBCUDACXX_USING_IF_EXISTS;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_CSETJMP
+#endif // _LIBCUDACXX_CSETJMP

diff  --git a/libcxx/include/csignal b/libcxx/include/csignal
index c1b58f818b62..cc57edb34640 100644
--- a/libcxx/include/csignal
+++ b/libcxx/include/csignal
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CSIGNAL
-#define _LIBCPP_CSIGNAL
+#ifndef _LIBCUDACXX_CSIGNAL
+#define _LIBCUDACXX_CSIGNAL
 
 /*
     csignal synopsis
@@ -46,16 +46,16 @@ int raise(int sig);
 # include <signal.h>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-using ::sig_atomic_t _LIBCPP_USING_IF_EXISTS;
-using ::signal _LIBCPP_USING_IF_EXISTS;
-using ::raise _LIBCPP_USING_IF_EXISTS;
+using ::sig_atomic_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::signal _LIBCUDACXX_USING_IF_EXISTS;
+using ::raise _LIBCUDACXX_USING_IF_EXISTS;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_CSIGNAL
+#endif // _LIBCUDACXX_CSIGNAL

diff  --git a/libcxx/include/cstdarg b/libcxx/include/cstdarg
index f36ade202b7a..d6a1bdf352b7 100644
--- a/libcxx/include/cstdarg
+++ b/libcxx/include/cstdarg
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CSTDARG
-#define _LIBCPP_CSTDARG
+#ifndef _LIBCUDACXX_CSTDARG
+#define _LIBCUDACXX_CSTDARG
 
 /*
     cstdarg synopsis
@@ -35,14 +35,14 @@ Types:
 #include <__config>
 #include <stdarg.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-using ::va_list _LIBCPP_USING_IF_EXISTS;
+using ::va_list _LIBCUDACXX_USING_IF_EXISTS;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_CSTDARG
+#endif // _LIBCUDACXX_CSTDARG

diff  --git a/libcxx/include/cstdbool b/libcxx/include/cstdbool
index ce608033a22c..3e56e783ebab 100644
--- a/libcxx/include/cstdbool
+++ b/libcxx/include/cstdbool
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CSTDBOOL
-#define _LIBCPP_CSTDBOOL
+#ifndef _LIBCUDACXX_CSTDBOOL
+#define _LIBCUDACXX_CSTDBOOL
 
 /*
     cstdbool synopsis
@@ -22,11 +22,11 @@ Macros:
 #include <__assert> // all public C++ headers provide the assertion handler
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 #undef __bool_true_false_are_defined
 #define __bool_true_false_are_defined 1
 
-#endif // _LIBCPP_CSTDBOOL
+#endif // _LIBCUDACXX_CSTDBOOL

diff  --git a/libcxx/include/cstddef b/libcxx/include/cstddef
index 8daba076d7db..28c057982517 100644
--- a/libcxx/include/cstddef
+++ b/libcxx/include/cstddef
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CSTDDEF
-#define _LIBCPP_CSTDDEF
+#ifndef _LIBCUDACXX_CSTDDEF
+#define _LIBCUDACXX_CSTDDEF
 
 /*
     cstddef synopsis
@@ -41,23 +41,23 @@ Types:
 #include <stddef.h>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 using ::nullptr_t;
-using ::ptr
diff _t _LIBCPP_USING_IF_EXISTS;
-using ::size_t _LIBCPP_USING_IF_EXISTS;
+using ::ptr
diff _t _LIBCUDACXX_USING_IF_EXISTS;
+using ::size_t _LIBCUDACXX_USING_IF_EXISTS;
 
-#if !defined(_LIBCPP_CXX03_LANG)
-using ::max_align_t _LIBCPP_USING_IF_EXISTS;
+#if !defined(_LIBCUDACXX_CXX03_LANG)
+using ::max_align_t _LIBCUDACXX_USING_IF_EXISTS;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 namespace std  // purposefully not versioned
 {
 enum class byte : unsigned char {};
@@ -127,11 +127,11 @@ template <class _Integer>
   { return static_cast<byte>(static_cast<unsigned char>(static_cast<unsigned int>(__lhs) >> __shift)); }
 
 template <class _Integer, class = _EnableByteOverload<_Integer> >
-  _LIBCPP_NODISCARD_EXT constexpr _Integer
+  _LIBCUDACXX_NODISCARD_EXT constexpr _Integer
   to_integer(byte __b) noexcept { return static_cast<_Integer>(__b); }
 
 } // namespace std
 
 #endif
 
-#endif // _LIBCPP_CSTDDEF
+#endif // _LIBCUDACXX_CSTDDEF

diff  --git a/libcxx/include/cstdint b/libcxx/include/cstdint
index 83cda947b497..bb588d7bec91 100644
--- a/libcxx/include/cstdint
+++ b/libcxx/include/cstdint
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CSTDINT
-#define _LIBCPP_CSTDINT
+#ifndef _LIBCUDACXX_CSTDINT
+#define _LIBCUDACXX_CSTDINT
 
 /*
     cstdint synopsis
@@ -144,48 +144,48 @@ Types:
 #include <__config>
 #include <stdint.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-using ::int8_t _LIBCPP_USING_IF_EXISTS;
-using ::int16_t _LIBCPP_USING_IF_EXISTS;
-using ::int32_t _LIBCPP_USING_IF_EXISTS;
-using ::int64_t _LIBCPP_USING_IF_EXISTS;
+using ::int8_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::int16_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::int32_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::int64_t _LIBCUDACXX_USING_IF_EXISTS;
 
-using ::uint8_t _LIBCPP_USING_IF_EXISTS;
-using ::uint16_t _LIBCPP_USING_IF_EXISTS;
-using ::uint32_t _LIBCPP_USING_IF_EXISTS;
-using ::uint64_t _LIBCPP_USING_IF_EXISTS;
+using ::uint8_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::uint16_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::uint32_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::uint64_t _LIBCUDACXX_USING_IF_EXISTS;
 
-using ::int_least8_t _LIBCPP_USING_IF_EXISTS;
-using ::int_least16_t _LIBCPP_USING_IF_EXISTS;
-using ::int_least32_t _LIBCPP_USING_IF_EXISTS;
-using ::int_least64_t _LIBCPP_USING_IF_EXISTS;
+using ::int_least8_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::int_least16_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::int_least32_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::int_least64_t _LIBCUDACXX_USING_IF_EXISTS;
 
-using ::uint_least8_t _LIBCPP_USING_IF_EXISTS;
-using ::uint_least16_t _LIBCPP_USING_IF_EXISTS;
-using ::uint_least32_t _LIBCPP_USING_IF_EXISTS;
-using ::uint_least64_t _LIBCPP_USING_IF_EXISTS;
+using ::uint_least8_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::uint_least16_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::uint_least32_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::uint_least64_t _LIBCUDACXX_USING_IF_EXISTS;
 
-using ::int_fast8_t _LIBCPP_USING_IF_EXISTS;
-using ::int_fast16_t _LIBCPP_USING_IF_EXISTS;
-using ::int_fast32_t _LIBCPP_USING_IF_EXISTS;
-using ::int_fast64_t _LIBCPP_USING_IF_EXISTS;
+using ::int_fast8_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::int_fast16_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::int_fast32_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::int_fast64_t _LIBCUDACXX_USING_IF_EXISTS;
 
-using ::uint_fast8_t _LIBCPP_USING_IF_EXISTS;
-using ::uint_fast16_t _LIBCPP_USING_IF_EXISTS;
-using ::uint_fast32_t _LIBCPP_USING_IF_EXISTS;
-using ::uint_fast64_t _LIBCPP_USING_IF_EXISTS;
+using ::uint_fast8_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::uint_fast16_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::uint_fast32_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::uint_fast64_t _LIBCUDACXX_USING_IF_EXISTS;
 
-using ::intptr_t _LIBCPP_USING_IF_EXISTS;
-using ::uintptr_t _LIBCPP_USING_IF_EXISTS;
+using ::intptr_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::uintptr_t _LIBCUDACXX_USING_IF_EXISTS;
 
-using ::intmax_t _LIBCPP_USING_IF_EXISTS;
-using ::uintmax_t _LIBCPP_USING_IF_EXISTS;
+using ::intmax_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::uintmax_t _LIBCUDACXX_USING_IF_EXISTS;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_CSTDINT
+#endif // _LIBCUDACXX_CSTDINT

diff  --git a/libcxx/include/cstdio b/libcxx/include/cstdio
index d191086a85da..9c1a0bb19fe0 100644
--- a/libcxx/include/cstdio
+++ b/libcxx/include/cstdio
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CSTDIO
-#define _LIBCPP_CSTDIO
+#ifndef _LIBCUDACXX_CSTDIO
+#define _LIBCUDACXX_CSTDIO
 
 /*
     cstdio synopsis
@@ -99,72 +99,72 @@ void perror(const char* s);
 #include <__config>
 #include <stdio.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-using ::FILE _LIBCPP_USING_IF_EXISTS;
-using ::fpos_t _LIBCPP_USING_IF_EXISTS;
-using ::size_t _LIBCPP_USING_IF_EXISTS;
-
-using ::fclose _LIBCPP_USING_IF_EXISTS;
-using ::fflush _LIBCPP_USING_IF_EXISTS;
-using ::setbuf _LIBCPP_USING_IF_EXISTS;
-using ::setvbuf _LIBCPP_USING_IF_EXISTS;
-using ::fprintf _LIBCPP_USING_IF_EXISTS;
-using ::fscanf _LIBCPP_USING_IF_EXISTS;
-using ::snprintf _LIBCPP_USING_IF_EXISTS;
-using ::sprintf _LIBCPP_USING_IF_EXISTS;
-using ::sscanf _LIBCPP_USING_IF_EXISTS;
-using ::vfprintf _LIBCPP_USING_IF_EXISTS;
-using ::vfscanf _LIBCPP_USING_IF_EXISTS;
-using ::vsscanf _LIBCPP_USING_IF_EXISTS;
-using ::vsnprintf _LIBCPP_USING_IF_EXISTS;
-using ::vsprintf _LIBCPP_USING_IF_EXISTS;
-using ::fgetc _LIBCPP_USING_IF_EXISTS;
-using ::fgets _LIBCPP_USING_IF_EXISTS;
-using ::fputc _LIBCPP_USING_IF_EXISTS;
-using ::fputs _LIBCPP_USING_IF_EXISTS;
-using ::getc _LIBCPP_USING_IF_EXISTS;
-using ::putc _LIBCPP_USING_IF_EXISTS;
-using ::ungetc _LIBCPP_USING_IF_EXISTS;
-using ::fread _LIBCPP_USING_IF_EXISTS;
-using ::fwrite _LIBCPP_USING_IF_EXISTS;
-#ifndef _LIBCPP_HAS_NO_FGETPOS_FSETPOS
-using ::fgetpos _LIBCPP_USING_IF_EXISTS;
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
+
+using ::FILE _LIBCUDACXX_USING_IF_EXISTS;
+using ::fpos_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::size_t _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::fclose _LIBCUDACXX_USING_IF_EXISTS;
+using ::fflush _LIBCUDACXX_USING_IF_EXISTS;
+using ::setbuf _LIBCUDACXX_USING_IF_EXISTS;
+using ::setvbuf _LIBCUDACXX_USING_IF_EXISTS;
+using ::fprintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::fscanf _LIBCUDACXX_USING_IF_EXISTS;
+using ::snprintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::sprintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::sscanf _LIBCUDACXX_USING_IF_EXISTS;
+using ::vfprintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::vfscanf _LIBCUDACXX_USING_IF_EXISTS;
+using ::vsscanf _LIBCUDACXX_USING_IF_EXISTS;
+using ::vsnprintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::vsprintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::fgetc _LIBCUDACXX_USING_IF_EXISTS;
+using ::fgets _LIBCUDACXX_USING_IF_EXISTS;
+using ::fputc _LIBCUDACXX_USING_IF_EXISTS;
+using ::fputs _LIBCUDACXX_USING_IF_EXISTS;
+using ::getc _LIBCUDACXX_USING_IF_EXISTS;
+using ::putc _LIBCUDACXX_USING_IF_EXISTS;
+using ::ungetc _LIBCUDACXX_USING_IF_EXISTS;
+using ::fread _LIBCUDACXX_USING_IF_EXISTS;
+using ::fwrite _LIBCUDACXX_USING_IF_EXISTS;
+#ifndef _LIBCUDACXX_HAS_NO_FGETPOS_FSETPOS
+using ::fgetpos _LIBCUDACXX_USING_IF_EXISTS;
 #endif
-using ::fseek _LIBCPP_USING_IF_EXISTS;
-#ifndef _LIBCPP_HAS_NO_FGETPOS_FSETPOS
-using ::fsetpos _LIBCPP_USING_IF_EXISTS;
+using ::fseek _LIBCUDACXX_USING_IF_EXISTS;
+#ifndef _LIBCUDACXX_HAS_NO_FGETPOS_FSETPOS
+using ::fsetpos _LIBCUDACXX_USING_IF_EXISTS;
 #endif
-using ::ftell _LIBCPP_USING_IF_EXISTS;
-using ::rewind _LIBCPP_USING_IF_EXISTS;
-using ::clearerr _LIBCPP_USING_IF_EXISTS;
-using ::feof _LIBCPP_USING_IF_EXISTS;
-using ::ferror _LIBCPP_USING_IF_EXISTS;
-using ::perror _LIBCPP_USING_IF_EXISTS;
-
-using ::fopen _LIBCPP_USING_IF_EXISTS;
-using ::freopen _LIBCPP_USING_IF_EXISTS;
-using ::remove _LIBCPP_USING_IF_EXISTS;
-using ::rename _LIBCPP_USING_IF_EXISTS;
-using ::tmpfile _LIBCPP_USING_IF_EXISTS;
-using ::tmpnam _LIBCPP_USING_IF_EXISTS;
-
-using ::getchar _LIBCPP_USING_IF_EXISTS;
-#if _LIBCPP_STD_VER <= 11 && !defined(_LIBCPP_C_HAS_NO_GETS)
-using ::gets _LIBCPP_USING_IF_EXISTS;
+using ::ftell _LIBCUDACXX_USING_IF_EXISTS;
+using ::rewind _LIBCUDACXX_USING_IF_EXISTS;
+using ::clearerr _LIBCUDACXX_USING_IF_EXISTS;
+using ::feof _LIBCUDACXX_USING_IF_EXISTS;
+using ::ferror _LIBCUDACXX_USING_IF_EXISTS;
+using ::perror _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::fopen _LIBCUDACXX_USING_IF_EXISTS;
+using ::freopen _LIBCUDACXX_USING_IF_EXISTS;
+using ::remove _LIBCUDACXX_USING_IF_EXISTS;
+using ::rename _LIBCUDACXX_USING_IF_EXISTS;
+using ::tmpfile _LIBCUDACXX_USING_IF_EXISTS;
+using ::tmpnam _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::getchar _LIBCUDACXX_USING_IF_EXISTS;
+#if _LIBCUDACXX_STD_VER <= 11 && !defined(_LIBCUDACXX_C_HAS_NO_GETS)
+using ::gets _LIBCUDACXX_USING_IF_EXISTS;
 #endif
-using ::scanf _LIBCPP_USING_IF_EXISTS;
-using ::vscanf _LIBCPP_USING_IF_EXISTS;
+using ::scanf _LIBCUDACXX_USING_IF_EXISTS;
+using ::vscanf _LIBCUDACXX_USING_IF_EXISTS;
 
-using ::printf _LIBCPP_USING_IF_EXISTS;
-using ::putchar _LIBCPP_USING_IF_EXISTS;
-using ::puts _LIBCPP_USING_IF_EXISTS;
-using ::vprintf _LIBCPP_USING_IF_EXISTS;
+using ::printf _LIBCUDACXX_USING_IF_EXISTS;
+using ::putchar _LIBCUDACXX_USING_IF_EXISTS;
+using ::puts _LIBCUDACXX_USING_IF_EXISTS;
+using ::vprintf _LIBCUDACXX_USING_IF_EXISTS;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_CSTDIO
+#endif // _LIBCUDACXX_CSTDIO

diff  --git a/libcxx/include/cstdlib b/libcxx/include/cstdlib
index 457c31f625d8..dde6f0cb3200 100644
--- a/libcxx/include/cstdlib
+++ b/libcxx/include/cstdlib
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CSTDLIB
-#define _LIBCPP_CSTDLIB
+#ifndef _LIBCUDACXX_CSTDLIB
+#define _LIBCUDACXX_CSTDLIB
 
 /*
     cstdlib synopsis
@@ -85,60 +85,60 @@ void *aligned_alloc(size_t alignment, size_t size);                       // C11
 #include <__config>
 #include <stdlib.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-using ::size_t _LIBCPP_USING_IF_EXISTS;
-using ::div_t _LIBCPP_USING_IF_EXISTS;
-using ::ldiv_t _LIBCPP_USING_IF_EXISTS;
-using ::lldiv_t _LIBCPP_USING_IF_EXISTS;
-using ::atof _LIBCPP_USING_IF_EXISTS;
-using ::atoi _LIBCPP_USING_IF_EXISTS;
-using ::atol _LIBCPP_USING_IF_EXISTS;
-using ::atoll _LIBCPP_USING_IF_EXISTS;
-using ::strtod _LIBCPP_USING_IF_EXISTS;
-using ::strtof _LIBCPP_USING_IF_EXISTS;
-using ::strtold _LIBCPP_USING_IF_EXISTS;
-using ::strtol _LIBCPP_USING_IF_EXISTS;
-using ::strtoll _LIBCPP_USING_IF_EXISTS;
-using ::strtoul _LIBCPP_USING_IF_EXISTS;
-using ::strtoull _LIBCPP_USING_IF_EXISTS;
-using ::rand _LIBCPP_USING_IF_EXISTS;
-using ::srand _LIBCPP_USING_IF_EXISTS;
-using ::calloc _LIBCPP_USING_IF_EXISTS;
-using ::free _LIBCPP_USING_IF_EXISTS;
-using ::malloc _LIBCPP_USING_IF_EXISTS;
-using ::realloc _LIBCPP_USING_IF_EXISTS;
-using ::abort _LIBCPP_USING_IF_EXISTS;
-using ::atexit _LIBCPP_USING_IF_EXISTS;
-using ::exit _LIBCPP_USING_IF_EXISTS;
-using ::_Exit _LIBCPP_USING_IF_EXISTS;
-using ::getenv _LIBCPP_USING_IF_EXISTS;
-using ::system _LIBCPP_USING_IF_EXISTS;
-using ::bsearch _LIBCPP_USING_IF_EXISTS;
-using ::qsort _LIBCPP_USING_IF_EXISTS;
-using ::abs _LIBCPP_USING_IF_EXISTS;
-using ::labs _LIBCPP_USING_IF_EXISTS;
-using ::llabs _LIBCPP_USING_IF_EXISTS;
-using ::div _LIBCPP_USING_IF_EXISTS;
-using ::ldiv _LIBCPP_USING_IF_EXISTS;
-using ::lldiv _LIBCPP_USING_IF_EXISTS;
-using ::mblen _LIBCPP_USING_IF_EXISTS;
-using ::mbtowc _LIBCPP_USING_IF_EXISTS;
-using ::wctomb _LIBCPP_USING_IF_EXISTS;
-using ::mbstowcs _LIBCPP_USING_IF_EXISTS;
-using ::wcstombs _LIBCPP_USING_IF_EXISTS;
-#if !defined(_LIBCPP_CXX03_LANG)
-using ::at_quick_exit _LIBCPP_USING_IF_EXISTS;
-using ::quick_exit _LIBCPP_USING_IF_EXISTS;
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
+
+using ::size_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::div_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::ldiv_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::lldiv_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::atof _LIBCUDACXX_USING_IF_EXISTS;
+using ::atoi _LIBCUDACXX_USING_IF_EXISTS;
+using ::atol _LIBCUDACXX_USING_IF_EXISTS;
+using ::atoll _LIBCUDACXX_USING_IF_EXISTS;
+using ::strtod _LIBCUDACXX_USING_IF_EXISTS;
+using ::strtof _LIBCUDACXX_USING_IF_EXISTS;
+using ::strtold _LIBCUDACXX_USING_IF_EXISTS;
+using ::strtol _LIBCUDACXX_USING_IF_EXISTS;
+using ::strtoll _LIBCUDACXX_USING_IF_EXISTS;
+using ::strtoul _LIBCUDACXX_USING_IF_EXISTS;
+using ::strtoull _LIBCUDACXX_USING_IF_EXISTS;
+using ::rand _LIBCUDACXX_USING_IF_EXISTS;
+using ::srand _LIBCUDACXX_USING_IF_EXISTS;
+using ::calloc _LIBCUDACXX_USING_IF_EXISTS;
+using ::free _LIBCUDACXX_USING_IF_EXISTS;
+using ::malloc _LIBCUDACXX_USING_IF_EXISTS;
+using ::realloc _LIBCUDACXX_USING_IF_EXISTS;
+using ::abort _LIBCUDACXX_USING_IF_EXISTS;
+using ::atexit _LIBCUDACXX_USING_IF_EXISTS;
+using ::exit _LIBCUDACXX_USING_IF_EXISTS;
+using ::_Exit _LIBCUDACXX_USING_IF_EXISTS;
+using ::getenv _LIBCUDACXX_USING_IF_EXISTS;
+using ::system _LIBCUDACXX_USING_IF_EXISTS;
+using ::bsearch _LIBCUDACXX_USING_IF_EXISTS;
+using ::qsort _LIBCUDACXX_USING_IF_EXISTS;
+using ::abs _LIBCUDACXX_USING_IF_EXISTS;
+using ::labs _LIBCUDACXX_USING_IF_EXISTS;
+using ::llabs _LIBCUDACXX_USING_IF_EXISTS;
+using ::div _LIBCUDACXX_USING_IF_EXISTS;
+using ::ldiv _LIBCUDACXX_USING_IF_EXISTS;
+using ::lldiv _LIBCUDACXX_USING_IF_EXISTS;
+using ::mblen _LIBCUDACXX_USING_IF_EXISTS;
+using ::mbtowc _LIBCUDACXX_USING_IF_EXISTS;
+using ::wctomb _LIBCUDACXX_USING_IF_EXISTS;
+using ::mbstowcs _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcstombs _LIBCUDACXX_USING_IF_EXISTS;
+#if !defined(_LIBCUDACXX_CXX03_LANG)
+using ::at_quick_exit _LIBCUDACXX_USING_IF_EXISTS;
+using ::quick_exit _LIBCUDACXX_USING_IF_EXISTS;
 #endif
-#if _LIBCPP_STD_VER > 14
-using ::aligned_alloc _LIBCPP_USING_IF_EXISTS;
+#if _LIBCUDACXX_STD_VER > 14
+using ::aligned_alloc _LIBCUDACXX_USING_IF_EXISTS;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_CSTDLIB
+#endif // _LIBCUDACXX_CSTDLIB

diff  --git a/libcxx/include/cstring b/libcxx/include/cstring
index 37c92e149b8f..7a9e13c447ff 100644
--- a/libcxx/include/cstring
+++ b/libcxx/include/cstring
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CSTRING
-#define _LIBCPP_CSTRING
+#ifndef _LIBCUDACXX_CSTRING
+#define _LIBCUDACXX_CSTRING
 
 /*
     cstring synopsis
@@ -60,36 +60,36 @@ size_t strlen(const char* s);
 #include <__config>
 #include <string.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-using ::size_t _LIBCPP_USING_IF_EXISTS;
-using ::memcpy _LIBCPP_USING_IF_EXISTS;
-using ::memmove _LIBCPP_USING_IF_EXISTS;
-using ::strcpy _LIBCPP_USING_IF_EXISTS;
-using ::strncpy _LIBCPP_USING_IF_EXISTS;
-using ::strcat _LIBCPP_USING_IF_EXISTS;
-using ::strncat _LIBCPP_USING_IF_EXISTS;
-using ::memcmp _LIBCPP_USING_IF_EXISTS;
-using ::strcmp _LIBCPP_USING_IF_EXISTS;
-using ::strncmp _LIBCPP_USING_IF_EXISTS;
-using ::strcoll _LIBCPP_USING_IF_EXISTS;
-using ::strxfrm _LIBCPP_USING_IF_EXISTS;
-using ::memchr _LIBCPP_USING_IF_EXISTS;
-using ::strchr _LIBCPP_USING_IF_EXISTS;
-using ::strcspn _LIBCPP_USING_IF_EXISTS;
-using ::strpbrk _LIBCPP_USING_IF_EXISTS;
-using ::strrchr _LIBCPP_USING_IF_EXISTS;
-using ::strspn _LIBCPP_USING_IF_EXISTS;
-using ::strstr _LIBCPP_USING_IF_EXISTS;
-using ::strtok _LIBCPP_USING_IF_EXISTS;
-using ::memset _LIBCPP_USING_IF_EXISTS;
-using ::strerror _LIBCPP_USING_IF_EXISTS;
-using ::strlen _LIBCPP_USING_IF_EXISTS;
-
-_LIBCPP_END_NAMESPACE_STD
-
-#endif // _LIBCPP_CSTRING
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
+
+using ::size_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::memcpy _LIBCUDACXX_USING_IF_EXISTS;
+using ::memmove _LIBCUDACXX_USING_IF_EXISTS;
+using ::strcpy _LIBCUDACXX_USING_IF_EXISTS;
+using ::strncpy _LIBCUDACXX_USING_IF_EXISTS;
+using ::strcat _LIBCUDACXX_USING_IF_EXISTS;
+using ::strncat _LIBCUDACXX_USING_IF_EXISTS;
+using ::memcmp _LIBCUDACXX_USING_IF_EXISTS;
+using ::strcmp _LIBCUDACXX_USING_IF_EXISTS;
+using ::strncmp _LIBCUDACXX_USING_IF_EXISTS;
+using ::strcoll _LIBCUDACXX_USING_IF_EXISTS;
+using ::strxfrm _LIBCUDACXX_USING_IF_EXISTS;
+using ::memchr _LIBCUDACXX_USING_IF_EXISTS;
+using ::strchr _LIBCUDACXX_USING_IF_EXISTS;
+using ::strcspn _LIBCUDACXX_USING_IF_EXISTS;
+using ::strpbrk _LIBCUDACXX_USING_IF_EXISTS;
+using ::strrchr _LIBCUDACXX_USING_IF_EXISTS;
+using ::strspn _LIBCUDACXX_USING_IF_EXISTS;
+using ::strstr _LIBCUDACXX_USING_IF_EXISTS;
+using ::strtok _LIBCUDACXX_USING_IF_EXISTS;
+using ::memset _LIBCUDACXX_USING_IF_EXISTS;
+using ::strerror _LIBCUDACXX_USING_IF_EXISTS;
+using ::strlen _LIBCUDACXX_USING_IF_EXISTS;
+
+_LIBCUDACXX_END_NAMESPACE_STD
+
+#endif // _LIBCUDACXX_CSTRING

diff  --git a/libcxx/include/ctgmath b/libcxx/include/ctgmath
index bfcf2f98d470..a98bd3d45bb2 100644
--- a/libcxx/include/ctgmath
+++ b/libcxx/include/ctgmath
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CTGMATH
-#define _LIBCPP_CTGMATH
+#ifndef _LIBCUDACXX_CTGMATH
+#define _LIBCUDACXX_CTGMATH
 
 /*
     ctgmath synopsis
@@ -22,8 +22,8 @@
 #include <ccomplex>
 #include <cmath>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_CTGMATH
+#endif // _LIBCUDACXX_CTGMATH

diff  --git a/libcxx/include/ctime b/libcxx/include/ctime
index 0c6e4dfd6f98..2b4f5fedd52a 100644
--- a/libcxx/include/ctime
+++ b/libcxx/include/ctime
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CTIME
-#define _LIBCPP_CTIME
+#ifndef _LIBCUDACXX_CTIME
+#define _LIBCUDACXX_CTIME
 
 /*
     ctime synopsis
@@ -49,32 +49,32 @@ int timespec_get( struct timespec *ts, int base); // C++17
 #include <__config>
 #include <time.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-using ::clock_t _LIBCPP_USING_IF_EXISTS;
-using ::size_t _LIBCPP_USING_IF_EXISTS;
-using ::time_t _LIBCPP_USING_IF_EXISTS;
-using ::tm _LIBCPP_USING_IF_EXISTS;
-#if _LIBCPP_STD_VER > 14
-using ::timespec _LIBCPP_USING_IF_EXISTS;
+using ::clock_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::size_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::time_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::tm _LIBCUDACXX_USING_IF_EXISTS;
+#if _LIBCUDACXX_STD_VER > 14
+using ::timespec _LIBCUDACXX_USING_IF_EXISTS;
 #endif
-using ::clock _LIBCPP_USING_IF_EXISTS;
-using ::
diff time _LIBCPP_USING_IF_EXISTS;
-using ::mktime _LIBCPP_USING_IF_EXISTS;
-using ::time _LIBCPP_USING_IF_EXISTS;
-using ::asctime _LIBCPP_USING_IF_EXISTS;
-using ::ctime _LIBCPP_USING_IF_EXISTS;
-using ::gmtime _LIBCPP_USING_IF_EXISTS;
-using ::localtime _LIBCPP_USING_IF_EXISTS;
-using ::strftime _LIBCPP_USING_IF_EXISTS;
-#if _LIBCPP_STD_VER > 14
-using ::timespec_get _LIBCPP_USING_IF_EXISTS;
+using ::clock _LIBCUDACXX_USING_IF_EXISTS;
+using ::
diff time _LIBCUDACXX_USING_IF_EXISTS;
+using ::mktime _LIBCUDACXX_USING_IF_EXISTS;
+using ::time _LIBCUDACXX_USING_IF_EXISTS;
+using ::asctime _LIBCUDACXX_USING_IF_EXISTS;
+using ::ctime _LIBCUDACXX_USING_IF_EXISTS;
+using ::gmtime _LIBCUDACXX_USING_IF_EXISTS;
+using ::localtime _LIBCUDACXX_USING_IF_EXISTS;
+using ::strftime _LIBCUDACXX_USING_IF_EXISTS;
+#if _LIBCUDACXX_STD_VER > 14
+using ::timespec_get _LIBCUDACXX_USING_IF_EXISTS;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_CTIME
+#endif // _LIBCUDACXX_CTIME

diff  --git a/libcxx/include/ctype.h b/libcxx/include/ctype.h
index ba0925069c64..58da5f952a52 100644
--- a/libcxx/include/ctype.h
+++ b/libcxx/include/ctype.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CTYPE_H
-#define _LIBCPP_CTYPE_H
+#ifndef _LIBCUDACXX_CTYPE_H
+#define _LIBCUDACXX_CTYPE_H
 
 /*
     ctype.h synopsis
@@ -31,7 +31,7 @@ int toupper(int c);
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -56,4 +56,4 @@ int toupper(int c);
 
 #endif
 
-#endif // _LIBCPP_CTYPE_H
+#endif // _LIBCUDACXX_CTYPE_H

diff  --git a/libcxx/include/cuchar b/libcxx/include/cuchar
index a4ed585d1aeb..d1883c47e238 100644
--- a/libcxx/include/cuchar
+++ b/libcxx/include/cuchar
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CUCHAR
-#define _LIBCPP_CUCHAR
+#ifndef _LIBCUDACXX_CUCHAR
+#define _LIBCUDACXX_CUCHAR
 
 /*
     cuchar synopsis // since C++11
@@ -38,24 +38,24 @@ size_t c32rtomb(char* s, char32_t c32, mbstate_t* ps);
 #include <__config>
 #include <uchar.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if !defined(_LIBCPP_CXX03_LANG)
+#if !defined(_LIBCUDACXX_CXX03_LANG)
 
-using ::mbstate_t _LIBCPP_USING_IF_EXISTS;
-using ::size_t _LIBCPP_USING_IF_EXISTS;
+using ::mbstate_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::size_t _LIBCUDACXX_USING_IF_EXISTS;
 
-using ::mbrtoc16 _LIBCPP_USING_IF_EXISTS;
-using ::c16rtomb _LIBCPP_USING_IF_EXISTS;
-using ::mbrtoc32 _LIBCPP_USING_IF_EXISTS;
-using ::c32rtomb _LIBCPP_USING_IF_EXISTS;
+using ::mbrtoc16 _LIBCUDACXX_USING_IF_EXISTS;
+using ::c16rtomb _LIBCUDACXX_USING_IF_EXISTS;
+using ::mbrtoc32 _LIBCUDACXX_USING_IF_EXISTS;
+using ::c32rtomb _LIBCUDACXX_USING_IF_EXISTS;
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif  // _LIBCPP_CUCHAR
+#endif  // _LIBCUDACXX_CUCHAR

diff  --git a/libcxx/include/cwchar b/libcxx/include/cwchar
index 5c69ab2a7bb1..efae11dfb475 100644
--- a/libcxx/include/cwchar
+++ b/libcxx/include/cwchar
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CWCHAR
-#define _LIBCPP_CWCHAR
+#ifndef _LIBCUDACXX_CWCHAR
+#define _LIBCUDACXX_CWCHAR
 
 /*
     cwchar synopsis
@@ -107,79 +107,79 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
 #include <cwctype>
 #include <wchar.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-using ::mbstate_t _LIBCPP_USING_IF_EXISTS;
-using ::size_t _LIBCPP_USING_IF_EXISTS;
-using ::tm _LIBCPP_USING_IF_EXISTS;
-using ::wint_t _LIBCPP_USING_IF_EXISTS;
-using ::FILE _LIBCPP_USING_IF_EXISTS;
-using ::fwprintf _LIBCPP_USING_IF_EXISTS;
-using ::fwscanf _LIBCPP_USING_IF_EXISTS;
-using ::swprintf _LIBCPP_USING_IF_EXISTS;
-using ::vfwprintf _LIBCPP_USING_IF_EXISTS;
-using ::vswprintf _LIBCPP_USING_IF_EXISTS;
-using ::swscanf _LIBCPP_USING_IF_EXISTS;
-using ::vfwscanf _LIBCPP_USING_IF_EXISTS;
-using ::vswscanf _LIBCPP_USING_IF_EXISTS;
-using ::fgetwc _LIBCPP_USING_IF_EXISTS;
-using ::fgetws _LIBCPP_USING_IF_EXISTS;
-using ::fputwc _LIBCPP_USING_IF_EXISTS;
-using ::fputws _LIBCPP_USING_IF_EXISTS;
-using ::fwide _LIBCPP_USING_IF_EXISTS;
-using ::getwc _LIBCPP_USING_IF_EXISTS;
-using ::putwc _LIBCPP_USING_IF_EXISTS;
-using ::ungetwc _LIBCPP_USING_IF_EXISTS;
-using ::wcstod _LIBCPP_USING_IF_EXISTS;
-using ::wcstof _LIBCPP_USING_IF_EXISTS;
-using ::wcstold _LIBCPP_USING_IF_EXISTS;
-using ::wcstol _LIBCPP_USING_IF_EXISTS;
-using ::wcstoll _LIBCPP_USING_IF_EXISTS;
-using ::wcstoul _LIBCPP_USING_IF_EXISTS;
-using ::wcstoull _LIBCPP_USING_IF_EXISTS;
-using ::wcscpy _LIBCPP_USING_IF_EXISTS;
-using ::wcsncpy _LIBCPP_USING_IF_EXISTS;
-using ::wcscat _LIBCPP_USING_IF_EXISTS;
-using ::wcsncat _LIBCPP_USING_IF_EXISTS;
-using ::wcscmp _LIBCPP_USING_IF_EXISTS;
-using ::wcscoll _LIBCPP_USING_IF_EXISTS;
-using ::wcsncmp _LIBCPP_USING_IF_EXISTS;
-using ::wcsxfrm _LIBCPP_USING_IF_EXISTS;
-using ::wcschr _LIBCPP_USING_IF_EXISTS;
-using ::wcspbrk _LIBCPP_USING_IF_EXISTS;
-using ::wcsrchr _LIBCPP_USING_IF_EXISTS;
-using ::wcsstr _LIBCPP_USING_IF_EXISTS;
-using ::wmemchr _LIBCPP_USING_IF_EXISTS;
-using ::wcscspn _LIBCPP_USING_IF_EXISTS;
-using ::wcslen _LIBCPP_USING_IF_EXISTS;
-using ::wcsspn _LIBCPP_USING_IF_EXISTS;
-using ::wcstok _LIBCPP_USING_IF_EXISTS;
-using ::wmemcmp _LIBCPP_USING_IF_EXISTS;
-using ::wmemcpy _LIBCPP_USING_IF_EXISTS;
-using ::wmemmove _LIBCPP_USING_IF_EXISTS;
-using ::wmemset _LIBCPP_USING_IF_EXISTS;
-using ::wcsftime _LIBCPP_USING_IF_EXISTS;
-using ::btowc _LIBCPP_USING_IF_EXISTS;
-using ::wctob _LIBCPP_USING_IF_EXISTS;
-using ::mbsinit _LIBCPP_USING_IF_EXISTS;
-using ::mbrlen _LIBCPP_USING_IF_EXISTS;
-using ::mbrtowc _LIBCPP_USING_IF_EXISTS;
-using ::wcrtomb _LIBCPP_USING_IF_EXISTS;
-using ::mbsrtowcs _LIBCPP_USING_IF_EXISTS;
-using ::wcsrtombs _LIBCPP_USING_IF_EXISTS;
-
-using ::getwchar _LIBCPP_USING_IF_EXISTS;
-using ::vwscanf _LIBCPP_USING_IF_EXISTS;
-using ::wscanf _LIBCPP_USING_IF_EXISTS;
-
-using ::putwchar _LIBCPP_USING_IF_EXISTS;
-using ::vwprintf _LIBCPP_USING_IF_EXISTS;
-using ::wprintf _LIBCPP_USING_IF_EXISTS;
-
-_LIBCPP_END_NAMESPACE_STD
-
-#endif // _LIBCPP_CWCHAR
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
+
+using ::mbstate_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::size_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::tm _LIBCUDACXX_USING_IF_EXISTS;
+using ::wint_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::FILE _LIBCUDACXX_USING_IF_EXISTS;
+using ::fwprintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::fwscanf _LIBCUDACXX_USING_IF_EXISTS;
+using ::swprintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::vfwprintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::vswprintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::swscanf _LIBCUDACXX_USING_IF_EXISTS;
+using ::vfwscanf _LIBCUDACXX_USING_IF_EXISTS;
+using ::vswscanf _LIBCUDACXX_USING_IF_EXISTS;
+using ::fgetwc _LIBCUDACXX_USING_IF_EXISTS;
+using ::fgetws _LIBCUDACXX_USING_IF_EXISTS;
+using ::fputwc _LIBCUDACXX_USING_IF_EXISTS;
+using ::fputws _LIBCUDACXX_USING_IF_EXISTS;
+using ::fwide _LIBCUDACXX_USING_IF_EXISTS;
+using ::getwc _LIBCUDACXX_USING_IF_EXISTS;
+using ::putwc _LIBCUDACXX_USING_IF_EXISTS;
+using ::ungetwc _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcstod _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcstof _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcstold _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcstol _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcstoll _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcstoul _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcstoull _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcscpy _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcsncpy _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcscat _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcsncat _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcscmp _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcscoll _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcsncmp _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcsxfrm _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcschr _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcspbrk _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcsrchr _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcsstr _LIBCUDACXX_USING_IF_EXISTS;
+using ::wmemchr _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcscspn _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcslen _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcsspn _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcstok _LIBCUDACXX_USING_IF_EXISTS;
+using ::wmemcmp _LIBCUDACXX_USING_IF_EXISTS;
+using ::wmemcpy _LIBCUDACXX_USING_IF_EXISTS;
+using ::wmemmove _LIBCUDACXX_USING_IF_EXISTS;
+using ::wmemset _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcsftime _LIBCUDACXX_USING_IF_EXISTS;
+using ::btowc _LIBCUDACXX_USING_IF_EXISTS;
+using ::wctob _LIBCUDACXX_USING_IF_EXISTS;
+using ::mbsinit _LIBCUDACXX_USING_IF_EXISTS;
+using ::mbrlen _LIBCUDACXX_USING_IF_EXISTS;
+using ::mbrtowc _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcrtomb _LIBCUDACXX_USING_IF_EXISTS;
+using ::mbsrtowcs _LIBCUDACXX_USING_IF_EXISTS;
+using ::wcsrtombs _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::getwchar _LIBCUDACXX_USING_IF_EXISTS;
+using ::vwscanf _LIBCUDACXX_USING_IF_EXISTS;
+using ::wscanf _LIBCUDACXX_USING_IF_EXISTS;
+
+using ::putwchar _LIBCUDACXX_USING_IF_EXISTS;
+using ::vwprintf _LIBCUDACXX_USING_IF_EXISTS;
+using ::wprintf _LIBCUDACXX_USING_IF_EXISTS;
+
+_LIBCUDACXX_END_NAMESPACE_STD
+
+#endif // _LIBCUDACXX_CWCHAR

diff  --git a/libcxx/include/cwctype b/libcxx/include/cwctype
index 429b00c2446d..f6e3237cb95b 100644
--- a/libcxx/include/cwctype
+++ b/libcxx/include/cwctype
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CWCTYPE
-#define _LIBCPP_CWCTYPE
+#ifndef _LIBCUDACXX_CWCTYPE
+#define _LIBCUDACXX_CWCTYPE
 
 /*
     cwctype synopsis
@@ -54,36 +54,36 @@ wctrans_t wctrans(const char* property);
 #include <cctype>
 #include <wctype.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
-
-#if defined(_LIBCPP_INCLUDED_C_LIBRARY_WCTYPE_H)
-using ::wint_t _LIBCPP_USING_IF_EXISTS;
-using ::wctrans_t _LIBCPP_USING_IF_EXISTS;
-using ::wctype_t _LIBCPP_USING_IF_EXISTS;
-using ::iswalnum _LIBCPP_USING_IF_EXISTS;
-using ::iswalpha _LIBCPP_USING_IF_EXISTS;
-using ::iswblank _LIBCPP_USING_IF_EXISTS;
-using ::iswcntrl _LIBCPP_USING_IF_EXISTS;
-using ::iswdigit _LIBCPP_USING_IF_EXISTS;
-using ::iswgraph _LIBCPP_USING_IF_EXISTS;
-using ::iswlower _LIBCPP_USING_IF_EXISTS;
-using ::iswprint _LIBCPP_USING_IF_EXISTS;
-using ::iswpunct _LIBCPP_USING_IF_EXISTS;
-using ::iswspace _LIBCPP_USING_IF_EXISTS;
-using ::iswupper _LIBCPP_USING_IF_EXISTS;
-using ::iswxdigit _LIBCPP_USING_IF_EXISTS;
-using ::iswctype _LIBCPP_USING_IF_EXISTS;
-using ::wctype _LIBCPP_USING_IF_EXISTS;
-using ::towlower _LIBCPP_USING_IF_EXISTS;
-using ::towupper _LIBCPP_USING_IF_EXISTS;
-using ::towctrans _LIBCPP_USING_IF_EXISTS;
-using ::wctrans _LIBCPP_USING_IF_EXISTS;
-#endif // _LIBCPP_INCLUDED_C_LIBRARY_WCTYPE_H
-
-_LIBCPP_END_NAMESPACE_STD
-
-#endif // _LIBCPP_CWCTYPE
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
+
+#if defined(_LIBCUDACXX_INCLUDED_C_LIBRARY_WCTYPE_H)
+using ::wint_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::wctrans_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::wctype_t _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswalnum _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswalpha _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswblank _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswcntrl _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswdigit _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswgraph _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswlower _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswprint _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswpunct _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswspace _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswupper _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswxdigit _LIBCUDACXX_USING_IF_EXISTS;
+using ::iswctype _LIBCUDACXX_USING_IF_EXISTS;
+using ::wctype _LIBCUDACXX_USING_IF_EXISTS;
+using ::towlower _LIBCUDACXX_USING_IF_EXISTS;
+using ::towupper _LIBCUDACXX_USING_IF_EXISTS;
+using ::towctrans _LIBCUDACXX_USING_IF_EXISTS;
+using ::wctrans _LIBCUDACXX_USING_IF_EXISTS;
+#endif // _LIBCUDACXX_INCLUDED_C_LIBRARY_WCTYPE_H
+
+_LIBCUDACXX_END_NAMESPACE_STD
+
+#endif // _LIBCUDACXX_CWCTYPE

diff  --git a/libcxx/include/deque b/libcxx/include/deque
index 0d7eb9aa9316..5e520c39aa42 100644
--- a/libcxx/include/deque
+++ b/libcxx/include/deque
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_DEQUE
-#define _LIBCPP_DEQUE
+#ifndef _LIBCUDACXX_DEQUE
+#define _LIBCUDACXX_DEQUE
 
 /*
     deque synopsis
@@ -185,7 +185,7 @@ template <class T, class Allocator, class Predicate>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #  include <functional>
 #  include <iterator>
@@ -204,22 +204,22 @@ template <class T, class Allocator, class Predicate>
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _Allocator> class __deque_base;
-template <class _Tp, class _Allocator = allocator<_Tp> > class _LIBCPP_TEMPLATE_VIS deque;
+template <class _Tp, class _Allocator = allocator<_Tp> > class _LIBCUDACXX_TEMPLATE_VIS deque;
 
 template <class _ValueType, class _Pointer, class _Reference, class _MapPointer,
           class _DiffType, _DiffType _BlockSize>
-class _LIBCPP_TEMPLATE_VIS __deque_iterator;
+class _LIBCUDACXX_TEMPLATE_VIS __deque_iterator;
 
 template <class _RAIter,
           class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
@@ -316,7 +316,7 @@ struct __deque_block_size {
 
 template <class _ValueType, class _Pointer, class _Reference, class _MapPointer,
           class _DiffType, _DiffType _BS =
-#ifdef _LIBCPP_ABI_INCOMPLETE_TYPES_IN_DEQUE
+#ifdef _LIBCUDACXX_ABI_INCOMPLETE_TYPES_IN_DEQUE
 // Keep template parameter to avoid changing all template declarations thoughout
 // this file.
                                0
@@ -324,7 +324,7 @@ template <class _ValueType, class _Pointer, class _Reference, class _MapPointer,
                                __deque_block_size<_ValueType, _DiffType>::value
 #endif
           >
-class _LIBCPP_TEMPLATE_VIS __deque_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __deque_iterator
 {
     typedef _MapPointer __map_iterator;
 public:
@@ -340,22 +340,22 @@ public:
     typedef random_access_iterator_tag  iterator_category;
     typedef _Reference                  reference;
 
-    _LIBCPP_INLINE_VISIBILITY __deque_iterator() _NOEXCEPT
-#if _LIBCPP_STD_VER > 11
+    _LIBCUDACXX_INLINE_VISIBILITY __deque_iterator() _NOEXCEPT
+#if _LIBCUDACXX_STD_VER > 11
      : __m_iter_(nullptr), __ptr_(nullptr)
 #endif
      {}
 
     template <class _Pp, class _Rp, class _MP>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __deque_iterator(const __deque_iterator<value_type, _Pp, _Rp, _MP, 
diff erence_type, _BS>& __it,
                 typename enable_if<is_convertible<_Pp, pointer>::value>::type* = 0) _NOEXCEPT
         : __m_iter_(__it.__m_iter_), __ptr_(__it.__ptr_) {}
 
-    _LIBCPP_INLINE_VISIBILITY reference operator*() const {return *__ptr_;}
-    _LIBCPP_INLINE_VISIBILITY pointer operator->() const {return __ptr_;}
+    _LIBCUDACXX_INLINE_VISIBILITY reference operator*() const {return *__ptr_;}
+    _LIBCUDACXX_INLINE_VISIBILITY pointer operator->() const {return __ptr_;}
 
-    _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator++()
+    _LIBCUDACXX_INLINE_VISIBILITY __deque_iterator& operator++()
     {
         if (++__ptr_ - *__m_iter_ == __block_size)
         {
@@ -365,14 +365,14 @@ public:
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY __deque_iterator operator++(int)
+    _LIBCUDACXX_INLINE_VISIBILITY __deque_iterator operator++(int)
     {
         __deque_iterator __tmp = *this;
         ++(*this);
         return __tmp;
     }
 
-    _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator--()
+    _LIBCUDACXX_INLINE_VISIBILITY __deque_iterator& operator--()
     {
         if (__ptr_ == *__m_iter_)
         {
@@ -383,14 +383,14 @@ public:
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY __deque_iterator operator--(int)
+    _LIBCUDACXX_INLINE_VISIBILITY __deque_iterator operator--(int)
     {
         __deque_iterator __tmp = *this;
         --(*this);
         return __tmp;
     }
 
-    _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator+=(
diff erence_type __n)
+    _LIBCUDACXX_INLINE_VISIBILITY __deque_iterator& operator+=(
diff erence_type __n)
     {
         if (__n != 0)
         {
@@ -410,30 +410,30 @@ public:
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY __deque_iterator& operator-=(
diff erence_type __n)
+    _LIBCUDACXX_INLINE_VISIBILITY __deque_iterator& operator-=(
diff erence_type __n)
     {
         return *this += -__n;
     }
 
-    _LIBCPP_INLINE_VISIBILITY __deque_iterator operator+(
diff erence_type __n) const
+    _LIBCUDACXX_INLINE_VISIBILITY __deque_iterator operator+(
diff erence_type __n) const
     {
         __deque_iterator __t(*this);
         __t += __n;
         return __t;
     }
 
-    _LIBCPP_INLINE_VISIBILITY __deque_iterator operator-(
diff erence_type __n) const
+    _LIBCUDACXX_INLINE_VISIBILITY __deque_iterator operator-(
diff erence_type __n) const
     {
         __deque_iterator __t(*this);
         __t -= __n;
         return __t;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     friend __deque_iterator operator+(
diff erence_type __n, const __deque_iterator& __it)
         {return __it + __n;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     friend 
diff erence_type operator-(const __deque_iterator& __x, const __deque_iterator& __y)
     {
         if (__x != __y)
@@ -443,42 +443,42 @@ public:
         return 0;
     }
 
-    _LIBCPP_INLINE_VISIBILITY reference operator[](
diff erence_type __n) const
+    _LIBCUDACXX_INLINE_VISIBILITY reference operator[](
diff erence_type __n) const
         {return *(*this + __n);}
 
-    _LIBCPP_INLINE_VISIBILITY friend
+    _LIBCUDACXX_INLINE_VISIBILITY friend
         bool operator==(const __deque_iterator& __x, const __deque_iterator& __y)
         {return __x.__ptr_ == __y.__ptr_;}
 
-    _LIBCPP_INLINE_VISIBILITY friend
+    _LIBCUDACXX_INLINE_VISIBILITY friend
         bool operator!=(const __deque_iterator& __x, const __deque_iterator& __y)
         {return !(__x == __y);}
 
-    _LIBCPP_INLINE_VISIBILITY friend
+    _LIBCUDACXX_INLINE_VISIBILITY friend
         bool operator<(const __deque_iterator& __x, const __deque_iterator& __y)
         {return __x.__m_iter_ < __y.__m_iter_ ||
                (__x.__m_iter_ == __y.__m_iter_ && __x.__ptr_ < __y.__ptr_);}
 
-    _LIBCPP_INLINE_VISIBILITY friend
+    _LIBCUDACXX_INLINE_VISIBILITY friend
         bool operator>(const __deque_iterator& __x, const __deque_iterator& __y)
         {return __y < __x;}
 
-    _LIBCPP_INLINE_VISIBILITY friend
+    _LIBCUDACXX_INLINE_VISIBILITY friend
         bool operator<=(const __deque_iterator& __x, const __deque_iterator& __y)
         {return !(__y < __x);}
 
-    _LIBCPP_INLINE_VISIBILITY friend
+    _LIBCUDACXX_INLINE_VISIBILITY friend
         bool operator>=(const __deque_iterator& __x, const __deque_iterator& __y)
         {return !(__x < __y);}
 
 private:
-    _LIBCPP_INLINE_VISIBILITY explicit __deque_iterator(__map_iterator __m, pointer __p) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY explicit __deque_iterator(__map_iterator __m, pointer __p) _NOEXCEPT
         : __m_iter_(__m), __ptr_(__p) {}
 
     template <class _Tp, class _Ap> friend class __deque_base;
-    template <class _Tp, class _Ap> friend class _LIBCPP_TEMPLATE_VIS deque;
+    template <class _Tp, class _Ap> friend class _LIBCUDACXX_TEMPLATE_VIS deque;
     template <class _Vp, class _Pp, class _Rp, class _MP, class _Dp, _Dp>
-        friend class _LIBCPP_TEMPLATE_VIS __deque_iterator;
+        friend class _LIBCUDACXX_TEMPLATE_VIS __deque_iterator;
 
     template <class _RAIter,
               class _V2, class _P2, class _R2, class _M2, class _D2, _D2 _B2>
@@ -612,7 +612,7 @@ copy(_RAIter __f,
             __n = __bs;
             __m = __f + __n;
         }
-        _VSTD::copy(__f, __m, __rb);
+        _CUDA_VSTD::copy(__f, __m, __rb);
         __f = __m;
         __r += __n;
     }
@@ -640,7 +640,7 @@ copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
             __bs = __n;
             __fe = __fb + __bs;
         }
-        __r = _VSTD::copy(__fb, __fe, __r);
+        __r = _CUDA_VSTD::copy(__fb, __fe, __r);
         __n -= __bs;
         __f += __bs;
     }
@@ -668,7 +668,7 @@ copy(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
             __bs = __n;
             __fe = __fb + __bs;
         }
-        __r = _VSTD::copy(__fb, __fe, __r);
+        __r = _CUDA_VSTD::copy(__fb, __fe, __r);
         __n -= __bs;
         __f += __bs;
     }
@@ -689,7 +689,7 @@ copy_backward(_RAIter __f,
     typedef typename __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>::pointer pointer;
     while (__f != __l)
     {
-        __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __rp = _VSTD::prev(__r);
+        __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __rp = _CUDA_VSTD::prev(__r);
         pointer __rb = *__rp.__m_iter_;
         pointer __re = __rp.__ptr_ + 1;
         
diff erence_type __bs = __re - __rb;
@@ -700,7 +700,7 @@ copy_backward(_RAIter __f,
             __n = __bs;
             __m = __l - __n;
         }
-        _VSTD::copy_backward(__m, __l, __re);
+        _CUDA_VSTD::copy_backward(__m, __l, __re);
         __l = __m;
         __r -= __n;
     }
@@ -728,7 +728,7 @@ copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
             __bs = __n;
             __lb = __le - __bs;
         }
-        __r = _VSTD::copy_backward(__lb, __le, __r);
+        __r = _CUDA_VSTD::copy_backward(__lb, __le, __r);
         __n -= __bs;
         __l -= __bs - 1;
     }
@@ -756,7 +756,7 @@ copy_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
             __bs = __n;
             __lb = __le - __bs;
         }
-        __r = _VSTD::copy_backward(__lb, __le, __r);
+        __r = _CUDA_VSTD::copy_backward(__lb, __le, __r);
         __n -= __bs;
         __l -= __bs - 1;
     }
@@ -788,7 +788,7 @@ move(_RAIter __f,
             __n = __bs;
             __m = __f + __n;
         }
-        _VSTD::move(__f, __m, __rb);
+        _CUDA_VSTD::move(__f, __m, __rb);
         __f = __m;
         __r += __n;
     }
@@ -816,7 +816,7 @@ move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
             __bs = __n;
             __fe = __fb + __bs;
         }
-        __r = _VSTD::move(__fb, __fe, __r);
+        __r = _CUDA_VSTD::move(__fb, __fe, __r);
         __n -= __bs;
         __f += __bs;
     }
@@ -844,7 +844,7 @@ move(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
             __bs = __n;
             __fe = __fb + __bs;
         }
-        __r = _VSTD::move(__fb, __fe, __r);
+        __r = _CUDA_VSTD::move(__fb, __fe, __r);
         __n -= __bs;
         __f += __bs;
     }
@@ -865,7 +865,7 @@ move_backward(_RAIter __f,
     typedef typename __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2>::pointer pointer;
     while (__f != __l)
     {
-        __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __rp = _VSTD::prev(__r);
+        __deque_iterator<_V2, _P2, _R2, _M2, _D2, _B2> __rp = _CUDA_VSTD::prev(__r);
         pointer __rb = *__rp.__m_iter_;
         pointer __re = __rp.__ptr_ + 1;
         
diff erence_type __bs = __re - __rb;
@@ -876,7 +876,7 @@ move_backward(_RAIter __f,
             __n = __bs;
             __m = __l - __n;
         }
-        _VSTD::move_backward(__m, __l, __re);
+        _CUDA_VSTD::move_backward(__m, __l, __re);
         __l = __m;
         __r -= __n;
     }
@@ -904,7 +904,7 @@ move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
             __bs = __n;
             __lb = __le - __bs;
         }
-        __r = _VSTD::move_backward(__lb, __le, __r);
+        __r = _CUDA_VSTD::move_backward(__lb, __le, __r);
         __n -= __bs;
         __l -= __bs - 1;
     }
@@ -932,7 +932,7 @@ move_backward(__deque_iterator<_V1, _P1, _R1, _M1, _D1, _B1> __f,
             __bs = __n;
             __lb = __le - __bs;
         }
-        __r = _VSTD::move_backward(__lb, __le, __r);
+        __r = _CUDA_VSTD::move_backward(__lb, __le, __r);
         __n -= __bs;
         __l -= __bs - 1;
     }
@@ -1048,29 +1048,29 @@ protected:
     iterator       end() _NOEXCEPT;
     const_iterator end() const _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY size_type&            size()          {return __size_.first();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY size_type&            size()          {return __size_.first();}
+    _LIBCUDACXX_INLINE_VISIBILITY
     const size_type& size() const _NOEXCEPT {return __size_.first();}
-    _LIBCPP_INLINE_VISIBILITY allocator_type&       __alloc()       {return __size_.second();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY allocator_type&       __alloc()       {return __size_.second();}
+    _LIBCUDACXX_INLINE_VISIBILITY
     const allocator_type& __alloc() const _NOEXCEPT {return __size_.second();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __deque_base()
         _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __deque_base(const allocator_type& __a);
 public:
     ~__deque_base();
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     __deque_base(__deque_base&& __c)
         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
     __deque_base(__deque_base&& __c, const allocator_type& __a);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     void swap(__deque_base& __c)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT;
 #else
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
@@ -1081,19 +1081,19 @@ protected:
 
     bool __invariants() const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign(__deque_base& __c)
         _NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value &&
                    is_nothrow_move_assignable<allocator_type>::value)
     {
-        __map_ = _VSTD::move(__c.__map_);
+        __map_ = _CUDA_VSTD::move(__c.__map_);
         __start_ = __c.__start_;
         size() = __c.size();
         __move_assign_alloc(__c);
         __c.__start_ = __c.size() = 0;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__deque_base& __c)
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_move_assignment::value ||
                    is_nothrow_move_assignable<allocator_type>::value)
@@ -1101,14 +1101,14 @@ protected:
                       __alloc_traits::propagate_on_container_move_assignment::value>());}
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__deque_base& __c, true_type)
         _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
         {
-            __alloc() = _VSTD::move(__c.__alloc());
+            __alloc() = _CUDA_VSTD::move(__c.__alloc());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__deque_base&, false_type) _NOEXCEPT
         {}
 };
@@ -1202,14 +1202,14 @@ __deque_base<_Tp, _Allocator>::~__deque_base()
         __alloc_traits::deallocate(__alloc(), *__i, __block_size);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Allocator>
 __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c)
     _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
-    : __map_(_VSTD::move(__c.__map_)),
-      __start_(_VSTD::move(__c.__start_)),
-      __size_(_VSTD::move(__c.__size_))
+    : __map_(_CUDA_VSTD::move(__c.__map_)),
+      __start_(_CUDA_VSTD::move(__c.__start_)),
+      __size_(_CUDA_VSTD::move(__c.__size_))
 {
     __c.__start_ = 0;
     __c.size() = 0;
@@ -1217,9 +1217,9 @@ __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c)
 
 template <class _Tp, class _Allocator>
 __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c, const allocator_type& __a)
-    : __map_(_VSTD::move(__c.__map_), __pointer_allocator(__a)),
-      __start_(_VSTD::move(__c.__start_)),
-      __size_(_VSTD::move(__c.size()), __a)
+    : __map_(_CUDA_VSTD::move(__c.__map_), __pointer_allocator(__a)),
+      __start_(_CUDA_VSTD::move(__c.__start_)),
+      __size_(_CUDA_VSTD::move(__c.size()), __a)
 {
     if (__a == __c.__alloc())
     {
@@ -1234,12 +1234,12 @@ __deque_base<_Tp, _Allocator>::__deque_base(__deque_base&& __c, const allocator_
     }
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Allocator>
 void
 __deque_base<_Tp, _Allocator>::swap(__deque_base& __c)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT
 #else
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
@@ -1247,9 +1247,9 @@ __deque_base<_Tp, _Allocator>::swap(__deque_base& __c)
 #endif
 {
     __map_.swap(__c.__map_);
-    _VSTD::swap(__start_, __c.__start_);
-    _VSTD::swap(size(), __c.size());
-    _VSTD::__swap_allocator(__alloc(), __c.__alloc());
+    _CUDA_VSTD::swap(__start_, __c.__start_);
+    _CUDA_VSTD::swap(size(), __c.size());
+    _CUDA_VSTD::__swap_allocator(__alloc(), __c.__alloc());
 }
 
 template <class _Tp, class _Allocator>
@@ -1258,7 +1258,7 @@ __deque_base<_Tp, _Allocator>::clear() _NOEXCEPT
 {
     allocator_type& __a = __alloc();
     for (iterator __i = begin(), __e = end(); __i != __e; ++__i)
-        __alloc_traits::destroy(__a, _VSTD::addressof(*__i));
+        __alloc_traits::destroy(__a, _CUDA_VSTD::addressof(*__i));
     size() = 0;
     while (__map_.size() > 2)
     {
@@ -1277,7 +1277,7 @@ __deque_base<_Tp, _Allocator>::clear() _NOEXCEPT
 }
 
 template <class _Tp, class _Allocator /*= allocator<_Tp>*/>
-class _LIBCPP_TEMPLATE_VIS deque
+class _LIBCUDACXX_TEMPLATE_VIS deque
     : private __deque_base<_Tp, _Allocator>
 {
 public:
@@ -1301,21 +1301,21 @@ public:
 
     typedef typename __base::pointer                      pointer;
     typedef typename __base::const_pointer                const_pointer;
-    typedef _VSTD::reverse_iterator<iterator>             reverse_iterator;
-    typedef _VSTD::reverse_iterator<const_iterator>       const_reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<iterator>             reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<const_iterator>       const_reverse_iterator;
 
     using typename __base::__deque_range;
     using typename __base::__deque_block_range;
     using typename __base::_ConstructTransaction;
 
     // construct/copy/destroy:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     deque()
         _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
         {}
-    _LIBCPP_INLINE_VISIBILITY explicit deque(const allocator_type& __a) : __base(__a) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit deque(const allocator_type& __a) : __base(__a) {}
     explicit deque(size_type __n);
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     explicit deque(size_type __n, const _Allocator& __a);
 #endif
     deque(size_type __n, const value_type& __v);
@@ -1338,25 +1338,25 @@ public:
 
     deque& operator=(const deque& __c);
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     deque(initializer_list<value_type> __il);
     deque(initializer_list<value_type> __il, const allocator_type& __a);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     deque& operator=(initializer_list<value_type> __il) {assign(__il); return *this;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     deque(deque&& __c, const __type_identity_t<allocator_type>& __a);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     deque& operator=(deque&& __c)
         _NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value &&
                    is_nothrow_move_assignable<allocator_type>::value);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     template <class _InputIter>
         void assign(_InputIter __f, _InputIter __l,
@@ -1367,83 +1367,83 @@ public:
                     typename enable_if<__is_cpp17_random_access_iterator<_RAIter>::value>::type* = 0);
     void assign(size_type __n, const value_type& __v);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT;
 
     // iterators:
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       begin() _NOEXCEPT       {return __base::begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin() const _NOEXCEPT {return __base::begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       end() _NOEXCEPT         {return __base::end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()   const _NOEXCEPT {return __base::end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reverse_iterator       rbegin() _NOEXCEPT
         {return       reverse_iterator(__base::end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rbegin() const _NOEXCEPT
         {return const_reverse_iterator(__base::end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reverse_iterator       rend() _NOEXCEPT
         {return       reverse_iterator(__base::begin());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rend()   const _NOEXCEPT
         {return const_reverse_iterator(__base::begin());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator         cbegin()  const _NOEXCEPT
         {return __base::begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator         cend()    const _NOEXCEPT
         {return __base::end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crbegin() const _NOEXCEPT
         {return const_reverse_iterator(__base::end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crend()   const _NOEXCEPT
         {return const_reverse_iterator(__base::begin());}
 
     // capacity:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT {return __base::size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT
-        {return _VSTD::min<size_type>(
+        {return _CUDA_VSTD::min<size_type>(
             __alloc_traits::max_size(__base::__alloc()),
             numeric_limits<
diff erence_type>::max());}
     void resize(size_type __n);
     void resize(size_type __n, const value_type& __v);
     void shrink_to_fit() _NOEXCEPT;
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool empty() const _NOEXCEPT {return __base::size() == 0;}
 
     // element access:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator[](size_type __i) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference operator[](size_type __i) const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference at(size_type __i);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference at(size_type __i) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference front() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference front() const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference back() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference back() const _NOEXCEPT;
 
     // 23.2.2.3 modifiers:
     void push_front(const value_type& __v);
     void push_back(const value_type& __v);
-#ifndef _LIBCPP_CXX03_LANG
-#if _LIBCPP_STD_VER > 14
+#ifndef _LIBCUDACXX_CXX03_LANG
+#if _LIBCUDACXX_STD_VER > 14
     template <class... _Args> reference emplace_front(_Args&&... __args);
     template <class... _Args> reference emplace_back (_Args&&... __args);
 #else
@@ -1456,10 +1456,10 @@ public:
     void push_back(value_type&& __v);
     iterator insert(const_iterator __p, value_type&& __v);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, initializer_list<value_type> __il)
         {return insert(__p, __il.begin(), __il.end());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
     iterator insert(const_iterator __p, const value_type& __v);
     iterator insert(const_iterator __p, size_type __n, const value_type& __v);
     template <class _InputIter>
@@ -1477,59 +1477,59 @@ public:
     iterator erase(const_iterator __p);
     iterator erase(const_iterator __f, const_iterator __l);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(deque& __c)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT;
 #else
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                    __is_nothrow_swappable<allocator_type>::value);
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool __invariants() const {return __base::__invariants();}
 
     typedef typename __base::__map_const_pointer __map_const_pointer;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static size_type __recommend_blocks(size_type __n)
     {
         return __n / __base::__block_size + (__n % __base::__block_size != 0);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type __capacity() const
     {
         return __base::__map_.size() == 0 ? 0 : __base::__map_.size() * __base::__block_size - 1;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type __block_count() const
     {
         return __base::__map_.size();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type __front_spare() const
     {
         return __base::__start_;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type __front_spare_blocks() const {
       return __front_spare() / __base::__block_size;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type __back_spare() const
     {
         return __capacity() - (__base::__start_ + __base::size());
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type __back_spare_blocks() const {
       return __back_spare() / __base::__block_size;
     }
 
  private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool __maybe_remove_front_spare(bool __keep_one = true) {
       if (__front_spare_blocks() >= 2 || (!__keep_one && __front_spare_blocks())) {
         __alloc_traits::deallocate(__base::__alloc(), __base::__map_.front(),
@@ -1541,7 +1541,7 @@ public:
       return false;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool __maybe_remove_back_spare(bool __keep_one = true) {
       if (__back_spare_blocks() >= 2 || (!__keep_one && __back_spare_blocks())) {
         __alloc_traits::deallocate(__base::__alloc(), __base::__map_.back(),
@@ -1574,12 +1574,12 @@ public:
     void __move_construct_backward_and_check(iterator __f, iterator __l,
                                              iterator __r, const_pointer& __vt);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const deque& __c)
         {__copy_assign_alloc(__c, integral_constant<bool,
                       __alloc_traits::propagate_on_container_copy_assignment::value>());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const deque& __c, true_type)
         {
             if (__base::__alloc() != __c.__alloc())
@@ -1591,7 +1591,7 @@ public:
             __base::__map_.__alloc() = __c.__map_.__alloc();
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const deque&, false_type)
         {}
 
@@ -1600,7 +1600,7 @@ public:
     void __move_assign(deque& __c, false_type);
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator,
          class _Alloc = allocator<__iter_value_type<_InputIterator>>,
          class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>,
@@ -1625,7 +1625,7 @@ deque<_Tp, _Allocator>::deque(size_type __n)
         __append(__n);
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp, class _Allocator>
 deque<_Tp, _Allocator>::deque(size_type __n, const _Allocator& __a)
     : __base(__a)
@@ -1677,7 +1677,7 @@ template <class _Tp, class _Allocator>
 deque<_Tp, _Allocator>&
 deque<_Tp, _Allocator>::operator=(const deque& __c)
 {
-    if (this != _VSTD::addressof(__c))
+    if (this != _CUDA_VSTD::addressof(__c))
     {
         __copy_assign_alloc(__c);
         assign(__c.begin(), __c.end());
@@ -1685,7 +1685,7 @@ deque<_Tp, _Allocator>::operator=(const deque& __c)
     return *this;
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Allocator>
 deque<_Tp, _Allocator>::deque(initializer_list<value_type> __il)
@@ -1704,14 +1704,14 @@ template <class _Tp, class _Allocator>
 inline
 deque<_Tp, _Allocator>::deque(deque&& __c)
     _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
-    : __base(_VSTD::move(__c))
+    : __base(_CUDA_VSTD::move(__c))
 {
 }
 
 template <class _Tp, class _Allocator>
 inline
 deque<_Tp, _Allocator>::deque(deque&& __c, const __type_identity_t<allocator_type>& __a)
-    : __base(_VSTD::move(__c), __a)
+    : __base(_CUDA_VSTD::move(__c), __a)
 {
     if (__a != __c.__alloc())
     {
@@ -1755,7 +1755,7 @@ deque<_Tp, _Allocator>::__move_assign(deque& __c, true_type)
     __base::__move_assign(__c);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Allocator>
 template <class _InputIter>
@@ -1783,11 +1783,11 @@ deque<_Tp, _Allocator>::assign(_RAIter __f, _RAIter __l,
     if (static_cast<size_type>(__l - __f) > __base::size())
     {
         _RAIter __m = __f + __base::size();
-        _VSTD::copy(__f, __m, __base::begin());
+        _CUDA_VSTD::copy(__f, __m, __base::begin());
         __append(__m, __l);
     }
     else
-        __erase_to_end(_VSTD::copy(__f, __l, __base::begin()));
+        __erase_to_end(_CUDA_VSTD::copy(__f, __l, __base::begin()));
 }
 
 template <class _Tp, class _Allocator>
@@ -1796,12 +1796,12 @@ deque<_Tp, _Allocator>::assign(size_type __n, const value_type& __v)
 {
     if (__n > __base::size())
     {
-        _VSTD::fill_n(__base::begin(), __base::size(), __v);
+        _CUDA_VSTD::fill_n(__base::begin(), __base::size(), __v);
         __n -= __base::size();
         __append(__n, __v);
     }
     else
-        __erase_to_end(_VSTD::fill_n(__base::begin(), __n, __v));
+        __erase_to_end(_CUDA_VSTD::fill_n(__base::begin(), __n, __v));
 }
 
 template <class _Tp, class _Allocator>
@@ -1878,7 +1878,7 @@ typename deque<_Tp, _Allocator>::reference
 deque<_Tp, _Allocator>::at(size_type __i)
 {
     if (__i >= __base::size())
-        _VSTD::__throw_out_of_range("deque");
+        _CUDA_VSTD::__throw_out_of_range("deque");
     size_type __p = __base::__start_ + __i;
     return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
 }
@@ -1889,7 +1889,7 @@ typename deque<_Tp, _Allocator>::const_reference
 deque<_Tp, _Allocator>::at(size_type __i) const
 {
     if (__i >= __base::size())
-        _VSTD::__throw_out_of_range("deque");
+        _CUDA_VSTD::__throw_out_of_range("deque");
     size_type __p = __base::__start_ + __i;
     return *(*(__base::__map_.begin() + __p / __base::__block_size) + __p % __base::__block_size);
 }
@@ -1938,7 +1938,7 @@ deque<_Tp, _Allocator>::push_back(const value_type& __v)
     if (__back_spare() == 0)
         __add_back_capacity();
     // __back_spare() >= 1
-    __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), __v);
+    __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__base::end()), __v);
     ++__base::size();
 }
 
@@ -1950,12 +1950,12 @@ deque<_Tp, _Allocator>::push_front(const value_type& __v)
     if (__front_spare() == 0)
         __add_front_capacity();
     // __front_spare() >= 1
-    __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), __v);
+    __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*--__base::begin()), __v);
     --__base::__start_;
     ++__base::size();
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Tp, class _Allocator>
 void
 deque<_Tp, _Allocator>::push_back(value_type&& __v)
@@ -1964,13 +1964,13 @@ deque<_Tp, _Allocator>::push_back(value_type&& __v)
     if (__back_spare() == 0)
         __add_back_capacity();
     // __back_spare() >= 1
-    __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::move(__v));
+    __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__base::end()), _CUDA_VSTD::move(__v));
     ++__base::size();
 }
 
 template <class _Tp, class _Allocator>
 template <class... _Args>
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 typename deque<_Tp, _Allocator>::reference
 #else
 void
@@ -1981,10 +1981,10 @@ deque<_Tp, _Allocator>::emplace_back(_Args&&... __args)
     if (__back_spare() == 0)
         __add_back_capacity();
     // __back_spare() >= 1
-    __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()),
-                              _VSTD::forward<_Args>(__args)...);
+    __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__base::end()),
+                              _CUDA_VSTD::forward<_Args>(__args)...);
     ++__base::size();
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     return *--__base::end();
 #endif
 }
@@ -1997,7 +1997,7 @@ deque<_Tp, _Allocator>::push_front(value_type&& __v)
     if (__front_spare() == 0)
         __add_front_capacity();
     // __front_spare() >= 1
-    __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::move(__v));
+    __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*--__base::begin()), _CUDA_VSTD::move(__v));
     --__base::__start_;
     ++__base::size();
 }
@@ -2005,7 +2005,7 @@ deque<_Tp, _Allocator>::push_front(value_type&& __v)
 
 template <class _Tp, class _Allocator>
 template <class... _Args>
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 typename deque<_Tp, _Allocator>::reference
 #else
 void
@@ -2016,10 +2016,10 @@ deque<_Tp, _Allocator>::emplace_front(_Args&&... __args)
     if (__front_spare() == 0)
         __add_front_capacity();
     // __front_spare() >= 1
-    __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::forward<_Args>(__args)...);
+    __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*--__base::begin()), _CUDA_VSTD::forward<_Args>(__args)...);
     --__base::__start_;
     ++__base::size();
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     return *__base::begin();
 #endif
 }
@@ -2038,20 +2038,20 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
         // __front_spare() >= 1
         if (__pos == 0)
         {
-            __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::move(__v));
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*--__base::begin()), _CUDA_VSTD::move(__v));
             --__base::__start_;
             ++__base::size();
         }
         else
         {
             iterator __b = __base::begin();
-            iterator __bm1 = _VSTD::prev(__b);
-            __alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b));
+            iterator __bm1 = _CUDA_VSTD::prev(__b);
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__bm1), _CUDA_VSTD::move(*__b));
             --__base::__start_;
             ++__base::size();
             if (__pos > 1)
-                __b = _VSTD::move(_VSTD::next(__b), __b + __pos, __b);
-            *__b = _VSTD::move(__v);
+                __b = _CUDA_VSTD::move(_CUDA_VSTD::next(__b), __b + __pos, __b);
+            *__b = _CUDA_VSTD::move(__v);
         }
     }
     else
@@ -2062,18 +2062,18 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, value_type&& __v)
         size_type __de = __base::size() - __pos;
         if (__de == 0)
         {
-            __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::move(__v));
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__base::end()), _CUDA_VSTD::move(__v));
             ++__base::size();
         }
         else
         {
             iterator __e = __base::end();
-            iterator __em1 = _VSTD::prev(__e);
-            __alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1));
+            iterator __em1 = _CUDA_VSTD::prev(__e);
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__e), _CUDA_VSTD::move(*__em1));
             ++__base::size();
             if (__de > 1)
-                __e = _VSTD::move_backward(__e - __de, __em1, __e);
-            *--__e = _VSTD::move(__v);
+                __e = _CUDA_VSTD::move_backward(__e - __de, __em1, __e);
+            *--__e = _CUDA_VSTD::move(__v);
         }
     }
     return __base::begin() + __pos;
@@ -2094,21 +2094,21 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
         // __front_spare() >= 1
         if (__pos == 0)
         {
-            __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), _VSTD::forward<_Args>(__args)...);
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*--__base::begin()), _CUDA_VSTD::forward<_Args>(__args)...);
             --__base::__start_;
             ++__base::size();
         }
         else
         {
-            __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
+            __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _CUDA_VSTD::forward<_Args>(__args)...);
             iterator __b = __base::begin();
-            iterator __bm1 = _VSTD::prev(__b);
-            __alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b));
+            iterator __bm1 = _CUDA_VSTD::prev(__b);
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__bm1), _CUDA_VSTD::move(*__b));
             --__base::__start_;
             ++__base::size();
             if (__pos > 1)
-                __b = _VSTD::move(_VSTD::next(__b), __b + __pos, __b);
-            *__b = _VSTD::move(__tmp.get());
+                __b = _CUDA_VSTD::move(_CUDA_VSTD::next(__b), __b + __pos, __b);
+            *__b = _CUDA_VSTD::move(__tmp.get());
         }
     }
     else
@@ -2119,25 +2119,25 @@ deque<_Tp, _Allocator>::emplace(const_iterator __p, _Args&&... __args)
         size_type __de = __base::size() - __pos;
         if (__de == 0)
         {
-            __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), _VSTD::forward<_Args>(__args)...);
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__base::end()), _CUDA_VSTD::forward<_Args>(__args)...);
             ++__base::size();
         }
         else
         {
-            __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
+            __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _CUDA_VSTD::forward<_Args>(__args)...);
             iterator __e = __base::end();
-            iterator __em1 = _VSTD::prev(__e);
-            __alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1));
+            iterator __em1 = _CUDA_VSTD::prev(__e);
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__e), _CUDA_VSTD::move(*__em1));
             ++__base::size();
             if (__de > 1)
-                __e = _VSTD::move_backward(__e - __de, __em1, __e);
-            *--__e = _VSTD::move(__tmp.get());
+                __e = _CUDA_VSTD::move_backward(__e - __de, __em1, __e);
+            *--__e = _CUDA_VSTD::move(__tmp.get());
         }
     }
     return __base::begin() + __pos;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 
 template <class _Tp, class _Allocator>
@@ -2154,7 +2154,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
         // __front_spare() >= 1
         if (__pos == 0)
         {
-            __alloc_traits::construct(__a, _VSTD::addressof(*--__base::begin()), __v);
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*--__base::begin()), __v);
             --__base::__start_;
             ++__base::size();
         }
@@ -2162,14 +2162,14 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
         {
             const_pointer __vt = pointer_traits<const_pointer>::pointer_to(__v);
             iterator __b = __base::begin();
-            iterator __bm1 = _VSTD::prev(__b);
+            iterator __bm1 = _CUDA_VSTD::prev(__b);
             if (__vt == pointer_traits<const_pointer>::pointer_to(*__b))
                 __vt = pointer_traits<const_pointer>::pointer_to(*__bm1);
-            __alloc_traits::construct(__a, _VSTD::addressof(*__bm1), _VSTD::move(*__b));
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__bm1), _CUDA_VSTD::move(*__b));
             --__base::__start_;
             ++__base::size();
             if (__pos > 1)
-                __b = __move_and_check(_VSTD::next(__b), __b + __pos, __b, __vt);
+                __b = __move_and_check(_CUDA_VSTD::next(__b), __b + __pos, __b, __vt);
             *__b = *__vt;
         }
     }
@@ -2181,17 +2181,17 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, const value_type& __v)
         size_type __de = __base::size() - __pos;
         if (__de == 0)
         {
-            __alloc_traits::construct(__a, _VSTD::addressof(*__base::end()), __v);
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__base::end()), __v);
             ++__base::size();
         }
         else
         {
             const_pointer __vt = pointer_traits<const_pointer>::pointer_to(__v);
             iterator __e = __base::end();
-            iterator __em1 = _VSTD::prev(__e);
+            iterator __em1 = _CUDA_VSTD::prev(__e);
             if (__vt == pointer_traits<const_pointer>::pointer_to(*__em1))
                 __vt = pointer_traits<const_pointer>::pointer_to(*__e);
-            __alloc_traits::construct(__a, _VSTD::addressof(*__e), _VSTD::move(*__em1));
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__e), _CUDA_VSTD::move(*__em1));
             ++__base::size();
             if (__de > 1)
                 __e = __move_backward_and_check(__e - __de, __em1, __e, __vt);
@@ -2218,7 +2218,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_ty
         if (__n > __pos)
         {
             for (size_type __m = __n - __pos; __m; --__m, --__base::__start_, ++__base::size())
-                __alloc_traits::construct(__a, _VSTD::addressof(*--__i), __v);
+                __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*--__i), __v);
             __n = __pos;
         }
         if (__n > 0)
@@ -2228,7 +2228,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_ty
             __move_construct_backward_and_check(__old_begin, __obn, __i, __vt);
             if (__n < __pos)
                 __old_begin = __move_and_check(__obn, __old_begin + __pos, __old_begin, __vt);
-            _VSTD::fill_n(__old_begin, __n, *__vt);
+            _CUDA_VSTD::fill_n(__old_begin, __n, *__vt);
         }
     }
     else
@@ -2243,7 +2243,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_ty
         if (__n > __de)
         {
             for (size_type __m = __n - __de; __m; --__m, (void) ++__i, ++__base::size())
-                __alloc_traits::construct(__a, _VSTD::addressof(*__i), __v);
+                __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__i), __v);
             __n = __de;
         }
         if (__n > 0)
@@ -2253,7 +2253,7 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, size_type __n, const value_ty
             __move_construct_and_check(__oen, __old_end, __i, __vt);
             if (__n < __de)
                 __old_end = __move_backward_and_check(__old_end - __de, __oen, __old_end, __vt);
-            _VSTD::fill_n(__old_end - __n, __n, *__vt);
+            _CUDA_VSTD::fill_n(__old_end - __n, __n, *__vt);
         }
     }
     return __base::begin() + __pos;
@@ -2277,7 +2277,7 @@ typename deque<_Tp, _Allocator>::iterator
 deque<_Tp, _Allocator>::insert(const_iterator __p, _ForwardIterator __f, _ForwardIterator __l,
                                typename enable_if<__is_exactly_cpp17_forward_iterator<_ForwardIterator>::value>::type*)
 {
-    size_type __n = _VSTD::distance(__f, __l);
+    size_type __n = _CUDA_VSTD::distance(__f, __l);
     __split_buffer<value_type, allocator_type&> __buf(__n, 0, __base::__alloc());
     __buf.__construct_at_end(__f, __l);
     typedef typename __split_buffer<value_type, allocator_type&>::iterator __fwd;
@@ -2290,7 +2290,7 @@ typename deque<_Tp, _Allocator>::iterator
 deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l,
                                typename enable_if<__is_cpp17_bidirectional_iterator<_BiIter>::value>::type*)
 {
-    size_type __n = _VSTD::distance(__f, __l);
+    size_type __n = _CUDA_VSTD::distance(__f, __l);
     size_type __pos = __p - __base::begin();
     size_type __to_end = __base::size() - __pos;
     allocator_type& __a = __base::__alloc();
@@ -2304,9 +2304,9 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l,
         _BiIter __m = __f;
         if (__n > __pos)
         {
-            __m = __pos < __n / 2 ? _VSTD::prev(__l, __pos) : _VSTD::next(__f, __n - __pos);
+            __m = __pos < __n / 2 ? _CUDA_VSTD::prev(__l, __pos) : _CUDA_VSTD::next(__f, __n - __pos);
             for (_BiIter __j = __m; __j != __f; --__base::__start_, ++__base::size())
-                __alloc_traits::construct(__a, _VSTD::addressof(*--__i), *--__j);
+                __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*--__i), *--__j);
             __n = __pos;
         }
         if (__n > 0)
@@ -2314,13 +2314,13 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l,
             iterator __obn = __old_begin + __n;
             for (iterator __j = __obn; __j != __old_begin;)
             {
-                __alloc_traits::construct(__a, _VSTD::addressof(*--__i), _VSTD::move(*--__j));
+                __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*--__i), _CUDA_VSTD::move(*--__j));
                 --__base::__start_;
                 ++__base::size();
             }
             if (__n < __pos)
-                __old_begin = _VSTD::move(__obn, __old_begin + __pos, __old_begin);
-            _VSTD::copy(__m, __l, __old_begin);
+                __old_begin = _CUDA_VSTD::move(__obn, __old_begin + __pos, __old_begin);
+            _CUDA_VSTD::copy(__m, __l, __old_begin);
         }
     }
     else
@@ -2335,19 +2335,19 @@ deque<_Tp, _Allocator>::insert(const_iterator __p, _BiIter __f, _BiIter __l,
         size_type __de = __base::size() - __pos;
         if (__n > __de)
         {
-            __m = __de < __n / 2 ? _VSTD::next(__f, __de) : _VSTD::prev(__l, __n - __de);
+            __m = __de < __n / 2 ? _CUDA_VSTD::next(__f, __de) : _CUDA_VSTD::prev(__l, __n - __de);
             for (_BiIter __j = __m; __j != __l; ++__i, (void) ++__j, ++__base::size())
-                __alloc_traits::construct(__a, _VSTD::addressof(*__i), *__j);
+                __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__i), *__j);
             __n = __de;
         }
         if (__n > 0)
         {
             iterator __oen = __old_end - __n;
             for (iterator __j = __oen; __j != __old_end; ++__i, (void) ++__j, ++__base::size())
-                __alloc_traits::construct(__a, _VSTD::addressof(*__i), _VSTD::move(*__j));
+                __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__i), _CUDA_VSTD::move(*__j));
             if (__n < __de)
-                __old_end = _VSTD::move_backward(__old_end - __de, __oen, __old_end);
-            _VSTD::copy_backward(__f, __m, __old_end);
+                __old_end = _CUDA_VSTD::move_backward(__old_end - __de, __oen, __old_end);
+            _CUDA_VSTD::copy_backward(__f, __m, __old_end);
         }
     }
     return __base::begin() + __pos;
@@ -2360,7 +2360,7 @@ deque<_Tp, _Allocator>::__append(_InpIter __f, _InpIter __l,
                                  typename enable_if<__is_exactly_cpp17_input_iterator<_InpIter>::value>::type*)
 {
     for (; __f != __l; ++__f)
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
         push_back(*__f);
 #else
         emplace_back(*__f);
@@ -2373,7 +2373,7 @@ void
 deque<_Tp, _Allocator>::__append(_ForIter __f, _ForIter __l,
                                  typename enable_if<__is_cpp17_forward_iterator<_ForIter>::value>::type*)
 {
-    size_type __n = _VSTD::distance(__f, __l);
+    size_type __n = _CUDA_VSTD::distance(__f, __l);
     allocator_type& __a = __base::__alloc();
     size_type __back_capacity = __back_spare();
     if (__n > __back_capacity)
@@ -2382,7 +2382,7 @@ deque<_Tp, _Allocator>::__append(_ForIter __f, _ForIter __l,
     for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
       _ConstructTransaction __tx(this, __br);
       for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_, (void)++__f) {
-        __alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_), *__f);
+        __alloc_traits::construct(__a, _CUDA_VSTD::__to_address(__tx.__pos_), *__f);
       }
     }
 }
@@ -2399,7 +2399,7 @@ deque<_Tp, _Allocator>::__append(size_type __n)
     for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
       _ConstructTransaction __tx(this, __br);
       for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
-        __alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_));
+        __alloc_traits::construct(__a, _CUDA_VSTD::__to_address(__tx.__pos_));
       }
     }
 }
@@ -2416,7 +2416,7 @@ deque<_Tp, _Allocator>::__append(size_type __n, const value_type& __v)
     for (__deque_block_range __br : __deque_range(__base::end(), __base::end() + __n)) {
       _ConstructTransaction __tx(this, __br);
       for (; __tx.__pos_ != __tx.__end_; ++__tx.__pos_) {
-        __alloc_traits::construct(__a, _VSTD::__to_address(__tx.__pos_), __v);
+        __alloc_traits::construct(__a, _CUDA_VSTD::__to_address(__tx.__pos_), __v);
       }
     }
 
@@ -2472,10 +2472,10 @@ deque<_Tp, _Allocator>::__add_front_capacity()
         for (typename __base::__map_pointer __i = __base::__map_.begin();
                 __i != __base::__map_.end(); ++__i)
             __buf.push_back(*__i);
-        _VSTD::swap(__base::__map_.__first_, __buf.__first_);
-        _VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
-        _VSTD::swap(__base::__map_.__end_, __buf.__end_);
-        _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
+        _CUDA_VSTD::swap(__base::__map_.__first_, __buf.__first_);
+        _CUDA_VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
+        _CUDA_VSTD::swap(__base::__map_.__end_, __buf.__end_);
+        _CUDA_VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
         __base::__start_ = __base::__map_.size() == 1 ?
                                __base::__block_size / 2 :
                                __base::__start_ + __base::__block_size;
@@ -2492,7 +2492,7 @@ deque<_Tp, _Allocator>::__add_front_capacity(size_type __n)
     size_type __nb = __recommend_blocks(__n + __base::__map_.empty());
     // Number of unused blocks at back:
     size_type __back_capacity = __back_spare() / __base::__block_size;
-    __back_capacity = _VSTD::min(__back_capacity, __nb);  // don't take more than you need
+    __back_capacity = _CUDA_VSTD::min(__back_capacity, __nb);  // don't take more than you need
     __nb -= __back_capacity;  // number of blocks need to allocate
     // If __nb == 0, then we have sufficient capacity.
     if (__nb == 0)
@@ -2535,13 +2535,13 @@ deque<_Tp, _Allocator>::__add_front_capacity(size_type __n)
             __buf(max<size_type>(2* __base::__map_.capacity(),
                                  __nb + __base::__map_.size()),
                   0, __base::__map_.__alloc());
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (; __nb > 0; --__nb)
                 __buf.push_back(__alloc_traits::allocate(__a, __base::__block_size));
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -2550,7 +2550,7 @@ deque<_Tp, _Allocator>::__add_front_capacity(size_type __n)
                 __alloc_traits::deallocate(__a, *__i, __base::__block_size);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         for (; __back_capacity > 0; --__back_capacity)
         {
             __buf.push_back(__base::__map_.back());
@@ -2559,10 +2559,10 @@ deque<_Tp, _Allocator>::__add_front_capacity(size_type __n)
         for (typename __base::__map_pointer __i = __base::__map_.begin();
                 __i != __base::__map_.end(); ++__i)
             __buf.push_back(*__i);
-        _VSTD::swap(__base::__map_.__first_, __buf.__first_);
-        _VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
-        _VSTD::swap(__base::__map_.__end_, __buf.__end_);
-        _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
+        _CUDA_VSTD::swap(__base::__map_.__first_, __buf.__first_);
+        _CUDA_VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
+        _CUDA_VSTD::swap(__base::__map_.__end_, __buf.__end_);
+        _CUDA_VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
         __base::__start_ += __ds;
     }
 }
@@ -2615,10 +2615,10 @@ deque<_Tp, _Allocator>::__add_back_capacity()
         for (typename __base::__map_pointer __i = __base::__map_.end();
                 __i != __base::__map_.begin();)
             __buf.push_front(*--__i);
-        _VSTD::swap(__base::__map_.__first_, __buf.__first_);
-        _VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
-        _VSTD::swap(__base::__map_.__end_, __buf.__end_);
-        _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
+        _CUDA_VSTD::swap(__base::__map_.__first_, __buf.__first_);
+        _CUDA_VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
+        _CUDA_VSTD::swap(__base::__map_.__end_, __buf.__end_);
+        _CUDA_VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
     }
 }
 
@@ -2632,7 +2632,7 @@ deque<_Tp, _Allocator>::__add_back_capacity(size_type __n)
     size_type __nb = __recommend_blocks(__n + __base::__map_.empty());
     // Number of unused blocks at front:
     size_type __front_capacity = __front_spare() / __base::__block_size;
-    __front_capacity = _VSTD::min(__front_capacity, __nb);  // don't take more than you need
+    __front_capacity = _CUDA_VSTD::min(__front_capacity, __nb);  // don't take more than you need
     __nb -= __front_capacity;  // number of blocks need to allocate
     // If __nb == 0, then we have sufficient capacity.
     if (__nb == 0)
@@ -2677,13 +2677,13 @@ deque<_Tp, _Allocator>::__add_back_capacity(size_type __n)
                                  __nb + __base::__map_.size()),
                   __base::__map_.size() - __front_capacity,
                   __base::__map_.__alloc());
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (; __nb > 0; --__nb)
                 __buf.push_back(__alloc_traits::allocate(__a, __base::__block_size));
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -2692,7 +2692,7 @@ deque<_Tp, _Allocator>::__add_back_capacity(size_type __n)
                 __alloc_traits::deallocate(__a, *__i, __base::__block_size);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         for (; __front_capacity > 0; --__front_capacity)
         {
             __buf.push_back(__base::__map_.front());
@@ -2701,10 +2701,10 @@ deque<_Tp, _Allocator>::__add_back_capacity(size_type __n)
         for (typename __base::__map_pointer __i = __base::__map_.end();
                 __i != __base::__map_.begin();)
             __buf.push_front(*--__i);
-        _VSTD::swap(__base::__map_.__first_, __buf.__first_);
-        _VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
-        _VSTD::swap(__base::__map_.__end_, __buf.__end_);
-        _VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
+        _CUDA_VSTD::swap(__base::__map_.__first_, __buf.__first_);
+        _CUDA_VSTD::swap(__base::__map_.__begin_, __buf.__begin_);
+        _CUDA_VSTD::swap(__base::__map_.__end_, __buf.__end_);
+        _CUDA_VSTD::swap(__base::__map_.__end_cap(), __buf.__end_cap());
         __base::__start_ -= __ds;
     }
 }
@@ -2714,7 +2714,7 @@ void
 deque<_Tp, _Allocator>::pop_front()
 {
     allocator_type& __a = __base::__alloc();
-    __alloc_traits::destroy(__a, _VSTD::__to_address(*(__base::__map_.begin() +
+    __alloc_traits::destroy(__a, _CUDA_VSTD::__to_address(*(__base::__map_.begin() +
                                                     __base::__start_ / __base::__block_size) +
                                                     __base::__start_ % __base::__block_size));
     --__base::size();
@@ -2726,10 +2726,10 @@ template <class _Tp, class _Allocator>
 void
 deque<_Tp, _Allocator>::pop_back()
 {
-    _LIBCPP_ASSERT(!empty(), "deque::pop_back called on an empty deque");
+    _LIBCUDACXX_ASSERT(!empty(), "deque::pop_back called on an empty deque");
     allocator_type& __a = __base::__alloc();
     size_type __p = __base::size() + __base::__start_ - 1;
-    __alloc_traits::destroy(__a, _VSTD::__to_address(*(__base::__map_.begin() +
+    __alloc_traits::destroy(__a, _CUDA_VSTD::__to_address(*(__base::__map_.begin() +
                                                     __p / __base::__block_size) +
                                                     __p % __base::__block_size));
     --__base::size();
@@ -2745,7 +2745,7 @@ deque<_Tp, _Allocator>::__move_and_check(iterator __f, iterator __l, iterator __
 {
     // as if
     //   for (; __f != __l; ++__f, ++__r)
-    //       *__r = _VSTD::move(*__f);
+    //       *__r = _CUDA_VSTD::move(*__f);
     
diff erence_type __n = __l - __f;
     while (__n > 0)
     {
@@ -2759,7 +2759,7 @@ deque<_Tp, _Allocator>::__move_and_check(iterator __f, iterator __l, iterator __
         }
         if (__fb <= __vt && __vt < __fe)
             __vt = (const_iterator(static_cast<__map_const_pointer>(__f.__m_iter_), __vt) -= __f - __r).__ptr_;
-        __r = _VSTD::move(__fb, __fe, __r);
+        __r = _CUDA_VSTD::move(__fb, __fe, __r);
         __n -= __bs;
         __f += __bs;
     }
@@ -2775,7 +2775,7 @@ deque<_Tp, _Allocator>::__move_backward_and_check(iterator __f, iterator __l, it
 {
     // as if
     //   while (__f != __l)
-    //       *--__r = _VSTD::move(*--__l);
+    //       *--__r = _CUDA_VSTD::move(*--__l);
     
diff erence_type __n = __l - __f;
     while (__n > 0)
     {
@@ -2790,7 +2790,7 @@ deque<_Tp, _Allocator>::__move_backward_and_check(iterator __f, iterator __l, it
         }
         if (__lb <= __vt && __vt < __le)
             __vt = (const_iterator(static_cast<__map_const_pointer>(__l.__m_iter_), __vt) += __r - __l - 1).__ptr_;
-        __r = _VSTD::move_backward(__lb, __le, __r);
+        __r = _CUDA_VSTD::move_backward(__lb, __le, __r);
         __n -= __bs;
         __l -= __bs - 1;
     }
@@ -2807,7 +2807,7 @@ deque<_Tp, _Allocator>::__move_construct_and_check(iterator __f, iterator __l,
     allocator_type& __a = __base::__alloc();
     // as if
     //   for (; __f != __l; ++__r, ++__f, ++__base::size())
-    //       __alloc_traits::construct(__a, _VSTD::addressof(*__r), _VSTD::move(*__f));
+    //       __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__r), _CUDA_VSTD::move(*__f));
     
diff erence_type __n = __l - __f;
     while (__n > 0)
     {
@@ -2822,7 +2822,7 @@ deque<_Tp, _Allocator>::__move_construct_and_check(iterator __f, iterator __l,
         if (__fb <= __vt && __vt < __fe)
             __vt = (const_iterator(static_cast<__map_const_pointer>(__f.__m_iter_), __vt) += __r - __f).__ptr_;
         for (; __fb != __fe; ++__fb, ++__r, ++__base::size())
-            __alloc_traits::construct(__a, _VSTD::addressof(*__r), _VSTD::move(*__fb));
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*__r), _CUDA_VSTD::move(*__fb));
         __n -= __bs;
         __f += __bs;
     }
@@ -2839,7 +2839,7 @@ deque<_Tp, _Allocator>::__move_construct_backward_and_check(iterator __f, iterat
     // as if
     //   for (iterator __j = __l; __j != __f;)
     //   {
-    //       __alloc_traitsconstruct(__a, _VSTD::addressof(*--__r), _VSTD::move(*--__j));
+    //       __alloc_traitsconstruct(__a, _CUDA_VSTD::addressof(*--__r), _CUDA_VSTD::move(*--__j));
     //       --__base::__start_;
     //       ++__base::size();
     //   }
@@ -2859,7 +2859,7 @@ deque<_Tp, _Allocator>::__move_construct_backward_and_check(iterator __f, iterat
             __vt = (const_iterator(static_cast<__map_const_pointer>(__l.__m_iter_), __vt) -= __l - __r + 1).__ptr_;
         while (__le != __lb)
         {
-            __alloc_traits::construct(__a, _VSTD::addressof(*--__r), _VSTD::move(*--__le));
+            __alloc_traits::construct(__a, _CUDA_VSTD::addressof(*--__r), _CUDA_VSTD::move(*--__le));
             --__base::__start_;
             ++__base::size();
         }
@@ -2878,16 +2878,16 @@ deque<_Tp, _Allocator>::erase(const_iterator __f)
     allocator_type& __a = __base::__alloc();
     if (static_cast<size_t>(__pos) <= (__base::size() - 1) / 2)
     {   // erase from front
-        _VSTD::move_backward(__b, __p, _VSTD::next(__p));
-        __alloc_traits::destroy(__a, _VSTD::addressof(*__b));
+        _CUDA_VSTD::move_backward(__b, __p, _CUDA_VSTD::next(__p));
+        __alloc_traits::destroy(__a, _CUDA_VSTD::addressof(*__b));
         --__base::size();
         ++__base::__start_;
         __maybe_remove_front_spare();
     }
     else
     {   // erase from back
-        iterator __i = _VSTD::move(_VSTD::next(__p), __base::end(), __p);
-        __alloc_traits::destroy(__a, _VSTD::addressof(*__i));
+        iterator __i = _CUDA_VSTD::move(_CUDA_VSTD::next(__p), __base::end(), __p);
+        __alloc_traits::destroy(__a, _CUDA_VSTD::addressof(*__i));
         --__base::size();
         __maybe_remove_back_spare();
     }
@@ -2907,9 +2907,9 @@ deque<_Tp, _Allocator>::erase(const_iterator __f, const_iterator __l)
         allocator_type& __a = __base::__alloc();
         if (static_cast<size_t>(__pos) <= (__base::size() - __n) / 2)
         {   // erase from front
-            iterator __i = _VSTD::move_backward(__b, __p, __p + __n);
+            iterator __i = _CUDA_VSTD::move_backward(__b, __p, __p + __n);
             for (; __b != __i; ++__b)
-                __alloc_traits::destroy(__a, _VSTD::addressof(*__b));
+                __alloc_traits::destroy(__a, _CUDA_VSTD::addressof(*__b));
             __base::size() -= __n;
             __base::__start_ += __n;
             while (__maybe_remove_front_spare()) {
@@ -2917,9 +2917,9 @@ deque<_Tp, _Allocator>::erase(const_iterator __f, const_iterator __l)
         }
         else
         {   // erase from back
-            iterator __i = _VSTD::move(__p + __n, __base::end(), __p);
+            iterator __i = _CUDA_VSTD::move(__p + __n, __base::end(), __p);
             for (iterator __e = __base::end(); __i != __e; ++__i)
-                __alloc_traits::destroy(__a, _VSTD::addressof(*__i));
+                __alloc_traits::destroy(__a, _CUDA_VSTD::addressof(*__i));
             __base::size() -= __n;
             while (__maybe_remove_back_spare()) {
             }
@@ -2940,7 +2940,7 @@ deque<_Tp, _Allocator>::__erase_to_end(const_iterator __f)
         iterator __b = __base::begin();
         
diff erence_type __pos = __f - __b;
         for (iterator __p = __b + __pos; __p != __e; ++__p)
-            __alloc_traits::destroy(__a, _VSTD::addressof(*__p));
+            __alloc_traits::destroy(__a, _CUDA_VSTD::addressof(*__p));
         __base::size() -= __n;
         while (__maybe_remove_back_spare()) {
         }
@@ -2951,7 +2951,7 @@ template <class _Tp, class _Allocator>
 inline
 void
 deque<_Tp, _Allocator>::swap(deque& __c)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT
 #else
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
@@ -2970,16 +2970,16 @@ deque<_Tp, _Allocator>::clear() _NOEXCEPT
 }
 
 template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
 {
     const typename deque<_Tp, _Allocator>::size_type __sz = __x.size();
-    return __sz == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
+    return __sz == __y.size() && _CUDA_VSTD::equal(__x.begin(), __x.end(), __y.begin());
 }
 
 template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
 {
@@ -2987,15 +2987,15 @@ operator!=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
 }
 
 template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
 {
-    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
+    return _CUDA_VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
 }
 
 template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator> (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
 {
@@ -3003,7 +3003,7 @@ operator> (const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
 }
 
 template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
 {
@@ -3011,7 +3011,7 @@ operator>=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
 }
 
 template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
 {
@@ -3019,7 +3019,7 @@ operator<=(const deque<_Tp, _Allocator>& __x, const deque<_Tp, _Allocator>& __y)
 }
 
 template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(deque<_Tp, _Allocator>& __x, deque<_Tp, _Allocator>& __y)
     _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
@@ -3027,34 +3027,34 @@ swap(deque<_Tp, _Allocator>& __x, deque<_Tp, _Allocator>& __y)
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Tp, class _Allocator, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY typename deque<_Tp, _Allocator>::size_type
+inline _LIBCUDACXX_INLINE_VISIBILITY typename deque<_Tp, _Allocator>::size_type
 erase(deque<_Tp, _Allocator>& __c, const _Up& __v) {
   auto __old_size = __c.size();
-  __c.erase(_VSTD::remove(__c.begin(), __c.end(), __v), __c.end());
+  __c.erase(_CUDA_VSTD::remove(__c.begin(), __c.end(), __v), __c.end());
   return __old_size - __c.size();
 }
 
 template <class _Tp, class _Allocator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY typename deque<_Tp, _Allocator>::size_type
+inline _LIBCUDACXX_INLINE_VISIBILITY typename deque<_Tp, _Allocator>::size_type
 erase_if(deque<_Tp, _Allocator>& __c, _Predicate __pred) {
   auto __old_size = __c.size();
-  __c.erase(_VSTD::remove_if(__c.begin(), __c.end(), __pred), __c.end());
+  __c.erase(_CUDA_VSTD::remove_if(__c.begin(), __c.end(), __pred), __c.end());
   return __old_size - __c.size();
 }
 
 template <>
 inline constexpr bool __format::__enable_insertable<std::deque<char>> = true;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 inline constexpr bool __format::__enable_insertable<std::deque<wchar_t>> = true;
 #endif
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_DEQUE
+#endif // _LIBCUDACXX_DEQUE

diff  --git a/libcxx/include/errno.h b/libcxx/include/errno.h
index ea0559f0f5d1..7c02399029d8 100644
--- a/libcxx/include/errno.h
+++ b/libcxx/include/errno.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_ERRNO_H
-#define _LIBCPP_ERRNO_H
+#ifndef _LIBCUDACXX_ERRNO_H
+#define _LIBCUDACXX_ERRNO_H
 
 /*
     errno.h synopsis
@@ -24,7 +24,7 @@
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -394,4 +394,4 @@ static const int __elast2 = 105;
 
 #endif // __cplusplus
 
-#endif // _LIBCPP_ERRNO_H
+#endif // _LIBCUDACXX_ERRNO_H

diff  --git a/libcxx/include/exception b/libcxx/include/exception
index 7b514e5dca54..99b7cb187a32 100644
--- a/libcxx/include/exception
+++ b/libcxx/include/exception
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXCEPTION
-#define _LIBCPP_EXCEPTION
+#ifndef _LIBCUDACXX_EXCEPTION
+#define _LIBCUDACXX_EXCEPTION
 
 /*
     exception synopsis
@@ -85,93 +85,93 @@ template <class E> void rethrow_if_nested(const E& e);
 #include <type_traits>
 #include <version>
 
-#if defined(_LIBCPP_ABI_VCRUNTIME)
+#if defined(_LIBCUDACXX_ABI_VCRUNTIME)
 #include <vcruntime_exception.h>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 namespace std  // purposefully not using versioning namespace
 {
 
-#if !defined(_LIBCPP_ABI_VCRUNTIME)
-class _LIBCPP_EXCEPTION_ABI exception
+#if !defined(_LIBCUDACXX_ABI_VCRUNTIME)
+class _LIBCUDACXX_EXCEPTION_ABI exception
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY exception() _NOEXCEPT {}
-    _LIBCPP_INLINE_VISIBILITY exception(const exception&) _NOEXCEPT = default;
+    _LIBCUDACXX_INLINE_VISIBILITY exception() _NOEXCEPT {}
+    _LIBCUDACXX_INLINE_VISIBILITY exception(const exception&) _NOEXCEPT = default;
 
     virtual ~exception() _NOEXCEPT;
     virtual const char* what() const _NOEXCEPT;
 };
 
-class _LIBCPP_EXCEPTION_ABI bad_exception
+class _LIBCUDACXX_EXCEPTION_ABI bad_exception
     : public exception
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY bad_exception() _NOEXCEPT {}
+    _LIBCUDACXX_INLINE_VISIBILITY bad_exception() _NOEXCEPT {}
     virtual ~bad_exception() _NOEXCEPT;
     virtual const char* what() const _NOEXCEPT;
 };
-#endif // !_LIBCPP_ABI_VCRUNTIME
+#endif // !_LIBCUDACXX_ABI_VCRUNTIME
 
-#if _LIBCPP_STD_VER <= 14 \
-    || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) \
-    || defined(_LIBCPP_BUILDING_LIBRARY)
+#if _LIBCUDACXX_STD_VER <= 14 \
+    || defined(_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) \
+    || defined(_LIBCUDACXX_BUILDING_LIBRARY)
 typedef void (*unexpected_handler)();
-_LIBCPP_FUNC_VIS unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT;
-_LIBCPP_FUNC_VIS unexpected_handler get_unexpected() _NOEXCEPT;
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void unexpected();
+_LIBCUDACXX_FUNC_VIS unexpected_handler set_unexpected(unexpected_handler) _NOEXCEPT;
+_LIBCUDACXX_FUNC_VIS unexpected_handler get_unexpected() _NOEXCEPT;
+_LIBCUDACXX_NORETURN _LIBCUDACXX_FUNC_VIS void unexpected();
 #endif
 
 typedef void (*terminate_handler)();
-_LIBCPP_FUNC_VIS terminate_handler set_terminate(terminate_handler) _NOEXCEPT;
-_LIBCPP_FUNC_VIS terminate_handler get_terminate() _NOEXCEPT;
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void terminate() _NOEXCEPT;
+_LIBCUDACXX_FUNC_VIS terminate_handler set_terminate(terminate_handler) _NOEXCEPT;
+_LIBCUDACXX_FUNC_VIS terminate_handler get_terminate() _NOEXCEPT;
+_LIBCUDACXX_NORETURN _LIBCUDACXX_FUNC_VIS void terminate() _NOEXCEPT;
 
-_LIBCPP_FUNC_VIS bool uncaught_exception() _NOEXCEPT;
-_LIBCPP_FUNC_VIS _LIBCPP_AVAILABILITY_UNCAUGHT_EXCEPTIONS int uncaught_exceptions() _NOEXCEPT;
+_LIBCUDACXX_FUNC_VIS bool uncaught_exception() _NOEXCEPT;
+_LIBCUDACXX_FUNC_VIS _LIBCUDACXX_AVAILABILITY_UNCAUGHT_EXCEPTIONS int uncaught_exceptions() _NOEXCEPT;
 
-class _LIBCPP_TYPE_VIS exception_ptr;
+class _LIBCUDACXX_TYPE_VIS exception_ptr;
 
-_LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr);
+_LIBCUDACXX_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
+_LIBCUDACXX_NORETURN _LIBCUDACXX_FUNC_VIS void rethrow_exception(exception_ptr);
 
-#ifndef _LIBCPP_ABI_MICROSOFT
+#ifndef _LIBCUDACXX_ABI_MICROSOFT
 
-class _LIBCPP_TYPE_VIS exception_ptr
+class _LIBCUDACXX_TYPE_VIS exception_ptr
 {
     void* __ptr_;
 public:
-    _LIBCPP_INLINE_VISIBILITY exception_ptr() _NOEXCEPT : __ptr_() {}
-    _LIBCPP_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
+    _LIBCUDACXX_INLINE_VISIBILITY exception_ptr() _NOEXCEPT : __ptr_() {}
+    _LIBCUDACXX_INLINE_VISIBILITY exception_ptr(nullptr_t) _NOEXCEPT : __ptr_() {}
 
     exception_ptr(const exception_ptr&) _NOEXCEPT;
     exception_ptr& operator=(const exception_ptr&) _NOEXCEPT;
     ~exception_ptr() _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY explicit operator bool() const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY explicit operator bool() const _NOEXCEPT
     {return __ptr_ != nullptr;}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT
         {return __x.__ptr_ == __y.__ptr_;}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT
         {return !(__x == __y);}
 
-    friend _LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
-    friend _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr);
+    friend _LIBCUDACXX_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
+    friend _LIBCUDACXX_FUNC_VIS void rethrow_exception(exception_ptr);
 };
 
 template<class _Ep>
-_LIBCPP_INLINE_VISIBILITY exception_ptr
+_LIBCUDACXX_INLINE_VISIBILITY exception_ptr
 make_exception_ptr(_Ep __e) _NOEXCEPT
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
         throw __e;
@@ -182,19 +182,19 @@ make_exception_ptr(_Ep __e) _NOEXCEPT
     }
 #else
     ((void)__e);
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-#else // _LIBCPP_ABI_MICROSOFT
+#else // _LIBCUDACXX_ABI_MICROSOFT
 
-class _LIBCPP_TYPE_VIS exception_ptr
+class _LIBCUDACXX_TYPE_VIS exception_ptr
 {
-_LIBCPP_DIAGNOSTIC_PUSH
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wunused-private-field")
+_LIBCUDACXX_DIAGNOSTIC_PUSH
+_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wunused-private-field")
     void* __ptr1_;
     void* __ptr2_;
-_LIBCPP_DIAGNOSTIC_POP
+_LIBCUDACXX_DIAGNOSTIC_POP
 public:
     exception_ptr() _NOEXCEPT;
     exception_ptr(nullptr_t) _NOEXCEPT;
@@ -205,34 +205,34 @@ public:
     explicit operator bool() const _NOEXCEPT;
 };
 
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 bool operator==(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT;
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator!=(const exception_ptr& __x, const exception_ptr& __y) _NOEXCEPT
     {return !(__x == __y);}
 
-_LIBCPP_FUNC_VIS void swap(exception_ptr&, exception_ptr&) _NOEXCEPT;
+_LIBCUDACXX_FUNC_VIS void swap(exception_ptr&, exception_ptr&) _NOEXCEPT;
 
-_LIBCPP_FUNC_VIS exception_ptr __copy_exception_ptr(void *__except, const void* __ptr);
-_LIBCPP_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void rethrow_exception(exception_ptr);
+_LIBCUDACXX_FUNC_VIS exception_ptr __copy_exception_ptr(void *__except, const void* __ptr);
+_LIBCUDACXX_FUNC_VIS exception_ptr current_exception() _NOEXCEPT;
+_LIBCUDACXX_NORETURN _LIBCUDACXX_FUNC_VIS void rethrow_exception(exception_ptr);
 
 // This is a built-in template function which automagically extracts the required
 // information.
 template <class _E> void *__GetExceptionInfo(_E);
 
 template<class _Ep>
-_LIBCPP_INLINE_VISIBILITY exception_ptr
+_LIBCUDACXX_INLINE_VISIBILITY exception_ptr
 make_exception_ptr(_Ep __e) _NOEXCEPT
 {
-  return __copy_exception_ptr(_VSTD::addressof(__e), __GetExceptionInfo(__e));
+  return __copy_exception_ptr(_CUDA_VSTD::addressof(__e), __GetExceptionInfo(__e));
 }
 
-#endif // _LIBCPP_ABI_MICROSOFT
+#endif // _LIBCUDACXX_ABI_MICROSOFT
 // nested_exception
 
-class _LIBCPP_EXCEPTION_ABI nested_exception
+class _LIBCUDACXX_EXCEPTION_ABI nested_exception
 {
     exception_ptr __ptr_;
 public:
@@ -242,8 +242,8 @@ public:
     virtual ~nested_exception() _NOEXCEPT;
 
     // access functions
-    _LIBCPP_NORETURN void rethrow_nested() const;
-    _LIBCPP_INLINE_VISIBILITY exception_ptr nested_ptr() const _NOEXCEPT {return __ptr_;}
+    _LIBCUDACXX_NORETURN void rethrow_nested() const;
+    _LIBCUDACXX_INLINE_VISIBILITY exception_ptr nested_ptr() const _NOEXCEPT {return __ptr_;}
 };
 
 template <class _Tp>
@@ -251,16 +251,16 @@ struct __nested
     : public _Tp,
       public nested_exception
 {
-    _LIBCPP_INLINE_VISIBILITY explicit __nested(const _Tp& __t) : _Tp(__t) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit __nested(const _Tp& __t) : _Tp(__t) {}
 };
 
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
 template <class _Tp, class _Up, bool>
 struct __throw_with_nested;
 
 template <class _Tp, class _Up>
 struct __throw_with_nested<_Tp, _Up, true> {
-    _LIBCPP_NORETURN static inline _LIBCPP_INLINE_VISIBILITY void
+    _LIBCUDACXX_NORETURN static inline _LIBCUDACXX_INLINE_VISIBILITY void
     __do_throw(_Tp&& __t)
     {
         throw __nested<_Up>(static_cast<_Tp&&>(__t));
@@ -269,12 +269,12 @@ struct __throw_with_nested<_Tp, _Up, true> {
 
 template <class _Tp, class _Up>
 struct __throw_with_nested<_Tp, _Up, false> {
-    _LIBCPP_NORETURN static inline _LIBCPP_INLINE_VISIBILITY void
-#ifndef _LIBCPP_CXX03_LANG
+    _LIBCUDACXX_NORETURN static inline _LIBCUDACXX_INLINE_VISIBILITY void
+#ifndef _LIBCUDACXX_CXX03_LANG
     __do_throw(_Tp&& __t)
 #else
     __do_throw (_Tp& __t)
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
     {
         throw static_cast<_Tp&&>(__t);
     }
@@ -282,17 +282,17 @@ struct __throw_with_nested<_Tp, _Up, false> {
 #endif
 
 template <class _Tp>
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void
 throw_with_nested(_Tp&& __t)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     typedef typename decay<_Tp>::type _Up;
     static_assert( is_copy_constructible<_Up>::value, "type thrown must be CopyConstructible");
     __throw_with_nested<_Tp, _Up,
         is_class<_Up>::value &&
         !is_base_of<nested_exception, _Up>::value &&
-        !__libcpp_is_final<_Up>::value>::
+        !__LIBCUDACXX_is_final<_Up>::value>::
             __do_throw(static_cast<_Tp&&>(__t));
 #else
     ((void)__t);
@@ -307,18 +307,18 @@ struct __can_dynamic_cast : _BoolConstant<
                    is_convertible<const _From*, const _To*>::value)> {};
 
 template <class _Ep>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 rethrow_if_nested(const _Ep& __e,
                   __enable_if_t< __can_dynamic_cast<_Ep, nested_exception>::value>* = 0)
 {
-    const nested_exception* __nep = dynamic_cast<const nested_exception*>(_VSTD::addressof(__e));
+    const nested_exception* __nep = dynamic_cast<const nested_exception*>(_CUDA_VSTD::addressof(__e));
     if (__nep)
         __nep->rethrow_nested();
 }
 
 template <class _Ep>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 rethrow_if_nested(const _Ep&,
                   __enable_if_t<!__can_dynamic_cast<_Ep, nested_exception>::value>* = 0)
@@ -327,4 +327,4 @@ rethrow_if_nested(const _Ep&,
 
 } // namespace std
 
-#endif // _LIBCPP_EXCEPTION
+#endif // _LIBCUDACXX_EXCEPTION

diff  --git a/libcxx/include/execution b/libcxx/include/execution
index 040297038637..c58f7fb4449a 100644
--- a/libcxx/include/execution
+++ b/libcxx/include/execution
@@ -7,19 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXECUTION
-#define _LIBCPP_EXECUTION
+#ifndef _LIBCUDACXX_EXECUTION
+#define _LIBCUDACXX_EXECUTION
 
 #include <__assert> // all public C++ headers provide the assertion handler
 #include <__config>
 #include <version>
 
-#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
+#if defined(_LIBCUDACXX_HAS_PARALLEL_ALGORITHMS) && _LIBCUDACXX_STD_VER >= 17
 #   include <__pstl_execution>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_EXECUTION
+#endif // _LIBCUDACXX_EXECUTION

diff  --git a/libcxx/include/experimental/__config b/libcxx/include/experimental/__config
index a71b348c0490..30dd0eb3d159 100644
--- a/libcxx/include/experimental/__config
+++ b/libcxx/include/experimental/__config
@@ -7,60 +7,60 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_CONFIG
-#define _LIBCPP_EXPERIMENTAL_CONFIG
+#ifndef _LIBCUDACXX_EXPERIMENTAL_CONFIG
+#define _LIBCUDACXX_EXPERIMENTAL_CONFIG
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL namespace std { namespace experimental {
-#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL  } }
+#define _LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL namespace std { namespace experimental {
+#define _LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL  } }
 #define _VSTD_EXPERIMENTAL std::experimental
 
-#define _LIBCPP_BEGIN_NAMESPACE_LFTS _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace fundamentals_v1 {
-#define _LIBCPP_END_NAMESPACE_LFTS  } } }
+#define _LIBCUDACXX_BEGIN_NAMESPACE_LFTS _LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace fundamentals_v1 {
+#define _LIBCUDACXX_END_NAMESPACE_LFTS  } } }
 #define _VSTD_LFTS _VSTD_EXPERIMENTAL::fundamentals_v1
 
-#define _LIBCPP_BEGIN_NAMESPACE_LFTS_V2 _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace fundamentals_v2 {
-#define _LIBCPP_END_NAMESPACE_LFTS_V2  } } }
+#define _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_V2 _LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace fundamentals_v2 {
+#define _LIBCUDACXX_END_NAMESPACE_LFTS_V2  } } }
 #define _VSTD_LFTS_V2 _VSTD_EXPERIMENTAL::fundamentals_v2
 
-#define _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR _LIBCPP_BEGIN_NAMESPACE_LFTS namespace pmr {
-#define _LIBCPP_END_NAMESPACE_LFTS_PMR _LIBCPP_END_NAMESPACE_LFTS }
+#define _LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR _LIBCUDACXX_BEGIN_NAMESPACE_LFTS namespace pmr {
+#define _LIBCUDACXX_END_NAMESPACE_LFTS_PMR _LIBCUDACXX_END_NAMESPACE_LFTS }
 #define _VSTD_LFTS_PMR _VSTD_LFTS::pmr
 
 #if !defined(__cpp_coroutines) || __cpp_coroutines < 201703L
-#define _LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES
+#define _LIBCUDACXX_HAS_NO_EXPERIMENTAL_COROUTINES
 #endif
 
-#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_COROUTINES \
-  _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace coroutines_v1 {
+#define _LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL_COROUTINES \
+  _LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace coroutines_v1 {
 
-#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_COROUTINES \
-  } _LIBCPP_END_NAMESPACE_EXPERIMENTAL
+#define _LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL_COROUTINES \
+  } _LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL
 
 #define _VSTD_CORO _VSTD_EXPERIMENTAL::coroutines_v1
 
-#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD \
-    _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace parallelism_v2 {
+#define _LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD \
+    _LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL inline namespace parallelism_v2 {
 
-#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD \
-    } _LIBCPP_END_NAMESPACE_EXPERIMENTAL
+#define _LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL_SIMD \
+    } _LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL
 
-#define _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD_ABI \
-    _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD namespace simd_abi {
+#define _LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD_ABI \
+    _LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD namespace simd_abi {
 
-#define _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD_ABI \
-    } _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD
+#define _LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL_SIMD_ABI \
+    } _LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL_SIMD
 
 // TODO: support more targets
 #if defined(__AVX__)
-#define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 32
+#define _LIBCUDACXX_NATIVE_SIMD_WIDTH_IN_BYTES 32
 #else
-#define _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES 16
+#define _LIBCUDACXX_NATIVE_SIMD_WIDTH_IN_BYTES 16
 #endif
 
 #endif

diff  --git a/libcxx/include/experimental/__memory b/libcxx/include/experimental/__memory
index 749cf4c0c657..69d1599cfaf4 100644
--- a/libcxx/include/experimental/__memory
+++ b/libcxx/include/experimental/__memory
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL___MEMORY
-#define _LIBCPP_EXPERIMENTAL___MEMORY
+#ifndef _LIBCUDACXX_EXPERIMENTAL___MEMORY
+#define _LIBCUDACXX_EXPERIMENTAL___MEMORY
 
 #include <__memory/allocator_arg_t.h>
 #include <__memory/uses_allocator.h>
@@ -16,11 +16,11 @@
 #include <experimental/utility> // for erased_type
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS
 
 template <
     class _Tp, class _Alloc
@@ -79,39 +79,39 @@ struct __lfts_uses_alloc_ctor
 {};
 
 template <class _Tp, class _Allocator, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void __user_alloc_construct_impl (integral_constant<int, 0>, _Tp *__storage, const _Allocator &, _Args &&... __args )
 {
-    new (__storage) _Tp (_VSTD::forward<_Args>(__args)...);
+    new (__storage) _Tp (_CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 // FIXME: This should have a version which takes a non-const alloc.
 template <class _Tp, class _Allocator, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void __user_alloc_construct_impl (integral_constant<int, 1>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
 {
-    new (__storage) _Tp (allocator_arg, __a, _VSTD::forward<_Args>(__args)...);
+    new (__storage) _Tp (allocator_arg, __a, _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 // FIXME: This should have a version which takes a non-const alloc.
 template <class _Tp, class _Allocator, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void __user_alloc_construct_impl (integral_constant<int, 2>, _Tp *__storage, const _Allocator &__a, _Args &&... __args )
 {
-    new (__storage) _Tp (_VSTD::forward<_Args>(__args)..., __a);
+    new (__storage) _Tp (_CUDA_VSTD::forward<_Args>(__args)..., __a);
 }
 
 template <class _Tp, class _Alloc, class ..._Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void __lfts_user_alloc_construct(
     _Tp * __store, const _Alloc & __a, _Args &&... __args)
 {
     ::std::experimental::fundamentals_v1::__user_alloc_construct_impl(
         typename __lfts_uses_alloc_ctor<_Tp, _Alloc, _Args...>::type()
-       , __store, __a, _VSTD::forward<_Args>(__args)...
+       , __store, __a, _CUDA_VSTD::forward<_Args>(__args)...
        );
 }
 
-_LIBCPP_END_NAMESPACE_LFTS
+_LIBCUDACXX_END_NAMESPACE_LFTS
 
-#endif /* _LIBCPP_EXPERIMENTAL___MEMORY */
+#endif /* _LIBCUDACXX_EXPERIMENTAL___MEMORY */

diff  --git a/libcxx/include/experimental/algorithm b/libcxx/include/experimental/algorithm
index e0ca3c73be6b..6d0a0464e8f6 100644
--- a/libcxx/include/experimental/algorithm
+++ b/libcxx/include/experimental/algorithm
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_ALGORITHM
-#define _LIBCPP_EXPERIMENTAL_ALGORITHM
+#ifndef _LIBCUDACXX_EXPERIMENTAL_ALGORITHM
+#define _LIBCUDACXX_EXPERIMENTAL_ALGORITHM
 
 /*
    experimental/algorithm synopsis
@@ -37,17 +37,17 @@ ForwardIterator search(ForwardIterator first, ForwardIterator last,
 #include <experimental/__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS
 
 template <class _ForwardIterator, class _Searcher>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _ForwardIterator search(_ForwardIterator __f, _ForwardIterator __l, const _Searcher &__s)
 { return __s(__f, __l).first; }
 
-_LIBCPP_END_NAMESPACE_LFTS
+_LIBCUDACXX_END_NAMESPACE_LFTS
 
-#endif /* _LIBCPP_EXPERIMENTAL_ALGORITHM */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_ALGORITHM */

diff  --git a/libcxx/include/experimental/coroutine b/libcxx/include/experimental/coroutine
index 111073bb6d67..b6b300c3ca8e 100644
--- a/libcxx/include/experimental/coroutine
+++ b/libcxx/include/experimental/coroutine
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_COROUTINE
-#define _LIBCPP_EXPERIMENTAL_COROUTINE
+#ifndef _LIBCUDACXX_EXPERIMENTAL_COROUTINE
+#define _LIBCUDACXX_EXPERIMENTAL_COROUTINE
 
 /**
     experimental/coroutine synopsis
@@ -54,13 +54,13 @@ template <class P> struct hash<coroutine_handle<P>>;
 #include <new>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifndef _LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES
+#ifndef _LIBCUDACXX_HAS_NO_EXPERIMENTAL_COROUTINES
 
-_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_COROUTINES
+_LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL_COROUTINES
 
 template <class _Tp, class = void>
 struct __coroutine_traits_sfinae {};
@@ -79,57 +79,57 @@ struct coroutine_traits
 };
 
 template <typename _Promise = void>
-class _LIBCPP_TEMPLATE_VIS coroutine_handle;
+class _LIBCUDACXX_TEMPLATE_VIS coroutine_handle;
 
 template <>
-class _LIBCPP_TEMPLATE_VIS coroutine_handle<void> {
+class _LIBCUDACXX_TEMPLATE_VIS coroutine_handle<void> {
 public:
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR coroutine_handle() _NOEXCEPT : __handle_(nullptr) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR coroutine_handle() _NOEXCEPT : __handle_(nullptr) {}
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR coroutine_handle(nullptr_t) _NOEXCEPT : __handle_(nullptr) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR coroutine_handle(nullptr_t) _NOEXCEPT : __handle_(nullptr) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     coroutine_handle& operator=(nullptr_t) _NOEXCEPT {
         __handle_ = nullptr;
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR void* address() const _NOEXCEPT { return __handle_; }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR void* address() const _NOEXCEPT { return __handle_; }
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR explicit operator bool() const _NOEXCEPT { return __handle_; }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR explicit operator bool() const _NOEXCEPT { return __handle_; }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator()() { resume(); }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void resume() {
-      _LIBCPP_ASSERT(__is_suspended(),
+      _LIBCUDACXX_ASSERT(__is_suspended(),
                      "resume() can only be called on suspended coroutines");
-      _LIBCPP_ASSERT(!done(),
+      _LIBCUDACXX_ASSERT(!done(),
                 "resume() has undefined behavior when the coroutine is done");
       __builtin_coro_resume(__handle_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void destroy() {
-      _LIBCPP_ASSERT(__is_suspended(),
+      _LIBCUDACXX_ASSERT(__is_suspended(),
                      "destroy() can only be called on suspended coroutines");
       __builtin_coro_destroy(__handle_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool done() const {
-      _LIBCPP_ASSERT(__is_suspended(),
+      _LIBCUDACXX_ASSERT(__is_suspended(),
                      "done() can only be called on suspended coroutines");
       return __builtin_coro_done(__handle_);
     }
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static coroutine_handle from_address(void* __addr) _NOEXCEPT {
         coroutine_handle __tmp;
         __tmp.__handle_ = __addr;
@@ -137,7 +137,7 @@ public:
     }
 
     // FIXME: Should from_address(nullptr) be allowed?
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static coroutine_handle from_address(nullptr_t) _NOEXCEPT {
       return coroutine_handle(nullptr);
     }
@@ -160,56 +160,56 @@ private:
 };
 
 // 18.11.2.7 comparison operators:
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator==(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
     return __x.address() == __y.address();
 }
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator!=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
     return !(__x == __y);
 }
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator<(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
     return less<void*>()(__x.address(), __y.address());
 }
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator>(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
     return __y < __x;
 }
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator<=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
     return !(__x > __y);
 }
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator>=(coroutine_handle<> __x, coroutine_handle<> __y) _NOEXCEPT {
     return !(__x < __y);
 }
 
 template <typename _Promise>
-class _LIBCPP_TEMPLATE_VIS coroutine_handle : public coroutine_handle<> {
+class _LIBCUDACXX_TEMPLATE_VIS coroutine_handle : public coroutine_handle<> {
     using _Base = coroutine_handle<>;
 public:
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     // 18.11.2.1 construct/reset
     using coroutine_handle<>::coroutine_handle;
 #else
-    _LIBCPP_INLINE_VISIBILITY coroutine_handle() _NOEXCEPT : _Base() {}
-    _LIBCPP_INLINE_VISIBILITY coroutine_handle(nullptr_t) _NOEXCEPT : _Base(nullptr) {}
+    _LIBCUDACXX_INLINE_VISIBILITY coroutine_handle() _NOEXCEPT : _Base() {}
+    _LIBCUDACXX_INLINE_VISIBILITY coroutine_handle(nullptr_t) _NOEXCEPT : _Base(nullptr) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     coroutine_handle& operator=(nullptr_t) _NOEXCEPT {
         _Base::operator=(nullptr);
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Promise& promise() const {
         return *static_cast<_Promise*>(
-            __builtin_coro_promise(this->__handle_, _LIBCPP_ALIGNOF(_Promise), false));
+            __builtin_coro_promise(this->__handle_, _LIBCUDACXX_ALIGNOF(_Promise), false));
     }
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static coroutine_handle from_address(void* __addr) _NOEXCEPT {
         coroutine_handle __tmp;
         __tmp.__handle_ = __addr;
@@ -220,7 +220,7 @@ public:
     // the deleted _Promise* overload doesn't make from_address(nullptr)
     // ambiguous.
     // FIXME: should from_address work with nullptr?
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static coroutine_handle from_address(nullptr_t) _NOEXCEPT {
       return coroutine_handle(nullptr);
     }
@@ -239,13 +239,13 @@ public:
         "pointers to the coroutine's promise type; use 'from_promise' instead");
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static coroutine_handle from_promise(_Promise& __promise) _NOEXCEPT {
         typedef typename remove_cv<_Promise>::type _RawPromise;
         coroutine_handle __tmp;
         __tmp.__handle_ = __builtin_coro_promise(
-            _VSTD::addressof(const_cast<_RawPromise&>(__promise)),
-             _LIBCPP_ALIGNOF(_Promise), true);
+            _CUDA_VSTD::addressof(const_cast<_RawPromise&>(__promise)),
+             _LIBCUDACXX_ALIGNOF(_Promise), true);
         return __tmp;
     }
 };
@@ -254,74 +254,74 @@ public:
 struct noop_coroutine_promise {};
 
 template <>
-class _LIBCPP_TEMPLATE_VIS coroutine_handle<noop_coroutine_promise>
+class _LIBCUDACXX_TEMPLATE_VIS coroutine_handle<noop_coroutine_promise>
     : public coroutine_handle<> {
   using _Base = coroutine_handle<>;
   using _Promise = noop_coroutine_promise;
 public:
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   _Promise& promise() const {
     return *static_cast<_Promise*>(
-      __builtin_coro_promise(this->__handle_, _LIBCPP_ALIGNOF(_Promise), false));
+      __builtin_coro_promise(this->__handle_, _LIBCUDACXX_ALIGNOF(_Promise), false));
   }
 
-  _LIBCPP_CONSTEXPR explicit operator bool() const _NOEXCEPT { return true; }
-  _LIBCPP_CONSTEXPR bool done() const _NOEXCEPT { return false; }
+  _LIBCUDACXX_CONSTEXPR explicit operator bool() const _NOEXCEPT { return true; }
+  _LIBCUDACXX_CONSTEXPR bool done() const _NOEXCEPT { return false; }
 
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 void operator()() const _NOEXCEPT {}
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 void resume() const _NOEXCEPT {}
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 void destroy() const _NOEXCEPT {}
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void operator()() const _NOEXCEPT {}
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void resume() const _NOEXCEPT {}
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void destroy() const _NOEXCEPT {}
 
 private:
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   friend coroutine_handle<noop_coroutine_promise> noop_coroutine() _NOEXCEPT;
 
-  _LIBCPP_INLINE_VISIBILITY coroutine_handle() _NOEXCEPT {
+  _LIBCUDACXX_INLINE_VISIBILITY coroutine_handle() _NOEXCEPT {
     this->__handle_ = __builtin_coro_noop();
   }
 };
 
 using noop_coroutine_handle = coroutine_handle<noop_coroutine_promise>;
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 noop_coroutine_handle noop_coroutine() _NOEXCEPT {
   return noop_coroutine_handle();
 }
 #endif // __has_builtin(__builtin_coro_noop)
 
 struct suspend_never {
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool await_ready() const _NOEXCEPT { return true; }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void await_suspend(coroutine_handle<>) const _NOEXCEPT {}
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void await_resume() const _NOEXCEPT {}
 };
 
 struct suspend_always {
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   bool await_ready() const _NOEXCEPT { return false; }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void await_suspend(coroutine_handle<>) const _NOEXCEPT {}
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   void await_resume() const _NOEXCEPT {}
 };
 
-_LIBCPP_END_NAMESPACE_EXPERIMENTAL_COROUTINES
+_LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL_COROUTINES
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
 struct hash<_VSTD_CORO::coroutine_handle<_Tp> > {
     using __arg_type = _VSTD_CORO::coroutine_handle<_Tp>;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(__arg_type const& __v) const _NOEXCEPT
     {return hash<void*>()(__v.address());}
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
+#endif // !defined(_LIBCUDACXX_HAS_NO_EXPERIMENTAL_COROUTINES)
 
-#endif /* _LIBCPP_EXPERIMENTAL_COROUTINE */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_COROUTINE */

diff  --git a/libcxx/include/experimental/deque b/libcxx/include/experimental/deque
index 3e3f9098a8fd..16fe629f9121 100644
--- a/libcxx/include/experimental/deque
+++ b/libcxx/include/experimental/deque
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_DEQUE
-#define _LIBCPP_EXPERIMENTAL_DEQUE
+#ifndef _LIBCUDACXX_EXPERIMENTAL_DEQUE
+#define _LIBCUDACXX_EXPERIMENTAL_DEQUE
 
 /*
     experimental/deque synopsis
@@ -34,15 +34,15 @@ namespace pmr {
 #include <experimental/__config>
 #include <experimental/memory_resource>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 template <class _ValueT>
-using deque = _VSTD::deque<_ValueT, polymorphic_allocator<_ValueT>>;
+using deque = _CUDA_VSTD::deque<_ValueT, polymorphic_allocator<_ValueT>>;
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR
 
-#endif /* _LIBCPP_EXPERIMENTAL_DEQUE */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_DEQUE */

diff  --git a/libcxx/include/experimental/forward_list b/libcxx/include/experimental/forward_list
index 4b102c554704..791dcd97bdcf 100644
--- a/libcxx/include/experimental/forward_list
+++ b/libcxx/include/experimental/forward_list
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_FORWARD_LIST
-#define _LIBCPP_EXPERIMENTAL_FORWARD_LIST
+#ifndef _LIBCUDACXX_EXPERIMENTAL_FORWARD_LIST
+#define _LIBCUDACXX_EXPERIMENTAL_FORWARD_LIST
 
 /*
     experimental/forward_list synopsis
@@ -34,15 +34,15 @@ namespace pmr {
 #include <experimental/memory_resource>
 #include <forward_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 template <class _ValueT>
-using forward_list = _VSTD::forward_list<_ValueT, polymorphic_allocator<_ValueT>>;
+using forward_list = _CUDA_VSTD::forward_list<_ValueT, polymorphic_allocator<_ValueT>>;
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR
 
-#endif /* _LIBCPP_EXPERIMENTAL_FORWARD_LIST */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_FORWARD_LIST */

diff  --git a/libcxx/include/experimental/functional b/libcxx/include/experimental/functional
index 12440744ca50..8bcbdfe12955 100644
--- a/libcxx/include/experimental/functional
+++ b/libcxx/include/experimental/functional
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_FUNCTIONAL
-#define _LIBCPP_EXPERIMENTAL_FUNCTIONAL
+#ifndef _LIBCUDACXX_EXPERIMENTAL_FUNCTIONAL
+#define _LIBCUDACXX_EXPERIMENTAL_FUNCTIONAL
 
 /*
    experimental/functional synopsis
@@ -71,37 +71,37 @@ inline namespace fundamentals_v1 {
 #include <unordered_map>
 #include <vector>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS
 
-#ifdef _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
-#  define _LIBCPP_DEPRECATED_DEFAULT_SEARCHER
-#  define _LIBCPP_DEPRECATED_BOYER_MOORE_SEARCHER
-#  define _LIBCPP_DEPRECATED_BOYER_MOORE_HORSPOOL_SEARCHER
+#ifdef _LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+#  define _LIBCUDACXX_DEPRECATED_DEFAULT_SEARCHER
+#  define _LIBCUDACXX_DEPRECATED_BOYER_MOORE_SEARCHER
+#  define _LIBCUDACXX_DEPRECATED_BOYER_MOORE_HORSPOOL_SEARCHER
 #else
-#  define _LIBCPP_DEPRECATED_DEFAULT_SEARCHER _LIBCPP_DEPRECATED_("std::exprerimental::default_searcher will be removed in LLVM 17. Use std::default_searcher instead")
-#  define _LIBCPP_DEPRECATED_BOYER_MOORE_SEARCHER _LIBCPP_DEPRECATED_("std::exprerimental::boyer_moore_searcher will be removed in LLVM 17. Use std::boyer_moore_searcher instead")
-#  define _LIBCPP_DEPRECATED_BOYER_MOORE_HORSPOOL_SEARCHER _LIBCPP_DEPRECATED_("std::exprerimental::boyer_moore_horspool_searcher will be removed in LLVM 17. Use std::boyer_moore_horspool_searcher instead")
+#  define _LIBCUDACXX_DEPRECATED_DEFAULT_SEARCHER _LIBCUDACXX_DEPRECATED_("std::exprerimental::default_searcher will be removed in LLVM 17. Use std::default_searcher instead")
+#  define _LIBCUDACXX_DEPRECATED_BOYER_MOORE_SEARCHER _LIBCUDACXX_DEPRECATED_("std::exprerimental::boyer_moore_searcher will be removed in LLVM 17. Use std::boyer_moore_searcher instead")
+#  define _LIBCUDACXX_DEPRECATED_BOYER_MOORE_HORSPOOL_SEARCHER _LIBCUDACXX_DEPRECATED_("std::exprerimental::boyer_moore_horspool_searcher will be removed in LLVM 17. Use std::boyer_moore_horspool_searcher instead")
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 // default searcher
 template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
-class _LIBCPP_DEPRECATED_DEFAULT_SEARCHER _LIBCPP_TEMPLATE_VIS default_searcher {
+class _LIBCUDACXX_DEPRECATED_DEFAULT_SEARCHER _LIBCUDACXX_TEMPLATE_VIS default_searcher {
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     default_searcher(_ForwardIterator __f, _ForwardIterator __l,
                        _BinaryPredicate __p = _BinaryPredicate())
         : __first_(__f), __last_(__l), __pred_(__p) {}
 
     template <typename _ForwardIterator2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<_ForwardIterator2, _ForwardIterator2>
     operator () (_ForwardIterator2 __f, _ForwardIterator2 __l) const
     {
@@ -116,7 +116,7 @@ private:
     };
 
 template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>
-_LIBCPP_DEPRECATED_DEFAULT_SEARCHER _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_DEFAULT_SEARCHER _LIBCUDACXX_INLINE_VISIBILITY
 default_searcher<_ForwardIterator, _BinaryPredicate>
 make_default_searcher( _ForwardIterator __f, _ForwardIterator __l, _BinaryPredicate __p = _BinaryPredicate ())
 {
@@ -135,17 +135,17 @@ class _BMSkipTable<_Key, _Value, _Hash, _BinaryPredicate, false> {
     std::unordered_map<_Key, _Value, _Hash, _BinaryPredicate> __table;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _BMSkipTable(size_t __sz, _Value __default, _Hash __hf, _BinaryPredicate __pred)
         : __default_value_(__default), __table(__sz, __hf, __pred) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void insert(const key_type &__key, value_type __val)
     {
         __table [__key] = __val;    // Would skip_.insert (val) be better here?
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_type operator [](const key_type & __key) const
     {
         auto __it = __table.find (__key);
@@ -166,19 +166,19 @@ private:
     skip_map __table;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _BMSkipTable(size_t /*__sz*/, _Value __default, _Hash /*__hf*/, _BinaryPredicate /*__pred*/)
     {
         std::fill_n(__table.begin(), __table.size(), __default);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void insert(key_type __key, value_type __val)
     {
         __table[static_cast<unsigned_key_type>(__key)] = __val;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_type operator [](key_type __key) const
     {
         return __table[static_cast<unsigned_key_type>(__key)];
@@ -189,7 +189,7 @@ public:
 template <class _RandomAccessIterator1,
           class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
           class _BinaryPredicate = equal_to<>>
-class _LIBCPP_DEPRECATED_BOYER_MOORE_SEARCHER _LIBCPP_TEMPLATE_VIS boyer_moore_searcher {
+class _LIBCUDACXX_DEPRECATED_BOYER_MOORE_SEARCHER _LIBCUDACXX_TEMPLATE_VIS boyer_moore_searcher {
 private:
     typedef typename std::iterator_traits<_RandomAccessIterator1>::
diff erence_type 
diff erence_type;
     typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type      value_type;
@@ -204,7 +204,7 @@ public:
     boyer_moore_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l,
                 _Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate())
             : __first_(__f), __last_(__l), __pred_(__pred),
-              __pattern_length_(_VSTD::distance(__first_, __last_)),
+              __pattern_length_(_CUDA_VSTD::distance(__first_, __last_)),
               __skip_{make_shared<skip_table_type>(__pattern_length_, -1, __hf, __pred_)},
               __suffix_{make_shared<vector<
diff erence_type>>(__pattern_length_ + 1)}
         {
@@ -227,7 +227,7 @@ public:
         if (__first_ == __last_) return make_pair(__f, __f); // empty pattern
 
     //  If the pattern is larger than the corpus, we can't find it!
-        if ( __pattern_length_ > _VSTD::distance(__f, __l))
+        if ( __pattern_length_ > _CUDA_VSTD::distance(__f, __l))
             return make_pair(__l, __l);
 
     //  Do the search
@@ -279,7 +279,7 @@ private:
     template<typename _Iterator, typename _Container>
     void __compute_bm_prefix ( _Iterator __f, _Iterator __l, _BinaryPredicate __pred, _Container &__prefix )
     {
-        const size_t __count = _VSTD::distance(__f, __l);
+        const size_t __count = _CUDA_VSTD::distance(__f, __l);
 
         __prefix[0] = 0;
         size_t __k = 0;
@@ -297,7 +297,7 @@ private:
     void __build_suffix_table(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l,
                                                     _BinaryPredicate __pred)
     {
-        const size_t __count = _VSTD::distance(__f, __l);
+        const size_t __count = _CUDA_VSTD::distance(__f, __l);
         vector<
diff erence_type> & __suffix = *__suffix_.get();
         if (__count > 0)
         {
@@ -326,7 +326,7 @@ private:
 template<class _RandomAccessIterator,
          class _Hash = hash<typename iterator_traits<_RandomAccessIterator>::value_type>,
          class _BinaryPredicate = equal_to<>>
-_LIBCPP_DEPRECATED_BOYER_MOORE_SEARCHER _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_BOYER_MOORE_SEARCHER _LIBCUDACXX_INLINE_VISIBILITY
 boyer_moore_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate>
 make_boyer_moore_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l,
                     _Hash __hf = _Hash(), _BinaryPredicate __p = _BinaryPredicate ())
@@ -338,7 +338,7 @@ make_boyer_moore_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l,
 template <class _RandomAccessIterator1,
           class _Hash = hash<typename iterator_traits<_RandomAccessIterator1>::value_type>,
           class _BinaryPredicate = equal_to<>>
-class _LIBCPP_DEPRECATED_BOYER_MOORE_HORSPOOL_SEARCHER _LIBCPP_TEMPLATE_VIS boyer_moore_horspool_searcher {
+class _LIBCUDACXX_DEPRECATED_BOYER_MOORE_HORSPOOL_SEARCHER _LIBCUDACXX_TEMPLATE_VIS boyer_moore_horspool_searcher {
 private:
     typedef typename std::iterator_traits<_RandomAccessIterator1>::
diff erence_type 
diff erence_type;
     typedef typename std::iterator_traits<_RandomAccessIterator1>::value_type      value_type;
@@ -353,8 +353,8 @@ public:
     boyer_moore_horspool_searcher(_RandomAccessIterator1 __f, _RandomAccessIterator1 __l,
                 _Hash __hf = _Hash(), _BinaryPredicate __pred = _BinaryPredicate())
             : __first_(__f), __last_(__l), __pred_(__pred),
-              __pattern_length_(_VSTD::distance(__first_, __last_)),
-              __skip_{_VSTD::make_shared<skip_table_type>(__pattern_length_, __pattern_length_, __hf, __pred_)}
+              __pattern_length_(_CUDA_VSTD::distance(__first_, __last_)),
+              __skip_{_CUDA_VSTD::make_shared<skip_table_type>(__pattern_length_, __pattern_length_, __hf, __pred_)}
         {
     //  build the skip table
             if ( __f != __l )
@@ -377,7 +377,7 @@ public:
         if (__first_ == __last_) return make_pair(__f, __f); // empty pattern
 
     //  If the pattern is larger than the corpus, we can't find it!
-        if ( __pattern_length_ > _VSTD::distance(__f, __l))
+        if ( __pattern_length_ > _CUDA_VSTD::distance(__f, __l))
             return make_pair(__l, __l);
 
     //  Do the search
@@ -419,7 +419,7 @@ private:
 template<class _RandomAccessIterator,
          class _Hash = hash<typename iterator_traits<_RandomAccessIterator>::value_type>,
          class _BinaryPredicate = equal_to<>>
-_LIBCPP_DEPRECATED_BOYER_MOORE_HORSPOOL_SEARCHER _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_DEPRECATED_BOYER_MOORE_HORSPOOL_SEARCHER _LIBCUDACXX_INLINE_VISIBILITY
 boyer_moore_horspool_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate>
 make_boyer_moore_horspool_searcher( _RandomAccessIterator __f, _RandomAccessIterator __l,
                     _Hash __hf = _Hash(), _BinaryPredicate __p = _BinaryPredicate ())
@@ -427,10 +427,10 @@ make_boyer_moore_horspool_searcher( _RandomAccessIterator __f, _RandomAccessIter
     return boyer_moore_horspool_searcher<_RandomAccessIterator, _Hash, _BinaryPredicate>(__f, __l, __hf, __p);
 }
 
-#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER > 11
 
-_LIBCPP_END_NAMESPACE_LFTS
+_LIBCUDACXX_END_NAMESPACE_LFTS
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif /* _LIBCPP_EXPERIMENTAL_FUNCTIONAL */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_FUNCTIONAL */

diff  --git a/libcxx/include/experimental/iterator b/libcxx/include/experimental/iterator
index a92bca6a20fa..f427ebc2ba4b 100644
--- a/libcxx/include/experimental/iterator
+++ b/libcxx/include/experimental/iterator
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_ITERATOR
-#define _LIBCPP_EXPERIMENTAL_ITERATOR
+#ifndef _LIBCUDACXX_EXPERIMENTAL_ITERATOR
+#define _LIBCUDACXX_EXPERIMENTAL_ITERATOR
 
 /*
 namespace std {
@@ -60,13 +60,13 @@ namespace std {
 #include <iosfwd> // char_traits
 #include <iterator>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS
 
 template <class _Delim, class _CharT = char, class _Traits = char_traits<_CharT>>
 class ostream_joiner {
@@ -82,10 +82,10 @@ public:
     typedef void                                 reference;
 
     ostream_joiner(ostream_type& __os, _Delim&& __d)
-        : __output_iter(_VSTD::addressof(__os)), __delim(_VSTD::move(__d)), __first(true) {}
+        : __output_iter(_CUDA_VSTD::addressof(__os)), __delim(_CUDA_VSTD::move(__d)), __first(true) {}
 
     ostream_joiner(ostream_type& __os, const _Delim& __d)
-        : __output_iter(_VSTD::addressof(__os)), __delim(__d), __first(true) {}
+        : __output_iter(_CUDA_VSTD::addressof(__os)), __delim(__d), __first(true) {}
 
 
     template<typename _Tp>
@@ -112,10 +112,10 @@ private:
 template <class _CharT, class _Traits, class _Delim>
 ostream_joiner<typename decay<_Delim>::type, _CharT, _Traits>
 make_ostream_joiner(basic_ostream<_CharT, _Traits>& __os, _Delim && __d)
-{ return ostream_joiner<typename decay<_Delim>::type, _CharT, _Traits>(__os, _VSTD::forward<_Delim>(__d)); }
+{ return ostream_joiner<typename decay<_Delim>::type, _CharT, _Traits>(__os, _CUDA_VSTD::forward<_Delim>(__d)); }
 
-_LIBCPP_END_NAMESPACE_LFTS
+_LIBCUDACXX_END_NAMESPACE_LFTS
 
-#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER > 11
 
-#endif // _LIBCPP_EXPERIMENTAL_ITERATOR
+#endif // _LIBCUDACXX_EXPERIMENTAL_ITERATOR

diff  --git a/libcxx/include/experimental/list b/libcxx/include/experimental/list
index c8480575977e..8c57e2fa7e0e 100644
--- a/libcxx/include/experimental/list
+++ b/libcxx/include/experimental/list
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_LIST
-#define _LIBCPP_EXPERIMENTAL_LIST
+#ifndef _LIBCUDACXX_EXPERIMENTAL_LIST
+#define _LIBCUDACXX_EXPERIMENTAL_LIST
 
 /*
     experimental/list synopsis
@@ -34,15 +34,15 @@ namespace pmr {
 #include <experimental/memory_resource>
 #include <list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 template <class _ValueT>
-using list = _VSTD::list<_ValueT, polymorphic_allocator<_ValueT>>;
+using list = _CUDA_VSTD::list<_ValueT, polymorphic_allocator<_ValueT>>;
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR
 
-#endif /* _LIBCPP_EXPERIMENTAL_LIST */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_LIST */

diff  --git a/libcxx/include/experimental/map b/libcxx/include/experimental/map
index 3dee7f703aeb..e57564dd337f 100644
--- a/libcxx/include/experimental/map
+++ b/libcxx/include/experimental/map
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_MAP
-#define _LIBCPP_EXPERIMENTAL_MAP
+#ifndef _LIBCUDACXX_EXPERIMENTAL_MAP
+#define _LIBCUDACXX_EXPERIMENTAL_MAP
 
 /*
     experimental/map synopsis
@@ -39,20 +39,20 @@ namespace pmr {
 #include <experimental/memory_resource>
 #include <map>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 template <class _Key, class _Value, class  _Compare = less<_Key>>
-using map = _VSTD::map<_Key, _Value, _Compare,
+using map = _CUDA_VSTD::map<_Key, _Value, _Compare,
                         polymorphic_allocator<pair<const _Key, _Value>>>;
 
 template <class _Key, class _Value, class  _Compare = less<_Key>>
-using multimap = _VSTD::multimap<_Key, _Value, _Compare,
+using multimap = _CUDA_VSTD::multimap<_Key, _Value, _Compare,
                         polymorphic_allocator<pair<const _Key, _Value>>>;
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR
 
-#endif /* _LIBCPP_EXPERIMENTAL_MAP */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_MAP */

diff  --git a/libcxx/include/experimental/memory_resource b/libcxx/include/experimental/memory_resource
index f7b19aafd40f..7f1fa38f7ab6 100644
--- a/libcxx/include/experimental/memory_resource
+++ b/libcxx/include/experimental/memory_resource
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_MEMORY_RESOURCE
-#define _LIBCPP_EXPERIMENTAL_MEMORY_RESOURCE
+#ifndef _LIBCUDACXX_EXPERIMENTAL_MEMORY_RESOURCE
+#define _LIBCUDACXX_EXPERIMENTAL_MEMORY_RESOURCE
 
 /**
     experimental/memory_resource synopsis
@@ -77,41 +77,41 @@ namespace pmr {
 #include <stdexcept>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 // Round __s up to next multiple of __a.
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 size_t __aligned_allocation_size(size_t __s, size_t __a) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s + __a > __s, "aligned allocation size overflows");
+    _LIBCUDACXX_ASSERT(__s + __a > __s, "aligned allocation size overflows");
     return (__s + __a - 1) & ~(__a - 1);
 }
 
 // 8.5, memory.resource
-class _LIBCPP_TYPE_VIS memory_resource
+class _LIBCUDACXX_TYPE_VIS memory_resource
 {
-    static const size_t __max_align = _LIBCPP_ALIGNOF(max_align_t);
+    static const size_t __max_align = _LIBCUDACXX_ALIGNOF(max_align_t);
 
 // 8.5.2, memory.resource.public
 public:
     virtual ~memory_resource() = default;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void* allocate(size_t __bytes, size_t __align = __max_align)
         { return do_allocate(__bytes, __align); }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void deallocate(void * __p, size_t __bytes, size_t __align = __max_align)
         { do_deallocate(__p, __bytes, __align); }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool is_equal(memory_resource const & __other) const _NOEXCEPT
         { return do_is_equal(__other); }
 
@@ -123,48 +123,48 @@ private:
 };
 
 // 8.5.4, memory.resource.eq
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator==(memory_resource const & __lhs,
                 memory_resource const & __rhs) _NOEXCEPT
 {
     return &__lhs == &__rhs || __lhs.is_equal(__rhs);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator!=(memory_resource const & __lhs,
                 memory_resource const & __rhs) _NOEXCEPT
 {
     return !(__lhs == __rhs);
 }
 
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 memory_resource * new_delete_resource() _NOEXCEPT;
 
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 memory_resource * null_memory_resource() _NOEXCEPT;
 
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 memory_resource * get_default_resource() _NOEXCEPT;
 
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 memory_resource * set_default_resource(memory_resource * __new_res) _NOEXCEPT;
 
 // 8.6, memory.polymorphic.allocator.class
 
 // 8.6.1, memory.polymorphic.allocator.overview
 template <class _ValueType>
-class _LIBCPP_TEMPLATE_VIS polymorphic_allocator
+class _LIBCUDACXX_TEMPLATE_VIS polymorphic_allocator
 {
 public:
     typedef _ValueType value_type;
 
     // 8.6.2, memory.polymorphic.allocator.ctor
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     polymorphic_allocator() _NOEXCEPT
       : __res_(_VSTD_LFTS_PMR::get_default_resource())
     {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     polymorphic_allocator(memory_resource * __r) _NOEXCEPT
       : __res_(__r)
     {}
@@ -172,7 +172,7 @@ public:
     polymorphic_allocator(polymorphic_allocator const &) = default;
 
     template <class _Tp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     polymorphic_allocator(polymorphic_allocator<_Tp> const & __other) _NOEXCEPT
       : __res_(__other.resource())
     {}
@@ -181,33 +181,33 @@ public:
     operator=(polymorphic_allocator const &) = delete;
 
     // 8.6.3, memory.polymorphic.allocator.mem
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _ValueType* allocate(size_t __n) {
         if (__n > __max_size())
             __throw_bad_array_new_length();
         return static_cast<_ValueType*>(
-            __res_->allocate(__n * sizeof(_ValueType), _LIBCPP_ALIGNOF(_ValueType))
+            __res_->allocate(__n * sizeof(_ValueType), _LIBCUDACXX_ALIGNOF(_ValueType))
         );
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void deallocate(_ValueType * __p, size_t __n) _NOEXCEPT {
-        _LIBCPP_ASSERT(__n <= __max_size(),
+        _LIBCUDACXX_ASSERT(__n <= __max_size(),
                        "deallocate called for size which exceeds max_size()");
-        __res_->deallocate(__p, __n * sizeof(_ValueType), _LIBCPP_ALIGNOF(_ValueType));
+        __res_->deallocate(__p, __n * sizeof(_ValueType), _LIBCUDACXX_ALIGNOF(_ValueType));
     }
 
     template <class _Tp, class ..._Ts>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void construct(_Tp* __p, _Ts &&... __args)
     {
         _VSTD_LFTS::__lfts_user_alloc_construct(
-            __p, *this, _VSTD::forward<_Ts>(__args)...
+            __p, *this, _CUDA_VSTD::forward<_Ts>(__args)...
           );
     }
 
     template <class _T1, class _T2, class ..._Args1, class ..._Args2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void construct(pair<_T1, _T2>* __p, piecewise_construct_t,
                    tuple<_Args1...> __x, tuple<_Args2...> __y)
     {
@@ -216,95 +216,95 @@ public:
               typename __lfts_uses_alloc_ctor<
                   _T1, polymorphic_allocator&, _Args1...
               >::type()
-            , _VSTD::move(__x)
+            , _CUDA_VSTD::move(__x)
             , typename __make_tuple_indices<sizeof...(_Args1)>::type{}
           )
           , __transform_tuple(
               typename __lfts_uses_alloc_ctor<
                   _T2, polymorphic_allocator&, _Args2...
               >::type()
-            , _VSTD::move(__y)
+            , _CUDA_VSTD::move(__y)
             , typename __make_tuple_indices<sizeof...(_Args2)>::type{}
           )
         );
     }
 
     template <class _T1, class _T2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void construct(pair<_T1, _T2>* __p) {
         construct(__p, piecewise_construct, tuple<>(), tuple<>());
     }
 
     template <class _T1, class _T2, class _Up, class _Vp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void construct(pair<_T1, _T2> * __p, _Up && __u, _Vp && __v) {
         construct(__p, piecewise_construct
-          , _VSTD::forward_as_tuple(_VSTD::forward<_Up>(__u))
-          , _VSTD::forward_as_tuple(_VSTD::forward<_Vp>(__v)));
+          , _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Up>(__u))
+          , _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Vp>(__v)));
     }
 
     template <class _T1, class _T2, class _U1, class _U2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void construct(pair<_T1, _T2> * __p, pair<_U1, _U2> const & __pr) {
         construct(__p, piecewise_construct
-            , _VSTD::forward_as_tuple(__pr.first)
-            , _VSTD::forward_as_tuple(__pr.second));
+            , _CUDA_VSTD::forward_as_tuple(__pr.first)
+            , _CUDA_VSTD::forward_as_tuple(__pr.second));
     }
 
     template <class _T1, class _T2, class _U1, class _U2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void construct(pair<_T1, _T2> * __p, pair<_U1, _U2> && __pr){
         construct(__p, piecewise_construct
-            , _VSTD::forward_as_tuple(_VSTD::forward<_U1>(__pr.first))
-            , _VSTD::forward_as_tuple(_VSTD::forward<_U2>(__pr.second)));
+            , _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_U1>(__pr.first))
+            , _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_U2>(__pr.second)));
     }
 
     template <class _Tp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void destroy(_Tp * __p) _NOEXCEPT
         { __p->~_Tp(); }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     polymorphic_allocator
     select_on_container_copy_construction() const _NOEXCEPT
         { return polymorphic_allocator(); }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     memory_resource * resource() const _NOEXCEPT
         { return __res_; }
 
 private:
     template <class ..._Args, size_t ..._Idx>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     tuple<_Args&&...>
     __transform_tuple(integral_constant<int, 0>, tuple<_Args...>&& __t,
                       __tuple_indices<_Idx...>) const
     {
-        return _VSTD::forward_as_tuple(_VSTD::get<_Idx>(_VSTD::move(__t))...);
+        return _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__t))...);
     }
 
     template <class ..._Args, size_t ..._Idx>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     tuple<allocator_arg_t const&, polymorphic_allocator&, _Args&&...>
     __transform_tuple(integral_constant<int, 1>, tuple<_Args...> && __t,
                       __tuple_indices<_Idx...>)
     {
         using _Tup = tuple<allocator_arg_t const&, polymorphic_allocator&, _Args&&...>;
         return _Tup(allocator_arg, *this,
-                    _VSTD::get<_Idx>(_VSTD::move(__t))...);
+                    _CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__t))...);
     }
 
     template <class ..._Args, size_t ..._Idx>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     tuple<_Args&&..., polymorphic_allocator&>
     __transform_tuple(integral_constant<int, 2>, tuple<_Args...> && __t,
                       __tuple_indices<_Idx...>)
     {
         using _Tup = tuple<_Args&&..., polymorphic_allocator&>;
-        return _Tup(_VSTD::get<_Idx>(_VSTD::move(__t))..., *this);
+        return _Tup(_CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__t))..., *this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t __max_size() const _NOEXCEPT
         { return numeric_limits<size_t>::max() / sizeof(value_type); }
 
@@ -314,7 +314,7 @@ private:
 // 8.6.4, memory.polymorphic.allocator.eq
 
 template <class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator==(polymorphic_allocator<_Tp> const & __lhs,
                 polymorphic_allocator<_Up> const & __rhs) _NOEXCEPT
 {
@@ -322,7 +322,7 @@ bool operator==(polymorphic_allocator<_Tp> const & __lhs,
 }
 
 template <class _Tp, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator!=(polymorphic_allocator<_Tp> const & __lhs,
                 polymorphic_allocator<_Up> const & __rhs) _NOEXCEPT
 {
@@ -333,7 +333,7 @@ bool operator!=(polymorphic_allocator<_Tp> const & __lhs,
 
 // 8.7.1, memory.resource.adaptor.overview
 template <class _CharAlloc>
-class _LIBCPP_TEMPLATE_VIS __resource_adaptor_imp
+class _LIBCUDACXX_TEMPLATE_VIS __resource_adaptor_imp
   : public memory_resource
 {
     using _CTraits = allocator_traits<_CharAlloc>;
@@ -341,7 +341,7 @@ class _LIBCPP_TEMPLATE_VIS __resource_adaptor_imp
                && is_same<typename _CTraits::pointer, char*>::value
                && is_same<typename _CTraits::void_pointer, void*>::value, "");
 
-    static const size_t _MaxAlign = _LIBCPP_ALIGNOF(max_align_t);
+    static const size_t _MaxAlign = _LIBCUDACXX_ALIGNOF(max_align_t);
 
     using _Alloc = typename _CTraits::template rebind_alloc<
             typename aligned_storage<_MaxAlign, _MaxAlign>::type
@@ -360,20 +360,20 @@ public:
 
     // 8.7.2, memory.resource.adaptor.ctor
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __resource_adaptor_imp(allocator_type const & __a)
       : __alloc_(__a)
     {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __resource_adaptor_imp(allocator_type && __a)
-      : __alloc_(_VSTD::move(__a))
+      : __alloc_(_CUDA_VSTD::move(__a))
     {}
 
     __resource_adaptor_imp &
     operator=(__resource_adaptor_imp const &) = default;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const
     { return __alloc_; }
 
@@ -389,7 +389,7 @@ private:
 
     virtual void do_deallocate(void * __p, size_t __bytes, size_t)
     {
-        _LIBCPP_ASSERT(__bytes <= __max_size(),
+        _LIBCUDACXX_ASSERT(__bytes <= __max_size(),
             "do_deallocate called for size which exceeds the maximum allocation size");
         size_t __s = __aligned_allocation_size(__bytes, _MaxAlign) / _MaxAlign;
         __alloc_.deallocate((_ValueType*)__p, __s);
@@ -401,7 +401,7 @@ private:
         return __p  ? __alloc_ == __p->__alloc_ : false;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t __max_size() const _NOEXCEPT {
         return numeric_limits<size_t>::max() - _MaxAlign;
     }
@@ -412,8 +412,8 @@ using resource_adaptor = __resource_adaptor_imp<
     typename allocator_traits<_Alloc>::template rebind_alloc<char>
   >;
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif /* _LIBCPP_EXPERIMENTAL_MEMORY_RESOURCE */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_MEMORY_RESOURCE */

diff  --git a/libcxx/include/experimental/propagate_const b/libcxx/include/experimental/propagate_const
index 432635668e4e..5d70e68c4e6a 100644
--- a/libcxx/include/experimental/propagate_const
+++ b/libcxx/include/experimental/propagate_const
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST
-#define _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST
+#ifndef _LIBCUDACXX_EXPERIMENTAL_PROPAGATE_CONST
+#define _LIBCUDACXX_EXPERIMENTAL_PROPAGATE_CONST
 
 /*
     propagate_const synopsis
@@ -115,23 +115,23 @@
 #include <experimental/__config>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_V2
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_V2
 
 template <class _Tp>
 class propagate_const;
 
 template <class _Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 const _Up& get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
 
 template <class _Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 _Up& get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
 
 template <class _Tp>
@@ -151,25 +151,25 @@ public:
 
 private:
   template <class _Up>
-  static _LIBCPP_CONSTEXPR element_type* __get_pointer(_Up* __u)
+  static _LIBCUDACXX_CONSTEXPR element_type* __get_pointer(_Up* __u)
   {
     return __u;
   }
 
   template <class _Up>
-  static _LIBCPP_CONSTEXPR element_type* __get_pointer(_Up& __u)
+  static _LIBCUDACXX_CONSTEXPR element_type* __get_pointer(_Up& __u)
   {
     return __get_pointer(__u.get());
   }
 
   template <class _Up>
-  static _LIBCPP_CONSTEXPR const element_type* __get_pointer(const _Up* __u)
+  static _LIBCUDACXX_CONSTEXPR const element_type* __get_pointer(const _Up* __u)
   {
     return __u;
   }
 
   template <class _Up>
-  static _LIBCPP_CONSTEXPR const element_type* __get_pointer(const _Up& __u)
+  static _LIBCUDACXX_CONSTEXPR const element_type* __get_pointer(const _Up& __u)
   {
     return __get_pointer(__u.get());
   }
@@ -188,25 +188,25 @@ private:
 
 public:
 
-  template <class _Up> friend _LIBCPP_CONSTEXPR const _Up& ::_VSTD_LFTS_V2::get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
-  template <class _Up> friend _LIBCPP_CONSTEXPR _Up& ::_VSTD_LFTS_V2::get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
+  template <class _Up> friend _LIBCUDACXX_CONSTEXPR const _Up& ::_VSTD_LFTS_V2::get_underlying(const propagate_const<_Up>& __pu) _NOEXCEPT;
+  template <class _Up> friend _LIBCUDACXX_CONSTEXPR _Up& ::_VSTD_LFTS_V2::get_underlying(propagate_const<_Up>& __pu) _NOEXCEPT;
 
-  _LIBCPP_CONSTEXPR propagate_const() = default;
+  _LIBCUDACXX_CONSTEXPR propagate_const() = default;
 
   propagate_const(const propagate_const&) = delete;
 
-  _LIBCPP_CONSTEXPR propagate_const(propagate_const&&) = default;
+  _LIBCUDACXX_CONSTEXPR propagate_const(propagate_const&&) = default;
 
   template <class _Up, enable_if_t<!is_convertible<_Up, _Tp>::value &&
                                  is_constructible<_Tp, _Up&&>::value,bool> = true>
-  explicit _LIBCPP_CONSTEXPR propagate_const(propagate_const<_Up>&& __pu)
+  explicit _LIBCUDACXX_CONSTEXPR propagate_const(propagate_const<_Up>&& __pu)
       : __t_(std::move(_VSTD_LFTS_V2::get_underlying(__pu)))
   {
   }
 
   template <class _Up, enable_if_t<is_convertible<_Up&&, _Tp>::value &&
                                  is_constructible<_Tp, _Up&&>::value,bool> = false>
-  _LIBCPP_CONSTEXPR propagate_const(propagate_const<_Up>&& __pu)
+  _LIBCUDACXX_CONSTEXPR propagate_const(propagate_const<_Up>&& __pu)
       : __t_(std::move(_VSTD_LFTS_V2::get_underlying(__pu)))
   {
   }
@@ -214,7 +214,7 @@ public:
   template <class _Up, enable_if_t<!is_convertible<_Up&&, _Tp>::value &&
                                  is_constructible<_Tp, _Up&&>::value &&
                                  !__is_propagate_const<decay_t<_Up>>::value,bool> = true>
-  explicit _LIBCPP_CONSTEXPR propagate_const(_Up&& __u)
+  explicit _LIBCUDACXX_CONSTEXPR propagate_const(_Up&& __u)
       : __t_(std::forward<_Up>(__u))
   {
   }
@@ -222,267 +222,267 @@ public:
   template <class _Up, enable_if_t<is_convertible<_Up&&, _Tp>::value &&
                                  is_constructible<_Tp, _Up&&>::value &&
                                  !__is_propagate_const<decay_t<_Up>>::value,bool> = false>
-  _LIBCPP_CONSTEXPR propagate_const(_Up&& __u)
+  _LIBCUDACXX_CONSTEXPR propagate_const(_Up&& __u)
       : __t_(std::forward<_Up>(__u))
   {
   }
 
   propagate_const& operator=(const propagate_const&) = delete;
 
-  _LIBCPP_CONSTEXPR propagate_const& operator=(propagate_const&&) = default;
+  _LIBCUDACXX_CONSTEXPR propagate_const& operator=(propagate_const&&) = default;
 
   template <class _Up>
-  _LIBCPP_CONSTEXPR propagate_const& operator=(propagate_const<_Up>&& __pu)
+  _LIBCUDACXX_CONSTEXPR propagate_const& operator=(propagate_const<_Up>&& __pu)
   {
     __t_ = std::move(_VSTD_LFTS_V2::get_underlying(__pu));
     return *this;
   }
 
   template <class _Up, class _Vp = enable_if_t<!__is_propagate_const<decay_t<_Up>>::value>>
-  _LIBCPP_CONSTEXPR propagate_const& operator=(_Up&& __u)
+  _LIBCUDACXX_CONSTEXPR propagate_const& operator=(_Up&& __u)
   {
     __t_ = std::forward<_Up>(__u);
     return *this;
   }
 
-  _LIBCPP_CONSTEXPR const element_type* get() const
+  _LIBCUDACXX_CONSTEXPR const element_type* get() const
   {
     return __get_pointer(__t_);
   }
 
-  _LIBCPP_CONSTEXPR element_type* get()
+  _LIBCUDACXX_CONSTEXPR element_type* get()
   {
     return __get_pointer(__t_);
   }
 
-  explicit _LIBCPP_CONSTEXPR operator bool() const
+  explicit _LIBCUDACXX_CONSTEXPR operator bool() const
   {
     return get() != nullptr;
   }
 
-  _LIBCPP_CONSTEXPR const element_type* operator->() const
+  _LIBCUDACXX_CONSTEXPR const element_type* operator->() const
   {
     return get();
   }
 
   template <class _Tp_ = _Tp, class _Up = enable_if_t<is_convertible<
                                   const _Tp_, const element_type *>::value>>
-  _LIBCPP_CONSTEXPR operator const element_type *() const {
+  _LIBCUDACXX_CONSTEXPR operator const element_type *() const {
     return get();
   }
 
-  _LIBCPP_CONSTEXPR const element_type& operator*() const
+  _LIBCUDACXX_CONSTEXPR const element_type& operator*() const
   {
     return *get();
   }
 
-  _LIBCPP_CONSTEXPR element_type* operator->()
+  _LIBCUDACXX_CONSTEXPR element_type* operator->()
   {
     return get();
   }
 
   template <class _Tp_ = _Tp, class _Up = enable_if_t<
                                   is_convertible<_Tp_, element_type *>::value>>
-  _LIBCPP_CONSTEXPR operator element_type *() {
+  _LIBCUDACXX_CONSTEXPR operator element_type *() {
     return get();
   }
 
-  _LIBCPP_CONSTEXPR element_type& operator*()
+  _LIBCUDACXX_CONSTEXPR element_type& operator*()
   {
     return *get();
   }
 
-  _LIBCPP_CONSTEXPR void swap(propagate_const& __pt) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
+  _LIBCUDACXX_CONSTEXPR void swap(propagate_const& __pt) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
   {
-    using _VSTD::swap;
+    using _CUDA_VSTD::swap;
     swap(__t_, __pt.__t_);
   }
 };
 
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, nullptr_t)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, nullptr_t)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) == nullptr;
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator==(nullptr_t, const propagate_const<_Tp>& __pt)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator==(nullptr_t, const propagate_const<_Tp>& __pt)
 {
   return nullptr == _VSTD_LFTS_V2::get_underlying(__pt);
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, nullptr_t)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, nullptr_t)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) != nullptr;
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator!=(nullptr_t, const propagate_const<_Tp>& __pt)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator!=(nullptr_t, const propagate_const<_Tp>& __pt)
 {
   return nullptr != _VSTD_LFTS_V2::get_underlying(__pt);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt,
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt,
                           const propagate_const<_Up>& __pu)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) == _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt,
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt,
                           const propagate_const<_Up>& __pu)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) != _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt,
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt,
                          const propagate_const<_Up>& __pu)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) < _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt,
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt,
                          const propagate_const<_Up>& __pu)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) > _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt,
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt,
                           const propagate_const<_Up>& __pu)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) <= _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt,
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt,
                           const propagate_const<_Up>& __pu)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) >= _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, const _Up& __u)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator==(const propagate_const<_Tp>& __pt, const _Up& __u)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) == __u;
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, const _Up& __u)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator!=(const propagate_const<_Tp>& __pt, const _Up& __u)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) != __u;
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt, const _Up& __u)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator<(const propagate_const<_Tp>& __pt, const _Up& __u)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) < __u;
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt, const _Up& __u)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator>(const propagate_const<_Tp>& __pt, const _Up& __u)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) > __u;
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt, const _Up& __u)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator<=(const propagate_const<_Tp>& __pt, const _Up& __u)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) <= __u;
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt, const _Up& __u)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator>=(const propagate_const<_Tp>& __pt, const _Up& __u)
 {
   return _VSTD_LFTS_V2::get_underlying(__pt) >= __u;
 }
 
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator==(const _Tp& __t, const propagate_const<_Up>& __pu)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator==(const _Tp& __t, const propagate_const<_Up>& __pu)
 {
   return __t == _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator!=(const _Tp& __t, const propagate_const<_Up>& __pu)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator!=(const _Tp& __t, const propagate_const<_Up>& __pu)
 {
   return __t != _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator<(const _Tp& __t, const propagate_const<_Up>& __pu)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator<(const _Tp& __t, const propagate_const<_Up>& __pu)
 {
   return __t < _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator>(const _Tp& __t, const propagate_const<_Up>& __pu)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator>(const _Tp& __t, const propagate_const<_Up>& __pu)
 {
   return __t > _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator<=(const _Tp& __t, const propagate_const<_Up>& __pu)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator<=(const _Tp& __t, const propagate_const<_Up>& __pu)
 {
   return __t <= _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR bool operator>=(const _Tp& __t, const propagate_const<_Up>& __pu)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR bool operator>=(const _Tp& __t, const propagate_const<_Up>& __pu)
 {
   return __t >= _VSTD_LFTS_V2::get_underlying(__pu);
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR void swap(propagate_const<_Tp>& __pc1, propagate_const<_Tp>& __pc2) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
+_LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR void swap(propagate_const<_Tp>& __pc1, propagate_const<_Tp>& __pc2) _NOEXCEPT_(__is_nothrow_swappable<_Tp>::value)
 {
   __pc1.swap(__pc2);
 }
 
 template <class _Tp>
-_LIBCPP_CONSTEXPR const _Tp& get_underlying(const propagate_const<_Tp>& __pt) _NOEXCEPT
+_LIBCUDACXX_CONSTEXPR const _Tp& get_underlying(const propagate_const<_Tp>& __pt) _NOEXCEPT
 {
   return __pt.__t_;
 }
 
 template <class _Tp>
-_LIBCPP_CONSTEXPR _Tp& get_underlying(propagate_const<_Tp>& __pt) _NOEXCEPT
+_LIBCUDACXX_CONSTEXPR _Tp& get_underlying(propagate_const<_Tp>& __pt) _NOEXCEPT
 {
   return __pt.__t_;
 }
 
-_LIBCPP_END_NAMESPACE_LFTS_V2
+_LIBCUDACXX_END_NAMESPACE_LFTS_V2
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp>
 struct hash<experimental::fundamentals_v2::propagate_const<_Tp>>
@@ -574,7 +574,7 @@ struct greater_equal<experimental::fundamentals_v2::propagate_const<_Tp>>
   }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 11
-#endif // _LIBCPP_EXPERIMENTAL_PROPAGATE_CONST
+#endif // _LIBCUDACXX_STD_VER > 11
+#endif // _LIBCUDACXX_EXPERIMENTAL_PROPAGATE_CONST

diff  --git a/libcxx/include/experimental/regex b/libcxx/include/experimental/regex
index 4dc2bbae4510..0512f99b0b98 100644
--- a/libcxx/include/experimental/regex
+++ b/libcxx/include/experimental/regex
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_REGEX
-#define _LIBCPP_EXPERIMENTAL_REGEX
+#ifndef _LIBCUDACXX_EXPERIMENTAL_REGEX
+#define _LIBCUDACXX_EXPERIMENTAL_REGEX
 
 /*
     experimental/regex synopsis
@@ -42,24 +42,24 @@ namespace pmr {
 #include <experimental/string>
 #include <regex>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 template <class _BiDirIter>
 using match_results =
-    _VSTD::match_results<_BiDirIter,
-        polymorphic_allocator<_VSTD::sub_match<_BiDirIter>>>;
+    _CUDA_VSTD::match_results<_BiDirIter,
+        polymorphic_allocator<_CUDA_VSTD::sub_match<_BiDirIter>>>;
 
 typedef match_results<const char*> cmatch;
 typedef match_results<_VSTD_LFTS_PMR::string::const_iterator> smatch;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef match_results<const wchar_t*> wcmatch;
 typedef match_results<_VSTD_LFTS_PMR::wstring::const_iterator> wsmatch;
 #endif
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR
 
-#endif /* _LIBCPP_EXPERIMENTAL_REGEX */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_REGEX */

diff  --git a/libcxx/include/experimental/set b/libcxx/include/experimental/set
index e2e75e35448b..b25ff803a5f9 100644
--- a/libcxx/include/experimental/set
+++ b/libcxx/include/experimental/set
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_SET
-#define _LIBCPP_EXPERIMENTAL_SET
+#ifndef _LIBCUDACXX_EXPERIMENTAL_SET
+#define _LIBCUDACXX_EXPERIMENTAL_SET
 
 /*
     experimental/set synopsis
@@ -39,20 +39,20 @@ namespace pmr {
 #include <experimental/memory_resource>
 #include <set>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 template <class _Value, class  _Compare = less<_Value>>
-using set = _VSTD::set<_Value, _Compare,
+using set = _CUDA_VSTD::set<_Value, _Compare,
                         polymorphic_allocator<_Value>>;
 
 template <class _Value, class  _Compare = less<_Value>>
-using multiset = _VSTD::multiset<_Value, _Compare,
+using multiset = _CUDA_VSTD::multiset<_Value, _Compare,
                         polymorphic_allocator<_Value>>;
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR
 
-#endif /* _LIBCPP_EXPERIMENTAL_SET */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_SET */

diff  --git a/libcxx/include/experimental/simd b/libcxx/include/experimental/simd
index f77ce59bb269..cb872f30d273 100644
--- a/libcxx/include/experimental/simd
+++ b/libcxx/include/experimental/simd
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_EXPERIMENTAL_SIMD
-#define _LIBCPP_EXPERIMENTAL_SIMD
+#ifndef _LIBCUDACXX_EXPERIMENTAL_SIMD
+#define _LIBCUDACXX_EXPERIMENTAL_SIMD
 
 /*
     experimental/simd synopsis
@@ -656,21 +656,21 @@ public:
 #include <experimental/__config>
 #include <tuple>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #  include <functional>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD
+_LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 
 enum class _StorageKind {
   _Scalar,
@@ -718,7 +718,7 @@ public:
   }
 };
 
-#ifndef _LIBCPP_HAS_NO_VECTOR_EXTENSION
+#ifndef _LIBCUDACXX_HAS_NO_VECTOR_EXTENSION
 
 constexpr size_t __floor_pow_of_2(size_t __val) {
   return ((__val - 1) & __val) == 0 ? __val
@@ -731,73 +731,73 @@ constexpr size_t __ceil_pow_of_2(size_t __val) {
 
 template <class _Tp, size_t __bytes>
 struct __vec_ext_traits {
-#if !defined(_LIBCPP_COMPILER_CLANG_BASED)
+#if !defined(_LIBCUDACXX_COMPILER_CLANG_BASED)
   typedef _Tp type __attribute__((vector_size(__ceil_pow_of_2(__bytes))));
 #endif
 };
 
-#if defined(_LIBCPP_COMPILER_CLANG_BASED)
-#define _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, _NUM_ELEMENT)                        \
+#if defined(_LIBCUDACXX_COMPILER_CLANG_BASED)
+#define _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, _NUM_ELEMENT)                        \
   template <>                                                                  \
   struct __vec_ext_traits<_TYPE, sizeof(_TYPE) * _NUM_ELEMENT> {               \
     using type =                                                               \
         _TYPE __attribute__((vector_size(sizeof(_TYPE) * _NUM_ELEMENT)));      \
   }
 
-#define _LIBCPP_SPECIALIZE_VEC_EXT_32(_TYPE)                                   \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 1);                                        \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 2);                                        \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 3);                                        \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 4);                                        \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 5);                                        \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 6);                                        \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 7);                                        \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 8);                                        \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 9);                                        \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 10);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 11);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 12);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 13);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 14);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 15);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 16);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 17);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 18);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 19);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 20);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 21);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 22);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 23);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 24);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 25);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 26);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 27);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 28);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 29);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 30);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 31);                                       \
-  _LIBCPP_SPECIALIZE_VEC_EXT(_TYPE, 32)
-
-_LIBCPP_SPECIALIZE_VEC_EXT_32(char);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(char16_t);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(char32_t);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(wchar_t);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(signed char);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(signed short);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(signed int);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(signed long);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(signed long long);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(unsigned char);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(unsigned short);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(unsigned int);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(unsigned long);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(unsigned long long);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(float);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(double);
-_LIBCPP_SPECIALIZE_VEC_EXT_32(long double);
-
-#undef _LIBCPP_SPECIALIZE_VEC_EXT_32
-#undef _LIBCPP_SPECIALIZE_VEC_EXT
+#define _LIBCUDACXX_SPECIALIZE_VEC_EXT_32(_TYPE)                                   \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 1);                                        \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 2);                                        \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 3);                                        \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 4);                                        \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 5);                                        \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 6);                                        \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 7);                                        \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 8);                                        \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 9);                                        \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 10);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 11);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 12);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 13);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 14);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 15);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 16);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 17);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 18);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 19);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 20);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 21);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 22);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 23);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 24);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 25);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 26);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 27);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 28);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 29);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 30);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 31);                                       \
+  _LIBCUDACXX_SPECIALIZE_VEC_EXT(_TYPE, 32)
+
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(char);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(char16_t);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(char32_t);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(wchar_t);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(signed char);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(signed short);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(signed int);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(signed long);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(signed long long);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(unsigned char);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(unsigned short);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(unsigned int);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(unsigned long);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(unsigned long long);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(float);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(double);
+_LIBCUDACXX_SPECIALIZE_VEC_EXT_32(long double);
+
+#undef _LIBCUDACXX_SPECIALIZE_VEC_EXT_32
+#undef _LIBCUDACXX_SPECIALIZE_VEC_EXT
 #endif
 
 template <class _Tp, int __num_element>
@@ -820,7 +820,7 @@ public:
   }
 };
 
-#endif // _LIBCPP_HAS_NO_VECTOR_EXTENSION
+#endif // _LIBCUDACXX_HAS_NO_VECTOR_EXTENSION
 
 template <class _Vp, class _Tp, class _Abi>
 class __simd_reference {
@@ -960,8 +960,8 @@ constexpr bool __vectorizable() {
          !std::is_volatile<_Tp>::value && !std::is_same<_Tp, bool>::value;
 }
 
-_LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD
-_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD_ABI
+_LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL_SIMD
+_LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD_ABI
 
 using scalar = __simd_abi<_StorageKind::_Scalar, 1>;
 
@@ -974,18 +974,18 @@ inline constexpr size_t max_fixed_size = 32;
 template <class _Tp>
 using compatible = fixed_size<16 / sizeof(_Tp)>;
 
-#ifndef _LIBCPP_HAS_NO_VECTOR_EXTENSION
+#ifndef _LIBCUDACXX_HAS_NO_VECTOR_EXTENSION
 template <class _Tp>
 using native = __simd_abi<_StorageKind::_VecExt,
-                          _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES / sizeof(_Tp)>;
+                          _LIBCUDACXX_NATIVE_SIMD_WIDTH_IN_BYTES / sizeof(_Tp)>;
 #else
 template <class _Tp>
 using native =
-    fixed_size<_Tp, _LIBCPP_NATIVE_SIMD_WIDTH_IN_BYTES / sizeof(_Tp)>;
-#endif // _LIBCPP_HAS_NO_VECTOR_EXTENSION
+    fixed_size<_Tp, _LIBCUDACXX_NATIVE_SIMD_WIDTH_IN_BYTES / sizeof(_Tp)>;
+#endif // _LIBCUDACXX_HAS_NO_VECTOR_EXTENSION
 
-_LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD_ABI
-_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD
+_LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL_SIMD_ABI
+_LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD
 
 template <class _Tp, class _Abi = simd_abi::compatible<_Tp>>
 class simd;
@@ -1573,10 +1573,10 @@ public:
 #endif
 };
 
-#endif // _LIBCPP_STD_VER >= 17
+#endif // _LIBCUDACXX_STD_VER >= 17
 
-_LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD
+_LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL_SIMD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif /* _LIBCPP_EXPERIMENTAL_SIMD */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_SIMD */

diff  --git a/libcxx/include/experimental/string b/libcxx/include/experimental/string
index c795d685d735..c2a3e3a3a093 100644
--- a/libcxx/include/experimental/string
+++ b/libcxx/include/experimental/string
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_STRING
-#define _LIBCPP_EXPERIMENTAL_STRING
+#ifndef _LIBCUDACXX_EXPERIMENTAL_STRING
+#define _LIBCUDACXX_EXPERIMENTAL_STRING
 
 /*
     experimental/string synopsis
@@ -43,23 +43,23 @@ namespace pmr {
 #include <experimental/memory_resource>
 #include <string>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 template <class _CharT, class _Traits = char_traits<_CharT>>
 using basic_string =
-    _VSTD::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>;
+    _CUDA_VSTD::basic_string<_CharT, _Traits, polymorphic_allocator<_CharT>>;
 
 typedef basic_string<char> string;
 typedef basic_string<char16_t> u16string;
 typedef basic_string<char32_t> u32string;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef basic_string<wchar_t> wstring;
 #endif
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR
 
-#endif /* _LIBCPP_EXPERIMENTAL_STRING */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_STRING */

diff  --git a/libcxx/include/experimental/type_traits b/libcxx/include/experimental/type_traits
index dd4c53963640..f9144fbdcada 100644
--- a/libcxx/include/experimental/type_traits
+++ b/libcxx/include/experimental/type_traits
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_TYPE_TRAITS
-#define _LIBCPP_EXPERIMENTAL_TYPE_TRAITS
+#ifndef _LIBCUDACXX_EXPERIMENTAL_TYPE_TRAITS
+#define _LIBCUDACXX_EXPERIMENTAL_TYPE_TRAITS
 
 /**
     experimental/type_traits synopsis
@@ -71,30 +71,30 @@ inline namespace fundamentals_v1 {
 #include <__assert> // all public C++ headers provide the assertion handler
 #include <experimental/__config>
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 
 #include <initializer_list>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS
 
 // 3.3.2, Other type transformations
 /*
 template <class>
-class _LIBCPP_TEMPLATE_VIS raw_invocation_type;
+class _LIBCUDACXX_TEMPLATE_VIS raw_invocation_type;
 
 template <class _Fn, class ..._Args>
-class _LIBCPP_TEMPLATE_VIS raw_invocation_type<_Fn(_Args...)>;
+class _LIBCUDACXX_TEMPLATE_VIS raw_invocation_type<_Fn(_Args...)>;
 
 template <class>
-class _LIBCPP_TEMPLATE_VIS invokation_type;
+class _LIBCUDACXX_TEMPLATE_VIS invokation_type;
 
 template <class _Fn, class ..._Args>
-class _LIBCPP_TEMPLATE_VIS invokation_type<_Fn(_Args...)>;
+class _LIBCUDACXX_TEMPLATE_VIS invokation_type<_Fn(_Args...)>;
 
 template <class _Tp>
 using invokation_type_t = typename invokation_type<_Tp>::type;
@@ -130,7 +130,7 @@ template <template<class...> class _Op, class... _Args>
 template <template<class...> class _Op, class... _Args>
   using detected_t = typename _DETECTOR<nonesuch, void, _Op, _Args...>::type;
 template <template<class...> class _Op, class... _Args>
-  _LIBCPP_CONSTEXPR bool is_detected_v = is_detected<_Op, _Args...>::value;
+  _LIBCUDACXX_CONSTEXPR bool is_detected_v = is_detected<_Op, _Args...>::value;
 
 template <class Default, template<class...> class _Op, class... _Args>
   using detected_or = _DETECTOR<Default, void, _Op, _Args...>;
@@ -140,16 +140,16 @@ template <class Default, template<class...> class _Op, class... _Args>
 template <class Expected, template<class...> class _Op, class... _Args>
   using is_detected_exact = is_same<Expected, detected_t<_Op, _Args...>>;
 template <class Expected, template<class...> class _Op, class... _Args>
-  _LIBCPP_CONSTEXPR bool is_detected_exact_v = is_detected_exact<Expected, _Op, _Args...>::value;
+  _LIBCUDACXX_CONSTEXPR bool is_detected_exact_v = is_detected_exact<Expected, _Op, _Args...>::value;
 
 template <class To, template<class...> class _Op, class... _Args>
   using is_detected_convertible = is_convertible<detected_t<_Op, _Args...>, To>;
 template <class To, template<class...> class _Op, class... _Args>
-  _LIBCPP_CONSTEXPR bool is_detected_convertible_v = is_detected_convertible<To, _Op, _Args...>::value;
+  _LIBCUDACXX_CONSTEXPR bool is_detected_convertible_v = is_detected_convertible<To, _Op, _Args...>::value;
 
 
-_LIBCPP_END_NAMESPACE_LFTS
+_LIBCUDACXX_END_NAMESPACE_LFTS
 
-#endif /* _LIBCPP_STD_VER > 11 */
+#endif /* _LIBCUDACXX_STD_VER > 11 */
 
-#endif /* _LIBCPP_EXPERIMENTAL_TYPE_TRAITS */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_TYPE_TRAITS */

diff  --git a/libcxx/include/experimental/unordered_map b/libcxx/include/experimental/unordered_map
index 636d31bdc557..23e2d9e68d57 100644
--- a/libcxx/include/experimental/unordered_map
+++ b/libcxx/include/experimental/unordered_map
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_UNORDERED_MAP
-#define _LIBCPP_EXPERIMENTAL_UNORDERED_MAP
+#ifndef _LIBCUDACXX_EXPERIMENTAL_UNORDERED_MAP
+#define _LIBCUDACXX_EXPERIMENTAL_UNORDERED_MAP
 
 /*
     experimental/unordered_map synopsis
@@ -45,7 +45,7 @@ namespace pmr {
 #include <experimental/memory_resource>
 #include <unordered_map>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #  include <array>
 #  include <bit>
@@ -53,22 +53,22 @@ namespace pmr {
 #  include <vector>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 template <class _Key, class _Value,
           class _Hash = hash<_Key>, class _Pred = equal_to<_Key>>
-using unordered_map = _VSTD::unordered_map<_Key, _Value, _Hash, _Pred,
+using unordered_map = _CUDA_VSTD::unordered_map<_Key, _Value, _Hash, _Pred,
                         polymorphic_allocator<pair<const _Key, _Value>>>;
 
 template <class _Key, class _Value,
           class _Hash = hash<_Key>, class _Pred = equal_to<_Key>>
-using unordered_multimap = _VSTD::unordered_multimap<_Key, _Value, _Hash, _Pred,
+using unordered_multimap = _CUDA_VSTD::unordered_multimap<_Key, _Value, _Hash, _Pred,
                         polymorphic_allocator<pair<const _Key, _Value>>>;
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR
 
-#endif /* _LIBCPP_EXPERIMENTAL_UNORDERED_MAP */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_UNORDERED_MAP */

diff  --git a/libcxx/include/experimental/unordered_set b/libcxx/include/experimental/unordered_set
index 509f3ec1044e..0f5d59c7ede7 100644
--- a/libcxx/include/experimental/unordered_set
+++ b/libcxx/include/experimental/unordered_set
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_UNORDERED_SET
-#define _LIBCPP_EXPERIMENTAL_UNORDERED_SET
+#ifndef _LIBCUDACXX_EXPERIMENTAL_UNORDERED_SET
+#define _LIBCUDACXX_EXPERIMENTAL_UNORDERED_SET
 
 /*
     experimental/unordered_set synopsis
@@ -39,22 +39,22 @@ namespace pmr {
 #include <experimental/memory_resource>
 #include <unordered_set>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 template <class _Value,
           class _Hash = hash<_Value>, class _Pred = equal_to<_Value>>
-using unordered_set = _VSTD::unordered_set<_Value, _Hash, _Pred,
+using unordered_set = _CUDA_VSTD::unordered_set<_Value, _Hash, _Pred,
                         polymorphic_allocator<_Value>>;
 
 template <class _Value,
           class _Hash = hash<_Value>, class _Pred = equal_to<_Value>>
-using unordered_multiset = _VSTD::unordered_multiset<_Value, _Hash, _Pred,
+using unordered_multiset = _CUDA_VSTD::unordered_multiset<_Value, _Hash, _Pred,
                         polymorphic_allocator<_Value>>;
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR
 
-#endif /* _LIBCPP_EXPERIMENTAL_UNORDERED_SET */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_UNORDERED_SET */

diff  --git a/libcxx/include/experimental/utility b/libcxx/include/experimental/utility
index 576b8be46357..54c9d327f125 100644
--- a/libcxx/include/experimental/utility
+++ b/libcxx/include/experimental/utility
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_UTILITY
-#define _LIBCPP_EXPERIMENTAL_UTILITY
+#ifndef _LIBCUDACXX_EXPERIMENTAL_UTILITY
+#define _LIBCUDACXX_EXPERIMENTAL_UTILITY
 
 /*
     experimental/utility synopsis
@@ -34,14 +34,14 @@ inline namespace fundamentals_v1 {
 #include <experimental/__config>
 #include <utility>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS
 
-  struct _LIBCPP_TEMPLATE_VIS erased_type { };
+  struct _LIBCUDACXX_TEMPLATE_VIS erased_type { };
 
-_LIBCPP_END_NAMESPACE_LFTS
+_LIBCUDACXX_END_NAMESPACE_LFTS
 
-#endif /* _LIBCPP_EXPERIMENTAL_UTILITY */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_UTILITY */

diff  --git a/libcxx/include/experimental/vector b/libcxx/include/experimental/vector
index 97c51c830c4a..690f44f227ce 100644
--- a/libcxx/include/experimental/vector
+++ b/libcxx/include/experimental/vector
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXPERIMENTAL_VECTOR
-#define _LIBCPP_EXPERIMENTAL_VECTOR
+#ifndef _LIBCUDACXX_EXPERIMENTAL_VECTOR
+#define _LIBCUDACXX_EXPERIMENTAL_VECTOR
 
 /*
     experimental/vector synopsis
@@ -34,15 +34,15 @@ namespace pmr {
 #include <experimental/memory_resource>
 #include <vector>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 template <class _ValueT>
-using vector = _VSTD::vector<_ValueT, polymorphic_allocator<_ValueT>>;
+using vector = _CUDA_VSTD::vector<_ValueT, polymorphic_allocator<_ValueT>>;
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR
 
-#endif /* _LIBCPP_EXPERIMENTAL_VECTOR */
+#endif /* _LIBCUDACXX_EXPERIMENTAL_VECTOR */

diff  --git a/libcxx/include/ext/__hash b/libcxx/include/ext/__hash
index 0e6c2cc05b52..81b96e82158b 100644
--- a/libcxx/include/ext/__hash
+++ b/libcxx/include/ext/__hash
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_EXT_HASH
-#define _LIBCPP_EXT_HASH
+#ifndef _LIBCUDACXX_EXT_HASH
+#define _LIBCUDACXX_EXT_HASH
 
 #  pragma GCC system_header
 
@@ -18,112 +18,112 @@
 
 namespace __gnu_cxx {
 
-template <typename _Tp> struct _LIBCPP_TEMPLATE_VIS hash { };
+template <typename _Tp> struct _LIBCUDACXX_TEMPLATE_VIS hash { };
 
-template <> struct _LIBCPP_TEMPLATE_VIS hash<const char*>
+template <> struct _LIBCUDACXX_TEMPLATE_VIS hash<const char*>
  : public std::__unary_function<const char*, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const char *__c) const _NOEXCEPT
     {
         return std::__do_string_hash(__c, __c + strlen(__c));
     }
 };
 
-template <> struct _LIBCPP_TEMPLATE_VIS hash<char *>
+template <> struct _LIBCUDACXX_TEMPLATE_VIS hash<char *>
  : public std::__unary_function<char*, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(char *__c) const _NOEXCEPT
     {
         return std::__do_string_hash<const char *>(__c, __c + strlen(__c));
     }
 };
 
-template <> struct _LIBCPP_TEMPLATE_VIS hash<char>
+template <> struct _LIBCUDACXX_TEMPLATE_VIS hash<char>
  : public std::__unary_function<char, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(char __c) const _NOEXCEPT
     {
         return __c;
     }
 };
 
-template <> struct _LIBCPP_TEMPLATE_VIS hash<signed char>
+template <> struct _LIBCUDACXX_TEMPLATE_VIS hash<signed char>
  : public std::__unary_function<signed char, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(signed char __c) const _NOEXCEPT
     {
         return __c;
     }
 };
 
-template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned char>
+template <> struct _LIBCUDACXX_TEMPLATE_VIS hash<unsigned char>
  : public std::__unary_function<unsigned char, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(unsigned char __c) const _NOEXCEPT
     {
         return __c;
     }
 };
 
-template <> struct _LIBCPP_TEMPLATE_VIS hash<short>
+template <> struct _LIBCUDACXX_TEMPLATE_VIS hash<short>
  : public std::__unary_function<short, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(short __c) const _NOEXCEPT
     {
         return __c;
     }
 };
 
-template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned short>
+template <> struct _LIBCUDACXX_TEMPLATE_VIS hash<unsigned short>
  : public std::__unary_function<unsigned short, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(unsigned short __c) const _NOEXCEPT
     {
         return __c;
     }
 };
 
-template <> struct _LIBCPP_TEMPLATE_VIS hash<int>
+template <> struct _LIBCUDACXX_TEMPLATE_VIS hash<int>
     : public std::__unary_function<int, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(int __c) const _NOEXCEPT
     {
         return __c;
     }
 };
 
-template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned int>
+template <> struct _LIBCUDACXX_TEMPLATE_VIS hash<unsigned int>
     : public std::__unary_function<unsigned int, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(unsigned int __c) const _NOEXCEPT
     {
         return __c;
     }
 };
 
-template <> struct _LIBCPP_TEMPLATE_VIS hash<long>
+template <> struct _LIBCUDACXX_TEMPLATE_VIS hash<long>
     : public std::__unary_function<long, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(long __c) const _NOEXCEPT
     {
         return __c;
     }
 };
 
-template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
+template <> struct _LIBCUDACXX_TEMPLATE_VIS hash<unsigned long>
     : public std::__unary_function<unsigned long, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(unsigned long __c) const _NOEXCEPT
     {
         return __c;
@@ -131,4 +131,4 @@ template <> struct _LIBCPP_TEMPLATE_VIS hash<unsigned long>
 };
 } // namespace __gnu_cxx
 
-#endif // _LIBCPP_EXT_HASH
+#endif // _LIBCUDACXX_EXT_HASH

diff  --git a/libcxx/include/ext/hash_map b/libcxx/include/ext/hash_map
index a581d5c550c4..393671ce9632 100644
--- a/libcxx/include/ext/hash_map
+++ b/libcxx/include/ext/hash_map
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_HASH_MAP
-#define _LIBCPP_HASH_MAP
+#ifndef _LIBCUDACXX_HASH_MAP
+#define _LIBCUDACXX_HASH_MAP
 
 /*
 
@@ -210,38 +210,38 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
 #include <stdexcept>
 #include <type_traits>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <iterator>
 #endif
 
 #if defined(__DEPRECATED) && __DEPRECATED
-#if defined(_LIBCPP_WARNING)
-    _LIBCPP_WARNING("Use of the header <ext/hash_map> is deprecated.  Migrate to <unordered_map>")
+#if defined(_LIBCUDACXX_WARNING)
+    _LIBCUDACXX_WARNING("Use of the header <ext/hash_map> is deprecated.  Migrate to <unordered_map>")
 #else
 #   warning Use of the header <ext/hash_map> is deprecated.  Migrate to <unordered_map>
 #endif
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 namespace __gnu_cxx {
 
 template <class _Tp, class _Hash,
-          bool = std::is_empty<_Hash>::value && !std::__libcpp_is_final<_Hash>::value
+          bool = std::is_empty<_Hash>::value && !std::__LIBCUDACXX_is_final<_Hash>::value
         >
 class __hash_map_hasher
     : private _Hash
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY __hash_map_hasher() : _Hash() {}
-    _LIBCPP_INLINE_VISIBILITY __hash_map_hasher(const _Hash& __h) : _Hash(__h) {}
-    _LIBCPP_INLINE_VISIBILITY const _Hash& hash_function() const {return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_hasher() : _Hash() {}
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_hasher(const _Hash& __h) : _Hash(__h) {}
+    _LIBCUDACXX_INLINE_VISIBILITY const _Hash& hash_function() const {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const _Tp& __x) const
         {return static_cast<const _Hash&>(*this)(__x.first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const typename _Tp::first_type& __x) const
         {return static_cast<const _Hash&>(*this)(__x);}
 };
@@ -251,37 +251,37 @@ class __hash_map_hasher<_Tp, _Hash, false>
 {
     _Hash __hash_;
 public:
-    _LIBCPP_INLINE_VISIBILITY __hash_map_hasher() : __hash_() {}
-    _LIBCPP_INLINE_VISIBILITY __hash_map_hasher(const _Hash& __h) : __hash_(__h) {}
-    _LIBCPP_INLINE_VISIBILITY const _Hash& hash_function() const {return __hash_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_hasher() : __hash_() {}
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_hasher(const _Hash& __h) : __hash_(__h) {}
+    _LIBCUDACXX_INLINE_VISIBILITY const _Hash& hash_function() const {return __hash_;}
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const _Tp& __x) const
         {return __hash_(__x.first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const typename _Tp::first_type& __x) const
         {return __hash_(__x);}
 };
 
 template <class _Tp, class _Pred,
-          bool = std::is_empty<_Pred>::value && !std::__libcpp_is_final<_Pred>::value
+          bool = std::is_empty<_Pred>::value && !std::__LIBCUDACXX_is_final<_Pred>::value
          >
 class __hash_map_equal
     : private _Pred
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY __hash_map_equal() : _Pred() {}
-    _LIBCPP_INLINE_VISIBILITY __hash_map_equal(const _Pred& __p) : _Pred(__p) {}
-    _LIBCPP_INLINE_VISIBILITY const _Pred& key_eq() const {return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_equal() : _Pred() {}
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_equal(const _Pred& __p) : _Pred(__p) {}
+    _LIBCUDACXX_INLINE_VISIBILITY const _Pred& key_eq() const {return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const _Tp& __y) const
         {return static_cast<const _Pred&>(*this)(__x.first, __y.first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const typename _Tp::first_type& __x, const _Tp& __y) const
         {return static_cast<const _Pred&>(*this)(__x, __y.first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const typename _Tp::first_type& __y) const
         {return static_cast<const _Pred&>(*this)(__x.first, __y);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const typename _Tp::first_type& __x,
                     const typename _Tp::first_type& __y) const
         {return static_cast<const _Pred&>(*this)(__x, __y);}
@@ -292,19 +292,19 @@ class __hash_map_equal<_Tp, _Pred, false>
 {
     _Pred __pred_;
 public:
-    _LIBCPP_INLINE_VISIBILITY __hash_map_equal() : __pred_() {}
-    _LIBCPP_INLINE_VISIBILITY __hash_map_equal(const _Pred& __p) : __pred_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY const _Pred& key_eq() const {return __pred_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_equal() : __pred_() {}
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_equal(const _Pred& __p) : __pred_(__p) {}
+    _LIBCUDACXX_INLINE_VISIBILITY const _Pred& key_eq() const {return __pred_;}
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const _Tp& __y) const
         {return __pred_(__x.first, __y.first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const typename _Tp::first_type& __x, const _Tp& __y) const
         {return __pred_(__x, __y.first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Tp& __x, const typename _Tp::first_type& __y) const
         {return __pred_(__x.first, __y);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const typename _Tp::first_type& __x,
                     const typename _Tp::first_type& __y) const
         {return __pred_(__x, __y);}
@@ -331,15 +331,15 @@ public:
     __hash_map_node_destructor(__hash_map_node_destructor const&) = default;
     __hash_map_node_destructor& operator=(const __hash_map_node_destructor&) = delete;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __hash_map_node_destructor(allocator_type& __na)
         : __na_(__na),
           __first_constructed(false),
           __second_constructed(false)
         {}
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_node_destructor(std::__hash_node_destructor<allocator_type>&& __x)
         : __na_(__x.__na_),
           __first_constructed(__x.__value_constructed),
@@ -347,8 +347,8 @@ public:
         {
             __x.__value_constructed = false;
         }
-#else  // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#else  // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_node_destructor(const std::__hash_node_destructor<allocator_type>& __x)
         : __na_(__x.__na_),
           __first_constructed(__x.__value_constructed),
@@ -356,22 +356,22 @@ public:
         {
             const_cast<bool&>(__x.__value_constructed) = false;
         }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator()(pointer __p)
     {
         if (__second_constructed)
-            __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.second));
+            __alloc_traits::destroy(__na_, _CUDA_VSTD::addressof(__p->__value_.second));
         if (__first_constructed)
-            __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.first));
+            __alloc_traits::destroy(__na_, _CUDA_VSTD::addressof(__p->__value_.first));
         if (__p)
             __alloc_traits::deallocate(__na_, __p, 1);
     }
 };
 
 template <class _HashIterator>
-class _LIBCPP_TEMPLATE_VIS __hash_map_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __hash_map_iterator
 {
     _HashIterator __i_;
 
@@ -385,15 +385,15 @@ public:
     typedef typename std::__rebind_pointer<typename _HashIterator::pointer, value_type>::type
         pointer;
 
-    _LIBCPP_INLINE_VISIBILITY __hash_map_iterator() {}
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_iterator() {}
 
-    _LIBCPP_INLINE_VISIBILITY __hash_map_iterator(_HashIterator __i) : __i_(__i) {}
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_iterator(_HashIterator __i) : __i_(__i) {}
 
-    _LIBCPP_INLINE_VISIBILITY reference operator*() const {return *operator->();}
-    _LIBCPP_INLINE_VISIBILITY pointer operator->() const {return (pointer)__i_.operator->();}
+    _LIBCUDACXX_INLINE_VISIBILITY reference operator*() const {return *operator->();}
+    _LIBCUDACXX_INLINE_VISIBILITY pointer operator->() const {return (pointer)__i_.operator->();}
 
-    _LIBCPP_INLINE_VISIBILITY __hash_map_iterator& operator++() {++__i_; return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_iterator& operator++() {++__i_; return *this;}
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_iterator operator++(int)
     {
         __hash_map_iterator __t(*this);
@@ -401,22 +401,22 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
         {return __x.__i_ == __y.__i_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
         {return __x.__i_ != __y.__i_;}
 
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS hash_map;
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS hash_multimap;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS hash_map;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS hash_multimap;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_const_iterator;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_const_local_iterator;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_map_const_iterator;
 };
 
 template <class _HashIterator>
-class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __hash_map_const_iterator
 {
     _HashIterator __i_;
 
@@ -430,23 +430,23 @@ public:
     typedef typename std::__rebind_pointer<typename _HashIterator::pointer, const value_type>::type
         pointer;
 
-    _LIBCPP_INLINE_VISIBILITY __hash_map_const_iterator() {}
+    _LIBCUDACXX_INLINE_VISIBILITY __hash_map_const_iterator() {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_const_iterator(_HashIterator __i) : __i_(__i) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_const_iterator(
             __hash_map_iterator<typename _HashIterator::__non_const_iterator> __i)
                 : __i_(__i.__i_) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {return *operator->();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {return (pointer)__i_.operator->();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_const_iterator& operator++() {++__i_; return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_const_iterator operator++(int)
     {
         __hash_map_const_iterator __t(*this);
@@ -454,22 +454,22 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
         {return __x.__i_ == __y.__i_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
         {return __x.__i_ != __y.__i_;}
 
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS hash_map;
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS hash_multimap;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS hash_map;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS hash_multimap;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_const_iterator;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_const_local_iterator;
 };
 
 template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = std::equal_to<_Key>,
           class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS hash_map
+class _LIBCUDACXX_TEMPLATE_VIS hash_map
 {
 public:
     // types
@@ -512,7 +512,7 @@ public:
     typedef __hash_map_iterator<typename __table::iterator>       iterator;
     typedef __hash_map_const_iterator<typename __table::const_iterator> const_iterator;
 
-    _LIBCPP_INLINE_VISIBILITY hash_map() { }
+    _LIBCUDACXX_INLINE_VISIBILITY hash_map() { }
     explicit hash_map(size_type __n, const hasher& __hf = hasher(),
                            const key_equal& __eql = key_equal());
     hash_map(size_type __n, const hasher& __hf,
@@ -531,80 +531,80 @@ public:
                       const allocator_type& __a);
     hash_map(const hash_map& __u);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const
         {return allocator_type(__table_.__node_alloc());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool      empty() const {return __table_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const  {return __table_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const {return __table_.max_size();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       begin()        {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       end()          {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin()  const {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()    const {return __table_.end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     std::pair<iterator, bool> insert(const value_type& __x)
         {return __table_.__insert_unique(__x);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;}
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void insert(_InputIterator __first, _InputIterator __last);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void erase(const_iterator __p) {__table_.erase(__p.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k) {return __table_.__erase_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void erase(const_iterator __first, const_iterator __last)
         {__table_.erase(__first.__i_, __last.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() {__table_.clear();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(hash_map& __u) {__table_.swap(__u.__table_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hasher hash_funct() const
         {return __table_.hash_function().hash_function();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_equal key_eq() const
         {return __table_.key_eq().key_eq();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const key_type& __k)       {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     std::pair<iterator, iterator>             equal_range(const key_type& __k)
         {return __table_.__equal_range_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     std::pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
         {return __table_.__equal_range_unique(__k);}
 
     mapped_type& operator[](const key_type& __k);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_count() const {return __table_.bucket_count();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_bucket_count() const {return __table_.max_bucket_count();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type elems_in_bucket(size_type __n) const
         {return __table_.bucket_size(__n);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void resize(size_type __n) {__table_.__rehash_unique(__n);}
 
 private:
@@ -673,9 +673,9 @@ hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node(const key_type& __k)
 {
     __node_allocator& __na = __table_.__node_alloc();
     __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
-    __node_traits::construct(__na, _VSTD::addressof(__h->__value_.first), __k);
+    __node_traits::construct(__na, _CUDA_VSTD::addressof(__h->__value_.first), __k);
     __h.get_deleter().__first_constructed = true;
-    __node_traits::construct(__na, _VSTD::addressof(__h->__value_.second));
+    __node_traits::construct(__na, _CUDA_VSTD::addressof(__h->__value_.second));
     __h.get_deleter().__second_constructed = true;
     return __h;
 }
@@ -705,7 +705,7 @@ hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k)
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
      hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
@@ -733,7 +733,7 @@ operator==(const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
            const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
@@ -743,7 +743,7 @@ operator!=(const hash_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
 
 template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = std::equal_to<_Key>,
           class _Alloc = std::allocator<std::pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS hash_multimap
+class _LIBCUDACXX_TEMPLATE_VIS hash_multimap
 {
 public:
     // types
@@ -783,7 +783,7 @@ public:
     typedef __hash_map_iterator<typename __table::iterator>       iterator;
     typedef __hash_map_const_iterator<typename __table::const_iterator> const_iterator;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hash_multimap() { }
     explicit hash_multimap(size_type __n, const hasher& __hf = hasher(),
                                 const key_equal& __eql = key_equal());
@@ -803,77 +803,77 @@ public:
                       const allocator_type& __a);
     hash_multimap(const hash_multimap& __u);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const
         {return allocator_type(__table_.__node_alloc());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool      empty() const {return __table_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const  {return __table_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const {return __table_.max_size();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       begin()        {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       end()          {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin()  const {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()    const {return __table_.end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator, const value_type& __x) {return insert(__x);}
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void insert(_InputIterator __first, _InputIterator __last);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void erase(const_iterator __p) {__table_.erase(__p.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k) {return __table_.__erase_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void erase(const_iterator __first, const_iterator __last)
         {__table_.erase(__first.__i_, __last.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() {__table_.clear();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(hash_multimap& __u) {__table_.swap(__u.__table_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hasher hash_funct() const
         {return __table_.hash_function().hash_function();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_equal key_eq() const
         {return __table_.key_eq().key_eq();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const key_type& __k)       {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     std::pair<iterator, iterator>             equal_range(const key_type& __k)
         {return __table_.__equal_range_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     std::pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
         {return __table_.__equal_range_multi(__k);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_count() const {return __table_.bucket_count();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_bucket_count() const {return __table_.max_bucket_count();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type elems_in_bucket(size_type __n) const
         {return __table_.bucket_size(__n);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void resize(size_type __n) {__table_.__rehash_multi(__n);}
 };
 
@@ -945,7 +945,7 @@ hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
      hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
@@ -967,9 +967,9 @@ operator==(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
     {
         _EqRng __xeq = __x.equal_range(__i->first);
         _EqRng __yeq = __y.equal_range(__i->first);
-        if (_VSTD::distance(__xeq.first, __xeq.second) !=
-            _VSTD::distance(__yeq.first, __yeq.second) ||
-                  !_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first))
+        if (_CUDA_VSTD::distance(__xeq.first, __xeq.second) !=
+            _CUDA_VSTD::distance(__yeq.first, __yeq.second) ||
+                  !_CUDA_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first))
             return false;
         __i = __xeq.second;
     }
@@ -977,7 +977,7 @@ operator==(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
            const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
@@ -987,4 +987,4 @@ operator!=(const hash_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
 
 } // namespace __gnu_cxx
 
-#endif // _LIBCPP_HASH_MAP
+#endif // _LIBCUDACXX_HASH_MAP

diff  --git a/libcxx/include/ext/hash_set b/libcxx/include/ext/hash_set
index 5823b5fb9476..084b51bcdd3b 100644
--- a/libcxx/include/ext/hash_set
+++ b/libcxx/include/ext/hash_set
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_HASH_SET
-#define _LIBCPP_HASH_SET
+#ifndef _LIBCUDACXX_HASH_SET
+#define _LIBCUDACXX_HASH_SET
 
 /*
 
@@ -199,19 +199,19 @@ template <class Value, class Hash, class Pred, class Alloc>
 #include <ext/__hash>
 #include <functional>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <iterator>
 #endif
 
 #if defined(__DEPRECATED) && __DEPRECATED
-#if defined(_LIBCPP_WARNING)
-    _LIBCPP_WARNING("Use of the header <ext/hash_set> is deprecated.  Migrate to <unordered_set>")
+#if defined(_LIBCUDACXX_WARNING)
+    _LIBCUDACXX_WARNING("Use of the header <ext/hash_set> is deprecated.  Migrate to <unordered_set>")
 #else
 #   warning Use of the header <ext/hash_set> is deprecated.  Migrate to <unordered_set>
 #endif
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -220,7 +220,7 @@ namespace __gnu_cxx {
 
 template <class _Value, class _Hash = hash<_Value>, class _Pred = std::equal_to<_Value>,
           class _Alloc = std::allocator<_Value> >
-class _LIBCPP_TEMPLATE_VIS hash_set
+class _LIBCUDACXX_TEMPLATE_VIS hash_set
 {
 public:
     // types
@@ -246,7 +246,7 @@ public:
     typedef typename __table::const_iterator       iterator;
     typedef typename __table::const_iterator       const_iterator;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hash_set() { }
     explicit hash_set(size_type __n, const hasher& __hf = hasher(),
                            const key_equal& __eql = key_equal());
@@ -264,75 +264,75 @@ public:
                       const allocator_type& __a);
     hash_set(const hash_set& __u);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const
         {return allocator_type(__table_.__node_alloc());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool      empty() const {return __table_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const  {return __table_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const {return __table_.max_size();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       begin()        {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       end()          {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin()  const {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()    const {return __table_.end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     std::pair<iterator, bool> insert(const value_type& __x)
         {return __table_.__insert_unique(__x);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator, const value_type& __x) {return insert(__x).first;}
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void insert(_InputIterator __first, _InputIterator __last);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void erase(const_iterator __p) {__table_.erase(__p);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k) {return __table_.__erase_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void erase(const_iterator __first, const_iterator __last)
         {__table_.erase(__first, __last);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() {__table_.clear();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(hash_set& __u) {__table_.swap(__u.__table_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hasher hash_funct() const {return __table_.hash_function();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_equal key_eq() const {return __table_.key_eq();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const key_type& __k)       {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     std::pair<iterator, iterator>             equal_range(const key_type& __k)
         {return __table_.__equal_range_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     std::pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
         {return __table_.__equal_range_unique(__k);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_count() const {return __table_.bucket_count();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_bucket_count() const {return __table_.max_bucket_count();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type elems_in_bucket(size_type __n) const {return __table_.bucket_size(__n);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void resize(size_type __n) {__table_.__rehash_unique(__n);}
 };
 
@@ -403,7 +403,7 @@ hash_set<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
      hash_set<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -431,7 +431,7 @@ operator==(const hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
            const hash_set<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -441,7 +441,7 @@ operator!=(const hash_set<_Value, _Hash, _Pred, _Alloc>& __x,
 
 template <class _Value, class _Hash = hash<_Value>, class _Pred = std::equal_to<_Value>,
           class _Alloc = std::allocator<_Value> >
-class _LIBCPP_TEMPLATE_VIS hash_multiset
+class _LIBCUDACXX_TEMPLATE_VIS hash_multiset
 {
 public:
     // types
@@ -467,7 +467,7 @@ public:
     typedef typename __table::const_iterator       iterator;
     typedef typename __table::const_iterator       const_iterator;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hash_multiset() { }
     explicit hash_multiset(size_type __n, const hasher& __hf = hasher(),
                                 const key_equal& __eql = key_equal());
@@ -485,74 +485,74 @@ public:
                       const key_equal& __eql, const allocator_type& __a);
     hash_multiset(const hash_multiset& __u);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const
         {return allocator_type(__table_.__node_alloc());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool      empty() const {return __table_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const  {return __table_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const {return __table_.max_size();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       begin()        {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       end()          {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin()  const {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()    const {return __table_.end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator, const value_type& __x) {return insert(__x);}
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void insert(_InputIterator __first, _InputIterator __last);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void erase(const_iterator __p) {__table_.erase(__p);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k) {return __table_.__erase_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void erase(const_iterator __first, const_iterator __last)
         {__table_.erase(__first, __last);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() {__table_.clear();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(hash_multiset& __u) {__table_.swap(__u.__table_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hasher hash_funct() const {return __table_.hash_function();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_equal key_eq() const {return __table_.key_eq();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const key_type& __k)       {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     std::pair<iterator, iterator>             equal_range(const key_type& __k)
         {return __table_.__equal_range_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     std::pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
         {return __table_.__equal_range_multi(__k);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_count() const {return __table_.bucket_count();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_bucket_count() const {return __table_.max_bucket_count();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type elems_in_bucket(size_type __n) const {return __table_.bucket_size(__n);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void resize(size_type __n) {__table_.__rehash_multi(__n);}
 };
 
@@ -624,7 +624,7 @@ hash_multiset<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
      hash_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -646,9 +646,9 @@ operator==(const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
     {
         _EqRng __xeq = __x.equal_range(*__i);
         _EqRng __yeq = __y.equal_range(*__i);
-        if (_VSTD::distance(__xeq.first, __xeq.second) !=
-            _VSTD::distance(__yeq.first, __yeq.second) ||
-                  !_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first))
+        if (_CUDA_VSTD::distance(__xeq.first, __xeq.second) !=
+            _CUDA_VSTD::distance(__yeq.first, __yeq.second) ||
+                  !_CUDA_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first))
             return false;
         __i = __xeq.second;
     }
@@ -656,7 +656,7 @@ operator==(const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
            const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -666,4 +666,4 @@ operator!=(const hash_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
 
 } // namespace __gnu_cxx
 
-#endif // _LIBCPP_HASH_SET
+#endif // _LIBCUDACXX_HASH_SET

diff  --git a/libcxx/include/fenv.h b/libcxx/include/fenv.h
index a9ba6800245b..9464abbfc21a 100644
--- a/libcxx/include/fenv.h
+++ b/libcxx/include/fenv.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_FENV_H
-#define _LIBCPP_FENV_H
+#ifndef _LIBCUDACXX_FENV_H
+#define _LIBCUDACXX_FENV_H
 
 
 /*
@@ -52,7 +52,7 @@ int feupdateenv(const fenv_t* envp);
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -113,4 +113,4 @@ extern "C++" {
 
 #endif // defined(__cplusplus)
 
-#endif // _LIBCPP_FENV_H
+#endif // _LIBCUDACXX_FENV_H

diff  --git a/libcxx/include/filesystem b/libcxx/include/filesystem
index 87de8861ea42..a9ad774cbea0 100644
--- a/libcxx/include/filesystem
+++ b/libcxx/include/filesystem
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_FILESYSTEM
-#define _LIBCPP_FILESYSTEM
+#ifndef _LIBCUDACXX_FILESYSTEM
+#define _LIBCUDACXX_FILESYSTEM
 
 /*
     filesystem synopsis
@@ -262,12 +262,12 @@ inline constexpr bool std::ranges::enable_view<std::filesystem::recursive_direct
 // standard-mandated includes
 #include <compare>
 
-#if defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
+#if defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
 # error "The <filesystem> library is not supported since libc++ has been configured without support for a filesystem."
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_FILESYSTEM
+#endif // _LIBCUDACXX_FILESYSTEM

diff  --git a/libcxx/include/float.h b/libcxx/include/float.h
index 606081251dfb..ecc7621787b4 100644
--- a/libcxx/include/float.h
+++ b/libcxx/include/float.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_FLOAT_H
-#define _LIBCPP_FLOAT_H
+#ifndef _LIBCUDACXX_FLOAT_H
+#define _LIBCUDACXX_FLOAT_H
 
 /*
     float.h synopsis
@@ -72,7 +72,7 @@
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -90,4 +90,4 @@
 
 #endif // __cplusplus
 
-#endif // _LIBCPP_FLOAT_H
+#endif // _LIBCUDACXX_FLOAT_H

diff  --git a/libcxx/include/format b/libcxx/include/format
index 6b14570bc627..690290eb2e26 100644
--- a/libcxx/include/format
+++ b/libcxx/include/format
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_FORMAT
-#define _LIBCPP_FORMAT
+#ifndef _LIBCUDACXX_FORMAT
+#define _LIBCUDACXX_FORMAT
 
 /*
 
@@ -139,7 +139,7 @@ namespace std {
 // Make sure all feature-test macros are available.
 #include <version>
 // Enable the contents of the header only when libc++ was built with experimental features enabled.
-#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+#if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT)
 
 #include <__algorithm/clamp.h>
 #include <__config>
@@ -174,17 +174,17 @@ namespace std {
 #include <string_view>
 #include <type_traits>
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 #include <locale>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // TODO FMT Move the implementation in this file to its own granular headers.
 
@@ -194,19 +194,19 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 // to do this optimization now.
 
 using format_args = basic_format_args<format_context>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 using wformat_args = basic_format_args<wformat_context>;
 #endif
 
 template <class _Context = format_context, class... _Args>
-_LIBCPP_HIDE_FROM_ABI __format_arg_store<_Context, _Args...> make_format_args(_Args&&... __args) {
-  return _VSTD::__format_arg_store<_Context, _Args...>(__args...);
+_LIBCUDACXX_HIDE_FROM_ABI __format_arg_store<_Context, _Args...> make_format_args(_Args&&... __args) {
+  return _CUDA_VSTD::__format_arg_store<_Context, _Args...>(__args...);
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class... _Args>
-_LIBCPP_HIDE_FROM_ABI __format_arg_store<wformat_context, _Args...> make_wformat_args(_Args&&... __args) {
-  return _VSTD::__format_arg_store<wformat_context, _Args...>(__args...);
+_LIBCUDACXX_HIDE_FROM_ABI __format_arg_store<wformat_context, _Args...> make_wformat_args(_Args&&... __args) {
+  return _CUDA_VSTD::__format_arg_store<wformat_context, _Args...>(__args...);
 }
 #endif
 
@@ -217,13 +217,13 @@ namespace __format {
 /// When parsing a handle which is not enabled the code is ill-formed.
 /// This helper uses the parser of the appropriate formatter for the stored type.
 template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS __compile_time_handle {
+class _LIBCUDACXX_TEMPLATE_VIS __compile_time_handle {
 public:
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr void __parse(basic_format_parse_context<_CharT>& __parse_ctx) const { __parse_(__parse_ctx); }
 
   template <class _Tp>
-  _LIBCPP_HIDE_FROM_ABI constexpr void __enable() {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr void __enable() {
     __parse_ = [](basic_format_parse_context<_CharT>& __parse_ctx) {
       formatter<_Tp, _CharT> __f;
       __parse_ctx.advance_to(__f.parse(__parse_ctx));
@@ -232,7 +232,7 @@ public:
 
   // Before calling __parse the proper handler needs to be set with __enable.
   // The default handler isn't a core constant expression.
-  _LIBCPP_HIDE_FROM_ABI constexpr __compile_time_handle()
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __compile_time_handle()
       : __parse_([](basic_format_parse_context<_CharT>&) { __throw_format_error("Not a handle"); }) {}
 
 private:
@@ -242,36 +242,36 @@ private:
 // Dummy format_context only providing the parts used during constant
 // validation of the basic_format_string.
 template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS __compile_time_basic_format_context {
+struct _LIBCUDACXX_TEMPLATE_VIS __compile_time_basic_format_context {
 public:
   using char_type = _CharT;
 
-  _LIBCPP_HIDE_FROM_ABI constexpr explicit __compile_time_basic_format_context(
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr explicit __compile_time_basic_format_context(
       const __arg_t* __args, const __compile_time_handle<_CharT>* __handles, size_t __size)
       : __args_(__args), __handles_(__handles), __size_(__size) {}
 
   // During the compile-time validation nothing needs to be written.
   // Therefore all operations of this iterator are a NOP.
   struct iterator {
-    _LIBCPP_HIDE_FROM_ABI constexpr iterator& operator=(_CharT) { return *this; }
-    _LIBCPP_HIDE_FROM_ABI constexpr iterator& operator*() { return *this; }
-    _LIBCPP_HIDE_FROM_ABI constexpr iterator operator++(int) { return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator& operator=(_CharT) { return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator& operator*() { return *this; }
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator operator++(int) { return *this; }
   };
 
-  _LIBCPP_HIDE_FROM_ABI constexpr __arg_t arg(size_t __id) const {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr __arg_t arg(size_t __id) const {
     if (__id >= __size_)
       __throw_format_error("Argument index out of bounds");
     return __args_[__id];
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr const __compile_time_handle<_CharT>& __handle(size_t __id) const {
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr const __compile_time_handle<_CharT>& __handle(size_t __id) const {
     if (__id >= __size_)
       __throw_format_error("Argument index out of bounds");
     return __handles_[__id];
   }
 
-  _LIBCPP_HIDE_FROM_ABI constexpr iterator out() { return {}; }
-  _LIBCPP_HIDE_FROM_ABI constexpr void advance_to(iterator) {}
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr iterator out() { return {}; }
+  _LIBCUDACXX_HIDE_FROM_ABI constexpr void advance_to(iterator) {}
 
 private:
   const __arg_t* __args_;
@@ -279,7 +279,7 @@ private:
   size_t __size_;
 };
 
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 constexpr void __compile_time_validate_integral(__arg_t __type) {
   switch (__type) {
   case __arg_t::__int:
@@ -297,7 +297,7 @@ constexpr void __compile_time_validate_integral(__arg_t __type) {
 
 // _HasPrecision does the formatter have a precision?
 template <class _CharT, class _Tp, bool _HasPrecision = false>
-_LIBCPP_HIDE_FROM_ABI constexpr void
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void
 __compile_time_validate_argument(basic_format_parse_context<_CharT>& __parse_ctx,
                                  __compile_time_basic_format_context<_CharT>& __ctx) {
   formatter<_Tp, _CharT> __formatter;
@@ -327,7 +327,7 @@ __compile_time_validate_argument(basic_format_parse_context<_CharT>& __parse_ctx
 }
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI constexpr void __compile_time_visit_format_arg(basic_format_parse_context<_CharT>& __parse_ctx,
+_LIBCUDACXX_HIDE_FROM_ABI constexpr void __compile_time_visit_format_arg(basic_format_parse_context<_CharT>& __parse_ctx,
                                                                      __compile_time_basic_format_context<_CharT>& __ctx,
                                                                      __arg_t __type) {
   switch (__type) {
@@ -342,7 +342,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __compile_time_visit_format_arg(basic_forma
   case __arg_t::__long_long:
     return __format::__compile_time_validate_argument<_CharT, long long>(__parse_ctx, __ctx);
   case __arg_t::__i128:
-#      ifndef _LIBCPP_HAS_NO_INT128
+#      ifndef _LIBCUDACXX_HAS_NO_INT128
     return __format::__compile_time_validate_argument<_CharT, __int128_t>(__parse_ctx, __ctx);
 #      else
     __throw_format_error("Invalid argument");
@@ -353,7 +353,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __compile_time_visit_format_arg(basic_forma
   case __arg_t::__unsigned_long_long:
     return __format::__compile_time_validate_argument<_CharT, unsigned long long>(__parse_ctx, __ctx);
   case __arg_t::__u128:
-#      ifndef _LIBCPP_HAS_NO_INT128
+#      ifndef _LIBCUDACXX_HAS_NO_INT128
     return __format::__compile_time_validate_argument<_CharT, __uint128_t>(__parse_ctx, __ctx);
 #      else
     __throw_format_error("Invalid argument");
@@ -378,7 +378,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr void __compile_time_visit_format_arg(basic_forma
 }
 
 template <class _CharT, class _ParseCtx, class _Ctx>
-_LIBCPP_HIDE_FROM_ABI constexpr const _CharT*
+_LIBCUDACXX_HIDE_FROM_ABI constexpr const _CharT*
 __handle_replacement_field(const _CharT* __begin, const _CharT* __end,
                            _ParseCtx& __parse_ctx, _Ctx& __ctx) {
   __format::__parse_number_result __r =
@@ -406,7 +406,7 @@ __handle_replacement_field(const _CharT* __begin, const _CharT* __end,
     else
         __format::__compile_time_visit_format_arg(__parse_ctx, __ctx, __type);
   } else
-    _VSTD::visit_format_arg(
+    _CUDA_VSTD::visit_format_arg(
         [&](auto __arg) {
           if constexpr (same_as<decltype(__arg), monostate>)
             __throw_format_error("Argument index out of bounds");
@@ -429,7 +429,7 @@ __handle_replacement_field(const _CharT* __begin, const _CharT* __end,
 }
 
 template <class _ParseCtx, class _Ctx>
-_LIBCPP_HIDE_FROM_ABI constexpr typename _Ctx::iterator
+_LIBCUDACXX_HIDE_FROM_ABI constexpr typename _Ctx::iterator
 __vformat_to(_ParseCtx&& __parse_ctx, _Ctx&& __ctx) {
   using _CharT = typename _ParseCtx::char_type;
   static_assert(same_as<typename _Ctx::char_type, _CharT>);
@@ -445,7 +445,7 @@ __vformat_to(_ParseCtx&& __parse_ctx, _Ctx&& __ctx) {
         __throw_format_error("The format string terminates at a '{'");
 
       if (*__begin != _CharT('{')) [[likely]] {
-        __ctx.advance_to(_VSTD::move(__out_it));
+        __ctx.advance_to(_CUDA_VSTD::move(__out_it));
         __begin =
             __handle_replacement_field(__begin, __end, __parse_ctx, __ctx);
         __out_it = __ctx.out();
@@ -475,7 +475,7 @@ __vformat_to(_ParseCtx&& __parse_ctx, _Ctx&& __ctx) {
 } // namespace __format
 
 template <class _CharT, class... _Args>
-struct _LIBCPP_TEMPLATE_VIS basic_format_string {
+struct _LIBCUDACXX_TEMPLATE_VIS basic_format_string {
   template <class _Tp>
     requires convertible_to<const _Tp&, basic_string_view<_CharT>>
   consteval basic_format_string(const _Tp& __str) : __str_{__str} {
@@ -483,7 +483,7 @@ struct _LIBCPP_TEMPLATE_VIS basic_format_string {
                            _Context{__types_.data(), __handles_.data(), sizeof...(_Args)});
   }
 
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT constexpr basic_string_view<_CharT> get() const noexcept {
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT constexpr basic_string_view<_CharT> get() const noexcept {
     return __str_;
   }
 
@@ -496,7 +496,7 @@ private:
       __format::__determine_arg_t<_Context, remove_cvref_t<_Args>>()...};
 
   // TODO FMT remove this work-around when the AIX ICE has been resolved.
-#    if defined(_AIX) && defined(_LIBCPP_CLANG_VER) && _LIBCPP_CLANG_VER < 1400
+#    if defined(_AIX) && defined(_LIBCUDACXX_CLANG_VER) && _LIBCUDACXX_CLANG_VER < 1400
   template <class _Tp>
   static constexpr __format::__compile_time_handle<_CharT> __get_handle() {
     __format::__compile_time_handle<_CharT> __handle;
@@ -523,287 +523,287 @@ private:
 template <class... _Args>
 using format_string = basic_format_string<char, type_identity_t<_Args>...>;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class... _Args>
 using wformat_string = basic_format_string<wchar_t, type_identity_t<_Args>...>;
 #endif
 
 template <class _OutIt, class _CharT, class _FormatOutIt>
-requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
+requires(output_iterator<_OutIt, const _CharT&>) _LIBCUDACXX_HIDE_FROM_ABI _OutIt
     __vformat_to(
         _OutIt __out_it, basic_string_view<_CharT> __fmt,
         basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
   if constexpr (same_as<_OutIt, _FormatOutIt>)
-    return _VSTD::__format::__vformat_to(
+    return _CUDA_VSTD::__format::__vformat_to(
         basic_format_parse_context{__fmt, __args.__size()},
-        _VSTD::__format_context_create(_VSTD::move(__out_it), __args));
+        _CUDA_VSTD::__format_context_create(_CUDA_VSTD::move(__out_it), __args));
   else {
-    __format::__format_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it)};
-    _VSTD::__format::__vformat_to(
+    __format::__format_buffer<_OutIt, _CharT> __buffer{_CUDA_VSTD::move(__out_it)};
+    _CUDA_VSTD::__format::__vformat_to(
         basic_format_parse_context{__fmt, __args.__size()},
-        _VSTD::__format_context_create(__buffer.make_output_iterator(),
+        _CUDA_VSTD::__format_context_create(__buffer.make_output_iterator(),
                                        __args));
-    return _VSTD::move(__buffer).out();
+    return _CUDA_VSTD::move(__buffer).out();
   }
 }
 
-// The function is _LIBCPP_ALWAYS_INLINE since the compiler is bad at inlining
+// The function is _LIBCUDACXX_ALWAYS_INLINE since the compiler is bad at inlining
 // https://reviews.llvm.org/D110499#inline-1180704
 // TODO FMT Evaluate whether we want to file a Clang bug report regarding this.
 template <output_iterator<const char&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT _OutIt
 vformat_to(_OutIt __out_it, string_view __fmt, format_args __args) {
-  return _VSTD::__vformat_to(_VSTD::move(__out_it), __fmt, __args);
+  return _CUDA_VSTD::__vformat_to(_CUDA_VSTD::move(__out_it), __fmt, __args);
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <output_iterator<const wchar_t&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT _OutIt
 vformat_to(_OutIt __out_it, wstring_view __fmt, wformat_args __args) {
-  return _VSTD::__vformat_to(_VSTD::move(__out_it), __fmt, __args);
+  return _CUDA_VSTD::__vformat_to(_CUDA_VSTD::move(__out_it), __fmt, __args);
 }
 #endif
 
 template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT _OutIt
 format_to(_OutIt __out_it, format_string<_Args...> __fmt, _Args&&... __args) {
-  return _VSTD::vformat_to(_VSTD::move(__out_it), __fmt.get(),
-                           _VSTD::make_format_args(__args...));
+  return _CUDA_VSTD::vformat_to(_CUDA_VSTD::move(__out_it), __fmt.get(),
+                           _CUDA_VSTD::make_format_args(__args...));
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT _OutIt
 format_to(_OutIt __out_it, wformat_string<_Args...> __fmt, _Args&&... __args) {
-  return _VSTD::vformat_to(_VSTD::move(__out_it), __fmt.get(),
-                           _VSTD::make_wformat_args(__args...));
+  return _CUDA_VSTD::vformat_to(_CUDA_VSTD::move(__out_it), __fmt.get(),
+                           _CUDA_VSTD::make_wformat_args(__args...));
 }
 #endif
 
-_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string
+_LIBCUDACXX_ALWAYS_INLINE inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT string
 vformat(string_view __fmt, format_args __args) {
   string __res;
-  _VSTD::vformat_to(_VSTD::back_inserter(__res), __fmt, __args);
+  _CUDA_VSTD::vformat_to(_CUDA_VSTD::back_inserter(__res), __fmt, __args);
   return __res;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+_LIBCUDACXX_ALWAYS_INLINE inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT wstring
 vformat(wstring_view __fmt, wformat_args __args) {
   wstring __res;
-  _VSTD::vformat_to(_VSTD::back_inserter(__res), __fmt, __args);
+  _CUDA_VSTD::vformat_to(_CUDA_VSTD::back_inserter(__res), __fmt, __args);
   return __res;
 }
 #endif
 
 template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string format(format_string<_Args...> __fmt,
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT string format(format_string<_Args...> __fmt,
                                                                                       _Args&&... __args) {
-  return _VSTD::vformat(__fmt.get(), _VSTD::make_format_args(__args...));
+  return _CUDA_VSTD::vformat(__fmt.get(), _CUDA_VSTD::make_format_args(__args...));
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT wstring
 format(wformat_string<_Args...> __fmt, _Args&&... __args) {
-  return _VSTD::vformat(__fmt.get(), _VSTD::make_wformat_args(__args...));
+  return _CUDA_VSTD::vformat(__fmt.get(), _CUDA_VSTD::make_wformat_args(__args...));
 }
 #endif
 
 template <class _Context, class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(_OutIt __out_it, iter_
diff erence_t<_OutIt> __n,
+_LIBCUDACXX_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(_OutIt __out_it, iter_
diff erence_t<_OutIt> __n,
                                                                 basic_string_view<_CharT> __fmt,
                                                                 basic_format_args<_Context> __args) {
-  __format::__format_to_n_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it), __n};
-  _VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
-                                _VSTD::__format_context_create(__buffer.make_output_iterator(), __args));
-  return _VSTD::move(__buffer).result();
+  __format::__format_to_n_buffer<_OutIt, _CharT> __buffer{_CUDA_VSTD::move(__out_it), __n};
+  _CUDA_VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
+                                _CUDA_VSTD::__format_context_create(__buffer.make_output_iterator(), __args));
+  return _CUDA_VSTD::move(__buffer).result();
 }
 
 template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
 format_to_n(_OutIt __out_it, iter_
diff erence_t<_OutIt> __n, format_string<_Args...> __fmt, _Args&&... __args) {
-  return _VSTD::__vformat_to_n<format_context>(_VSTD::move(__out_it), __n, __fmt.get(), _VSTD::make_format_args(__args...));
+  return _CUDA_VSTD::__vformat_to_n<format_context>(_CUDA_VSTD::move(__out_it), __n, __fmt.get(), _CUDA_VSTD::make_format_args(__args...));
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
 format_to_n(_OutIt __out_it, iter_
diff erence_t<_OutIt> __n, wformat_string<_Args...> __fmt,
             _Args&&... __args) {
-  return _VSTD::__vformat_to_n<wformat_context>(_VSTD::move(__out_it), __n, __fmt.get(), _VSTD::make_wformat_args(__args...));
+  return _CUDA_VSTD::__vformat_to_n<wformat_context>(_CUDA_VSTD::move(__out_it), __n, __fmt.get(), _CUDA_VSTD::make_wformat_args(__args...));
 }
 #endif
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(basic_string_view<_CharT> __fmt, auto __args) {
+_LIBCUDACXX_HIDE_FROM_ABI size_t __vformatted_size(basic_string_view<_CharT> __fmt, auto __args) {
   __format::__formatted_size_buffer<_CharT> __buffer;
-  _VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
-                                _VSTD::__format_context_create(__buffer.make_output_iterator(), __args));
-  return _VSTD::move(__buffer).result();
+  _CUDA_VSTD::__format::__vformat_to(basic_format_parse_context{__fmt, __args.__size()},
+                                _CUDA_VSTD::__format_context_create(__buffer.make_output_iterator(), __args));
+  return _CUDA_VSTD::move(__buffer).result();
 }
 
 template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT size_t
 formatted_size(format_string<_Args...> __fmt, _Args&&... __args) {
-  return _VSTD::__vformatted_size(__fmt.get(), basic_format_args{_VSTD::make_format_args(__args...)});
+  return _CUDA_VSTD::__vformatted_size(__fmt.get(), basic_format_args{_CUDA_VSTD::make_format_args(__args...)});
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT size_t
 formatted_size(wformat_string<_Args...> __fmt, _Args&&... __args) {
-  return _VSTD::__vformatted_size(__fmt.get(), basic_format_args{_VSTD::make_wformat_args(__args...)});
+  return _CUDA_VSTD::__vformatted_size(__fmt.get(), basic_format_args{_CUDA_VSTD::make_wformat_args(__args...)});
 }
 #endif
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 
 template <class _OutIt, class _CharT, class _FormatOutIt>
-requires(output_iterator<_OutIt, const _CharT&>) _LIBCPP_HIDE_FROM_ABI _OutIt
+requires(output_iterator<_OutIt, const _CharT&>) _LIBCUDACXX_HIDE_FROM_ABI _OutIt
     __vformat_to(
         _OutIt __out_it, locale __loc, basic_string_view<_CharT> __fmt,
         basic_format_args<basic_format_context<_FormatOutIt, _CharT>> __args) {
   if constexpr (same_as<_OutIt, _FormatOutIt>)
-    return _VSTD::__format::__vformat_to(
+    return _CUDA_VSTD::__format::__vformat_to(
         basic_format_parse_context{__fmt, __args.__size()},
-        _VSTD::__format_context_create(_VSTD::move(__out_it), __args,
-                                       _VSTD::move(__loc)));
+        _CUDA_VSTD::__format_context_create(_CUDA_VSTD::move(__out_it), __args,
+                                       _CUDA_VSTD::move(__loc)));
   else {
-    __format::__format_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it)};
-    _VSTD::__format::__vformat_to(
+    __format::__format_buffer<_OutIt, _CharT> __buffer{_CUDA_VSTD::move(__out_it)};
+    _CUDA_VSTD::__format::__vformat_to(
         basic_format_parse_context{__fmt, __args.__size()},
-        _VSTD::__format_context_create(__buffer.make_output_iterator(),
-                                       __args, _VSTD::move(__loc)));
-    return _VSTD::move(__buffer).out();
+        _CUDA_VSTD::__format_context_create(__buffer.make_output_iterator(),
+                                       __args, _CUDA_VSTD::move(__loc)));
+    return _CUDA_VSTD::move(__buffer).out();
   }
 }
 
 template <output_iterator<const char&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt vformat_to(
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT _OutIt vformat_to(
     _OutIt __out_it, locale __loc, string_view __fmt, format_args __args) {
-  return _VSTD::__vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt,
+  return _CUDA_VSTD::__vformat_to(_CUDA_VSTD::move(__out_it), _CUDA_VSTD::move(__loc), __fmt,
                              __args);
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <output_iterator<const wchar_t&> _OutIt>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt vformat_to(
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT _OutIt vformat_to(
     _OutIt __out_it, locale __loc, wstring_view __fmt, wformat_args __args) {
-  return _VSTD::__vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt,
+  return _CUDA_VSTD::__vformat_to(_CUDA_VSTD::move(__out_it), _CUDA_VSTD::move(__loc), __fmt,
                              __args);
 }
 #endif
 
 template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT _OutIt
 format_to(_OutIt __out_it, locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
-  return _VSTD::vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt.get(),
-                           _VSTD::make_format_args(__args...));
+  return _CUDA_VSTD::vformat_to(_CUDA_VSTD::move(__out_it), _CUDA_VSTD::move(__loc), __fmt.get(),
+                           _CUDA_VSTD::make_format_args(__args...));
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT _OutIt
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT _OutIt
 format_to(_OutIt __out_it, locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
-  return _VSTD::vformat_to(_VSTD::move(__out_it), _VSTD::move(__loc), __fmt.get(),
-                           _VSTD::make_wformat_args(__args...));
+  return _CUDA_VSTD::vformat_to(_CUDA_VSTD::move(__out_it), _CUDA_VSTD::move(__loc), __fmt.get(),
+                           _CUDA_VSTD::make_wformat_args(__args...));
 }
 #endif
 
-_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string
+_LIBCUDACXX_ALWAYS_INLINE inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT string
 vformat(locale __loc, string_view __fmt, format_args __args) {
   string __res;
-  _VSTD::vformat_to(_VSTD::back_inserter(__res), _VSTD::move(__loc), __fmt,
+  _CUDA_VSTD::vformat_to(_CUDA_VSTD::back_inserter(__res), _CUDA_VSTD::move(__loc), __fmt,
                     __args);
   return __res;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_LIBCPP_ALWAYS_INLINE inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+_LIBCUDACXX_ALWAYS_INLINE inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT wstring
 vformat(locale __loc, wstring_view __fmt, wformat_args __args) {
   wstring __res;
-  _VSTD::vformat_to(_VSTD::back_inserter(__res), _VSTD::move(__loc), __fmt,
+  _CUDA_VSTD::vformat_to(_CUDA_VSTD::back_inserter(__res), _CUDA_VSTD::move(__loc), __fmt,
                     __args);
   return __res;
 }
 #endif
 
 template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT string format(locale __loc,
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT string format(locale __loc,
                                                                                       format_string<_Args...> __fmt,
                                                                                       _Args&&... __args) {
-  return _VSTD::vformat(_VSTD::move(__loc), __fmt.get(),
-                        _VSTD::make_format_args(__args...));
+  return _CUDA_VSTD::vformat(_CUDA_VSTD::move(__loc), __fmt.get(),
+                        _CUDA_VSTD::make_format_args(__args...));
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT wstring
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT wstring
 format(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
-  return _VSTD::vformat(_VSTD::move(__loc), __fmt.get(),
-                        _VSTD::make_wformat_args(__args...));
+  return _CUDA_VSTD::vformat(_CUDA_VSTD::move(__loc), __fmt.get(),
+                        _CUDA_VSTD::make_wformat_args(__args...));
 }
 #endif
 
 template <class _Context, class _OutIt, class _CharT>
-_LIBCPP_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(_OutIt __out_it, iter_
diff erence_t<_OutIt> __n,
+_LIBCUDACXX_HIDE_FROM_ABI format_to_n_result<_OutIt> __vformat_to_n(_OutIt __out_it, iter_
diff erence_t<_OutIt> __n,
                                                                 locale __loc, basic_string_view<_CharT> __fmt,
                                                                 basic_format_args<_Context> __args) {
-  __format::__format_to_n_buffer<_OutIt, _CharT> __buffer{_VSTD::move(__out_it), __n};
-  _VSTD::__format::__vformat_to(
+  __format::__format_to_n_buffer<_OutIt, _CharT> __buffer{_CUDA_VSTD::move(__out_it), __n};
+  _CUDA_VSTD::__format::__vformat_to(
       basic_format_parse_context{__fmt, __args.__size()},
-      _VSTD::__format_context_create(__buffer.make_output_iterator(), __args, _VSTD::move(__loc)));
-  return _VSTD::move(__buffer).result();
+      _CUDA_VSTD::__format_context_create(__buffer.make_output_iterator(), __args, _CUDA_VSTD::move(__loc)));
+  return _CUDA_VSTD::move(__buffer).result();
 }
 
 template <output_iterator<const char&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
 format_to_n(_OutIt __out_it, iter_
diff erence_t<_OutIt> __n, locale __loc, format_string<_Args...> __fmt,
             _Args&&... __args) {
-  return _VSTD::__vformat_to_n<format_context>(_VSTD::move(__out_it), __n, _VSTD::move(__loc), __fmt.get(),
-                                               _VSTD::make_format_args(__args...));
+  return _CUDA_VSTD::__vformat_to_n<format_context>(_CUDA_VSTD::move(__out_it), __n, _CUDA_VSTD::move(__loc), __fmt.get(),
+                                               _CUDA_VSTD::make_format_args(__args...));
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <output_iterator<const wchar_t&> _OutIt, class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT format_to_n_result<_OutIt>
 format_to_n(_OutIt __out_it, iter_
diff erence_t<_OutIt> __n, locale __loc, wformat_string<_Args...> __fmt,
             _Args&&... __args) {
-  return _VSTD::__vformat_to_n<wformat_context>(_VSTD::move(__out_it), __n, _VSTD::move(__loc), __fmt.get(),
-                                                _VSTD::make_wformat_args(__args...));
+  return _CUDA_VSTD::__vformat_to_n<wformat_context>(_CUDA_VSTD::move(__out_it), __n, _CUDA_VSTD::move(__loc), __fmt.get(),
+                                                _CUDA_VSTD::make_wformat_args(__args...));
 }
 #endif
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI size_t __vformatted_size(locale __loc, basic_string_view<_CharT> __fmt, auto __args) {
+_LIBCUDACXX_HIDE_FROM_ABI size_t __vformatted_size(locale __loc, basic_string_view<_CharT> __fmt, auto __args) {
   __format::__formatted_size_buffer<_CharT> __buffer;
-  _VSTD::__format::__vformat_to(
+  _CUDA_VSTD::__format::__vformat_to(
       basic_format_parse_context{__fmt, __args.__size()},
-      _VSTD::__format_context_create(__buffer.make_output_iterator(), __args, _VSTD::move(__loc)));
-  return _VSTD::move(__buffer).result();
+      _CUDA_VSTD::__format_context_create(__buffer.make_output_iterator(), __args, _CUDA_VSTD::move(__loc)));
+  return _CUDA_VSTD::move(__buffer).result();
 }
 
 template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT size_t
 formatted_size(locale __loc, format_string<_Args...> __fmt, _Args&&... __args) {
-  return _VSTD::__vformatted_size(_VSTD::move(__loc), __fmt.get(), basic_format_args{_VSTD::make_format_args(__args...)});
+  return _CUDA_VSTD::__vformatted_size(_CUDA_VSTD::move(__loc), __fmt.get(), basic_format_args{_CUDA_VSTD::make_format_args(__args...)});
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class... _Args>
-_LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_FORMAT size_t
+_LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_FORMAT size_t
 formatted_size(locale __loc, wformat_string<_Args...> __fmt, _Args&&... __args) {
-  return _VSTD::__vformatted_size(_VSTD::move(__loc), __fmt.get(), basic_format_args{_VSTD::make_wformat_args(__args...)});
+  return _CUDA_VSTD::__vformatted_size(_CUDA_VSTD::move(__loc), __fmt.get(), basic_format_args{_CUDA_VSTD::make_wformat_args(__args...)});
 }
 #endif
 
-#endif // _LIBCPP_HAS_NO_LOCALIZATION
+#endif // _LIBCUDACXX_HAS_NO_LOCALIZATION
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+#endif // !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT)
 
-#endif // _LIBCPP_FORMAT
+#endif // _LIBCUDACXX_FORMAT

diff  --git a/libcxx/include/forward_list b/libcxx/include/forward_list
index ee90aaa4771f..d8c3891342a7 100644
--- a/libcxx/include/forward_list
+++ b/libcxx/include/forward_list
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_FORWARD_LIST
-#define _LIBCPP_FORWARD_LIST
+#ifndef _LIBCUDACXX_FORWARD_LIST
+#define _LIBCUDACXX_FORWARD_LIST
 
 /*
     forward_list synopsis
@@ -195,7 +195,7 @@ template <class T, class Allocator, class Predicate>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #  include <functional>
 #  include <iterator>
@@ -214,15 +214,15 @@ template <class T, class Allocator, class Predicate>
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _VoidPtr> struct __forward_list_node;
 template <class _NodePtr> struct __forward_begin_node;
@@ -248,7 +248,7 @@ struct __forward_node_traits {
                                                                 __begin_node_pointer;
   typedef typename __rebind_pointer<_NodePtr, void>::type       __void_pointer;
 
-#if defined(_LIBCPP_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB)
+#if defined(_LIBCUDACXX_ABI_FORWARD_LIST_REMOVE_NODE_POINTER_UB)
   typedef __begin_node_pointer __iter_node_pointer;
 #else
   typedef typename conditional<
@@ -264,11 +264,11 @@ struct __forward_node_traits {
           __node_pointer
     >::type __non_iter_node_pointer;
 
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __iter_node_pointer __as_iter_node(__iter_node_pointer __p) {
       return __p;
   }
-  _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_INLINE_VISIBILITY
   static __iter_node_pointer __as_iter_node(__non_iter_node_pointer __p) {
       return static_cast<__iter_node_pointer>(static_cast<__void_pointer>(__p));
   }
@@ -282,16 +282,16 @@ struct __forward_begin_node
 
     pointer __next_;
 
-    _LIBCPP_INLINE_VISIBILITY __forward_begin_node() : __next_(nullptr) {}
+    _LIBCUDACXX_INLINE_VISIBILITY __forward_begin_node() : __next_(nullptr) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __begin_node_pointer __next_as_begin() const {
         return static_cast<__begin_node_pointer>(__next_);
     }
 };
 
 template <class _Tp, class _VoidPtr>
-struct _LIBCPP_HIDDEN __begin_node_of
+struct _LIBCUDACXX_HIDDEN __begin_node_of
 {
     typedef __forward_begin_node<
         typename __rebind_pointer<_VoidPtr, __forward_list_node<_Tp, _VoidPtr> >::type
@@ -299,7 +299,7 @@ struct _LIBCPP_HIDDEN __begin_node_of
 };
 
 template <class _Tp, class _VoidPtr>
-struct _LIBCPP_STANDALONE_DEBUG __forward_list_node
+struct _LIBCUDACXX_STANDALONE_DEBUG __forward_list_node
     : public __begin_node_of<_Tp, _VoidPtr>::type
 {
     typedef _Tp value_type;
@@ -308,11 +308,11 @@ struct _LIBCPP_STANDALONE_DEBUG __forward_list_node
 };
 
 
-template <class _Tp, class _Alloc = allocator<_Tp> > class _LIBCPP_TEMPLATE_VIS forward_list;
-template<class _NodeConstPtr> class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator;
+template <class _Tp, class _Alloc = allocator<_Tp> > class _LIBCUDACXX_TEMPLATE_VIS forward_list;
+template<class _NodeConstPtr> class _LIBCUDACXX_TEMPLATE_VIS __forward_list_const_iterator;
 
 template <class _NodePtr>
-class _LIBCPP_TEMPLATE_VIS __forward_list_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __forward_list_iterator
 {
     typedef __forward_node_traits<_NodePtr>         __traits;
     typedef typename __traits::__node_pointer       __node_pointer;
@@ -322,30 +322,30 @@ class _LIBCPP_TEMPLATE_VIS __forward_list_iterator
 
     __iter_node_pointer __ptr_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __begin_node_pointer __get_begin() const {
         return static_cast<__begin_node_pointer>(
                 static_cast<__void_pointer>(__ptr_));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __node_pointer __get_unsafe_node_pointer() const {
         return static_cast<__node_pointer>(
                 static_cast<__void_pointer>(__ptr_));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __forward_list_iterator(nullptr_t) _NOEXCEPT : __ptr_(nullptr) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __forward_list_iterator(__begin_node_pointer __p) _NOEXCEPT
         : __ptr_(__traits::__as_iter_node(__p)) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __forward_list_iterator(__node_pointer __p) _NOEXCEPT
         : __ptr_(__traits::__as_iter_node(__p)) {}
 
-    template<class, class> friend class _LIBCPP_TEMPLATE_VIS forward_list;
-    template<class> friend class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator;
+    template<class, class> friend class _LIBCUDACXX_TEMPLATE_VIS forward_list;
+    template<class> friend class _LIBCUDACXX_TEMPLATE_VIS __forward_list_const_iterator;
 
 public:
     typedef forward_iterator_tag                              iterator_category;
@@ -355,23 +355,23 @@ public:
                                                               
diff erence_type;
     typedef typename __rebind_pointer<__node_pointer, value_type>::type pointer;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __forward_list_iterator() _NOEXCEPT : __ptr_(nullptr) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {return __get_unsafe_node_pointer()->__value_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {
         return pointer_traits<pointer>::pointer_to(__get_unsafe_node_pointer()->__value_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __forward_list_iterator& operator++()
     {
         __ptr_ = __traits::__as_iter_node(__ptr_->__next_);
         return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __forward_list_iterator operator++(int)
     {
         __forward_list_iterator __t(*this);
@@ -379,18 +379,18 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __forward_list_iterator& __x,
                     const __forward_list_iterator& __y)
         {return __x.__ptr_ == __y.__ptr_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __forward_list_iterator& __x,
                     const __forward_list_iterator& __y)
         {return !(__x == __y);}
 };
 
 template <class _NodeConstPtr>
-class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __forward_list_const_iterator
 {
     static_assert((!is_const<typename pointer_traits<_NodeConstPtr>::element_type>::value), "");
     typedef _NodeConstPtr _NodePtr;
@@ -413,15 +413,15 @@ class _LIBCPP_TEMPLATE_VIS __forward_list_const_iterator
                 static_cast<__void_pointer>(__ptr_));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __forward_list_const_iterator(nullptr_t) _NOEXCEPT
         : __ptr_(nullptr) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __forward_list_const_iterator(__begin_node_pointer __p) _NOEXCEPT
         : __ptr_(__traits::__as_iter_node(__p)) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __forward_list_const_iterator(__node_pointer __p) _NOEXCEPT
         : __ptr_(__traits::__as_iter_node(__p)) {}
 
@@ -437,25 +437,25 @@ public:
     typedef typename __rebind_pointer<__node_pointer, const value_type>::type
                                                               pointer;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __forward_list_const_iterator() _NOEXCEPT : __ptr_(nullptr) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __forward_list_const_iterator(__forward_list_iterator<__node_pointer> __p) _NOEXCEPT
         : __ptr_(__p.__ptr_) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {return __get_unsafe_node_pointer()->__value_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {return pointer_traits<pointer>::pointer_to(
                 __get_unsafe_node_pointer()->__value_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __forward_list_const_iterator& operator++()
     {
         __ptr_ = __traits::__as_iter_node(__ptr_->__next_);
         return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __forward_list_const_iterator operator++(int)
     {
         __forward_list_const_iterator __t(*this);
@@ -463,11 +463,11 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __forward_list_const_iterator& __x,
                     const __forward_list_const_iterator& __y)
         {return __x.__ptr_ == __y.__ptr_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __forward_list_const_iterator& __x,
                            const __forward_list_const_iterator& __y)
         {return !(__x == __y);}
@@ -499,41 +499,41 @@ protected:
 
     __compressed_pair<__begin_node, __node_allocator> __before_begin_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __begin_node_pointer        __before_begin() _NOEXCEPT
         {return pointer_traits<__begin_node_pointer>::pointer_to(__before_begin_.first());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __begin_node_pointer __before_begin() const _NOEXCEPT
         {return pointer_traits<__begin_node_pointer>::pointer_to(const_cast<__begin_node&>(__before_begin_.first()));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           __node_allocator& __alloc() _NOEXCEPT
             {return __before_begin_.second();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const __node_allocator& __alloc() const _NOEXCEPT
         {return __before_begin_.second();}
 
     typedef __forward_list_iterator<__node_pointer>             iterator;
     typedef __forward_list_const_iterator<__node_pointer>       const_iterator;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __forward_list_base()
         _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value)
         : __before_begin_(__begin_node(), __default_init_tag()) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __forward_list_base(const allocator_type& __a)
         : __before_begin_(__begin_node(), __node_allocator(__a)) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __forward_list_base(const __node_allocator& __a)
         : __before_begin_(__begin_node(), __a) {}
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __forward_list_base(__forward_list_base&& __x)
         _NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __forward_list_base(__forward_list_base&& __x, const allocator_type& __a);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 private:
     __forward_list_base(const __forward_list_base&);
@@ -543,12 +543,12 @@ public:
     ~__forward_list_base();
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const __forward_list_base& __x)
         {__copy_assign_alloc(__x, integral_constant<bool,
               __node_traits::propagate_on_container_copy_assignment::value>());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__forward_list_base& __x)
         _NOEXCEPT_(!__node_traits::propagate_on_container_move_assignment::value ||
                    is_nothrow_move_assignable<__node_allocator>::value)
@@ -556,9 +556,9 @@ protected:
               __node_traits::propagate_on_container_move_assignment::value>());}
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(__forward_list_base& __x)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT;
 #else
         _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value ||
@@ -568,9 +568,9 @@ protected:
     void clear() _NOEXCEPT;
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const __forward_list_base&, false_type) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const __forward_list_base& __x, true_type)
     {
         if (__alloc() != __x.__alloc())
@@ -578,22 +578,22 @@ private:
         __alloc() = __x.__alloc();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__forward_list_base&, false_type) _NOEXCEPT
         {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__forward_list_base& __x, true_type)
         _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value)
-        {__alloc() = _VSTD::move(__x.__alloc());}
+        {__alloc() = _CUDA_VSTD::move(__x.__alloc());}
 };
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Alloc>
 inline
 __forward_list_base<_Tp, _Alloc>::__forward_list_base(__forward_list_base&& __x)
         _NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value)
-    : __before_begin_(_VSTD::move(__x.__before_begin_))
+    : __before_begin_(_CUDA_VSTD::move(__x.__before_begin_))
 {
     __x.__before_begin()->__next_ = nullptr;
 }
@@ -611,7 +611,7 @@ __forward_list_base<_Tp, _Alloc>::__forward_list_base(__forward_list_base&& __x,
     }
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Alloc>
 __forward_list_base<_Tp, _Alloc>::~__forward_list_base()
@@ -623,16 +623,16 @@ template <class _Tp, class _Alloc>
 inline
 void
 __forward_list_base<_Tp, _Alloc>::swap(__forward_list_base& __x)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT
 #else
         _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value ||
                     __is_nothrow_swappable<__node_allocator>::value)
 #endif
 {
-    _VSTD::__swap_allocator(__alloc(), __x.__alloc(),
+    _CUDA_VSTD::__swap_allocator(__alloc(), __x.__alloc(),
             integral_constant<bool, __node_traits::propagate_on_container_swap::value>());
-    using _VSTD::swap;
+    using _CUDA_VSTD::swap;
     swap(__before_begin()->__next_, __x.__before_begin()->__next_);
 }
 
@@ -644,7 +644,7 @@ __forward_list_base<_Tp, _Alloc>::clear() _NOEXCEPT
     for (__node_pointer __p = __before_begin()->__next_; __p != nullptr;)
     {
         __node_pointer __next = __p->__next_;
-        __node_traits::destroy(__a, _VSTD::addressof(__p->__value_));
+        __node_traits::destroy(__a, _CUDA_VSTD::addressof(__p->__value_));
         __node_traits::deallocate(__a, __p, 1);
         __p = __next;
     }
@@ -652,7 +652,7 @@ __forward_list_base<_Tp, _Alloc>::clear() _NOEXCEPT
 }
 
 template <class _Tp, class _Alloc /*= allocator<_Tp>*/>
-class _LIBCPP_TEMPLATE_VIS forward_list
+class _LIBCUDACXX_TEMPLATE_VIS forward_list
     : private __forward_list_base<_Tp, _Alloc>
 {
     typedef __forward_list_base<_Tp, _Alloc> base;
@@ -678,20 +678,20 @@ public:
 
     typedef typename base::iterator       iterator;
     typedef typename base::const_iterator const_iterator;
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     typedef size_type                                __remove_return_type;
 #else
     typedef void                                     __remove_return_type;
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     forward_list()
         _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value)
         {} // = default;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit forward_list(const allocator_type& __a);
     explicit forward_list(size_type __n);
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     explicit forward_list(size_type __n, const allocator_type& __a);
 #endif
     forward_list(size_type __n, const value_type& __v);
@@ -714,28 +714,28 @@ public:
 
     forward_list& operator=(const forward_list& __x);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     forward_list(forward_list&& __x)
         _NOEXCEPT_(is_nothrow_move_constructible<base>::value)
-        : base(_VSTD::move(__x)) {}
+        : base(_CUDA_VSTD::move(__x)) {}
     forward_list(forward_list&& __x, const __type_identity_t<allocator_type>& __a);
 
     forward_list(initializer_list<value_type> __il);
     forward_list(initializer_list<value_type> __il, const allocator_type& __a);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     forward_list& operator=(forward_list&& __x)
         _NOEXCEPT_(
              __node_traits::propagate_on_container_move_assignment::value &&
              is_nothrow_move_assignable<allocator_type>::value);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     forward_list& operator=(initializer_list<value_type> __il);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void assign(initializer_list<value_type> __il);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     // ~forward_list() = default;
 
@@ -744,88 +744,88 @@ public:
         assign(_InputIterator __f, _InputIterator __l);
     void assign(size_type __n, const value_type& __v);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT
         {return allocator_type(base::__alloc());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       begin() _NOEXCEPT
         {return       iterator(base::__before_begin()->__next_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin() const _NOEXCEPT
         {return const_iterator(base::__before_begin()->__next_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       end() _NOEXCEPT
         {return       iterator(nullptr);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end() const _NOEXCEPT
         {return const_iterator(nullptr);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin() const _NOEXCEPT
         {return const_iterator(base::__before_begin()->__next_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend() const _NOEXCEPT
         {return const_iterator(nullptr);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       before_begin() _NOEXCEPT
         {return       iterator(base::__before_begin());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator before_begin() const _NOEXCEPT
         {return const_iterator(base::__before_begin());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbefore_begin() const _NOEXCEPT
         {return const_iterator(base::__before_begin());}
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool empty() const _NOEXCEPT
         {return base::__before_begin()->__next_ == nullptr;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT {
-        return _VSTD::min<size_type>(
+        return _CUDA_VSTD::min<size_type>(
             __node_traits::max_size(base::__alloc()),
             numeric_limits<
diff erence_type>::max());
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference       front()       {return base::__before_begin()->__next_->__value_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference front() const {return base::__before_begin()->__next_->__value_;}
 
-#ifndef _LIBCPP_CXX03_LANG
-#if _LIBCPP_STD_VER > 14
+#ifndef _LIBCUDACXX_CXX03_LANG
+#if _LIBCUDACXX_STD_VER > 14
     template <class... _Args> reference emplace_front(_Args&&... __args);
 #else
     template <class... _Args> void      emplace_front(_Args&&... __args);
 #endif
     void push_front(value_type&& __v);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
     void push_front(const value_type& __v);
 
     void pop_front();
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class... _Args>
         iterator emplace_after(const_iterator __p, _Args&&... __args);
 
     iterator insert_after(const_iterator __p, value_type&& __v);
     iterator insert_after(const_iterator __p, initializer_list<value_type> __il)
         {return insert_after(__p, __il.begin(), __il.end());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
     iterator insert_after(const_iterator __p, const value_type& __v);
     iterator insert_after(const_iterator __p, size_type __n, const value_type& __v);
     template <class _InputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value, iterator>
         insert_after(const_iterator __p, _InputIterator __f, _InputIterator __l);
 
     iterator erase_after(const_iterator __p);
     iterator erase_after(const_iterator __f, const_iterator __l);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(forward_list& __x)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT
 #else
         _NOEXCEPT_(!__node_traits::propagate_on_container_swap::value ||
@@ -835,14 +835,14 @@ public:
 
     void resize(size_type __n);
     void resize(size_type __n, const value_type& __v);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT {base::clear();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void splice_after(const_iterator __p, forward_list&& __x);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void splice_after(const_iterator __p, forward_list&& __x, const_iterator __i);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void splice_after(const_iterator __p, forward_list&& __x,
                       const_iterator __f, const_iterator __l);
     void splice_after(const_iterator __p, forward_list& __x);
@@ -851,32 +851,32 @@ public:
                       const_iterator __f, const_iterator __l);
     __remove_return_type remove(const value_type& __v);
     template <class _Predicate> __remove_return_type remove_if(_Predicate __pred);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __remove_return_type unique() {return unique(__equal_to<value_type>());}
     template <class _BinaryPredicate> __remove_return_type unique(_BinaryPredicate __binary_pred);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(forward_list&& __x) {merge(__x, __less<value_type>());}
     template <class _Compare>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void merge(forward_list&& __x, _Compare __comp)
-        {merge(__x, _VSTD::move(__comp));}
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+        {merge(__x, _CUDA_VSTD::move(__comp));}
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(forward_list& __x) {merge(__x, __less<value_type>());}
     template <class _Compare> void merge(forward_list& __x, _Compare __comp);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void sort() {sort(__less<value_type>());}
-    template <class _Compare> _LIBCPP_INLINE_VISIBILITY void sort(_Compare __comp);
+    template <class _Compare> _LIBCUDACXX_INLINE_VISIBILITY void sort(_Compare __comp);
     void reverse() _NOEXCEPT;
 
 private:
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     void __move_assign(forward_list& __x, true_type)
         _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
     void __move_assign(forward_list& __x, false_type);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     template <class _Compare>
         static
@@ -890,7 +890,7 @@ private:
 };
 
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator,
          class _Alloc = allocator<__iter_value_type<_InputIterator>>,
          class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>,
@@ -927,14 +927,14 @@ forward_list<_Tp, _Alloc>::forward_list(size_type __n)
                                                              __p = __p->__next_as_begin())
         {
             __h.reset(__node_traits::allocate(__a, 1));
-            __node_traits::construct(__a, _VSTD::addressof(__h->__value_));
+            __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_));
             __h->__next_ = nullptr;
             __p->__next_ = __h.release();
         }
     }
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp, class _Alloc>
 forward_list<_Tp, _Alloc>::forward_list(size_type __n,
                                         const allocator_type& __base_alloc)
@@ -949,7 +949,7 @@ forward_list<_Tp, _Alloc>::forward_list(size_type __n,
                                                              __p = __p->__next_as_begin())
         {
             __h.reset(__node_traits::allocate(__a, 1));
-            __node_traits::construct(__a, _VSTD::addressof(__h->__value_));
+            __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_));
             __h->__next_ = nullptr;
             __p->__next_ = __h.release();
         }
@@ -1000,7 +1000,7 @@ template <class _Tp, class _Alloc>
 forward_list<_Tp, _Alloc>&
 forward_list<_Tp, _Alloc>::operator=(const forward_list& __x)
 {
-    if (this != _VSTD::addressof(__x))
+    if (this != _CUDA_VSTD::addressof(__x))
     {
         base::__copy_assign_alloc(__x);
         assign(__x.begin(), __x.end());
@@ -1008,11 +1008,11 @@ forward_list<_Tp, _Alloc>::operator=(const forward_list& __x)
     return *this;
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Tp, class _Alloc>
 forward_list<_Tp, _Alloc>::forward_list(forward_list&& __x,
                                         const __type_identity_t<allocator_type>& __a)
-    : base(_VSTD::move(__x), __a)
+    : base(_CUDA_VSTD::move(__x), __a)
 {
     if (base::__alloc() != __x.__alloc())
     {
@@ -1081,7 +1081,7 @@ forward_list<_Tp, _Alloc>::operator=(initializer_list<value_type> __il)
     return *this;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Alloc>
 template <class _InputIterator>
@@ -1089,7 +1089,7 @@ __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value, void>
 forward_list<_Tp, _Alloc>::assign(_InputIterator __f, _InputIterator __l)
 {
     iterator __i = before_begin();
-    iterator __j = _VSTD::next(__i);
+    iterator __j = _CUDA_VSTD::next(__i);
     iterator __e = end();
     for (; __j != __e && __f != __l; ++__i, (void) ++__j, ++__f)
         *__j = *__f;
@@ -1104,7 +1104,7 @@ void
 forward_list<_Tp, _Alloc>::assign(size_type __n, const value_type& __v)
 {
     iterator __i = before_begin();
-    iterator __j = _VSTD::next(__i);
+    iterator __j = _CUDA_VSTD::next(__i);
     iterator __e = end();
     for (; __j != __e && __n > 0; --__n, ++__i, ++__j)
         *__j = __v;
@@ -1114,7 +1114,7 @@ forward_list<_Tp, _Alloc>::assign(size_type __n, const value_type& __v)
         erase_after(__i, __e);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Alloc>
 inline
@@ -1126,7 +1126,7 @@ forward_list<_Tp, _Alloc>::assign(initializer_list<value_type> __il)
 
 template <class _Tp, class _Alloc>
 template <class... _Args>
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 typename forward_list<_Tp, _Alloc>::reference
 #else
 void
@@ -1136,11 +1136,11 @@ forward_list<_Tp, _Alloc>::emplace_front(_Args&&... __args)
     __node_allocator& __a = base::__alloc();
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
-    __node_traits::construct(__a, _VSTD::addressof(__h->__value_),
-                                  _VSTD::forward<_Args>(__args)...);
+    __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_),
+                                  _CUDA_VSTD::forward<_Args>(__args)...);
     __h->__next_ = base::__before_begin()->__next_;
     base::__before_begin()->__next_ = __h.release();
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     return base::__before_begin()->__next_->__value_;
 #endif
 }
@@ -1152,12 +1152,12 @@ forward_list<_Tp, _Alloc>::push_front(value_type&& __v)
     __node_allocator& __a = base::__alloc();
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
-    __node_traits::construct(__a, _VSTD::addressof(__h->__value_), _VSTD::move(__v));
+    __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_), _CUDA_VSTD::move(__v));
     __h->__next_ = base::__before_begin()->__next_;
     base::__before_begin()->__next_ = __h.release();
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Alloc>
 void
@@ -1166,7 +1166,7 @@ forward_list<_Tp, _Alloc>::push_front(const value_type& __v)
     __node_allocator& __a = base::__alloc();
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
-    __node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
+    __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_), __v);
     __h->__next_ = base::__before_begin()->__next_;
     base::__before_begin()->__next_ = __h.release();
 }
@@ -1178,11 +1178,11 @@ forward_list<_Tp, _Alloc>::pop_front()
     __node_allocator& __a = base::__alloc();
     __node_pointer __p = base::__before_begin()->__next_;
     base::__before_begin()->__next_ = __p->__next_;
-    __node_traits::destroy(__a, _VSTD::addressof(__p->__value_));
+    __node_traits::destroy(__a, _CUDA_VSTD::addressof(__p->__value_));
     __node_traits::deallocate(__a, __p, 1);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Alloc>
 template <class... _Args>
@@ -1193,8 +1193,8 @@ forward_list<_Tp, _Alloc>::emplace_after(const_iterator __p, _Args&&... __args)
     __node_allocator& __a = base::__alloc();
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
-    __node_traits::construct(__a, _VSTD::addressof(__h->__value_),
-                                  _VSTD::forward<_Args>(__args)...);
+    __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_),
+                                  _CUDA_VSTD::forward<_Args>(__args)...);
     __h->__next_ = __r->__next_;
     __r->__next_ = __h.release();
     return iterator(__r->__next_);
@@ -1208,13 +1208,13 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, value_type&& __v)
     __node_allocator& __a = base::__alloc();
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
-    __node_traits::construct(__a, _VSTD::addressof(__h->__value_), _VSTD::move(__v));
+    __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_), _CUDA_VSTD::move(__v));
     __h->__next_ = __r->__next_;
     __r->__next_ = __h.release();
     return iterator(__r->__next_);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Alloc>
 typename forward_list<_Tp, _Alloc>::iterator
@@ -1224,7 +1224,7 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, const value_type& __
     __node_allocator& __a = base::__alloc();
     typedef __allocator_destructor<__node_allocator> _Dp;
     unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
-    __node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
+    __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_), __v);
     __h->__next_ = __r->__next_;
     __r->__next_ = __h.release();
     return iterator(__r->__next_);
@@ -1241,33 +1241,33 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p, size_type __n,
         __node_allocator& __a = base::__alloc();
         typedef __allocator_destructor<__node_allocator> _Dp;
         unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
-        __node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
+        __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_), __v);
         __node_pointer __first = __h.release();
         __node_pointer __last = __first;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (--__n; __n != 0; --__n, __last = __last->__next_)
             {
                 __h.reset(__node_traits::allocate(__a, 1));
-                __node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
+                __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_), __v);
                 __last->__next_ = __h.release();
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             while (__first != nullptr)
             {
                 __node_pointer __next = __first->__next_;
-                __node_traits::destroy(__a, _VSTD::addressof(__first->__value_));
+                __node_traits::destroy(__a, _CUDA_VSTD::addressof(__first->__value_));
                 __node_traits::deallocate(__a, __first, 1);
                 __first = __next;
             }
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __last->__next_ = __r->__next_;
         __r->__next_ = __first;
         __r = static_cast<__begin_node_pointer>(__last);
@@ -1287,33 +1287,33 @@ forward_list<_Tp, _Alloc>::insert_after(const_iterator __p,
         __node_allocator& __a = base::__alloc();
         typedef __allocator_destructor<__node_allocator> _Dp;
         unique_ptr<__node, _Dp> __h(__node_traits::allocate(__a, 1), _Dp(__a, 1));
-        __node_traits::construct(__a, _VSTD::addressof(__h->__value_), *__f);
+        __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_), *__f);
         __node_pointer __first = __h.release();
         __node_pointer __last = __first;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (++__f; __f != __l; ++__f, ((void)(__last = __last->__next_)))
             {
                 __h.reset(__node_traits::allocate(__a, 1));
-                __node_traits::construct(__a, _VSTD::addressof(__h->__value_), *__f);
+                __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_), *__f);
                 __last->__next_ = __h.release();
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             while (__first != nullptr)
             {
                 __node_pointer __next = __first->__next_;
-                __node_traits::destroy(__a, _VSTD::addressof(__first->__value_));
+                __node_traits::destroy(__a, _CUDA_VSTD::addressof(__first->__value_));
                 __node_traits::deallocate(__a, __first, 1);
                 __first = __next;
             }
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __last->__next_ = __r->__next_;
         __r->__next_ = __first;
         __r = static_cast<__begin_node_pointer>(__last);
@@ -1329,7 +1329,7 @@ forward_list<_Tp, _Alloc>::erase_after(const_iterator __f)
     __node_pointer __n = __p->__next_;
     __p->__next_ = __n->__next_;
     __node_allocator& __a = base::__alloc();
-    __node_traits::destroy(__a, _VSTD::addressof(__n->__value_));
+    __node_traits::destroy(__a, _CUDA_VSTD::addressof(__n->__value_));
     __node_traits::deallocate(__a, __n, 1);
     return iterator(__p->__next_);
 }
@@ -1351,7 +1351,7 @@ forward_list<_Tp, _Alloc>::erase_after(const_iterator __f, const_iterator __l)
             do
             {
                 __node_pointer __tmp = __n->__next_;
-                __node_traits::destroy(__a, _VSTD::addressof(__n->__value_));
+                __node_traits::destroy(__a, _CUDA_VSTD::addressof(__n->__value_));
                 __node_traits::deallocate(__a, __n, 1);
                 __n = __tmp;
             } while (__n != __e);
@@ -1384,7 +1384,7 @@ forward_list<_Tp, _Alloc>::resize(size_type __n)
                                                          __ptr = __ptr->__next_as_begin())
             {
                 __h.reset(__node_traits::allocate(__a, 1));
-                __node_traits::construct(__a, _VSTD::addressof(__h->__value_));
+                __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_));
                 __h->__next_ = nullptr;
                 __ptr->__next_ = __h.release();
             }
@@ -1416,7 +1416,7 @@ forward_list<_Tp, _Alloc>::resize(size_type __n, const value_type& __v)
                                                          __ptr = __ptr->__next_as_begin())
             {
                 __h.reset(__node_traits::allocate(__a, 1));
-                __node_traits::construct(__a, _VSTD::addressof(__h->__value_), __v);
+                __node_traits::construct(__a, _CUDA_VSTD::addressof(__h->__value_), __v);
                 __h->__next_ = nullptr;
                 __ptr->__next_ = __h.release();
             }
@@ -1449,7 +1449,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
                                         forward_list& /*__other*/,
                                         const_iterator __i)
 {
-    const_iterator __lm1 = _VSTD::next(__i);
+    const_iterator __lm1 = _CUDA_VSTD::next(__i);
     if (__p != __i && __p != __lm1)
     {
         __i.__get_begin()->__next_ = __lm1.__get_begin()->__next_;
@@ -1479,7 +1479,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
                                         forward_list&& __x)
@@ -1488,7 +1488,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
                                         forward_list&& __x,
@@ -1498,7 +1498,7 @@ forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 forward_list<_Tp, _Alloc>::splice_after(const_iterator __p,
                                         forward_list&& __x,
@@ -1519,7 +1519,7 @@ forward_list<_Tp, _Alloc>::remove(const value_type& __v)
         if (__i.__get_begin()->__next_->__value_ == __v)
         {
             ++__count_removed;
-            iterator __j = _VSTD::next(__i, 2);
+            iterator __j = _CUDA_VSTD::next(__i, 2);
             for (; __j != __e && *__j == __v; ++__j)
                 ++__count_removed;
             __deleted_nodes.splice_after(__deleted_nodes.before_begin(), *this, __i, __j);
@@ -1547,7 +1547,7 @@ forward_list<_Tp, _Alloc>::remove_if(_Predicate __pred)
         if (__pred(__i.__get_begin()->__next_->__value_))
         {
             ++__count_removed;
-            iterator __j = _VSTD::next(__i, 2);
+            iterator __j = _CUDA_VSTD::next(__i, 2);
             for (; __j != __e && __pred(*__j); ++__j)
                 ++__count_removed;
             __deleted_nodes.splice_after(__deleted_nodes.before_begin(), *this, __i, __j);
@@ -1571,7 +1571,7 @@ forward_list<_Tp, _Alloc>::unique(_BinaryPredicate __binary_pred)
     typename forward_list<_Tp, _Alloc>::size_type __count_removed = 0;
     for (iterator __i = begin(), __e = end(); __i != __e;)
     {
-        iterator __j = _VSTD::next(__i);
+        iterator __j = _CUDA_VSTD::next(__i);
         for (; __j != __e && __binary_pred(*__i, *__j); ++__j)
             ++__count_removed;
         if (__i.__get_begin()->__next_ != __j.__get_unsafe_node_pointer())
@@ -1587,7 +1587,7 @@ template <class _Compare>
 void
 forward_list<_Tp, _Alloc>::merge(forward_list& __x, _Compare __comp)
 {
-    if (this != _VSTD::addressof(__x))
+    if (this != _CUDA_VSTD::addressof(__x))
     {
         base::__before_begin()->__next_ = __merge(base::__before_begin()->__next_,
                                                     __x.__before_begin()->__next_,
@@ -1648,7 +1648,7 @@ void
 forward_list<_Tp, _Alloc>::sort(_Compare __comp)
 {
     base::__before_begin()->__next_ = __sort(base::__before_begin()->__next_,
-                                       _VSTD::distance(begin(), end()), __comp);
+                                       _CUDA_VSTD::distance(begin(), end()), __comp);
 }
 
 template <class _Tp, class _Alloc>
@@ -1674,7 +1674,7 @@ forward_list<_Tp, _Alloc>::__sort(__node_pointer __f1, 
diff erence_type __sz,
     }
     
diff erence_type __sz1 = __sz / 2;
     
diff erence_type __sz2 = __sz - __sz1;
-    __node_pointer __t = _VSTD::next(iterator(__f1), __sz1 - 1).__get_unsafe_node_pointer();
+    __node_pointer __t = _CUDA_VSTD::next(iterator(__f1), __sz1 - 1).__get_unsafe_node_pointer();
     __node_pointer __f2 = __t->__next_;
     __t->__next_ = nullptr;
     return __merge(__sort(__f1, __sz1, __comp),
@@ -1718,7 +1718,7 @@ bool operator==(const forward_list<_Tp, _Alloc>& __x,
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator!=(const forward_list<_Tp, _Alloc>& __x,
                 const forward_list<_Tp, _Alloc>& __y)
 {
@@ -1726,16 +1726,16 @@ bool operator!=(const forward_list<_Tp, _Alloc>& __x,
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator< (const forward_list<_Tp, _Alloc>& __x,
                 const forward_list<_Tp, _Alloc>& __y)
 {
-    return _VSTD::lexicographical_compare(__x.begin(), __x.end(),
+    return _CUDA_VSTD::lexicographical_compare(__x.begin(), __x.end(),
                                          __y.begin(), __y.end());
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator> (const forward_list<_Tp, _Alloc>& __x,
                 const forward_list<_Tp, _Alloc>& __y)
 {
@@ -1743,7 +1743,7 @@ bool operator> (const forward_list<_Tp, _Alloc>& __x,
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator>=(const forward_list<_Tp, _Alloc>& __x,
                 const forward_list<_Tp, _Alloc>& __y)
 {
@@ -1751,7 +1751,7 @@ bool operator>=(const forward_list<_Tp, _Alloc>& __x,
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator<=(const forward_list<_Tp, _Alloc>& __x,
                 const forward_list<_Tp, _Alloc>& __y)
 {
@@ -1759,7 +1759,7 @@ bool operator<=(const forward_list<_Tp, _Alloc>& __x,
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(forward_list<_Tp, _Alloc>& __x, forward_list<_Tp, _Alloc>& __y)
     _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
@@ -1767,24 +1767,24 @@ swap(forward_list<_Tp, _Alloc>& __x, forward_list<_Tp, _Alloc>& __y)
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Tp, class _Allocator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
     typename forward_list<_Tp, _Allocator>::size_type
     erase_if(forward_list<_Tp, _Allocator>& __c, _Predicate __pred) {
   return __c.remove_if(__pred);
 }
 
 template <class _Tp, class _Allocator, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
     typename forward_list<_Tp, _Allocator>::size_type
     erase(forward_list<_Tp, _Allocator>& __c, const _Up& __v) {
-  return _VSTD::erase_if(__c, [&](auto& __elem) { return __elem == __v; });
+  return _CUDA_VSTD::erase_if(__c, [&](auto& __elem) { return __elem == __v; });
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_FORWARD_LIST
+#endif // _LIBCUDACXX_FORWARD_LIST

diff  --git a/libcxx/include/fstream b/libcxx/include/fstream
index ffa75b14eb15..de5a5f37a9e8 100644
--- a/libcxx/include/fstream
+++ b/libcxx/include/fstream
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_FSTREAM
-#define _LIBCPP_FSTREAM
+#ifndef _LIBCUDACXX_FSTREAM
+#define _LIBCUDACXX_FSTREAM
 
 /*
     fstream synopsis
@@ -194,25 +194,25 @@ typedef basic_fstream<wchar_t> wfstream;
 #include <ostream>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
+#if !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
 #   include <filesystem>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-#if defined(_LIBCPP_MSVCRT) || defined(_NEWLIB_VERSION)
-#  define _LIBCPP_HAS_NO_OFF_T_FUNCTIONS
+#if defined(_LIBCUDACXX_MSVCRT) || defined(_NEWLIB_VERSION)
+#  define _LIBCUDACXX_HAS_NO_OFF_T_FUNCTIONS
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_filebuf
+class _LIBCUDACXX_TEMPLATE_VIS basic_filebuf
     : public basic_streambuf<_CharT, _Traits>
 {
 public:
@@ -229,31 +229,31 @@ public:
     virtual ~basic_filebuf();
 
     // 27.9.1.3 Assign/swap:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_filebuf& operator=(basic_filebuf&& __rhs);
     void swap(basic_filebuf& __rhs);
 
     // 27.9.1.4 Members:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool is_open() const;
     basic_filebuf* open(const char* __s, ios_base::openmode __mode);
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
     basic_filebuf* open(const wchar_t* __s, ios_base::openmode __mode);
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_filebuf* open(const string& __s, ios_base::openmode __mode);
 
-#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
-    _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER >= 17 && !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
+    _LIBCUDACXX_AVAILABILITY_FILESYSTEM _LIBCUDACXX_INLINE_VISIBILITY
     basic_filebuf* open(const _VSTD_FS::path& __p, ios_base::openmode __mode) {
       return open(__p.c_str(), __mode);
     }
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_filebuf* __open(int __fd, ios_base::openmode __mode);
     basic_filebuf* close();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     inline static const char*
     __make_mdstring(ios_base::openmode __mode) _NOEXCEPT;
 
@@ -395,17 +395,17 @@ basic_filebuf<_CharT, _Traits>::operator=(basic_filebuf&& __rhs)
 template <class _CharT, class _Traits>
 basic_filebuf<_CharT, _Traits>::~basic_filebuf()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         close();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     if (__owns_eb_)
         delete [] __extbuf_;
     if (__owns_ib_)
@@ -457,18 +457,18 @@ basic_filebuf<_CharT, _Traits>::swap(basic_filebuf& __rhs)
         __rhs.__extbufnext_ = __rhs.__extbuf_ + __ln;
         __rhs.__extbufend_ = __rhs.__extbuf_ + __le;
     }
-    _VSTD::swap(__ebs_, __rhs.__ebs_);
-    _VSTD::swap(__intbuf_, __rhs.__intbuf_);
-    _VSTD::swap(__ibs_, __rhs.__ibs_);
-    _VSTD::swap(__file_, __rhs.__file_);
-    _VSTD::swap(__cv_, __rhs.__cv_);
-    _VSTD::swap(__st_, __rhs.__st_);
-    _VSTD::swap(__st_last_, __rhs.__st_last_);
-    _VSTD::swap(__om_, __rhs.__om_);
-    _VSTD::swap(__cm_, __rhs.__cm_);
-    _VSTD::swap(__owns_eb_, __rhs.__owns_eb_);
-    _VSTD::swap(__owns_ib_, __rhs.__owns_ib_);
-    _VSTD::swap(__always_noconv_, __rhs.__always_noconv_);
+    _CUDA_VSTD::swap(__ebs_, __rhs.__ebs_);
+    _CUDA_VSTD::swap(__intbuf_, __rhs.__intbuf_);
+    _CUDA_VSTD::swap(__ibs_, __rhs.__ibs_);
+    _CUDA_VSTD::swap(__file_, __rhs.__file_);
+    _CUDA_VSTD::swap(__cv_, __rhs.__cv_);
+    _CUDA_VSTD::swap(__st_, __rhs.__st_);
+    _CUDA_VSTD::swap(__st_last_, __rhs.__st_last_);
+    _CUDA_VSTD::swap(__om_, __rhs.__om_);
+    _CUDA_VSTD::swap(__cm_, __rhs.__cm_);
+    _CUDA_VSTD::swap(__owns_eb_, __rhs.__owns_eb_);
+    _CUDA_VSTD::swap(__owns_ib_, __rhs.__owns_ib_);
+    _CUDA_VSTD::swap(__always_noconv_, __rhs.__always_noconv_);
     if (this->eback() == (char_type*)__rhs.__extbuf_min_)
     {
         ptr
diff _t __n = this->gptr() - this->eback();
@@ -504,7 +504,7 @@ basic_filebuf<_CharT, _Traits>::swap(basic_filebuf& __rhs)
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(basic_filebuf<_CharT, _Traits>& __x, basic_filebuf<_CharT, _Traits>& __y)
 {
@@ -525,38 +525,38 @@ const char* basic_filebuf<_CharT, _Traits>::__make_mdstring(
   switch (__mode & ~ios_base::ate) {
   case ios_base::out:
   case ios_base::out | ios_base::trunc:
-    return "w" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "w" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   case ios_base::out | ios_base::app:
   case ios_base::app:
-    return "a" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "a" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   case ios_base::in:
-    return "r" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "r" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   case ios_base::in | ios_base::out:
-    return "r+" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "r+" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   case ios_base::in | ios_base::out | ios_base::trunc:
-    return "w+" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "w+" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   case ios_base::in | ios_base::out | ios_base::app:
   case ios_base::in | ios_base::app:
-    return "a+" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "a+" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   case ios_base::out | ios_base::binary:
   case ios_base::out | ios_base::trunc | ios_base::binary:
-    return "wb" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "wb" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   case ios_base::out | ios_base::app | ios_base::binary:
   case ios_base::app | ios_base::binary:
-    return "ab" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "ab" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   case ios_base::in | ios_base::binary:
-    return "rb" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "rb" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   case ios_base::in | ios_base::out | ios_base::binary:
-    return "r+b" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "r+b" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   case ios_base::in | ios_base::out | ios_base::trunc | ios_base::binary:
-    return "w+b" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "w+b" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   case ios_base::in | ios_base::out | ios_base::app | ios_base::binary:
   case ios_base::in | ios_base::app | ios_base::binary:
-    return "a+b" _LIBCPP_FOPEN_CLOEXEC_MODE;
+    return "a+b" _LIBCUDACXX_FOPEN_CLOEXEC_MODE;
   default:
     return nullptr;
   }
-  __libcpp_unreachable();
+  __LIBCUDACXX_unreachable();
 }
 
 template <class _CharT, class _Traits>
@@ -610,7 +610,7 @@ basic_filebuf<_CharT, _Traits>::__open(int __fd, ios_base::openmode __mode) {
   return __rt;
 }
 
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
 // This is basically the same as the char* overload except that it uses _wfopen
 // and long mode strings.
 template <class _CharT, class _Traits>
@@ -735,7 +735,7 @@ basic_filebuf<_CharT, _Traits>::underflow()
     int_type __c = traits_type::eof();
     if (this->gptr() == this->egptr())
     {
-        _VSTD::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type));
+        _CUDA_VSTD::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type));
         if (__always_noconv_)
         {
             size_t __nmemb = static_cast<size_t>(this->egptr() - this->eback() - __unget_sz);
@@ -750,12 +750,12 @@ basic_filebuf<_CharT, _Traits>::underflow()
         }
         else
         {
-            _LIBCPP_ASSERT ( !(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" );
+            _LIBCUDACXX_ASSERT ( !(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" );
             if (__extbufend_ != __extbufnext_)
-                _VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_);
+                _CUDA_VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_);
             __extbufnext_ = __extbuf_ + (__extbufend_ - __extbufnext_);
             __extbufend_ = __extbuf_ + (__extbuf_ == __extbuf_min_ ? sizeof(__extbuf_min_) : __ebs_);
-            size_t __nmemb = _VSTD::min(static_cast<size_t>(__ibs_ - __unget_sz),
+            size_t __nmemb = _CUDA_VSTD::min(static_cast<size_t>(__ibs_ - __unget_sz),
                                  static_cast<size_t>(__extbufend_ - __extbufnext_));
             codecvt_base::result __r;
             __st_last_ = __st_;
@@ -958,7 +958,7 @@ basic_filebuf<_CharT, _Traits>::seekoff(off_type __off, ios_base::seekdir __way,
     default:
         return pos_type(off_type(-1));
     }
-#if defined(_LIBCPP_HAS_NO_OFF_T_FUNCTIONS)
+#if defined(_LIBCUDACXX_HAS_NO_OFF_T_FUNCTIONS)
     if (fseek(__file_, __width > 0 ? __width * __off : 0, __whence))
         return pos_type(off_type(-1));
     pos_type __r = ftell(__file_);
@@ -977,7 +977,7 @@ basic_filebuf<_CharT, _Traits>::seekpos(pos_type __sp, ios_base::openmode)
 {
     if (__file_ == nullptr || sync())
         return pos_type(off_type(-1));
-#if defined(_LIBCPP_HAS_NO_OFF_T_FUNCTIONS)
+#if defined(_LIBCUDACXX_HAS_NO_OFF_T_FUNCTIONS)
     if (fseek(__file_, __sp, SEEK_SET))
         return pos_type(off_type(-1));
 #else
@@ -1041,7 +1041,7 @@ basic_filebuf<_CharT, _Traits>::sync()
                 }
             }
         }
-#if defined(_LIBCPP_HAS_NO_OFF_T_FUNCTIONS)
+#if defined(_LIBCUDACXX_HAS_NO_OFF_T_FUNCTIONS)
         if (fseek(__file_, -__c, SEEK_CUR))
             return -1;
 #else
@@ -1144,7 +1144,7 @@ basic_filebuf<_CharT, _Traits>::__write_mode()
 // basic_ifstream
 
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_ifstream
+class _LIBCUDACXX_TEMPLATE_VIS basic_ifstream
     : public basic_istream<_CharT, _Traits>
 {
 public:
@@ -1154,48 +1154,48 @@ public:
     typedef typename traits_type::pos_type pos_type;
     typedef typename traits_type::off_type off_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ifstream();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in);
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
-    _LIBCPP_INLINE_VISIBILITY
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_ifstream(const wchar_t* __s, ios_base::openmode __mode = ios_base::in);
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_ifstream(const string& __s, ios_base::openmode __mode = ios_base::in);
-#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
-    _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER >= 17 && !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
+    _LIBCUDACXX_AVAILABILITY_FILESYSTEM _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_ifstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in)
       : basic_ifstream(__p.c_str(), __mode) {}
-#endif // _LIBCPP_STD_VER >= 17
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_STD_VER >= 17
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ifstream(basic_ifstream&& __rhs);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ifstream& operator=(basic_ifstream&& __rhs);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(basic_ifstream& __rhs);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_filebuf<char_type, traits_type>* rdbuf() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool is_open() const;
     void open(const char* __s, ios_base::openmode __mode = ios_base::in);
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
     void open(const wchar_t* __s, ios_base::openmode __mode = ios_base::in);
 #endif
     void open(const string& __s, ios_base::openmode __mode = ios_base::in);
-#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
-    _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER >= 17 && !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
+    _LIBCUDACXX_AVAILABILITY_FILESYSTEM _LIBCUDACXX_INLINE_VISIBILITY
     void open(const filesystem::path& __p,
               ios_base::openmode __mode = ios_base::in) {
       return open(__p.c_str(), __mode);
     }
-#endif // _LIBCPP_STD_VER >= 17
+#endif // _LIBCUDACXX_STD_VER >= 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __open(int __fd, ios_base::openmode __mode);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void close();
 
 private:
@@ -1218,7 +1218,7 @@ basic_ifstream<_CharT, _Traits>::basic_ifstream(const char* __s, ios_base::openm
         this->setstate(ios_base::failbit);
 }
 
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
 template <class _CharT, class _Traits>
 inline
 basic_ifstream<_CharT, _Traits>::basic_ifstream(const wchar_t* __s, ios_base::openmode __mode)
@@ -1241,8 +1241,8 @@ basic_ifstream<_CharT, _Traits>::basic_ifstream(const string& __s, ios_base::ope
 template <class _CharT, class _Traits>
 inline
 basic_ifstream<_CharT, _Traits>::basic_ifstream(basic_ifstream&& __rhs)
-    : basic_istream<char_type, traits_type>(_VSTD::move(__rhs)),
-      __sb_(_VSTD::move(__rhs.__sb_))
+    : basic_istream<char_type, traits_type>(_CUDA_VSTD::move(__rhs)),
+      __sb_(_CUDA_VSTD::move(__rhs.__sb_))
 {
     this->set_rdbuf(&__sb_);
 }
@@ -1252,8 +1252,8 @@ inline
 basic_ifstream<_CharT, _Traits>&
 basic_ifstream<_CharT, _Traits>::operator=(basic_ifstream&& __rhs)
 {
-    basic_istream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
-    __sb_ = _VSTD::move(__rhs.__sb_);
+    basic_istream<char_type, traits_type>::operator=(_CUDA_VSTD::move(__rhs));
+    __sb_ = _CUDA_VSTD::move(__rhs.__sb_);
     return *this;
 }
 
@@ -1267,7 +1267,7 @@ basic_ifstream<_CharT, _Traits>::swap(basic_ifstream& __rhs)
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(basic_ifstream<_CharT, _Traits>& __x, basic_ifstream<_CharT, _Traits>& __y)
 {
@@ -1300,7 +1300,7 @@ basic_ifstream<_CharT, _Traits>::open(const char* __s, ios_base::openmode __mode
         this->setstate(ios_base::failbit);
 }
 
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
 template <class _CharT, class _Traits>
 void
 basic_ifstream<_CharT, _Traits>::open(const wchar_t* __s, ios_base::openmode __mode)
@@ -1344,7 +1344,7 @@ basic_ifstream<_CharT, _Traits>::close()
 // basic_ofstream
 
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_ofstream
+class _LIBCUDACXX_TEMPLATE_VIS basic_ofstream
     : public basic_ostream<_CharT, _Traits>
 {
 public:
@@ -1354,49 +1354,49 @@ public:
     typedef typename traits_type::pos_type pos_type;
     typedef typename traits_type::off_type off_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ofstream();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_ofstream(const char* __s, ios_base::openmode __mode = ios_base::out);
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
-    _LIBCPP_INLINE_VISIBILITY
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_ofstream(const wchar_t* __s, ios_base::openmode __mode = ios_base::out);
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_ofstream(const string& __s, ios_base::openmode __mode = ios_base::out);
 
-#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
-    _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER >= 17 && !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
+    _LIBCUDACXX_AVAILABILITY_FILESYSTEM _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_ofstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::out)
       : basic_ofstream(__p.c_str(), __mode) {}
-#endif // _LIBCPP_STD_VER >= 17
+#endif // _LIBCUDACXX_STD_VER >= 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ofstream(basic_ofstream&& __rhs);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ofstream& operator=(basic_ofstream&& __rhs);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(basic_ofstream& __rhs);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_filebuf<char_type, traits_type>* rdbuf() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool is_open() const;
     void open(const char* __s, ios_base::openmode __mode = ios_base::out);
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
     void open(const wchar_t* __s, ios_base::openmode __mode = ios_base::out);
 #endif
     void open(const string& __s, ios_base::openmode __mode = ios_base::out);
 
-#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
-    _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER >= 17 && !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
+    _LIBCUDACXX_AVAILABILITY_FILESYSTEM _LIBCUDACXX_INLINE_VISIBILITY
     void open(const filesystem::path& __p, ios_base::openmode __mode = ios_base::out)
     { return open(__p.c_str(), __mode); }
-#endif // _LIBCPP_STD_VER >= 17
+#endif // _LIBCUDACXX_STD_VER >= 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __open(int __fd, ios_base::openmode __mode);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void close();
 
 private:
@@ -1419,7 +1419,7 @@ basic_ofstream<_CharT, _Traits>::basic_ofstream(const char* __s, ios_base::openm
         this->setstate(ios_base::failbit);
 }
 
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
 template <class _CharT, class _Traits>
 inline
 basic_ofstream<_CharT, _Traits>::basic_ofstream(const wchar_t* __s, ios_base::openmode __mode)
@@ -1442,8 +1442,8 @@ basic_ofstream<_CharT, _Traits>::basic_ofstream(const string& __s, ios_base::ope
 template <class _CharT, class _Traits>
 inline
 basic_ofstream<_CharT, _Traits>::basic_ofstream(basic_ofstream&& __rhs)
-    : basic_ostream<char_type, traits_type>(_VSTD::move(__rhs)),
-      __sb_(_VSTD::move(__rhs.__sb_))
+    : basic_ostream<char_type, traits_type>(_CUDA_VSTD::move(__rhs)),
+      __sb_(_CUDA_VSTD::move(__rhs.__sb_))
 {
     this->set_rdbuf(&__sb_);
 }
@@ -1453,8 +1453,8 @@ inline
 basic_ofstream<_CharT, _Traits>&
 basic_ofstream<_CharT, _Traits>::operator=(basic_ofstream&& __rhs)
 {
-    basic_ostream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
-    __sb_ = _VSTD::move(__rhs.__sb_);
+    basic_ostream<char_type, traits_type>::operator=(_CUDA_VSTD::move(__rhs));
+    __sb_ = _CUDA_VSTD::move(__rhs.__sb_);
     return *this;
 }
 
@@ -1468,7 +1468,7 @@ basic_ofstream<_CharT, _Traits>::swap(basic_ofstream& __rhs)
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(basic_ofstream<_CharT, _Traits>& __x, basic_ofstream<_CharT, _Traits>& __y)
 {
@@ -1501,7 +1501,7 @@ basic_ofstream<_CharT, _Traits>::open(const char* __s, ios_base::openmode __mode
         this->setstate(ios_base::failbit);
 }
 
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
 template <class _CharT, class _Traits>
 void
 basic_ofstream<_CharT, _Traits>::open(const wchar_t* __s, ios_base::openmode __mode)
@@ -1545,7 +1545,7 @@ basic_ofstream<_CharT, _Traits>::close()
 // basic_fstream
 
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_fstream
+class _LIBCUDACXX_TEMPLATE_VIS basic_fstream
     : public basic_iostream<_CharT, _Traits>
 {
 public:
@@ -1555,49 +1555,49 @@ public:
     typedef typename traits_type::pos_type pos_type;
     typedef typename traits_type::off_type off_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_fstream();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_fstream(const char* __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
-    _LIBCPP_INLINE_VISIBILITY
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_fstream(const wchar_t* __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_fstream(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
 
-#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
-    _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER >= 17 && !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
+    _LIBCUDACXX_AVAILABILITY_FILESYSTEM _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_fstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in | ios_base::out)
       : basic_fstream(__p.c_str(), __mode) {}
-#endif // _LIBCPP_STD_VER >= 17
+#endif // _LIBCUDACXX_STD_VER >= 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_fstream(basic_fstream&& __rhs);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_fstream& operator=(basic_fstream&& __rhs);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(basic_fstream& __rhs);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_filebuf<char_type, traits_type>* rdbuf() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool is_open() const;
     void open(const char* __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
     void open(const wchar_t* __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
 #endif
     void open(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
 
-#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
-    _LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER >= 17 && !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
+    _LIBCUDACXX_AVAILABILITY_FILESYSTEM _LIBCUDACXX_INLINE_VISIBILITY
     void open(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in|ios_base::out)
     { return open(__p.c_str(), __mode); }
-#endif // _LIBCPP_STD_VER >= 17
+#endif // _LIBCUDACXX_STD_VER >= 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void close();
 
 private:
@@ -1620,7 +1620,7 @@ basic_fstream<_CharT, _Traits>::basic_fstream(const char* __s, ios_base::openmod
         this->setstate(ios_base::failbit);
 }
 
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
 template <class _CharT, class _Traits>
 inline
 basic_fstream<_CharT, _Traits>::basic_fstream(const wchar_t* __s, ios_base::openmode __mode)
@@ -1643,8 +1643,8 @@ basic_fstream<_CharT, _Traits>::basic_fstream(const string& __s, ios_base::openm
 template <class _CharT, class _Traits>
 inline
 basic_fstream<_CharT, _Traits>::basic_fstream(basic_fstream&& __rhs)
-    : basic_iostream<char_type, traits_type>(_VSTD::move(__rhs)),
-      __sb_(_VSTD::move(__rhs.__sb_))
+    : basic_iostream<char_type, traits_type>(_CUDA_VSTD::move(__rhs)),
+      __sb_(_CUDA_VSTD::move(__rhs.__sb_))
 {
     this->set_rdbuf(&__sb_);
 }
@@ -1654,8 +1654,8 @@ inline
 basic_fstream<_CharT, _Traits>&
 basic_fstream<_CharT, _Traits>::operator=(basic_fstream&& __rhs)
 {
-    basic_iostream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
-    __sb_ = _VSTD::move(__rhs.__sb_);
+    basic_iostream<char_type, traits_type>::operator=(_CUDA_VSTD::move(__rhs));
+    __sb_ = _CUDA_VSTD::move(__rhs.__sb_);
     return *this;
 }
 
@@ -1669,7 +1669,7 @@ basic_fstream<_CharT, _Traits>::swap(basic_fstream& __rhs)
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(basic_fstream<_CharT, _Traits>& __x, basic_fstream<_CharT, _Traits>& __y)
 {
@@ -1702,7 +1702,7 @@ basic_fstream<_CharT, _Traits>::open(const char* __s, ios_base::openmode __mode)
         this->setstate(ios_base::failbit);
 }
 
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
 template <class _CharT, class _Traits>
 void
 basic_fstream<_CharT, _Traits>::open(const wchar_t* __s, ios_base::openmode __mode)
@@ -1733,14 +1733,14 @@ basic_fstream<_CharT, _Traits>::close()
         this->setstate(ios_base::failbit);
 }
 
-#if defined(_LIBCPP_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1)
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ifstream<char>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ofstream<char>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_filebuf<char>;
+#if defined(_LIBCUDACXX_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1)
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_ifstream<char>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_ofstream<char>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_filebuf<char>;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_FSTREAM
+#endif // _LIBCUDACXX_FSTREAM

diff  --git a/libcxx/include/functional b/libcxx/include/functional
index de02059f642a..19a3accf4cbb 100644
--- a/libcxx/include/functional
+++ b/libcxx/include/functional
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_FUNCTIONAL
-#define _LIBCPP_FUNCTIONAL
+#ifndef _LIBCUDACXX_FUNCTIONAL
+#define _LIBCUDACXX_FUNCTIONAL
 
 /*
     functional synopsis
@@ -539,12 +539,12 @@ POLICY:  For non-variadic implementations, the number of arguments is limited
 #include <typeinfo>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <utility>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_FUNCTIONAL
+#endif // _LIBCUDACXX_FUNCTIONAL

diff  --git a/libcxx/include/future b/libcxx/include/future
index cedab3608ad2..db5b024533e6 100644
--- a/libcxx/include/future
+++ b/libcxx/include/future
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_FUTURE
-#define _LIBCPP_FUTURE
+#ifndef _LIBCUDACXX_FUTURE
+#define _LIBCUDACXX_FUTURE
 
 /*
     future synopsis
@@ -378,53 +378,53 @@ template <class R, class Alloc> struct uses_allocator<packaged_task<R>, Alloc>;
 #include <thread>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <chrono>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifdef _LIBCPP_HAS_NO_THREADS
+#ifdef _LIBCUDACXX_HAS_NO_THREADS
 # error "<future> is not supported since libc++ has been configured without support for threads."
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 //enum class future_errc
-_LIBCPP_DECLARE_STRONG_ENUM(future_errc)
+_LIBCUDACXX_DECLARE_STRONG_ENUM(future_errc)
 {
     future_already_retrieved = 1,
     promise_already_satisfied,
     no_state,
     broken_promise
 };
-_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(future_errc)
+_LIBCUDACXX_DECLARE_STRONG_ENUM_EPILOG(future_errc)
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<future_errc> : public true_type {};
+struct _LIBCUDACXX_TEMPLATE_VIS is_error_code_enum<future_errc> : public true_type {};
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
 template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<future_errc::__lx> : public true_type { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_error_code_enum<future_errc::__lx> : public true_type { };
 #endif
 
 //enum class launch
-_LIBCPP_DECLARE_STRONG_ENUM(launch)
+_LIBCUDACXX_DECLARE_STRONG_ENUM(launch)
 {
     async = 1,
     deferred = 2,
     any = async | deferred
 };
-_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(launch)
+_LIBCUDACXX_DECLARE_STRONG_ENUM_EPILOG(launch)
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 typedef underlying_type<launch>::type __launch_underlying_type;
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 launch
 operator&(launch __x, launch __y)
 {
@@ -432,8 +432,8 @@ operator&(launch __x, launch __y)
                                static_cast<__launch_underlying_type>(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 launch
 operator|(launch __x, launch __y)
 {
@@ -441,8 +441,8 @@ operator|(launch __x, launch __y)
                                static_cast<__launch_underlying_type>(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 launch
 operator^(launch __x, launch __y)
 {
@@ -450,92 +450,92 @@ operator^(launch __x, launch __y)
                                static_cast<__launch_underlying_type>(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 launch
 operator~(launch __x)
 {
     return static_cast<launch>(~static_cast<__launch_underlying_type>(__x) & 3);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 launch&
 operator&=(launch& __x, launch __y)
 {
     __x = __x & __y; return __x;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 launch&
 operator|=(launch& __x, launch __y)
 {
     __x = __x | __y; return __x;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 launch&
 operator^=(launch& __x, launch __y)
 {
     __x = __x ^ __y; return __x;
 }
 
-#endif // !_LIBCPP_CXX03_LANG
+#endif // !_LIBCUDACXX_CXX03_LANG
 
 //enum class future_status
-_LIBCPP_DECLARE_STRONG_ENUM(future_status)
+_LIBCUDACXX_DECLARE_STRONG_ENUM(future_status)
 {
     ready,
     timeout,
     deferred
 };
-_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(future_status)
+_LIBCUDACXX_DECLARE_STRONG_ENUM_EPILOG(future_status)
 
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 const error_category& future_category() _NOEXCEPT;
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 error_code
 make_error_code(future_errc __e) _NOEXCEPT
 {
     return error_code(static_cast<int>(__e), future_category());
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 error_condition
 make_error_condition(future_errc __e) _NOEXCEPT
 {
     return error_condition(static_cast<int>(__e), future_category());
 }
 
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_FUTURE_ERROR future_error
+class _LIBCUDACXX_EXCEPTION_ABI _LIBCUDACXX_AVAILABILITY_FUTURE_ERROR future_error
     : public logic_error
 {
     error_code __ec_;
 public:
     future_error(error_code __ec);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const error_code& code() const _NOEXCEPT {return __ec_;}
 
     future_error(const future_error&) _NOEXCEPT = default;
     virtual ~future_error() _NOEXCEPT;
 };
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
-#ifndef _LIBCPP_NO_EXCEPTIONS
-_LIBCPP_AVAILABILITY_FUTURE_ERROR
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
+_LIBCUDACXX_AVAILABILITY_FUTURE_ERROR
 #endif
 void __throw_future_error(future_errc __ev)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw future_error(make_error_code(__ev));
 #else
     ((void)__ev);
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE __assoc_sub_state
+class _LIBCUDACXX_TYPE_VIS _LIBCUDACXX_AVAILABILITY_FUTURE __assoc_sub_state
     : public __shared_count
 {
 protected:
@@ -555,14 +555,14 @@ public:
         deferred = 8
     };
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __assoc_sub_state() : __state_(0) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool __has_value() const
         {return (__state_ & __constructed) || (__exception_ != nullptr);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __attach_future() {
         lock_guard<mutex> __lk(__mut_);
         bool __has_future_attached = (__state_ & __future_attached) != 0;
@@ -572,11 +572,11 @@ public:
         __state_ |= __future_attached;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __set_deferred() {__state_ |= deferred;}
 
     void __make_ready();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool __is_ready() const {return (__state_ & ready) != 0;}
 
     void set_value();
@@ -590,10 +590,10 @@ public:
     void wait();
     template <class _Rep, class _Period>
         future_status
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const;
     template <class _Clock, class _Duration>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         future_status
         wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const;
 
@@ -623,7 +623,7 @@ __assoc_sub_state::wait_for(const chrono::duration<_Rep, _Period>& __rel_time) c
 }
 
 template <class _Rp>
-class _LIBCPP_AVAILABILITY_FUTURE _LIBCPP_HIDDEN __assoc_state
+class _LIBCUDACXX_AVAILABILITY_FUTURE _LIBCUDACXX_HIDDEN __assoc_state
     : public __assoc_sub_state
 {
     typedef __assoc_sub_state base;
@@ -655,14 +655,14 @@ __assoc_state<_Rp>::__on_zero_shared() _NOEXCEPT
 
 template <class _Rp>
 template <class _Arg>
-_LIBCPP_AVAILABILITY_FUTURE
+_LIBCUDACXX_AVAILABILITY_FUTURE
 void
 __assoc_state<_Rp>::set_value(_Arg&& __arg)
 {
     unique_lock<mutex> __lk(this->__mut_);
     if (this->__has_value())
         __throw_future_error(future_errc::promise_already_satisfied);
-    ::new ((void*)&__value_) _Rp(_VSTD::forward<_Arg>(__arg));
+    ::new ((void*)&__value_) _Rp(_CUDA_VSTD::forward<_Arg>(__arg));
     this->__state_ |= base::__constructed | base::ready;
     __cv_.notify_all();
 }
@@ -675,7 +675,7 @@ __assoc_state<_Rp>::set_value_at_thread_exit(_Arg&& __arg)
     unique_lock<mutex> __lk(this->__mut_);
     if (this->__has_value())
         __throw_future_error(future_errc::promise_already_satisfied);
-    ::new ((void*)&__value_) _Rp(_VSTD::forward<_Arg>(__arg));
+    ::new ((void*)&__value_) _Rp(_CUDA_VSTD::forward<_Arg>(__arg));
     this->__state_ |= base::__constructed;
     __thread_local_data()->__make_ready_at_thread_exit(this);
 }
@@ -688,7 +688,7 @@ __assoc_state<_Rp>::move()
     this->__sub_wait(__lk);
     if (this->__exception_ != nullptr)
         rethrow_exception(this->__exception_);
-    return _VSTD::move(*reinterpret_cast<_Rp*>(&__value_));
+    return _CUDA_VSTD::move(*reinterpret_cast<_Rp*>(&__value_));
 }
 
 template <class _Rp>
@@ -703,7 +703,7 @@ __assoc_state<_Rp>::copy()
 }
 
 template <class _Rp>
-class _LIBCPP_AVAILABILITY_FUTURE __assoc_state<_Rp&>
+class _LIBCUDACXX_AVAILABILITY_FUTURE __assoc_state<_Rp&>
     : public __assoc_sub_state
 {
     typedef __assoc_sub_state base;
@@ -734,7 +734,7 @@ __assoc_state<_Rp&>::set_value(_Rp& __arg)
     unique_lock<mutex> __lk(this->__mut_);
     if (this->__has_value())
         __throw_future_error(future_errc::promise_already_satisfied);
-    __value_ = _VSTD::addressof(__arg);
+    __value_ = _CUDA_VSTD::addressof(__arg);
     this->__state_ |= base::__constructed | base::ready;
     __cv_.notify_all();
 }
@@ -746,7 +746,7 @@ __assoc_state<_Rp&>::set_value_at_thread_exit(_Rp& __arg)
     unique_lock<mutex> __lk(this->__mut_);
     if (this->__has_value())
         __throw_future_error(future_errc::promise_already_satisfied);
-    __value_ = _VSTD::addressof(__arg);
+    __value_ = _CUDA_VSTD::addressof(__arg);
     this->__state_ |= base::__constructed;
     __thread_local_data()->__make_ready_at_thread_exit(this);
 }
@@ -763,7 +763,7 @@ __assoc_state<_Rp&>::copy()
 }
 
 template <class _Rp, class _Alloc>
-class _LIBCPP_AVAILABILITY_FUTURE __assoc_state_alloc
+class _LIBCUDACXX_AVAILABILITY_FUTURE __assoc_state_alloc
     : public __assoc_state<_Rp>
 {
     typedef __assoc_state<_Rp> base;
@@ -771,7 +771,7 @@ class _LIBCPP_AVAILABILITY_FUTURE __assoc_state_alloc
 
     virtual void __on_zero_shared() _NOEXCEPT;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __assoc_state_alloc(const _Alloc& __a)
         : __alloc_(__a) {}
 };
@@ -781,7 +781,7 @@ void
 __assoc_state_alloc<_Rp, _Alloc>::__on_zero_shared() _NOEXCEPT
 {
     if (this->__state_ & base::__constructed)
-        reinterpret_cast<_Rp*>(_VSTD::addressof(this->__value_))->~_Rp();
+        reinterpret_cast<_Rp*>(_CUDA_VSTD::addressof(this->__value_))->~_Rp();
     typedef typename __allocator_traits_rebind<_Alloc, __assoc_state_alloc>::type _Al;
     typedef allocator_traits<_Al> _ATraits;
     typedef pointer_traits<typename _ATraits::pointer> _PTraits;
@@ -791,7 +791,7 @@ __assoc_state_alloc<_Rp, _Alloc>::__on_zero_shared() _NOEXCEPT
 }
 
 template <class _Rp, class _Alloc>
-class _LIBCPP_AVAILABILITY_FUTURE __assoc_state_alloc<_Rp&, _Alloc>
+class _LIBCUDACXX_AVAILABILITY_FUTURE __assoc_state_alloc<_Rp&, _Alloc>
     : public __assoc_state<_Rp&>
 {
     typedef __assoc_state<_Rp&> base;
@@ -799,7 +799,7 @@ class _LIBCPP_AVAILABILITY_FUTURE __assoc_state_alloc<_Rp&, _Alloc>
 
     virtual void __on_zero_shared() _NOEXCEPT;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __assoc_state_alloc(const _Alloc& __a)
         : __alloc_(__a) {}
 };
@@ -817,7 +817,7 @@ __assoc_state_alloc<_Rp&, _Alloc>::__on_zero_shared() _NOEXCEPT
 }
 
 template <class _Alloc>
-class _LIBCPP_AVAILABILITY_FUTURE __assoc_sub_state_alloc
+class _LIBCUDACXX_AVAILABILITY_FUTURE __assoc_sub_state_alloc
     : public __assoc_sub_state
 {
     typedef __assoc_sub_state base;
@@ -825,7 +825,7 @@ class _LIBCPP_AVAILABILITY_FUTURE __assoc_sub_state_alloc
 
     virtual void __on_zero_shared() _NOEXCEPT;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __assoc_sub_state_alloc(const _Alloc& __a)
         : __alloc_(__a) {}
 };
@@ -843,7 +843,7 @@ __assoc_sub_state_alloc<_Alloc>::__on_zero_shared() _NOEXCEPT
 }
 
 template <class _Rp, class _Fp>
-class _LIBCPP_AVAILABILITY_FUTURE __deferred_assoc_state
+class _LIBCUDACXX_AVAILABILITY_FUTURE __deferred_assoc_state
     : public __assoc_state<_Rp>
 {
     typedef __assoc_state<_Rp> base;
@@ -851,7 +851,7 @@ class _LIBCPP_AVAILABILITY_FUTURE __deferred_assoc_state
     _Fp __func_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __deferred_assoc_state(_Fp&& __f);
 
     virtual void __execute();
@@ -860,7 +860,7 @@ public:
 template <class _Rp, class _Fp>
 inline
 __deferred_assoc_state<_Rp, _Fp>::__deferred_assoc_state(_Fp&& __f)
-    : __func_(_VSTD::forward<_Fp>(__f))
+    : __func_(_CUDA_VSTD::forward<_Fp>(__f))
 {
     this->__set_deferred();
 }
@@ -869,22 +869,22 @@ template <class _Rp, class _Fp>
 void
 __deferred_assoc_state<_Rp, _Fp>::__execute()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         this->set_value(__func_());
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->set_exception(current_exception());
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template <class _Fp>
-class _LIBCPP_AVAILABILITY_FUTURE __deferred_assoc_state<void, _Fp>
+class _LIBCUDACXX_AVAILABILITY_FUTURE __deferred_assoc_state<void, _Fp>
     : public __assoc_sub_state
 {
     typedef __assoc_sub_state base;
@@ -892,7 +892,7 @@ class _LIBCPP_AVAILABILITY_FUTURE __deferred_assoc_state<void, _Fp>
     _Fp __func_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __deferred_assoc_state(_Fp&& __f);
 
     virtual void __execute();
@@ -901,7 +901,7 @@ public:
 template <class _Fp>
 inline
 __deferred_assoc_state<void, _Fp>::__deferred_assoc_state(_Fp&& __f)
-    : __func_(_VSTD::forward<_Fp>(__f))
+    : __func_(_CUDA_VSTD::forward<_Fp>(__f))
 {
     this->__set_deferred();
 }
@@ -910,23 +910,23 @@ template <class _Fp>
 void
 __deferred_assoc_state<void, _Fp>::__execute()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __func_();
         this->set_value();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->set_exception(current_exception());
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template <class _Rp, class _Fp>
-class _LIBCPP_AVAILABILITY_FUTURE __async_assoc_state
+class _LIBCUDACXX_AVAILABILITY_FUTURE __async_assoc_state
     : public __assoc_state<_Rp>
 {
     typedef __assoc_state<_Rp> base;
@@ -935,7 +935,7 @@ class _LIBCPP_AVAILABILITY_FUTURE __async_assoc_state
 
     virtual void __on_zero_shared() _NOEXCEPT;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __async_assoc_state(_Fp&& __f);
 
     virtual void __execute();
@@ -944,7 +944,7 @@ public:
 template <class _Rp, class _Fp>
 inline
 __async_assoc_state<_Rp, _Fp>::__async_assoc_state(_Fp&& __f)
-    : __func_(_VSTD::forward<_Fp>(__f))
+    : __func_(_CUDA_VSTD::forward<_Fp>(__f))
 {
 }
 
@@ -952,18 +952,18 @@ template <class _Rp, class _Fp>
 void
 __async_assoc_state<_Rp, _Fp>::__execute()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         this->set_value(__func_());
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->set_exception(current_exception());
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template <class _Rp, class _Fp>
@@ -975,7 +975,7 @@ __async_assoc_state<_Rp, _Fp>::__on_zero_shared() _NOEXCEPT
 }
 
 template <class _Fp>
-class _LIBCPP_AVAILABILITY_FUTURE __async_assoc_state<void, _Fp>
+class _LIBCUDACXX_AVAILABILITY_FUTURE __async_assoc_state<void, _Fp>
     : public __assoc_sub_state
 {
     typedef __assoc_sub_state base;
@@ -984,7 +984,7 @@ class _LIBCPP_AVAILABILITY_FUTURE __async_assoc_state<void, _Fp>
 
     virtual void __on_zero_shared() _NOEXCEPT;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __async_assoc_state(_Fp&& __f);
 
     virtual void __execute();
@@ -993,7 +993,7 @@ public:
 template <class _Fp>
 inline
 __async_assoc_state<void, _Fp>::__async_assoc_state(_Fp&& __f)
-    : __func_(_VSTD::forward<_Fp>(__f))
+    : __func_(_CUDA_VSTD::forward<_Fp>(__f))
 {
 }
 
@@ -1001,19 +1001,19 @@ template <class _Fp>
 void
 __async_assoc_state<void, _Fp>::__execute()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __func_();
         this->set_value();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->set_exception(current_exception());
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template <class _Fp>
@@ -1024,23 +1024,23 @@ __async_assoc_state<void, _Fp>::__on_zero_shared() _NOEXCEPT
     base::__on_zero_shared();
 }
 
-template <class _Rp> class _LIBCPP_TEMPLATE_VIS promise;
-template <class _Rp> class _LIBCPP_TEMPLATE_VIS shared_future;
+template <class _Rp> class _LIBCUDACXX_TEMPLATE_VIS promise;
+template <class _Rp> class _LIBCUDACXX_TEMPLATE_VIS shared_future;
 
 // future
 
-template <class _Rp> class _LIBCPP_TEMPLATE_VIS future;
+template <class _Rp> class _LIBCUDACXX_TEMPLATE_VIS future;
 
 template <class _Rp, class _Fp>
-_LIBCPP_INLINE_VISIBILITY future<_Rp>
+_LIBCUDACXX_INLINE_VISIBILITY future<_Rp>
 __make_deferred_assoc_state(_Fp&& __f);
 
 template <class _Rp, class _Fp>
-_LIBCPP_INLINE_VISIBILITY future<_Rp>
+_LIBCUDACXX_INLINE_VISIBILITY future<_Rp>
 __make_async_assoc_state(_Fp&& __f);
 
 template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FUTURE future
 {
     __assoc_state<_Rp>* __state_;
 
@@ -1055,43 +1055,43 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future
         friend future<_R1> __make_async_assoc_state(_Fp&& __f);
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     future() _NOEXCEPT : __state_(nullptr) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     future(future&& __rhs) _NOEXCEPT
         : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
     future(const future&) = delete;
     future& operator=(const future&) = delete;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     future& operator=(future&& __rhs) _NOEXCEPT
         {
-            future(_VSTD::move(__rhs)).swap(*this);
+            future(_CUDA_VSTD::move(__rhs)).swap(*this);
             return *this;
         }
 
     ~future();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future<_Rp> share() _NOEXCEPT;
 
     // retrieving the value
     _Rp get();
 
-    _LIBCPP_INLINE_VISIBILITY
-    void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void swap(future& __rhs) _NOEXCEPT {_CUDA_VSTD::swap(__state_, __rhs.__state_);}
 
     // functions to check state
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool valid() const _NOEXCEPT {return __state_ != nullptr;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void wait() const {__state_->wait();}
     template <class _Rep, class _Period>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
             {return __state_->wait_for(__rel_time);}
     template <class _Clock, class _Duration>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
             {return __state_->wait_until(__abs_time);}
@@ -1127,7 +1127,7 @@ future<_Rp>::get()
 }
 
 template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future<_Rp&>
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FUTURE future<_Rp&>
 {
     __assoc_state<_Rp&>* __state_;
 
@@ -1142,43 +1142,43 @@ class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE future<_Rp&>
         friend future<_R1> __make_async_assoc_state(_Fp&& __f);
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     future() _NOEXCEPT : __state_(nullptr) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     future(future&& __rhs) _NOEXCEPT
         : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
     future(const future&) = delete;
     future& operator=(const future&) = delete;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     future& operator=(future&& __rhs) _NOEXCEPT
         {
-            future(_VSTD::move(__rhs)).swap(*this);
+            future(_CUDA_VSTD::move(__rhs)).swap(*this);
             return *this;
         }
 
     ~future();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future<_Rp&> share() _NOEXCEPT;
 
     // retrieving the value
     _Rp& get();
 
-    _LIBCPP_INLINE_VISIBILITY
-    void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void swap(future& __rhs) _NOEXCEPT {_CUDA_VSTD::swap(__state_, __rhs.__state_);}
 
     // functions to check state
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool valid() const _NOEXCEPT {return __state_ != nullptr;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void wait() const {__state_->wait();}
     template <class _Rep, class _Period>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
             {return __state_->wait_for(__rel_time);}
     template <class _Clock, class _Duration>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
             {return __state_->wait_until(__abs_time);}
@@ -1209,7 +1209,7 @@ future<_Rp&>::get()
 }
 
 template <>
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE future<void>
+class _LIBCUDACXX_TYPE_VIS _LIBCUDACXX_AVAILABILITY_FUTURE future<void>
 {
     __assoc_sub_state* __state_;
 
@@ -1224,50 +1224,50 @@ class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE future<void>
         friend future<_R1> __make_async_assoc_state(_Fp&& __f);
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     future() _NOEXCEPT : __state_(nullptr) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     future(future&& __rhs) _NOEXCEPT
         : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
     future(const future&) = delete;
     future& operator=(const future&) = delete;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     future& operator=(future&& __rhs) _NOEXCEPT
         {
-            future(_VSTD::move(__rhs)).swap(*this);
+            future(_CUDA_VSTD::move(__rhs)).swap(*this);
             return *this;
         }
 
     ~future();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future<void> share() _NOEXCEPT;
 
     // retrieving the value
     void get();
 
-    _LIBCPP_INLINE_VISIBILITY
-    void swap(future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void swap(future& __rhs) _NOEXCEPT {_CUDA_VSTD::swap(__state_, __rhs.__state_);}
 
     // functions to check state
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool valid() const _NOEXCEPT {return __state_ != nullptr;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void wait() const {__state_->wait();}
     template <class _Rep, class _Period>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
             {return __state_->wait_for(__rel_time);}
     template <class _Clock, class _Duration>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
             {return __state_->wait_until(__abs_time);}
 };
 
 template <class _Rp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(future<_Rp>& __x, future<_Rp>& __y) _NOEXCEPT
 {
@@ -1279,11 +1279,11 @@ swap(future<_Rp>& __x, future<_Rp>& __y) _NOEXCEPT
 template <class _Callable> class packaged_task;
 
 template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE promise
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FUTURE promise
 {
     __assoc_state<_Rp>* __state_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
 
     template <class> friend class packaged_task;
@@ -1291,23 +1291,23 @@ public:
     promise();
     template <class _Alloc>
         promise(allocator_arg_t, const _Alloc& __a);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     promise(promise&& __rhs) _NOEXCEPT
         : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
     promise(const promise& __rhs) = delete;
     ~promise();
 
     // assignment
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     promise& operator=(promise&& __rhs) _NOEXCEPT
         {
-            promise(_VSTD::move(__rhs)).swap(*this);
+            promise(_CUDA_VSTD::move(__rhs)).swap(*this);
             return *this;
         }
     promise& operator=(const promise& __rhs) = delete;
 
-    _LIBCPP_INLINE_VISIBILITY
-    void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void swap(promise& __rhs) _NOEXCEPT {_CUDA_VSTD::swap(__state_, __rhs.__state_);}
 
     // retrieving the result
     future<_Rp> get_future();
@@ -1338,8 +1338,8 @@ promise<_Rp>::promise(allocator_arg_t, const _Alloc& __a0)
     typedef __allocator_destructor<_A2> _D2;
     _A2 __a(__a0);
     unique_ptr<_State, _D2> __hold(__a.allocate(1), _D2(__a, 1));
-    ::new ((void*)_VSTD::addressof(*__hold.get())) _State(__a0);
-    __state_ = _VSTD::addressof(*__hold.release());
+    ::new ((void*)_CUDA_VSTD::addressof(*__hold.get())) _State(__a0);
+    __state_ = _CUDA_VSTD::addressof(*__hold.release());
 }
 
 template <class _Rp>
@@ -1379,14 +1379,14 @@ promise<_Rp>::set_value(_Rp&& __r)
 {
     if (__state_ == nullptr)
         __throw_future_error(future_errc::no_state);
-    __state_->set_value(_VSTD::move(__r));
+    __state_->set_value(_CUDA_VSTD::move(__r));
 }
 
 template <class _Rp>
 void
 promise<_Rp>::set_exception(exception_ptr __p)
 {
-    _LIBCPP_ASSERT( __p != nullptr, "promise::set_exception: received nullptr" );
+    _LIBCUDACXX_ASSERT( __p != nullptr, "promise::set_exception: received nullptr" );
     if (__state_ == nullptr)
         __throw_future_error(future_errc::no_state);
     __state_->set_exception(__p);
@@ -1407,14 +1407,14 @@ promise<_Rp>::set_value_at_thread_exit(_Rp&& __r)
 {
     if (__state_ == nullptr)
         __throw_future_error(future_errc::no_state);
-    __state_->set_value_at_thread_exit(_VSTD::move(__r));
+    __state_->set_value_at_thread_exit(_CUDA_VSTD::move(__r));
 }
 
 template <class _Rp>
 void
 promise<_Rp>::set_exception_at_thread_exit(exception_ptr __p)
 {
-    _LIBCPP_ASSERT( __p != nullptr, "promise::set_exception_at_thread_exit: received nullptr" );
+    _LIBCUDACXX_ASSERT( __p != nullptr, "promise::set_exception_at_thread_exit: received nullptr" );
     if (__state_ == nullptr)
         __throw_future_error(future_errc::no_state);
     __state_->set_exception_at_thread_exit(__p);
@@ -1423,11 +1423,11 @@ promise<_Rp>::set_exception_at_thread_exit(exception_ptr __p)
 // promise<R&>
 
 template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE promise<_Rp&>
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FUTURE promise<_Rp&>
 {
     __assoc_state<_Rp&>* __state_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
 
     template <class> friend class packaged_task;
@@ -1436,23 +1436,23 @@ public:
     promise();
     template <class _Allocator>
         promise(allocator_arg_t, const _Allocator& __a);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     promise(promise&& __rhs) _NOEXCEPT
         : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
     promise(const promise& __rhs) = delete;
     ~promise();
 
     // assignment
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     promise& operator=(promise&& __rhs) _NOEXCEPT
         {
-            promise(_VSTD::move(__rhs)).swap(*this);
+            promise(_CUDA_VSTD::move(__rhs)).swap(*this);
             return *this;
         }
     promise& operator=(const promise& __rhs) = delete;
 
-    _LIBCPP_INLINE_VISIBILITY
-    void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void swap(promise& __rhs) _NOEXCEPT {_CUDA_VSTD::swap(__state_, __rhs.__state_);}
 
     // retrieving the result
     future<_Rp&> get_future();
@@ -1481,8 +1481,8 @@ promise<_Rp&>::promise(allocator_arg_t, const _Alloc& __a0)
     typedef __allocator_destructor<_A2> _D2;
     _A2 __a(__a0);
     unique_ptr<_State, _D2> __hold(__a.allocate(1), _D2(__a, 1));
-    ::new ((void*)_VSTD::addressof(*__hold.get())) _State(__a0);
-    __state_ = _VSTD::addressof(*__hold.release());
+    ::new ((void*)_CUDA_VSTD::addressof(*__hold.get())) _State(__a0);
+    __state_ = _CUDA_VSTD::addressof(*__hold.release());
 }
 
 template <class _Rp>
@@ -1520,7 +1520,7 @@ template <class _Rp>
 void
 promise<_Rp&>::set_exception(exception_ptr __p)
 {
-    _LIBCPP_ASSERT( __p != nullptr, "promise::set_exception: received nullptr" );
+    _LIBCUDACXX_ASSERT( __p != nullptr, "promise::set_exception: received nullptr" );
     if (__state_ == nullptr)
         __throw_future_error(future_errc::no_state);
     __state_->set_exception(__p);
@@ -1539,7 +1539,7 @@ template <class _Rp>
 void
 promise<_Rp&>::set_exception_at_thread_exit(exception_ptr __p)
 {
-    _LIBCPP_ASSERT( __p != nullptr, "promise::set_exception_at_thread_exit: received nullptr" );
+    _LIBCUDACXX_ASSERT( __p != nullptr, "promise::set_exception_at_thread_exit: received nullptr" );
     if (__state_ == nullptr)
         __throw_future_error(future_errc::no_state);
     __state_->set_exception_at_thread_exit(__p);
@@ -1548,11 +1548,11 @@ promise<_Rp&>::set_exception_at_thread_exit(exception_ptr __p)
 // promise<void>
 
 template <>
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE promise<void>
+class _LIBCUDACXX_TYPE_VIS _LIBCUDACXX_AVAILABILITY_FUTURE promise<void>
 {
     __assoc_sub_state* __state_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit promise(nullptr_t) _NOEXCEPT : __state_(nullptr) {}
 
     template <class> friend class packaged_task;
@@ -1560,25 +1560,25 @@ class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE promise<void>
 public:
     promise();
     template <class _Allocator>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         promise(allocator_arg_t, const _Allocator& __a);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     promise(promise&& __rhs) _NOEXCEPT
         : __state_(__rhs.__state_) {__rhs.__state_ = nullptr;}
     promise(const promise& __rhs) = delete;
     ~promise();
 
     // assignment
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     promise& operator=(promise&& __rhs) _NOEXCEPT
         {
-            promise(_VSTD::move(__rhs)).swap(*this);
+            promise(_CUDA_VSTD::move(__rhs)).swap(*this);
             return *this;
         }
     promise& operator=(const promise& __rhs) = delete;
 
-    _LIBCPP_INLINE_VISIBILITY
-    void swap(promise& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void swap(promise& __rhs) _NOEXCEPT {_CUDA_VSTD::swap(__state_, __rhs.__state_);}
 
     // retrieving the result
     future<void> get_future();
@@ -1600,12 +1600,12 @@ promise<void>::promise(allocator_arg_t, const _Alloc& __a0)
     typedef __allocator_destructor<_A2> _D2;
     _A2 __a(__a0);
     unique_ptr<_State, _D2> __hold(__a.allocate(1), _D2(__a, 1));
-    ::new ((void*)_VSTD::addressof(*__hold.get())) _State(__a0);
-    __state_ = _VSTD::addressof(*__hold.release());
+    ::new ((void*)_CUDA_VSTD::addressof(*__hold.get())) _State(__a0);
+    __state_ = _CUDA_VSTD::addressof(*__hold.release());
 }
 
 template <class _Rp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(promise<_Rp>& __x, promise<_Rp>& __y) _NOEXCEPT
 {
@@ -1613,7 +1613,7 @@ swap(promise<_Rp>& __x, promise<_Rp>& __y) _NOEXCEPT
 }
 
 template <class _Rp, class _Alloc>
-    struct _LIBCPP_TEMPLATE_VIS uses_allocator<promise<_Rp>, _Alloc>
+    struct _LIBCUDACXX_TEMPLATE_VIS uses_allocator<promise<_Rp>, _Alloc>
         : public true_type {};
 
 // packaged_task
@@ -1621,14 +1621,14 @@ template <class _Rp, class _Alloc>
 template<class _Fp> class __packaged_task_base;
 
 template<class _Rp, class ..._ArgTypes>
-class _LIBCPP_AVAILABILITY_FUTURE __packaged_task_base<_Rp(_ArgTypes...)>
+class _LIBCUDACXX_AVAILABILITY_FUTURE __packaged_task_base<_Rp(_ArgTypes...)>
 {
     __packaged_task_base(const __packaged_task_base&);
     __packaged_task_base& operator=(const __packaged_task_base&);
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __packaged_task_base() {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual ~__packaged_task_base() {}
     virtual void __move_to(__packaged_task_base*) _NOEXCEPT = 0;
     virtual void destroy() = 0;
@@ -1639,21 +1639,21 @@ public:
 template<class _FD, class _Alloc, class _FB> class __packaged_task_func;
 
 template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
-class _LIBCPP_AVAILABILITY_FUTURE __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>
+class _LIBCUDACXX_AVAILABILITY_FUTURE __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>
     : public  __packaged_task_base<_Rp(_ArgTypes...)>
 {
     __compressed_pair<_Fp, _Alloc> __f_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __packaged_task_func(const _Fp& __f) : __f_(__f, __default_init_tag()) {}
-    _LIBCPP_INLINE_VISIBILITY
-    explicit __packaged_task_func(_Fp&& __f) : __f_(_VSTD::move(__f), __default_init_tag()) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
+    explicit __packaged_task_func(_Fp&& __f) : __f_(_CUDA_VSTD::move(__f), __default_init_tag()) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
     __packaged_task_func(const _Fp& __f, const _Alloc& __a)
         : __f_(__f, __a) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __packaged_task_func(_Fp&& __f, const _Alloc& __a)
-        : __f_(_VSTD::move(__f), __a) {}
+        : __f_(_CUDA_VSTD::move(__f), __a) {}
     virtual void __move_to(__packaged_task_base<_Rp(_ArgTypes...)>*) _NOEXCEPT;
     virtual void destroy();
     virtual void destroy_deallocate();
@@ -1665,7 +1665,7 @@ void
 __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::__move_to(
                               __packaged_task_base<_Rp(_ArgTypes...)>* __p) _NOEXCEPT
 {
-    ::new ((void*)__p) __packaged_task_func(_VSTD::move(__f_.first()), _VSTD::move(__f_.second()));
+    ::new ((void*)__p) __packaged_task_func(_CUDA_VSTD::move(__f_.first()), _CUDA_VSTD::move(__f_.second()));
 }
 
 template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
@@ -1691,17 +1691,17 @@ template<class _Fp, class _Alloc, class _Rp, class ..._ArgTypes>
 _Rp
 __packaged_task_func<_Fp, _Alloc, _Rp(_ArgTypes...)>::operator()(_ArgTypes&& ... __arg)
 {
-    return _VSTD::__invoke(__f_.first(), _VSTD::forward<_ArgTypes>(__arg)...);
+    return _CUDA_VSTD::__invoke(__f_.first(), _CUDA_VSTD::forward<_ArgTypes>(__arg)...);
 }
 
 template <class _Callable> class __packaged_task_function;
 
 template<class _Rp, class ..._ArgTypes>
-class _LIBCPP_AVAILABILITY_FUTURE __packaged_task_function<_Rp(_ArgTypes...)>
+class _LIBCUDACXX_AVAILABILITY_FUTURE __packaged_task_function<_Rp(_ArgTypes...)>
 {
     typedef __packaged_task_base<_Rp(_ArgTypes...)> __base;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_NO_CFI
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_NO_CFI
     __base* __get_buf() { return (__base*)&__buf_; }
 
     typename aligned_storage<3*sizeof(void*)>::type __buf_;
@@ -1711,7 +1711,7 @@ public:
     typedef _Rp result_type;
 
     // construct/copy/destroy:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __packaged_task_function() _NOEXCEPT : __f_(nullptr) {}
     template<class _Fp>
       __packaged_task_function(_Fp&& __f);
@@ -1728,7 +1728,7 @@ public:
 
     void swap(__packaged_task_function&) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Rp operator()(_ArgTypes...) const;
 };
 
@@ -1758,7 +1758,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(_Fp&& __f)
     typedef __packaged_task_func<_FR, allocator<_FR>, _Rp(_ArgTypes...)> _FF;
     if (sizeof(_FF) <= sizeof(__buf_))
     {
-        ::new ((void*)&__buf_) _FF(_VSTD::forward<_Fp>(__f));
+        ::new ((void*)&__buf_) _FF(_CUDA_VSTD::forward<_Fp>(__f));
         __f_ = (__base*)&__buf_;
     }
     else
@@ -1767,7 +1767,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(_Fp&& __f)
         _Ap __a;
         typedef __allocator_destructor<_Ap> _Dp;
         unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
-        ::new ((void*)__hold.get()) _FF(_VSTD::forward<_Fp>(__f), allocator<_FR>(__a));
+        ::new ((void*)__hold.get()) _FF(_CUDA_VSTD::forward<_Fp>(__f), allocator<_FR>(__a));
         __f_ = __hold.release();
     }
 }
@@ -1783,7 +1783,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(
     if (sizeof(_FF) <= sizeof(__buf_))
     {
         __f_ = (__base*)&__buf_;
-        ::new ((void*)__f_) _FF(_VSTD::forward<_Fp>(__f));
+        ::new ((void*)__f_) _FF(_CUDA_VSTD::forward<_Fp>(__f));
     }
     else
     {
@@ -1791,9 +1791,9 @@ __packaged_task_function<_Rp(_ArgTypes...)>::__packaged_task_function(
         _Ap __a(__a0);
         typedef __allocator_destructor<_Ap> _Dp;
         unique_ptr<__base, _Dp> __hold(__a.allocate(1), _Dp(__a, 1));
-        ::new ((void*)_VSTD::addressof(*__hold.get()))
-            _FF(_VSTD::forward<_Fp>(__f), _Alloc(__a));
-        __f_ = _VSTD::addressof(*__hold.release());
+        ::new ((void*)_CUDA_VSTD::addressof(*__hold.get()))
+            _FF(_CUDA_VSTD::forward<_Fp>(__f), _Alloc(__a));
+        __f_ = _CUDA_VSTD::addressof(*__hold.release());
     }
 }
 
@@ -1831,7 +1831,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::~__packaged_task_function()
 }
 
 template<class _Rp, class ..._ArgTypes>
-_LIBCPP_NO_CFI
+_LIBCUDACXX_NO_CFI
 void
 __packaged_task_function<_Rp(_ArgTypes...)>::swap(__packaged_task_function& __f) _NOEXCEPT
 {
@@ -1865,7 +1865,7 @@ __packaged_task_function<_Rp(_ArgTypes...)>::swap(__packaged_task_function& __f)
         __f_ = (__base*)&__buf_;
     }
     else
-        _VSTD::swap(__f_, __f.__f_);
+        _CUDA_VSTD::swap(__f_, __f.__f_);
 }
 
 template<class _Rp, class ..._ArgTypes>
@@ -1873,11 +1873,11 @@ inline
 _Rp
 __packaged_task_function<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __arg) const
 {
-    return (*__f_)(_VSTD::forward<_ArgTypes>(__arg)...);
+    return (*__f_)(_CUDA_VSTD::forward<_ArgTypes>(__arg)...);
 }
 
 template<class _Rp, class ..._ArgTypes>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE packaged_task<_Rp(_ArgTypes...)>
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FUTURE packaged_task<_Rp(_ArgTypes...)>
 {
 public:
     typedef _Rp result_type; // extension
@@ -1888,17 +1888,17 @@ private:
 
 public:
     // construction and destruction
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     packaged_task() _NOEXCEPT : __p_(nullptr) {}
     template <class _Fp,
               class = __enable_if_t<!is_same<__uncvref_t<_Fp>, packaged_task>::value> >
-        _LIBCPP_INLINE_VISIBILITY
-        explicit packaged_task(_Fp&& __f) : __f_(_VSTD::forward<_Fp>(__f)) {}
+        _LIBCUDACXX_INLINE_VISIBILITY
+        explicit packaged_task(_Fp&& __f) : __f_(_CUDA_VSTD::forward<_Fp>(__f)) {}
     template <class _Fp, class _Allocator,
               class = __enable_if_t<!is_same<__uncvref_t<_Fp>, packaged_task>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f)
-             : __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)),
+             : __f_(allocator_arg, __a, _CUDA_VSTD::forward<_Fp>(__f)),
                __p_(allocator_arg, __a) {}
     // ~packaged_task() = default;
 
@@ -1907,28 +1907,28 @@ public:
     packaged_task& operator=(const packaged_task&) = delete;
 
     // move support
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     packaged_task(packaged_task&& __other) _NOEXCEPT
-        : __f_(_VSTD::move(__other.__f_)), __p_(_VSTD::move(__other.__p_)) {}
-    _LIBCPP_INLINE_VISIBILITY
+        : __f_(_CUDA_VSTD::move(__other.__f_)), __p_(_CUDA_VSTD::move(__other.__p_)) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
     packaged_task& operator=(packaged_task&& __other) _NOEXCEPT
     {
-        __f_ = _VSTD::move(__other.__f_);
-        __p_ = _VSTD::move(__other.__p_);
+        __f_ = _CUDA_VSTD::move(__other.__f_);
+        __p_ = _CUDA_VSTD::move(__other.__p_);
         return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(packaged_task& __other) _NOEXCEPT
     {
         __f_.swap(__other.__f_);
         __p_.swap(__other.__p_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool valid() const _NOEXCEPT {return __p_.__state_ != nullptr;}
 
     // result retrieval
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     future<result_type> get_future() {return __p_.get_future();}
 
     // execution
@@ -1946,18 +1946,18 @@ packaged_task<_Rp(_ArgTypes...)>::operator()(_ArgTypes... __args)
         __throw_future_error(future_errc::no_state);
     if (__p_.__state_->__has_value())
         __throw_future_error(future_errc::promise_already_satisfied);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
-        __p_.set_value(__f_(_VSTD::forward<_ArgTypes>(__args)...));
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
+        __p_.set_value(__f_(_CUDA_VSTD::forward<_ArgTypes>(__args)...));
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         __p_.set_exception(current_exception());
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template<class _Rp, class ..._ArgTypes>
@@ -1968,18 +1968,18 @@ packaged_task<_Rp(_ArgTypes...)>::make_ready_at_thread_exit(_ArgTypes... __args)
         __throw_future_error(future_errc::no_state);
     if (__p_.__state_->__has_value())
         __throw_future_error(future_errc::promise_already_satisfied);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
-        __p_.set_value_at_thread_exit(__f_(_VSTD::forward<_ArgTypes>(__args)...));
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
+        __p_.set_value_at_thread_exit(__f_(_CUDA_VSTD::forward<_ArgTypes>(__args)...));
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         __p_.set_exception_at_thread_exit(current_exception());
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template<class _Rp, class ..._ArgTypes>
@@ -1992,7 +1992,7 @@ packaged_task<_Rp(_ArgTypes...)>::reset()
 }
 
 template<class ..._ArgTypes>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_AVAILABILITY_FUTURE packaged_task<void(_ArgTypes...)>
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_AVAILABILITY_FUTURE packaged_task<void(_ArgTypes...)>
 {
 public:
     typedef void result_type; // extension
@@ -2003,17 +2003,17 @@ private:
 
 public:
     // construction and destruction
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     packaged_task() _NOEXCEPT : __p_(nullptr) {}
     template <class _Fp,
               class = __enable_if_t<!is_same<__uncvref_t<_Fp>, packaged_task>::value> >
-        _LIBCPP_INLINE_VISIBILITY
-        explicit packaged_task(_Fp&& __f) : __f_(_VSTD::forward<_Fp>(__f)) {}
+        _LIBCUDACXX_INLINE_VISIBILITY
+        explicit packaged_task(_Fp&& __f) : __f_(_CUDA_VSTD::forward<_Fp>(__f)) {}
     template <class _Fp, class _Allocator,
               class = __enable_if_t<!is_same<__uncvref_t<_Fp>, packaged_task>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         packaged_task(allocator_arg_t, const _Allocator& __a, _Fp&& __f)
-             : __f_(allocator_arg, __a, _VSTD::forward<_Fp>(__f)),
+             : __f_(allocator_arg, __a, _CUDA_VSTD::forward<_Fp>(__f)),
                __p_(allocator_arg, __a) {}
     // ~packaged_task() = default;
 
@@ -2022,28 +2022,28 @@ public:
     packaged_task& operator=(const packaged_task&) = delete;
 
     // move support
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     packaged_task(packaged_task&& __other) _NOEXCEPT
-        : __f_(_VSTD::move(__other.__f_)), __p_(_VSTD::move(__other.__p_)) {}
-    _LIBCPP_INLINE_VISIBILITY
+        : __f_(_CUDA_VSTD::move(__other.__f_)), __p_(_CUDA_VSTD::move(__other.__p_)) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
     packaged_task& operator=(packaged_task&& __other) _NOEXCEPT
     {
-        __f_ = _VSTD::move(__other.__f_);
-        __p_ = _VSTD::move(__other.__p_);
+        __f_ = _CUDA_VSTD::move(__other.__f_);
+        __p_ = _CUDA_VSTD::move(__other.__p_);
         return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(packaged_task& __other) _NOEXCEPT
     {
         __f_.swap(__other.__f_);
         __p_.swap(__other.__p_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool valid() const _NOEXCEPT {return __p_.__state_ != nullptr;}
 
     // result retrieval
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     future<result_type> get_future() {return __p_.get_future();}
 
     // execution
@@ -2061,19 +2061,19 @@ packaged_task<void(_ArgTypes...)>::operator()(_ArgTypes... __args)
         __throw_future_error(future_errc::no_state);
     if (__p_.__state_->__has_value())
         __throw_future_error(future_errc::promise_already_satisfied);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
-        __f_(_VSTD::forward<_ArgTypes>(__args)...);
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
+        __f_(_CUDA_VSTD::forward<_ArgTypes>(__args)...);
         __p_.set_value();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         __p_.set_exception(current_exception());
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template<class ..._ArgTypes>
@@ -2084,19 +2084,19 @@ packaged_task<void(_ArgTypes...)>::make_ready_at_thread_exit(_ArgTypes... __args
         __throw_future_error(future_errc::no_state);
     if (__p_.__state_->__has_value())
         __throw_future_error(future_errc::promise_already_satisfied);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
-        __f_(_VSTD::forward<_ArgTypes>(__args)...);
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
+        __f_(_CUDA_VSTD::forward<_ArgTypes>(__args)...);
         __p_.set_value_at_thread_exit();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         __p_.set_exception_at_thread_exit(current_exception());
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template<class ..._ArgTypes>
@@ -2109,7 +2109,7 @@ packaged_task<void(_ArgTypes...)>::reset()
 }
 
 template <class _Rp, class... _ArgTypes>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(packaged_task<_Rp(_ArgTypes...)>& __x, packaged_task<_Rp(_ArgTypes...)>& __y) _NOEXCEPT
 {
@@ -2117,44 +2117,44 @@ swap(packaged_task<_Rp(_ArgTypes...)>& __x, packaged_task<_Rp(_ArgTypes...)>& __
 }
 
 template <class _Callable, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator<packaged_task<_Callable>, _Alloc>
+struct _LIBCUDACXX_TEMPLATE_VIS uses_allocator<packaged_task<_Callable>, _Alloc>
     : public true_type {};
 
 template <class _Rp, class _Fp>
-_LIBCPP_INLINE_VISIBILITY future<_Rp>
+_LIBCUDACXX_INLINE_VISIBILITY future<_Rp>
 __make_deferred_assoc_state(_Fp&& __f)
 {
     unique_ptr<__deferred_assoc_state<_Rp, _Fp>, __release_shared_count>
-        __h(new __deferred_assoc_state<_Rp, _Fp>(_VSTD::forward<_Fp>(__f)));
+        __h(new __deferred_assoc_state<_Rp, _Fp>(_CUDA_VSTD::forward<_Fp>(__f)));
     return future<_Rp>(__h.get());
 }
 
 template <class _Rp, class _Fp>
-_LIBCPP_INLINE_VISIBILITY future<_Rp>
+_LIBCUDACXX_INLINE_VISIBILITY future<_Rp>
 __make_async_assoc_state(_Fp&& __f)
 {
     unique_ptr<__async_assoc_state<_Rp, _Fp>, __release_shared_count>
-        __h(new __async_assoc_state<_Rp, _Fp>(_VSTD::forward<_Fp>(__f)));
-    _VSTD::thread(&__async_assoc_state<_Rp, _Fp>::__execute, __h.get()).detach();
+        __h(new __async_assoc_state<_Rp, _Fp>(_CUDA_VSTD::forward<_Fp>(__f)));
+    _CUDA_VSTD::thread(&__async_assoc_state<_Rp, _Fp>::__execute, __h.get()).detach();
     return future<_Rp>(__h.get());
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Fp, class... _Args>
-class _LIBCPP_HIDDEN __async_func
+class _LIBCUDACXX_HIDDEN __async_func
 {
     tuple<_Fp, _Args...> __f_;
 
 public:
     typedef typename __invoke_of<_Fp, _Args...>::type _Rp;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __async_func(_Fp&& __f, _Args&&... __args)
-        : __f_(_VSTD::move(__f), _VSTD::move(__args)...) {}
+        : __f_(_CUDA_VSTD::move(__f), _CUDA_VSTD::move(__args)...) {}
 
-    _LIBCPP_INLINE_VISIBILITY
-    __async_func(__async_func&& __f) : __f_(_VSTD::move(__f.__f_)) {}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    __async_func(__async_func&& __f) : __f_(_CUDA_VSTD::move(__f.__f_)) {}
 
     _Rp operator()()
     {
@@ -2166,46 +2166,46 @@ private:
     _Rp
     __execute(__tuple_indices<_Indices...>)
     {
-        return _VSTD::__invoke(_VSTD::move(_VSTD::get<0>(__f_)), _VSTD::move(_VSTD::get<_Indices>(__f_))...);
+        return _CUDA_VSTD::__invoke(_CUDA_VSTD::move(_CUDA_VSTD::get<0>(__f_)), _CUDA_VSTD::move(_CUDA_VSTD::get<_Indices>(__f_))...);
     }
 };
 
-inline _LIBCPP_INLINE_VISIBILITY bool __does_policy_contain(launch __policy, launch __value )
+inline _LIBCUDACXX_INLINE_VISIBILITY bool __does_policy_contain(launch __policy, launch __value )
 { return (int(__policy) & int(__value)) != 0; }
 
 template <class _Fp, class... _Args>
-_LIBCPP_NODISCARD_AFTER_CXX17
+_LIBCUDACXX_NODISCARD_AFTER_CXX17
 future<typename __invoke_of<typename decay<_Fp>::type, typename decay<_Args>::type...>::type>
 async(launch __policy, _Fp&& __f, _Args&&... __args)
 {
     typedef __async_func<typename decay<_Fp>::type, typename decay<_Args>::type...> _BF;
     typedef typename _BF::_Rp _Rp;
 
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
 #endif
         if (__does_policy_contain(__policy, launch::async))
-        return _VSTD::__make_async_assoc_state<_Rp>(_BF(_LIBCPP_AUTO_CAST(_VSTD::forward<_Fp>(__f)),
-                                                        _LIBCPP_AUTO_CAST(_VSTD::forward<_Args>(__args))...));
-#ifndef _LIBCPP_NO_EXCEPTIONS
+        return _CUDA_VSTD::__make_async_assoc_state<_Rp>(_BF(_LIBCUDACXX_AUTO_CAST(_CUDA_VSTD::forward<_Fp>(__f)),
+                                                        _LIBCUDACXX_AUTO_CAST(_CUDA_VSTD::forward<_Args>(__args))...));
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch ( ... ) { if (__policy == launch::async) throw ; }
 #endif
 
     if (__does_policy_contain(__policy, launch::deferred))
-        return _VSTD::__make_deferred_assoc_state<_Rp>(_BF(_LIBCPP_AUTO_CAST(_VSTD::forward<_Fp>(__f)),
-                                                           _LIBCPP_AUTO_CAST(_VSTD::forward<_Args>(__args))...));
+        return _CUDA_VSTD::__make_deferred_assoc_state<_Rp>(_BF(_LIBCUDACXX_AUTO_CAST(_CUDA_VSTD::forward<_Fp>(__f)),
+                                                           _LIBCUDACXX_AUTO_CAST(_CUDA_VSTD::forward<_Args>(__args))...));
     return future<_Rp>{};
 }
 
 template <class _Fp, class... _Args>
-_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 inline _LIBCUDACXX_INLINE_VISIBILITY
 future<typename __invoke_of<typename decay<_Fp>::type, typename decay<_Args>::type...>::type>
 async(_Fp&& __f, _Args&&... __args)
 {
-    return _VSTD::async(launch::any, _VSTD::forward<_Fp>(__f),
-                                    _VSTD::forward<_Args>(__args)...);
+    return _CUDA_VSTD::async(launch::any, _CUDA_VSTD::forward<_Fp>(__f),
+                                    _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 #endif // C++03
@@ -2213,51 +2213,51 @@ async(_Fp&& __f, _Args&&... __args)
 // shared_future
 
 template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS shared_future
+class _LIBCUDACXX_TEMPLATE_VIS shared_future
 {
     __assoc_state<_Rp>* __state_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future() _NOEXCEPT : __state_(nullptr) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future(const shared_future& __rhs)  _NOEXCEPT : __state_(__rhs.__state_)
         {if (__state_) __state_->__add_shared();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future(future<_Rp>&& __f) _NOEXCEPT : __state_(__f.__state_)
         {__f.__state_ = nullptr;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
         {__rhs.__state_ = nullptr;}
     ~shared_future();
     shared_future& operator=(const shared_future& __rhs) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future& operator=(shared_future&& __rhs) _NOEXCEPT
         {
-            shared_future(_VSTD::move(__rhs)).swap(*this);
+            shared_future(_CUDA_VSTD::move(__rhs)).swap(*this);
             return *this;
         }
 
     // retrieving the value
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Rp& get() const {return __state_->copy();}
 
-    _LIBCPP_INLINE_VISIBILITY
-    void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void swap(shared_future& __rhs) _NOEXCEPT {_CUDA_VSTD::swap(__state_, __rhs.__state_);}
 
     // functions to check state
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool valid() const _NOEXCEPT {return __state_ != nullptr;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void wait() const {__state_->wait();}
     template <class _Rep, class _Period>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
             {return __state_->wait_for(__rel_time);}
     template <class _Clock, class _Duration>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
             {return __state_->wait_until(__abs_time);}
@@ -2283,51 +2283,51 @@ shared_future<_Rp>::operator=(const shared_future& __rhs) _NOEXCEPT
 }
 
 template <class _Rp>
-class _LIBCPP_TEMPLATE_VIS shared_future<_Rp&>
+class _LIBCUDACXX_TEMPLATE_VIS shared_future<_Rp&>
 {
     __assoc_state<_Rp&>* __state_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future() _NOEXCEPT : __state_(nullptr) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future(const shared_future& __rhs) : __state_(__rhs.__state_)
         {if (__state_) __state_->__add_shared();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future(future<_Rp&>&& __f) _NOEXCEPT : __state_(__f.__state_)
         {__f.__state_ = nullptr;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
         {__rhs.__state_ = nullptr;}
     ~shared_future();
     shared_future& operator=(const shared_future& __rhs);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future& operator=(shared_future&& __rhs) _NOEXCEPT
         {
-            shared_future(_VSTD::move(__rhs)).swap(*this);
+            shared_future(_CUDA_VSTD::move(__rhs)).swap(*this);
             return *this;
         }
 
     // retrieving the value
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Rp& get() const {return __state_->copy();}
 
-    _LIBCPP_INLINE_VISIBILITY
-    void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void swap(shared_future& __rhs) _NOEXCEPT {_CUDA_VSTD::swap(__state_, __rhs.__state_);}
 
     // functions to check state
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool valid() const _NOEXCEPT {return __state_ != nullptr;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void wait() const {__state_->wait();}
     template <class _Rep, class _Period>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
             {return __state_->wait_for(__rel_time);}
     template <class _Clock, class _Duration>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
             {return __state_->wait_until(__abs_time);}
@@ -2353,58 +2353,58 @@ shared_future<_Rp&>::operator=(const shared_future& __rhs)
 }
 
 template <>
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_FUTURE shared_future<void>
+class _LIBCUDACXX_TYPE_VIS _LIBCUDACXX_AVAILABILITY_FUTURE shared_future<void>
 {
     __assoc_sub_state* __state_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future() _NOEXCEPT : __state_(nullptr) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future(const shared_future& __rhs) : __state_(__rhs.__state_)
         {if (__state_) __state_->__add_shared();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future(future<void>&& __f) _NOEXCEPT : __state_(__f.__state_)
         {__f.__state_ = nullptr;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future(shared_future&& __rhs) _NOEXCEPT : __state_(__rhs.__state_)
         {__rhs.__state_ = nullptr;}
     ~shared_future();
     shared_future& operator=(const shared_future& __rhs);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_future& operator=(shared_future&& __rhs) _NOEXCEPT
         {
-            shared_future(_VSTD::move(__rhs)).swap(*this);
+            shared_future(_CUDA_VSTD::move(__rhs)).swap(*this);
             return *this;
         }
 
     // retrieving the value
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void get() const {__state_->copy();}
 
-    _LIBCPP_INLINE_VISIBILITY
-    void swap(shared_future& __rhs) _NOEXCEPT {_VSTD::swap(__state_, __rhs.__state_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void swap(shared_future& __rhs) _NOEXCEPT {_CUDA_VSTD::swap(__state_, __rhs.__state_);}
 
     // functions to check state
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool valid() const _NOEXCEPT {return __state_ != nullptr;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void wait() const {__state_->wait();}
     template <class _Rep, class _Period>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_for(const chrono::duration<_Rep, _Period>& __rel_time) const
             {return __state_->wait_for(__rel_time);}
     template <class _Clock, class _Duration>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         future_status
         wait_until(const chrono::time_point<_Clock, _Duration>& __abs_time) const
             {return __state_->wait_until(__abs_time);}
 };
 
 template <class _Rp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(shared_future<_Rp>& __x, shared_future<_Rp>& __y) _NOEXCEPT
 {
@@ -2416,7 +2416,7 @@ inline
 shared_future<_Rp>
 future<_Rp>::share() _NOEXCEPT
 {
-    return shared_future<_Rp>(_VSTD::move(*this));
+    return shared_future<_Rp>(_CUDA_VSTD::move(*this));
 }
 
 template <class _Rp>
@@ -2424,16 +2424,16 @@ inline
 shared_future<_Rp&>
 future<_Rp&>::share() _NOEXCEPT
 {
-    return shared_future<_Rp&>(_VSTD::move(*this));
+    return shared_future<_Rp&>(_CUDA_VSTD::move(*this));
 }
 
 inline
 shared_future<void>
 future<void>::share() _NOEXCEPT
 {
-    return shared_future<void>(_VSTD::move(*this));
+    return shared_future<void>(_CUDA_VSTD::move(*this));
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_FUTURE
+#endif // _LIBCUDACXX_FUTURE

diff  --git a/libcxx/include/initializer_list b/libcxx/include/initializer_list
index 02a8ec57fab3..9099b2367566 100644
--- a/libcxx/include/initializer_list
+++ b/libcxx/include/initializer_list
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_INITIALIZER_LIST
-#define _LIBCPP_INITIALIZER_LIST
+#ifndef _LIBCUDACXX_INITIALIZER_LIST
+#define _LIBCUDACXX_INITIALIZER_LIST
 
 /*
     initializer_list synopsis
@@ -46,23 +46,23 @@ template<class E> const E* end(initializer_list<E> il) noexcept; // constexpr in
 #include <__config>
 #include <cstddef>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 namespace std  // purposefully not versioned
 {
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template<class _Ep>
-class _LIBCPP_TEMPLATE_VIS initializer_list
+class _LIBCUDACXX_TEMPLATE_VIS initializer_list
 {
     const _Ep* __begin_;
     size_t    __size_;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     initializer_list(const _Ep* __b, size_t __s) _NOEXCEPT
         : __begin_(__b),
           __size_(__s)
@@ -76,26 +76,26 @@ public:
     typedef const _Ep* iterator;
     typedef const _Ep* const_iterator;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     initializer_list() _NOEXCEPT : __begin_(nullptr), __size_(0) {}
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     size_t    size()  const _NOEXCEPT {return __size_;}
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const _Ep* begin() const _NOEXCEPT {return __begin_;}
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const _Ep* end()   const _NOEXCEPT {return __begin_ + __size_;}
 };
 
 template<class _Ep>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const _Ep*
 begin(initializer_list<_Ep> __il) _NOEXCEPT
 {
@@ -103,16 +103,16 @@ begin(initializer_list<_Ep> __il) _NOEXCEPT
 }
 
 template<class _Ep>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const _Ep*
 end(initializer_list<_Ep> __il) _NOEXCEPT
 {
     return __il.end();
 }
 
-#endif // !defined(_LIBCPP_CXX03_LANG)
+#endif // !defined(_LIBCUDACXX_CXX03_LANG)
 
 } // namespace std
 
-#endif // _LIBCPP_INITIALIZER_LIST
+#endif // _LIBCUDACXX_INITIALIZER_LIST

diff  --git a/libcxx/include/inttypes.h b/libcxx/include/inttypes.h
index e0fd71f9b65d..c6e8ba7fcb49 100644
--- a/libcxx/include/inttypes.h
+++ b/libcxx/include/inttypes.h
@@ -7,12 +7,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_INTTYPES_H
+#ifndef _LIBCUDACXX_INTTYPES_H
 // AIX system headers need inttypes.h to be re-enterable while _STD_TYPES_T
 // is defined until an inclusion of it without _STD_TYPES_T occurs, in which
 // case the header guard macro is defined.
 #if !defined(_AIX) || !defined(_STD_TYPES_T)
-#define _LIBCPP_INTTYPES_H
+#define _LIBCUDACXX_INTTYPES_H
 #endif // _STD_TYPES_T
 
 /*
@@ -237,7 +237,7 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -259,4 +259,4 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
 
 #endif // __cplusplus
 
-#endif // _LIBCPP_INTTYPES_H
+#endif // _LIBCUDACXX_INTTYPES_H

diff  --git a/libcxx/include/iomanip b/libcxx/include/iomanip
index ed8334519ae8..fba5a82bf666 100644
--- a/libcxx/include/iomanip
+++ b/libcxx/include/iomanip
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_IOMANIP
-#define _LIBCPP_IOMANIP
+#ifndef _LIBCUDACXX_IOMANIP
+#define _LIBCUDACXX_IOMANIP
 
 /*
     iomanip synopsis
@@ -47,11 +47,11 @@ template <class charT, class traits, class Allocator>
 #include <istream>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // resetiosflags
 
@@ -59,12 +59,12 @@ class __iom_t1
 {
     ios_base::fmtflags __mask_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __iom_t1(ios_base::fmtflags __m) : __mask_(__m) {}
 
     template <class _CharT, class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_istream<_CharT, _Traits>&
     operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t1& __x)
     {
@@ -74,7 +74,7 @@ public:
 
     template <class _CharT, class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream<_CharT, _Traits>&
     operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t1& __x)
     {
@@ -83,7 +83,7 @@ public:
     }
 };
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __iom_t1
 resetiosflags(ios_base::fmtflags __mask)
 {
@@ -96,12 +96,12 @@ class __iom_t2
 {
     ios_base::fmtflags __mask_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __iom_t2(ios_base::fmtflags __m) : __mask_(__m) {}
 
     template <class _CharT, class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_istream<_CharT, _Traits>&
     operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t2& __x)
     {
@@ -111,7 +111,7 @@ public:
 
     template <class _CharT, class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream<_CharT, _Traits>&
     operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t2& __x)
     {
@@ -120,7 +120,7 @@ public:
     }
 };
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __iom_t2
 setiosflags(ios_base::fmtflags __mask)
 {
@@ -133,12 +133,12 @@ class __iom_t3
 {
     int __base_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __iom_t3(int __b) : __base_(__b) {}
 
     template <class _CharT, class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_istream<_CharT, _Traits>&
     operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t3& __x)
     {
@@ -151,7 +151,7 @@ public:
 
     template <class _CharT, class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream<_CharT, _Traits>&
     operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t3& __x)
     {
@@ -163,7 +163,7 @@ public:
     }
 };
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __iom_t3
 setbase(int __base)
 {
@@ -177,12 +177,12 @@ class __iom_t4
 {
     _CharT __fill_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __iom_t4(_CharT __c) : __fill_(__c) {}
 
     template <class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream<_CharT, _Traits>&
     operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t4& __x)
     {
@@ -192,7 +192,7 @@ public:
 };
 
 template<class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __iom_t4<_CharT>
 setfill(_CharT __c)
 {
@@ -205,12 +205,12 @@ class __iom_t5
 {
     int __n_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __iom_t5(int __n) : __n_(__n) {}
 
     template <class _CharT, class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_istream<_CharT, _Traits>&
     operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t5& __x)
     {
@@ -220,7 +220,7 @@ public:
 
     template <class _CharT, class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream<_CharT, _Traits>&
     operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t5& __x)
     {
@@ -229,7 +229,7 @@ public:
     }
 };
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __iom_t5
 setprecision(int __n)
 {
@@ -242,12 +242,12 @@ class __iom_t6
 {
     int __n_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __iom_t6(int __n) : __n_(__n) {}
 
     template <class _CharT, class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_istream<_CharT, _Traits>&
     operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t6& __x)
     {
@@ -257,7 +257,7 @@ public:
 
     template <class _CharT, class _Traits>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream<_CharT, _Traits>&
     operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t6& __x)
     {
@@ -266,7 +266,7 @@ public:
     }
 };
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __iom_t6
 setw(int __n)
 {
@@ -287,7 +287,7 @@ class __iom_t7
     _MoneyT& __mon_;
     bool __intl_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __iom_t7(_MoneyT& __mon, bool __intl)
         : __mon_(__mon), __intl_(__intl) {}
 
@@ -301,10 +301,10 @@ template <class _CharT, class _Traits, class _MoneyT>
 basic_istream<_CharT, _Traits>&
 operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         typename basic_istream<_CharT, _Traits>::sentry __s(__is);
         if (__s)
         {
@@ -315,18 +315,18 @@ operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t7<_MoneyT>& __x)
             __mf.get(_Ip(__is), _Ip(), __x.__intl_, __is, __err, __x.__mon_);
             __is.setstate(__err);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         __is.__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return __is;
 }
 
 template <class _MoneyT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __iom_t7<_MoneyT>
 get_money(_MoneyT& __mon, bool __intl = false)
 {
@@ -347,7 +347,7 @@ class __iom_t8
     const _MoneyT& __mon_;
     bool __intl_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __iom_t8(const _MoneyT& __mon, bool __intl)
         : __mon_(__mon), __intl_(__intl) {}
 
@@ -361,10 +361,10 @@ template <class _CharT, class _Traits, class _MoneyT>
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
         if (__s)
         {
@@ -374,18 +374,18 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t8<_MoneyT>& __x)
             if (__mf.put(_Op(__os), __x.__intl_, __os, __os.fill(), __x.__mon_).failed())
                 __os.setstate(ios_base::badbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         __os.__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return __os;
 }
 
 template <class _MoneyT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __iom_t8<_MoneyT>
 put_money(const _MoneyT& __mon, bool __intl = false)
 {
@@ -406,7 +406,7 @@ class __iom_t9
     tm* __tm_;
     const _CharT* __fmt_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __iom_t9(tm* __tm, const _CharT* __fmt)
         : __tm_(__tm), __fmt_(__fmt) {}
 
@@ -420,10 +420,10 @@ template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         typename basic_istream<_CharT, _Traits>::sentry __s(__is);
         if (__s)
         {
@@ -435,18 +435,18 @@ operator>>(basic_istream<_CharT, _Traits>& __is, const __iom_t9<_CharT>& __x)
                      __x.__fmt_, __x.__fmt_ + _Traits::length(__x.__fmt_));
             __is.setstate(__err);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         __is.__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return __is;
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __iom_t9<_CharT>
 get_time(tm* __tm, const _CharT* __fmt)
 {
@@ -467,7 +467,7 @@ class __iom_t10
     const tm* __tm_;
     const _CharT* __fmt_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __iom_t10(const tm* __tm, const _CharT* __fmt)
         : __tm_(__tm), __fmt_(__fmt) {}
 
@@ -481,10 +481,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
         if (__s)
         {
@@ -495,28 +495,28 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const __iom_t10<_CharT>& __x)
                          __x.__fmt_, __x.__fmt_ + _Traits::length(__x.__fmt_)).failed())
                 __os.setstate(ios_base::badbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         __os.__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return __os;
 }
 
 template <class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __iom_t10<_CharT>
 put_time(const tm* __tm, const _CharT* __fmt)
 {
     return __iom_t10<_CharT>(__tm, __fmt);
 }
 
-#if _LIBCPP_STD_VER >= 11
+#if _LIBCUDACXX_STD_VER >= 11
 
 template <class _CharT, class _Traits>
-_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
+_LIBCUDACXX_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
 __quoted_output(basic_ostream<_CharT, _Traits>& __os,
                 const _CharT *__first, const _CharT *__last, _CharT __delim, _CharT __escape)
 {
@@ -528,11 +528,11 @@ __quoted_output(basic_ostream<_CharT, _Traits>& __os,
         __str.push_back(*__first);
     }
     __str.push_back(__delim);
-    return _VSTD::__put_character_sequence(__os, __str.data(), __str.size());
+    return _CUDA_VSTD::__put_character_sequence(__os, __str.data(), __str.size());
 }
 
 template <class _CharT, class _Traits, class _String>
-_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
+_LIBCUDACXX_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
 __quoted_input(basic_istream<_CharT, _Traits>& __is, _String& __string, _CharT __delim, _CharT __escape)
 {
     __string.clear();
@@ -566,48 +566,48 @@ __quoted_input(basic_istream<_CharT, _Traits>& __is, _String& __string, _CharT _
 }
 
 template <class _CharT, class _Traits>
-struct _LIBCPP_HIDDEN __quoted_output_proxy
+struct _LIBCUDACXX_HIDDEN __quoted_output_proxy
 {
     const _CharT *__first_;
     const _CharT *__last_;
     _CharT __delim_;
     _CharT __escape_;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     explicit __quoted_output_proxy(const _CharT *__f, const _CharT *__l, _CharT __d, _CharT __e)
         : __first_(__f), __last_(__l), __delim_(__d), __escape_(__e) {}
 
     template<class _T2, __enable_if_t<_IsSame<_Traits, void>::value || _IsSame<_Traits, _T2>::value>* = nullptr>
-    friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _T2>&
+    friend _LIBCUDACXX_HIDE_FROM_ABI basic_ostream<_CharT, _T2>&
     operator<<(basic_ostream<_CharT, _T2>& __os, const __quoted_output_proxy& __p) {
         return std::__quoted_output(__os, __p.__first_, __p.__last_, __p.__delim_, __p.__escape_);
     }
 };
 
 template <class _CharT, class _Traits, class _Allocator>
-struct _LIBCPP_HIDDEN __quoted_proxy
+struct _LIBCUDACXX_HIDDEN __quoted_proxy
 {
     basic_string<_CharT, _Traits, _Allocator>& __string_;
     _CharT __delim_;
     _CharT __escape_;
 
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     explicit __quoted_proxy(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __d, _CharT __e)
         : __string_(__s), __delim_(__d), __escape_(__e) {}
 
-    friend _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
+    friend _LIBCUDACXX_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
     operator<<(basic_ostream<_CharT, _Traits>& __os, const __quoted_proxy& __p) {
         return std::__quoted_output(__os, __p.__string_.data(), __p.__string_.data() + __p.__string_.size(), __p.__delim_, __p.__escape_);
     }
 
-    friend _LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
+    friend _LIBCUDACXX_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
     operator>>(basic_istream<_CharT, _Traits>& __is, const __quoted_proxy& __p) {
         return std::__quoted_input(__is, __p.__string_, __p.__delim_, __p.__escape_);
     }
 };
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 __quoted_output_proxy<_CharT, _Traits>
 __quoted(const basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
 {
@@ -615,19 +615,19 @@ __quoted(const basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim =
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 __quoted_proxy<_CharT, _Traits, _Allocator>
 __quoted(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
 {
     return __quoted_proxy<_CharT, _Traits, _Allocator>(__s, __delim, __escape);
 }
 
-#endif // _LIBCPP_STD_VER >= 11
+#endif // _LIBCUDACXX_STD_VER >= 11
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 
 template <class _CharT>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 auto quoted(const _CharT *__s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
 {
     const _CharT *__end = __s;
@@ -636,28 +636,28 @@ auto quoted(const _CharT *__s, _CharT __delim = _CharT('"'), _CharT __escape = _
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 auto quoted(const basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
 {
     return __quoted_output_proxy<_CharT, _Traits>(__s.data(), __s.data() + __s.size(), __delim, __escape);
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 auto quoted(basic_string<_CharT, _Traits, _Allocator>& __s, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
 {
     return __quoted_proxy<_CharT, _Traits, _Allocator>(__s, __delim, __escape);
 }
 
 template <class _CharT, class _Traits>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 auto quoted(basic_string_view<_CharT, _Traits> __sv, _CharT __delim = _CharT('"'), _CharT __escape = _CharT('\\'))
 {
     return __quoted_output_proxy<_CharT, _Traits>(__sv.data(), __sv.data() + __sv.size(), __delim, __escape);
 }
 
-#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER > 11
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_IOMANIP
+#endif // _LIBCUDACXX_IOMANIP

diff  --git a/libcxx/include/ios b/libcxx/include/ios
index 7140e00b406a..01d286685275 100644
--- a/libcxx/include/ios
+++ b/libcxx/include/ios
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_IOS
-#define _LIBCPP_IOS
+#ifndef _LIBCUDACXX_IOS
+#define _LIBCUDACXX_IOS
 
 /*
     ios synopsis
@@ -212,7 +212,7 @@ storage-class-specifier const error_category& iostream_category() noexcept;
 
 #include <__config>
 
-#if defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   error "The iostreams library is not supported since libc++ has been configured without support for localization."
 #endif
 
@@ -226,22 +226,22 @@ storage-class-specifier const error_category& iostream_category() noexcept;
 // standard-mandated includes
 #include <iosfwd>
 
-#if !defined(_LIBCPP_HAS_NO_ATOMIC_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_ATOMIC_HEADER)
 #include <atomic>     // for __xindex_
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 typedef ptr
diff _t streamsize;
 
-class _LIBCPP_TYPE_VIS ios_base
+class _LIBCUDACXX_TYPE_VIS ios_base
 {
 public:
-    class _LIBCPP_EXCEPTION_ABI failure;
+    class _LIBCUDACXX_EXCEPTION_ABI failure;
 
     typedef unsigned int fmtflags;
     static const fmtflags boolalpha   = 0x0001;
@@ -279,28 +279,28 @@ public:
 
     enum seekdir {beg, cur, end};
 
-#if _LIBCPP_STD_VER <= 14
+#if _LIBCUDACXX_STD_VER <= 14
     typedef iostate      io_state;
     typedef openmode     open_mode;
     typedef seekdir      seek_dir;
 
-    typedef _VSTD::streamoff streamoff;
-    typedef _VSTD::streampos streampos;
+    typedef _CUDA_VSTD::streamoff streamoff;
+    typedef _CUDA_VSTD::streampos streampos;
 #endif
 
-    class _LIBCPP_TYPE_VIS Init;
+    class _LIBCUDACXX_TYPE_VIS Init;
 
     // 27.5.2.2 fmtflags state:
-    _LIBCPP_INLINE_VISIBILITY fmtflags flags() const;
-    _LIBCPP_INLINE_VISIBILITY fmtflags flags(fmtflags __fmtfl);
-    _LIBCPP_INLINE_VISIBILITY fmtflags setf(fmtflags __fmtfl);
-    _LIBCPP_INLINE_VISIBILITY fmtflags setf(fmtflags __fmtfl, fmtflags __mask);
-    _LIBCPP_INLINE_VISIBILITY void unsetf(fmtflags __mask);
+    _LIBCUDACXX_INLINE_VISIBILITY fmtflags flags() const;
+    _LIBCUDACXX_INLINE_VISIBILITY fmtflags flags(fmtflags __fmtfl);
+    _LIBCUDACXX_INLINE_VISIBILITY fmtflags setf(fmtflags __fmtfl);
+    _LIBCUDACXX_INLINE_VISIBILITY fmtflags setf(fmtflags __fmtfl, fmtflags __mask);
+    _LIBCUDACXX_INLINE_VISIBILITY void unsetf(fmtflags __mask);
 
-    _LIBCPP_INLINE_VISIBILITY streamsize precision() const;
-    _LIBCPP_INLINE_VISIBILITY streamsize precision(streamsize __prec);
-    _LIBCPP_INLINE_VISIBILITY streamsize width() const;
-    _LIBCPP_INLINE_VISIBILITY streamsize width(streamsize __wide);
+    _LIBCUDACXX_INLINE_VISIBILITY streamsize precision() const;
+    _LIBCUDACXX_INLINE_VISIBILITY streamsize precision(streamsize __prec);
+    _LIBCUDACXX_INLINE_VISIBILITY streamsize width() const;
+    _LIBCUDACXX_INLINE_VISIBILITY streamsize width(streamsize __wide);
 
     // 27.5.2.3 locales:
     locale imbue(const locale& __loc);
@@ -324,22 +324,22 @@ public:
 
     static bool sync_with_stdio(bool __sync = true);
 
-    _LIBCPP_INLINE_VISIBILITY iostate rdstate() const;
+    _LIBCUDACXX_INLINE_VISIBILITY iostate rdstate() const;
     void clear(iostate __state = goodbit);
-    _LIBCPP_INLINE_VISIBILITY void setstate(iostate __state);
+    _LIBCUDACXX_INLINE_VISIBILITY void setstate(iostate __state);
 
-    _LIBCPP_INLINE_VISIBILITY bool good() const;
-    _LIBCPP_INLINE_VISIBILITY bool eof() const;
-    _LIBCPP_INLINE_VISIBILITY bool fail() const;
-    _LIBCPP_INLINE_VISIBILITY bool bad() const;
+    _LIBCUDACXX_INLINE_VISIBILITY bool good() const;
+    _LIBCUDACXX_INLINE_VISIBILITY bool eof() const;
+    _LIBCUDACXX_INLINE_VISIBILITY bool fail() const;
+    _LIBCUDACXX_INLINE_VISIBILITY bool bad() const;
 
-    _LIBCPP_INLINE_VISIBILITY iostate exceptions() const;
-    _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __iostate);
+    _LIBCUDACXX_INLINE_VISIBILITY iostate exceptions() const;
+    _LIBCUDACXX_INLINE_VISIBILITY void exceptions(iostate __iostate);
 
     void __set_badbit_and_consider_rethrow();
     void __set_failbit_and_consider_rethrow();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __setstate_nothrow(iostate __state)
     {
         if (__rdbuf_)
@@ -349,14 +349,14 @@ public:
     }
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ios_base() {// purposefully does no initialization
                }
 
     void init(void* __sb);
-    _LIBCPP_INLINE_VISIBILITY void* rdbuf() const {return __rdbuf_;}
+    _LIBCUDACXX_INLINE_VISIBILITY void* rdbuf() const {return __rdbuf_;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void rdbuf(void* __sb)
     {
         __rdbuf_ = __sb;
@@ -368,7 +368,7 @@ protected:
     void move(ios_base&);
     void swap(ios_base&) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void set_rdbuf(void* __sb)
     {
         __rdbuf_ = __sb;
@@ -389,7 +389,7 @@ private:
     size_t          __event_cap_;
 // TODO(EricWF): Enable this for both Clang and GCC. Currently it is only
 // enabled with clang.
-#if defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(_LIBCUDACXX_HAS_C_ATOMIC_IMP) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
     static atomic<int> __xindex_;
 #else
     static int      __xindex_;
@@ -403,38 +403,38 @@ private:
 };
 
 //enum class io_errc
-_LIBCPP_DECLARE_STRONG_ENUM(io_errc)
+_LIBCUDACXX_DECLARE_STRONG_ENUM(io_errc)
 {
     stream = 1
 };
-_LIBCPP_DECLARE_STRONG_ENUM_EPILOG(io_errc)
+_LIBCUDACXX_DECLARE_STRONG_ENUM_EPILOG(io_errc)
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc> : public true_type { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_error_code_enum<io_errc> : public true_type { };
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
 template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_code_enum<io_errc::__lx> : public true_type { };
+struct _LIBCUDACXX_TEMPLATE_VIS is_error_code_enum<io_errc::__lx> : public true_type { };
 #endif
 
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 const error_category& iostream_category() _NOEXCEPT;
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 error_code
 make_error_code(io_errc __e) _NOEXCEPT
 {
     return error_code(static_cast<int>(__e), iostream_category());
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 error_condition
 make_error_condition(io_errc __e) _NOEXCEPT
 {
     return error_condition(static_cast<int>(__e), iostream_category());
 }
 
-class _LIBCPP_EXCEPTION_ABI ios_base::failure
+class _LIBCUDACXX_EXCEPTION_ABI ios_base::failure
     : public system_error
 {
 public:
@@ -444,17 +444,17 @@ public:
     virtual ~failure() _NOEXCEPT;
 };
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_failure(char const* __msg) {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw ios_base::failure(__msg);
 #else
     ((void)__msg);
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-class _LIBCPP_TYPE_VIS ios_base::Init
+class _LIBCUDACXX_TYPE_VIS ios_base::Init
 {
 public:
     Init();
@@ -463,14 +463,14 @@ public:
 
 // fmtflags
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 ios_base::fmtflags
 ios_base::flags() const
 {
     return __fmtflags_;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 ios_base::fmtflags
 ios_base::flags(fmtflags __fmtfl)
 {
@@ -479,7 +479,7 @@ ios_base::flags(fmtflags __fmtfl)
     return __r;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 ios_base::fmtflags
 ios_base::setf(fmtflags __fmtfl)
 {
@@ -488,14 +488,14 @@ ios_base::setf(fmtflags __fmtfl)
     return __r;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 ios_base::unsetf(fmtflags __mask)
 {
     __fmtflags_ &= ~__mask;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 ios_base::fmtflags
 ios_base::setf(fmtflags __fmtfl, fmtflags __mask)
 {
@@ -507,14 +507,14 @@ ios_base::setf(fmtflags __fmtfl, fmtflags __mask)
 
 // precision
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 streamsize
 ios_base::precision() const
 {
     return __precision_;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 streamsize
 ios_base::precision(streamsize __prec)
 {
@@ -525,14 +525,14 @@ ios_base::precision(streamsize __prec)
 
 // width
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 streamsize
 ios_base::width() const
 {
     return __width_;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 streamsize
 ios_base::width(streamsize __wide)
 {
@@ -543,56 +543,56 @@ ios_base::width(streamsize __wide)
 
 // iostate
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 ios_base::iostate
 ios_base::rdstate() const
 {
     return __rdstate_;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 ios_base::setstate(iostate __state)
 {
     clear(__rdstate_ | __state);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 ios_base::good() const
 {
     return __rdstate_ == 0;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 ios_base::eof() const
 {
     return (__rdstate_ & eofbit) != 0;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 ios_base::fail() const
 {
     return (__rdstate_ & (failbit | badbit)) != 0;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 ios_base::bad() const
 {
     return (__rdstate_ & badbit) != 0;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 ios_base::iostate
 ios_base::exceptions() const
 {
     return __exceptions_;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 ios_base::exceptions(iostate __iostate)
 {
@@ -601,7 +601,7 @@ ios_base::exceptions(iostate __iostate)
 }
 
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_ios
+class _LIBCUDACXX_TEMPLATE_VIS basic_ios
     : public ios_base
 {
 public:
@@ -616,73 +616,73 @@ public:
     static_assert((is_same<_CharT, typename traits_type::char_type>::value),
                   "traits_type::char_type must be the same type as CharT");
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
     // Preserve the ability to compare with literal 0,
     // and implicitly convert to bool, but not implicitly convert to int.
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator void*() const {return fail() ? nullptr : (void*)this;}
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit operator bool() const {return !fail();}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY bool operator!() const    {return  fail();}
-    _LIBCPP_INLINE_VISIBILITY iostate rdstate() const   {return ios_base::rdstate();}
-    _LIBCPP_INLINE_VISIBILITY void clear(iostate __state = goodbit) {ios_base::clear(__state);}
-    _LIBCPP_INLINE_VISIBILITY void setstate(iostate __state) {ios_base::setstate(__state);}
-    _LIBCPP_INLINE_VISIBILITY bool good() const {return ios_base::good();}
-    _LIBCPP_INLINE_VISIBILITY bool eof() const  {return ios_base::eof();}
-    _LIBCPP_INLINE_VISIBILITY bool fail() const {return ios_base::fail();}
-    _LIBCPP_INLINE_VISIBILITY bool bad() const  {return ios_base::bad();}
+    _LIBCUDACXX_INLINE_VISIBILITY bool operator!() const    {return  fail();}
+    _LIBCUDACXX_INLINE_VISIBILITY iostate rdstate() const   {return ios_base::rdstate();}
+    _LIBCUDACXX_INLINE_VISIBILITY void clear(iostate __state = goodbit) {ios_base::clear(__state);}
+    _LIBCUDACXX_INLINE_VISIBILITY void setstate(iostate __state) {ios_base::setstate(__state);}
+    _LIBCUDACXX_INLINE_VISIBILITY bool good() const {return ios_base::good();}
+    _LIBCUDACXX_INLINE_VISIBILITY bool eof() const  {return ios_base::eof();}
+    _LIBCUDACXX_INLINE_VISIBILITY bool fail() const {return ios_base::fail();}
+    _LIBCUDACXX_INLINE_VISIBILITY bool bad() const  {return ios_base::bad();}
 
-    _LIBCPP_INLINE_VISIBILITY iostate exceptions() const {return ios_base::exceptions();}
-    _LIBCPP_INLINE_VISIBILITY void exceptions(iostate __iostate) {ios_base::exceptions(__iostate);}
+    _LIBCUDACXX_INLINE_VISIBILITY iostate exceptions() const {return ios_base::exceptions();}
+    _LIBCUDACXX_INLINE_VISIBILITY void exceptions(iostate __iostate) {ios_base::exceptions(__iostate);}
 
     // 27.5.4.1 Constructor/destructor:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_ios(basic_streambuf<char_type,traits_type>* __sb);
     virtual ~basic_ios();
 
     // 27.5.4.2 Members:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream<char_type, traits_type>* tie() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream<char_type, traits_type>* tie(basic_ostream<char_type, traits_type>* __tiestr);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_streambuf<char_type, traits_type>* rdbuf() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_streambuf<char_type, traits_type>* rdbuf(basic_streambuf<char_type, traits_type>* __sb);
 
     basic_ios& copyfmt(const basic_ios& __rhs);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char_type fill() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char_type fill(char_type __ch);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     locale imbue(const locale& __loc);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char narrow(char_type __c, char __dfault) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char_type widen(char __c) const;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ios() {// purposefully does no initialization
                 }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void init(basic_streambuf<char_type, traits_type>* __sb);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void move(basic_ios& __rhs);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void move(basic_ios&& __rhs) {move(__rhs);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(basic_ios& __rhs) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void set_rdbuf(basic_streambuf<char_type, traits_type>* __sb);
 private:
     basic_ostream<char_type, traits_type>* __tie_;
@@ -690,7 +690,7 @@ private:
 };
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_ios<_CharT, _Traits>::basic_ios(basic_streambuf<char_type,traits_type>* __sb)
 {
     init(__sb);
@@ -702,7 +702,7 @@ basic_ios<_CharT, _Traits>::~basic_ios()
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 basic_ios<_CharT, _Traits>::init(basic_streambuf<char_type, traits_type>* __sb)
 {
@@ -712,7 +712,7 @@ basic_ios<_CharT, _Traits>::init(basic_streambuf<char_type, traits_type>* __sb)
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_ostream<_CharT, _Traits>*
 basic_ios<_CharT, _Traits>::tie() const
 {
@@ -720,7 +720,7 @@ basic_ios<_CharT, _Traits>::tie() const
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_ostream<_CharT, _Traits>*
 basic_ios<_CharT, _Traits>::tie(basic_ostream<char_type, traits_type>* __tiestr)
 {
@@ -730,7 +730,7 @@ basic_ios<_CharT, _Traits>::tie(basic_ostream<char_type, traits_type>* __tiestr)
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_streambuf<_CharT, _Traits>*
 basic_ios<_CharT, _Traits>::rdbuf() const
 {
@@ -738,7 +738,7 @@ basic_ios<_CharT, _Traits>::rdbuf() const
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_streambuf<_CharT, _Traits>*
 basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<char_type, traits_type>* __sb)
 {
@@ -748,7 +748,7 @@ basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<char_type, traits_type>* __sb)
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 locale
 basic_ios<_CharT, _Traits>::imbue(const locale& __loc)
 {
@@ -760,7 +760,7 @@ basic_ios<_CharT, _Traits>::imbue(const locale& __loc)
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 char
 basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const
 {
@@ -768,7 +768,7 @@ basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _CharT
 basic_ios<_CharT, _Traits>::widen(char __c) const
 {
@@ -776,7 +776,7 @@ basic_ios<_CharT, _Traits>::widen(char __c) const
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _CharT
 basic_ios<_CharT, _Traits>::fill() const
 {
@@ -786,7 +786,7 @@ basic_ios<_CharT, _Traits>::fill() const
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _CharT
 basic_ios<_CharT, _Traits>::fill(char_type __ch)
 {
@@ -814,7 +814,7 @@ basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs)
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 basic_ios<_CharT, _Traits>::move(basic_ios& __rhs)
 {
@@ -825,17 +825,17 @@ basic_ios<_CharT, _Traits>::move(basic_ios& __rhs)
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 basic_ios<_CharT, _Traits>::swap(basic_ios& __rhs) _NOEXCEPT
 {
     ios_base::swap(__rhs);
-    _VSTD::swap(__tie_, __rhs.__tie_);
-    _VSTD::swap(__fill_, __rhs.__fill_);
+    _CUDA_VSTD::swap(__tie_, __rhs.__tie_);
+    _CUDA_VSTD::swap(__fill_, __rhs.__fill_);
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 basic_ios<_CharT, _Traits>::set_rdbuf(basic_streambuf<char_type, traits_type>* __sb)
 {
@@ -1034,6 +1034,6 @@ defaultfloat(ios_base& __str)
     return __str;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_IOS
+#endif // _LIBCUDACXX_IOS

diff  --git a/libcxx/include/iosfwd b/libcxx/include/iosfwd
index 9cd9450e62e9..2afc19a97a63 100644
--- a/libcxx/include/iosfwd
+++ b/libcxx/include/iosfwd
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_IOSFWD
-#define _LIBCPP_IOSFWD
+#ifndef _LIBCUDACXX_IOSFWD
+#define _LIBCUDACXX_IOSFWD
 
 /*
     iosfwd synopsis
@@ -99,68 +99,68 @@ using u32streampos = fpos<char_traits<char32_t>::state_type>;
 #include <__mbstate_t.h>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS ios_base;
+class _LIBCUDACXX_TYPE_VIS ios_base;
 
-template<class _CharT>  struct _LIBCPP_TEMPLATE_VIS char_traits;
+template<class _CharT>  struct _LIBCUDACXX_TEMPLATE_VIS char_traits;
 template<> struct char_traits<char>;
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 template<> struct char_traits<char8_t>;
 #endif
 template<> struct char_traits<char16_t>;
 template<> struct char_traits<char32_t>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template<> struct char_traits<wchar_t>;
 #endif
 
-template<class _Tp>     class _LIBCPP_TEMPLATE_VIS allocator;
+template<class _Tp>     class _LIBCUDACXX_TEMPLATE_VIS allocator;
 
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_ios;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_ios;
 
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_streambuf;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_streambuf;
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_istream;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_istream;
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_ostream;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_ostream;
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_iostream;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_iostream;
 
 template <class _CharT, class _Traits = char_traits<_CharT>,
           class _Allocator = allocator<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_stringbuf;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_stringbuf;
 template <class _CharT, class _Traits = char_traits<_CharT>,
           class _Allocator = allocator<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_istringstream;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_istringstream;
 template <class _CharT, class _Traits = char_traits<_CharT>,
           class _Allocator = allocator<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_ostringstream;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_ostringstream;
 template <class _CharT, class _Traits = char_traits<_CharT>,
           class _Allocator = allocator<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_stringstream;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_stringstream;
 
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_filebuf;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_filebuf;
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_ifstream;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_ifstream;
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_ofstream;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_ofstream;
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_fstream;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_fstream;
 
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS istreambuf_iterator;
+    class _LIBCUDACXX_TEMPLATE_VIS istreambuf_iterator;
 template <class _CharT, class _Traits = char_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS ostreambuf_iterator;
+    class _LIBCUDACXX_TEMPLATE_VIS ostreambuf_iterator;
 
 typedef basic_ios<char>              ios;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef basic_ios<wchar_t>           wios;
 #endif
 
@@ -179,7 +179,7 @@ typedef basic_ifstream<char>         ifstream;
 typedef basic_ofstream<char>         ofstream;
 typedef basic_fstream<char>          fstream;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef basic_streambuf<wchar_t>     wstreambuf;
 typedef basic_istream<wchar_t>       wistream;
 typedef basic_ostream<wchar_t>       wostream;
@@ -197,39 +197,39 @@ typedef basic_fstream<wchar_t>       wfstream;
 #endif
 
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(ios) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wios)) basic_ios;
+    class _LIBCUDACXX_PREFERRED_NAME(ios) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wios)) basic_ios;
 
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(streambuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstreambuf)) basic_streambuf;
+    class _LIBCUDACXX_PREFERRED_NAME(streambuf) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wstreambuf)) basic_streambuf;
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(istream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wistream)) basic_istream;
+    class _LIBCUDACXX_PREFERRED_NAME(istream) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wistream)) basic_istream;
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(ostream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wostream)) basic_ostream;
+    class _LIBCUDACXX_PREFERRED_NAME(ostream) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wostream)) basic_ostream;
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(iostream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wiostream)) basic_iostream;
+    class _LIBCUDACXX_PREFERRED_NAME(iostream) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wiostream)) basic_iostream;
 
 template <class _CharT, class _Traits, class _Allocator>
-    class _LIBCPP_PREFERRED_NAME(stringbuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringbuf)) basic_stringbuf;
+    class _LIBCUDACXX_PREFERRED_NAME(stringbuf) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wstringbuf)) basic_stringbuf;
 template <class _CharT, class _Traits, class _Allocator>
-    class _LIBCPP_PREFERRED_NAME(istringstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wistringstream)) basic_istringstream;
+    class _LIBCUDACXX_PREFERRED_NAME(istringstream) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wistringstream)) basic_istringstream;
 template <class _CharT, class _Traits, class _Allocator>
-    class _LIBCPP_PREFERRED_NAME(ostringstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wostringstream)) basic_ostringstream;
+    class _LIBCUDACXX_PREFERRED_NAME(ostringstream) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wostringstream)) basic_ostringstream;
 template <class _CharT, class _Traits, class _Allocator>
-    class _LIBCPP_PREFERRED_NAME(stringstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstringstream)) basic_stringstream;
+    class _LIBCUDACXX_PREFERRED_NAME(stringstream) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wstringstream)) basic_stringstream;
 
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(filebuf) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfilebuf)) basic_filebuf;
+    class _LIBCUDACXX_PREFERRED_NAME(filebuf) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wfilebuf)) basic_filebuf;
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(ifstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wifstream)) basic_ifstream;
+    class _LIBCUDACXX_PREFERRED_NAME(ifstream) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wifstream)) basic_ifstream;
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(ofstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wofstream)) basic_ofstream;
+    class _LIBCUDACXX_PREFERRED_NAME(ofstream) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wofstream)) basic_ofstream;
 template <class _CharT, class _Traits>
-    class _LIBCPP_PREFERRED_NAME(fstream) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wfstream)) basic_fstream;
+    class _LIBCUDACXX_PREFERRED_NAME(fstream) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wfstream)) basic_fstream;
 
-template <class _State>             class _LIBCPP_TEMPLATE_VIS fpos;
+template <class _State>             class _LIBCUDACXX_TEMPLATE_VIS fpos;
 typedef fpos<mbstate_t>    streampos;
 typedef fpos<mbstate_t>    wstreampos;
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 typedef fpos<mbstate_t>    u8streampos;
 #endif
 typedef fpos<mbstate_t>    u16streampos;
@@ -245,18 +245,18 @@ typedef long long streamoff;        // for char_traits in <string>
 template <class _CharT,             // for <stdexcept>
           class _Traits = char_traits<_CharT>,
           class _Allocator = allocator<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_string;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_string;
 typedef basic_string<char, char_traits<char>, allocator<char> > string;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef basic_string<wchar_t, char_traits<wchar_t>, allocator<wchar_t> > wstring;
 #endif
 
 template <class _CharT, class _Traits, class _Allocator>
-    class _LIBCPP_PREFERRED_NAME(string) _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstring)) basic_string;
+    class _LIBCUDACXX_PREFERRED_NAME(string) _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wstring)) basic_string;
 
 // Include other forward declarations here
 template <class _Tp, class _Alloc = allocator<_Tp> >
-class _LIBCPP_TEMPLATE_VIS vector;
+class _LIBCUDACXX_TEMPLATE_VIS vector;
 
 template <class _CharT, class _Traits>
 class __save_flags
@@ -271,13 +271,13 @@ class __save_flags
     __save_flags(const __save_flags&);
     __save_flags& operator=(const __save_flags&);
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __save_flags(__stream_type& __stream)
         : __stream_(__stream),
           __fmtflags_(__stream.flags()),
           __fill_(__stream.fill())
         {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~__save_flags()
     {
         __stream_.flags(__fmtflags_);
@@ -285,6 +285,6 @@ public:
     }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_IOSFWD
+#endif // _LIBCUDACXX_IOSFWD

diff  --git a/libcxx/include/iostream b/libcxx/include/iostream
index 13d4ac3cadae..598c4e4667ea 100644
--- a/libcxx/include/iostream
+++ b/libcxx/include/iostream
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_IOSTREAM
-#define _LIBCPP_IOSTREAM
+#ifndef _LIBCUDACXX_IOSTREAM
+#define _LIBCUDACXX_IOSTREAM
 
 /*
     iostream synopsis
@@ -43,24 +43,24 @@ extern wostream wclog;
 #include <ostream>
 #include <streambuf>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-extern _LIBCPP_FUNC_VIS istream cin;
-extern _LIBCPP_FUNC_VIS ostream cout;
-extern _LIBCPP_FUNC_VIS ostream cerr;
-extern _LIBCPP_FUNC_VIS ostream clog;
+extern _LIBCUDACXX_FUNC_VIS istream cin;
+extern _LIBCUDACXX_FUNC_VIS ostream cout;
+extern _LIBCUDACXX_FUNC_VIS ostream cerr;
+extern _LIBCUDACXX_FUNC_VIS ostream clog;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern _LIBCPP_FUNC_VIS wistream wcin;
-extern _LIBCPP_FUNC_VIS wostream wcout;
-extern _LIBCPP_FUNC_VIS wostream wcerr;
-extern _LIBCPP_FUNC_VIS wostream wclog;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern _LIBCUDACXX_FUNC_VIS wistream wcin;
+extern _LIBCUDACXX_FUNC_VIS wostream wcout;
+extern _LIBCUDACXX_FUNC_VIS wostream wcerr;
+extern _LIBCUDACXX_FUNC_VIS wostream wclog;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_IOSTREAM
+#endif // _LIBCUDACXX_IOSTREAM

diff  --git a/libcxx/include/istream b/libcxx/include/istream
index 7af5dfa474cd..5dfa75338491 100644
--- a/libcxx/include/istream
+++ b/libcxx/include/istream
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_ISTREAM
-#define _LIBCPP_ISTREAM
+#ifndef _LIBCUDACXX_ISTREAM
+#define _LIBCUDACXX_ISTREAM
 
 /*
     istream synopsis
@@ -165,18 +165,18 @@ template <class Stream, class T>
 #include <ostream>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_istream
+class _LIBCUDACXX_TEMPLATE_VIS basic_istream
     : virtual public basic_ios<_CharT, _Traits>
 {
     streamsize __gc_;
@@ -189,21 +189,21 @@ public:
     typedef typename traits_type::off_type off_type;
 
     // 27.7.1.1.1 Constructor/destructor:
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     explicit basic_istream(basic_streambuf<char_type, traits_type>* __sb) : __gc_(0)
     { this->init(__sb); }
     virtual ~basic_istream();
 protected:
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     basic_istream(basic_istream&& __rhs);
 
     // 27.7.1.1.2 Assign/swap:
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     basic_istream& operator=(basic_istream&& __rhs);
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     void swap(basic_istream& __rhs) {
-      _VSTD::swap(__gc_, __rhs.__gc_);
+      _CUDA_VSTD::swap(__gc_, __rhs.__gc_);
       basic_ios<char_type, traits_type>::swap(__rhs);
     }
 
@@ -212,19 +212,19 @@ protected:
 public:
 
     // 27.7.1.1.3 Prefix/suffix:
-    class _LIBCPP_TEMPLATE_VIS sentry;
+    class _LIBCUDACXX_TEMPLATE_VIS sentry;
 
     // 27.7.1.2 Formatted input:
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_istream& operator>>(basic_istream& (*__pf)(basic_istream&))
     { return __pf(*this); }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_istream& operator>>(basic_ios<char_type, traits_type>&
                               (*__pf)(basic_ios<char_type, traits_type>&))
     { __pf(*this); return *this; }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_istream& operator>>(ios_base& (*__pf)(ios_base&))
     { __pf(*this); return *this; }
 
@@ -244,11 +244,11 @@ public:
     basic_istream& operator>>(void*& __p);
 
     // 27.7.1.3 Unformatted input:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     streamsize gcount() const {return __gc_;}
     int_type get();
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_istream& get(char_type& __c) {
       int_type __ch = get();
       if (__ch != traits_type::eof())
@@ -256,19 +256,19 @@ public:
       return *this;
     }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_istream& get(char_type* __s, streamsize __n)
     { return get(__s, __n, this->widen('\n')); }
 
     basic_istream& get(char_type* __s, streamsize __n, char_type __dlm);
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_istream& get(basic_streambuf<char_type, traits_type>& __sb)
     { return get(__sb, this->widen('\n')); }
 
     basic_istream& get(basic_streambuf<char_type, traits_type>& __sb, char_type __dlm);
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_istream& getline(char_type* __s, streamsize __n)
     { return getline(__s, __n, this->widen('\n')); }
 
@@ -289,7 +289,7 @@ public:
 };
 
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_istream<_CharT, _Traits>::sentry
+class _LIBCUDACXX_TEMPLATE_VIS basic_istream<_CharT, _Traits>::sentry
 {
     bool __ok_;
 
@@ -297,7 +297,7 @@ public:
     explicit sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
 //    ~sentry() = default;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit operator bool() const {return __ok_;}
 
     sentry(const sentry&) = delete;
@@ -353,21 +353,21 @@ basic_istream<_CharT, _Traits>::~basic_istream()
 }
 
 template <class _Tp, class _CharT, class _Traits>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<_CharT, _Traits>&
 __input_arithmetic(basic_istream<_CharT, _Traits>& __is, _Tp& __n) {
     ios_base::iostate __state = ios_base::goodbit;
     typename basic_istream<_CharT, _Traits>::sentry __s(__is);
     if (__s)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             typedef istreambuf_iterator<_CharT, _Traits> _Ip;
             typedef num_get<_CharT, _Ip> _Fp;
             use_facet<_Fp>(__is.getloc()).get(_Ip(__is), _Ip(), __is, __state, __n);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -388,91 +388,91 @@ template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(unsigned short& __n)
 {
-    return _VSTD::__input_arithmetic<unsigned short>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic<unsigned short>(*this, __n);
 }
 
 template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(unsigned int& __n)
 {
-    return _VSTD::__input_arithmetic<unsigned int>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic<unsigned int>(*this, __n);
 }
 
 template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(long& __n)
 {
-    return _VSTD::__input_arithmetic<long>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic<long>(*this, __n);
 }
 
 template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(unsigned long& __n)
 {
-    return _VSTD::__input_arithmetic<unsigned long>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic<unsigned long>(*this, __n);
 }
 
 template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(long long& __n)
 {
-    return _VSTD::__input_arithmetic<long long>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic<long long>(*this, __n);
 }
 
 template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(unsigned long long& __n)
 {
-    return _VSTD::__input_arithmetic<unsigned long long>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic<unsigned long long>(*this, __n);
 }
 
 template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(float& __n)
 {
-    return _VSTD::__input_arithmetic<float>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic<float>(*this, __n);
 }
 
 template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(double& __n)
 {
-    return _VSTD::__input_arithmetic<double>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic<double>(*this, __n);
 }
 
 template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(long double& __n)
 {
-    return _VSTD::__input_arithmetic<long double>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic<long double>(*this, __n);
 }
 
 template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(bool& __n)
 {
-    return _VSTD::__input_arithmetic<bool>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic<bool>(*this, __n);
 }
 
 template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(void*& __n)
 {
-    return _VSTD::__input_arithmetic<void*>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic<void*>(*this, __n);
 }
 
 template <class _Tp, class _CharT, class _Traits>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<_CharT, _Traits>&
 __input_arithmetic_with_numeric_limits(basic_istream<_CharT, _Traits>& __is, _Tp& __n) {
     ios_base::iostate __state = ios_base::goodbit;
     typename basic_istream<_CharT, _Traits>::sentry __s(__is);
     if (__s)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             typedef istreambuf_iterator<_CharT, _Traits> _Ip;
             typedef num_get<_CharT, _Ip> _Fp;
             long __temp;
@@ -491,7 +491,7 @@ __input_arithmetic_with_numeric_limits(basic_istream<_CharT, _Traits>& __is, _Tp
             {
                 __n = static_cast<_Tp>(__temp);
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -502,7 +502,7 @@ __input_arithmetic_with_numeric_limits(basic_istream<_CharT, _Traits>& __is, _Tp
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __is.setstate(__state);
     }
     return __is;
@@ -512,18 +512,18 @@ template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(short& __n)
 {
-    return _VSTD::__input_arithmetic_with_numeric_limits<short>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic_with_numeric_limits<short>(*this, __n);
 }
 
 template <class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
 basic_istream<_CharT, _Traits>::operator>>(int& __n)
 {
-    return _VSTD::__input_arithmetic_with_numeric_limits<int>(*this, __n);
+    return _CUDA_VSTD::__input_arithmetic_with_numeric_limits<int>(*this, __n);
 }
 
 template<class _CharT, class _Traits>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<_CharT, _Traits>&
 __input_c_string(basic_istream<_CharT, _Traits>& __is, _CharT* __p, size_t __n)
 {
@@ -531,7 +531,7 @@ __input_c_string(basic_istream<_CharT, _Traits>& __is, _CharT* __p, size_t __n)
     typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
 #endif
@@ -555,7 +555,7 @@ __input_c_string(basic_istream<_CharT, _Traits>& __is, _CharT* __p, size_t __n)
             __is.width(0);
             if (__s == __p)
                __state |= ios_base::failbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -572,21 +572,21 @@ __input_c_string(basic_istream<_CharT, _Traits>& __is, _CharT* __p, size_t __n)
     return __is;
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template<class _CharT, class _Traits, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<_CharT, _Traits>&
 operator>>(basic_istream<_CharT, _Traits>& __is, _CharT (&__buf)[_Np])
 {
     size_t __n = _Np;
     if (__is.width() > 0)
-        __n = _VSTD::min(size_t(__is.width()), _Np);
-    return _VSTD::__input_c_string(__is, __buf, __n);
+        __n = _CUDA_VSTD::min(size_t(__is.width()), _Np);
+    return _CUDA_VSTD::__input_c_string(__is, __buf, __n);
 }
 
 template<class _Traits, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<char, _Traits>&
 operator>>(basic_istream<char, _Traits>& __is, unsigned char (&__buf)[_Np])
 {
@@ -594,7 +594,7 @@ operator>>(basic_istream<char, _Traits>& __is, unsigned char (&__buf)[_Np])
 }
 
 template<class _Traits, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<char, _Traits>&
 operator>>(basic_istream<char, _Traits>& __is, signed char (&__buf)[_Np])
 {
@@ -604,18 +604,18 @@ operator>>(basic_istream<char, _Traits>& __is, signed char (&__buf)[_Np])
 #else
 
 template<class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<_CharT, _Traits>&
 operator>>(basic_istream<_CharT, _Traits>& __is, _CharT* __s)
 {
     streamsize __n = __is.width();
     if (__n <= 0)
         __n = numeric_limits<streamsize>::max() / sizeof(_CharT) - 1;
-    return _VSTD::__input_c_string(__is, __s, size_t(__n));
+    return _CUDA_VSTD::__input_c_string(__is, __s, size_t(__n));
 }
 
 template<class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<char, _Traits>&
 operator>>(basic_istream<char, _Traits>& __is, unsigned char* __s)
 {
@@ -623,14 +623,14 @@ operator>>(basic_istream<char, _Traits>& __is, unsigned char* __s)
 }
 
 template<class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<char, _Traits>&
 operator>>(basic_istream<char, _Traits>& __is, signed char* __s)
 {
     return __is >> (char*)__s;
 }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 template<class _CharT, class _Traits>
 basic_istream<_CharT, _Traits>&
@@ -640,7 +640,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
     typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
 #endif
@@ -649,7 +649,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
                 __state |= ios_base::eofbit | ios_base::failbit;
             else
                 __c = _Traits::to_char_type(__i);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -667,7 +667,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, _CharT& __c)
 }
 
 template<class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<char, _Traits>&
 operator>>(basic_istream<char, _Traits>& __is, unsigned char& __c)
 {
@@ -675,7 +675,7 @@ operator>>(basic_istream<char, _Traits>& __is, unsigned char& __c)
 }
 
 template<class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<char, _Traits>&
 operator>>(basic_istream<char, _Traits>& __is, signed char& __c)
 {
@@ -693,10 +693,10 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_typ
     {
         if (__sb)
         {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
             try
             {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
                 while (true)
                 {
                     typename traits_type::int_type __i = this->rdbuf()->sgetc();
@@ -714,7 +714,7 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_typ
                 }
                 if (__gc_ == 0)
                    __state |= ios_base::failbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
             }
             catch (...)
             {
@@ -728,7 +728,7 @@ basic_istream<_CharT, _Traits>::operator>>(basic_streambuf<char_type, traits_typ
                     throw;
                 }
             }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         }
         else
         {
@@ -749,7 +749,7 @@ basic_istream<_CharT, _Traits>::get()
     sentry __s(*this, true);
     if (__s)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
 #endif
@@ -758,7 +758,7 @@ basic_istream<_CharT, _Traits>::get()
                __state |= ios_base::failbit | ios_base::eofbit;
             else
                 __gc_ = 1;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -785,7 +785,7 @@ basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __
     {
         if (__n > 0)
         {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
             try
             {
 #endif
@@ -806,7 +806,7 @@ basic_istream<_CharT, _Traits>::get(char_type* __s, streamsize __n, char_type __
                 }
                 if (__gc_ == 0)
                    __state |= ios_base::failbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
             }
             catch (...)
             {
@@ -845,10 +845,10 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __s
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             while (true)
             {
                 typename traits_type::int_type __i = this->rdbuf()->sgetc();
@@ -865,14 +865,14 @@ basic_istream<_CharT, _Traits>::get(basic_streambuf<char_type, traits_type>& __s
                 ++__gc_;
                 this->rdbuf()->sbumpc();
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __state |= ios_base::badbit;
             // according to the spec, exceptions here are caught but not rethrown
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         if (__gc_ == 0)
            __state |= ios_base::failbit;
         this->setstate(__state);
@@ -889,10 +889,10 @@ basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_typ
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             while (true)
             {
                 typename traits_type::int_type __i = this->rdbuf()->sgetc();
@@ -917,7 +917,7 @@ basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_typ
                 this->rdbuf()->sbumpc();
                 ++__gc_;
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -932,7 +932,7 @@ basic_istream<_CharT, _Traits>::getline(char_type* __s, streamsize __n, char_typ
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
     if (__n > 0)
         *__s = char_type();
@@ -951,10 +951,10 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm)
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             if (__n == numeric_limits<streamsize>::max())
             {
                 while (true)
@@ -985,7 +985,7 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm)
                         break;
                 }
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -996,7 +996,7 @@ basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __dlm)
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         this->setstate(__state);
     }
     return *this;
@@ -1012,14 +1012,14 @@ basic_istream<_CharT, _Traits>::peek()
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             __r = this->rdbuf()->sgetc();
             if (traits_type::eq_int_type(__r, traits_type::eof()))
                 __state |= ios_base::eofbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1030,7 +1030,7 @@ basic_istream<_CharT, _Traits>::peek()
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         this->setstate(__state);
     }
     return __r;
@@ -1045,14 +1045,14 @@ basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n)
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             __gc_ = this->rdbuf()->sgetn(__s, __n);
             if (__gc_ != __n)
                 __state |= ios_base::failbit | ios_base::eofbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1063,7 +1063,7 @@ basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n)
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
     else
     {
@@ -1082,10 +1082,10 @@ basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             streamsize __c = this->rdbuf()->in_avail();
             switch (__c)
             {
@@ -1095,13 +1095,13 @@ basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
             case 0:
                 break;
             default:
-                __n = _VSTD::min(__c, __n);
+                __n = _CUDA_VSTD::min(__c, __n);
                 __gc_ = this->rdbuf()->sgetn(__s, __n);
                 if (__gc_ != __n)
                     __state |= ios_base::failbit | ios_base::eofbit;
                 break;
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1112,7 +1112,7 @@ basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __n)
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
     else
     {
@@ -1132,13 +1132,13 @@ basic_istream<_CharT, _Traits>::putback(char_type __c)
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             if (this->rdbuf() == nullptr || this->rdbuf()->sputbackc(__c) == traits_type::eof())
                 __state |= ios_base::badbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1149,7 +1149,7 @@ basic_istream<_CharT, _Traits>::putback(char_type __c)
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
     else
     {
@@ -1169,13 +1169,13 @@ basic_istream<_CharT, _Traits>::unget()
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             if (this->rdbuf() == nullptr || this->rdbuf()->sungetc() == traits_type::eof())
                 __state |= ios_base::badbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1186,7 +1186,7 @@ basic_istream<_CharT, _Traits>::unget()
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
     else
     {
@@ -1205,10 +1205,10 @@ basic_istream<_CharT, _Traits>::sync()
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             if (this->rdbuf() == nullptr)
                 return -1;
             if (this->rdbuf()->pubsync() == -1)
@@ -1216,7 +1216,7 @@ basic_istream<_CharT, _Traits>::sync()
                 __state |= ios_base::badbit;
                 return -1;
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1227,7 +1227,7 @@ basic_istream<_CharT, _Traits>::sync()
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         this->setstate(__state);
     }
     return __r;
@@ -1242,12 +1242,12 @@ basic_istream<_CharT, _Traits>::tellg()
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __r = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1258,7 +1258,7 @@ basic_istream<_CharT, _Traits>::tellg()
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         this->setstate(__state);
     }
     return __r;
@@ -1273,13 +1273,13 @@ basic_istream<_CharT, _Traits>::seekg(pos_type __pos)
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             if (this->rdbuf()->pubseekpos(__pos, ios_base::in) == pos_type(-1))
                 __state |= ios_base::failbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1290,7 +1290,7 @@ basic_istream<_CharT, _Traits>::seekg(pos_type __pos)
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         this->setstate(__state);
     }
     return *this;
@@ -1305,13 +1305,13 @@ basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir)
     sentry __sen(*this, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             if (this->rdbuf()->pubseekoff(__off, __dir, ios_base::in) == pos_type(-1))
                 __state |= ios_base::failbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1322,7 +1322,7 @@ basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir)
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         this->setstate(__state);
     }
     return *this;
@@ -1336,10 +1336,10 @@ ws(basic_istream<_CharT, _Traits>& __is)
     typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             const ctype<_CharT>& __ct = use_facet<ctype<_CharT> >(__is.getloc());
             while (true)
             {
@@ -1353,7 +1353,7 @@ ws(basic_istream<_CharT, _Traits>& __is)
                     break;
                 __is.rdbuf()->sbumpc();
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1364,7 +1364,7 @@ ws(basic_istream<_CharT, _Traits>& __is)
                 throw;
             }
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __is.setstate(__state);
     }
     return __is;
@@ -1382,15 +1382,15 @@ template <class _Stream, class _Tp, class = typename enable_if<
     _And<is_base_of<ios_base, _Stream>,
          __is_istreamable<_Stream&, _Tp&&> >::value
 >::type>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Stream&& operator>>(_Stream&& __is, _Tp&& __x)
 {
-    __is >> _VSTD::forward<_Tp>(__x);
-    return _VSTD::move(__is);
+    __is >> _CUDA_VSTD::forward<_Tp>(__x);
+    return _CUDA_VSTD::move(__is);
 }
 
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_iostream
+class _LIBCUDACXX_TEMPLATE_VIS basic_iostream
     : public basic_istream<_CharT, _Traits>,
       public basic_ostream<_CharT, _Traits>
 {
@@ -1403,28 +1403,28 @@ public:
     typedef typename traits_type::off_type off_type;
 
     // constructor/destructor
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     explicit basic_iostream(basic_streambuf<char_type, traits_type>* __sb)
       : basic_istream<_CharT, _Traits>(__sb)
     {}
 
     virtual ~basic_iostream();
 protected:
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     basic_iostream(basic_iostream&& __rhs);
 
     // assign/swap
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     basic_iostream& operator=(basic_iostream&& __rhs);
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     void swap(basic_iostream& __rhs)
     { basic_istream<char_type, traits_type>::swap(__rhs); }
 };
 
 template <class _CharT, class _Traits>
 basic_iostream<_CharT, _Traits>::basic_iostream(basic_iostream&& __rhs)
-    : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs))
+    : basic_istream<_CharT, _Traits>(_CUDA_VSTD::move(__rhs))
 {
 }
 
@@ -1450,7 +1450,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
     typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
 #endif
@@ -1480,7 +1480,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is,
             __is.width(0);
             if (__c == 0)
                __state |= ios_base::failbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1506,7 +1506,7 @@ getline(basic_istream<_CharT, _Traits>& __is,
     typename basic_istream<_CharT, _Traits>::sentry __sen(__is, true);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
 #endif
@@ -1533,7 +1533,7 @@ getline(basic_istream<_CharT, _Traits>& __is,
             }
             if (__extr == 0)
                __state |= ios_base::failbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1551,7 +1551,7 @@ getline(basic_istream<_CharT, _Traits>& __is,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<_CharT, _Traits>&
 getline(basic_istream<_CharT, _Traits>& __is,
         basic_string<_CharT, _Traits, _Allocator>& __str)
@@ -1560,7 +1560,7 @@ getline(basic_istream<_CharT, _Traits>& __is,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<_CharT, _Traits>&
 getline(basic_istream<_CharT, _Traits>&& __is,
         basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm)
@@ -1569,7 +1569,7 @@ getline(basic_istream<_CharT, _Traits>&& __is,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_istream<_CharT, _Traits>&
 getline(basic_istream<_CharT, _Traits>&& __is,
         basic_string<_CharT, _Traits, _Allocator>& __str)
@@ -1585,7 +1585,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
     typename basic_istream<_CharT, _Traits>::sentry __sen(__is);
     if (__sen)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
 #endif
@@ -1612,7 +1612,7 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
             __x = bitset<_Size>(__str);
             if (_Size > 0 && __c == 0)
                __state |= ios_base::failbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
@@ -1629,14 +1629,14 @@ operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Size>& __x)
     return __is;
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_istream<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_istream<wchar_t>;
 #endif
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_iostream<char>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_iostream<char>;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_ISTREAM
+#endif // _LIBCUDACXX_ISTREAM

diff  --git a/libcxx/include/iterator b/libcxx/include/iterator
index 225ae815363c..9c3ee2b87294 100644
--- a/libcxx/include/iterator
+++ b/libcxx/include/iterator
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_ITERATOR
-#define _LIBCPP_ITERATOR
+#ifndef _LIBCUDACXX_ITERATOR
+#define _LIBCUDACXX_ITERATOR
 
 /*
     iterator synopsis
@@ -724,15 +724,15 @@ template <class E> constexpr const E* data(initializer_list<E> il) noexcept;
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <exception>
 #  include <new>
 #  include <typeinfo>
 #  include <utility>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_ITERATOR
+#endif // _LIBCUDACXX_ITERATOR

diff  --git a/libcxx/include/latch b/libcxx/include/latch
index 85936750b4c1..6c40ba349526 100644
--- a/libcxx/include/latch
+++ b/libcxx/include/latch
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_LATCH
-#define _LIBCPP_LATCH
+#ifndef _LIBCUDACXX_LATCH
+#define _LIBCUDACXX_LATCH
 
 /*
     latch synopsis
@@ -47,20 +47,20 @@ namespace std
 #include <limits>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifdef _LIBCPP_HAS_NO_THREADS
+#ifdef _LIBCUDACXX_HAS_NO_THREADS
 # error "<latch> is not supported since libc++ has been configured without support for threads."
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 class latch
 {
@@ -71,33 +71,33 @@ public:
         return numeric_limits<ptr
diff _t>::max();
     }
 
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit latch(ptr
diff _t __expected) : __a(__expected) { }
 
     ~latch() = default;
     latch(const latch&) = delete;
     latch& operator=(const latch&) = delete;
 
-    inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void count_down(ptr
diff _t __update = 1)
     {
         auto const __old = __a.fetch_sub(__update, memory_order_release);
         if(__old == __update)
             __a.notify_all();
     }
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     bool try_wait() const noexcept
     {
         return 0 == __a.load(memory_order_acquire);
     }
-    inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void wait() const
     {
         __cxx_atomic_wait(&__a.__a_, [&]() -> bool {
             return try_wait();
         });
     }
-    inline _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void arrive_and_wait(ptr
diff _t __update = 1)
     {
         count_down(__update);
@@ -105,10 +105,10 @@ public:
     }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER >= 14
+#endif // _LIBCUDACXX_STD_VER >= 14
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif //_LIBCPP_LATCH
+#endif //_LIBCUDACXX_LATCH

diff  --git a/libcxx/include/limits b/libcxx/include/limits
index 1fa3a8228fd8..03a27aa980fc 100644
--- a/libcxx/include/limits
+++ b/libcxx/include/limits
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_LIMITS
-#define _LIBCPP_LIMITS
+#ifndef _LIBCUDACXX_LIMITS
+#define _LIBCUDACXX_LIMITS
 
 /*
     limits synopsis
@@ -106,20 +106,20 @@ template<> class numeric_limits<cv long double>;
 #include <__config>
 #include <type_traits>
 
-#if defined(_LIBCPP_COMPILER_MSVC)
+#if defined(_LIBCUDACXX_COMPILER_MSVC)
 #include "__support/win32/limits_msvc_win32.h"
-#endif // _LIBCPP_MSVCRT
+#endif // _LIBCUDACXX_MSVCRT
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 #include <version>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 enum float_round_style
 {
@@ -138,691 +138,691 @@ enum float_denorm_style
 };
 
 template <class _Tp, bool = is_arithmetic<_Tp>::value>
-class __libcpp_numeric_limits
+class __LIBCUDACXX_numeric_limits
 {
 protected:
     typedef _Tp type;
 
-    static _LIBCPP_CONSTEXPR const  bool is_specialized = false;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return type();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return type();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return type();}
-
-    static _LIBCPP_CONSTEXPR const int  digits = 0;
-    static _LIBCPP_CONSTEXPR const int  digits10 = 0;
-    static _LIBCPP_CONSTEXPR const int  max_digits10 = 0;
-    static _LIBCPP_CONSTEXPR const bool is_signed = false;
-    static _LIBCPP_CONSTEXPR const bool is_integer = false;
-    static _LIBCPP_CONSTEXPR const bool is_exact = false;
-    static _LIBCPP_CONSTEXPR const int  radix = 0;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type();}
-
-    static _LIBCPP_CONSTEXPR const int  min_exponent = 0;
-    static _LIBCPP_CONSTEXPR const int  min_exponent10 = 0;
-    static _LIBCPP_CONSTEXPR const int  max_exponent = 0;
-    static _LIBCPP_CONSTEXPR const int  max_exponent10 = 0;
-
-    static _LIBCPP_CONSTEXPR const bool has_infinity = false;
-    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
-    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type();}
-
-    static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
-    static _LIBCPP_CONSTEXPR const bool is_bounded = false;
-    static _LIBCPP_CONSTEXPR const bool is_modulo = false;
-
-    static _LIBCPP_CONSTEXPR const bool traps = false;
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
-    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
+    static _LIBCUDACXX_CONSTEXPR const  bool is_specialized = false;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type min() _NOEXCEPT {return type();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type max() _NOEXCEPT {return type();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type lowest() _NOEXCEPT {return type();}
+
+    static _LIBCUDACXX_CONSTEXPR const int  digits = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  digits10 = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  max_digits10 = 0;
+    static _LIBCUDACXX_CONSTEXPR const bool is_signed = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_integer = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_exact = false;
+    static _LIBCUDACXX_CONSTEXPR const int  radix = 0;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type epsilon() _NOEXCEPT {return type();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type round_error() _NOEXCEPT {return type();}
+
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent10 = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent10 = 0;
+
+    static _LIBCUDACXX_CONSTEXPR const bool has_infinity = false;
+    static _LIBCUDACXX_CONSTEXPR const bool has_quiet_NaN = false;
+    static _LIBCUDACXX_CONSTEXPR const bool has_signaling_NaN = false;
+    static _LIBCUDACXX_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
+    static _LIBCUDACXX_CONSTEXPR const bool has_denorm_loss = false;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type infinity() _NOEXCEPT {return type();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type denorm_min() _NOEXCEPT {return type();}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_iec559 = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_bounded = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_modulo = false;
+
+    static _LIBCUDACXX_CONSTEXPR const bool traps = false;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = false;
+    static _LIBCUDACXX_CONSTEXPR const float_round_style round_style = round_toward_zero;
 };
 
 template <class _Tp, int __digits, bool _IsSigned>
-struct __libcpp_compute_min
+struct __LIBCUDACXX_compute_min
 {
-    static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << __digits);
+    static _LIBCUDACXX_CONSTEXPR const _Tp value = _Tp(_Tp(1) << __digits);
 };
 
 template <class _Tp, int __digits>
-struct __libcpp_compute_min<_Tp, __digits, false>
+struct __LIBCUDACXX_compute_min<_Tp, __digits, false>
 {
-    static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0);
+    static _LIBCUDACXX_CONSTEXPR const _Tp value = _Tp(0);
 };
 
 template <class _Tp>
-class __libcpp_numeric_limits<_Tp, true>
+class __LIBCUDACXX_numeric_limits<_Tp, true>
 {
 protected:
     typedef _Tp type;
 
-    static _LIBCPP_CONSTEXPR const bool is_specialized = true;
-
-    static _LIBCPP_CONSTEXPR const bool is_signed = type(-1) < type(0);
-    static _LIBCPP_CONSTEXPR const int  digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed);
-    static _LIBCPP_CONSTEXPR const int  digits10 = digits * 3 / 10;
-    static _LIBCPP_CONSTEXPR const int  max_digits10 = 0;
-    static _LIBCPP_CONSTEXPR const type __min = __libcpp_compute_min<type, digits, is_signed>::value;
-    static _LIBCPP_CONSTEXPR const type __max = is_signed ? type(type(~0) ^ __min) : type(~0);
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();}
-
-    static _LIBCPP_CONSTEXPR const bool is_integer = true;
-    static _LIBCPP_CONSTEXPR const bool is_exact = true;
-    static _LIBCPP_CONSTEXPR const int  radix = 2;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}
-
-    static _LIBCPP_CONSTEXPR const int  min_exponent = 0;
-    static _LIBCPP_CONSTEXPR const int  min_exponent10 = 0;
-    static _LIBCPP_CONSTEXPR const int  max_exponent = 0;
-    static _LIBCPP_CONSTEXPR const int  max_exponent10 = 0;
-
-    static _LIBCPP_CONSTEXPR const bool has_infinity = false;
-    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
-    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}
-
-    static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
-    static _LIBCPP_CONSTEXPR const bool is_bounded = true;
-    static _LIBCPP_CONSTEXPR const bool is_modulo = !_VSTD::is_signed<_Tp>::value;
+    static _LIBCUDACXX_CONSTEXPR const bool is_specialized = true;
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_signed = type(-1) < type(0);
+    static _LIBCUDACXX_CONSTEXPR const int  digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed);
+    static _LIBCUDACXX_CONSTEXPR const int  digits10 = digits * 3 / 10;
+    static _LIBCUDACXX_CONSTEXPR const int  max_digits10 = 0;
+    static _LIBCUDACXX_CONSTEXPR const type __min = __LIBCUDACXX_compute_min<type, digits, is_signed>::value;
+    static _LIBCUDACXX_CONSTEXPR const type __max = is_signed ? type(type(~0) ^ __min) : type(~0);
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type min() _NOEXCEPT {return __min;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type max() _NOEXCEPT {return __max;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type lowest() _NOEXCEPT {return min();}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_integer = true;
+    static _LIBCUDACXX_CONSTEXPR const bool is_exact = true;
+    static _LIBCUDACXX_CONSTEXPR const int  radix = 2;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}
+
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent10 = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent10 = 0;
+
+    static _LIBCUDACXX_CONSTEXPR const bool has_infinity = false;
+    static _LIBCUDACXX_CONSTEXPR const bool has_quiet_NaN = false;
+    static _LIBCUDACXX_CONSTEXPR const bool has_signaling_NaN = false;
+    static _LIBCUDACXX_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
+    static _LIBCUDACXX_CONSTEXPR const bool has_denorm_loss = false;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_iec559 = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_bounded = true;
+    static _LIBCUDACXX_CONSTEXPR const bool is_modulo = !_CUDA_VSTD::is_signed<_Tp>::value;
 
 #if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \
     defined(__wasm__)
-    static _LIBCPP_CONSTEXPR const bool traps = true;
+    static _LIBCUDACXX_CONSTEXPR const bool traps = true;
 #else
-    static _LIBCPP_CONSTEXPR const bool traps = false;
+    static _LIBCUDACXX_CONSTEXPR const bool traps = false;
 #endif
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
-    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = false;
+    static _LIBCUDACXX_CONSTEXPR const float_round_style round_style = round_toward_zero;
 };
 
 template <>
-class __libcpp_numeric_limits<bool, true>
+class __LIBCUDACXX_numeric_limits<bool, true>
 {
 protected:
     typedef bool type;
 
-    static _LIBCPP_CONSTEXPR const bool is_specialized = true;
-
-    static _LIBCPP_CONSTEXPR const bool is_signed = false;
-    static _LIBCPP_CONSTEXPR const int  digits = 1;
-    static _LIBCPP_CONSTEXPR const int  digits10 = 0;
-    static _LIBCPP_CONSTEXPR const int  max_digits10 = 0;
-    static _LIBCPP_CONSTEXPR const type __min = false;
-    static _LIBCPP_CONSTEXPR const type __max = true;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();}
-
-    static _LIBCPP_CONSTEXPR const bool is_integer = true;
-    static _LIBCPP_CONSTEXPR const bool is_exact = true;
-    static _LIBCPP_CONSTEXPR const int  radix = 2;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}
-
-    static _LIBCPP_CONSTEXPR const int  min_exponent = 0;
-    static _LIBCPP_CONSTEXPR const int  min_exponent10 = 0;
-    static _LIBCPP_CONSTEXPR const int  max_exponent = 0;
-    static _LIBCPP_CONSTEXPR const int  max_exponent10 = 0;
-
-    static _LIBCPP_CONSTEXPR const bool has_infinity = false;
-    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
-    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}
-
-    static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
-    static _LIBCPP_CONSTEXPR const bool is_bounded = true;
-    static _LIBCPP_CONSTEXPR const bool is_modulo = false;
-
-    static _LIBCPP_CONSTEXPR const bool traps = false;
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
-    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
+    static _LIBCUDACXX_CONSTEXPR const bool is_specialized = true;
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_signed = false;
+    static _LIBCUDACXX_CONSTEXPR const int  digits = 1;
+    static _LIBCUDACXX_CONSTEXPR const int  digits10 = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  max_digits10 = 0;
+    static _LIBCUDACXX_CONSTEXPR const type __min = false;
+    static _LIBCUDACXX_CONSTEXPR const type __max = true;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type min() _NOEXCEPT {return __min;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type max() _NOEXCEPT {return __max;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type lowest() _NOEXCEPT {return min();}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_integer = true;
+    static _LIBCUDACXX_CONSTEXPR const bool is_exact = true;
+    static _LIBCUDACXX_CONSTEXPR const int  radix = 2;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type round_error() _NOEXCEPT {return type(0);}
+
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent10 = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent = 0;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent10 = 0;
+
+    static _LIBCUDACXX_CONSTEXPR const bool has_infinity = false;
+    static _LIBCUDACXX_CONSTEXPR const bool has_quiet_NaN = false;
+    static _LIBCUDACXX_CONSTEXPR const bool has_signaling_NaN = false;
+    static _LIBCUDACXX_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
+    static _LIBCUDACXX_CONSTEXPR const bool has_denorm_loss = false;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type infinity() _NOEXCEPT {return type(0);}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_iec559 = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_bounded = true;
+    static _LIBCUDACXX_CONSTEXPR const bool is_modulo = false;
+
+    static _LIBCUDACXX_CONSTEXPR const bool traps = false;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = false;
+    static _LIBCUDACXX_CONSTEXPR const float_round_style round_style = round_toward_zero;
 };
 
 template <>
-class __libcpp_numeric_limits<float, true>
+class __LIBCUDACXX_numeric_limits<float, true>
 {
 protected:
     typedef float type;
 
-    static _LIBCPP_CONSTEXPR const bool is_specialized = true;
-
-    static _LIBCPP_CONSTEXPR const bool is_signed = true;
-    static _LIBCPP_CONSTEXPR const int  digits = __FLT_MANT_DIG__;
-    static _LIBCPP_CONSTEXPR const int  digits10 = __FLT_DIG__;
-    static _LIBCPP_CONSTEXPR const int  max_digits10 = 2+(digits * 30103l)/100000l;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __FLT_MIN__;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __FLT_MAX__;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
-
-    static _LIBCPP_CONSTEXPR const bool is_integer = false;
-    static _LIBCPP_CONSTEXPR const bool is_exact = false;
-    static _LIBCPP_CONSTEXPR const int  radix = __FLT_RADIX__;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __FLT_EPSILON__;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5F;}
-
-    static _LIBCPP_CONSTEXPR const int  min_exponent = __FLT_MIN_EXP__;
-    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __FLT_MIN_10_EXP__;
-    static _LIBCPP_CONSTEXPR const int  max_exponent = __FLT_MAX_EXP__;
-    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __FLT_MAX_10_EXP__;
-
-    static _LIBCPP_CONSTEXPR const bool has_infinity = true;
-    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
-    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_valf();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanf("");}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansf("");}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __FLT_DENORM_MIN__;}
-
-    static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
-    static _LIBCPP_CONSTEXPR const bool is_bounded = true;
-    static _LIBCPP_CONSTEXPR const bool is_modulo = false;
-
-    static _LIBCPP_CONSTEXPR const bool traps = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_specialized = true;
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_signed = true;
+    static _LIBCUDACXX_CONSTEXPR const int  digits = __FLT_MANT_DIG__;
+    static _LIBCUDACXX_CONSTEXPR const int  digits10 = __FLT_DIG__;
+    static _LIBCUDACXX_CONSTEXPR const int  max_digits10 = 2+(digits * 30103l)/100000l;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type min() _NOEXCEPT {return __FLT_MIN__;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type max() _NOEXCEPT {return __FLT_MAX__;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_integer = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_exact = false;
+    static _LIBCUDACXX_CONSTEXPR const int  radix = __FLT_RADIX__;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type epsilon() _NOEXCEPT {return __FLT_EPSILON__;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type round_error() _NOEXCEPT {return 0.5F;}
+
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent = __FLT_MIN_EXP__;
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent10 = __FLT_MIN_10_EXP__;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent = __FLT_MAX_EXP__;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent10 = __FLT_MAX_10_EXP__;
+
+    static _LIBCUDACXX_CONSTEXPR const bool has_infinity = true;
+    static _LIBCUDACXX_CONSTEXPR const bool has_quiet_NaN = true;
+    static _LIBCUDACXX_CONSTEXPR const bool has_signaling_NaN = true;
+    static _LIBCUDACXX_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
+    static _LIBCUDACXX_CONSTEXPR const bool has_denorm_loss = false;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_valf();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanf("");}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansf("");}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type denorm_min() _NOEXCEPT {return __FLT_DENORM_MIN__;}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_iec559 = true;
+    static _LIBCUDACXX_CONSTEXPR const bool is_bounded = true;
+    static _LIBCUDACXX_CONSTEXPR const bool is_modulo = false;
+
+    static _LIBCUDACXX_CONSTEXPR const bool traps = false;
 #if (defined(__arm__) || defined(__aarch64__))
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = true;
 #else
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = false;
 #endif
-    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
+    static _LIBCUDACXX_CONSTEXPR const float_round_style round_style = round_to_nearest;
 };
 
 template <>
-class __libcpp_numeric_limits<double, true>
+class __LIBCUDACXX_numeric_limits<double, true>
 {
 protected:
     typedef double type;
 
-    static _LIBCPP_CONSTEXPR const bool is_specialized = true;
-
-    static _LIBCPP_CONSTEXPR const bool is_signed = true;
-    static _LIBCPP_CONSTEXPR const int  digits = __DBL_MANT_DIG__;
-    static _LIBCPP_CONSTEXPR const int  digits10 = __DBL_DIG__;
-    static _LIBCPP_CONSTEXPR const int  max_digits10 = 2+(digits * 30103l)/100000l;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __DBL_MIN__;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __DBL_MAX__;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
-
-    static _LIBCPP_CONSTEXPR const bool is_integer = false;
-    static _LIBCPP_CONSTEXPR const bool is_exact = false;
-    static _LIBCPP_CONSTEXPR const int  radix = __FLT_RADIX__;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __DBL_EPSILON__;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5;}
-
-    static _LIBCPP_CONSTEXPR const int  min_exponent = __DBL_MIN_EXP__;
-    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __DBL_MIN_10_EXP__;
-    static _LIBCPP_CONSTEXPR const int  max_exponent = __DBL_MAX_EXP__;
-    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __DBL_MAX_10_EXP__;
-
-    static _LIBCPP_CONSTEXPR const bool has_infinity = true;
-    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
-    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_val();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nan("");}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nans("");}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __DBL_DENORM_MIN__;}
-
-    static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
-    static _LIBCPP_CONSTEXPR const bool is_bounded = true;
-    static _LIBCPP_CONSTEXPR const bool is_modulo = false;
-
-    static _LIBCPP_CONSTEXPR const bool traps = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_specialized = true;
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_signed = true;
+    static _LIBCUDACXX_CONSTEXPR const int  digits = __DBL_MANT_DIG__;
+    static _LIBCUDACXX_CONSTEXPR const int  digits10 = __DBL_DIG__;
+    static _LIBCUDACXX_CONSTEXPR const int  max_digits10 = 2+(digits * 30103l)/100000l;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type min() _NOEXCEPT {return __DBL_MIN__;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type max() _NOEXCEPT {return __DBL_MAX__;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_integer = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_exact = false;
+    static _LIBCUDACXX_CONSTEXPR const int  radix = __FLT_RADIX__;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type epsilon() _NOEXCEPT {return __DBL_EPSILON__;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type round_error() _NOEXCEPT {return 0.5;}
+
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent = __DBL_MIN_EXP__;
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent10 = __DBL_MIN_10_EXP__;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent = __DBL_MAX_EXP__;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent10 = __DBL_MAX_10_EXP__;
+
+    static _LIBCUDACXX_CONSTEXPR const bool has_infinity = true;
+    static _LIBCUDACXX_CONSTEXPR const bool has_quiet_NaN = true;
+    static _LIBCUDACXX_CONSTEXPR const bool has_signaling_NaN = true;
+    static _LIBCUDACXX_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
+    static _LIBCUDACXX_CONSTEXPR const bool has_denorm_loss = false;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_val();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nan("");}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nans("");}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type denorm_min() _NOEXCEPT {return __DBL_DENORM_MIN__;}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_iec559 = true;
+    static _LIBCUDACXX_CONSTEXPR const bool is_bounded = true;
+    static _LIBCUDACXX_CONSTEXPR const bool is_modulo = false;
+
+    static _LIBCUDACXX_CONSTEXPR const bool traps = false;
 #if (defined(__arm__) || defined(__aarch64__))
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = true;
 #else
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = false;
 #endif
-    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
+    static _LIBCUDACXX_CONSTEXPR const float_round_style round_style = round_to_nearest;
 };
 
 template <>
-class __libcpp_numeric_limits<long double, true>
+class __LIBCUDACXX_numeric_limits<long double, true>
 {
 protected:
     typedef long double type;
 
-    static _LIBCPP_CONSTEXPR const bool is_specialized = true;
-
-    static _LIBCPP_CONSTEXPR const bool is_signed = true;
-    static _LIBCPP_CONSTEXPR const int  digits = __LDBL_MANT_DIG__;
-    static _LIBCPP_CONSTEXPR const int  digits10 = __LDBL_DIG__;
-    static _LIBCPP_CONSTEXPR const int  max_digits10 = 2+(digits * 30103l)/100000l;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __LDBL_MIN__;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __LDBL_MAX__;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
-
-    static _LIBCPP_CONSTEXPR const bool is_integer = false;
-    static _LIBCPP_CONSTEXPR const bool is_exact = false;
-    static _LIBCPP_CONSTEXPR const int  radix = __FLT_RADIX__;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __LDBL_EPSILON__;}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5L;}
-
-    static _LIBCPP_CONSTEXPR const int  min_exponent = __LDBL_MIN_EXP__;
-    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __LDBL_MIN_10_EXP__;
-    static _LIBCPP_CONSTEXPR const int  max_exponent = __LDBL_MAX_EXP__;
-    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __LDBL_MAX_10_EXP__;
-
-    static _LIBCPP_CONSTEXPR const bool has_infinity = true;
-    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
-    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_vall();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanl("");}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
+    static _LIBCUDACXX_CONSTEXPR const bool is_specialized = true;
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_signed = true;
+    static _LIBCUDACXX_CONSTEXPR const int  digits = __LDBL_MANT_DIG__;
+    static _LIBCUDACXX_CONSTEXPR const int  digits10 = __LDBL_DIG__;
+    static _LIBCUDACXX_CONSTEXPR const int  max_digits10 = 2+(digits * 30103l)/100000l;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type min() _NOEXCEPT {return __LDBL_MIN__;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type max() _NOEXCEPT {return __LDBL_MAX__;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type lowest() _NOEXCEPT {return -max();}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_integer = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_exact = false;
+    static _LIBCUDACXX_CONSTEXPR const int  radix = __FLT_RADIX__;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type epsilon() _NOEXCEPT {return __LDBL_EPSILON__;}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type round_error() _NOEXCEPT {return 0.5L;}
+
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent = __LDBL_MIN_EXP__;
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent10 = __LDBL_MIN_10_EXP__;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent = __LDBL_MAX_EXP__;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent10 = __LDBL_MAX_10_EXP__;
+
+    static _LIBCUDACXX_CONSTEXPR const bool has_infinity = true;
+    static _LIBCUDACXX_CONSTEXPR const bool has_quiet_NaN = true;
+    static _LIBCUDACXX_CONSTEXPR const bool has_signaling_NaN = true;
+    static _LIBCUDACXX_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
+    static _LIBCUDACXX_CONSTEXPR const bool has_denorm_loss = false;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_vall();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanl("");}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;}
 
 #if (defined(__ppc__) || defined(__ppc64__))
-    static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_iec559 = false;
 #else
-    static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
+    static _LIBCUDACXX_CONSTEXPR const bool is_iec559 = true;
 #endif
-    static _LIBCPP_CONSTEXPR const bool is_bounded = true;
-    static _LIBCPP_CONSTEXPR const bool is_modulo = false;
+    static _LIBCUDACXX_CONSTEXPR const bool is_bounded = true;
+    static _LIBCUDACXX_CONSTEXPR const bool is_modulo = false;
 
-    static _LIBCPP_CONSTEXPR const bool traps = false;
+    static _LIBCUDACXX_CONSTEXPR const bool traps = false;
 #if (defined(__arm__) || defined(__aarch64__))
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = true;
 #else
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = false;
 #endif
-    static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
+    static _LIBCUDACXX_CONSTEXPR const float_round_style round_style = round_to_nearest;
 };
 
 template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS numeric_limits
-    : private __libcpp_numeric_limits<typename remove_cv<_Tp>::type>
+class _LIBCUDACXX_TEMPLATE_VIS numeric_limits
+    : private __LIBCUDACXX_numeric_limits<typename remove_cv<_Tp>::type>
 {
-    typedef __libcpp_numeric_limits<typename remove_cv<_Tp>::type> __base;
+    typedef __LIBCUDACXX_numeric_limits<typename remove_cv<_Tp>::type> __base;
     typedef typename __base::type type;
 public:
-    static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
-
-    static _LIBCPP_CONSTEXPR const int  digits = __base::digits;
-    static _LIBCPP_CONSTEXPR const int  digits10 = __base::digits10;
-    static _LIBCPP_CONSTEXPR const int  max_digits10 = __base::max_digits10;
-    static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
-    static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
-    static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
-    static _LIBCPP_CONSTEXPR const int  radix = __base::radix;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
-
-    static _LIBCPP_CONSTEXPR const int  min_exponent = __base::min_exponent;
-    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
-    static _LIBCPP_CONSTEXPR const int  max_exponent = __base::max_exponent;
-    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;
-
-    static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
-    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
-    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
-
-    static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
-    static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
-    static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
-
-    static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
-    static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
+    static _LIBCUDACXX_CONSTEXPR const bool is_specialized = __base::is_specialized;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
+
+    static _LIBCUDACXX_CONSTEXPR const int  digits = __base::digits;
+    static _LIBCUDACXX_CONSTEXPR const int  digits10 = __base::digits10;
+    static _LIBCUDACXX_CONSTEXPR const int  max_digits10 = __base::max_digits10;
+    static _LIBCUDACXX_CONSTEXPR const bool is_signed = __base::is_signed;
+    static _LIBCUDACXX_CONSTEXPR const bool is_integer = __base::is_integer;
+    static _LIBCUDACXX_CONSTEXPR const bool is_exact = __base::is_exact;
+    static _LIBCUDACXX_CONSTEXPR const int  radix = __base::radix;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
+
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent = __base::min_exponent;
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent = __base::max_exponent;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;
+
+    static _LIBCUDACXX_CONSTEXPR const bool has_infinity = __base::has_infinity;
+    static _LIBCUDACXX_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
+    static _LIBCUDACXX_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
+    static _LIBCUDACXX_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
+    static _LIBCUDACXX_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_iec559 = __base::is_iec559;
+    static _LIBCUDACXX_CONSTEXPR const bool is_bounded = __base::is_bounded;
+    static _LIBCUDACXX_CONSTEXPR const bool is_modulo = __base::is_modulo;
+
+    static _LIBCUDACXX_CONSTEXPR const bool traps = __base::traps;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
+    static _LIBCUDACXX_CONSTEXPR const float_round_style round_style = __base::round_style;
 };
 
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_specialized;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::is_specialized;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<_Tp>::digits;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<_Tp>::digits10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_digits10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<_Tp>::max_digits10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_signed;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::is_signed;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_integer;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::is_integer;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_exact;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::is_exact;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::radix;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<_Tp>::radix;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<_Tp>::min_exponent;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<_Tp>::min_exponent10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<_Tp>::max_exponent;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<_Tp>::max_exponent10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_infinity;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::has_infinity;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_quiet_NaN;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::has_quiet_NaN;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_signaling_NaN;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::has_signaling_NaN;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<_Tp>::has_denorm;
+    _LIBCUDACXX_CONSTEXPR const float_denorm_style numeric_limits<_Tp>::has_denorm;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_denorm_loss;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::has_denorm_loss;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_iec559;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::is_iec559;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_bounded;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::is_bounded;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_modulo;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::is_modulo;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::traps;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::traps;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::tinyness_before;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<_Tp>::tinyness_before;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style;
+    _LIBCUDACXX_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style;
 
 template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS numeric_limits<const _Tp>
+class _LIBCUDACXX_TEMPLATE_VIS numeric_limits<const _Tp>
     : private numeric_limits<_Tp>
 {
     typedef numeric_limits<_Tp> __base;
     typedef _Tp type;
 public:
-    static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
-
-    static _LIBCPP_CONSTEXPR const int  digits = __base::digits;
-    static _LIBCPP_CONSTEXPR const int  digits10 = __base::digits10;
-    static _LIBCPP_CONSTEXPR const int  max_digits10 = __base::max_digits10;
-    static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
-    static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
-    static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
-    static _LIBCPP_CONSTEXPR const int  radix = __base::radix;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
-
-    static _LIBCPP_CONSTEXPR const int  min_exponent = __base::min_exponent;
-    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
-    static _LIBCPP_CONSTEXPR const int  max_exponent = __base::max_exponent;
-    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;
-
-    static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
-    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
-    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
-
-    static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
-    static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
-    static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
-
-    static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
-    static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
+    static _LIBCUDACXX_CONSTEXPR const bool is_specialized = __base::is_specialized;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
+
+    static _LIBCUDACXX_CONSTEXPR const int  digits = __base::digits;
+    static _LIBCUDACXX_CONSTEXPR const int  digits10 = __base::digits10;
+    static _LIBCUDACXX_CONSTEXPR const int  max_digits10 = __base::max_digits10;
+    static _LIBCUDACXX_CONSTEXPR const bool is_signed = __base::is_signed;
+    static _LIBCUDACXX_CONSTEXPR const bool is_integer = __base::is_integer;
+    static _LIBCUDACXX_CONSTEXPR const bool is_exact = __base::is_exact;
+    static _LIBCUDACXX_CONSTEXPR const int  radix = __base::radix;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
+
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent = __base::min_exponent;
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent = __base::max_exponent;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;
+
+    static _LIBCUDACXX_CONSTEXPR const bool has_infinity = __base::has_infinity;
+    static _LIBCUDACXX_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
+    static _LIBCUDACXX_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
+    static _LIBCUDACXX_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
+    static _LIBCUDACXX_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_iec559 = __base::is_iec559;
+    static _LIBCUDACXX_CONSTEXPR const bool is_bounded = __base::is_bounded;
+    static _LIBCUDACXX_CONSTEXPR const bool is_modulo = __base::is_modulo;
+
+    static _LIBCUDACXX_CONSTEXPR const bool traps = __base::traps;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
+    static _LIBCUDACXX_CONSTEXPR const float_round_style round_style = __base::round_style;
 };
 
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_specialized;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::is_specialized;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const _Tp>::digits;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const _Tp>::digits10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_digits10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const _Tp>::max_digits10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_signed;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::is_signed;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_integer;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::is_integer;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_exact;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::is_exact;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::radix;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const _Tp>::radix;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_infinity;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::has_infinity;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_quiet_NaN;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::has_quiet_NaN;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_signaling_NaN;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::has_signaling_NaN;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const _Tp>::has_denorm;
+    _LIBCUDACXX_CONSTEXPR const float_denorm_style numeric_limits<const _Tp>::has_denorm;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_denorm_loss;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::has_denorm_loss;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_iec559;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::is_iec559;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_bounded;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::is_bounded;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_modulo;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::is_modulo;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::traps;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::traps;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::tinyness_before;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const _Tp>::tinyness_before;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const _Tp>::round_style;
+    _LIBCUDACXX_CONSTEXPR const float_round_style numeric_limits<const _Tp>::round_style;
 
 template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS numeric_limits<volatile _Tp>
+class _LIBCUDACXX_TEMPLATE_VIS numeric_limits<volatile _Tp>
     : private numeric_limits<_Tp>
 {
     typedef numeric_limits<_Tp> __base;
     typedef _Tp type;
 public:
-    static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
-
-    static _LIBCPP_CONSTEXPR const int  digits = __base::digits;
-    static _LIBCPP_CONSTEXPR const int  digits10 = __base::digits10;
-    static _LIBCPP_CONSTEXPR const int  max_digits10 = __base::max_digits10;
-    static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
-    static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
-    static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
-    static _LIBCPP_CONSTEXPR const int  radix = __base::radix;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
-
-    static _LIBCPP_CONSTEXPR const int  min_exponent = __base::min_exponent;
-    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
-    static _LIBCPP_CONSTEXPR const int  max_exponent = __base::max_exponent;
-    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;
-
-    static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
-    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
-    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
-
-    static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
-    static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
-    static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
-
-    static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
-    static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
+    static _LIBCUDACXX_CONSTEXPR const bool is_specialized = __base::is_specialized;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
+
+    static _LIBCUDACXX_CONSTEXPR const int  digits = __base::digits;
+    static _LIBCUDACXX_CONSTEXPR const int  digits10 = __base::digits10;
+    static _LIBCUDACXX_CONSTEXPR const int  max_digits10 = __base::max_digits10;
+    static _LIBCUDACXX_CONSTEXPR const bool is_signed = __base::is_signed;
+    static _LIBCUDACXX_CONSTEXPR const bool is_integer = __base::is_integer;
+    static _LIBCUDACXX_CONSTEXPR const bool is_exact = __base::is_exact;
+    static _LIBCUDACXX_CONSTEXPR const int  radix = __base::radix;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
+
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent = __base::min_exponent;
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent = __base::max_exponent;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;
+
+    static _LIBCUDACXX_CONSTEXPR const bool has_infinity = __base::has_infinity;
+    static _LIBCUDACXX_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
+    static _LIBCUDACXX_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
+    static _LIBCUDACXX_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
+    static _LIBCUDACXX_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_iec559 = __base::is_iec559;
+    static _LIBCUDACXX_CONSTEXPR const bool is_bounded = __base::is_bounded;
+    static _LIBCUDACXX_CONSTEXPR const bool is_modulo = __base::is_modulo;
+
+    static _LIBCUDACXX_CONSTEXPR const bool traps = __base::traps;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
+    static _LIBCUDACXX_CONSTEXPR const float_round_style round_style = __base::round_style;
 };
 
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_specialized;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_specialized;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<volatile _Tp>::digits;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<volatile _Tp>::digits10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_digits10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<volatile _Tp>::max_digits10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_signed;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_signed;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_integer;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_integer;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_exact;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_exact;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::radix;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<volatile _Tp>::radix;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_infinity;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_infinity;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_quiet_NaN;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_quiet_NaN;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_signaling_NaN;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_signaling_NaN;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<volatile _Tp>::has_denorm;
+    _LIBCUDACXX_CONSTEXPR const float_denorm_style numeric_limits<volatile _Tp>::has_denorm;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_denorm_loss;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_denorm_loss;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_iec559;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_iec559;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_bounded;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_bounded;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_modulo;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_modulo;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::traps;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::traps;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::tinyness_before;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<volatile _Tp>::tinyness_before;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const float_round_style numeric_limits<volatile _Tp>::round_style;
+    _LIBCUDACXX_CONSTEXPR const float_round_style numeric_limits<volatile _Tp>::round_style;
 
 template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS numeric_limits<const volatile _Tp>
+class _LIBCUDACXX_TEMPLATE_VIS numeric_limits<const volatile _Tp>
     : private numeric_limits<_Tp>
 {
     typedef numeric_limits<_Tp> __base;
     typedef _Tp type;
 public:
-    static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
-
-    static _LIBCPP_CONSTEXPR const int  digits = __base::digits;
-    static _LIBCPP_CONSTEXPR const int  digits10 = __base::digits10;
-    static _LIBCPP_CONSTEXPR const int  max_digits10 = __base::max_digits10;
-    static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
-    static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
-    static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
-    static _LIBCPP_CONSTEXPR const int  radix = __base::radix;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
-
-    static _LIBCPP_CONSTEXPR const int  min_exponent = __base::min_exponent;
-    static _LIBCPP_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
-    static _LIBCPP_CONSTEXPR const int  max_exponent = __base::max_exponent;
-    static _LIBCPP_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;
-
-    static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
-    static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
-    static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
-    static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
-    static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
-    _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
-
-    static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
-    static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
-    static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
-
-    static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
-    static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
-    static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
+    static _LIBCUDACXX_CONSTEXPR const bool is_specialized = __base::is_specialized;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type min() _NOEXCEPT {return __base::min();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type max() _NOEXCEPT {return __base::max();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();}
+
+    static _LIBCUDACXX_CONSTEXPR const int  digits = __base::digits;
+    static _LIBCUDACXX_CONSTEXPR const int  digits10 = __base::digits10;
+    static _LIBCUDACXX_CONSTEXPR const int  max_digits10 = __base::max_digits10;
+    static _LIBCUDACXX_CONSTEXPR const bool is_signed = __base::is_signed;
+    static _LIBCUDACXX_CONSTEXPR const bool is_integer = __base::is_integer;
+    static _LIBCUDACXX_CONSTEXPR const bool is_exact = __base::is_exact;
+    static _LIBCUDACXX_CONSTEXPR const int  radix = __base::radix;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();}
+
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent = __base::min_exponent;
+    static _LIBCUDACXX_CONSTEXPR const int  min_exponent10 = __base::min_exponent10;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent = __base::max_exponent;
+    static _LIBCUDACXX_CONSTEXPR const int  max_exponent10 = __base::max_exponent10;
+
+    static _LIBCUDACXX_CONSTEXPR const bool has_infinity = __base::has_infinity;
+    static _LIBCUDACXX_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
+    static _LIBCUDACXX_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
+    static _LIBCUDACXX_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
+    static _LIBCUDACXX_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();}
+    _LIBCUDACXX_INLINE_VISIBILITY static _LIBCUDACXX_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();}
+
+    static _LIBCUDACXX_CONSTEXPR const bool is_iec559 = __base::is_iec559;
+    static _LIBCUDACXX_CONSTEXPR const bool is_bounded = __base::is_bounded;
+    static _LIBCUDACXX_CONSTEXPR const bool is_modulo = __base::is_modulo;
+
+    static _LIBCUDACXX_CONSTEXPR const bool traps = __base::traps;
+    static _LIBCUDACXX_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
+    static _LIBCUDACXX_CONSTEXPR const float_round_style round_style = __base::round_style;
 };
 
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_specialized;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_specialized;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_digits10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_digits10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_signed;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_signed;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_integer;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_integer;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_exact;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_exact;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::radix;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const volatile _Tp>::radix;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent10;
+    _LIBCUDACXX_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent10;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_infinity;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_infinity;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_quiet_NaN;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_quiet_NaN;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_signaling_NaN;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_signaling_NaN;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const volatile _Tp>::has_denorm;
+    _LIBCUDACXX_CONSTEXPR const float_denorm_style numeric_limits<const volatile _Tp>::has_denorm;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_denorm_loss;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_denorm_loss;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_iec559;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_iec559;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_bounded;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_bounded;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_modulo;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_modulo;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::traps;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::traps;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::tinyness_before;
+    _LIBCUDACXX_CONSTEXPR const bool numeric_limits<const volatile _Tp>::tinyness_before;
 template <class _Tp>
-    _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const volatile _Tp>::round_style;
+    _LIBCUDACXX_CONSTEXPR const float_round_style numeric_limits<const volatile _Tp>::round_style;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_LIMITS
+#endif // _LIBCUDACXX_LIMITS

diff  --git a/libcxx/include/limits.h b/libcxx/include/limits.h
index 3e1e85a8a0b4..d50606c9ab61 100644
--- a/libcxx/include/limits.h
+++ b/libcxx/include/limits.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_LIMITS_H
-#define _LIBCPP_LIMITS_H
+#ifndef _LIBCUDACXX_LIMITS_H
+#define _LIBCUDACXX_LIMITS_H
 
 /*
     limits.h synopsis
@@ -39,7 +39,7 @@
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -61,4 +61,4 @@
 #include_next <limits.h>
 #endif // __GNUC__
 
-#endif // _LIBCPP_LIMITS_H
+#endif // _LIBCUDACXX_LIMITS_H

diff  --git a/libcxx/include/list b/libcxx/include/list
index 5fcbd67c6703..0a31a12c5c3e 100644
--- a/libcxx/include/list
+++ b/libcxx/include/list
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_LIST
-#define _LIBCPP_LIST
+#ifndef _LIBCUDACXX_LIST
+#define _LIBCUDACXX_LIST
 
 /*
     list synopsis
@@ -203,7 +203,7 @@ template <class T, class Allocator, class Predicate>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #  include <functional>
 #  include <iterator>
@@ -222,15 +222,15 @@ template <class T, class Allocator, class Predicate>
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _VoidPtr> struct __list_node;
 template <class _Tp, class _VoidPtr> struct __list_node_base;
@@ -242,7 +242,7 @@ struct __list_node_pointer_traits {
   typedef typename __rebind_pointer<_VoidPtr, __list_node_base<_Tp, _VoidPtr> >::type
         __base_pointer;
 
-#if defined(_LIBCPP_ABI_LIST_REMOVE_NODE_POINTER_UB)
+#if defined(_LIBCUDACXX_ABI_LIST_REMOVE_NODE_POINTER_UB)
   typedef __base_pointer __link_pointer;
 #else
   typedef typename conditional<
@@ -258,12 +258,12 @@ struct __list_node_pointer_traits {
           __node_pointer
   >::type __non_link_pointer;
 
-  static _LIBCPP_INLINE_VISIBILITY
+  static _LIBCUDACXX_INLINE_VISIBILITY
   __link_pointer __unsafe_link_pointer_cast(__link_pointer __p) {
       return __p;
   }
 
-  static _LIBCPP_INLINE_VISIBILITY
+  static _LIBCUDACXX_INLINE_VISIBILITY
   __link_pointer __unsafe_link_pointer_cast(__non_link_pointer __p) {
       return static_cast<__link_pointer>(static_cast<_VoidPtr>(__p));
   }
@@ -281,23 +281,23 @@ struct __list_node_base
     __link_pointer __prev_;
     __link_pointer __next_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_node_base() : __prev_(_NodeTraits::__unsafe_link_pointer_cast(__self())),
                          __next_(_NodeTraits::__unsafe_link_pointer_cast(__self())) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __base_pointer __self() {
         return pointer_traits<__base_pointer>::pointer_to(*this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __node_pointer __as_node() {
         return static_cast<__node_pointer>(__self());
     }
 };
 
 template <class _Tp, class _VoidPtr>
-struct _LIBCPP_STANDALONE_DEBUG __list_node
+struct _LIBCUDACXX_STANDALONE_DEBUG __list_node
     : public __list_node_base<_Tp, _VoidPtr>
 {
     _Tp __value_;
@@ -305,30 +305,30 @@ struct _LIBCPP_STANDALONE_DEBUG __list_node
     typedef __list_node_base<_Tp, _VoidPtr> __base;
     typedef typename __base::__link_pointer __link_pointer;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __link_pointer __as_link() {
         return static_cast<__link_pointer>(__base::__self());
     }
 };
 
-template <class _Tp, class _Alloc = allocator<_Tp> > class _LIBCPP_TEMPLATE_VIS list;
+template <class _Tp, class _Alloc = allocator<_Tp> > class _LIBCUDACXX_TEMPLATE_VIS list;
 template <class _Tp, class _Alloc> class __list_imp;
-template <class _Tp, class _VoidPtr> class _LIBCPP_TEMPLATE_VIS __list_const_iterator;
+template <class _Tp, class _VoidPtr> class _LIBCUDACXX_TEMPLATE_VIS __list_const_iterator;
 
 template <class _Tp, class _VoidPtr>
-class _LIBCPP_TEMPLATE_VIS __list_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __list_iterator
 {
     typedef __list_node_pointer_traits<_Tp, _VoidPtr> _NodeTraits;
     typedef typename _NodeTraits::__link_pointer __link_pointer;
 
     __link_pointer __ptr_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __list_iterator(__link_pointer __p, const void* __c) _NOEXCEPT
         : __ptr_(__p)
     {
         (void)__c;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
         __get_db()->__insert_ic(this, __c);
 #endif
     }
@@ -343,101 +343,101 @@ public:
     typedef typename __rebind_pointer<_VoidPtr, value_type>::type pointer;
     typedef typename pointer_traits<pointer>::
diff erence_type 
diff erence_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_iterator() _NOEXCEPT : __ptr_(nullptr)
     {
-        _VSTD::__debug_db_insert_i(this);
+        _CUDA_VSTD::__debug_db_insert_i(this);
     }
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_iterator(const __list_iterator& __p)
         : __ptr_(__p.__ptr_)
     {
-        __get_db()->__iterator_copy(this, _VSTD::addressof(__p));
+        __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__p));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~__list_iterator()
     {
         __get_db()->__erase_i(this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_iterator& operator=(const __list_iterator& __p)
     {
-        if (this != _VSTD::addressof(__p))
+        if (this != _CUDA_VSTD::addressof(__p))
         {
-            __get_db()->__iterator_copy(this, _VSTD::addressof(__p));
+            __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__p));
             __ptr_ = __p.__ptr_;
         }
         return *this;
     }
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to dereference a non-dereferenceable list::iterator");
         return __ptr_->__as_node()->__value_;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to dereference a non-dereferenceable list::iterator");
         return pointer_traits<pointer>::pointer_to(__ptr_->__as_node()->__value_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_iterator& operator++()
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to increment a non-incrementable list::iterator");
         __ptr_ = __ptr_->__next_;
         return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_iterator operator++(int) {__list_iterator __t(*this); ++(*this); return __t;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_iterator& operator--()
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__decrementable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__decrementable(this),
                              "Attempted to decrement a non-decrementable list::iterator");
         __ptr_ = __ptr_->__prev_;
         return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_iterator operator--(int) {__list_iterator __t(*this); --(*this); return __t;}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __list_iterator& __x, const __list_iterator& __y)
     {
         return __x.__ptr_ == __y.__ptr_;
     }
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
      bool operator!=(const __list_iterator& __x, const __list_iterator& __y)
         {return !(__x == __y);}
 };
 
 template <class _Tp, class _VoidPtr>
-class _LIBCPP_TEMPLATE_VIS __list_const_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __list_const_iterator
 {
     typedef __list_node_pointer_traits<_Tp, _VoidPtr> _NodeTraits;
     typedef typename _NodeTraits::__link_pointer __link_pointer;
 
     __link_pointer __ptr_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __list_const_iterator(__link_pointer __p, const void* __c) _NOEXCEPT
         : __ptr_(__p)
     {
         (void)__c;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
         __get_db()->__insert_ic(this, __c);
 #endif
     }
@@ -451,90 +451,90 @@ public:
     typedef typename __rebind_pointer<_VoidPtr, const value_type>::type pointer;
     typedef typename pointer_traits<pointer>::
diff erence_type 
diff erence_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_const_iterator() _NOEXCEPT : __ptr_(nullptr)
     {
-        _VSTD::__debug_db_insert_i(this);
+        _CUDA_VSTD::__debug_db_insert_i(this);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_const_iterator(const __list_iterator<_Tp, _VoidPtr>& __p) _NOEXCEPT
         : __ptr_(__p.__ptr_)
     {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-        __get_db()->__iterator_copy(this, _VSTD::addressof(__p));
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+        __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__p));
 #endif
     }
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_const_iterator(const __list_const_iterator& __p)
         : __ptr_(__p.__ptr_)
     {
-        __get_db()->__iterator_copy(this, _VSTD::addressof(__p));
+        __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__p));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~__list_const_iterator()
     {
         __get_db()->__erase_i(this);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_const_iterator& operator=(const __list_const_iterator& __p)
     {
-        if (this != _VSTD::addressof(__p))
+        if (this != _CUDA_VSTD::addressof(__p))
         {
-            __get_db()->__iterator_copy(this, _VSTD::addressof(__p));
+            __get_db()->__iterator_copy(this, _CUDA_VSTD::addressof(__p));
             __ptr_ = __p.__ptr_;
         }
         return *this;
     }
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to dereference a non-dereferenceable list::const_iterator");
         return __ptr_->__as_node()->__value_;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to dereference a non-dereferenceable list::const_iterator");
         return pointer_traits<pointer>::pointer_to(__ptr_->__as_node()->__value_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_const_iterator& operator++()
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(this),
                              "Attempted to increment a non-incrementable list::const_iterator");
         __ptr_ = __ptr_->__next_;
         return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_const_iterator operator++(int) {__list_const_iterator __t(*this); ++(*this); return __t;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_const_iterator& operator--()
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__decrementable(this),
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__decrementable(this),
                              "Attempted to decrement a non-decrementable list::const_iterator");
         __ptr_ = __ptr_->__prev_;
         return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_const_iterator operator--(int) {__list_const_iterator __t(*this); --(*this); return __t;}
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __list_const_iterator& __x, const __list_const_iterator& __y)
     {
         return __x.__ptr_ == __y.__ptr_;
     }
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __list_const_iterator& __x, const __list_const_iterator& __y)
         {return !(__x == __y);}
 };
@@ -575,81 +575,81 @@ protected:
     __node_base __end_;
     __compressed_pair<size_type, __node_allocator> __size_alloc_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __link_pointer __end_as_link() const _NOEXCEPT {
         return __node_pointer_traits::__unsafe_link_pointer_cast(
                 const_cast<__node_base&>(__end_).__self());
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           size_type& __sz() _NOEXCEPT {return __size_alloc_.first();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const size_type& __sz() const _NOEXCEPT
         {return __size_alloc_.first();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           __node_allocator& __node_alloc() _NOEXCEPT
           {return __size_alloc_.second();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const __node_allocator& __node_alloc() const _NOEXCEPT
         {return __size_alloc_.second();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type __node_alloc_max_size() const _NOEXCEPT {
         return __node_alloc_traits::max_size(__node_alloc());
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void __unlink_nodes(__link_pointer __f, __link_pointer __l) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_imp()
         _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_imp(const allocator_type& __a);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __list_imp(const __node_allocator& __a);
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     __list_imp(__node_allocator&& __a) _NOEXCEPT;
 #endif
     ~__list_imp();
     void clear() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool empty() const _NOEXCEPT {return __sz() == 0;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator begin() _NOEXCEPT
     {
         return iterator(__end_.__next_, this);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin() const  _NOEXCEPT
     {
         return const_iterator(__end_.__next_, this);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator end() _NOEXCEPT
     {
         return iterator(__end_as_link(), this);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end() const _NOEXCEPT
     {
         return const_iterator(__end_as_link(), this);
     }
 
     void swap(__list_imp& __c)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT;
 #else
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                     __is_nothrow_swappable<allocator_type>::value);
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const __list_imp& __c)
         {__copy_assign_alloc(__c, integral_constant<bool,
                       __node_alloc_traits::propagate_on_container_copy_assignment::value>());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__list_imp& __c)
         _NOEXCEPT_(
             !__node_alloc_traits::propagate_on_container_move_assignment::value ||
@@ -658,7 +658,7 @@ protected:
                       __node_alloc_traits::propagate_on_container_move_assignment::value>());}
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const __list_imp& __c, true_type)
         {
             if (__node_alloc() != __c.__node_alloc())
@@ -666,18 +666,18 @@ private:
             __node_alloc() = __c.__node_alloc();
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __copy_assign_alloc(const __list_imp&, false_type)
         {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__list_imp& __c, true_type)
         _NOEXCEPT_(is_nothrow_move_assignable<__node_allocator>::value)
         {
-            __node_alloc() = _VSTD::move(__c.__node_alloc());
+            __node_alloc() = _CUDA_VSTD::move(__c.__node_alloc());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __move_assign_alloc(__list_imp&, false_type)
         _NOEXCEPT
         {}
@@ -713,10 +713,10 @@ template <class _Tp, class _Alloc>
 inline __list_imp<_Tp, _Alloc>::__list_imp(const __node_allocator& __a)
     : __size_alloc_(0, __a) {}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Tp, class _Alloc>
 inline __list_imp<_Tp, _Alloc>::__list_imp(__node_allocator&& __a) _NOEXCEPT
-    : __size_alloc_(0, _VSTD::move(__a)) {}
+    : __size_alloc_(0, _CUDA_VSTD::move(__a)) {}
 #endif
 
 template <class _Tp, class _Alloc>
@@ -740,7 +740,7 @@ __list_imp<_Tp, _Alloc>::clear() _NOEXCEPT
         {
             __node_pointer __np = __f->__as_node();
             __f = __f->__next_;
-            __node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_));
+            __node_alloc_traits::destroy(__na, _CUDA_VSTD::addressof(__np->__value_));
             __node_alloc_traits::deallocate(__na, __np, 1);
         }
         std::__debug_db_invalidate_all(this);
@@ -750,19 +750,19 @@ __list_imp<_Tp, _Alloc>::clear() _NOEXCEPT
 template <class _Tp, class _Alloc>
 void
 __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT
 #else
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                     __is_nothrow_swappable<allocator_type>::value)
 #endif
 {
-    _LIBCPP_ASSERT(__alloc_traits::propagate_on_container_swap::value ||
+    _LIBCUDACXX_ASSERT(__alloc_traits::propagate_on_container_swap::value ||
                    this->__node_alloc() == __c.__node_alloc(),
                    "list::swap: Either propagate_on_container_swap must be true"
                    " or the allocators must compare equal");
-    using _VSTD::swap;
-    _VSTD::__swap_allocator(__node_alloc(), __c.__node_alloc());
+    using _CUDA_VSTD::swap;
+    _CUDA_VSTD::__swap_allocator(__node_alloc(), __c.__node_alloc());
     swap(__sz(), __c.__sz());
     swap(__end_, __c.__end_);
     if (__sz() == 0)
@@ -774,13 +774,13 @@ __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
     else
         __c.__end_.__prev_->__next_ = __c.__end_.__next_->__prev_ = __c.__end_as_link();
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    __libcpp_db* __db = __get_db();
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    __LIBCUDACXX_db* __db = __get_db();
     __c_node* __cn1 = __db->__find_c_and_lock(this);
-    __c_node* __cn2 = __db->__find_c(_VSTD::addressof(__c));
-    _VSTD::swap(__cn1->beg_, __cn2->beg_);
-    _VSTD::swap(__cn1->end_, __cn2->end_);
-    _VSTD::swap(__cn1->cap_, __cn2->cap_);
+    __c_node* __cn2 = __db->__find_c(_CUDA_VSTD::addressof(__c));
+    _CUDA_VSTD::swap(__cn1->beg_, __cn2->beg_);
+    _CUDA_VSTD::swap(__cn1->end_, __cn2->end_);
+    _CUDA_VSTD::swap(__cn1->cap_, __cn2->cap_);
     for (__i_node** __p = __cn1->end_; __p != __cn1->beg_;)
     {
         --__p;
@@ -789,7 +789,7 @@ __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
         {
             __cn2->__add(*__p);
             if (--__cn1->end_ != __p)
-                _VSTD::memmove(__p, __p+1, (__cn1->end_ - __p)*sizeof(__i_node*));
+                _CUDA_VSTD::memmove(__p, __p+1, (__cn1->end_ - __p)*sizeof(__i_node*));
         }
         else
             (*__p)->__c_ = __cn1;
@@ -802,7 +802,7 @@ __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
         {
             __cn1->__add(*__p);
             if (--__cn2->end_ != __p)
-                _VSTD::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*));
+                _CUDA_VSTD::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*));
         }
         else
             (*__p)->__c_ = __cn2;
@@ -812,7 +812,7 @@ __list_imp<_Tp, _Alloc>::swap(__list_imp& __c)
 }
 
 template <class _Tp, class _Alloc /*= allocator<_Tp>*/>
-class _LIBCPP_TEMPLATE_VIS list
+class _LIBCUDACXX_TEMPLATE_VIS list
     : private __list_imp<_Tp, _Alloc>
 {
     typedef __list_imp<_Tp, _Alloc> base;
@@ -837,34 +837,34 @@ public:
     typedef typename base::
diff erence_type                 
diff erence_type;
     typedef typename base::iterator                        iterator;
     typedef typename base::const_iterator                  const_iterator;
-    typedef _VSTD::reverse_iterator<iterator>              reverse_iterator;
-    typedef _VSTD::reverse_iterator<const_iterator>        const_reverse_iterator;
-#if _LIBCPP_STD_VER > 17
+    typedef _CUDA_VSTD::reverse_iterator<iterator>              reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<const_iterator>        const_reverse_iterator;
+#if _LIBCUDACXX_STD_VER > 17
     typedef size_type                                      __remove_return_type;
 #else
     typedef void                                           __remove_return_type;
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     list()
         _NOEXCEPT_(is_nothrow_default_constructible<__node_allocator>::value)
     {
-        _VSTD::__debug_db_insert_c(this);
+        _CUDA_VSTD::__debug_db_insert_c(this);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit list(const allocator_type& __a) : base(__a)
     {
-        _VSTD::__debug_db_insert_c(this);
+        _CUDA_VSTD::__debug_db_insert_c(this);
     }
     explicit list(size_type __n);
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     explicit list(size_type __n, const allocator_type& __a);
 #endif
     list(size_type __n, const value_type& __x);
     template <class = __enable_if_t<__is_allocator<_Alloc>::value> >
     list(size_type __n, const value_type& __x, const allocator_type& __a) : base(__a)
     {
-        _VSTD::__debug_db_insert_c(this);
+        _CUDA_VSTD::__debug_db_insert_c(this);
         for (; __n > 0; --__n)
             push_back(__x);
     }
@@ -878,121 +878,121 @@ public:
 
     list(const list& __c);
     list(const list& __c, const __type_identity_t<allocator_type>& __a);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     list& operator=(const list& __c);
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     list(initializer_list<value_type> __il);
     list(initializer_list<value_type> __il, const allocator_type& __a);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     list(list&& __c)
         _NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     list(list&& __c, const __type_identity_t<allocator_type>& __a);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     list& operator=(list&& __c)
         _NOEXCEPT_(
             __node_alloc_traits::propagate_on_container_move_assignment::value &&
             is_nothrow_move_assignable<__node_allocator>::value);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     list& operator=(initializer_list<value_type> __il)
         {assign(__il.begin(), __il.end()); return *this;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void assign(initializer_list<value_type> __il)
         {assign(__il.begin(), __il.end());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     template <class _InpIter>
         void assign(_InpIter __f, _InpIter __l,
                     __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>* = 0);
     void assign(size_type __n, const value_type& __x);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT     {return base::__sz();}
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool empty() const _NOEXCEPT         {return base::empty();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT
         {
-            return _VSTD::min<size_type>(
+            return _CUDA_VSTD::min<size_type>(
                 base::__node_alloc_max_size(),
                 numeric_limits<
diff erence_type >::max());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator begin() _NOEXCEPT        {return base::begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin()  const _NOEXCEPT {return base::begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator end() _NOEXCEPT          {return base::end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()    const _NOEXCEPT {return base::end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin() const _NOEXCEPT {return base::begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend()   const _NOEXCEPT {return base::end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           reverse_iterator rbegin() _NOEXCEPT
             {return       reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rbegin()  const _NOEXCEPT
         {return const_reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           reverse_iterator rend() _NOEXCEPT
             {return       reverse_iterator(begin());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rend()    const _NOEXCEPT
         {return const_reverse_iterator(begin());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crbegin() const _NOEXCEPT
         {return const_reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crend()   const _NOEXCEPT
         {return const_reverse_iterator(begin());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference front()
     {
-        _LIBCPP_ASSERT(!empty(), "list::front called on empty list");
+        _LIBCUDACXX_ASSERT(!empty(), "list::front called on empty list");
         return base::__end_.__next_->__as_node()->__value_;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference front() const
     {
-        _LIBCPP_ASSERT(!empty(), "list::front called on empty list");
+        _LIBCUDACXX_ASSERT(!empty(), "list::front called on empty list");
         return base::__end_.__next_->__as_node()->__value_;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference back()
     {
-        _LIBCPP_ASSERT(!empty(), "list::back called on empty list");
+        _LIBCUDACXX_ASSERT(!empty(), "list::back called on empty list");
         return base::__end_.__prev_->__as_node()->__value_;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference back() const
     {
-        _LIBCPP_ASSERT(!empty(), "list::back called on empty list");
+        _LIBCUDACXX_ASSERT(!empty(), "list::back called on empty list");
         return base::__end_.__prev_->__as_node()->__value_;
     }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     void push_front(value_type&& __x);
     void push_back(value_type&& __x);
 
     template <class... _Args>
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
        reference emplace_front(_Args&&... __args);
 #else
        void      emplace_front(_Args&&... __args);
 #endif
     template <class... _Args>
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
         reference emplace_back(_Args&&... __args);
 #else
        void       emplace_back(_Args&&... __args);
@@ -1002,20 +1002,20 @@ public:
 
     iterator insert(const_iterator __p, value_type&& __x);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, initializer_list<value_type> __il)
         {return insert(__p, __il.begin(), __il.end());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     void push_front(const value_type& __x);
     void push_back(const value_type& __x);
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _Arg>
-    _LIBCPP_INLINE_VISIBILITY
-    void __emplace_back(_Arg&& __arg) { emplace_back(_VSTD::forward<_Arg>(__arg)); }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void __emplace_back(_Arg&& __arg) { emplace_back(_CUDA_VSTD::forward<_Arg>(__arg)); }
 #else
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __emplace_back(value_type const& __arg) { push_back(__arg); }
 #endif
 
@@ -1025,16 +1025,16 @@ public:
         iterator insert(const_iterator __p, _InpIter __f, _InpIter __l,
                         __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>* = 0);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(list& __c)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT
 #else
         _NOEXCEPT_(!__node_alloc_traits::propagate_on_container_swap::value ||
                    __is_nothrow_swappable<__node_allocator>::value)
 #endif
         {base::swap(__c);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT {base::clear();}
 
     void pop_front();
@@ -1047,13 +1047,13 @@ public:
     void resize(size_type __n, const value_type& __x);
 
     void splice(const_iterator __p, list& __c);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     void splice(const_iterator __p, list&& __c) {splice(__p, __c);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void splice(const_iterator __p, list&& __c, const_iterator __i)
         {splice(__p, __c, __i);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void splice(const_iterator __p, list&& __c, const_iterator __f, const_iterator __l)
         {splice(__p, __c, __f, __l);}
 #endif
@@ -1062,27 +1062,27 @@ public:
 
     __remove_return_type remove(const value_type& __x);
     template <class _Pred> __remove_return_type remove_if(_Pred __pred);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __remove_return_type unique() { return unique(__equal_to<value_type>()); }
     template <class _BinaryPred>
         __remove_return_type unique(_BinaryPred __binary_pred);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(list& __c);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(list&& __c) {merge(__c);}
 
     template <class _Comp>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
         void merge(list&& __c, _Comp __comp) {merge(__c, __comp);}
 #endif
     template <class _Comp>
         void merge(list& __c, _Comp __comp);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void sort();
     template <class _Comp>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void sort(_Comp __comp);
 
     void reverse() _NOEXCEPT;
@@ -1092,28 +1092,28 @@ public:
     typedef __allocator_destructor<__node_allocator> __node_destructor;
     typedef unique_ptr<__node, __node_destructor> __hold_pointer;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hold_pointer __allocate_node(__node_allocator& __na) {
       __node_pointer __p = __node_alloc_traits::allocate(__na, 1);
       __p->__prev_ = nullptr;
       return __hold_pointer(__p, __node_destructor(__na, 1));
     }
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
     bool __dereferenceable(const const_iterator* __i) const;
     bool __decrementable(const const_iterator* __i) const;
     bool __addable(const const_iterator* __i, ptr
diff _t __n) const;
     bool __subscriptable(const const_iterator* __i, ptr
diff _t __n) const;
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void __link_nodes  (__link_pointer __p, __link_pointer __f, __link_pointer __l);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __link_nodes_at_front(__link_pointer __f, __link_pointer __l);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __link_nodes_at_back (__link_pointer __f, __link_pointer __l);
     iterator __iterator(size_type __n);
     template <class _Comp>
@@ -1124,7 +1124,7 @@ private:
     void __move_assign(list& __c, false_type);
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator,
          class _Alloc = allocator<__iter_value_type<_InputIterator>>,
          class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>,
@@ -1184,27 +1184,27 @@ inline
 typename list<_Tp, _Alloc>::iterator
 list<_Tp, _Alloc>::__iterator(size_type __n)
 {
-    return __n <= base::__sz() / 2 ? _VSTD::next(begin(), __n)
-                                   : _VSTD::prev(end(), base::__sz() - __n);
+    return __n <= base::__sz() / 2 ? _CUDA_VSTD::next(begin(), __n)
+                                   : _CUDA_VSTD::prev(end(), base::__sz() - __n);
 }
 
 template <class _Tp, class _Alloc>
 list<_Tp, _Alloc>::list(size_type __n)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     for (; __n > 0; --__n)
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
         emplace_back();
 #else
         push_back(value_type());
 #endif
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp, class _Alloc>
 list<_Tp, _Alloc>::list(size_type __n, const allocator_type& __a) : base(__a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     for (; __n > 0; --__n)
         emplace_back();
 }
@@ -1213,7 +1213,7 @@ list<_Tp, _Alloc>::list(size_type __n, const allocator_type& __a) : base(__a)
 template <class _Tp, class _Alloc>
 list<_Tp, _Alloc>::list(size_type __n, const value_type& __x)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     for (; __n > 0; --__n)
         push_back(__x);
 }
@@ -1223,7 +1223,7 @@ template <class _InpIter>
 list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l,
                         __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>*)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     for (; __f != __l; ++__f)
         __emplace_back(*__f);
 }
@@ -1234,7 +1234,7 @@ list<_Tp, _Alloc>::list(_InpIter __f, _InpIter __l, const allocator_type& __a,
                         __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>*)
     : base(__a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     for (; __f != __l; ++__f)
         __emplace_back(*__f);
 }
@@ -1243,7 +1243,7 @@ template <class _Tp, class _Alloc>
 list<_Tp, _Alloc>::list(const list& __c)
     : base(__node_alloc_traits::select_on_container_copy_construction(
           __c.__node_alloc())) {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     for (const_iterator __i = __c.begin(), __e = __c.end(); __i != __e; ++__i)
         push_back(*__i);
 }
@@ -1252,18 +1252,18 @@ template <class _Tp, class _Alloc>
 list<_Tp, _Alloc>::list(const list& __c, const __type_identity_t<allocator_type>& __a)
     : base(__a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     for (const_iterator __i = __c.begin(), __e = __c.end(); __i != __e; ++__i)
         push_back(*__i);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Alloc>
 list<_Tp, _Alloc>::list(initializer_list<value_type> __il, const allocator_type& __a)
     : base(__a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     for (typename initializer_list<value_type>::const_iterator __i = __il.begin(),
             __e = __il.end(); __i != __e; ++__i)
         push_back(*__i);
@@ -1272,7 +1272,7 @@ list<_Tp, _Alloc>::list(initializer_list<value_type> __il, const allocator_type&
 template <class _Tp, class _Alloc>
 list<_Tp, _Alloc>::list(initializer_list<value_type> __il)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     for (typename initializer_list<value_type>::const_iterator __i = __il.begin(),
             __e = __il.end(); __i != __e; ++__i)
         push_back(*__i);
@@ -1281,8 +1281,8 @@ list<_Tp, _Alloc>::list(initializer_list<value_type> __il)
 template <class _Tp, class _Alloc>
 inline list<_Tp, _Alloc>::list(list&& __c)
         _NOEXCEPT_(is_nothrow_move_constructible<__node_allocator>::value)
-        : base(_VSTD::move(__c.__node_alloc())) {
-    _VSTD::__debug_db_insert_c(this);
+        : base(_CUDA_VSTD::move(__c.__node_alloc())) {
+    _CUDA_VSTD::__debug_db_insert_c(this);
     splice(end(), __c);
 }
 
@@ -1291,7 +1291,7 @@ inline
 list<_Tp, _Alloc>::list(list&& __c, const __type_identity_t<allocator_type>& __a)
     : base(__a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     if (__a == __c.get_allocator())
         splice(end(), __c);
     else
@@ -1337,14 +1337,14 @@ list<_Tp, _Alloc>::__move_assign(list& __c, true_type)
     splice(end(), __c);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Alloc>
 inline
 list<_Tp, _Alloc>&
 list<_Tp, _Alloc>::operator=(const list& __c)
 {
-    if (this != _VSTD::addressof(__c))
+    if (this != _CUDA_VSTD::addressof(__c))
     {
         base::__copy_assign_alloc(__c);
         assign(__c.begin(), __c.end());
@@ -1396,11 +1396,11 @@ template <class _Tp, class _Alloc>
 typename list<_Tp, _Alloc>::iterator
 list<_Tp, _Alloc>::insert(const_iterator __p, const value_type& __x)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                          "list::insert(iterator, x) called with an iterator not referring to this list");
     __node_allocator& __na = base::__node_alloc();
     __hold_pointer __hold = __allocate_node(__na);
-    __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x);
+    __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), __x);
     __link_nodes(__p.__ptr_, __hold->__as_link(), __hold->__as_link());
     ++base::__sz();
     return iterator(__hold.release()->__as_link(), this);
@@ -1410,7 +1410,7 @@ template <class _Tp, class _Alloc>
 typename list<_Tp, _Alloc>::iterator
 list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& __x)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                          "list::insert(iterator, n, x) called with an iterator not referring to this list");
     iterator __r(__p.__ptr_, this);
     if (__n > 0)
@@ -1418,30 +1418,30 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _
         size_type __ds = 0;
         __node_allocator& __na = base::__node_alloc();
         __hold_pointer __hold = __allocate_node(__na);
-        __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x);
+        __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), __x);
         ++__ds;
         __r = iterator(__hold->__as_link(), this);
         __hold.release();
         iterator __e = __r;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (--__n; __n != 0; --__n, (void) ++__e, ++__ds)
             {
                 __hold.reset(__node_alloc_traits::allocate(__na, 1));
-                __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x);
+                __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), __x);
                 __e.__ptr_->__next_ = __hold->__as_link();
                 __hold->__prev_ = __e.__ptr_;
                 __hold.release();
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             while (true)
             {
-                __node_alloc_traits::destroy(__na, _VSTD::addressof(*__e));
+                __node_alloc_traits::destroy(__na, _CUDA_VSTD::addressof(*__e));
                 __link_pointer __prev = __e.__ptr_->__prev_;
                 __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1);
                 if (__prev == 0)
@@ -1450,7 +1450,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, size_type __n, const value_type& _
             }
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __link_nodes(__p.__ptr_, __r.__ptr_, __e.__ptr_);
         base::__sz() += __ds;
     }
@@ -1463,7 +1463,7 @@ typename list<_Tp, _Alloc>::iterator
 list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l,
                           __enable_if_t<__is_cpp17_input_iterator<_InpIter>::value>*)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                          "list::insert(iterator, range) called with an iterator not referring to this list");
     iterator __r(__p.__ptr_, this);
     if (__f != __l)
@@ -1471,30 +1471,30 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l,
         size_type __ds = 0;
         __node_allocator& __na = base::__node_alloc();
         __hold_pointer __hold = __allocate_node(__na);
-        __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), *__f);
+        __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), *__f);
         ++__ds;
         __r = iterator(__hold.get()->__as_link(), this);
         __hold.release();
         iterator __e = __r;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (++__f; __f != __l; ++__f, (void) ++__e, ++__ds)
             {
                 __hold.reset(__node_alloc_traits::allocate(__na, 1));
-                __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), *__f);
+                __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), *__f);
                 __e.__ptr_->__next_ = __hold.get()->__as_link();
                 __hold->__prev_ = __e.__ptr_;
                 __hold.release();
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             while (true)
             {
-                __node_alloc_traits::destroy(__na, _VSTD::addressof(*__e));
+                __node_alloc_traits::destroy(__na, _CUDA_VSTD::addressof(*__e));
                 __link_pointer __prev = __e.__ptr_->__prev_;
                 __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1);
                 if (__prev == 0)
@@ -1503,7 +1503,7 @@ list<_Tp, _Alloc>::insert(const_iterator __p, _InpIter __f, _InpIter __l,
             }
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __link_nodes(__p.__ptr_, __r.__ptr_, __e.__ptr_);
         base::__sz() += __ds;
     }
@@ -1516,7 +1516,7 @@ list<_Tp, _Alloc>::push_front(const value_type& __x)
 {
     __node_allocator& __na = base::__node_alloc();
     __hold_pointer __hold = __allocate_node(__na);
-    __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x);
+    __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), __x);
     __link_pointer __nl = __hold->__as_link();
     __link_nodes_at_front(__nl, __nl);
     ++base::__sz();
@@ -1529,13 +1529,13 @@ list<_Tp, _Alloc>::push_back(const value_type& __x)
 {
     __node_allocator& __na = base::__node_alloc();
     __hold_pointer __hold = __allocate_node(__na);
-    __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x);
+    __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), __x);
     __link_nodes_at_back(__hold.get()->__as_link(), __hold.get()->__as_link());
     ++base::__sz();
     __hold.release();
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Alloc>
 void
@@ -1543,7 +1543,7 @@ list<_Tp, _Alloc>::push_front(value_type&& __x)
 {
     __node_allocator& __na = base::__node_alloc();
     __hold_pointer __hold = __allocate_node(__na);
-    __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::move(__x));
+    __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), _CUDA_VSTD::move(__x));
     __link_nodes_at_front(__hold.get()->__as_link(), __hold.get()->__as_link());
     ++base::__sz();
     __hold.release();
@@ -1555,7 +1555,7 @@ list<_Tp, _Alloc>::push_back(value_type&& __x)
 {
     __node_allocator& __na = base::__node_alloc();
     __hold_pointer __hold = __allocate_node(__na);
-    __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::move(__x));
+    __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), _CUDA_VSTD::move(__x));
     __link_nodes_at_back(__hold.get()->__as_link(), __hold.get()->__as_link());
     ++base::__sz();
     __hold.release();
@@ -1563,7 +1563,7 @@ list<_Tp, _Alloc>::push_back(value_type&& __x)
 
 template <class _Tp, class _Alloc>
 template <class... _Args>
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 typename list<_Tp, _Alloc>::reference
 #else
 void
@@ -1572,10 +1572,10 @@ list<_Tp, _Alloc>::emplace_front(_Args&&... __args)
 {
     __node_allocator& __na = base::__node_alloc();
     __hold_pointer __hold = __allocate_node(__na);
-    __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::forward<_Args>(__args)...);
+    __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), _CUDA_VSTD::forward<_Args>(__args)...);
     __link_nodes_at_front(__hold.get()->__as_link(), __hold.get()->__as_link());
     ++base::__sz();
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     return __hold.release()->__value_;
 #else
     __hold.release();
@@ -1584,7 +1584,7 @@ list<_Tp, _Alloc>::emplace_front(_Args&&... __args)
 
 template <class _Tp, class _Alloc>
 template <class... _Args>
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 typename list<_Tp, _Alloc>::reference
 #else
 void
@@ -1593,11 +1593,11 @@ list<_Tp, _Alloc>::emplace_back(_Args&&... __args)
 {
     __node_allocator& __na = base::__node_alloc();
     __hold_pointer __hold = __allocate_node(__na);
-    __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::forward<_Args>(__args)...);
+    __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), _CUDA_VSTD::forward<_Args>(__args)...);
     __link_pointer __nl = __hold->__as_link();
     __link_nodes_at_back(__nl, __nl);
     ++base::__sz();
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     return __hold.release()->__value_;
 #else
     __hold.release();
@@ -1609,11 +1609,11 @@ template <class... _Args>
 typename list<_Tp, _Alloc>::iterator
 list<_Tp, _Alloc>::emplace(const_iterator __p, _Args&&... __args)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                          "list::emplace(iterator, args...) called with an iterator not referring to this list");
     __node_allocator& __na = base::__node_alloc();
     __hold_pointer __hold = __allocate_node(__na);
-    __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::forward<_Args>(__args)...);
+    __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), _CUDA_VSTD::forward<_Args>(__args)...);
     __link_pointer __nl = __hold.get()->__as_link();
     __link_nodes(__p.__ptr_, __nl, __nl);
     ++base::__sz();
@@ -1625,11 +1625,11 @@ template <class _Tp, class _Alloc>
 typename list<_Tp, _Alloc>::iterator
 list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                          "list::insert(iterator, x) called with an iterator not referring to this list");
     __node_allocator& __na = base::__node_alloc();
     __hold_pointer __hold = __allocate_node(__na);
-    __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), _VSTD::move(__x));
+    __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), _CUDA_VSTD::move(__x));
     __link_pointer __nl = __hold->__as_link();
     __link_nodes(__p.__ptr_, __nl, __nl);
     ++base::__sz();
@@ -1637,18 +1637,18 @@ list<_Tp, _Alloc>::insert(const_iterator __p, value_type&& __x)
     return iterator(__nl, this);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Alloc>
 void
 list<_Tp, _Alloc>::pop_front()
 {
-    _LIBCPP_ASSERT(!empty(), "list::pop_front() called with empty list");
+    _LIBCUDACXX_ASSERT(!empty(), "list::pop_front() called with empty list");
     __node_allocator& __na = base::__node_alloc();
     __link_pointer __n = base::__end_.__next_;
     base::__unlink_nodes(__n, __n);
     --base::__sz();
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
     __c_node* __c = __get_db()->__find_c_and_lock(this);
     for (__i_node** __p = __c->end_; __p != __c->beg_; )
     {
@@ -1658,13 +1658,13 @@ list<_Tp, _Alloc>::pop_front()
         {
             (*__p)->__c_ = nullptr;
             if (--__c->end_ != __p)
-                _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+                _CUDA_VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
         }
     }
     __get_db()->unlock();
 #endif
     __node_pointer __np = __n->__as_node();
-    __node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_));
+    __node_alloc_traits::destroy(__na, _CUDA_VSTD::addressof(__np->__value_));
     __node_alloc_traits::deallocate(__na, __np, 1);
 }
 
@@ -1672,12 +1672,12 @@ template <class _Tp, class _Alloc>
 void
 list<_Tp, _Alloc>::pop_back()
 {
-    _LIBCPP_ASSERT(!empty(), "list::pop_back() called on an empty list");
+    _LIBCUDACXX_ASSERT(!empty(), "list::pop_back() called on an empty list");
     __node_allocator& __na = base::__node_alloc();
     __link_pointer __n = base::__end_.__prev_;
     base::__unlink_nodes(__n, __n);
     --base::__sz();
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
     __c_node* __c = __get_db()->__find_c_and_lock(this);
     for (__i_node** __p = __c->end_; __p != __c->beg_; )
     {
@@ -1687,13 +1687,13 @@ list<_Tp, _Alloc>::pop_back()
         {
             (*__p)->__c_ = nullptr;
             if (--__c->end_ != __p)
-                _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+                _CUDA_VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
         }
     }
     __get_db()->unlock();
 #endif
     __node_pointer __np = __n->__as_node();
-    __node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_));
+    __node_alloc_traits::destroy(__na, _CUDA_VSTD::addressof(__np->__value_));
     __node_alloc_traits::deallocate(__na, __np, 1);
 }
 
@@ -1701,16 +1701,16 @@ template <class _Tp, class _Alloc>
 typename list<_Tp, _Alloc>::iterator
 list<_Tp, _Alloc>::erase(const_iterator __p)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                          "list::erase(iterator) called with an iterator not referring to this list");
-    _LIBCPP_ASSERT(__p != end(),
+    _LIBCUDACXX_ASSERT(__p != end(),
         "list::erase(iterator) called with a non-dereferenceable iterator");
     __node_allocator& __na = base::__node_alloc();
     __link_pointer __n = __p.__ptr_;
     __link_pointer __r = __n->__next_;
     base::__unlink_nodes(__n, __n);
     --base::__sz();
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
     __c_node* __c = __get_db()->__find_c_and_lock(this);
     for (__i_node** __ip = __c->end_; __ip != __c->beg_; )
     {
@@ -1720,13 +1720,13 @@ list<_Tp, _Alloc>::erase(const_iterator __p)
         {
             (*__ip)->__c_ = nullptr;
             if (--__c->end_ != __ip)
-                _VSTD::memmove(__ip, __ip+1, (__c->end_ - __ip)*sizeof(__i_node*));
+                _CUDA_VSTD::memmove(__ip, __ip+1, (__c->end_ - __ip)*sizeof(__i_node*));
         }
     }
     __get_db()->unlock();
 #endif
     __node_pointer __np = __n->__as_node();
-    __node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_));
+    __node_alloc_traits::destroy(__na, _CUDA_VSTD::addressof(__np->__value_));
     __node_alloc_traits::deallocate(__na, __np, 1);
     return iterator(__r, this);
 }
@@ -1735,9 +1735,9 @@ template <class _Tp, class _Alloc>
 typename list<_Tp, _Alloc>::iterator
 list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__f)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__f)) == this,
                          "list::erase(iterator, iterator) called with an iterator not referring to this list");
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__l)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__l)) == this,
                          "list::erase(iterator, iterator) called with an iterator not referring to this list");
     if (__f != __l)
     {
@@ -1748,7 +1748,7 @@ list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l)
             __link_pointer __n = __f.__ptr_;
             ++__f;
             --base::__sz();
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
             __c_node* __c = __get_db()->__find_c_and_lock(this);
             for (__i_node** __p = __c->end_; __p != __c->beg_; )
             {
@@ -1758,13 +1758,13 @@ list<_Tp, _Alloc>::erase(const_iterator __f, const_iterator __l)
                 {
                     (*__p)->__c_ = nullptr;
                     if (--__c->end_ != __p)
-                        _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+                        _CUDA_VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
                 }
             }
             __get_db()->unlock();
 #endif
             __node_pointer __np = __n->__as_node();
-            __node_alloc_traits::destroy(__na, _VSTD::addressof(__np->__value_));
+            __node_alloc_traits::destroy(__na, _CUDA_VSTD::addressof(__np->__value_));
             __node_alloc_traits::deallocate(__na, __np, 1);
         }
     }
@@ -1783,29 +1783,29 @@ list<_Tp, _Alloc>::resize(size_type __n)
         size_type __ds = 0;
         __node_allocator& __na = base::__node_alloc();
         __hold_pointer __hold = __allocate_node(__na);
-        __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_));
+        __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_));
         ++__ds;
         iterator __r = iterator(__hold.release()->__as_link(), this);
         iterator __e = __r;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (--__n; __n != 0; --__n, (void) ++__e, ++__ds)
             {
                 __hold.reset(__node_alloc_traits::allocate(__na, 1));
-                __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_));
+                __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_));
                 __e.__ptr_->__next_ = __hold.get()->__as_link();
                 __hold->__prev_ = __e.__ptr_;
                 __hold.release();
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             while (true)
             {
-                __node_alloc_traits::destroy(__na, _VSTD::addressof(*__e));
+                __node_alloc_traits::destroy(__na, _CUDA_VSTD::addressof(*__e));
                 __link_pointer __prev = __e.__ptr_->__prev_;
                 __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1);
                 if (__prev == 0)
@@ -1814,7 +1814,7 @@ list<_Tp, _Alloc>::resize(size_type __n)
             }
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __link_nodes_at_back(__r.__ptr_, __e.__ptr_);
         base::__sz() += __ds;
     }
@@ -1832,30 +1832,30 @@ list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x)
         size_type __ds = 0;
         __node_allocator& __na = base::__node_alloc();
         __hold_pointer __hold = __allocate_node(__na);
-        __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x);
+        __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), __x);
         ++__ds;
         __link_pointer __nl = __hold.release()->__as_link();
         iterator __r = iterator(__nl, this);
         iterator __e = __r;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (--__n; __n != 0; --__n, (void) ++__e, ++__ds)
             {
                 __hold.reset(__node_alloc_traits::allocate(__na, 1));
-                __node_alloc_traits::construct(__na, _VSTD::addressof(__hold->__value_), __x);
+                __node_alloc_traits::construct(__na, _CUDA_VSTD::addressof(__hold->__value_), __x);
                 __e.__ptr_->__next_ = __hold.get()->__as_link();
                 __hold->__prev_ = __e.__ptr_;
                 __hold.release();
             }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             while (true)
             {
-                __node_alloc_traits::destroy(__na, _VSTD::addressof(*__e));
+                __node_alloc_traits::destroy(__na, _CUDA_VSTD::addressof(*__e));
                 __link_pointer __prev = __e.__ptr_->__prev_;
                 __node_alloc_traits::deallocate(__na, __e.__ptr_->__as_node(), 1);
                 if (__prev == 0)
@@ -1864,7 +1864,7 @@ list<_Tp, _Alloc>::resize(size_type __n, const value_type& __x)
             }
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __link_nodes(base::__end_as_link(), __r.__ptr_, __e.__ptr_);
         base::__sz() += __ds;
     }
@@ -1874,9 +1874,9 @@ template <class _Tp, class _Alloc>
 void
 list<_Tp, _Alloc>::splice(const_iterator __p, list& __c)
 {
-    _LIBCPP_ASSERT(this != _VSTD::addressof(__c),
+    _LIBCUDACXX_ASSERT(this != _CUDA_VSTD::addressof(__c),
                    "list::splice(iterator, list) called with this == &list");
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                          "list::splice(iterator, list) called with an iterator not referring to this list");
     if (!__c.empty())
     {
@@ -1886,11 +1886,11 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c)
         __link_nodes(__p.__ptr_, __f, __l);
         base::__sz() += __c.__sz();
         __c.__sz() = 0;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-        if (_VSTD::addressof(__c) != this) {
-            __libcpp_db* __db = __get_db();
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+        if (_CUDA_VSTD::addressof(__c) != this) {
+            __LIBCUDACXX_db* __db = __get_db();
             __c_node* __cn1 = __db->__find_c_and_lock(this);
-            __c_node* __cn2 = __db->__find_c(_VSTD::addressof(__c));
+            __c_node* __cn2 = __db->__find_c(_CUDA_VSTD::addressof(__c));
             for (__i_node** __ip = __cn2->end_; __ip != __cn2->beg_;)
             {
                 --__ip;
@@ -1900,7 +1900,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c)
                     __cn1->__add(*__ip);
                     (*__ip)->__c_ = __cn1;
                     if (--__cn2->end_ != __ip)
-                        _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
+                        _CUDA_VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
                 }
             }
             __db->unlock();
@@ -1913,11 +1913,11 @@ template <class _Tp, class _Alloc>
 void
 list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
         "list::splice(iterator, list, iterator) called with the first iterator not referring to this list");
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__i)) == _VSTD::addressof(__c),
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__i)) == _CUDA_VSTD::addressof(__c),
         "list::splice(iterator, list, iterator) called with the second iterator not referring to the list argument");
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__dereferenceable(_VSTD::addressof(__i)),
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__dereferenceable(_CUDA_VSTD::addressof(__i)),
         "list::splice(iterator, list, iterator) called with the second iterator not dereferenceable");
 
     if (__p.__ptr_ != __i.__ptr_ && __p.__ptr_ != __i.__ptr_->__next_)
@@ -1927,11 +1927,11 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i)
         __link_nodes(__p.__ptr_, __f, __f);
         --__c.__sz();
         ++base::__sz();
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-        if (_VSTD::addressof(__c) != this) {
-            __libcpp_db* __db = __get_db();
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+        if (_CUDA_VSTD::addressof(__c) != this) {
+            __LIBCUDACXX_db* __db = __get_db();
             __c_node* __cn1 = __db->__find_c_and_lock(this);
-            __c_node* __cn2 = __db->__find_c(_VSTD::addressof(__c));
+            __c_node* __cn2 = __db->__find_c(_CUDA_VSTD::addressof(__c));
             for (__i_node** __ip = __cn2->end_; __ip != __cn2->beg_;)
             {
                 --__ip;
@@ -1941,7 +1941,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i)
                     __cn1->__add(*__ip);
                     (*__ip)->__c_ = __cn1;
                     if (--__cn2->end_ != __ip)
-                        _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
+                        _CUDA_VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
                 }
             }
             __db->unlock();
@@ -1951,7 +1951,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __i)
 }
 
 template <class _Iterator>
-_LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_HIDE_FROM_ABI
 bool __iterator_in_range(_Iterator __first, _Iterator __last, _Iterator __it) {
     for (_Iterator __p = __first; __p != __last; ++__p) {
         if (__p == __it) {
@@ -1965,13 +1965,13 @@ template <class _Tp, class _Alloc>
 void
 list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f, const_iterator __l)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
         "list::splice(iterator, list, iterator, iterator) called with first iterator not referring to this list");
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__f)) == _VSTD::addressof(__c),
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__f)) == _CUDA_VSTD::addressof(__c),
         "list::splice(iterator, list, iterator, iterator) called with second iterator not referring to the list argument");
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__l)) == _VSTD::addressof(__c),
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__l)) == _CUDA_VSTD::addressof(__c),
         "list::splice(iterator, list, iterator, iterator) called with third iterator not referring to the list argument");
-    _LIBCPP_DEBUG_ASSERT(this != std::addressof(__c) || !std::__iterator_in_range(__f, __l, __p),
+    _LIBCUDACXX_DEBUG_ASSERT(this != std::addressof(__c) || !std::__iterator_in_range(__f, __l, __p),
         "list::splice(iterator, list, iterator, iterator)"
         " called with the first iterator within the range of the second and third iterators");
 
@@ -1980,19 +1980,19 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f, con
         __link_pointer __first = __f.__ptr_;
         --__l;
         __link_pointer __last = __l.__ptr_;
-        if (this != _VSTD::addressof(__c))
+        if (this != _CUDA_VSTD::addressof(__c))
         {
-            size_type __s = _VSTD::distance(__f, __l) + 1;
+            size_type __s = _CUDA_VSTD::distance(__f, __l) + 1;
             __c.__sz() -= __s;
             base::__sz() += __s;
         }
         base::__unlink_nodes(__first, __last);
         __link_nodes(__p.__ptr_, __first, __last);
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-        if (_VSTD::addressof(__c) != this) {
-            __libcpp_db* __db = __get_db();
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+        if (_CUDA_VSTD::addressof(__c) != this) {
+            __LIBCUDACXX_db* __db = __get_db();
             __c_node* __cn1 = __db->__find_c_and_lock(this);
-            __c_node* __cn2 = __db->__find_c(_VSTD::addressof(__c));
+            __c_node* __cn2 = __db->__find_c(_CUDA_VSTD::addressof(__c));
             for (__i_node** __ip = __cn2->end_; __ip != __cn2->beg_;)
             {
                 --__ip;
@@ -2005,7 +2005,7 @@ list<_Tp, _Alloc>::splice(const_iterator __p, list& __c, const_iterator __f, con
                         __cn1->__add(*__ip);
                         (*__ip)->__c_ = __cn1;
                         if (--__cn2->end_ != __ip)
-                            _VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
+                            _CUDA_VSTD::memmove(__ip, __ip+1, (__cn2->end_ - __ip)*sizeof(__i_node*));
                     }
                 }
             }
@@ -2024,7 +2024,7 @@ list<_Tp, _Alloc>::remove(const value_type& __x)
     {
         if (*__i == __x)
         {
-            const_iterator __j = _VSTD::next(__i);
+            const_iterator __j = _CUDA_VSTD::next(__i);
             for (; __j != __e && *__j == __x; ++__j)
                 ;
             __deleted_nodes.splice(__deleted_nodes.end(), *this, __i, __j);
@@ -2049,7 +2049,7 @@ list<_Tp, _Alloc>::remove_if(_Pred __pred)
     {
         if (__pred(*__i))
         {
-            iterator __j = _VSTD::next(__i);
+            iterator __j = _CUDA_VSTD::next(__i);
             for (; __j != __e && __pred(*__j); ++__j)
                 ;
             __deleted_nodes.splice(__deleted_nodes.end(), *this, __i, __j);
@@ -2072,7 +2072,7 @@ list<_Tp, _Alloc>::unique(_BinaryPred __binary_pred)
     list<_Tp, _Alloc> __deleted_nodes(get_allocator()); // collect the nodes we're removing
     for (iterator __i = begin(), __e = end(); __i != __e;)
     {
-        iterator __j = _VSTD::next(__i);
+        iterator __j = _CUDA_VSTD::next(__i);
         for (; __j != __e && __binary_pred(*__i, *__j); ++__j)
             ;
         if (++__i != __j) {
@@ -2097,7 +2097,7 @@ template <class _Comp>
 void
 list<_Tp, _Alloc>::merge(list& __c, _Comp __comp)
 {
-    if (this != _VSTD::addressof(__c))
+    if (this != _CUDA_VSTD::addressof(__c))
     {
         iterator __f1 = begin();
         iterator __e1 = end();
@@ -2108,7 +2108,7 @@ list<_Tp, _Alloc>::merge(list& __c, _Comp __comp)
             if (__comp(*__f2, *__f1))
             {
                 size_type __ds = 1;
-                iterator __m2 = _VSTD::next(__f2);
+                iterator __m2 = _CUDA_VSTD::next(__f2);
                 for (; __m2 != __e2 && __comp(*__m2, *__f1); ++__m2, (void) ++__ds)
                     ;
                 base::__sz() += __ds;
@@ -2117,7 +2117,7 @@ list<_Tp, _Alloc>::merge(list& __c, _Comp __comp)
                 __link_pointer __l = __m2.__ptr_->__prev_;
                 __f2 = __m2;
                 base::__unlink_nodes(__f, __l);
-                __m2 = _VSTD::next(__f1);
+                __m2 = _CUDA_VSTD::next(__f1);
                 __link_nodes(__f1.__ptr_, __f, __l);
                 __f1 = __m2;
             }
@@ -2125,10 +2125,10 @@ list<_Tp, _Alloc>::merge(list& __c, _Comp __comp)
                 ++__f1;
         }
         splice(__e1, __c);
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-        __libcpp_db* __db = __get_db();
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+        __LIBCUDACXX_db* __db = __get_db();
         __c_node* __cn1 = __db->__find_c_and_lock(this);
-        __c_node* __cn2 = __db->__find_c(_VSTD::addressof(__c));
+        __c_node* __cn2 = __db->__find_c(_CUDA_VSTD::addressof(__c));
         for (__i_node** __p = __cn2->end_; __p != __cn2->beg_;)
         {
             --__p;
@@ -2138,7 +2138,7 @@ list<_Tp, _Alloc>::merge(list& __c, _Comp __comp)
                 __cn1->__add(*__p);
                 (*__p)->__c_ = __cn1;
                 if (--__cn2->end_ != __p)
-                    _VSTD::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*));
+                    _CUDA_VSTD::memmove(__p, __p+1, (__cn2->end_ - __p)*sizeof(__i_node*));
             }
         }
         __db->unlock();
@@ -2184,12 +2184,12 @@ list<_Tp, _Alloc>::__sort(iterator __f1, iterator __e2, size_type __n, _Comp& __
         return __f1;
     }
     size_type __n2 = __n / 2;
-    iterator __e1 = _VSTD::next(__f1, __n2);
+    iterator __e1 = _CUDA_VSTD::next(__f1, __n2);
     iterator  __r = __f1 = __sort(__f1, __e1, __n2, __comp);
     iterator __f2 = __e1 = __sort(__e1, __e2, __n - __n2, __comp);
     if (__comp(*__f2, *__f1))
     {
-        iterator __m2 = _VSTD::next(__f2);
+        iterator __m2 = _CUDA_VSTD::next(__f2);
         for (; __m2 != __e2 && __comp(*__m2, *__f1); ++__m2)
             ;
         __link_pointer __f = __f2.__ptr_;
@@ -2197,7 +2197,7 @@ list<_Tp, _Alloc>::__sort(iterator __f1, iterator __e2, size_type __n, _Comp& __
         __r = __f2;
         __e1 = __f2 = __m2;
         base::__unlink_nodes(__f, __l);
-        __m2 = _VSTD::next(__f1);
+        __m2 = _CUDA_VSTD::next(__f1);
         __link_nodes(__f1.__ptr_, __f, __l);
         __f1 = __m2;
     }
@@ -2207,7 +2207,7 @@ list<_Tp, _Alloc>::__sort(iterator __f1, iterator __e2, size_type __n, _Comp& __
     {
         if (__comp(*__f2, *__f1))
         {
-            iterator __m2 = _VSTD::next(__f2);
+            iterator __m2 = _CUDA_VSTD::next(__f2);
             for (; __m2 != __e2 && __comp(*__m2, *__f1); ++__m2)
                 ;
             __link_pointer __f = __f2.__ptr_;
@@ -2216,7 +2216,7 @@ list<_Tp, _Alloc>::__sort(iterator __f1, iterator __e2, size_type __n, _Comp& __
                 __e1 = __m2;
             __f2 = __m2;
             base::__unlink_nodes(__f, __l);
-            __m2 = _VSTD::next(__f1);
+            __m2 = _CUDA_VSTD::next(__f1);
             __link_nodes(__f1.__ptr_, __f, __l);
             __f1 = __m2;
         }
@@ -2235,10 +2235,10 @@ list<_Tp, _Alloc>::reverse() _NOEXCEPT
         iterator __e = end();
         for (iterator __i = begin(); __i.__ptr_ != __e.__ptr_;)
         {
-            _VSTD::swap(__i.__ptr_->__prev_, __i.__ptr_->__next_);
+            _CUDA_VSTD::swap(__i.__ptr_->__prev_, __i.__ptr_->__next_);
             __i.__ptr_ = __i.__ptr_->__prev_;
         }
-        _VSTD::swap(__e.__ptr_->__prev_, __e.__ptr_->__next_);
+        _CUDA_VSTD::swap(__e.__ptr_->__prev_, __e.__ptr_->__next_);
     }
 }
 
@@ -2246,10 +2246,10 @@ template <class _Tp, class _Alloc>
 bool
 list<_Tp, _Alloc>::__invariants() const
 {
-    return size() == _VSTD::distance(begin(), end());
+    return size() == _CUDA_VSTD::distance(begin(), end());
 }
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 template <class _Tp, class _Alloc>
 bool
@@ -2279,26 +2279,26 @@ list<_Tp, _Alloc>::__subscriptable(const const_iterator*, ptr
diff _t) const
     return false;
 }
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
 {
-    return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
+    return __x.size() == __y.size() && _CUDA_VSTD::equal(__x.begin(), __x.end(), __y.begin());
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
 {
-    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
+    return _CUDA_VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
 {
@@ -2306,7 +2306,7 @@ operator!=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator> (const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
 {
@@ -2314,7 +2314,7 @@ operator> (const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
 {
@@ -2322,7 +2322,7 @@ operator>=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
 {
@@ -2330,7 +2330,7 @@ operator<=(const list<_Tp, _Alloc>& __x, const list<_Tp, _Alloc>& __y)
 }
 
 template <class _Tp, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
     _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
@@ -2338,30 +2338,30 @@ swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Tp, class _Allocator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY typename list<_Tp, _Allocator>::size_type
+inline _LIBCUDACXX_INLINE_VISIBILITY typename list<_Tp, _Allocator>::size_type
 erase_if(list<_Tp, _Allocator>& __c, _Predicate __pred) {
   return __c.remove_if(__pred);
 }
 
 template <class _Tp, class _Allocator, class _Up>
-inline _LIBCPP_INLINE_VISIBILITY typename list<_Tp, _Allocator>::size_type
+inline _LIBCUDACXX_INLINE_VISIBILITY typename list<_Tp, _Allocator>::size_type
 erase(list<_Tp, _Allocator>& __c, const _Up& __v) {
-  return _VSTD::erase_if(__c, [&](auto& __elem) { return __elem == __v; });
+  return _CUDA_VSTD::erase_if(__c, [&](auto& __elem) { return __elem == __v; });
 }
 
 template <>
 inline constexpr bool __format::__enable_insertable<std::list<char>> = true;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 inline constexpr bool __format::__enable_insertable<std::list<wchar_t>> = true;
 #endif
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_LIST
+#endif // _LIBCUDACXX_LIST

diff  --git a/libcxx/include/locale b/libcxx/include/locale
index b01c66d0430f..34eeaba06894 100644
--- a/libcxx/include/locale
+++ b/libcxx/include/locale
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_LOCALE
-#define _LIBCPP_LOCALE
+#ifndef _LIBCUDACXX_LOCALE
+#define _LIBCUDACXX_LOCALE
 
 /*
     locale synopsis
@@ -211,42 +211,42 @@ template <class charT> class messages_byname;
 #include <streambuf>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <iterator>
 #endif
 
 #if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__))
 // Most unix variants have catopen.  These are the specific ones that don't.
 #  if !defined(__BIONIC__) && !defined(_NEWLIB_VERSION) && !defined(__EMSCRIPTEN__)
-#    define _LIBCPP_HAS_CATOPEN 1
+#    define _LIBCUDACXX_HAS_CATOPEN 1
 #    include <nl_types.h>
 #  endif
 #endif
 
-#ifdef _LIBCPP_LOCALE__L_EXTENSIONS
+#ifdef _LIBCUDACXX_LOCALE__L_EXTENSIONS
 #include <__bsd_locale_defaults.h>
 #else
 #include <__bsd_locale_fallbacks.h>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if defined(__APPLE__) || defined(__FreeBSD__)
-#  define _LIBCPP_GET_C_LOCALE 0
+#  define _LIBCUDACXX_GET_C_LOCALE 0
 #elif defined(__NetBSD__)
-#  define _LIBCPP_GET_C_LOCALE LC_C_LOCALE
+#  define _LIBCUDACXX_GET_C_LOCALE LC_C_LOCALE
 #else
-#  define _LIBCPP_GET_C_LOCALE __cloc()
+#  define _LIBCUDACXX_GET_C_LOCALE __cloc()
    // Get the C locale object
-   _LIBCPP_FUNC_VIS locale_t __cloc();
+   _LIBCUDACXX_FUNC_VIS locale_t __cloc();
 #define __cloc_defined
 #endif
 
@@ -269,7 +269,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 //  If the input is "a", the first keyword matches and eofbit is set.
 //  If the input is "abc", no match is found and "ab" are consumed.
 template <class _InputIterator, class _ForwardIterator, class _Ctype>
-_LIBCPP_HIDDEN
+_LIBCUDACXX_HIDDEN
 _ForwardIterator
 __scan_keyword(_InputIterator& __b, _InputIterator __e,
                _ForwardIterator __kb, _ForwardIterator __ke,
@@ -277,7 +277,7 @@ __scan_keyword(_InputIterator& __b, _InputIterator __e,
                bool __case_sensitive = true)
 {
     typedef typename iterator_traits<_InputIterator>::value_type _CharT;
-    size_t __nkw = static_cast<size_t>(_VSTD::distance(__kb, __ke));
+    size_t __nkw = static_cast<size_t>(_CUDA_VSTD::distance(__kb, __ke));
     const unsigned char __doesnt_match = '\0';
     const unsigned char __might_match = '\1';
     const unsigned char __does_match = '\2';
@@ -378,7 +378,7 @@ __scan_keyword(_InputIterator& __b, _InputIterator __e,
     return __kb;
 }
 
-struct _LIBCPP_TYPE_VIS __num_get_base
+struct _LIBCUDACXX_TYPE_VIS __num_get_base
 {
     static const int __num_get_buf_sz = 40;
 
@@ -386,7 +386,7 @@ struct _LIBCPP_TYPE_VIS __num_get_base
     static const char __src[33];
 };
 
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 void __check_grouping(const string& __grouping, unsigned* __g, unsigned* __g_end,
                       ios_base::iostate& __err);
 
@@ -402,7 +402,7 @@ struct __num_get
                                    _CharT __decimal_point, _CharT __thousands_sep,
                                    const string& __grouping, unsigned* __g,
                                    unsigned*& __g_end, unsigned& __dc, _CharT* __atoms);
-#ifndef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
+#ifndef _LIBCUDACXX_ABI_OPTIMIZED_LOCALE_NUM_GET
     static string __stage2_int_prep(ios_base& __iob, _CharT* __atoms, _CharT& __thousands_sep);
     static int __stage2_int_loop(_CharT __ct, int __base, char* __a, char*& __a_end,
                   unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
@@ -444,7 +444,7 @@ private:
 #endif
 };
 
-#ifndef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
+#ifndef _LIBCUDACXX_ABI_OPTIMIZED_LOCALE_NUM_GET
 template <class _CharT>
 string
 __num_get<_CharT>::__stage2_int_prep(ios_base& __iob, _CharT* __atoms, _CharT& __thousands_sep)
@@ -472,7 +472,7 @@ __num_get<_CharT>::__stage2_float_prep(ios_base& __iob, _CharT* __atoms, _CharT&
 
 template <class _CharT>
 int
-#ifndef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
+#ifndef _LIBCUDACXX_ABI_OPTIMIZED_LOCALE_NUM_GET
 __num_get<_CharT>::__stage2_int_loop(_CharT __ct, int __base, char* __a, char*& __a_end,
                   unsigned& __dc, _CharT __thousands_sep, const string& __grouping,
                   unsigned* __g, unsigned*& __g_end, _CharT* __atoms)
@@ -583,13 +583,13 @@ __num_get<_CharT>::__stage2_float_loop(_CharT __ct, bool& __in_units, char& __ex
     return 0;
 }
 
-extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_get<wchar_t>;
+extern template struct _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS __num_get<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template struct _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS __num_get<wchar_t>;
 #endif
 
 template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS num_get
+class _LIBCUDACXX_TEMPLATE_VIS num_get
     : public locale::facet,
       private __num_get<_CharT>
 {
@@ -597,81 +597,81 @@ public:
     typedef _CharT char_type;
     typedef _InputIterator iter_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit num_get(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, bool& __v) const
     {
         return do_get(__b, __e, __iob, __err, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, long& __v) const
     {
         return do_get(__b, __e, __iob, __err, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, long long& __v) const
     {
         return do_get(__b, __e, __iob, __err, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, unsigned short& __v) const
     {
         return do_get(__b, __e, __iob, __err, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, unsigned int& __v) const
     {
         return do_get(__b, __e, __iob, __err, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, unsigned long& __v) const
     {
         return do_get(__b, __e, __iob, __err, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, unsigned long long& __v) const
     {
         return do_get(__b, __e, __iob, __err, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, float& __v) const
     {
         return do_get(__b, __e, __iob, __err, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, double& __v) const
     {
         return do_get(__b, __e, __iob, __err, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, long double& __v) const
     {
         return do_get(__b, __e, __iob, __err, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, void*& __v) const
     {
@@ -681,23 +681,23 @@ public:
     static locale::id id;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~num_get() {}
 
     template <class _Fp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
     iter_type __do_get_floating_point
                             (iter_type __b, iter_type __e, ios_base& __iob,
                              ios_base::iostate& __err, _Fp& __v) const;
 
     template <class _Signed>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
     iter_type __do_get_signed
                             (iter_type __b, iter_type __e, ios_base& __iob,
                              ios_base::iostate& __err, _Signed& __v) const;
 
     template <class _Unsigned>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
     iter_type __do_get_unsigned
                             (iter_type __b, iter_type __e, ios_base& __iob,
                              ios_base::iostate& __err, _Unsigned& __v) const;
@@ -751,7 +751,7 @@ locale::id
 num_get<_CharT, _InputIterator>::id;
 
 template <class _Tp>
-_LIBCPP_HIDDEN _Tp
+_LIBCUDACXX_HIDDEN _Tp
 __num_get_signed_integral(const char* __a, const char* __a_end,
                           ios_base::iostate& __err, int __base)
 {
@@ -760,7 +760,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
         typename remove_reference<decltype(errno)>::type __save_errno = errno;
         errno = 0;
         char *__p2;
-        long long __ll = strtoll_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
+        long long __ll = strtoll_l(__a, &__p2, __base, _LIBCUDACXX_GET_C_LOCALE);
         typename remove_reference<decltype(errno)>::type __current_errno = errno;
         if (__current_errno == 0)
             errno = __save_errno;
@@ -786,7 +786,7 @@ __num_get_signed_integral(const char* __a, const char* __a_end,
 }
 
 template <class _Tp>
-_LIBCPP_HIDDEN _Tp
+_LIBCUDACXX_HIDDEN _Tp
 __num_get_unsigned_integral(const char* __a, const char* __a_end,
                             ios_base::iostate& __err, int __base)
 {
@@ -800,7 +800,7 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
         typename remove_reference<decltype(errno)>::type __save_errno = errno;
         errno = 0;
         char *__p2;
-        unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCPP_GET_C_LOCALE);
+        unsigned long long __ll = strtoull_l(__a, &__p2, __base, _LIBCUDACXX_GET_C_LOCALE);
         typename remove_reference<decltype(errno)>::type __current_errno = errno;
         if (__current_errno == 0)
             errno = __save_errno;
@@ -823,29 +823,29 @@ __num_get_unsigned_integral(const char* __a, const char* __a_end,
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp __do_strtod(const char* __a, char** __p2);
 
 template <>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 float __do_strtod<float>(const char* __a, char** __p2) {
-    return strtof_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
+    return strtof_l(__a, __p2, _LIBCUDACXX_GET_C_LOCALE);
 }
 
 template <>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 double __do_strtod<double>(const char* __a, char** __p2) {
-    return strtod_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
+    return strtod_l(__a, __p2, _LIBCUDACXX_GET_C_LOCALE);
 }
 
 template <>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 long double __do_strtod<long double>(const char* __a, char** __p2) {
-    return strtold_l(__a, __p2, _LIBCPP_GET_C_LOCALE);
+    return strtold_l(__a, __p2, _LIBCUDACXX_GET_C_LOCALE);
 }
 
 template <class _Tp>
-_LIBCPP_HIDDEN
+_LIBCUDACXX_HIDDEN
 _Tp
 __num_get_float(const char* __a, const char* __a_end, ios_base::iostate& __err)
 {
@@ -901,7 +901,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
     const numpunct<_CharT>& __np = use_facet<numpunct<_CharT> >(__iob.getloc());
     typedef typename numpunct<_CharT>::string_type string_type;
     const string_type __names[2] = {__np.truename(), __np.falsename()};
-    const string_type* __i = _VSTD::__scan_keyword(__b, __e, __names, __names+2,
+    const string_type* __i = _CUDA_VSTD::__scan_keyword(__b, __e, __names, __names+2,
                                                    __ct, __err);
     __v = __i == __names;
     return __b;
@@ -922,7 +922,7 @@ num_get<_CharT, _InputIterator>::__do_get_signed(iter_type __b, iter_type __e,
     // Stage 2
     char_type __thousands_sep;
     const int __atoms_size = 26;
-#ifdef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
+#ifdef _LIBCUDACXX_ABI_OPTIMIZED_LOCALE_NUM_GET
     char_type __atoms1[__atoms_size];
     const char_type *__atoms = this->__do_widen(__iob, __atoms1);
     string __grouping = this->__stage2_int_prep(__iob, __thousands_sep);
@@ -979,7 +979,7 @@ num_get<_CharT, _InputIterator>::__do_get_unsigned(iter_type __b, iter_type __e,
     // Stage 2
     char_type __thousands_sep;
     const int __atoms_size = 26;
-#ifdef _LIBCPP_ABI_OPTIMIZED_LOCALE_NUM_GET
+#ifdef _LIBCUDACXX_ABI_OPTIMIZED_LOCALE_NUM_GET
     char_type __atoms1[__atoms_size];
     const char_type *__atoms = this->__do_widen(__iob, __atoms1);
     string __grouping = this->__stage2_int_prep(__iob, __thousands_sep);
@@ -1115,7 +1115,7 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
     }
     // Stage 3
     __buf.resize(__a_end - __a);
-    if (__libcpp_sscanf_l(__buf.c_str(), _LIBCPP_GET_C_LOCALE, "%p", &__v) != 1)
+    if (__LIBCUDACXX_sscanf_l(__buf.c_str(), _LIBCUDACXX_GET_C_LOCALE, "%p", &__v) != 1)
         __err = ios_base::failbit;
     // EOF checked
     if (__b == __e)
@@ -1123,12 +1123,12 @@ num_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
     return __b;
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_get<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS num_get<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS num_get<wchar_t>;
 #endif
 
-struct _LIBCPP_TYPE_VIS __num_put_base
+struct _LIBCUDACXX_TYPE_VIS __num_put_base
 {
 protected:
     static void __format_int(char* __fmt, const char* __len, bool __signd,
@@ -1222,13 +1222,13 @@ __num_put<_CharT>::__widen_and_group_float(char* __nb, char* __np, char* __ne,
         *__oe++ = __ct.widen(*__nf++);
         *__oe++ = __ct.widen(*__nf++);
         for (__ns = __nf; __ns < __ne; ++__ns)
-            if (!isxdigit_l(*__ns, _LIBCPP_GET_C_LOCALE))
+            if (!isxdigit_l(*__ns, _LIBCUDACXX_GET_C_LOCALE))
                 break;
     }
     else
     {
         for (__ns = __nf; __ns < __ne; ++__ns)
-            if (!isdigit_l(*__ns, _LIBCPP_GET_C_LOCALE))
+            if (!isdigit_l(*__ns, _LIBCUDACXX_GET_C_LOCALE))
                 break;
     }
     if (__grouping.empty())
@@ -1275,13 +1275,13 @@ __num_put<_CharT>::__widen_and_group_float(char* __nb, char* __np, char* __ne,
         __op = __ob + (__np - __nb);
 }
 
-extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template struct _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __num_put<wchar_t>;
+extern template struct _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS __num_put<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template struct _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS __num_put<wchar_t>;
 #endif
 
 template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS num_put
+class _LIBCUDACXX_TEMPLATE_VIS num_put
     : public locale::facet,
       private __num_put<_CharT>
 {
@@ -1289,60 +1289,60 @@ public:
     typedef _CharT char_type;
     typedef _OutputIterator iter_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit num_put(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                   bool __v) const
     {
         return do_put(__s, __iob, __fl, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                   long __v) const
     {
         return do_put(__s, __iob, __fl, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                   long long __v) const
     {
         return do_put(__s, __iob, __fl, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                   unsigned long __v) const
     {
         return do_put(__s, __iob, __fl, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                   unsigned long long __v) const
     {
         return do_put(__s, __iob, __fl, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                   double __v) const
     {
         return do_put(__s, __iob, __fl, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                   long double __v) const
     {
         return do_put(__s, __iob, __fl, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                   const void* __v) const
     {
@@ -1352,7 +1352,7 @@ public:
     static locale::id id;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~num_put() {}
 
     virtual iter_type do_put(iter_type __s, ios_base& __iob, char_type __fl,
@@ -1373,13 +1373,13 @@ protected:
                              const void* __v) const;
 
     template <class _Integral>
-    _LIBCPP_HIDE_FROM_ABI inline
+    _LIBCUDACXX_HIDE_FROM_ABI inline
     _OutputIterator __do_put_integral(iter_type __s, ios_base& __iob,
                                       char_type __fl, _Integral __v,
                                       char const* __len) const;
 
     template <class _Float>
-    _LIBCPP_HIDE_FROM_ABI inline
+    _LIBCUDACXX_HIDE_FROM_ABI inline
     _OutputIterator __do_put_floating_point(iter_type __s, ios_base& __iob,
                                             char_type __fl, _Float __v,
                                             char const* __len) const;
@@ -1390,7 +1390,7 @@ locale::id
 num_put<_CharT, _OutputIterator>::id;
 
 template <class _CharT, class _OutputIterator>
-_LIBCPP_HIDDEN
+_LIBCUDACXX_HIDDEN
 _OutputIterator
 __pad_and_output(_OutputIterator __s,
                  const _CharT* __ob, const _CharT* __op, const _CharT* __oe,
@@ -1413,7 +1413,7 @@ __pad_and_output(_OutputIterator __s,
 }
 
 template <class _CharT, class _Traits>
-_LIBCPP_HIDDEN
+_LIBCUDACXX_HIDDEN
 ostreambuf_iterator<_CharT, _Traits>
 __pad_and_output(ostreambuf_iterator<_CharT, _Traits> __s,
                  const _CharT* __ob, const _CharT* __op, const _CharT* __oe,
@@ -1467,9 +1467,9 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
         return do_put(__s, __iob, __fl, (unsigned long)__v);
     const numpunct<char_type>& __np = use_facet<numpunct<char_type> >(__iob.getloc());
     typedef typename numpunct<char_type>::string_type string_type;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
     string_type __tmp(__v ? __np.truename() : __np.falsename());
-    string_type __nm = _VSTD::move(__tmp);
+    string_type __nm = _CUDA_VSTD::move(__tmp);
 #else
     string_type __nm = __v ? __np.truename() : __np.falsename();
 #endif
@@ -1480,7 +1480,7 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
 
 template <class _CharT, class _OutputIterator>
 template <class _Integral>
-_LIBCPP_HIDE_FROM_ABI inline
+_LIBCUDACXX_HIDE_FROM_ABI inline
 _OutputIterator
 num_put<_CharT, _OutputIterator>::__do_put_integral(iter_type __s, ios_base& __iob,
                                                     char_type __fl, _Integral __v,
@@ -1492,16 +1492,16 @@ num_put<_CharT, _OutputIterator>::__do_put_integral(iter_type __s, ios_base& __i
     // Worst case is octal, with showbase enabled. Note that octal is always
     // printed as an unsigned value.
     using _Unsigned = typename make_unsigned<_Integral>::type;
-    _LIBCPP_CONSTEXPR const unsigned __nbuf
+    _LIBCUDACXX_CONSTEXPR const unsigned __nbuf
         = (numeric_limits<_Unsigned>::digits / 3)        // 1 char per 3 bits
         + ((numeric_limits<_Unsigned>::digits % 3) != 0) // round up
         + 2; // base prefix + terminating null character
     char __nar[__nbuf];
-    _LIBCPP_DIAGNOSTIC_PUSH
-    _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
-    _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
-    int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, __fmt, __v);
-    _LIBCPP_DIAGNOSTIC_POP
+    _LIBCUDACXX_DIAGNOSTIC_PUSH
+    _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
+    _LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
+    int __nc = __LIBCUDACXX_snprintf_l(__nar, sizeof(__nar), _LIBCUDACXX_GET_C_LOCALE, __fmt, __v);
+    _LIBCUDACXX_DIAGNOSTIC_POP
     char* __ne = __nar + __nc;
     char* __np = this->__identify_padding(__nar, __ne, __iob);
     // Stage 2 - Widen __nar while adding thousands separators
@@ -1548,7 +1548,7 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
 
 template <class _CharT, class _OutputIterator>
 template <class _Float>
-_LIBCPP_HIDE_FROM_ABI inline
+_LIBCUDACXX_HIDE_FROM_ABI inline
 _OutputIterator
 num_put<_CharT, _OutputIterator>::__do_put_floating_point(iter_type __s, ios_base& __iob,
                                                           char_type __fl, _Float __v,
@@ -1561,26 +1561,26 @@ num_put<_CharT, _OutputIterator>::__do_put_floating_point(iter_type __s, ios_bas
     char __nar[__nbuf];
     char* __nb = __nar;
     int __nc;
-    _LIBCPP_DIAGNOSTIC_PUSH
-    _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
-    _LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
+    _LIBCUDACXX_DIAGNOSTIC_PUSH
+    _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
+    _LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
     if (__specify_precision)
-        __nc = __libcpp_snprintf_l(__nb, __nbuf, _LIBCPP_GET_C_LOCALE, __fmt,
+        __nc = __LIBCUDACXX_snprintf_l(__nb, __nbuf, _LIBCUDACXX_GET_C_LOCALE, __fmt,
                                    (int)__iob.precision(), __v);
     else
-        __nc = __libcpp_snprintf_l(__nb, __nbuf, _LIBCPP_GET_C_LOCALE, __fmt, __v);
+        __nc = __LIBCUDACXX_snprintf_l(__nb, __nbuf, _LIBCUDACXX_GET_C_LOCALE, __fmt, __v);
     unique_ptr<char, void(*)(void*)> __nbh(nullptr, free);
     if (__nc > static_cast<int>(__nbuf-1))
     {
         if (__specify_precision)
-            __nc = __libcpp_asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, (int)__iob.precision(), __v);
+            __nc = __LIBCUDACXX_asprintf_l(&__nb, _LIBCUDACXX_GET_C_LOCALE, __fmt, (int)__iob.precision(), __v);
         else
-            __nc = __libcpp_asprintf_l(&__nb, _LIBCPP_GET_C_LOCALE, __fmt, __v);
+            __nc = __LIBCUDACXX_asprintf_l(&__nb, _LIBCUDACXX_GET_C_LOCALE, __fmt, __v);
         if (__nc == -1)
             __throw_bad_alloc();
         __nbh.reset(__nb);
     }
-    _LIBCPP_DIAGNOSTIC_POP
+    _LIBCUDACXX_DIAGNOSTIC_POP
     char* __ne = __nb + __nc;
     char* __np = this->__identify_padding(__nb, __ne, __iob);
     // Stage 2 - Widen __nar while adding thousands separators
@@ -1627,7 +1627,7 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
     // Stage 1 - Get pointer in narrow char
     const unsigned __nbuf = 20;
     char __nar[__nbuf];
-    int __nc = __libcpp_snprintf_l(__nar, sizeof(__nar), _LIBCPP_GET_C_LOCALE, "%p", __v);
+    int __nc = __LIBCUDACXX_snprintf_l(__nar, sizeof(__nar), _LIBCUDACXX_GET_C_LOCALE, "%p", __v);
     char* __ne = __nar + __nc;
     char* __np = this->__identify_padding(__nar, __ne, __iob);
     // Stage 2 - Widen __nar
@@ -1646,13 +1646,13 @@ num_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base& __iob,
     return __pad_and_output(__s, __o, __op, __oe, __iob, __fl);
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_put<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS num_put<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS num_put<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS num_put<wchar_t>;
 #endif
 
 template <class _CharT, class _InputIterator>
-_LIBCPP_HIDDEN
+_LIBCUDACXX_HIDDEN
 int
 __get_up_to_n_digits(_InputIterator& __b, _InputIterator __e,
                      ios_base::iostate& __err, const ctype<_CharT>& __ct, int __n)
@@ -1684,14 +1684,14 @@ __get_up_to_n_digits(_InputIterator& __b, _InputIterator __e,
     return __r;
 }
 
-class _LIBCPP_TYPE_VIS time_base
+class _LIBCUDACXX_TYPE_VIS time_base
 {
 public:
     enum dateorder {no_order, dmy, mdy, ymd, ydm};
 };
 
 template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS __time_get_c_storage
+class _LIBCUDACXX_TEMPLATE_VIS __time_get_c_storage
 {
 protected:
     typedef basic_string<_CharT> string_type;
@@ -1704,30 +1704,30 @@ protected:
     virtual const string_type& __x() const;
     virtual const string_type& __X() const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~__time_get_c_storage() {}
 };
 
-template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__weeks() const;
-template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__months() const;
-template <> _LIBCPP_FUNC_VIS const string* __time_get_c_storage<char>::__am_pm() const;
-template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__c() const;
-template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__r() const;
-template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__x() const;
-template <> _LIBCPP_FUNC_VIS const string& __time_get_c_storage<char>::__X() const;
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__weeks() const;
-template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__months() const;
-template <> _LIBCPP_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__am_pm() const;
-template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__c() const;
-template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__r() const;
-template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__x() const;
-template <> _LIBCPP_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__X() const;
+template <> _LIBCUDACXX_FUNC_VIS const string* __time_get_c_storage<char>::__weeks() const;
+template <> _LIBCUDACXX_FUNC_VIS const string* __time_get_c_storage<char>::__months() const;
+template <> _LIBCUDACXX_FUNC_VIS const string* __time_get_c_storage<char>::__am_pm() const;
+template <> _LIBCUDACXX_FUNC_VIS const string& __time_get_c_storage<char>::__c() const;
+template <> _LIBCUDACXX_FUNC_VIS const string& __time_get_c_storage<char>::__r() const;
+template <> _LIBCUDACXX_FUNC_VIS const string& __time_get_c_storage<char>::__x() const;
+template <> _LIBCUDACXX_FUNC_VIS const string& __time_get_c_storage<char>::__X() const;
+
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+template <> _LIBCUDACXX_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__weeks() const;
+template <> _LIBCUDACXX_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__months() const;
+template <> _LIBCUDACXX_FUNC_VIS const wstring* __time_get_c_storage<wchar_t>::__am_pm() const;
+template <> _LIBCUDACXX_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__c() const;
+template <> _LIBCUDACXX_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__r() const;
+template <> _LIBCUDACXX_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__x() const;
+template <> _LIBCUDACXX_FUNC_VIS const wstring& __time_get_c_storage<wchar_t>::__X() const;
 #endif
 
 template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS time_get
+class _LIBCUDACXX_TEMPLATE_VIS time_get
     : public locale::facet,
       public time_base,
       private __time_get_c_storage<_CharT>
@@ -1738,52 +1738,52 @@ public:
     typedef time_base::dateorder    dateorder;
     typedef basic_string<char_type> string_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit time_get(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     dateorder date_order() const
     {
         return this->do_date_order();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get_time(iter_type __b, iter_type __e, ios_base& __iob,
                        ios_base::iostate& __err, tm* __tm) const
     {
         return do_get_time(__b, __e, __iob, __err, __tm);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get_date(iter_type __b, iter_type __e, ios_base& __iob,
                        ios_base::iostate& __err, tm* __tm) const
     {
         return do_get_date(__b, __e, __iob, __err, __tm);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get_weekday(iter_type __b, iter_type __e, ios_base& __iob,
                           ios_base::iostate& __err, tm* __tm) const
     {
         return do_get_weekday(__b, __e, __iob, __err, __tm);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get_monthname(iter_type __b, iter_type __e, ios_base& __iob,
                             ios_base::iostate& __err, tm* __tm) const
     {
         return do_get_monthname(__b, __e, __iob, __err, __tm);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get_year(iter_type __b, iter_type __e, ios_base& __iob,
                        ios_base::iostate& __err, tm* __tm) const
     {
         return do_get_year(__b, __e, __iob, __err, __tm);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, ios_base& __iob,
                   ios_base::iostate& __err, tm *__tm,
                   char __fmt, char __mod = 0) const
@@ -1798,7 +1798,7 @@ public:
     static locale::id id;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~time_get() {}
 
     virtual dateorder do_date_order() const;
@@ -1890,7 +1890,7 @@ time_get<_CharT, _InputIterator>::__get_weekdayname(int& __w,
 {
     // Note:  ignoring case comes from the POSIX strptime spec
     const string_type* __wk = this->__weeks();
-    ptr
diff _t __i = _VSTD::__scan_keyword(__b, __e, __wk, __wk+14, __ct, __err, false) - __wk;
+    ptr
diff _t __i = _CUDA_VSTD::__scan_keyword(__b, __e, __wk, __wk+14, __ct, __err, false) - __wk;
     if (__i < 14)
         __w = __i % 7;
 }
@@ -1904,7 +1904,7 @@ time_get<_CharT, _InputIterator>::__get_monthname(int& __m,
 {
     // Note:  ignoring case comes from the POSIX strptime spec
     const string_type* __month = this->__months();
-    ptr
diff _t __i = _VSTD::__scan_keyword(__b, __e, __month, __month+24, __ct, __err, false) - __month;
+    ptr
diff _t __i = _CUDA_VSTD::__scan_keyword(__b, __e, __month, __month+24, __ct, __err, false) - __month;
     if (__i < 24)
         __m = __i % 12;
 }
@@ -1916,7 +1916,7 @@ time_get<_CharT, _InputIterator>::__get_day(int& __d,
                                             ios_base::iostate& __err,
                                             const ctype<char_type>& __ct) const
 {
-    int __t = _VSTD::__get_up_to_n_digits(__b, __e, __err, __ct, 2);
+    int __t = _CUDA_VSTD::__get_up_to_n_digits(__b, __e, __err, __ct, 2);
     if (!(__err & ios_base::failbit) && 1 <= __t && __t <= 31)
         __d = __t;
     else
@@ -2076,7 +2076,7 @@ time_get<_CharT, _InputIterator>::__get_am_pm(int& __h,
         __err |= ios_base::failbit;
         return;
     }
-    ptr
diff _t __i = _VSTD::__scan_keyword(__b, __e, __ap, __ap+2, __ct, __err, false) - __ap;
+    ptr
diff _t __i = _CUDA_VSTD::__scan_keyword(__b, __e, __ap, __ap+2, __ct, __err, false) - __ap;
     if (__i == 0 && __h == 12)
         __h = 0;
     else if (__i == 1 && __h < 12)
@@ -2336,12 +2336,12 @@ time_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
     return __b;
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS time_get<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS time_get<wchar_t>;
 #endif
 
-class _LIBCPP_TYPE_VIS __time_get
+class _LIBCUDACXX_TYPE_VIS __time_get
 {
 protected:
     locale_t __loc_;
@@ -2352,7 +2352,7 @@ protected:
 };
 
 template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS __time_get_storage
+class _LIBCUDACXX_TEMPLATE_VIS __time_get_storage
     : public __time_get
 {
 protected:
@@ -2369,7 +2369,7 @@ protected:
     explicit __time_get_storage(const char* __nm);
     explicit __time_get_storage(const string& __nm);
 
-    _LIBCPP_INLINE_VISIBILITY ~__time_get_storage() {}
+    _LIBCUDACXX_INLINE_VISIBILITY ~__time_get_storage() {}
 
     time_base::dateorder __do_date_order() const;
 
@@ -2378,25 +2378,25 @@ private:
     string_type __analyze(char __fmt, const ctype<_CharT>&);
 };
 
-#define _LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(_CharT) \
-template <> _LIBCPP_FUNC_VIS time_base::dateorder __time_get_storage<_CharT>::__do_date_order() const; \
-template <> _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const char*); \
-template <> _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const string&); \
-template <> _LIBCPP_FUNC_VIS void __time_get_storage<_CharT>::init(const ctype<_CharT>&); \
-template <> _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::string_type __time_get_storage<_CharT>::__analyze(char, const ctype<_CharT>&); \
-extern template _LIBCPP_FUNC_VIS time_base::dateorder __time_get_storage<_CharT>::__do_date_order() const; \
-extern template _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const char*); \
-extern template _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const string&); \
-extern template _LIBCPP_FUNC_VIS void __time_get_storage<_CharT>::init(const ctype<_CharT>&); \
-extern template _LIBCPP_FUNC_VIS __time_get_storage<_CharT>::string_type __time_get_storage<_CharT>::__analyze(char, const ctype<_CharT>&); \
+#define _LIBCUDACXX_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(_CharT) \
+template <> _LIBCUDACXX_FUNC_VIS time_base::dateorder __time_get_storage<_CharT>::__do_date_order() const; \
+template <> _LIBCUDACXX_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const char*); \
+template <> _LIBCUDACXX_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const string&); \
+template <> _LIBCUDACXX_FUNC_VIS void __time_get_storage<_CharT>::init(const ctype<_CharT>&); \
+template <> _LIBCUDACXX_FUNC_VIS __time_get_storage<_CharT>::string_type __time_get_storage<_CharT>::__analyze(char, const ctype<_CharT>&); \
+extern template _LIBCUDACXX_FUNC_VIS time_base::dateorder __time_get_storage<_CharT>::__do_date_order() const; \
+extern template _LIBCUDACXX_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const char*); \
+extern template _LIBCUDACXX_FUNC_VIS __time_get_storage<_CharT>::__time_get_storage(const string&); \
+extern template _LIBCUDACXX_FUNC_VIS void __time_get_storage<_CharT>::init(const ctype<_CharT>&); \
+extern template _LIBCUDACXX_FUNC_VIS __time_get_storage<_CharT>::string_type __time_get_storage<_CharT>::__analyze(char, const ctype<_CharT>&); \
 /**/
 
-_LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(char)
-_LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(wchar_t)
-#undef _LIBCPP_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION
+_LIBCUDACXX_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(char)
+_LIBCUDACXX_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION(wchar_t)
+#undef _LIBCUDACXX_TIME_GET_STORAGE_EXPLICIT_INSTANTIATION
 
 template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS time_get_byname
+class _LIBCUDACXX_TEMPLATE_VIS time_get_byname
     : public time_get<_CharT, _InputIterator>,
       private __time_get_storage<_CharT>
 {
@@ -2406,48 +2406,48 @@ public:
     typedef _CharT                  char_type;
     typedef basic_string<char_type> string_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit time_get_byname(const char* __nm, size_t __refs = 0)
         : time_get<_CharT, _InputIterator>(__refs),
           __time_get_storage<_CharT>(__nm) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit time_get_byname(const string& __nm, size_t __refs = 0)
         : time_get<_CharT, _InputIterator>(__refs),
           __time_get_storage<_CharT>(__nm) {}
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~time_get_byname() {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual dateorder do_date_order() const {return this->__do_date_order();}
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual const string_type* __weeks() const  {return this->__weeks_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual const string_type* __months() const {return this->__months_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual const string_type* __am_pm() const  {return this->__am_pm_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual const string_type& __c() const      {return this->__c_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual const string_type& __r() const      {return this->__r_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual const string_type& __x() const      {return this->__x_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual const string_type& __X() const      {return this->__X_;}
 };
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS time_get_byname<wchar_t>;
 #endif
 
-class _LIBCPP_TYPE_VIS __time_put
+class _LIBCUDACXX_TYPE_VIS __time_put
 {
     locale_t __loc_;
 protected:
-    _LIBCPP_INLINE_VISIBILITY __time_put() : __loc_(_LIBCPP_GET_C_LOCALE) {}
+    _LIBCUDACXX_INLINE_VISIBILITY __time_put() : __loc_(_LIBCUDACXX_GET_C_LOCALE) {}
     __time_put(const char* __nm);
     __time_put(const string& __nm);
     ~__time_put();
@@ -2458,7 +2458,7 @@ protected:
 };
 
 template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS time_put
+class _LIBCUDACXX_TEMPLATE_VIS time_put
     : public locale::facet,
       private __time_put
 {
@@ -2466,14 +2466,14 @@ public:
     typedef _CharT char_type;
     typedef _OutputIterator iter_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit time_put(size_t __refs = 0)
         : locale::facet(__refs) {}
 
     iter_type put(iter_type __s, ios_base& __iob, char_type __fl, const tm* __tm,
                   const char_type* __pb, const char_type* __pe) const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type put(iter_type __s, ios_base& __iob, char_type __fl,
                   const tm* __tm, char __fmt, char __mod = 0) const
     {
@@ -2483,16 +2483,16 @@ public:
     static locale::id id;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~time_put() {}
     virtual iter_type do_put(iter_type __s, ios_base&, char_type, const tm* __tm,
                              char __fmt, char __mod) const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit time_put(const char* __nm, size_t __refs)
         : locale::facet(__refs),
           __time_put(__nm) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit time_put(const string& __nm, size_t __refs)
         : locale::facet(__refs),
           __time_put(__nm) {}
@@ -2550,52 +2550,52 @@ time_put<_CharT, _OutputIterator>::do_put(iter_type __s, ios_base&,
     char_type* __nb = __nar;
     char_type* __ne = __nb + 100;
     __do_put(__nb, __ne, __tm, __fmt, __mod);
-    return _VSTD::copy(__nb, __ne, __s);
+    return _CUDA_VSTD::copy(__nb, __ne, __s);
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS time_put<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS time_put<wchar_t>;
 #endif
 
 template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS time_put_byname
+class _LIBCUDACXX_TEMPLATE_VIS time_put_byname
     : public time_put<_CharT, _OutputIterator>
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit time_put_byname(const char* __nm, size_t __refs = 0)
         : time_put<_CharT, _OutputIterator>(__nm, __refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit time_put_byname(const string& __nm, size_t __refs = 0)
         : time_put<_CharT, _OutputIterator>(__nm, __refs) {}
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~time_put_byname() {}
 };
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS time_put_byname<wchar_t>;
 #endif
 
 // money_base
 
-class _LIBCPP_TYPE_VIS money_base
+class _LIBCUDACXX_TYPE_VIS money_base
 {
 public:
     enum part {none, space, symbol, sign, value};
     struct pattern {char field[4];};
 
-    _LIBCPP_INLINE_VISIBILITY money_base() {}
+    _LIBCUDACXX_INLINE_VISIBILITY money_base() {}
 };
 
 // moneypunct
 
 template <class _CharT, bool _International = false>
-class _LIBCPP_TEMPLATE_VIS moneypunct
+class _LIBCUDACXX_TEMPLATE_VIS moneypunct
     : public locale::facet,
       public money_base
 {
@@ -2603,25 +2603,25 @@ public:
     typedef _CharT                  char_type;
     typedef basic_string<char_type> string_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit moneypunct(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY char_type   decimal_point() const {return do_decimal_point();}
-    _LIBCPP_INLINE_VISIBILITY char_type   thousands_sep() const {return do_thousands_sep();}
-    _LIBCPP_INLINE_VISIBILITY string      grouping()      const {return do_grouping();}
-    _LIBCPP_INLINE_VISIBILITY string_type curr_symbol()   const {return do_curr_symbol();}
-    _LIBCPP_INLINE_VISIBILITY string_type positive_sign() const {return do_positive_sign();}
-    _LIBCPP_INLINE_VISIBILITY string_type negative_sign() const {return do_negative_sign();}
-    _LIBCPP_INLINE_VISIBILITY int         frac_digits()   const {return do_frac_digits();}
-    _LIBCPP_INLINE_VISIBILITY pattern     pos_format()    const {return do_pos_format();}
-    _LIBCPP_INLINE_VISIBILITY pattern     neg_format()    const {return do_neg_format();}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type   decimal_point() const {return do_decimal_point();}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type   thousands_sep() const {return do_thousands_sep();}
+    _LIBCUDACXX_INLINE_VISIBILITY string      grouping()      const {return do_grouping();}
+    _LIBCUDACXX_INLINE_VISIBILITY string_type curr_symbol()   const {return do_curr_symbol();}
+    _LIBCUDACXX_INLINE_VISIBILITY string_type positive_sign() const {return do_positive_sign();}
+    _LIBCUDACXX_INLINE_VISIBILITY string_type negative_sign() const {return do_negative_sign();}
+    _LIBCUDACXX_INLINE_VISIBILITY int         frac_digits()   const {return do_frac_digits();}
+    _LIBCUDACXX_INLINE_VISIBILITY pattern     pos_format()    const {return do_pos_format();}
+    _LIBCUDACXX_INLINE_VISIBILITY pattern     neg_format()    const {return do_neg_format();}
 
     static locale::id id;
     static const bool intl = _International;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~moneypunct() {}
 
     virtual char_type   do_decimal_point() const {return numeric_limits<char_type>::max();}
@@ -2645,17 +2645,17 @@ template <class _CharT, bool _International>
 const bool
 moneypunct<_CharT, _International>::intl;
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, false>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, true>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, false>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, true>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, false>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS moneypunct<char, true>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, false>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS moneypunct<wchar_t, true>;
 #endif
 
 // moneypunct_byname
 
 template <class _CharT, bool _International = false>
-class _LIBCPP_TEMPLATE_VIS moneypunct_byname
+class _LIBCUDACXX_TEMPLATE_VIS moneypunct_byname
     : public moneypunct<_CharT, _International>
 {
 public:
@@ -2663,16 +2663,16 @@ public:
     typedef _CharT                  char_type;
     typedef basic_string<char_type> string_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit moneypunct_byname(const char* __nm, size_t __refs = 0)
         : moneypunct<_CharT, _International>(__refs) {init(__nm);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit moneypunct_byname(const string& __nm, size_t __refs = 0)
         : moneypunct<_CharT, _International>(__refs) {init(__nm.c_str());}
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~moneypunct_byname() {}
 
     virtual char_type   do_decimal_point() const {return __decimal_point_;}
@@ -2699,16 +2699,16 @@ private:
     void init(const char*);
 };
 
-template<> _LIBCPP_FUNC_VIS void moneypunct_byname<char, false>::init(const char*);
-template<> _LIBCPP_FUNC_VIS void moneypunct_byname<char, true>::init(const char*);
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, false>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, true>;
+template<> _LIBCUDACXX_FUNC_VIS void moneypunct_byname<char, false>::init(const char*);
+template<> _LIBCUDACXX_FUNC_VIS void moneypunct_byname<char, true>::init(const char*);
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, false>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<char, true>;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template<> _LIBCPP_FUNC_VIS void moneypunct_byname<wchar_t, false>::init(const char*);
-template<> _LIBCPP_FUNC_VIS void moneypunct_byname<wchar_t, true>::init(const char*);
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, false>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, true>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+template<> _LIBCUDACXX_FUNC_VIS void moneypunct_byname<wchar_t, false>::init(const char*);
+template<> _LIBCUDACXX_FUNC_VIS void moneypunct_byname<wchar_t, true>::init(const char*);
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, false>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS moneypunct_byname<wchar_t, true>;
 #endif
 
 // money_get
@@ -2720,7 +2720,7 @@ protected:
     typedef _CharT                  char_type;
     typedef basic_string<char_type> string_type;
 
-    _LIBCPP_INLINE_VISIBILITY __money_get() {}
+    _LIBCUDACXX_INLINE_VISIBILITY __money_get() {}
 
     static void __gather_info(bool __intl, const locale& __loc,
                               money_base::pattern& __pat, char_type& __dp,
@@ -2765,13 +2765,13 @@ __money_get<_CharT>::__gather_info(bool __intl, const locale& __loc,
     }
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_get<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS __money_get<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS __money_get<wchar_t>;
 #endif
 
 template <class _CharT, class _InputIterator = istreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS money_get
+class _LIBCUDACXX_TEMPLATE_VIS money_get
     : public locale::facet,
       private __money_get<_CharT>
 {
@@ -2780,18 +2780,18 @@ public:
     typedef _InputIterator          iter_type;
     typedef basic_string<char_type> string_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit money_get(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, bool __intl, ios_base& __iob,
                   ios_base::iostate& __err, long double& __v) const
     {
         return do_get(__b, __e, __intl, __iob, __err, __v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type get(iter_type __b, iter_type __e, bool __intl, ios_base& __iob,
                   ios_base::iostate& __err, string_type& __v) const
     {
@@ -2802,7 +2802,7 @@ public:
 
 protected:
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~money_get() {}
 
     virtual iter_type do_get(iter_type __b, iter_type __e, bool __intl,
@@ -2825,10 +2825,10 @@ template <class _CharT, class _InputIterator>
 locale::id
 money_get<_CharT, _InputIterator>::id;
 
-_LIBCPP_FUNC_VIS void __do_nothing(void*);
+_LIBCUDACXX_FUNC_VIS void __do_nothing(void*);
 
 template <class _Tp>
-_LIBCPP_HIDDEN
+_LIBCUDACXX_HIDDEN
 void
 __double_or_nothing(unique_ptr<_Tp, void(*)(void*)>& __b, _Tp*& __n, _Tp*& __e)
 {
@@ -2901,7 +2901,7 @@ money_get<_CharT, _InputIterator>::__do_get(iter_type& __b, iter_type __e,
                     return false;
                 }
             }
-            _LIBCPP_FALLTHROUGH();
+            _LIBCUDACXX_FALLTHROUGH();
         case money_base::none:
             if (__p != 3)
             {
@@ -3091,7 +3091,7 @@ money_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
         if (__neg)
             *__nc++ = '-';
         for (const char_type* __w = __wb.get(); __w < __wn; ++__w, ++__nc)
-            *__nc = __src[find(__atoms, _VSTD::end(__atoms), *__w) - __atoms];
+            *__nc = __src[find(__atoms, _CUDA_VSTD::end(__atoms), *__w) - __atoms];
         *__nc = char();
         if (sscanf(__nbuf, "%Lf", &__v) != 1)
             __throw_runtime_error("money_get error");
@@ -3134,9 +3134,9 @@ money_get<_CharT, _InputIterator>::do_get(iter_type __b, iter_type __e,
     return __b;
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_get<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_get<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS money_get<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS money_get<wchar_t>;
 #endif
 
 // money_put
@@ -3148,7 +3148,7 @@ protected:
     typedef _CharT                  char_type;
     typedef basic_string<char_type> string_type;
 
-    _LIBCPP_INLINE_VISIBILITY __money_put() {}
+    _LIBCUDACXX_INLINE_VISIBILITY __money_put() {}
 
     static void __gather_info(bool __intl, bool __neg, const locale& __loc,
                               money_base::pattern& __pat, char_type& __dp,
@@ -3244,7 +3244,7 @@ __money_put<_CharT>::__format(char_type* __mb, char_type*& __mi, char_type*& __m
             break;
         case money_base::symbol:
             if (!__sym.empty() && (__flags & ios_base::showbase))
-                __me = _VSTD::copy(__sym.begin(), __sym.end(), __me);
+                __me = _CUDA_VSTD::copy(__sym.begin(), __sym.end(), __me);
             break;
         case money_base::value:
             {
@@ -3303,7 +3303,7 @@ __money_put<_CharT>::__format(char_type* __mb, char_type*& __mi, char_type*& __m
     }
     // print rest of sign, if any
     if (__sn.size() > 1)
-        __me = _VSTD::copy(__sn.begin()+1, __sn.end(), __me);
+        __me = _CUDA_VSTD::copy(__sn.begin()+1, __sn.end(), __me);
     // set alignment
     if ((__flags & ios_base::adjustfield) == ios_base::left)
         __mi = __me;
@@ -3311,13 +3311,13 @@ __money_put<_CharT>::__format(char_type* __mb, char_type*& __mi, char_type*& __m
         __mi = __mb;
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS __money_put<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS __money_put<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS __money_put<wchar_t>;
 #endif
 
 template <class _CharT, class _OutputIterator = ostreambuf_iterator<_CharT> >
-class _LIBCPP_TEMPLATE_VIS money_put
+class _LIBCUDACXX_TEMPLATE_VIS money_put
     : public locale::facet,
       private __money_put<_CharT>
 {
@@ -3326,18 +3326,18 @@ public:
     typedef _OutputIterator         iter_type;
     typedef basic_string<char_type> string_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit money_put(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type put(iter_type __s, bool __intl, ios_base& __iob, char_type __fl,
                   long double __units) const
     {
         return do_put(__s, __intl, __iob, __fl, __units);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iter_type put(iter_type __s, bool __intl, ios_base& __iob, char_type __fl,
                   const string_type& __digits) const
     {
@@ -3347,7 +3347,7 @@ public:
     static locale::id id;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~money_put() {}
 
     virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __iob,
@@ -3378,7 +3378,7 @@ money_put<_CharT, _OutputIterator>::do_put(iter_type __s, bool __intl,
     // secure memory for digit storage
     if (static_cast<size_t>(__n) > __bs-1)
     {
-        __n = __libcpp_asprintf_l(&__bb, _LIBCPP_GET_C_LOCALE, "%.0Lf", __units);
+        __n = __LIBCUDACXX_asprintf_l(&__bb, _LIBCUDACXX_GET_C_LOCALE, "%.0Lf", __units);
         if (__n == -1)
             __throw_bad_alloc();
         __hn.reset(__bb);
@@ -3466,23 +3466,23 @@ money_put<_CharT, _OutputIterator>::do_put(iter_type __s, bool __intl,
     return __pad_and_output(__s, __mb, __mi, __me, __iob, __fl);
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_put<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS money_put<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS money_put<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS money_put<wchar_t>;
 #endif
 
 // messages
 
-class _LIBCPP_TYPE_VIS messages_base
+class _LIBCUDACXX_TYPE_VIS messages_base
 {
 public:
     typedef ptr
diff _t catalog;
 
-    _LIBCPP_INLINE_VISIBILITY messages_base() {}
+    _LIBCUDACXX_INLINE_VISIBILITY messages_base() {}
 };
 
 template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS messages
+class _LIBCUDACXX_TEMPLATE_VIS messages
     : public locale::facet,
       public messages_base
 {
@@ -3490,24 +3490,24 @@ public:
     typedef _CharT               char_type;
     typedef basic_string<_CharT> string_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit messages(size_t __refs = 0)
         : locale::facet(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     catalog open(const basic_string<char>& __nm, const locale& __loc) const
     {
         return do_open(__nm, __loc);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     string_type get(catalog __c, int __set, int __msgid,
                     const string_type& __dflt) const
     {
         return do_get(__c, __set, __msgid, __dflt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void close(catalog __c) const
     {
         do_close(__c);
@@ -3516,7 +3516,7 @@ public:
     static locale::id id;
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~messages() {}
 
     virtual catalog do_open(const basic_string<char>&, const locale&) const;
@@ -3533,15 +3533,15 @@ template <class _CharT>
 typename messages<_CharT>::catalog
 messages<_CharT>::do_open(const basic_string<char>& __nm, const locale&) const
 {
-#ifdef _LIBCPP_HAS_CATOPEN
+#ifdef _LIBCUDACXX_HAS_CATOPEN
     catalog __cat = (catalog)catopen(__nm.c_str(), NL_CAT_LOCALE);
     if (__cat != -1)
         __cat = static_cast<catalog>((static_cast<size_t>(__cat) >> 1));
     return __cat;
-#else // !_LIBCPP_HAS_CATOPEN
+#else // !_LIBCUDACXX_HAS_CATOPEN
     (void)__nm;
     return -1;
-#endif // _LIBCPP_HAS_CATOPEN
+#endif // _LIBCUDACXX_HAS_CATOPEN
 }
 
 template <class _CharT>
@@ -3549,7 +3549,7 @@ typename messages<_CharT>::string_type
 messages<_CharT>::do_get(catalog __c, int __set, int __msgid,
                          const string_type& __dflt) const
 {
-#ifdef _LIBCPP_HAS_CATOPEN
+#ifdef _LIBCUDACXX_HAS_CATOPEN
     string __ndflt;
     __narrow_to_utf8<sizeof(char_type)*__CHAR_BIT__>()(back_inserter(__ndflt),
                                                        __dflt.c_str(),
@@ -3560,65 +3560,65 @@ messages<_CharT>::do_get(catalog __c, int __set, int __msgid,
     char* __n = catgets(__cat, __set, __msgid, __ndflt.c_str());
     string_type __w;
     __widen_from_utf8<sizeof(char_type)*__CHAR_BIT__>()(back_inserter(__w),
-                                                        __n, __n + _VSTD::strlen(__n));
+                                                        __n, __n + _CUDA_VSTD::strlen(__n));
     return __w;
-#else // !_LIBCPP_HAS_CATOPEN
+#else // !_LIBCUDACXX_HAS_CATOPEN
     (void)__c;
     (void)__set;
     (void)__msgid;
     return __dflt;
-#endif // _LIBCPP_HAS_CATOPEN
+#endif // _LIBCUDACXX_HAS_CATOPEN
 }
 
 template <class _CharT>
 void
 messages<_CharT>::do_close(catalog __c) const
 {
-#ifdef _LIBCPP_HAS_CATOPEN
+#ifdef _LIBCUDACXX_HAS_CATOPEN
     if (__c != -1)
         __c <<= 1;
     nl_catd __cat = (nl_catd)__c;
     catclose(__cat);
-#else // !_LIBCPP_HAS_CATOPEN
+#else // !_LIBCUDACXX_HAS_CATOPEN
     (void)__c;
-#endif // _LIBCPP_HAS_CATOPEN
+#endif // _LIBCUDACXX_HAS_CATOPEN
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS messages<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS messages<wchar_t>;
 #endif
 
 template <class _CharT>
-class _LIBCPP_TEMPLATE_VIS messages_byname
+class _LIBCUDACXX_TEMPLATE_VIS messages_byname
     : public messages<_CharT>
 {
 public:
     typedef messages_base::catalog catalog;
     typedef basic_string<_CharT> string_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit messages_byname(const char*, size_t __refs = 0)
         : messages<_CharT>(__refs) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit messages_byname(const string&, size_t __refs = 0)
         : messages<_CharT>(__refs) {}
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~messages_byname() {}
 };
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS messages_byname<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS messages_byname<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS messages_byname<wchar_t>;
 #endif
 
 template<class _Codecvt, class _Elem = wchar_t,
          class _Wide_alloc = allocator<_Elem>,
          class _Byte_alloc = allocator<char> >
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wstring_convert
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 wstring_convert
 {
 public:
     typedef basic_string<char, char_traits<char>, _Byte_alloc>   byte_string;
@@ -3636,56 +3636,56 @@ private:
     wstring_convert(const wstring_convert& __wc);
     wstring_convert& operator=(const wstring_convert& __wc);
 public:
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     wstring_convert() : wstring_convert(new _Codecvt) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit wstring_convert(_Codecvt* __pcvt);
 #else
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_EXPLICIT_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_EXPLICIT_AFTER_CXX11
     wstring_convert(_Codecvt* __pcvt = new _Codecvt);
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     wstring_convert(_Codecvt* __pcvt, state_type __state);
-    _LIBCPP_EXPLICIT_AFTER_CXX11 wstring_convert(const byte_string& __byte_err,
+    _LIBCUDACXX_EXPLICIT_AFTER_CXX11 wstring_convert(const byte_string& __byte_err,
                     const wide_string& __wide_err = wide_string());
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     wstring_convert(wstring_convert&& __wc);
 #endif
     ~wstring_convert();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     wide_string from_bytes(char __byte)
         {return from_bytes(&__byte, &__byte+1);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     wide_string from_bytes(const char* __ptr)
         {return from_bytes(__ptr, __ptr + char_traits<char>::length(__ptr));}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     wide_string from_bytes(const byte_string& __str)
         {return from_bytes(__str.data(), __str.data() + __str.size());}
     wide_string from_bytes(const char* __first, const char* __last);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     byte_string to_bytes(_Elem __wchar)
         {return to_bytes(&__wchar, &__wchar+1);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     byte_string to_bytes(const _Elem* __wptr)
         {return to_bytes(__wptr, __wptr + char_traits<_Elem>::length(__wptr));}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     byte_string to_bytes(const wide_string& __wstr)
         {return to_bytes(__wstr.data(), __wstr.data() + __wstr.size());}
     byte_string to_bytes(const _Elem* __first, const _Elem* __last);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t converted() const _NOEXCEPT {return __cvtcount_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     state_type state() const {return __cvtstate_;}
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc>
 inline
 wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
@@ -3693,7 +3693,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
         : __cvtptr_(__pcvt), __cvtstate_(), __cvtcount_(0)
 {
 }
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc>
 inline
@@ -3712,23 +3712,23 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
     __cvtptr_ = new _Codecvt;
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc>
 inline
 wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
     wstring_convert(wstring_convert&& __wc)
-        : __byte_err_string_(_VSTD::move(__wc.__byte_err_string_)),
-          __wide_err_string_(_VSTD::move(__wc.__wide_err_string_)),
+        : __byte_err_string_(_CUDA_VSTD::move(__wc.__byte_err_string_)),
+          __wide_err_string_(_CUDA_VSTD::move(__wc.__wide_err_string_)),
           __cvtptr_(__wc.__cvtptr_),
           __cvtstate_(__wc.__cvtstate_), __cvtcount_(__wc.__cvtcount_)
 {
     __wc.__cvtptr_ = nullptr;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template<class _Codecvt, class _Elem, class _Wide_alloc, class _Byte_alloc>
 wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::~wstring_convert()
 {
@@ -3740,7 +3740,7 @@ typename wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::wide_string
 wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
     from_bytes(const char* __frm, const char* __frm_end)
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
     __cvtcount_ = 0;
     if (__cvtptr_ != nullptr)
     {
@@ -3887,7 +3887,7 @@ wstring_convert<_Codecvt, _Elem, _Wide_alloc, _Byte_alloc>::
 }
 
 template <class _Codecvt, class _Elem = wchar_t, class _Tr = char_traits<_Elem> >
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 wbuffer_convert
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_DEPRECATED_IN_CXX17 wbuffer_convert
     : public basic_streambuf<_Elem, _Tr>
 {
 public:
@@ -3919,13 +3919,13 @@ private:
     wbuffer_convert& operator=(const wbuffer_convert&);
 
 public:
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     wbuffer_convert() : wbuffer_convert(nullptr) {}
     explicit wbuffer_convert(streambuf* __bytebuf,
                              _Codecvt* __pcvt = new _Codecvt,
                              state_type __state = state_type());
 #else
-    _LIBCPP_EXPLICIT_AFTER_CXX11
+    _LIBCUDACXX_EXPLICIT_AFTER_CXX11
     wbuffer_convert(streambuf* __bytebuf = nullptr,
                     _Codecvt* __pcvt = new _Codecvt,
                     state_type __state = state_type());
@@ -3933,9 +3933,9 @@ public:
 
     ~wbuffer_convert();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     streambuf* rdbuf() const {return __bufptr_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     streambuf* rdbuf(streambuf* __bytebuf)
     {
         streambuf* __r = __bufptr_;
@@ -3943,7 +3943,7 @@ public:
         return __r;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     state_type state() const {return __st_;}
 
 protected:
@@ -3964,7 +3964,7 @@ private:
     wbuffer_convert* __close();
 };
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Codecvt, class _Elem, class _Tr>
 wbuffer_convert<_Codecvt, _Elem, _Tr>::
     wbuffer_convert(streambuf* __bytebuf, _Codecvt* __pcvt, state_type __state)
@@ -4000,7 +4000,7 @@ template <class _Codecvt, class _Elem, class _Tr>
 typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type
 wbuffer_convert<_Codecvt, _Elem, _Tr>::underflow()
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
     if (__cv_ == 0 || __bufptr_ == 0)
         return traits_type::eof();
     bool __initial = __read_mode();
@@ -4011,7 +4011,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     int_type __c = traits_type::eof();
     if (this->gptr() == this->egptr())
     {
-        _VSTD::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type));
+        _CUDA_VSTD::memmove(this->eback(), this->egptr() - __unget_sz, __unget_sz * sizeof(char_type));
         if (__always_noconv_)
         {
             streamsize __nmemb = static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz);
@@ -4026,12 +4026,12 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
         }
         else
         {
-             _LIBCPP_ASSERT(!(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" );
+             _LIBCUDACXX_ASSERT(!(__extbufnext_ == NULL && (__extbufend_ != __extbufnext_)), "underflow moving from NULL" );
              if (__extbufend_ != __extbufnext_)
-                _VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_);
+                _CUDA_VSTD::memmove(__extbuf_, __extbufnext_, __extbufend_ - __extbufnext_);
             __extbufnext_ = __extbuf_ + (__extbufend_ - __extbufnext_);
             __extbufend_ = __extbuf_ + (__extbuf_ == __extbuf_min_ ? sizeof(__extbuf_min_) : __ebs_);
-            streamsize __nmemb = _VSTD::min(static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz),
+            streamsize __nmemb = _CUDA_VSTD::min(static_cast<streamsize>(this->egptr() - this->eback() - __unget_sz),
                                  static_cast<streamsize>(__extbufend_ - __extbufnext_));
             codecvt_base::result __r;
             // FIXME: Do we ever need to restore the state here?
@@ -4065,12 +4065,12 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     return __c;
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Codecvt, class _Elem, class _Tr>
 typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type
 wbuffer_convert<_Codecvt, _Elem, _Tr>::pbackfail(int_type __c)
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
     if (__cv_ != 0 && __bufptr_ != 0 && this->eback() < this->gptr())
     {
         if (traits_type::eq_int_type(__c, traits_type::eof()))
@@ -4088,12 +4088,12 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     return traits_type::eof();
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Codecvt, class _Elem, class _Tr>
 typename wbuffer_convert<_Codecvt, _Elem, _Tr>::int_type
 wbuffer_convert<_Codecvt, _Elem, _Tr>::overflow(int_type __c)
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
     if (__cv_ == 0 || __bufptr_ == 0)
         return traits_type::eof();
     __write_mode();
@@ -4152,12 +4152,12 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     return traits_type::not_eof(__c);
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Codecvt, class _Elem, class _Tr>
 basic_streambuf<_Elem, _Tr>*
 wbuffer_convert<_Codecvt, _Elem, _Tr>::setbuf(char_type* __s, streamsize __n)
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
     this->setg(0, 0, 0);
     this->setp(0, 0);
     if (__owns_eb_)
@@ -4207,7 +4207,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     return this;
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Codecvt, class _Elem, class _Tr>
 typename wbuffer_convert<_Codecvt, _Elem, _Tr>::pos_type
 wbuffer_convert<_Codecvt, _Elem, _Tr>::seekoff(off_type __off, ios_base::seekdir __way,
@@ -4239,7 +4239,7 @@ template <class _Codecvt, class _Elem, class _Tr>
 int
 wbuffer_convert<_Codecvt, _Elem, _Tr>::sync()
 {
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
     if (__cv_ == 0 || __bufptr_ == 0)
         return 0;
     if (__cm_ & ios_base::out)
@@ -4308,7 +4308,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
     return 0;
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 template <class _Codecvt, class _Elem, class _Tr>
 bool
 wbuffer_convert<_Codecvt, _Elem, _Tr>::__read_mode()
@@ -4363,10 +4363,10 @@ wbuffer_convert<_Codecvt, _Elem, _Tr>::__close()
     return __rt;
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_LOCALE
+#endif // _LIBCUDACXX_LOCALE

diff  --git a/libcxx/include/locale.h b/libcxx/include/locale.h
index 17c0a705a009..e53549a5f9fa 100644
--- a/libcxx/include/locale.h
+++ b/libcxx/include/locale.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_LOCALE_H
-#define _LIBCPP_LOCALE_H
+#ifndef _LIBCUDACXX_LOCALE_H
+#define _LIBCUDACXX_LOCALE_H
 
 /*
     locale.h synopsis
@@ -35,14 +35,14 @@
 
 #include <__config>
 
-#if defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   error "<locale.h> is not supported since libc++ has been configured without support for localization."
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 #include_next <locale.h>
 
-#endif // _LIBCPP_LOCALE_H
+#endif // _LIBCUDACXX_LOCALE_H

diff  --git a/libcxx/include/map b/libcxx/include/map
index e1d5fa8a25d8..9cf644901060 100644
--- a/libcxx/include/map
+++ b/libcxx/include/map
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_MAP
-#define _LIBCPP_MAP
+#ifndef _LIBCUDACXX_MAP
+#define _LIBCUDACXX_MAP
 
 /*
 
@@ -546,7 +546,7 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);  // C++20
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <functional>
 #  include <iterator>
 #  include <utility>
@@ -565,52 +565,52 @@ erase_if(multimap<Key, T, Compare, Allocator>& c, Predicate pred);  // C++20
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Key, class _CP, class _Compare,
-          bool = is_empty<_Compare>::value && !__libcpp_is_final<_Compare>::value>
+          bool = is_empty<_Compare>::value && !__LIBCUDACXX_is_final<_Compare>::value>
 class __map_value_compare
     : private _Compare
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_value_compare()
         _NOEXCEPT_(is_nothrow_default_constructible<_Compare>::value)
         : _Compare() {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_value_compare(_Compare __c)
         _NOEXCEPT_(is_nothrow_copy_constructible<_Compare>::value)
         : _Compare(__c) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Compare& key_comp() const _NOEXCEPT {return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _CP& __x, const _CP& __y) const
         {return static_cast<const _Compare&>(*this)(__x.__get_value().first, __y.__get_value().first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _CP& __x, const _Key& __y) const
         {return static_cast<const _Compare&>(*this)(__x.__get_value().first, __y);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Key& __x, const _CP& __y) const
         {return static_cast<const _Compare&>(*this)(__x, __y.__get_value().first);}
     void swap(__map_value_compare& __y)
         _NOEXCEPT_(__is_nothrow_swappable<_Compare>::value)
     {
-      using _VSTD::swap;
+      using _CUDA_VSTD::swap;
       swap(static_cast<_Compare&>(*this), static_cast<_Compare&>(__y));
     }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _K2& __x, const _CP& __y) const
         {return static_cast<const _Compare&>(*this)(__x, __y.__get_value().first);}
 
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _CP& __x, const _K2& __y) const
         {return static_cast<const _Compare&>(*this)(__x.__get_value().first, __y);}
 #endif
@@ -622,48 +622,48 @@ class __map_value_compare<_Key, _CP, _Compare, false>
     _Compare comp;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_value_compare()
         _NOEXCEPT_(is_nothrow_default_constructible<_Compare>::value)
         : comp() {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_value_compare(_Compare __c)
         _NOEXCEPT_(is_nothrow_copy_constructible<_Compare>::value)
         : comp(__c) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Compare& key_comp() const _NOEXCEPT {return comp;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _CP& __x, const _CP& __y) const
         {return comp(__x.__get_value().first, __y.__get_value().first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _CP& __x, const _Key& __y) const
         {return comp(__x.__get_value().first, __y);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Key& __x, const _CP& __y) const
         {return comp(__x, __y.__get_value().first);}
     void swap(__map_value_compare& __y)
         _NOEXCEPT_(__is_nothrow_swappable<_Compare>::value)
     {
-        using _VSTD::swap;
+        using _CUDA_VSTD::swap;
         swap(comp, __y.comp);
     }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _K2& __x, const _CP& __y) const
         {return comp(__x, __y.__get_value().first);}
 
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _CP& __x, const _K2& __y) const
         {return comp(__x.__get_value().first, __y);}
 #endif
 };
 
 template <class _Key, class _CP, class _Compare, bool __b>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(__map_value_compare<_Key, _CP, _Compare, __b>& __x,
      __map_value_compare<_Key, _CP, _Compare, __b>& __y)
@@ -690,15 +690,15 @@ public:
     bool __first_constructed;
     bool __second_constructed;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __map_node_destructor(allocator_type& __na) _NOEXCEPT
         : __na_(__na),
           __first_constructed(false),
           __second_constructed(false)
         {}
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_node_destructor(__tree_node_destructor<allocator_type>&& __x) _NOEXCEPT
         : __na_(__x.__na_),
           __first_constructed(__x.__value_constructed),
@@ -706,15 +706,15 @@ public:
         {
             __x.__value_constructed = false;
         }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator()(pointer __p) _NOEXCEPT
     {
         if (__second_constructed)
-            __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.__get_value().second));
+            __alloc_traits::destroy(__na_, _CUDA_VSTD::addressof(__p->__value_.__get_value().second));
         if (__first_constructed)
-            __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.__get_value().first));
+            __alloc_traits::destroy(__na_, _CUDA_VSTD::addressof(__p->__value_.__get_value().first));
         if (__p)
             __alloc_traits::deallocate(__na_, __p, 1);
     }
@@ -726,10 +726,10 @@ template <class _Key, class _Tp, class _Compare, class _Allocator>
     class multimap;
 template <class _TreeIterator> class __map_const_iterator;
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Tp>
-struct _LIBCPP_STANDALONE_DEBUG __value_type
+struct _LIBCUDACXX_STANDALONE_DEBUG __value_type
 {
     typedef _Key                                     key_type;
     typedef _Tp                                      mapped_type;
@@ -741,50 +741,50 @@ private:
     value_type __cc;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_type& __get_value()
     {
-#if _LIBCPP_STD_VER > 14
-        return *_VSTD::launder(_VSTD::addressof(__cc));
+#if _LIBCUDACXX_STD_VER > 14
+        return *_CUDA_VSTD::launder(_CUDA_VSTD::addressof(__cc));
 #else
         return __cc;
 #endif
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const value_type& __get_value() const
     {
-#if _LIBCPP_STD_VER > 14
-        return *_VSTD::launder(_VSTD::addressof(__cc));
+#if _LIBCUDACXX_STD_VER > 14
+        return *_CUDA_VSTD::launder(_CUDA_VSTD::addressof(__cc));
 #else
         return __cc;
 #endif
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __nc_ref_pair_type __ref()
     {
         value_type& __v = __get_value();
         return __nc_ref_pair_type(const_cast<key_type&>(__v.first), __v.second);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __nc_rref_pair_type __move()
     {
         value_type& __v = __get_value();
         return __nc_rref_pair_type(
-            _VSTD::move(const_cast<key_type&>(__v.first)),
-            _VSTD::move(__v.second));
+            _CUDA_VSTD::move(const_cast<key_type&>(__v.first)),
+            _CUDA_VSTD::move(__v.second));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __value_type& operator=(const __value_type& __v)
     {
         __ref() = __v.__get_value();
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __value_type& operator=(__value_type&& __v)
     {
         __ref() = __v.__move();
@@ -794,10 +794,10 @@ public:
     template <class _ValueTp,
               class = __enable_if_t<__is_same_uncvref<_ValueTp, value_type>::value>
              >
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __value_type& operator=(_ValueTp&& __v)
     {
-        __ref() = _VSTD::forward<_ValueTp>(__v);
+        __ref() = _CUDA_VSTD::forward<_ValueTp>(__v);
         return *this;
     }
 
@@ -821,9 +821,9 @@ private:
     value_type __cc;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_type& __get_value() { return __cc; }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const value_type& __get_value() const { return __cc; }
 
 private:
@@ -833,7 +833,7 @@ private:
    ~__value_type();
 };
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp>
 struct __extract_key_value_types;
@@ -846,7 +846,7 @@ struct __extract_key_value_types<__value_type<_Key, _Tp> >
 };
 
 template <class _TreeIterator>
-class _LIBCPP_TEMPLATE_VIS __map_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __map_iterator
 {
     typedef typename _TreeIterator::_NodeTypes                   _NodeTypes;
     typedef typename _TreeIterator::__pointer_traits             __pointer_traits;
@@ -860,20 +860,20 @@ public:
     typedef value_type&                                          reference;
     typedef typename _NodeTypes::__map_value_type_pointer        pointer;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_iterator() _NOEXCEPT {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_iterator(_TreeIterator __i) _NOEXCEPT : __i_(__i) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {return __i_->__get_value();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {return pointer_traits<pointer>::pointer_to(__i_->__get_value());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_iterator& operator++() {++__i_; return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_iterator operator++(int)
     {
         __map_iterator __t(*this);
@@ -881,9 +881,9 @@ public:
         return __t;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_iterator& operator--() {--__i_; return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_iterator operator--(int)
     {
         __map_iterator __t(*this);
@@ -891,21 +891,21 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __map_iterator& __x, const __map_iterator& __y)
         {return __x.__i_ == __y.__i_;}
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __map_iterator& __x, const __map_iterator& __y)
         {return __x.__i_ != __y.__i_;}
 
-    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
-    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __map_const_iterator;
+    template <class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS map;
+    template <class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS multimap;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __map_const_iterator;
 };
 
 template <class _TreeIterator>
-class _LIBCPP_TEMPLATE_VIS __map_const_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __map_const_iterator
 {
     typedef typename _TreeIterator::_NodeTypes                   _NodeTypes;
     typedef typename _TreeIterator::__pointer_traits             __pointer_traits;
@@ -919,24 +919,24 @@ public:
     typedef const value_type&                                    reference;
     typedef typename _NodeTypes::__const_map_value_type_pointer  pointer;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_const_iterator() _NOEXCEPT {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_const_iterator(_TreeIterator __i) _NOEXCEPT : __i_(__i) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_const_iterator(__map_iterator<
         typename _TreeIterator::__non_const_iterator> __i) _NOEXCEPT
         : __i_(__i.__i_) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {return __i_->__get_value();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {return pointer_traits<pointer>::pointer_to(__i_->__get_value());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_const_iterator& operator++() {++__i_; return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_const_iterator operator++(int)
     {
         __map_const_iterator __t(*this);
@@ -944,9 +944,9 @@ public:
         return __t;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_const_iterator& operator--() {--__i_; return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __map_const_iterator operator--(int)
     {
         __map_const_iterator __t(*this);
@@ -954,21 +954,21 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __map_const_iterator& __x, const __map_const_iterator& __y)
         {return __x.__i_ == __y.__i_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __map_const_iterator& __x, const __map_const_iterator& __y)
         {return __x.__i_ != __y.__i_;}
 
-    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS map;
-    template <class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS multimap;
-    template <class, class, class> friend class _LIBCPP_TEMPLATE_VIS __tree_const_iterator;
+    template <class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS map;
+    template <class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS multimap;
+    template <class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS __tree_const_iterator;
 };
 
 template <class _Key, class _Tp, class _Compare = less<_Key>,
           class _Allocator = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS map
+class _LIBCUDACXX_TEMPLATE_VIS map
 {
 public:
     // types:
@@ -983,23 +983,23 @@ public:
     static_assert((is_same<typename allocator_type::value_type, value_type>::value),
                   "Allocator::value_type must be same type as value_type");
 
-    class _LIBCPP_TEMPLATE_VIS value_compare
+    class _LIBCUDACXX_TEMPLATE_VIS value_compare
         : public __binary_function<value_type, value_type, bool>
     {
         friend class map;
     protected:
         key_compare comp;
 
-        _LIBCPP_INLINE_VISIBILITY value_compare(key_compare __c) : comp(__c) {}
+        _LIBCUDACXX_INLINE_VISIBILITY value_compare(key_compare __c) : comp(__c) {}
     public:
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         bool operator()(const value_type& __x, const value_type& __y) const
             {return comp(__x.first, __y.first);}
     };
 
 private:
 
-    typedef _VSTD::__value_type<key_type, mapped_type>             __value_type;
+    typedef _CUDA_VSTD::__value_type<key_type, mapped_type>             __value_type;
     typedef __map_value_compare<key_type, __value_type, key_compare> __vc;
     typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>,
                                                  __value_type>::type __allocator_type;
@@ -1016,20 +1016,20 @@ public:
     typedef typename __alloc_traits::
diff erence_type       
diff erence_type;
     typedef __map_iterator<typename __base::iterator>             iterator;
     typedef __map_const_iterator<typename __base::const_iterator> const_iterator;
-    typedef _VSTD::reverse_iterator<iterator>               reverse_iterator;
-    typedef _VSTD::reverse_iterator<const_iterator>         const_reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<iterator>               reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<const_iterator>         const_reverse_iterator;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     typedef __map_node_handle<typename __base::__node, allocator_type> node_type;
     typedef __insert_return_type<iterator, node_type> insert_return_type;
 #endif
 
     template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS map;
+        friend class _LIBCUDACXX_TEMPLATE_VIS map;
     template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS multimap;
+        friend class _LIBCUDACXX_TEMPLATE_VIS multimap;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     map()
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
@@ -1037,19 +1037,19 @@ public:
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__vc(key_compare())) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit map(const key_compare& __comp)
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__vc(__comp)) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit map(const key_compare& __comp, const allocator_type& __a)
         : __tree_(__vc(__comp), typename __base::allocator_type(__a)) {}
 
     template <class _InputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
         map(_InputIterator __f, _InputIterator __l,
             const key_compare& __comp = key_compare())
         : __tree_(__vc(__comp))
@@ -1058,7 +1058,7 @@ public:
         }
 
     template <class _InputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
         map(_InputIterator __f, _InputIterator __l,
             const key_compare& __comp, const allocator_type& __a)
         : __tree_(__vc(__comp), typename __base::allocator_type(__a))
@@ -1066,27 +1066,27 @@ public:
             insert(__f, __l);
         }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <class _InputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     map(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
         : map(__f, __l, key_compare(), __a) {}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     map(const map& __m)
         : __tree_(__m.__tree_)
         {
             insert(__m.begin(), __m.end());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     map& operator=(const map& __m)
         {
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
             __tree_ = __m.__tree_;
 #else
-            if (this != _VSTD::addressof(__m)) {
+            if (this != _CUDA_VSTD::addressof(__m)) {
                 __tree_.clear();
                 __tree_.value_comp() = __m.__tree_.value_comp();
                 __tree_.__copy_assign_alloc(__m.__tree_);
@@ -1096,439 +1096,439 @@ public:
             return *this;
         }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     map(map&& __m)
         _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
-        : __tree_(_VSTD::move(__m.__tree_))
+        : __tree_(_CUDA_VSTD::move(__m.__tree_))
         {
         }
 
     map(map&& __m, const allocator_type& __a);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     map& operator=(map&& __m)
         _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
         {
-            __tree_ = _VSTD::move(__m.__tree_);
+            __tree_ = _CUDA_VSTD::move(__m.__tree_);
             return *this;
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     map(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
         : __tree_(__vc(__comp))
         {
             insert(__il.begin(), __il.end());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     map(initializer_list<value_type> __il, const key_compare& __comp, const allocator_type& __a)
         : __tree_(__vc(__comp), typename __base::allocator_type(__a))
         {
             insert(__il.begin(), __il.end());
         }
 
-#if _LIBCPP_STD_VER > 11
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 11
+    _LIBCUDACXX_INLINE_VISIBILITY
     map(initializer_list<value_type> __il, const allocator_type& __a)
         : map(__il, key_compare(), __a) {}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     map& operator=(initializer_list<value_type> __il)
         {
             __tree_.__assign_unique(__il.begin(), __il.end());
             return *this;
         }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit map(const allocator_type& __a)
         : __tree_(typename __base::allocator_type(__a))
         {
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     map(const map& __m, const allocator_type& __a)
         : __tree_(__m.__tree_.value_comp(), typename __base::allocator_type(__a))
         {
             insert(__m.begin(), __m.end());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~map() {
         static_assert(sizeof(__diagnose_non_const_comparator<_Key, _Compare>()), "");
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator begin() _NOEXCEPT {return __tree_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin() const _NOEXCEPT {return __tree_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator end() _NOEXCEPT {return __tree_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end() const _NOEXCEPT {return __tree_.end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rbegin() const _NOEXCEPT
         {return const_reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           reverse_iterator rend() _NOEXCEPT
             {return       reverse_iterator(begin());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rend() const _NOEXCEPT
         {return const_reverse_iterator(begin());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin() const _NOEXCEPT {return begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend() const _NOEXCEPT {return end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crend() const _NOEXCEPT {return rend();}
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool      empty() const _NOEXCEPT {return __tree_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT {return __tree_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT {return __tree_.max_size();}
 
     mapped_type& operator[](const key_type& __k);
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     mapped_type& operator[](key_type&& __k);
 #endif
 
           mapped_type& at(const key_type& __k);
     const mapped_type& at(const key_type& __k) const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT {return allocator_type(__tree_.__alloc());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_compare    key_comp()      const {return __tree_.value_comp().key_comp();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_compare  value_comp()    const {return value_compare(__tree_.value_comp().key_comp());}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class ..._Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> emplace(_Args&& ...__args) {
-        return __tree_.__emplace_unique(_VSTD::forward<_Args>(__args)...);
+        return __tree_.__emplace_unique(_CUDA_VSTD::forward<_Args>(__args)...);
     }
 
     template <class ..._Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator emplace_hint(const_iterator __p, _Args&& ...__args) {
-        return __tree_.__emplace_hint_unique(__p.__i_, _VSTD::forward<_Args>(__args)...);
+        return __tree_.__emplace_hint_unique(__p.__i_, _CUDA_VSTD::forward<_Args>(__args)...);
     }
 
     template <class _Pp,
               class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> insert(_Pp&& __p)
-            {return __tree_.__insert_unique(_VSTD::forward<_Pp>(__p));}
+            {return __tree_.__insert_unique(_CUDA_VSTD::forward<_Pp>(__p));}
 
     template <class _Pp,
               class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator insert(const_iterator __pos, _Pp&& __p)
-            {return __tree_.__insert_unique(__pos.__i_, _VSTD::forward<_Pp>(__p));}
+            {return __tree_.__insert_unique(__pos.__i_, _CUDA_VSTD::forward<_Pp>(__p));}
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool>
         insert(const value_type& __v) {return __tree_.__insert_unique(__v);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator
         insert(const_iterator __p, const value_type& __v)
             {return __tree_.__insert_unique(__p.__i_, __v);}
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool>
-    insert(value_type&& __v) {return __tree_.__insert_unique(_VSTD::move(__v));}
+    insert(value_type&& __v) {return __tree_.__insert_unique(_CUDA_VSTD::move(__v));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p,  value_type&& __v)
-    {return __tree_.__insert_unique(__p.__i_, _VSTD::move(__v));}
+    {return __tree_.__insert_unique(__p.__i_, _CUDA_VSTD::move(__v));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void insert(initializer_list<value_type> __il)
         {insert(__il.begin(), __il.end());}
 #endif
 
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void insert(_InputIterator __f, _InputIterator __l)
         {
             for (const_iterator __e = cend(); __f != __l; ++__f)
                 insert(__e.__i_, *__f);
         }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> try_emplace(const key_type& __k, _Args&&... __args)
     {
         return __tree_.__emplace_unique_key_args(__k,
-            _VSTD::piecewise_construct,
-            _VSTD::forward_as_tuple(__k),
-            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...));
+            _CUDA_VSTD::piecewise_construct,
+            _CUDA_VSTD::forward_as_tuple(__k),
+            _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Args>(__args)...));
     }
 
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> try_emplace(key_type&& __k, _Args&&... __args)
     {
         return __tree_.__emplace_unique_key_args(__k,
-            _VSTD::piecewise_construct,
-            _VSTD::forward_as_tuple(_VSTD::move(__k)),
-            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...));
+            _CUDA_VSTD::piecewise_construct,
+            _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::move(__k)),
+            _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Args>(__args)...));
     }
 
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator try_emplace(const_iterator __h, const key_type& __k, _Args&&... __args)
     {
         return __tree_.__emplace_hint_unique_key_args(__h.__i_, __k,
-            _VSTD::piecewise_construct,
-            _VSTD::forward_as_tuple(__k),
-            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)).first;
+            _CUDA_VSTD::piecewise_construct,
+            _CUDA_VSTD::forward_as_tuple(__k),
+            _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Args>(__args)...)).first;
     }
 
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator try_emplace(const_iterator __h, key_type&& __k, _Args&&... __args)
     {
         return __tree_.__emplace_hint_unique_key_args(__h.__i_, __k,
-            _VSTD::piecewise_construct,
-            _VSTD::forward_as_tuple(_VSTD::move(__k)),
-            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...)).first;
+            _CUDA_VSTD::piecewise_construct,
+            _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::move(__k)),
+            _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Args>(__args)...)).first;
     }
 
     template <class _Vp>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> insert_or_assign(const key_type& __k, _Vp&& __v)
     {
         iterator __p = lower_bound(__k);
         if ( __p != end() && !key_comp()(__k, __p->first))
         {
-            __p->second = _VSTD::forward<_Vp>(__v);
-            return _VSTD::make_pair(__p, false);
+            __p->second = _CUDA_VSTD::forward<_Vp>(__v);
+            return _CUDA_VSTD::make_pair(__p, false);
         }
-        return _VSTD::make_pair(emplace_hint(__p, __k, _VSTD::forward<_Vp>(__v)), true);
+        return _CUDA_VSTD::make_pair(emplace_hint(__p, __k, _CUDA_VSTD::forward<_Vp>(__v)), true);
     }
 
     template <class _Vp>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> insert_or_assign(key_type&& __k, _Vp&& __v)
     {
         iterator __p = lower_bound(__k);
         if ( __p != end() && !key_comp()(__k, __p->first))
         {
-            __p->second = _VSTD::forward<_Vp>(__v);
-            return _VSTD::make_pair(__p, false);
+            __p->second = _CUDA_VSTD::forward<_Vp>(__v);
+            return _CUDA_VSTD::make_pair(__p, false);
         }
-        return _VSTD::make_pair(emplace_hint(__p, _VSTD::move(__k), _VSTD::forward<_Vp>(__v)), true);
+        return _CUDA_VSTD::make_pair(emplace_hint(__p, _CUDA_VSTD::move(__k), _CUDA_VSTD::forward<_Vp>(__v)), true);
     }
 
     template <class _Vp>
-    _LIBCPP_INLINE_VISIBILITY iterator insert_or_assign(const_iterator __h,
+    _LIBCUDACXX_INLINE_VISIBILITY iterator insert_or_assign(const_iterator __h,
                                                         const key_type& __k,
                                                         _Vp&& __v) {
       auto [__r, __inserted] = __tree_.__emplace_hint_unique_key_args(
-          __h.__i_, __k, __k, _VSTD::forward<_Vp>(__v));
+          __h.__i_, __k, __k, _CUDA_VSTD::forward<_Vp>(__v));
 
       if (!__inserted)
-        __r->__get_value().second = _VSTD::forward<_Vp>(__v);
+        __r->__get_value().second = _CUDA_VSTD::forward<_Vp>(__v);
 
       return __r;
     }
 
     template <class _Vp>
-    _LIBCPP_INLINE_VISIBILITY iterator insert_or_assign(const_iterator __h,
+    _LIBCUDACXX_INLINE_VISIBILITY iterator insert_or_assign(const_iterator __h,
                                                         key_type&& __k,
                                                         _Vp&& __v) {
       auto [__r, __inserted] = __tree_.__emplace_hint_unique_key_args(
-          __h.__i_, __k, _VSTD::move(__k), _VSTD::forward<_Vp>(__v));
+          __h.__i_, __k, _CUDA_VSTD::move(__k), _CUDA_VSTD::forward<_Vp>(__v));
 
       if (!__inserted)
-        __r->__get_value().second = _VSTD::forward<_Vp>(__v);
+        __r->__get_value().second = _CUDA_VSTD::forward<_Vp>(__v);
 
       return __r;
     }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(iterator __p)       {return __tree_.erase(__p.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k)
         {return __tree_.__erase_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator  erase(const_iterator __f, const_iterator __l)
         {return __tree_.erase(__f.__i_, __l.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT {__tree_.clear();}
 
-#if _LIBCPP_STD_VER > 14
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
+    _LIBCUDACXX_INLINE_VISIBILITY
     insert_return_type insert(node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to map::insert()");
         return __tree_.template __node_handle_insert_unique<
-            node_type, insert_return_type>(_VSTD::move(__nh));
+            node_type, insert_return_type>(_CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __hint, node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to map::insert()");
         return __tree_.template __node_handle_insert_unique<node_type>(
-            __hint.__i_, _VSTD::move(__nh));
+            __hint.__i_, _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(key_type const& __key)
     {
         return __tree_.template __node_handle_extract<node_type>(__key);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(const_iterator __it)
     {
         return __tree_.template __node_handle_extract<node_type>(__it.__i_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(map<key_type, mapped_type, _Compare2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_unique(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(map<key_type, mapped_type, _Compare2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_unique(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_unique(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_unique(__source.__tree_);
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(map& __m)
         _NOEXCEPT_(__is_nothrow_swappable<__base>::value)
         {__tree_.swap(__m.__tree_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator find(const key_type& __k)             {return __tree_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __tree_.find(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, iterator>
     find(const _K2& __k)                           {return __tree_.find(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, const_iterator>
     find(const _K2& __k) const                     {return __tree_.find(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type      count(const key_type& __k) const
         {return __tree_.__count_unique(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, size_type>
     count(const _K2& __k) const {return __tree_.__count_multi(__k);}
 #endif
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const key_type& __k) const {return find(__k) != end();}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, bool>
     contains(const _K2& __k) const { return find(__k) != end(); }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator lower_bound(const key_type& __k)
         {return __tree_.lower_bound(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator lower_bound(const key_type& __k) const
         {return __tree_.lower_bound(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, iterator>
     lower_bound(const _K2& __k)       {return __tree_.lower_bound(__k);}
 
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, const_iterator>
     lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator upper_bound(const key_type& __k)
         {return __tree_.upper_bound(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator upper_bound(const key_type& __k) const
         {return __tree_.upper_bound(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, iterator>
     upper_bound(const _K2& __k)       {return __tree_.upper_bound(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, const_iterator>
     upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator,iterator> equal_range(const key_type& __k)
         {return __tree_.__equal_range_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator,const_iterator> equal_range(const key_type& __k) const
         {return __tree_.__equal_range_unique(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, pair<iterator,iterator>>
     equal_range(const _K2& __k)       {return __tree_.__equal_range_multi(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, pair<const_iterator,const_iterator>>
     equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);}
 #endif
@@ -1543,12 +1543,12 @@ private:
     typedef __map_node_destructor<__node_allocator> _Dp;
     typedef unique_ptr<__node, _Dp> __node_holder;
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
     __node_holder __construct_node_with_key(const key_type& __k);
 #endif
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator, class _Compare = less<__iter_key_type<_InputIterator>>,
          class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>,
          class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value, void>,
@@ -1577,10 +1577,10 @@ map(initializer_list<pair<_Key, _Tp>>, _Allocator)
   -> map<remove_const_t<_Key>, _Tp, less<remove_const_t<_Key>>, _Allocator>;
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Key, class _Tp, class _Compare, class _Allocator>
 map<_Key, _Tp, _Compare, _Allocator>::map(map&& __m, const allocator_type& __a)
-    : __tree_(_VSTD::move(__m.__tree_), typename __base::allocator_type(__a))
+    : __tree_(_CUDA_VSTD::move(__m.__tree_), typename __base::allocator_type(__a))
 {
     if (__a != __m.get_allocator())
     {
@@ -1596,9 +1596,9 @@ _Tp&
 map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k)
 {
     return __tree_.__emplace_unique_key_args(__k,
-        _VSTD::piecewise_construct,
-        _VSTD::forward_as_tuple(__k),
-        _VSTD::forward_as_tuple()).first->__get_value().second;
+        _CUDA_VSTD::piecewise_construct,
+        _CUDA_VSTD::forward_as_tuple(__k),
+        _CUDA_VSTD::forward_as_tuple()).first->__get_value().second;
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
@@ -1606,12 +1606,12 @@ _Tp&
 map<_Key, _Tp, _Compare, _Allocator>::operator[](key_type&& __k)
 {
     return __tree_.__emplace_unique_key_args(__k,
-        _VSTD::piecewise_construct,
-        _VSTD::forward_as_tuple(_VSTD::move(__k)),
-        _VSTD::forward_as_tuple()).first->__get_value().second;
+        _CUDA_VSTD::piecewise_construct,
+        _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::move(__k)),
+        _CUDA_VSTD::forward_as_tuple()).first->__get_value().second;
 }
 
-#else // _LIBCPP_CXX03_LANG
+#else // _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
 typename map<_Key, _Tp, _Compare, _Allocator>::__node_holder
@@ -1619,9 +1619,9 @@ map<_Key, _Tp, _Compare, _Allocator>::__construct_node_with_key(const key_type&
 {
     __node_allocator& __na = __tree_.__node_alloc();
     __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
-    __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().first), __k);
+    __node_traits::construct(__na, _CUDA_VSTD::addressof(__h->__value_.__get_value().first), __k);
     __h.get_deleter().__first_constructed = true;
-    __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().second));
+    __node_traits::construct(__na, _CUDA_VSTD::addressof(__h->__value_.__get_value().second));
     __h.get_deleter().__second_constructed = true;
     return __h;
 }
@@ -1642,7 +1642,7 @@ map<_Key, _Tp, _Compare, _Allocator>::operator[](const key_type& __k)
     return __r->__value_.__get_value().second;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
 _Tp&
@@ -1668,25 +1668,25 @@ map<_Key, _Tp, _Compare, _Allocator>::at(const key_type& __k) const
 
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const map<_Key, _Tp, _Compare, _Allocator>& __x,
            const map<_Key, _Tp, _Compare, _Allocator>& __y)
 {
-    return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
+    return __x.size() == __y.size() && _CUDA_VSTD::equal(__x.begin(), __x.end(), __y.begin());
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const map<_Key, _Tp, _Compare, _Allocator>& __x,
            const map<_Key, _Tp, _Compare, _Allocator>& __y)
 {
-    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
+    return _CUDA_VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
            const map<_Key, _Tp, _Compare, _Allocator>& __y)
@@ -1695,7 +1695,7 @@ operator!=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator> (const map<_Key, _Tp, _Compare, _Allocator>& __x,
            const map<_Key, _Tp, _Compare, _Allocator>& __y)
@@ -1704,7 +1704,7 @@ operator> (const map<_Key, _Tp, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
            const map<_Key, _Tp, _Compare, _Allocator>& __y)
@@ -1713,7 +1713,7 @@ operator>=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
            const map<_Key, _Tp, _Compare, _Allocator>& __y)
@@ -1722,7 +1722,7 @@ operator<=(const map<_Key, _Tp, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(map<_Key, _Tp, _Compare, _Allocator>& __x,
      map<_Key, _Tp, _Compare, _Allocator>& __y)
@@ -1731,20 +1731,20 @@ swap(map<_Key, _Tp, _Compare, _Allocator>& __x,
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Key, class _Tp, class _Compare, class _Allocator,
           class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
     typename map<_Key, _Tp, _Compare, _Allocator>::size_type
     erase_if(map<_Key, _Tp, _Compare, _Allocator>& __c, _Predicate __pred) {
-  return _VSTD::__libcpp_erase_if_container(__c, __pred);
+  return _CUDA_VSTD::__LIBCUDACXX_erase_if_container(__c, __pred);
 }
 #endif
 
 
 template <class _Key, class _Tp, class _Compare = less<_Key>,
           class _Allocator = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS multimap
+class _LIBCUDACXX_TEMPLATE_VIS multimap
 {
 public:
     // types:
@@ -1759,24 +1759,24 @@ public:
     static_assert((is_same<typename allocator_type::value_type, value_type>::value),
                   "Allocator::value_type must be same type as value_type");
 
-    class _LIBCPP_TEMPLATE_VIS value_compare
+    class _LIBCUDACXX_TEMPLATE_VIS value_compare
         : public __binary_function<value_type, value_type, bool>
     {
         friend class multimap;
     protected:
         key_compare comp;
 
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         value_compare(key_compare __c) : comp(__c) {}
     public:
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         bool operator()(const value_type& __x, const value_type& __y) const
             {return comp(__x.first, __y.first);}
     };
 
 private:
 
-    typedef _VSTD::__value_type<key_type, mapped_type>             __value_type;
+    typedef _CUDA_VSTD::__value_type<key_type, mapped_type>             __value_type;
     typedef __map_value_compare<key_type, __value_type, key_compare> __vc;
     typedef typename __rebind_alloc_helper<allocator_traits<allocator_type>,
                                                  __value_type>::type __allocator_type;
@@ -1793,19 +1793,19 @@ public:
     typedef typename __alloc_traits::
diff erence_type       
diff erence_type;
     typedef __map_iterator<typename __base::iterator>      iterator;
     typedef __map_const_iterator<typename __base::const_iterator> const_iterator;
-    typedef _VSTD::reverse_iterator<iterator>               reverse_iterator;
-    typedef _VSTD::reverse_iterator<const_iterator>         const_reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<iterator>               reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<const_iterator>         const_reverse_iterator;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     typedef __map_node_handle<typename __base::__node, allocator_type> node_type;
 #endif
 
     template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS map;
+        friend class _LIBCUDACXX_TEMPLATE_VIS map;
     template <class _Key2, class _Value2, class _Comp2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS multimap;
+        friend class _LIBCUDACXX_TEMPLATE_VIS multimap;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multimap()
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
@@ -1813,19 +1813,19 @@ public:
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__vc(key_compare())) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit multimap(const key_compare& __comp)
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__vc(__comp)) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit multimap(const key_compare& __comp, const allocator_type& __a)
         : __tree_(__vc(__comp), typename __base::allocator_type(__a)) {}
 
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         multimap(_InputIterator __f, _InputIterator __l,
             const key_compare& __comp = key_compare())
         : __tree_(__vc(__comp))
@@ -1834,7 +1834,7 @@ public:
         }
 
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         multimap(_InputIterator __f, _InputIterator __l,
             const key_compare& __comp, const allocator_type& __a)
         : __tree_(__vc(__comp), typename __base::allocator_type(__a))
@@ -1842,14 +1842,14 @@ public:
             insert(__f, __l);
         }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <class _InputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multimap(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
         : multimap(__f, __l, key_compare(), __a) {}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multimap(const multimap& __m)
         : __tree_(__m.__tree_.value_comp(),
           __alloc_traits::select_on_container_copy_construction(__m.__tree_.__alloc()))
@@ -1857,13 +1857,13 @@ public:
             insert(__m.begin(), __m.end());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multimap& operator=(const multimap& __m)
         {
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
             __tree_ = __m.__tree_;
 #else
-            if (this != _VSTD::addressof(__m)) {
+            if (this != _CUDA_VSTD::addressof(__m)) {
                 __tree_.clear();
                 __tree_.value_comp() = __m.__tree_.value_comp();
                 __tree_.__copy_assign_alloc(__m.__tree_);
@@ -1873,334 +1873,334 @@ public:
             return *this;
         }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multimap(multimap&& __m)
         _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
-        : __tree_(_VSTD::move(__m.__tree_))
+        : __tree_(_CUDA_VSTD::move(__m.__tree_))
         {
         }
 
     multimap(multimap&& __m, const allocator_type& __a);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multimap& operator=(multimap&& __m)
         _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
         {
-            __tree_ = _VSTD::move(__m.__tree_);
+            __tree_ = _CUDA_VSTD::move(__m.__tree_);
             return *this;
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multimap(initializer_list<value_type> __il, const key_compare& __comp = key_compare())
         : __tree_(__vc(__comp))
         {
             insert(__il.begin(), __il.end());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multimap(initializer_list<value_type> __il, const key_compare& __comp, const allocator_type& __a)
         : __tree_(__vc(__comp), typename __base::allocator_type(__a))
         {
             insert(__il.begin(), __il.end());
         }
 
-#if _LIBCPP_STD_VER > 11
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 11
+    _LIBCUDACXX_INLINE_VISIBILITY
     multimap(initializer_list<value_type> __il, const allocator_type& __a)
         : multimap(__il, key_compare(), __a) {}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multimap& operator=(initializer_list<value_type> __il)
         {
             __tree_.__assign_multi(__il.begin(), __il.end());
             return *this;
         }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit multimap(const allocator_type& __a)
         : __tree_(typename __base::allocator_type(__a))
         {
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multimap(const multimap& __m, const allocator_type& __a)
         : __tree_(__m.__tree_.value_comp(), typename __base::allocator_type(__a))
         {
             insert(__m.begin(), __m.end());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~multimap() {
         static_assert(sizeof(__diagnose_non_const_comparator<_Key, _Compare>()), "");
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator begin() _NOEXCEPT {return __tree_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin() const _NOEXCEPT {return __tree_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator end() _NOEXCEPT {return __tree_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end() const _NOEXCEPT {return __tree_.end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           reverse_iterator rbegin() _NOEXCEPT {return reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rbegin() const _NOEXCEPT
         {return const_reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           reverse_iterator rend() _NOEXCEPT {return reverse_iterator(begin());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rend() const _NOEXCEPT
         {return const_reverse_iterator(begin());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin()  const _NOEXCEPT {return begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend() const _NOEXCEPT {return end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crend() const _NOEXCEPT {return rend();}
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool empty() const _NOEXCEPT {return __tree_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT {return __tree_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT {return __tree_.max_size();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT {return allocator_type(__tree_.__alloc());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_compare    key_comp() const {return __tree_.value_comp().key_comp();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_compare  value_comp() const
         {return value_compare(__tree_.value_comp().key_comp());}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
     template <class ..._Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator emplace(_Args&& ...__args) {
-        return __tree_.__emplace_multi(_VSTD::forward<_Args>(__args)...);
+        return __tree_.__emplace_multi(_CUDA_VSTD::forward<_Args>(__args)...);
     }
 
     template <class ..._Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator emplace_hint(const_iterator __p, _Args&& ...__args) {
-        return __tree_.__emplace_hint_multi(__p.__i_, _VSTD::forward<_Args>(__args)...);
+        return __tree_.__emplace_hint_multi(__p.__i_, _CUDA_VSTD::forward<_Args>(__args)...);
     }
 
     template <class _Pp,
               class = __enable_if_t<is_constructible<value_type, _Pp>::value>>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator insert(_Pp&& __p)
-            {return __tree_.__insert_multi(_VSTD::forward<_Pp>(__p));}
+            {return __tree_.__insert_multi(_CUDA_VSTD::forward<_Pp>(__p));}
 
     template <class _Pp,
               class = __enable_if_t<is_constructible<value_type, _Pp>::value>>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator insert(const_iterator __pos, _Pp&& __p)
-            {return __tree_.__insert_multi(__pos.__i_, _VSTD::forward<_Pp>(__p));}
+            {return __tree_.__insert_multi(__pos.__i_, _CUDA_VSTD::forward<_Pp>(__p));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(value_type&& __v)
-        {return __tree_.__insert_multi(_VSTD::move(__v));}
+        {return __tree_.__insert_multi(_CUDA_VSTD::move(__v));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, value_type&& __v)
-        {return __tree_.__insert_multi(__p.__i_, _VSTD::move(__v));}
+        {return __tree_.__insert_multi(__p.__i_, _CUDA_VSTD::move(__v));}
 
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void insert(initializer_list<value_type> __il)
         {insert(__il.begin(), __il.end());}
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const value_type& __v) {return __tree_.__insert_multi(__v);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, const value_type& __v)
             {return __tree_.__insert_multi(__p.__i_, __v);}
 
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void insert(_InputIterator __f, _InputIterator __l)
         {
             for (const_iterator __e = cend(); __f != __l; ++__f)
                 __tree_.__insert_multi(__e.__i_, *__f);
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(const_iterator __p) {return __tree_.erase(__p.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(iterator __p)       {return __tree_.erase(__p.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k) {return __tree_.__erase_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator  erase(const_iterator __f, const_iterator __l)
         {return __tree_.erase(__f.__i_, __l.__i_);}
 
-#if _LIBCPP_STD_VER > 14
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to multimap::insert()");
         return __tree_.template __node_handle_insert_multi<node_type>(
-            _VSTD::move(__nh));
+            _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __hint, node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to multimap::insert()");
         return __tree_.template __node_handle_insert_multi<node_type>(
-            __hint.__i_, _VSTD::move(__nh));
+            __hint.__i_, _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(key_type const& __key)
     {
         return __tree_.template __node_handle_extract<node_type>(__key);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(const_iterator __it)
     {
         return __tree_.template __node_handle_extract<node_type>(
             __it.__i_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __tree_.__node_handle_merge_multi(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(multimap<key_type, mapped_type, _Compare2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __tree_.__node_handle_merge_multi(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(map<key_type, mapped_type, _Compare2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __tree_.__node_handle_merge_multi(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(map<key_type, mapped_type, _Compare2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __tree_.__node_handle_merge_multi(__source.__tree_);
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT {__tree_.clear();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(multimap& __m)
         _NOEXCEPT_(__is_nothrow_swappable<__base>::value)
         {__tree_.swap(__m.__tree_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator find(const key_type& __k)             {return __tree_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __tree_.find(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, iterator>
     find(const _K2& __k)                           {return __tree_.find(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, const_iterator>
     find(const _K2& __k) const                     {return __tree_.find(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type      count(const key_type& __k) const
         {return __tree_.__count_multi(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, size_type>
     count(const _K2& __k) const {return __tree_.__count_multi(__k);}
 #endif
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const key_type& __k) const {return find(__k) != end();}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, bool>
     contains(const _K2& __k) const { return find(__k) != end(); }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator lower_bound(const key_type& __k)
         {return __tree_.lower_bound(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator lower_bound(const key_type& __k) const
             {return __tree_.lower_bound(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, iterator>
     lower_bound(const _K2& __k)       {return __tree_.lower_bound(__k);}
 
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, const_iterator>
     lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator upper_bound(const key_type& __k)
             {return __tree_.upper_bound(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator upper_bound(const key_type& __k) const
             {return __tree_.upper_bound(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, iterator>
     upper_bound(const _K2& __k)       {return __tree_.upper_bound(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, const_iterator>
     upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator,iterator>             equal_range(const key_type& __k)
             {return __tree_.__equal_range_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator,const_iterator> equal_range(const key_type& __k) const
             {return __tree_.__equal_range_multi(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, pair<iterator,iterator>>
     equal_range(const _K2& __k)       {return __tree_.__equal_range_multi(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __enable_if_t<__is_transparent<_Compare, _K2>::value, pair<const_iterator,const_iterator>>
     equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);}
 #endif
@@ -2214,7 +2214,7 @@ private:
     typedef unique_ptr<__node, _Dp> __node_holder;
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator, class _Compare = less<__iter_key_type<_InputIterator>>,
          class _Allocator = allocator<__iter_to_alloc_type<_InputIterator>>,
          class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value, void>,
@@ -2243,41 +2243,41 @@ multimap(initializer_list<pair<_Key, _Tp>>, _Allocator)
   -> multimap<remove_const_t<_Key>, _Tp, less<remove_const_t<_Key>>, _Allocator>;
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Key, class _Tp, class _Compare, class _Allocator>
 multimap<_Key, _Tp, _Compare, _Allocator>::multimap(multimap&& __m, const allocator_type& __a)
-    : __tree_(_VSTD::move(__m.__tree_), typename __base::allocator_type(__a))
+    : __tree_(_CUDA_VSTD::move(__m.__tree_), typename __base::allocator_type(__a))
 {
     if (__a != __m.get_allocator())
     {
         const_iterator __e = cend();
         while (!__m.empty())
             __tree_.__insert_multi(__e.__i_,
-                    _VSTD::move(__m.__tree_.remove(__m.begin().__i_)->__value_.__move()));
+                    _CUDA_VSTD::move(__m.__tree_.remove(__m.begin().__i_)->__value_.__move()));
     }
 }
 #endif
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
            const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
 {
-    return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
+    return __x.size() == __y.size() && _CUDA_VSTD::equal(__x.begin(), __x.end(), __y.begin());
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
            const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
 {
-    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
+    return _CUDA_VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
            const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
@@ -2286,7 +2286,7 @@ operator!=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator> (const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
            const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
@@ -2295,7 +2295,7 @@ operator> (const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
            const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
@@ -2304,7 +2304,7 @@ operator>=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
            const multimap<_Key, _Tp, _Compare, _Allocator>& __y)
@@ -2313,7 +2313,7 @@ operator<=(const multimap<_Key, _Tp, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Tp, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(multimap<_Key, _Tp, _Compare, _Allocator>& __x,
      multimap<_Key, _Tp, _Compare, _Allocator>& __y)
@@ -2322,17 +2322,17 @@ swap(multimap<_Key, _Tp, _Compare, _Allocator>& __x,
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Key, class _Tp, class _Compare, class _Allocator,
           class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
     typename multimap<_Key, _Tp, _Compare, _Allocator>::size_type
     erase_if(multimap<_Key, _Tp, _Compare, _Allocator>& __c,
              _Predicate __pred) {
-  return _VSTD::__libcpp_erase_if_container(__c, __pred);
+  return _CUDA_VSTD::__LIBCUDACXX_erase_if_container(__c, __pred);
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_MAP
+#endif // _LIBCUDACXX_MAP

diff  --git a/libcxx/include/math.h b/libcxx/include/math.h
index 0ec584af9dbe..e6223c2af09d 100644
--- a/libcxx/include/math.h
+++ b/libcxx/include/math.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_MATH_H
-#define _LIBCPP_MATH_H
+#ifndef _LIBCUDACXX_MATH_H
+#define _LIBCUDACXX_MATH_H
 
 /*
     math.h synopsis
@@ -293,7 +293,7 @@ long double    truncl(long double x);
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -315,9 +315,9 @@ extern "C++" {
 #ifdef signbit
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
-__libcpp_signbit(_A1 __lcpp_x) _NOEXCEPT
+__LIBCUDACXX_signbit(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_signbit)
     return __builtin_signbit(__lcpp_x);
@@ -329,31 +329,31 @@ __libcpp_signbit(_A1 __lcpp_x) _NOEXCEPT
 #undef signbit
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
 signbit(_A1 __lcpp_x) _NOEXCEPT
 {
-    return __libcpp_signbit((typename std::__promote<_A1>::type)__lcpp_x);
+    return __LIBCUDACXX_signbit((typename std::__promote<_A1>::type)__lcpp_x);
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<
     std::is_integral<_A1>::value && std::is_signed<_A1>::value, bool>::type
 signbit(_A1 __lcpp_x) _NOEXCEPT
 { return __lcpp_x < 0; }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<
     std::is_integral<_A1>::value && !std::is_signed<_A1>::value, bool>::type
 signbit(_A1) _NOEXCEPT
 { return false; }
 
-#elif defined(_LIBCPP_MSVCRT)
+#elif defined(_LIBCUDACXX_MSVCRT)
 
 template <typename _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
 signbit(_A1 __lcpp_x) _NOEXCEPT
 {
@@ -361,14 +361,14 @@ signbit(_A1 __lcpp_x) _NOEXCEPT
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<
     std::is_integral<_A1>::value && std::is_signed<_A1>::value, bool>::type
 signbit(_A1 __lcpp_x) _NOEXCEPT
 { return __lcpp_x < 0; }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<
     std::is_integral<_A1>::value && !std::is_signed<_A1>::value, bool>::type
 signbit(_A1) _NOEXCEPT
@@ -381,9 +381,9 @@ signbit(_A1) _NOEXCEPT
 #ifdef fpclassify
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 int
-__libcpp_fpclassify(_A1 __lcpp_x) _NOEXCEPT
+__LIBCUDACXX_fpclassify(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_fpclassify)
   return __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL,
@@ -396,23 +396,23 @@ __libcpp_fpclassify(_A1 __lcpp_x) _NOEXCEPT
 #undef fpclassify
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_floating_point<_A1>::value, int>::type
 fpclassify(_A1 __lcpp_x) _NOEXCEPT
 {
-    return __libcpp_fpclassify((typename std::__promote<_A1>::type)__lcpp_x);
+    return __LIBCUDACXX_fpclassify((typename std::__promote<_A1>::type)__lcpp_x);
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, int>::type
 fpclassify(_A1 __lcpp_x) _NOEXCEPT
 { return __lcpp_x == 0 ? FP_ZERO : FP_NORMAL; }
 
-#elif defined(_LIBCPP_MSVCRT)
+#elif defined(_LIBCUDACXX_MSVCRT)
 
 template <typename _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
 fpclassify(_A1 __lcpp_x) _NOEXCEPT
 {
@@ -420,7 +420,7 @@ fpclassify(_A1 __lcpp_x) _NOEXCEPT
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, int>::type
 fpclassify(_A1 __lcpp_x) _NOEXCEPT
 { return __lcpp_x == 0 ? FP_ZERO : FP_NORMAL; }
@@ -432,9 +432,9 @@ fpclassify(_A1 __lcpp_x) _NOEXCEPT
 #ifdef isfinite
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
-__libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT
+__LIBCUDACXX_isfinite(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_isfinite)
     return __builtin_isfinite(__lcpp_x);
@@ -446,17 +446,17 @@ __libcpp_isfinite(_A1 __lcpp_x) _NOEXCEPT
 #undef isfinite
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<
     std::is_arithmetic<_A1>::value && std::numeric_limits<_A1>::has_infinity,
     bool>::type
 isfinite(_A1 __lcpp_x) _NOEXCEPT
 {
-    return __libcpp_isfinite((typename std::__promote<_A1>::type)__lcpp_x);
+    return __LIBCUDACXX_isfinite((typename std::__promote<_A1>::type)__lcpp_x);
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<
     std::is_arithmetic<_A1>::value && !std::numeric_limits<_A1>::has_infinity,
     bool>::type
@@ -470,9 +470,9 @@ isfinite(_A1) _NOEXCEPT
 #ifdef isinf
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
-__libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT
+__LIBCUDACXX_isinf(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_isinf)
     return __builtin_isinf(__lcpp_x);
@@ -484,35 +484,35 @@ __libcpp_isinf(_A1 __lcpp_x) _NOEXCEPT
 #undef isinf
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<
     std::is_arithmetic<_A1>::value && std::numeric_limits<_A1>::has_infinity,
     bool>::type
 isinf(_A1 __lcpp_x) _NOEXCEPT
 {
-    return __libcpp_isinf((typename std::__promote<_A1>::type)__lcpp_x);
+    return __LIBCUDACXX_isinf((typename std::__promote<_A1>::type)__lcpp_x);
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<
     std::is_arithmetic<_A1>::value && !std::numeric_limits<_A1>::has_infinity,
     bool>::type
 isinf(_A1) _NOEXCEPT
 { return false; }
 
-#ifdef _LIBCPP_PREFERRED_OVERLOAD
-inline _LIBCPP_INLINE_VISIBILITY
+#ifdef _LIBCUDACXX_PREFERRED_OVERLOAD
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
-isinf(float __lcpp_x) _NOEXCEPT { return __libcpp_isinf(__lcpp_x); }
+isinf(float __lcpp_x) _NOEXCEPT { return __LIBCUDACXX_isinf(__lcpp_x); }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
 bool
-isinf(double __lcpp_x) _NOEXCEPT { return __libcpp_isinf(__lcpp_x); }
+isinf(double __lcpp_x) _NOEXCEPT { return __LIBCUDACXX_isinf(__lcpp_x); }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
-isinf(long double __lcpp_x) _NOEXCEPT { return __libcpp_isinf(__lcpp_x); }
+isinf(long double __lcpp_x) _NOEXCEPT { return __LIBCUDACXX_isinf(__lcpp_x); }
 #endif
 
 #endif // isinf
@@ -522,9 +522,9 @@ isinf(long double __lcpp_x) _NOEXCEPT { return __libcpp_isinf(__lcpp_x); }
 #ifdef isnan
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
-__libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
+__LIBCUDACXX_isnan(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_isnan)
     return __builtin_isnan(__lcpp_x);
@@ -536,31 +536,31 @@ __libcpp_isnan(_A1 __lcpp_x) _NOEXCEPT
 #undef isnan
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
 isnan(_A1 __lcpp_x) _NOEXCEPT
 {
-    return __libcpp_isnan((typename std::__promote<_A1>::type)__lcpp_x);
+    return __LIBCUDACXX_isnan((typename std::__promote<_A1>::type)__lcpp_x);
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, bool>::type
 isnan(_A1) _NOEXCEPT
 { return false; }
 
-#ifdef _LIBCPP_PREFERRED_OVERLOAD
-inline _LIBCPP_INLINE_VISIBILITY
+#ifdef _LIBCUDACXX_PREFERRED_OVERLOAD
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
-isnan(float __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); }
+isnan(float __lcpp_x) _NOEXCEPT { return __LIBCUDACXX_isnan(__lcpp_x); }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
 bool
-isnan(double __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); }
+isnan(double __lcpp_x) _NOEXCEPT { return __LIBCUDACXX_isnan(__lcpp_x); }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
-isnan(long double __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); }
+isnan(long double __lcpp_x) _NOEXCEPT { return __LIBCUDACXX_isnan(__lcpp_x); }
 #endif
 
 #endif // isnan
@@ -570,9 +570,9 @@ isnan(long double __lcpp_x) _NOEXCEPT { return __libcpp_isnan(__lcpp_x); }
 #ifdef isnormal
 
 template <class _A1>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
-__libcpp_isnormal(_A1 __lcpp_x) _NOEXCEPT
+__LIBCUDACXX_isnormal(_A1 __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_isnormal)
     return __builtin_isnormal(__lcpp_x);
@@ -584,15 +584,15 @@ __libcpp_isnormal(_A1 __lcpp_x) _NOEXCEPT
 #undef isnormal
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_floating_point<_A1>::value, bool>::type
 isnormal(_A1 __lcpp_x) _NOEXCEPT
 {
-    return __libcpp_isnormal((typename std::__promote<_A1>::type)__lcpp_x);
+    return __LIBCUDACXX_isnormal((typename std::__promote<_A1>::type)__lcpp_x);
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, bool>::type
 isnormal(_A1 __lcpp_x) _NOEXCEPT
 { return __lcpp_x != 0; }
@@ -604,9 +604,9 @@ isnormal(_A1 __lcpp_x) _NOEXCEPT
 #ifdef isgreater
 
 template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
-__libcpp_isgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+__LIBCUDACXX_isgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     return isgreater(__lcpp_x, __lcpp_y);
 }
@@ -614,7 +614,7 @@ __libcpp_isgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 #undef isgreater
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if
 <
     std::is_arithmetic<_A1>::value &&
@@ -624,7 +624,7 @@ typename std::enable_if
 isgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     typedef typename std::__promote<_A1, _A2>::type type;
-    return __libcpp_isgreater((type)__lcpp_x, (type)__lcpp_y);
+    return __LIBCUDACXX_isgreater((type)__lcpp_x, (type)__lcpp_y);
 }
 
 #endif // isgreater
@@ -634,9 +634,9 @@ isgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 #ifdef isgreaterequal
 
 template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
-__libcpp_isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+__LIBCUDACXX_isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     return isgreaterequal(__lcpp_x, __lcpp_y);
 }
@@ -644,7 +644,7 @@ __libcpp_isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 #undef isgreaterequal
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if
 <
     std::is_arithmetic<_A1>::value &&
@@ -654,7 +654,7 @@ typename std::enable_if
 isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     typedef typename std::__promote<_A1, _A2>::type type;
-    return __libcpp_isgreaterequal((type)__lcpp_x, (type)__lcpp_y);
+    return __LIBCUDACXX_isgreaterequal((type)__lcpp_x, (type)__lcpp_y);
 }
 
 #endif // isgreaterequal
@@ -664,9 +664,9 @@ isgreaterequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 #ifdef isless
 
 template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
-__libcpp_isless(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+__LIBCUDACXX_isless(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     return isless(__lcpp_x, __lcpp_y);
 }
@@ -674,7 +674,7 @@ __libcpp_isless(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 #undef isless
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if
 <
     std::is_arithmetic<_A1>::value &&
@@ -684,7 +684,7 @@ typename std::enable_if
 isless(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     typedef typename std::__promote<_A1, _A2>::type type;
-    return __libcpp_isless((type)__lcpp_x, (type)__lcpp_y);
+    return __LIBCUDACXX_isless((type)__lcpp_x, (type)__lcpp_y);
 }
 
 #endif // isless
@@ -694,9 +694,9 @@ isless(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 #ifdef islessequal
 
 template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
-__libcpp_islessequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+__LIBCUDACXX_islessequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     return islessequal(__lcpp_x, __lcpp_y);
 }
@@ -704,7 +704,7 @@ __libcpp_islessequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 #undef islessequal
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if
 <
     std::is_arithmetic<_A1>::value &&
@@ -714,7 +714,7 @@ typename std::enable_if
 islessequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     typedef typename std::__promote<_A1, _A2>::type type;
-    return __libcpp_islessequal((type)__lcpp_x, (type)__lcpp_y);
+    return __LIBCUDACXX_islessequal((type)__lcpp_x, (type)__lcpp_y);
 }
 
 #endif // islessequal
@@ -724,9 +724,9 @@ islessequal(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 #ifdef islessgreater
 
 template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
-__libcpp_islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+__LIBCUDACXX_islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     return islessgreater(__lcpp_x, __lcpp_y);
 }
@@ -734,7 +734,7 @@ __libcpp_islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 #undef islessgreater
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if
 <
     std::is_arithmetic<_A1>::value &&
@@ -744,7 +744,7 @@ typename std::enable_if
 islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     typedef typename std::__promote<_A1, _A2>::type type;
-    return __libcpp_islessgreater((type)__lcpp_x, (type)__lcpp_y);
+    return __LIBCUDACXX_islessgreater((type)__lcpp_x, (type)__lcpp_y);
 }
 
 #endif // islessgreater
@@ -754,9 +754,9 @@ islessgreater(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 #ifdef isunordered
 
 template <class _A1, class _A2>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
-__libcpp_isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
+__LIBCUDACXX_isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     return isunordered(__lcpp_x, __lcpp_y);
 }
@@ -764,7 +764,7 @@ __libcpp_isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 #undef isunordered
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if
 <
     std::is_arithmetic<_A1>::value &&
@@ -774,7 +774,7 @@ typename std::enable_if
 isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 {
     typedef typename std::__promote<_A1, _A2>::type type;
-    return __libcpp_isunordered((type)__lcpp_x, (type)__lcpp_y);
+    return __LIBCUDACXX_isunordered((type)__lcpp_x, (type)__lcpp_y);
 }
 
 #endif // isunordered
@@ -790,48 +790,48 @@ isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 // acos
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       acos(float __lcpp_x) _NOEXCEPT       {return ::acosf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return ::acosl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       acos(float __lcpp_x) _NOEXCEPT       {return ::acosf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return ::acosl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 acos(_A1 __lcpp_x) _NOEXCEPT {return ::acos((double)__lcpp_x);}
 
 // asin
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       asin(float __lcpp_x) _NOEXCEPT       {return ::asinf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double asin(long double __lcpp_x) _NOEXCEPT {return ::asinl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       asin(float __lcpp_x) _NOEXCEPT       {return ::asinf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double asin(long double __lcpp_x) _NOEXCEPT {return ::asinl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 asin(_A1 __lcpp_x) _NOEXCEPT {return ::asin((double)__lcpp_x);}
 
 // atan
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       atan(float __lcpp_x) _NOEXCEPT       {return ::atanf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double atan(long double __lcpp_x) _NOEXCEPT {return ::atanl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       atan(float __lcpp_x) _NOEXCEPT       {return ::atanf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double atan(long double __lcpp_x) _NOEXCEPT {return ::atanl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 atan(_A1 __lcpp_x) _NOEXCEPT {return ::atan((double)__lcpp_x);}
 
 // atan2
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       atan2(float __lcpp_y, float __lcpp_x) _NOEXCEPT             {return ::atan2f(__lcpp_y, __lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double atan2(long double __lcpp_y, long double __lcpp_x) _NOEXCEPT {return ::atan2l(__lcpp_y, __lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       atan2(float __lcpp_y, float __lcpp_x) _NOEXCEPT             {return ::atan2f(__lcpp_y, __lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double atan2(long double __lcpp_y, long double __lcpp_x) _NOEXCEPT {return ::atan2l(__lcpp_y, __lcpp_x);}
 #    endif
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -849,84 +849,84 @@ atan2(_A1 __lcpp_y, _A2 __lcpp_x) _NOEXCEPT
 // ceil
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       ceil(float __lcpp_x) _NOEXCEPT       {return ::ceilf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double ceil(long double __lcpp_x) _NOEXCEPT {return ::ceill(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       ceil(float __lcpp_x) _NOEXCEPT       {return ::ceilf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double ceil(long double __lcpp_x) _NOEXCEPT {return ::ceill(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 ceil(_A1 __lcpp_x) _NOEXCEPT {return ::ceil((double)__lcpp_x);}
 
 // cos
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       cos(float __lcpp_x) _NOEXCEPT       {return ::cosf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double cos(long double __lcpp_x) _NOEXCEPT {return ::cosl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       cos(float __lcpp_x) _NOEXCEPT       {return ::cosf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double cos(long double __lcpp_x) _NOEXCEPT {return ::cosl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 cos(_A1 __lcpp_x) _NOEXCEPT {return ::cos((double)__lcpp_x);}
 
 // cosh
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       cosh(float __lcpp_x) _NOEXCEPT       {return ::coshf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double cosh(long double __lcpp_x) _NOEXCEPT {return ::coshl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       cosh(float __lcpp_x) _NOEXCEPT       {return ::coshf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double cosh(long double __lcpp_x) _NOEXCEPT {return ::coshl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 cosh(_A1 __lcpp_x) _NOEXCEPT {return ::cosh((double)__lcpp_x);}
 
 // exp
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       exp(float __lcpp_x) _NOEXCEPT       {return ::expf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double exp(long double __lcpp_x) _NOEXCEPT {return ::expl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       exp(float __lcpp_x) _NOEXCEPT       {return ::expf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double exp(long double __lcpp_x) _NOEXCEPT {return ::expl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 exp(_A1 __lcpp_x) _NOEXCEPT {return ::exp((double)__lcpp_x);}
 
 // fabs
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       fabs(float __lcpp_x) _NOEXCEPT       {return ::fabsf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double fabs(long double __lcpp_x) _NOEXCEPT {return ::fabsl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       fabs(float __lcpp_x) _NOEXCEPT       {return ::fabsf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double fabs(long double __lcpp_x) _NOEXCEPT {return ::fabsl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 fabs(_A1 __lcpp_x) _NOEXCEPT {return ::fabs((double)__lcpp_x);}
 
 // floor
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       floor(float __lcpp_x) _NOEXCEPT       {return ::floorf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double floor(long double __lcpp_x) _NOEXCEPT {return ::floorl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       floor(float __lcpp_x) _NOEXCEPT       {return ::floorf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double floor(long double __lcpp_x) _NOEXCEPT {return ::floorl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 floor(_A1 __lcpp_x) _NOEXCEPT {return ::floor((double)__lcpp_x);}
 
 // fmod
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       fmod(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::fmodf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fmod(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmodl(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       fmod(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::fmodf(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double fmod(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmodl(__lcpp_x, __lcpp_y);}
 #    endif
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -944,67 +944,67 @@ fmod(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 // frexp
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       frexp(float __lcpp_x, int* __lcpp_e) _NOEXCEPT       {return ::frexpf(__lcpp_x, __lcpp_e);}
-inline _LIBCPP_INLINE_VISIBILITY long double frexp(long double __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexpl(__lcpp_x, __lcpp_e);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       frexp(float __lcpp_x, int* __lcpp_e) _NOEXCEPT       {return ::frexpf(__lcpp_x, __lcpp_e);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double frexp(long double __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexpl(__lcpp_x, __lcpp_e);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 frexp(_A1 __lcpp_x, int* __lcpp_e) _NOEXCEPT {return ::frexp((double)__lcpp_x, __lcpp_e);}
 
 // ldexp
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       ldexp(float __lcpp_x, int __lcpp_e) _NOEXCEPT       {return ::ldexpf(__lcpp_x, __lcpp_e);}
-inline _LIBCPP_INLINE_VISIBILITY long double ldexp(long double __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexpl(__lcpp_x, __lcpp_e);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       ldexp(float __lcpp_x, int __lcpp_e) _NOEXCEPT       {return ::ldexpf(__lcpp_x, __lcpp_e);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double ldexp(long double __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexpl(__lcpp_x, __lcpp_e);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 ldexp(_A1 __lcpp_x, int __lcpp_e) _NOEXCEPT {return ::ldexp((double)__lcpp_x, __lcpp_e);}
 
 // log
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       log(float __lcpp_x) _NOEXCEPT       {return ::logf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return ::logl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       log(float __lcpp_x) _NOEXCEPT       {return ::logf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double log(long double __lcpp_x) _NOEXCEPT {return ::logl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 log(_A1 __lcpp_x) _NOEXCEPT {return ::log((double)__lcpp_x);}
 
 // log10
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       log10(float __lcpp_x) _NOEXCEPT       {return ::log10f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log10(long double __lcpp_x) _NOEXCEPT {return ::log10l(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       log10(float __lcpp_x) _NOEXCEPT       {return ::log10f(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double log10(long double __lcpp_x) _NOEXCEPT {return ::log10l(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 log10(_A1 __lcpp_x) _NOEXCEPT {return ::log10((double)__lcpp_x);}
 
 // modf
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       modf(float __lcpp_x, float* __lcpp_y) _NOEXCEPT             {return ::modff(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double modf(long double __lcpp_x, long double* __lcpp_y) _NOEXCEPT {return ::modfl(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       modf(float __lcpp_x, float* __lcpp_y) _NOEXCEPT             {return ::modff(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double modf(long double __lcpp_x, long double* __lcpp_y) _NOEXCEPT {return ::modfl(__lcpp_x, __lcpp_y);}
 #    endif
 
 // pow
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       pow(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::powf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double pow(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::powl(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       pow(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::powf(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double pow(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::powl(__lcpp_x, __lcpp_y);}
 #    endif
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -1022,109 +1022,109 @@ pow(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 // sin
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       sin(float __lcpp_x) _NOEXCEPT       {return ::sinf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double sin(long double __lcpp_x) _NOEXCEPT {return ::sinl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       sin(float __lcpp_x) _NOEXCEPT       {return ::sinf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double sin(long double __lcpp_x) _NOEXCEPT {return ::sinl(__lcpp_x);}
 #endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 sin(_A1 __lcpp_x) _NOEXCEPT {return ::sin((double)__lcpp_x);}
 
 // sinh
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       sinh(float __lcpp_x) _NOEXCEPT       {return ::sinhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double sinh(long double __lcpp_x) _NOEXCEPT {return ::sinhl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       sinh(float __lcpp_x) _NOEXCEPT       {return ::sinhf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double sinh(long double __lcpp_x) _NOEXCEPT {return ::sinhl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 sinh(_A1 __lcpp_x) _NOEXCEPT {return ::sinh((double)__lcpp_x);}
 
 // sqrt
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       sqrt(float __lcpp_x) _NOEXCEPT       {return ::sqrtf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double sqrt(long double __lcpp_x) _NOEXCEPT {return ::sqrtl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       sqrt(float __lcpp_x) _NOEXCEPT       {return ::sqrtf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double sqrt(long double __lcpp_x) _NOEXCEPT {return ::sqrtl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 sqrt(_A1 __lcpp_x) _NOEXCEPT {return ::sqrt((double)__lcpp_x);}
 
 // tan
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       tan(float __lcpp_x) _NOEXCEPT       {return ::tanf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double tan(long double __lcpp_x) _NOEXCEPT {return ::tanl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       tan(float __lcpp_x) _NOEXCEPT       {return ::tanf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double tan(long double __lcpp_x) _NOEXCEPT {return ::tanl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 tan(_A1 __lcpp_x) _NOEXCEPT {return ::tan((double)__lcpp_x);}
 
 // tanh
 
 #    if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float       tanh(float __lcpp_x) _NOEXCEPT       {return ::tanhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double tanh(long double __lcpp_x) _NOEXCEPT {return ::tanhl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       tanh(float __lcpp_x) _NOEXCEPT       {return ::tanhf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double tanh(long double __lcpp_x) _NOEXCEPT {return ::tanhl(__lcpp_x);}
 #    endif
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 tanh(_A1 __lcpp_x) _NOEXCEPT {return ::tanh((double)__lcpp_x);}
 
 // acosh
 
-inline _LIBCPP_INLINE_VISIBILITY float       acosh(float __lcpp_x) _NOEXCEPT       {return ::acoshf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double acosh(long double __lcpp_x) _NOEXCEPT {return ::acoshl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       acosh(float __lcpp_x) _NOEXCEPT       {return ::acoshf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double acosh(long double __lcpp_x) _NOEXCEPT {return ::acoshl(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 acosh(_A1 __lcpp_x) _NOEXCEPT {return ::acosh((double)__lcpp_x);}
 
 // asinh
 
-inline _LIBCPP_INLINE_VISIBILITY float       asinh(float __lcpp_x) _NOEXCEPT       {return ::asinhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double asinh(long double __lcpp_x) _NOEXCEPT {return ::asinhl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       asinh(float __lcpp_x) _NOEXCEPT       {return ::asinhf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double asinh(long double __lcpp_x) _NOEXCEPT {return ::asinhl(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 asinh(_A1 __lcpp_x) _NOEXCEPT {return ::asinh((double)__lcpp_x);}
 
 // atanh
 
-inline _LIBCPP_INLINE_VISIBILITY float       atanh(float __lcpp_x) _NOEXCEPT       {return ::atanhf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double atanh(long double __lcpp_x) _NOEXCEPT {return ::atanhl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       atanh(float __lcpp_x) _NOEXCEPT       {return ::atanhf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double atanh(long double __lcpp_x) _NOEXCEPT {return ::atanhl(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 atanh(_A1 __lcpp_x) _NOEXCEPT {return ::atanh((double)__lcpp_x);}
 
 // cbrt
 
-inline _LIBCPP_INLINE_VISIBILITY float       cbrt(float __lcpp_x) _NOEXCEPT       {return ::cbrtf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return ::cbrtl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       cbrt(float __lcpp_x) _NOEXCEPT       {return ::cbrtf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double cbrt(long double __lcpp_x) _NOEXCEPT {return ::cbrtl(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 cbrt(_A1 __lcpp_x) _NOEXCEPT {return ::cbrt((double)__lcpp_x);}
 
 // copysign
 
 #if __has_builtin(__builtin_copysignf)
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 #endif
-inline _LIBCPP_INLINE_VISIBILITY float __libcpp_copysign(float __lcpp_x, float __lcpp_y) _NOEXCEPT {
+inline _LIBCUDACXX_INLINE_VISIBILITY float __LIBCUDACXX_copysign(float __lcpp_x, float __lcpp_y) _NOEXCEPT {
 #if __has_builtin(__builtin_copysignf)
   return __builtin_copysignf(__lcpp_x, __lcpp_y);
 #else
@@ -1133,9 +1133,9 @@ inline _LIBCPP_INLINE_VISIBILITY float __libcpp_copysign(float __lcpp_x, float _
 }
 
 #if __has_builtin(__builtin_copysign)
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 #endif
-inline _LIBCPP_INLINE_VISIBILITY double __libcpp_copysign(double __lcpp_x, double __lcpp_y) _NOEXCEPT {
+inline _LIBCUDACXX_INLINE_VISIBILITY double __LIBCUDACXX_copysign(double __lcpp_x, double __lcpp_y) _NOEXCEPT {
 #if __has_builtin(__builtin_copysign)
   return __builtin_copysign(__lcpp_x, __lcpp_y);
 #else
@@ -1144,9 +1144,9 @@ inline _LIBCPP_INLINE_VISIBILITY double __libcpp_copysign(double __lcpp_x, doubl
 }
 
 #if __has_builtin(__builtin_copysignl)
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 #endif
-inline _LIBCPP_INLINE_VISIBILITY long double __libcpp_copysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {
+inline _LIBCUDACXX_INLINE_VISIBILITY long double __LIBCUDACXX_copysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {
 #if __has_builtin(__builtin_copysignl)
   return __builtin_copysignl(__lcpp_x, __lcpp_y);
 #else
@@ -1156,16 +1156,16 @@ inline _LIBCPP_INLINE_VISIBILITY long double __libcpp_copysign(long double __lcp
 
 template <class _A1, class _A2>
 #if __has_builtin(__builtin_copysign)
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 #endif
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
     std::is_arithmetic<_A2>::value,
     std::__promote<_A1, _A2>
 >::type
-__libcpp_copysign(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT {
+__LIBCUDACXX_copysign(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT {
     typedef typename std::__promote<_A1, _A2>::type __result_type;
     static_assert((!(std::_IsSame<_A1, __result_type>::value &&
                      std::_IsSame<_A2, __result_type>::value)), "");
@@ -1176,16 +1176,16 @@ __libcpp_copysign(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT {
 #endif
 }
 
-inline _LIBCPP_INLINE_VISIBILITY float copysign(float __lcpp_x, float __lcpp_y) _NOEXCEPT {
-  return ::__libcpp_copysign(__lcpp_x, __lcpp_y);
+inline _LIBCUDACXX_INLINE_VISIBILITY float copysign(float __lcpp_x, float __lcpp_y) _NOEXCEPT {
+  return ::__LIBCUDACXX_copysign(__lcpp_x, __lcpp_y);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY long double copysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {
-  return ::__libcpp_copysign(__lcpp_x, __lcpp_y);
+inline _LIBCUDACXX_INLINE_VISIBILITY long double copysign(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {
+  return ::__LIBCUDACXX_copysign(__lcpp_x, __lcpp_y);
 }
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -1193,56 +1193,56 @@ typename std::__enable_if_t
     std::__promote<_A1, _A2>
 >::type
     copysign(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT {
-  return ::__libcpp_copysign(__lcpp_x, __lcpp_y);
+  return ::__LIBCUDACXX_copysign(__lcpp_x, __lcpp_y);
 }
 
 // erf
 
-inline _LIBCPP_INLINE_VISIBILITY float       erf(float __lcpp_x) _NOEXCEPT       {return ::erff(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double erf(long double __lcpp_x) _NOEXCEPT {return ::erfl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       erf(float __lcpp_x) _NOEXCEPT       {return ::erff(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double erf(long double __lcpp_x) _NOEXCEPT {return ::erfl(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 erf(_A1 __lcpp_x) _NOEXCEPT {return ::erf((double)__lcpp_x);}
 
 // erfc
 
-inline _LIBCPP_INLINE_VISIBILITY float       erfc(float __lcpp_x) _NOEXCEPT       {return ::erfcf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double erfc(long double __lcpp_x) _NOEXCEPT {return ::erfcl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       erfc(float __lcpp_x) _NOEXCEPT       {return ::erfcf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double erfc(long double __lcpp_x) _NOEXCEPT {return ::erfcl(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 erfc(_A1 __lcpp_x) _NOEXCEPT {return ::erfc((double)__lcpp_x);}
 
 // exp2
 
-inline _LIBCPP_INLINE_VISIBILITY float       exp2(float __lcpp_x) _NOEXCEPT       {return ::exp2f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double exp2(long double __lcpp_x) _NOEXCEPT {return ::exp2l(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       exp2(float __lcpp_x) _NOEXCEPT       {return ::exp2f(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double exp2(long double __lcpp_x) _NOEXCEPT {return ::exp2l(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 exp2(_A1 __lcpp_x) _NOEXCEPT {return ::exp2((double)__lcpp_x);}
 
 // expm1
 
-inline _LIBCPP_INLINE_VISIBILITY float       expm1(float __lcpp_x) _NOEXCEPT       {return ::expm1f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double expm1(long double __lcpp_x) _NOEXCEPT {return ::expm1l(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       expm1(float __lcpp_x) _NOEXCEPT       {return ::expm1f(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double expm1(long double __lcpp_x) _NOEXCEPT {return ::expm1l(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 expm1(_A1 __lcpp_x) _NOEXCEPT {return ::expm1((double)__lcpp_x);}
 
 // fdim
 
-inline _LIBCPP_INLINE_VISIBILITY float       fdim(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::fdimf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fdim(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fdiml(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       fdim(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::fdimf(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double fdim(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fdiml(__lcpp_x, __lcpp_y);}
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -1259,7 +1259,7 @@ fdim(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 
 // fma
 
-inline _LIBCPP_INLINE_VISIBILITY float       fma(float __lcpp_x, float __lcpp_y, float __lcpp_z) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY float       fma(float __lcpp_x, float __lcpp_y, float __lcpp_z) _NOEXCEPT
 {
 #if __has_builtin(__builtin_fmaf)
     return __builtin_fmaf(__lcpp_x, __lcpp_y, __lcpp_z);
@@ -1267,7 +1267,7 @@ inline _LIBCPP_INLINE_VISIBILITY float       fma(float __lcpp_x, float __lcpp_y,
     return ::fmaf(__lcpp_x, __lcpp_y, __lcpp_z);
 #endif
 }
-inline _LIBCPP_INLINE_VISIBILITY long double fma(long double __lcpp_x, long double __lcpp_y, long double __lcpp_z) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long double fma(long double __lcpp_x, long double __lcpp_y, long double __lcpp_z) _NOEXCEPT
 {
 #if __has_builtin(__builtin_fmal)
     return __builtin_fmal(__lcpp_x, __lcpp_y, __lcpp_z);
@@ -1277,7 +1277,7 @@ inline _LIBCPP_INLINE_VISIBILITY long double fma(long double __lcpp_x, long doub
 }
 
 template <class _A1, class _A2, class _A3>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -1300,11 +1300,11 @@ fma(_A1 __lcpp_x, _A2 __lcpp_y, _A3 __lcpp_z) _NOEXCEPT
 
 // fmax
 
-inline _LIBCPP_INLINE_VISIBILITY float       fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::fmaxf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmaxl(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       fmax(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::fmaxf(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double fmax(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fmaxl(__lcpp_x, __lcpp_y);}
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -1321,11 +1321,11 @@ fmax(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 
 // fmin
 
-inline _LIBCPP_INLINE_VISIBILITY float       fmin(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::fminf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double fmin(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fminl(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       fmin(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::fminf(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double fmin(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::fminl(__lcpp_x, __lcpp_y);}
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -1342,11 +1342,11 @@ fmin(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 
 // hypot
 
-inline _LIBCPP_INLINE_VISIBILITY float       hypot(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::hypotf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double hypot(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::hypotl(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       hypot(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::hypotf(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double hypot(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::hypotl(__lcpp_x, __lcpp_y);}
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -1363,27 +1363,27 @@ hypot(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 
 // ilogb
 
-inline _LIBCPP_INLINE_VISIBILITY int ilogb(float __lcpp_x) _NOEXCEPT       {return ::ilogbf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY int ilogb(long double __lcpp_x) _NOEXCEPT {return ::ilogbl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY int ilogb(float __lcpp_x) _NOEXCEPT       {return ::ilogbf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY int ilogb(long double __lcpp_x) _NOEXCEPT {return ::ilogbl(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, int>::type
 ilogb(_A1 __lcpp_x) _NOEXCEPT {return ::ilogb((double)__lcpp_x);}
 
 // lgamma
 
-inline _LIBCPP_INLINE_VISIBILITY float       lgamma(float __lcpp_x) _NOEXCEPT       {return ::lgammaf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double lgamma(long double __lcpp_x) _NOEXCEPT {return ::lgammal(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       lgamma(float __lcpp_x) _NOEXCEPT       {return ::lgammaf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double lgamma(long double __lcpp_x) _NOEXCEPT {return ::lgammal(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 lgamma(_A1 __lcpp_x) _NOEXCEPT {return ::lgamma((double)__lcpp_x);}
 
 // llrint
 
-inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long long llrint(float __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_llrintf)
     return __builtin_llrintf(__lcpp_x);
@@ -1391,7 +1391,7 @@ inline _LIBCPP_INLINE_VISIBILITY long long llrint(float __lcpp_x) _NOEXCEPT
     return ::llrintf(__lcpp_x);
 #endif
 }
-inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long long llrint(long double __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_llrintl)
     return __builtin_llrintl(__lcpp_x);
@@ -1401,7 +1401,7 @@ inline _LIBCPP_INLINE_VISIBILITY long long llrint(long double __lcpp_x) _NOEXCEP
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, long long>::type
 llrint(_A1 __lcpp_x) _NOEXCEPT
 {
@@ -1414,7 +1414,7 @@ llrint(_A1 __lcpp_x) _NOEXCEPT
 
 // llround
 
-inline _LIBCPP_INLINE_VISIBILITY long long llround(float __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long long llround(float __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_llroundf)
     return __builtin_llroundf(__lcpp_x);
@@ -1422,7 +1422,7 @@ inline _LIBCPP_INLINE_VISIBILITY long long llround(float __lcpp_x) _NOEXCEPT
     return ::llroundf(__lcpp_x);
 #endif
 }
-inline _LIBCPP_INLINE_VISIBILITY long long llround(long double __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long long llround(long double __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_llroundl)
     return __builtin_llroundl(__lcpp_x);
@@ -1432,7 +1432,7 @@ inline _LIBCPP_INLINE_VISIBILITY long long llround(long double __lcpp_x) _NOEXCE
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, long long>::type
 llround(_A1 __lcpp_x) _NOEXCEPT
 {
@@ -1445,37 +1445,37 @@ llround(_A1 __lcpp_x) _NOEXCEPT
 
 // log1p
 
-inline _LIBCPP_INLINE_VISIBILITY float       log1p(float __lcpp_x) _NOEXCEPT       {return ::log1pf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log1p(long double __lcpp_x) _NOEXCEPT {return ::log1pl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       log1p(float __lcpp_x) _NOEXCEPT       {return ::log1pf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double log1p(long double __lcpp_x) _NOEXCEPT {return ::log1pl(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 log1p(_A1 __lcpp_x) _NOEXCEPT {return ::log1p((double)__lcpp_x);}
 
 // log2
 
-inline _LIBCPP_INLINE_VISIBILITY float       log2(float __lcpp_x) _NOEXCEPT       {return ::log2f(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return ::log2l(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       log2(float __lcpp_x) _NOEXCEPT       {return ::log2f(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double log2(long double __lcpp_x) _NOEXCEPT {return ::log2l(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 log2(_A1 __lcpp_x) _NOEXCEPT {return ::log2((double)__lcpp_x);}
 
 // logb
 
-inline _LIBCPP_INLINE_VISIBILITY float       logb(float __lcpp_x) _NOEXCEPT       {return ::logbf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEPT {return ::logbl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       logb(float __lcpp_x) _NOEXCEPT       {return ::logbf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double logb(long double __lcpp_x) _NOEXCEPT {return ::logbl(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 logb(_A1 __lcpp_x) _NOEXCEPT {return ::logb((double)__lcpp_x);}
 
 // lrint
 
-inline _LIBCPP_INLINE_VISIBILITY long lrint(float __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long lrint(float __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_lrintf)
     return __builtin_lrintf(__lcpp_x);
@@ -1483,7 +1483,7 @@ inline _LIBCPP_INLINE_VISIBILITY long lrint(float __lcpp_x) _NOEXCEPT
     return ::lrintf(__lcpp_x);
 #endif
 }
-inline _LIBCPP_INLINE_VISIBILITY long lrint(long double __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long lrint(long double __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_lrintl)
     return __builtin_lrintl(__lcpp_x);
@@ -1493,7 +1493,7 @@ inline _LIBCPP_INLINE_VISIBILITY long lrint(long double __lcpp_x) _NOEXCEPT
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, long>::type
 lrint(_A1 __lcpp_x) _NOEXCEPT
 {
@@ -1506,7 +1506,7 @@ lrint(_A1 __lcpp_x) _NOEXCEPT
 
 // lround
 
-inline _LIBCPP_INLINE_VISIBILITY long lround(float __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long lround(float __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_lroundf)
     return __builtin_lroundf(__lcpp_x);
@@ -1514,7 +1514,7 @@ inline _LIBCPP_INLINE_VISIBILITY long lround(float __lcpp_x) _NOEXCEPT
     return ::lroundf(__lcpp_x);
 #endif
 }
-inline _LIBCPP_INLINE_VISIBILITY long lround(long double __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long lround(long double __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_lroundl)
     return __builtin_lroundl(__lcpp_x);
@@ -1524,7 +1524,7 @@ inline _LIBCPP_INLINE_VISIBILITY long lround(long double __lcpp_x) _NOEXCEPT
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, long>::type
 lround(_A1 __lcpp_x) _NOEXCEPT
 {
@@ -1539,21 +1539,21 @@ lround(_A1 __lcpp_x) _NOEXCEPT
 
 // nearbyint
 
-inline _LIBCPP_INLINE_VISIBILITY float       nearbyint(float __lcpp_x) _NOEXCEPT       {return ::nearbyintf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double nearbyint(long double __lcpp_x) _NOEXCEPT {return ::nearbyintl(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       nearbyint(float __lcpp_x) _NOEXCEPT       {return ::nearbyintf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double nearbyint(long double __lcpp_x) _NOEXCEPT {return ::nearbyintl(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 nearbyint(_A1 __lcpp_x) _NOEXCEPT {return ::nearbyint((double)__lcpp_x);}
 
 // nextafter
 
-inline _LIBCPP_INLINE_VISIBILITY float       nextafter(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::nextafterf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double nextafter(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nextafterl(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       nextafter(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::nextafterf(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double nextafter(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nextafterl(__lcpp_x, __lcpp_y);}
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -1570,21 +1570,21 @@ nextafter(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 
 // nexttoward
 
-inline _LIBCPP_INLINE_VISIBILITY float       nexttoward(float __lcpp_x, long double __lcpp_y) _NOEXCEPT       {return ::nexttowardf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttowardl(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       nexttoward(float __lcpp_x, long double __lcpp_y) _NOEXCEPT       {return ::nexttowardf(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double nexttoward(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttowardl(__lcpp_x, __lcpp_y);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 nexttoward(_A1 __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::nexttoward((double)__lcpp_x, __lcpp_y);}
 
 // remainder
 
-inline _LIBCPP_INLINE_VISIBILITY float       remainder(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::remainderf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double remainder(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::remainderl(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       remainder(float __lcpp_x, float __lcpp_y) _NOEXCEPT             {return ::remainderf(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double remainder(long double __lcpp_x, long double __lcpp_y) _NOEXCEPT {return ::remainderl(__lcpp_x, __lcpp_y);}
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -1601,11 +1601,11 @@ remainder(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
 
 // remquo
 
-inline _LIBCPP_INLINE_VISIBILITY float       remquo(float __lcpp_x, float __lcpp_y, int* __lcpp_z) _NOEXCEPT             {return ::remquof(__lcpp_x, __lcpp_y, __lcpp_z);}
-inline _LIBCPP_INLINE_VISIBILITY long double remquo(long double __lcpp_x, long double __lcpp_y, int* __lcpp_z) _NOEXCEPT {return ::remquol(__lcpp_x, __lcpp_y, __lcpp_z);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       remquo(float __lcpp_x, float __lcpp_y, int* __lcpp_z) _NOEXCEPT             {return ::remquof(__lcpp_x, __lcpp_y, __lcpp_z);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double remquo(long double __lcpp_x, long double __lcpp_y, int* __lcpp_z) _NOEXCEPT {return ::remquol(__lcpp_x, __lcpp_y, __lcpp_z);}
 
 template <class _A1, class _A2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::__enable_if_t
 <
     std::is_arithmetic<_A1>::value &&
@@ -1622,7 +1622,7 @@ remquo(_A1 __lcpp_x, _A2 __lcpp_y, int* __lcpp_z) _NOEXCEPT
 
 // rint
 
-inline _LIBCPP_INLINE_VISIBILITY float       rint(float __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY float       rint(float __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_rintf)
     return __builtin_rintf(__lcpp_x);
@@ -1630,7 +1630,7 @@ inline _LIBCPP_INLINE_VISIBILITY float       rint(float __lcpp_x) _NOEXCEPT
     return ::rintf(__lcpp_x);
 #endif
 }
-inline _LIBCPP_INLINE_VISIBILITY long double rint(long double __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long double rint(long double __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_rintl)
     return __builtin_rintl(__lcpp_x);
@@ -1640,7 +1640,7 @@ inline _LIBCPP_INLINE_VISIBILITY long double rint(long double __lcpp_x) _NOEXCEP
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 rint(_A1 __lcpp_x) _NOEXCEPT
 {
@@ -1653,7 +1653,7 @@ rint(_A1 __lcpp_x) _NOEXCEPT
 
 // round
 
-inline _LIBCPP_INLINE_VISIBILITY float       round(float __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY float       round(float __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_round)
     return __builtin_round(__lcpp_x);
@@ -1661,7 +1661,7 @@ inline _LIBCPP_INLINE_VISIBILITY float       round(float __lcpp_x) _NOEXCEPT
     return ::round(__lcpp_x);
 #endif
 }
-inline _LIBCPP_INLINE_VISIBILITY long double round(long double __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long double round(long double __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_roundl)
     return __builtin_roundl(__lcpp_x);
@@ -1671,7 +1671,7 @@ inline _LIBCPP_INLINE_VISIBILITY long double round(long double __lcpp_x) _NOEXCE
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 round(_A1 __lcpp_x) _NOEXCEPT
 {
@@ -1684,37 +1684,37 @@ round(_A1 __lcpp_x) _NOEXCEPT
 
 // scalbln
 
-inline _LIBCPP_INLINE_VISIBILITY float       scalbln(float __lcpp_x, long __lcpp_y) _NOEXCEPT       {return ::scalblnf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double scalbln(long double __lcpp_x, long __lcpp_y) _NOEXCEPT {return ::scalblnl(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       scalbln(float __lcpp_x, long __lcpp_y) _NOEXCEPT       {return ::scalblnf(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double scalbln(long double __lcpp_x, long __lcpp_y) _NOEXCEPT {return ::scalblnl(__lcpp_x, __lcpp_y);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 scalbln(_A1 __lcpp_x, long __lcpp_y) _NOEXCEPT {return ::scalbln((double)__lcpp_x, __lcpp_y);}
 
 // scalbn
 
-inline _LIBCPP_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return ::scalbnf(__lcpp_x, __lcpp_y);}
-inline _LIBCPP_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnl(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       scalbn(float __lcpp_x, int __lcpp_y) _NOEXCEPT       {return ::scalbnf(__lcpp_x, __lcpp_y);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double scalbn(long double __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbnl(__lcpp_x, __lcpp_y);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 scalbn(_A1 __lcpp_x, int __lcpp_y) _NOEXCEPT {return ::scalbn((double)__lcpp_x, __lcpp_y);}
 
 // tgamma
 
-inline _LIBCPP_INLINE_VISIBILITY float       tgamma(float __lcpp_x) _NOEXCEPT       {return ::tgammaf(__lcpp_x);}
-inline _LIBCPP_INLINE_VISIBILITY long double tgamma(long double __lcpp_x) _NOEXCEPT {return ::tgammal(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY float       tgamma(float __lcpp_x) _NOEXCEPT       {return ::tgammaf(__lcpp_x);}
+inline _LIBCUDACXX_INLINE_VISIBILITY long double tgamma(long double __lcpp_x) _NOEXCEPT {return ::tgammal(__lcpp_x);}
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 tgamma(_A1 __lcpp_x) _NOEXCEPT {return ::tgamma((double)__lcpp_x);}
 
 // trunc
 
-inline _LIBCPP_INLINE_VISIBILITY float       trunc(float __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY float       trunc(float __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_trunc)
     return __builtin_trunc(__lcpp_x);
@@ -1722,7 +1722,7 @@ inline _LIBCPP_INLINE_VISIBILITY float       trunc(float __lcpp_x) _NOEXCEPT
     return ::trunc(__lcpp_x);
 #endif
 }
-inline _LIBCPP_INLINE_VISIBILITY long double trunc(long double __lcpp_x) _NOEXCEPT
+inline _LIBCUDACXX_INLINE_VISIBILITY long double trunc(long double __lcpp_x) _NOEXCEPT
 {
 #if __has_builtin(__builtin_truncl)
     return __builtin_truncl(__lcpp_x);
@@ -1732,7 +1732,7 @@ inline _LIBCPP_INLINE_VISIBILITY long double trunc(long double __lcpp_x) _NOEXCE
 }
 
 template <class _A1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename std::enable_if<std::is_integral<_A1>::value, double>::type
 trunc(_A1 __lcpp_x) _NOEXCEPT
 {
@@ -1747,7 +1747,7 @@ trunc(_A1 __lcpp_x) _NOEXCEPT
 
 #endif // __cplusplus
 
-#else // _LIBCPP_MATH_H
+#else // _LIBCUDACXX_MATH_H
 
 // This include lives outside the header guard in order to support an MSVC
 // extension which allows users to do:
@@ -1757,8 +1757,8 @@ trunc(_A1 __lcpp_x) _NOEXCEPT
 //
 // and receive the definitions of mathematical constants, even if <math.h>
 // has previously been included.
-#if defined(_LIBCPP_MSVCRT) && defined(_USE_MATH_DEFINES)
+#if defined(_LIBCUDACXX_MSVCRT) && defined(_USE_MATH_DEFINES)
 #include_next <math.h>
 #endif
 
-#endif // _LIBCPP_MATH_H
+#endif // _LIBCUDACXX_MATH_H

diff  --git a/libcxx/include/memory b/libcxx/include/memory
index a986d76c8b4e..71d984c10678 100644
--- a/libcxx/include/memory
+++ b/libcxx/include/memory
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_MEMORY
-#define _LIBCPP_MEMORY
+#ifndef _LIBCUDACXX_MEMORY
+#define _LIBCUDACXX_MEMORY
 
 /*
     memory synopsis
@@ -873,7 +873,7 @@ template<size_t N, class T>
 #include <typeinfo>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <iterator>
 #  include <utility>
 #endif
@@ -881,11 +881,11 @@ template<size_t N, class T>
 // standard-mandated includes
 #include <compare>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 struct __destruct_n
 {
@@ -893,45 +893,45 @@ private:
     size_t __size_;
 
     template <class _Tp>
-    _LIBCPP_INLINE_VISIBILITY void __process(_Tp* __p, false_type) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY void __process(_Tp* __p, false_type) _NOEXCEPT
         {for (size_t __i = 0; __i < __size_; ++__i, ++__p) __p->~_Tp();}
 
     template <class _Tp>
-    _LIBCPP_INLINE_VISIBILITY void __process(_Tp*, true_type) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY void __process(_Tp*, true_type) _NOEXCEPT
         {}
 
-    _LIBCPP_INLINE_VISIBILITY void __incr(false_type) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY void __incr(false_type) _NOEXCEPT
         {++__size_;}
-    _LIBCPP_INLINE_VISIBILITY void __incr(true_type) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY void __incr(true_type) _NOEXCEPT
         {}
 
-    _LIBCPP_INLINE_VISIBILITY void __set(size_t __s, false_type) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY void __set(size_t __s, false_type) _NOEXCEPT
         {__size_ = __s;}
-    _LIBCPP_INLINE_VISIBILITY void __set(size_t, true_type) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY void __set(size_t, true_type) _NOEXCEPT
         {}
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit __destruct_n(size_t __s) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY explicit __destruct_n(size_t __s) _NOEXCEPT
         : __size_(__s) {}
 
     template <class _Tp>
-    _LIBCPP_INLINE_VISIBILITY void __incr() _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY void __incr() _NOEXCEPT
         {__incr(integral_constant<bool, is_trivially_destructible<_Tp>::value>());}
 
     template <class _Tp>
-    _LIBCPP_INLINE_VISIBILITY void __set(size_t __s, _Tp*) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY void __set(size_t __s, _Tp*) _NOEXCEPT
         {__set(__s, integral_constant<bool, is_trivially_destructible<_Tp>::value>());}
 
     template <class _Tp>
-    _LIBCPP_INLINE_VISIBILITY void operator()(_Tp* __p) _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY void operator()(_Tp* __p) _NOEXCEPT
         {__process(__p, integral_constant<bool, is_trivially_destructible<_Tp>::value>());}
 };
 
-_LIBCPP_FUNC_VIS void* align(size_t __align, size_t __sz, void*& __ptr, size_t& __space);
+_LIBCUDACXX_FUNC_VIS void* align(size_t __align, size_t __sz, void*& __ptr, size_t& __space);
 
 template <typename _Alloc, typename _Traits=allocator_traits<_Alloc> >
 struct __noexcept_move_assign_container : public integral_constant<bool,
     _Traits::propagate_on_container_move_assignment::value
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
         || _Traits::is_always_equal::value
 #else
         && is_nothrow_move_assignable<_Alloc>::value
@@ -943,30 +943,30 @@ template <class _Tp, class _Alloc>
 struct __temp_value {
     typedef allocator_traits<_Alloc> _Traits;
 
-#ifdef _LIBCPP_CXX03_LANG
-    typename aligned_storage<sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)>::type __v;
+#ifdef _LIBCUDACXX_CXX03_LANG
+    typename aligned_storage<sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp)>::type __v;
 #else
     union { _Tp __v; };
 #endif
     _Alloc &__a;
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp *__addr() {
-#ifdef _LIBCPP_CXX03_LANG
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Tp *__addr() {
+#ifdef _LIBCUDACXX_CXX03_LANG
         return reinterpret_cast<_Tp*>(std::addressof(__v));
 #else
         return std::addressof(__v);
 #endif
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp &   get() { return *__addr(); }
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Tp &   get() { return *__addr(); }
 
     template<class... _Args>
-    _LIBCPP_NO_CFI
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc) {
+    _LIBCUDACXX_NO_CFI
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __temp_value(_Alloc &__alloc, _Args&& ... __args) : __a(__alloc) {
       _Traits::construct(__a, __addr(), std::forward<_Args>(__args)...);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 ~__temp_value() { _Traits::destroy(__a, __addr()); }
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 ~__temp_value() { _Traits::destroy(__a, __addr()); }
 };
 
 template<typename _Alloc, typename = void, typename = void>
@@ -987,11 +987,11 @@ struct __builtin_new_allocator {
   struct __builtin_new_deleter {
     typedef void* pointer_type;
 
-    _LIBCPP_CONSTEXPR explicit __builtin_new_deleter(size_t __size, size_t __align)
+    _LIBCUDACXX_CONSTEXPR explicit __builtin_new_deleter(size_t __size, size_t __align)
         : __size_(__size), __align_(__align) {}
 
     void operator()(void* __p) const _NOEXCEPT {
-        _VSTD::__libcpp_deallocate(__p, __size_, __align_);
+        _CUDA_VSTD::__LIBCUDACXX_deallocate(__p, __size_, __align_);
     }
 
    private:
@@ -1002,32 +1002,32 @@ struct __builtin_new_allocator {
   typedef unique_ptr<void, __builtin_new_deleter> __holder_t;
 
   static __holder_t __allocate_bytes(size_t __s, size_t __align) {
-      return __holder_t(_VSTD::__libcpp_allocate(__s, __align),
+      return __holder_t(_CUDA_VSTD::__LIBCUDACXX_allocate(__s, __align),
                      __builtin_new_deleter(__s, __align));
   }
 
   static void __deallocate_bytes(void* __p, size_t __s,
                                  size_t __align) _NOEXCEPT {
-      _VSTD::__libcpp_deallocate(__p, __s, __align);
+      _CUDA_VSTD::__LIBCUDACXX_deallocate(__p, __s, __align);
   }
 
   template <class _Tp>
-  _LIBCPP_NODEBUG _LIBCPP_ALWAYS_INLINE
+  _LIBCUDACXX_NODEBUG _LIBCUDACXX_ALWAYS_INLINE
   static __holder_t __allocate_type(size_t __n) {
-      return __allocate_bytes(__n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
+      return __allocate_bytes(__n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp));
   }
 
   template <class _Tp>
-  _LIBCPP_NODEBUG _LIBCPP_ALWAYS_INLINE
+  _LIBCUDACXX_NODEBUG _LIBCUDACXX_ALWAYS_INLINE
   static void __deallocate_type(void* __p, size_t __n) _NOEXCEPT {
-      __deallocate_bytes(__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp));
+      __deallocate_bytes(__p, __n * sizeof(_Tp), _LIBCUDACXX_ALIGNOF(_Tp));
   }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
+#if defined(_LIBCUDACXX_HAS_PARALLEL_ALGORITHMS) && _LIBCUDACXX_STD_VER >= 17
 #   include <__pstl_memory>
 #endif
 
-#endif // _LIBCPP_MEMORY
+#endif // _LIBCUDACXX_MEMORY

diff  --git a/libcxx/include/mutex b/libcxx/include/mutex
index 5dfaad2b3510..282e4dc77b56 100644
--- a/libcxx/include/mutex
+++ b/libcxx/include/mutex
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_MUTEX
-#define _LIBCPP_MUTEX
+#ifndef _LIBCUDACXX_MUTEX
+#define _LIBCUDACXX_MUTEX
 
 /*
     mutex synopsis
@@ -193,30 +193,30 @@ template<class Callable, class ...Args>
 #include <__utility/forward.h>
 #include <cstdint>
 #include <memory>
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 # include <tuple>
 #endif
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <functional>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 
-class _LIBCPP_TYPE_VIS recursive_mutex
+class _LIBCUDACXX_TYPE_VIS recursive_mutex
 {
-    __libcpp_recursive_mutex_t __m_;
+    __LIBCUDACXX_recursive_mutex_t __m_;
 
 public:
     recursive_mutex();
@@ -229,13 +229,13 @@ public:
     bool try_lock() _NOEXCEPT;
     void unlock()  _NOEXCEPT;
 
-    typedef __libcpp_recursive_mutex_t* native_handle_type;
+    typedef __LIBCUDACXX_recursive_mutex_t* native_handle_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     native_handle_type native_handle() {return &__m_;}
 };
 
-class _LIBCPP_TYPE_VIS timed_mutex
+class _LIBCUDACXX_TYPE_VIS timed_mutex
 {
     mutex              __m_;
     condition_variable __cv_;
@@ -251,11 +251,11 @@ public:
     void lock();
     bool try_lock() _NOEXCEPT;
     template <class _Rep, class _Period>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         bool try_lock_for(const chrono::duration<_Rep, _Period>& __d)
             {return try_lock_until(chrono::steady_clock::now() + __d);}
     template <class _Clock, class _Duration>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __t);
     void unlock() _NOEXCEPT;
 };
@@ -277,7 +277,7 @@ timed_mutex::try_lock_until(const chrono::time_point<_Clock, _Duration>& __t)
     return false;
 }
 
-class _LIBCPP_TYPE_VIS recursive_timed_mutex
+class _LIBCUDACXX_TYPE_VIS recursive_timed_mutex
 {
     mutex              __m_;
     condition_variable __cv_;
@@ -293,11 +293,11 @@ public:
     void lock();
     bool try_lock() _NOEXCEPT;
     template <class _Rep, class _Period>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         bool try_lock_for(const chrono::duration<_Rep, _Period>& __d)
             {return try_lock_until(chrono::steady_clock::now() + __d);}
     template <class _Clock, class _Duration>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         bool try_lock_until(const chrono::time_point<_Clock, _Duration>& __t);
     void unlock() _NOEXCEPT;
 };
@@ -346,7 +346,7 @@ try_lock(_L0& __l0, _L1& __l1)
     return 0;
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _L0, class _L1, class _L2, class... _L3>
 int
@@ -365,7 +365,7 @@ try_lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3)
     return __r;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _L0, class _L1>
 void
@@ -381,7 +381,7 @@ lock(_L0& __l0, _L1& __l1)
                 break;
             }
         }
-        __libcpp_thread_yield();
+        __LIBCUDACXX_thread_yield();
         {
             unique_lock<_L1> __u1(__l1);
             if (__l0.try_lock())
@@ -390,11 +390,11 @@ lock(_L0& __l0, _L1& __l1)
                 break;
             }
         }
-        __libcpp_thread_yield();
+        __LIBCUDACXX_thread_yield();
     }
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _L0, class _L1, class _L2, class ..._L3>
 void
@@ -415,7 +415,7 @@ __lock_first(int __i, _L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3)
                 }
             }
             ++__i;
-            __libcpp_thread_yield();
+            __LIBCUDACXX_thread_yield();
             break;
         case 1:
             {
@@ -431,7 +431,7 @@ __lock_first(int __i, _L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3)
                 __i = 0;
             else
                 __i += 2;
-            __libcpp_thread_yield();
+            __LIBCUDACXX_thread_yield();
             break;
         default:
             __lock_first(__i - 2, __l2, __l3..., __l0, __l1);
@@ -441,7 +441,7 @@ __lock_first(int __i, _L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3)
 }
 
 template <class _L0, class _L1, class _L2, class ..._L3>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3)
 {
@@ -449,39 +449,39 @@ lock(_L0& __l0, _L1& __l1, _L2& __l2, _L3& ...__l3)
 }
 
 template <class _L0>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void __unlock(_L0& __l0) {
     __l0.unlock();
 }
 
 template <class _L0, class _L1>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void __unlock(_L0& __l0, _L1& __l1) {
     __l0.unlock();
     __l1.unlock();
 }
 
 template <class _L0, class _L1, class _L2, class ..._L3>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void __unlock(_L0& __l0, _L1& __l1, _L2& __l2, _L3&... __l3) {
     __l0.unlock();
     __l1.unlock();
-    _VSTD::__unlock(__l2, __l3...);
+    _CUDA_VSTD::__unlock(__l2, __l3...);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class ..._Mutexes>
-class _LIBCPP_TEMPLATE_VIS scoped_lock;
+class _LIBCUDACXX_TEMPLATE_VIS scoped_lock;
 
 template <>
-class _LIBCPP_TEMPLATE_VIS scoped_lock<> {
+class _LIBCUDACXX_TEMPLATE_VIS scoped_lock<> {
 public:
     explicit scoped_lock() {}
     ~scoped_lock() = default;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit scoped_lock(adopt_lock_t) {}
 
     scoped_lock(scoped_lock const&) = delete;
@@ -489,19 +489,19 @@ public:
 };
 
 template <class _Mutex>
-class _LIBCPP_TEMPLATE_VIS _LIBCPP_THREAD_SAFETY_ANNOTATION(scoped_lockable) scoped_lock<_Mutex> {
+class _LIBCUDACXX_TEMPLATE_VIS _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(scoped_lockable) scoped_lock<_Mutex> {
 public:
     typedef _Mutex  mutex_type;
 private:
     mutex_type& __m_;
 public:
-    explicit scoped_lock(mutex_type & __m) _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability(__m))
+    explicit scoped_lock(mutex_type & __m) _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(acquire_capability(__m))
         : __m_(__m) {__m_.lock();}
 
-    ~scoped_lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability()) {__m_.unlock();}
+    ~scoped_lock() _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(release_capability()) {__m_.unlock();}
 
-    _LIBCPP_INLINE_VISIBILITY
-    explicit scoped_lock(adopt_lock_t, mutex_type& __m) _LIBCPP_THREAD_SAFETY_ANNOTATION(requires_capability(__m))
+    _LIBCUDACXX_INLINE_VISIBILITY
+    explicit scoped_lock(adopt_lock_t, mutex_type& __m) _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(requires_capability(__m))
         : __m_(__m) {}
 
     scoped_lock(scoped_lock const&) = delete;
@@ -509,26 +509,26 @@ public:
 };
 
 template <class ..._MArgs>
-class _LIBCPP_TEMPLATE_VIS scoped_lock
+class _LIBCUDACXX_TEMPLATE_VIS scoped_lock
 {
     static_assert(sizeof...(_MArgs) > 1, "At least 2 lock types required");
     typedef tuple<_MArgs&...> _MutexTuple;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit scoped_lock(_MArgs&... __margs)
       : __t_(__margs...)
     {
-        _VSTD::lock(__margs...);
+        _CUDA_VSTD::lock(__margs...);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     scoped_lock(adopt_lock_t, _MArgs&... __margs)
         : __t_(__margs...)
     {
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~scoped_lock() {
         typedef typename __make_tuple_indices<sizeof...(_MArgs)>::type _Indices;
         __unlock_unpack(_Indices{}, __t_);
@@ -539,46 +539,46 @@ public:
 
 private:
     template <size_t ..._Indx>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static void __unlock_unpack(__tuple_indices<_Indx...>, _MutexTuple& __mt) {
-        _VSTD::__unlock(_VSTD::get<_Indx>(__mt)...);
+        _CUDA_VSTD::__unlock(_CUDA_VSTD::get<_Indx>(__mt)...);
     }
 
     _MutexTuple __t_;
 };
 
-#endif // _LIBCPP_STD_VER > 14
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // _LIBCUDACXX_STD_VER > 14
+#endif // !_LIBCUDACXX_HAS_NO_THREADS
 
-struct _LIBCPP_TEMPLATE_VIS once_flag;
+struct _LIBCUDACXX_TEMPLATE_VIS once_flag;
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template<class _Callable, class... _Args>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void call_once(once_flag&, _Callable&&, _Args&&...);
 
-#else  // _LIBCPP_CXX03_LANG
+#else  // _LIBCUDACXX_CXX03_LANG
 
 template<class _Callable>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void call_once(once_flag&, _Callable&);
 
 template<class _Callable>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void call_once(once_flag&, const _Callable&);
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-struct _LIBCPP_TEMPLATE_VIS once_flag
+struct _LIBCUDACXX_TEMPLATE_VIS once_flag
 {
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR
         once_flag() _NOEXCEPT : __state_(0) {}
     once_flag(const once_flag&) = delete;
     once_flag& operator=(const once_flag&) = delete;
 
-#if defined(_LIBCPP_ABI_MICROSOFT)
+#if defined(_LIBCUDACXX_ABI_MICROSOFT)
    typedef uintptr_t _State_type;
 #else
    typedef unsigned long _State_type;
@@ -587,11 +587,11 @@ struct _LIBCPP_TEMPLATE_VIS once_flag
 private:
     _State_type __state_;
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template<class _Callable, class... _Args>
     friend
     void call_once(once_flag&, _Callable&&, _Args&&...);
-#else  // _LIBCPP_CXX03_LANG
+#else  // _LIBCUDACXX_CXX03_LANG
     template<class _Callable>
     friend
     void call_once(once_flag&, _Callable&);
@@ -599,20 +599,20 @@ private:
     template<class _Callable>
     friend
     void call_once(once_flag&, const _Callable&);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 };
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Fp>
 class __call_once_param
 {
     _Fp& __f_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __call_once_param(_Fp& __f) : __f_(__f) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator()()
     {
         typedef typename __make_tuple_indices<tuple_size<_Fp>::value, 1>::type _Index;
@@ -621,10 +621,10 @@ public:
 
 private:
     template <size_t ..._Indices>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __execute(__tuple_indices<_Indices...>)
     {
-        _VSTD::__invoke(_VSTD::get<0>(_VSTD::move(__f_)), _VSTD::get<_Indices>(_VSTD::move(__f_))...);
+        _CUDA_VSTD::__invoke(_CUDA_VSTD::get<0>(_CUDA_VSTD::move(__f_)), _CUDA_VSTD::get<_Indices>(_CUDA_VSTD::move(__f_))...);
     }
 };
 
@@ -635,10 +635,10 @@ class __call_once_param
 {
     _Fp& __f_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __call_once_param(_Fp& __f) : __f_(__f) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator()()
     {
         __f_();
@@ -648,40 +648,40 @@ public:
 #endif
 
 template <class _Fp>
-void _LIBCPP_INLINE_VISIBILITY
+void _LIBCUDACXX_INLINE_VISIBILITY
 __call_once_proxy(void* __vp)
 {
     __call_once_param<_Fp>* __p = static_cast<__call_once_param<_Fp>*>(__vp);
     (*__p)();
 }
 
-_LIBCPP_FUNC_VIS void __call_once(volatile once_flag::_State_type&, void*,
+_LIBCUDACXX_FUNC_VIS void __call_once(volatile once_flag::_State_type&, void*,
                                   void (*)(void*));
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template<class _Callable, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 call_once(once_flag& __flag, _Callable&& __func, _Args&&... __args)
 {
-    if (__libcpp_acquire_load(&__flag.__state_) != ~once_flag::_State_type(0))
+    if (__LIBCUDACXX_acquire_load(&__flag.__state_) != ~once_flag::_State_type(0))
     {
         typedef tuple<_Callable&&, _Args&&...> _Gp;
-        _Gp __f(_VSTD::forward<_Callable>(__func), _VSTD::forward<_Args>(__args)...);
+        _Gp __f(_CUDA_VSTD::forward<_Callable>(__func), _CUDA_VSTD::forward<_Args>(__args)...);
         __call_once_param<_Gp> __p(__f);
         __call_once(__flag.__state_, &__p, &__call_once_proxy<_Gp>);
     }
 }
 
-#else  // _LIBCPP_CXX03_LANG
+#else  // _LIBCUDACXX_CXX03_LANG
 
 template<class _Callable>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 call_once(once_flag& __flag, _Callable& __func)
 {
-    if (__libcpp_acquire_load(&__flag.__state_) != ~once_flag::_State_type(0))
+    if (__LIBCUDACXX_acquire_load(&__flag.__state_) != ~once_flag::_State_type(0))
     {
         __call_once_param<_Callable> __p(__func);
         __call_once(__flag.__state_, &__p, &__call_once_proxy<_Callable>);
@@ -689,21 +689,21 @@ call_once(once_flag& __flag, _Callable& __func)
 }
 
 template<class _Callable>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 call_once(once_flag& __flag, const _Callable& __func)
 {
-    if (__libcpp_acquire_load(&__flag.__state_) != ~once_flag::_State_type(0))
+    if (__LIBCUDACXX_acquire_load(&__flag.__state_) != ~once_flag::_State_type(0))
     {
         __call_once_param<const _Callable> __p(__func);
         __call_once(__flag.__state_, &__p, &__call_once_proxy<const _Callable>);
     }
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_MUTEX
+#endif // _LIBCUDACXX_MUTEX

diff  --git a/libcxx/include/new b/libcxx/include/new
index ed95caed1c41..9c879b5f8808 100644
--- a/libcxx/include/new
+++ b/libcxx/include/new
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_NEW
-#define _LIBCPP_NEW
+#ifndef _LIBCUDACXX_NEW
+#define _LIBCUDACXX_NEW
 
 /*
     new synopsis
@@ -95,36 +95,36 @@ void  operator delete[](void* ptr, void*) noexcept;
 #include <type_traits>
 #include <version>
 
-#if defined(_LIBCPP_ABI_VCRUNTIME)
+#if defined(_LIBCUDACXX_ABI_VCRUNTIME)
 #include <new.h>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 #if !defined(__cpp_sized_deallocation) || __cpp_sized_deallocation  < 201309L
-#define _LIBCPP_HAS_NO_LANGUAGE_SIZED_DEALLOCATION
+#define _LIBCUDACXX_HAS_NO_LANGUAGE_SIZED_DEALLOCATION
 #endif
 
-#if !defined(_LIBCPP_BUILDING_LIBRARY) && _LIBCPP_STD_VER < 14 && \
-    defined(_LIBCPP_HAS_NO_LANGUAGE_SIZED_DEALLOCATION)
-# define _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION
+#if !defined(_LIBCUDACXX_BUILDING_LIBRARY) && _LIBCUDACXX_STD_VER < 14 && \
+    defined(_LIBCUDACXX_HAS_NO_LANGUAGE_SIZED_DEALLOCATION)
+# define _LIBCUDACXX_HAS_NO_LIBRARY_SIZED_DEALLOCATION
 #endif
 
-#if defined(_LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION) || \
-    defined(_LIBCPP_HAS_NO_LANGUAGE_SIZED_DEALLOCATION)
-# define _LIBCPP_HAS_NO_SIZED_DEALLOCATION
+#if defined(_LIBCUDACXX_HAS_NO_LIBRARY_SIZED_DEALLOCATION) || \
+    defined(_LIBCUDACXX_HAS_NO_LANGUAGE_SIZED_DEALLOCATION)
+# define _LIBCUDACXX_HAS_NO_SIZED_DEALLOCATION
 #endif
 
 namespace std  // purposefully not using versioning namespace
 {
 
-#if !defined(_LIBCPP_ABI_VCRUNTIME)
-struct _LIBCPP_TYPE_VIS nothrow_t { explicit nothrow_t() = default; };
-extern _LIBCPP_FUNC_VIS const nothrow_t nothrow;
+#if !defined(_LIBCUDACXX_ABI_VCRUNTIME)
+struct _LIBCUDACXX_TYPE_VIS nothrow_t { explicit nothrow_t() = default; };
+extern _LIBCUDACXX_FUNC_VIS const nothrow_t nothrow;
 
-class _LIBCPP_EXCEPTION_ABI bad_alloc
+class _LIBCUDACXX_EXCEPTION_ABI bad_alloc
     : public exception
 {
 public:
@@ -133,7 +133,7 @@ public:
     virtual const char* what() const _NOEXCEPT;
 };
 
-class _LIBCPP_EXCEPTION_ABI bad_array_new_length
+class _LIBCUDACXX_EXCEPTION_ABI bad_array_new_length
     : public bad_alloc
 {
 public:
@@ -143,95 +143,95 @@ public:
 };
 
 typedef void (*new_handler)();
-_LIBCPP_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT;
-_LIBCPP_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
+_LIBCUDACXX_FUNC_VIS new_handler set_new_handler(new_handler) _NOEXCEPT;
+_LIBCUDACXX_FUNC_VIS new_handler get_new_handler() _NOEXCEPT;
 
-#endif // !_LIBCPP_ABI_VCRUNTIME
+#endif // !_LIBCUDACXX_ABI_VCRUNTIME
 
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_bad_alloc();  // not in C++ spec
+_LIBCUDACXX_NORETURN _LIBCUDACXX_FUNC_VIS void __throw_bad_alloc();  // not in C++ spec
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_bad_array_new_length()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw bad_array_new_length();
 #else
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-#if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) && \
-    !defined(_LIBCPP_ABI_VCRUNTIME)
-#ifndef _LIBCPP_CXX03_LANG
-enum class _LIBCPP_ENUM_VIS align_val_t : size_t { };
+#if !defined(_LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION) && \
+    !defined(_LIBCUDACXX_ABI_VCRUNTIME)
+#ifndef _LIBCUDACXX_CXX03_LANG
+enum class _LIBCUDACXX_ENUM_VIS align_val_t : size_t { };
 #else
 enum align_val_t { __zero = 0, __max = (size_t)-1 };
 #endif
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 // Enable the declaration even if the compiler doesn't support the language
 // feature.
 struct destroying_delete_t {
   explicit destroying_delete_t() = default;
 };
 inline constexpr destroying_delete_t destroying_delete{};
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 } // namespace std
 
-#if defined(_LIBCPP_CXX03_LANG)
+#if defined(_LIBCUDACXX_CXX03_LANG)
 #define _THROW_BAD_ALLOC throw(std::bad_alloc)
 #else
 #define _THROW_BAD_ALLOC
 #endif
 
-#if !defined(_LIBCPP_ABI_VCRUNTIME)
+#if !defined(_LIBCUDACXX_ABI_VCRUNTIME)
 
-_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz) _THROW_BAD_ALLOC;
-_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS;
-_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p) _NOEXCEPT;
-_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
-#ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz) _THROW_BAD_ALLOC;
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _LIBCUDACXX_NOALIAS;
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p) _NOEXCEPT;
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p, const std::nothrow_t&) _NOEXCEPT;
+#ifndef _LIBCUDACXX_HAS_NO_LIBRARY_SIZED_DEALLOCATION
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS _LIBCUDACXX_AVAILABILITY_SIZED_NEW_DELETE void  operator delete(void* __p, std::size_t __sz) _NOEXCEPT;
 #endif
 
-_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz) _THROW_BAD_ALLOC;
-_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS;
-_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p) _NOEXCEPT;
-_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT;
-#ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete[](void* __p, std::size_t __sz) _NOEXCEPT;
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz) _THROW_BAD_ALLOC;
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, const std::nothrow_t&) _NOEXCEPT _LIBCUDACXX_NOALIAS;
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p) _NOEXCEPT;
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p, const std::nothrow_t&) _NOEXCEPT;
+#ifndef _LIBCUDACXX_HAS_NO_LIBRARY_SIZED_DEALLOCATION
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS _LIBCUDACXX_AVAILABILITY_SIZED_NEW_DELETE void  operator delete[](void* __p, std::size_t __sz) _NOEXCEPT;
 #endif
 
-#ifndef _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
-_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
-_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS;
-_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p, std::align_val_t) _NOEXCEPT;
-_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
-#ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
+#ifndef _LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_OVERRIDABLE_FUNC_VIS void* operator new(std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCUDACXX_NOALIAS;
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p, std::align_val_t) _NOEXCEPT;
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS void  operator delete(void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
+#ifndef _LIBCUDACXX_HAS_NO_LIBRARY_SIZED_DEALLOCATION
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS _LIBCUDACXX_AVAILABILITY_SIZED_NEW_DELETE void  operator delete(void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
 #endif
 
-_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
-_LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCPP_NOALIAS;
-_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p, std::align_val_t) _NOEXCEPT;
-_LIBCPP_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
-#ifndef _LIBCPP_HAS_NO_LIBRARY_SIZED_DEALLOCATION
-_LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_AVAILABILITY_SIZED_NEW_DELETE void  operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t) _THROW_BAD_ALLOC;
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_OVERRIDABLE_FUNC_VIS void* operator new[](std::size_t __sz, std::align_val_t, const std::nothrow_t&) _NOEXCEPT _LIBCUDACXX_NOALIAS;
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p, std::align_val_t) _NOEXCEPT;
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS void  operator delete[](void* __p, std::align_val_t, const std::nothrow_t&) _NOEXCEPT;
+#ifndef _LIBCUDACXX_HAS_NO_LIBRARY_SIZED_DEALLOCATION
+_LIBCUDACXX_OVERRIDABLE_FUNC_VIS _LIBCUDACXX_AVAILABILITY_SIZED_NEW_DELETE void  operator delete[](void* __p, std::size_t __sz, std::align_val_t) _NOEXCEPT;
 #endif
 #endif
 
-_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY void* operator new  (std::size_t, void* __p) _NOEXCEPT {return __p;}
-_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_INLINE_VISIBILITY void* operator new[](std::size_t, void* __p) _NOEXCEPT {return __p;}
-inline _LIBCPP_INLINE_VISIBILITY void  operator delete  (void*, void*) _NOEXCEPT {}
-inline _LIBCPP_INLINE_VISIBILITY void  operator delete[](void*, void*) _NOEXCEPT {}
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 inline _LIBCUDACXX_INLINE_VISIBILITY void* operator new  (std::size_t, void* __p) _NOEXCEPT {return __p;}
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 inline _LIBCUDACXX_INLINE_VISIBILITY void* operator new[](std::size_t, void* __p) _NOEXCEPT {return __p;}
+inline _LIBCUDACXX_INLINE_VISIBILITY void  operator delete  (void*, void*) _NOEXCEPT {}
+inline _LIBCUDACXX_INLINE_VISIBILITY void  operator delete[](void*, void*) _NOEXCEPT {}
 
-#endif // !_LIBCPP_ABI_VCRUNTIME
+#endif // !_LIBCUDACXX_ABI_VCRUNTIME
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_CONSTEXPR inline _LIBCPP_INLINE_VISIBILITY bool __is_overaligned_for_new(size_t __align) _NOEXCEPT {
+_LIBCUDACXX_CONSTEXPR inline _LIBCUDACXX_INLINE_VISIBILITY bool __is_overaligned_for_new(size_t __align) _NOEXCEPT {
 #ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__
   return __align > __STDCPP_DEFAULT_NEW_ALIGNMENT__;
 #else
@@ -240,8 +240,8 @@ _LIBCPP_CONSTEXPR inline _LIBCPP_INLINE_VISIBILITY bool __is_overaligned_for_new
 }
 
 template <class ..._Args>
-_LIBCPP_INLINE_VISIBILITY
-void* __libcpp_operator_new(_Args ...__args) {
+_LIBCUDACXX_INLINE_VISIBILITY
+void* __LIBCUDACXX_operator_new(_Args ...__args) {
 #if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete)
   return __builtin_operator_new(__args...);
 #else
@@ -250,8 +250,8 @@ void* __libcpp_operator_new(_Args ...__args) {
 }
 
 template <class ..._Args>
-_LIBCPP_INLINE_VISIBILITY
-void __libcpp_operator_delete(_Args ...__args) {
+_LIBCUDACXX_INLINE_VISIBILITY
+void __LIBCUDACXX_operator_delete(_Args ...__args) {
 #if __has_builtin(__builtin_operator_new) && __has_builtin(__builtin_operator_delete)
   __builtin_operator_delete(__args...);
 #else
@@ -259,33 +259,33 @@ void __libcpp_operator_delete(_Args ...__args) {
 #endif
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-void *__libcpp_allocate(size_t __size, size_t __align) {
-#ifndef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
+inline _LIBCUDACXX_INLINE_VISIBILITY
+void *__LIBCUDACXX_allocate(size_t __size, size_t __align) {
+#ifndef _LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION
   if (__is_overaligned_for_new(__align)) {
     const align_val_t __align_val = static_cast<align_val_t>(__align);
-    return __libcpp_operator_new(__size, __align_val);
+    return __LIBCUDACXX_operator_new(__size, __align_val);
   }
 #endif
 
   (void)__align;
-  return __libcpp_operator_new(__size);
+  return __LIBCUDACXX_operator_new(__size);
 }
 
 template <class ..._Args>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void __do_deallocate_handle_size(void *__ptr, size_t __size, _Args ...__args) {
-#ifdef _LIBCPP_HAS_NO_SIZED_DEALLOCATION
+#ifdef _LIBCUDACXX_HAS_NO_SIZED_DEALLOCATION
   (void)__size;
-  return __libcpp_operator_delete(__ptr, __args...);
+  return __LIBCUDACXX_operator_delete(__ptr, __args...);
 #else
-  return __libcpp_operator_delete(__ptr, __size, __args...);
+  return __LIBCUDACXX_operator_delete(__ptr, __size, __args...);
 #endif
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-void __libcpp_deallocate(void* __ptr, size_t __size, size_t __align) {
-#if defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)
+inline _LIBCUDACXX_INLINE_VISIBILITY
+void __LIBCUDACXX_deallocate(void* __ptr, size_t __size, size_t __align) {
+#if defined(_LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION)
     (void)__align;
     return __do_deallocate_handle_size(__ptr, __size);
 #else
@@ -298,30 +298,30 @@ void __libcpp_deallocate(void* __ptr, size_t __size, size_t __align) {
 #endif
 }
 
-inline _LIBCPP_INLINE_VISIBILITY void __libcpp_deallocate_unsized(void* __ptr, size_t __align) {
-#if defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION)
+inline _LIBCUDACXX_INLINE_VISIBILITY void __LIBCUDACXX_deallocate_unsized(void* __ptr, size_t __align) {
+#if defined(_LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION)
     (void)__align;
-    return __libcpp_operator_delete(__ptr);
+    return __LIBCUDACXX_operator_delete(__ptr);
 #else
     if (__is_overaligned_for_new(__align)) {
       const align_val_t __align_val = static_cast<align_val_t>(__align);
-      return __libcpp_operator_delete(__ptr, __align_val);
+      return __LIBCUDACXX_operator_delete(__ptr, __align_val);
     } else {
-      return __libcpp_operator_delete(__ptr);
+      return __LIBCUDACXX_operator_delete(__ptr);
     }
 #endif
 }
 
-#if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
 // Low-level helpers to call the aligned allocation and deallocation functions
 // on the target platform. This is used to implement libc++'s own memory
 // allocation routines -- if you need to allocate memory inside the library,
-// chances are that you want to use `__libcpp_allocate` instead.
+// chances are that you want to use `__LIBCUDACXX_allocate` instead.
 //
 // Returns the allocated memory, or `nullptr` on failure.
-inline _LIBCPP_INLINE_VISIBILITY
-void* __libcpp_aligned_alloc(std::size_t __alignment, std::size_t __size) {
-#if defined(_LIBCPP_MSVCRT_LIKE)
+inline _LIBCUDACXX_INLINE_VISIBILITY
+void* __LIBCUDACXX_aligned_alloc(std::size_t __alignment, std::size_t __size) {
+#if defined(_LIBCUDACXX_MSVCRT_LIKE)
   return ::_aligned_malloc(__size, __alignment);
 #else
   void* __result = nullptr;
@@ -331,36 +331,36 @@ void* __libcpp_aligned_alloc(std::size_t __alignment, std::size_t __size) {
 #endif
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-void __libcpp_aligned_free(void* __ptr) {
-#if defined(_LIBCPP_MSVCRT_LIKE)
+inline _LIBCUDACXX_INLINE_VISIBILITY
+void __LIBCUDACXX_aligned_free(void* __ptr) {
+#if defined(_LIBCUDACXX_MSVCRT_LIKE)
   ::_aligned_free(__ptr);
 #else
   ::free(__ptr);
 #endif
 }
-#endif // !_LIBCPP_HAS_NO_ALIGNED_ALLOCATION
+#endif // !_LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION
 
 
 template <class _Tp>
-_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_HIDE_FROM_ABI
-_LIBCPP_CONSTEXPR _Tp* __launder(_Tp* __p) _NOEXCEPT
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 inline _LIBCUDACXX_HIDE_FROM_ABI
+_LIBCUDACXX_CONSTEXPR _Tp* __launder(_Tp* __p) _NOEXCEPT
 {
     static_assert (!(is_function<_Tp>::value), "can't launder functions" );
     static_assert (!(is_same<void, typename remove_cv<_Tp>::type>::value), "can't launder cv-void" );
     return __builtin_launder(__p);
 }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
-_LIBCPP_NODISCARD_AFTER_CXX17 inline _LIBCPP_HIDE_FROM_ABI
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 inline _LIBCUDACXX_HIDE_FROM_ABI
 constexpr _Tp* launder(_Tp* __p) noexcept
 {
-    return _VSTD::__launder(__p);
+    return _CUDA_VSTD::__launder(__p);
 }
 #endif
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 #if defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE)
 
@@ -369,8 +369,8 @@ inline constexpr size_t hardware_constructive_interference_size = __GCC_CONSTRUC
 
 #endif // defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE)
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_NEW
+#endif // _LIBCUDACXX_NEW

diff  --git a/libcxx/include/numbers b/libcxx/include/numbers
index 3c8527dfc2de..343275c23670 100644
--- a/libcxx/include/numbers
+++ b/libcxx/include/numbers
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_NUMBERS
-#define _LIBCPP_NUMBERS
+#ifndef _LIBCUDACXX_NUMBERS
+#define _LIBCUDACXX_NUMBERS
 
 /*
     numbers synopsis
@@ -64,13 +64,13 @@ namespace std::numbers {
 #include <type_traits>
 #include <version>
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace numbers {
 
@@ -127,8 +127,8 @@ inline constexpr double phi        = phi_v<double>;
 
 } // namespace numbers
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#endif // _LIBCPP_NUMBERS
+#endif // _LIBCUDACXX_NUMBERS

diff  --git a/libcxx/include/numeric b/libcxx/include/numeric
index 057faf508e6b..6b11b7f668a0 100644
--- a/libcxx/include/numeric
+++ b/libcxx/include/numeric
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_NUMERIC
-#define _LIBCPP_NUMERIC
+#ifndef _LIBCUDACXX_NUMERIC
+#define _LIBCUDACXX_NUMERIC
 
 /*
     numeric synopsis
@@ -163,17 +163,17 @@ template<class T>
 #include <__numeric/transform_inclusive_scan.h>
 #include <__numeric/transform_reduce.h>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <functional>
 #  include <iterator>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if defined(_LIBCPP_HAS_PARALLEL_ALGORITHMS) && _LIBCPP_STD_VER >= 17
+#if defined(_LIBCUDACXX_HAS_PARALLEL_ALGORITHMS) && _LIBCUDACXX_STD_VER >= 17
 #   include <__pstl_numeric>
 #endif
 
-#endif // _LIBCPP_NUMERIC
+#endif // _LIBCUDACXX_NUMERIC

diff  --git a/libcxx/include/optional b/libcxx/include/optional
index 349ceb5bc7f6..4bfd9071c87a 100644
--- a/libcxx/include/optional
+++ b/libcxx/include/optional
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_OPTIONAL
-#define _LIBCPP_OPTIONAL
+#ifndef _LIBCUDACXX_OPTIONAL
+#define _LIBCUDACXX_OPTIONAL
 
 /*
     optional synopsis
@@ -177,7 +177,7 @@ template<class T>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <atomic>
 #  include <chrono>
 #  include <climits>
@@ -195,14 +195,14 @@ template<class T>
 // standard-mandated includes
 #include <compare>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 namespace std  // purposefully not using versioning namespace
 {
 
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
+class _LIBCUDACXX_EXCEPTION_ABI _LIBCUDACXX_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
     : public exception
 {
 public:
@@ -213,25 +213,25 @@ public:
 
 } // namespace std
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_NORETURN
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+_LIBCUDACXX_NORETURN
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
 void __throw_bad_optional_access() {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         throw bad_optional_access();
 #else
-        _VSTD::abort();
+        _CUDA_VSTD::abort();
 #endif
 }
 
 struct nullopt_t
 {
-    struct __secret_tag { _LIBCPP_INLINE_VISIBILITY explicit __secret_tag() = default; };
-    _LIBCPP_INLINE_VISIBILITY constexpr explicit nullopt_t(__secret_tag, __secret_tag) noexcept {}
+    struct __secret_tag { _LIBCUDACXX_INLINE_VISIBILITY explicit __secret_tag() = default; };
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr explicit nullopt_t(__secret_tag, __secret_tag) noexcept {}
 };
 
 inline constexpr nullopt_t nullopt{nullopt_t::__secret_tag{}, nullopt_t::__secret_tag{}};
@@ -254,33 +254,33 @@ struct __optional_destruct_base<_Tp, false>
     };
     bool __engaged_;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 ~__optional_destruct_base()
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 ~__optional_destruct_base()
     {
         if (__engaged_)
             __val_.~value_type();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr __optional_destruct_base() noexcept
         :  __null_state_(),
            __engaged_(false) {}
 
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit __optional_destruct_base(in_place_t, _Args&&... __args)
-        :  __val_(_VSTD::forward<_Args>(__args)...),
+        :  __val_(_CUDA_VSTD::forward<_Args>(__args)...),
            __engaged_(true) {}
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
   template <class _Fp, class... _Args>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __optional_destruct_base(__optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args)
-      : __val_(_VSTD::invoke(_VSTD::forward<_Fp>(__f), _VSTD::forward<_Args>(__args)...)), __engaged_(true) {}
+      : __val_(_CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fp>(__f), _CUDA_VSTD::forward<_Args>(__args)...)), __engaged_(true) {}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void reset() noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void reset() noexcept
     {
         if (__engaged_)
         {
@@ -303,26 +303,26 @@ struct __optional_destruct_base<_Tp, true>
     };
     bool __engaged_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr __optional_destruct_base() noexcept
         :  __null_state_(),
            __engaged_(false) {}
 
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit __optional_destruct_base(in_place_t, _Args&&... __args)
-        :  __val_(_VSTD::forward<_Args>(__args)...),
+        :  __val_(_CUDA_VSTD::forward<_Args>(__args)...),
            __engaged_(true) {}
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
   template <class _Fp, class... _Args>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr __optional_destruct_base(__optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args)
-      : __val_(_VSTD::invoke(_VSTD::forward<_Fp>(__f), _VSTD::forward<_Args>(__args)...)), __engaged_(true) {}
+      : __val_(_CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Fp>(__f), _CUDA_VSTD::forward<_Args>(__args)...)), __engaged_(true) {}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void reset() noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void reset() noexcept
     {
         if (__engaged_)
         {
@@ -338,69 +338,69 @@ struct __optional_storage_base : __optional_destruct_base<_Tp>
     using value_type = _Tp;
     using __base::__base;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr bool has_value() const noexcept
     {
         return this->__engaged_;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr value_type& __get() & noexcept
     {
         return this->__val_;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr const value_type& __get() const& noexcept
     {
         return this->__val_;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr value_type&& __get() && noexcept
     {
-        return _VSTD::move(this->__val_);
+        return _CUDA_VSTD::move(this->__val_);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr const value_type&& __get() const&& noexcept
     {
-        return _VSTD::move(this->__val_);
+        return _CUDA_VSTD::move(this->__val_);
     }
 
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct(_Args&&... __args)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __construct(_Args&&... __args)
     {
-        _LIBCPP_ASSERT(!has_value(), "__construct called for engaged __optional_storage");
-#if _LIBCPP_STD_VER > 17
-        _VSTD::construct_at(_VSTD::addressof(this->__val_), _VSTD::forward<_Args>(__args)...);
+        _LIBCUDACXX_ASSERT(!has_value(), "__construct called for engaged __optional_storage");
+#if _LIBCUDACXX_STD_VER > 17
+        _CUDA_VSTD::construct_at(_CUDA_VSTD::addressof(this->__val_), _CUDA_VSTD::forward<_Args>(__args)...);
 #else
-        ::new ((void*)_VSTD::addressof(this->__val_)) value_type(_VSTD::forward<_Args>(__args)...);
+        ::new ((void*)_CUDA_VSTD::addressof(this->__val_)) value_type(_CUDA_VSTD::forward<_Args>(__args)...);
 #endif
         this->__engaged_ = true;
     }
 
     template <class _That>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_from(_That&& __opt)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __construct_from(_That&& __opt)
     {
         if (__opt.has_value())
-            __construct(_VSTD::forward<_That>(__opt).__get());
+            __construct(_CUDA_VSTD::forward<_That>(__opt).__get());
     }
 
     template <class _That>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __assign_from(_That&& __opt)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __assign_from(_That&& __opt)
     {
         if (this->__engaged_ == __opt.has_value())
         {
             if (this->__engaged_)
-                this->__val_ = _VSTD::forward<_That>(__opt).__get();
+                this->__val_ = _CUDA_VSTD::forward<_That>(__opt).__get();
         }
         else
         {
             if (this->__engaged_)
                 this->reset();
             else
-                __construct(_VSTD::forward<_That>(__opt).__get());
+                __construct(_CUDA_VSTD::forward<_That>(__opt).__get());
         }
     }
 };
@@ -431,69 +431,69 @@ struct __optional_storage_base<_Tp, true>
                 is_convertible<_UpPtr, _TpPtr>::value);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr __optional_storage_base() noexcept
         :  __value_(nullptr) {}
 
     template <class _UArg>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit __optional_storage_base(in_place_t, _UArg&& __uarg)
-        :  __value_(_VSTD::addressof(__uarg))
+        :  __value_(_CUDA_VSTD::addressof(__uarg))
     {
       static_assert(__can_bind_reference<_UArg>(),
         "Attempted to construct a reference element in tuple from a "
         "possible temporary");
     }
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void reset() noexcept { __value_ = nullptr; }
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void reset() noexcept { __value_ = nullptr; }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr bool has_value() const noexcept
       { return __value_ != nullptr; }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr value_type& __get() const& noexcept
       { return *__value_; }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr value_type&& __get() const&& noexcept
-      { return _VSTD::forward<value_type>(*__value_); }
+      { return _CUDA_VSTD::forward<value_type>(*__value_); }
 
     template <class _UArg>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct(_UArg&& __val)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __construct(_UArg&& __val)
     {
-        _LIBCPP_ASSERT(!has_value(), "__construct called for engaged __optional_storage");
+        _LIBCUDACXX_ASSERT(!has_value(), "__construct called for engaged __optional_storage");
         static_assert(__can_bind_reference<_UArg>(),
             "Attempted to construct a reference element in tuple from a "
             "possible temporary");
-        __value_ = _VSTD::addressof(__val);
+        __value_ = _CUDA_VSTD::addressof(__val);
     }
 
     template <class _That>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_from(_That&& __opt)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __construct_from(_That&& __opt)
     {
         if (__opt.has_value())
-            __construct(_VSTD::forward<_That>(__opt).__get());
+            __construct(_CUDA_VSTD::forward<_That>(__opt).__get());
     }
 
     template <class _That>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __assign_from(_That&& __opt)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __assign_from(_That&& __opt)
     {
         if (has_value() == __opt.has_value())
         {
             if (has_value())
-                *__value_ = _VSTD::forward<_That>(__opt).__get();
+                *__value_ = _CUDA_VSTD::forward<_That>(__opt).__get();
         }
         else
         {
             if (has_value())
                 reset();
             else
-                __construct(_VSTD::forward<_That>(__opt).__get());
+                __construct(_CUDA_VSTD::forward<_That>(__opt).__get());
         }
     }
 };
@@ -509,20 +509,20 @@ struct __optional_copy_base<_Tp, false> : __optional_storage_base<_Tp>
 {
     using __optional_storage_base<_Tp>::__optional_storage_base;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_copy_base() = default;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __optional_copy_base(const __optional_copy_base& __opt)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __optional_copy_base(const __optional_copy_base& __opt)
     {
         this->__construct_from(__opt);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_copy_base(__optional_copy_base&&) = default;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_copy_base& operator=(const __optional_copy_base&) = default;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_copy_base& operator=(__optional_copy_base&&) = default;
 };
 
@@ -538,21 +538,21 @@ struct __optional_move_base<_Tp, false> : __optional_copy_base<_Tp>
     using value_type = _Tp;
     using __optional_copy_base<_Tp>::__optional_copy_base;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_move_base() = default;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_move_base(const __optional_move_base&) = default;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __optional_move_base(__optional_move_base&& __opt)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __optional_move_base(__optional_move_base&& __opt)
         noexcept(is_nothrow_move_constructible_v<value_type>)
     {
-        this->__construct_from(_VSTD::move(__opt));
+        this->__construct_from(_CUDA_VSTD::move(__opt));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_move_base& operator=(const __optional_move_base&) = default;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_move_base& operator=(__optional_move_base&&) = default;
 };
 
@@ -570,21 +570,21 @@ struct __optional_copy_assign_base<_Tp, false> : __optional_move_base<_Tp>
 {
     using __optional_move_base<_Tp>::__optional_move_base;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_copy_assign_base() = default;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_copy_assign_base(const __optional_copy_assign_base&) = default;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_copy_assign_base(__optional_copy_assign_base&&) = default;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __optional_copy_assign_base& operator=(const __optional_copy_assign_base& __opt)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __optional_copy_assign_base& operator=(const __optional_copy_assign_base& __opt)
     {
         this->__assign_from(__opt);
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_copy_assign_base& operator=(__optional_copy_assign_base&&) = default;
 };
 
@@ -603,21 +603,21 @@ struct __optional_move_assign_base<_Tp, false> : __optional_copy_assign_base<_Tp
     using value_type = _Tp;
     using __optional_copy_assign_base<_Tp>::__optional_copy_assign_base;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_move_assign_base() = default;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_move_assign_base(const __optional_move_assign_base& __opt) = default;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_move_assign_base(__optional_move_assign_base&&) = default;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __optional_move_assign_base& operator=(const __optional_move_assign_base&) = default;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 __optional_move_assign_base& operator=(__optional_move_assign_base&& __opt)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __optional_move_assign_base& operator=(__optional_move_assign_base&& __opt)
         noexcept(is_nothrow_move_assignable_v<value_type> &&
                  is_nothrow_move_constructible_v<value_type>)
     {
-        this->__assign_from(_VSTD::move(__opt));
+        this->__assign_from(_CUDA_VSTD::move(__opt));
         return *this;
     }
 };
@@ -745,10 +745,10 @@ private:
 
 public:
 
-    _LIBCPP_INLINE_VISIBILITY constexpr optional() noexcept {}
-    _LIBCPP_INLINE_VISIBILITY constexpr optional(const optional&) = default;
-    _LIBCPP_INLINE_VISIBILITY constexpr optional(optional&&) = default;
-    _LIBCPP_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {}
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr optional() noexcept {}
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr optional(const optional&) = default;
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr optional(optional&&) = default;
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr optional(nullopt_t) noexcept {}
 
     template <class _InPlaceT, class... _Args, class = enable_if_t<
           _And<
@@ -757,45 +757,45 @@ public:
             >::value
         >
     >
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit optional(_InPlaceT, _Args&&... __args)
-        : __base(in_place, _VSTD::forward<_Args>(__args)...) {}
+        : __base(in_place, _CUDA_VSTD::forward<_Args>(__args)...) {}
 
     template <class _Up, class... _Args, class = enable_if_t<
         is_constructible_v<value_type, initializer_list<_Up>&, _Args...>>
     >
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit optional(in_place_t, initializer_list<_Up> __il, _Args&&... __args)
-        : __base(in_place, __il, _VSTD::forward<_Args>(__args)...) {}
+        : __base(in_place, __il, _CUDA_VSTD::forward<_Args>(__args)...) {}
 
     template <class _Up = value_type, enable_if_t<
         _CheckOptionalArgsCtor<_Up>::template __enable_implicit<_Up>()
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr optional(_Up&& __v)
-        : __base(in_place, _VSTD::forward<_Up>(__v)) {}
+        : __base(in_place, _CUDA_VSTD::forward<_Up>(__v)) {}
 
     template <class _Up, enable_if_t<
         _CheckOptionalArgsCtor<_Up>::template __enable_explicit<_Up>()
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit optional(_Up&& __v)
-        : __base(in_place, _VSTD::forward<_Up>(__v)) {}
+        : __base(in_place, _CUDA_VSTD::forward<_Up>(__v)) {}
 
     // LWG2756: conditionally explicit conversion from const optional<_Up>&
     template <class _Up, enable_if_t<
         _CheckOptionalLikeCtor<_Up, _Up const&>::template __enable_implicit<_Up>()
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 optional(const optional<_Up>& __v)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 optional(const optional<_Up>& __v)
     {
         this->__construct_from(__v);
     }
     template <class _Up, enable_if_t<
         _CheckOptionalLikeCtor<_Up, _Up const&>::template __enable_explicit<_Up>()
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit optional(const optional<_Up>& __v)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit optional(const optional<_Up>& __v)
     {
         this->__construct_from(__v);
     }
@@ -804,37 +804,37 @@ public:
     template <class _Up, enable_if_t<
         _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_implicit<_Up>()
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 optional(optional<_Up>&& __v)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 optional(optional<_Up>&& __v)
     {
-        this->__construct_from(_VSTD::move(__v));
+        this->__construct_from(_CUDA_VSTD::move(__v));
     }
     template <class _Up, enable_if_t<
         _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_explicit<_Up>()
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit optional(optional<_Up>&& __v)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit optional(optional<_Up>&& __v)
     {
-        this->__construct_from(_VSTD::move(__v));
+        this->__construct_from(_CUDA_VSTD::move(__v));
     }
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
   template<class _Fp, class... _Args>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr explicit optional(__optional_construct_from_invoke_tag, _Fp&& __f, _Args&&... __args)
-      : __base(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Fp>(__f), _VSTD::forward<_Args>(__args)...) {
+      : __base(__optional_construct_from_invoke_tag{}, _CUDA_VSTD::forward<_Fp>(__f), _CUDA_VSTD::forward<_Args>(__args)...) {
   }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 optional& operator=(nullopt_t) noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 optional& operator=(nullopt_t) noexcept
     {
         reset();
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY optional& operator=(const optional&) = default;
-    _LIBCPP_INLINE_VISIBILITY optional& operator=(optional&&) = default;
+    _LIBCUDACXX_INLINE_VISIBILITY optional& operator=(const optional&) = default;
+    _LIBCUDACXX_INLINE_VISIBILITY optional& operator=(optional&&) = default;
 
     // LWG2756
     template <class _Up = value_type,
@@ -849,14 +849,14 @@ public:
                           is_assignable<value_type&, _Up>
                       >::value>
              >
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 optional&
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 optional&
     operator=(_Up&& __v)
     {
         if (this->has_value())
-            this->__get() = _VSTD::forward<_Up>(__v);
+            this->__get() = _CUDA_VSTD::forward<_Up>(__v);
         else
-            this->__construct(_VSTD::forward<_Up>(__v));
+            this->__construct(_CUDA_VSTD::forward<_Up>(__v));
         return *this;
     }
 
@@ -864,8 +864,8 @@ public:
     template <class _Up, enable_if_t<
         _CheckOptionalLikeAssign<_Up, _Up const&>::template __enable_assign<_Up>()
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 optional&
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 optional&
     operator=(const optional<_Up>& __v)
     {
         this->__assign_from(__v);
@@ -876,11 +876,11 @@ public:
     template <class _Up, enable_if_t<
         _CheckOptionalLikeCtor<_Up, _Up &&>::template __enable_assign<_Up>()
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 optional&
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 optional&
     operator=(optional<_Up>&& __v)
     {
-        this->__assign_from(_VSTD::move(__v));
+        this->__assign_from(_CUDA_VSTD::move(__v));
         return *this;
     }
 
@@ -890,12 +890,12 @@ public:
                           is_constructible_v<value_type, _Args...>
                       >
              >
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp &
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Tp &
     emplace(_Args&&... __args)
     {
         reset();
-        this->__construct(_VSTD::forward<_Args>(__args)...);
+        this->__construct(_CUDA_VSTD::forward<_Args>(__args)...);
         return this->__get();
     }
 
@@ -905,23 +905,23 @@ public:
                           is_constructible_v<value_type, initializer_list<_Up>&, _Args...>
                       >
              >
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _Tp &
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _Tp &
     emplace(initializer_list<_Up> __il, _Args&&... __args)
     {
         reset();
-        this->__construct(__il, _VSTD::forward<_Args>(__args)...);
+        this->__construct(__il, _CUDA_VSTD::forward<_Args>(__args)...);
         return this->__get();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(optional& __opt)
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void swap(optional& __opt)
         noexcept(is_nothrow_move_constructible_v<value_type> &&
                  is_nothrow_swappable_v<value_type>)
     {
         if (this->has_value() == __opt.has_value())
         {
-            using _VSTD::swap;
+            using _CUDA_VSTD::swap;
             if (this->has_value())
                 swap(this->__get(), __opt.__get());
         }
@@ -929,79 +929,79 @@ public:
         {
             if (this->has_value())
             {
-                __opt.__construct(_VSTD::move(this->__get()));
+                __opt.__construct(_CUDA_VSTD::move(this->__get()));
                 reset();
             }
             else
             {
-                this->__construct(_VSTD::move(__opt.__get()));
+                this->__construct(_CUDA_VSTD::move(__opt.__get()));
                 __opt.reset();
             }
         }
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr
     add_pointer_t<value_type const>
     operator->() const
     {
-        _LIBCPP_ASSERT(this->has_value(), "optional operator-> called on a disengaged value");
-        return _VSTD::addressof(this->__get());
+        _LIBCUDACXX_ASSERT(this->has_value(), "optional operator-> called on a disengaged value");
+        return _CUDA_VSTD::addressof(this->__get());
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr
     add_pointer_t<value_type>
     operator->()
     {
-        _LIBCPP_ASSERT(this->has_value(), "optional operator-> called on a disengaged value");
-        return _VSTD::addressof(this->__get());
+        _LIBCUDACXX_ASSERT(this->has_value(), "optional operator-> called on a disengaged value");
+        return _CUDA_VSTD::addressof(this->__get());
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr
     const value_type&
     operator*() const& noexcept
     {
-        _LIBCPP_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
+        _LIBCUDACXX_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
         return this->__get();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr
     value_type&
     operator*() & noexcept
     {
-        _LIBCPP_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
+        _LIBCUDACXX_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
         return this->__get();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr
     value_type&&
     operator*() && noexcept
     {
-        _LIBCPP_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
-        return _VSTD::move(this->__get());
+        _LIBCUDACXX_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
+        return _CUDA_VSTD::move(this->__get());
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr
     const value_type&&
     operator*() const&& noexcept
     {
-        _LIBCPP_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
-        return _VSTD::move(this->__get());
+        _LIBCUDACXX_ASSERT(this->has_value(), "optional operator* called on a disengaged value");
+        return _CUDA_VSTD::move(this->__get());
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit operator bool() const noexcept { return has_value(); }
 
     using __base::has_value;
     using __base::__get;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
     constexpr value_type const& value() const&
     {
         if (!this->has_value())
@@ -1009,8 +1009,8 @@ public:
         return this->__get();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
     constexpr value_type& value() &
     {
         if (!this->has_value())
@@ -1018,26 +1018,26 @@ public:
         return this->__get();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
     constexpr value_type&& value() &&
     {
         if (!this->has_value())
             __throw_bad_optional_access();
-        return _VSTD::move(this->__get());
+        return _CUDA_VSTD::move(this->__get());
     }
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
     constexpr value_type const&& value() const&&
     {
         if (!this->has_value())
             __throw_bad_optional_access();
-        return _VSTD::move(this->__get());
+        return _CUDA_VSTD::move(this->__get());
     }
 
     template <class _Up>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr value_type value_or(_Up&& __v) const&
     {
         static_assert(is_copy_constructible_v<value_type>,
@@ -1045,68 +1045,68 @@ public:
         static_assert(is_convertible_v<_Up, value_type>,
                       "optional<T>::value_or: U must be convertible to T");
         return this->has_value() ? this->__get() :
-                                  static_cast<value_type>(_VSTD::forward<_Up>(__v));
+                                  static_cast<value_type>(_CUDA_VSTD::forward<_Up>(__v));
     }
 
     template <class _Up>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr value_type value_or(_Up&& __v) &&
     {
         static_assert(is_move_constructible_v<value_type>,
                       "optional<T>::value_or: T must be move constructible");
         static_assert(is_convertible_v<_Up, value_type>,
                       "optional<T>::value_or: U must be convertible to T");
-        return this->has_value() ? _VSTD::move(this->__get()) :
-                                  static_cast<value_type>(_VSTD::forward<_Up>(__v));
+        return this->has_value() ? _CUDA_VSTD::move(this->__get()) :
+                                  static_cast<value_type>(_CUDA_VSTD::forward<_Up>(__v));
     }
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
   template<class _Func>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
   constexpr auto and_then(_Func&& __f) & {
     using _Up = invoke_result_t<_Func, value_type&>;
     static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
                   "Result of f(value()) must be a specialization of std::optional");
     if (*this)
-      return _VSTD::invoke(_VSTD::forward<_Func>(__f), value());
+      return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Func>(__f), value());
     return remove_cvref_t<_Up>();
   }
 
   template<class _Func>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
   constexpr auto and_then(_Func&& __f) const& {
     using _Up = invoke_result_t<_Func, const value_type&>;
     static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
                   "Result of f(value()) must be a specialization of std::optional");
     if (*this)
-      return _VSTD::invoke(_VSTD::forward<_Func>(__f), value());
+      return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Func>(__f), value());
     return remove_cvref_t<_Up>();
   }
 
   template<class _Func>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
   constexpr auto and_then(_Func&& __f) && {
     using _Up = invoke_result_t<_Func, value_type&&>;
     static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
                   "Result of f(std::move(value())) must be a specialization of std::optional");
     if (*this)
-      return _VSTD::invoke(_VSTD::forward<_Func>(__f), _VSTD::move(value()));
+      return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Func>(__f), _CUDA_VSTD::move(value()));
     return remove_cvref_t<_Up>();
   }
 
   template<class _Func>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr auto and_then(_Func&& __f) const&& {
     using _Up = invoke_result_t<_Func, const value_type&&>;
     static_assert(__is_std_optional<remove_cvref_t<_Up>>::value,
                   "Result of f(std::move(value())) must be a specialization of std::optional");
     if (*this)
-      return _VSTD::invoke(_VSTD::forward<_Func>(__f), _VSTD::move(value()));
+      return _CUDA_VSTD::invoke(_CUDA_VSTD::forward<_Func>(__f), _CUDA_VSTD::move(value()));
     return remove_cvref_t<_Up>();
   }
 
   template<class _Func>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
   constexpr auto transform(_Func&& __f) & {
     using _Up = remove_cv_t<invoke_result_t<_Func, value_type&>>;
     static_assert(!is_array_v<_Up>, "Result of f(value()) should not be an Array");
@@ -1116,12 +1116,12 @@ public:
                   "Result of f(value()) should not be std::nullopt_t");
     static_assert(is_object_v<_Up>, "Result of f(value()) should be an object type");
     if (*this)
-      return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), value());
+      return optional<_Up>(__optional_construct_from_invoke_tag{}, _CUDA_VSTD::forward<_Func>(__f), value());
     return optional<_Up>();
   }
 
   template<class _Func>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
   constexpr auto transform(_Func&& __f) const& {
     using _Up = remove_cv_t<invoke_result_t<_Func, const value_type&>>;
     static_assert(!is_array_v<_Up>, "Result of f(value()) should not be an Array");
@@ -1131,12 +1131,12 @@ public:
                   "Result of f(value()) should not be std::nullopt_t");
     static_assert(is_object_v<_Up>, "Result of f(value()) should be an object type");
     if (*this)
-      return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), value());
+      return optional<_Up>(__optional_construct_from_invoke_tag{}, _CUDA_VSTD::forward<_Func>(__f), value());
     return optional<_Up>();
   }
 
   template<class _Func>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
   constexpr auto transform(_Func&& __f) && {
     using _Up = remove_cv_t<invoke_result_t<_Func, value_type&&>>;
     static_assert(!is_array_v<_Up>, "Result of f(std::move(value())) should not be an Array");
@@ -1146,12 +1146,12 @@ public:
                   "Result of f(std::move(value())) should not be std::nullopt_t");
     static_assert(is_object_v<_Up>, "Result of f(std::move(value())) should be an object type");
     if (*this)
-      return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), _VSTD::move(value()));
+      return optional<_Up>(__optional_construct_from_invoke_tag{}, _CUDA_VSTD::forward<_Func>(__f), _CUDA_VSTD::move(value()));
     return optional<_Up>();
   }
 
   template<class _Func>
-  _LIBCPP_HIDE_FROM_ABI _LIBCPP_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
+  _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_AVAILABILITY_THROW_BAD_OPTIONAL_ACCESS
   constexpr auto transform(_Func&& __f) const&& {
     using _Up = remove_cvref_t<invoke_result_t<_Func, const value_type&&>>;
     static_assert(!is_array_v<_Up>, "Result of f(std::move(value())) should not be an Array");
@@ -1161,42 +1161,42 @@ public:
                   "Result of f(std::move(value())) should not be std::nullopt_t");
     static_assert(is_object_v<_Up>, "Result of f(std::move(value())) should be an object type");
     if (*this)
-      return optional<_Up>(__optional_construct_from_invoke_tag{}, _VSTD::forward<_Func>(__f), _VSTD::move(value()));
+      return optional<_Up>(__optional_construct_from_invoke_tag{}, _CUDA_VSTD::forward<_Func>(__f), _CUDA_VSTD::move(value()));
     return optional<_Up>();
   }
 
   template<invocable _Func>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr optional or_else(_Func&& __f) const& requires is_copy_constructible_v<value_type> {
     static_assert(is_same_v<remove_cvref_t<invoke_result_t<_Func>>, optional>,
                   "Result of f() should be the same type as this optional");
     if (*this)
       return *this;
-    return _VSTD::forward<_Func>(__f)();
+    return _CUDA_VSTD::forward<_Func>(__f)();
   }
 
   template<invocable _Func>
-  _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_HIDE_FROM_ABI
   constexpr optional or_else(_Func&& __f) && requires is_move_constructible_v<value_type> {
     static_assert(is_same_v<remove_cvref_t<invoke_result_t<_Func>>, optional>,
                   "Result of f() should be the same type as this optional");
     if (*this)
-      return _VSTD::move(*this);
-    return _VSTD::forward<_Func>(__f)();
+      return _CUDA_VSTD::move(*this);
+    return _CUDA_VSTD::forward<_Func>(__f)();
   }
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
     using __base::reset;
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _Tp>
     optional(_Tp) -> optional<_Tp>;
 #endif
 
 // Comparisons between optionals
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() ==
         declval<const _Up&>()), bool>,
@@ -1212,7 +1212,7 @@ operator==(const optional<_Tp>& __x, const optional<_Up>& __y)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() !=
         declval<const _Up&>()), bool>,
@@ -1228,7 +1228,7 @@ operator!=(const optional<_Tp>& __x, const optional<_Up>& __y)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() <
         declval<const _Up&>()), bool>,
@@ -1244,7 +1244,7 @@ operator<(const optional<_Tp>& __x, const optional<_Up>& __y)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() >
         declval<const _Up&>()), bool>,
@@ -1260,7 +1260,7 @@ operator>(const optional<_Tp>& __x, const optional<_Up>& __y)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() <=
         declval<const _Up&>()), bool>,
@@ -1276,7 +1276,7 @@ operator<=(const optional<_Tp>& __x, const optional<_Up>& __y)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() >=
         declval<const _Up&>()), bool>,
@@ -1293,7 +1293,7 @@ operator>=(const optional<_Tp>& __x, const optional<_Up>& __y)
 
 // Comparisons with nullopt
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator==(const optional<_Tp>& __x, nullopt_t) noexcept
 {
@@ -1301,7 +1301,7 @@ operator==(const optional<_Tp>& __x, nullopt_t) noexcept
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator==(nullopt_t, const optional<_Tp>& __x) noexcept
 {
@@ -1309,7 +1309,7 @@ operator==(nullopt_t, const optional<_Tp>& __x) noexcept
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator!=(const optional<_Tp>& __x, nullopt_t) noexcept
 {
@@ -1317,7 +1317,7 @@ operator!=(const optional<_Tp>& __x, nullopt_t) noexcept
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator!=(nullopt_t, const optional<_Tp>& __x) noexcept
 {
@@ -1325,7 +1325,7 @@ operator!=(nullopt_t, const optional<_Tp>& __x) noexcept
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator<(const optional<_Tp>&, nullopt_t) noexcept
 {
@@ -1333,7 +1333,7 @@ operator<(const optional<_Tp>&, nullopt_t) noexcept
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator<(nullopt_t, const optional<_Tp>& __x) noexcept
 {
@@ -1341,7 +1341,7 @@ operator<(nullopt_t, const optional<_Tp>& __x) noexcept
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator<=(const optional<_Tp>& __x, nullopt_t) noexcept
 {
@@ -1349,7 +1349,7 @@ operator<=(const optional<_Tp>& __x, nullopt_t) noexcept
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator<=(nullopt_t, const optional<_Tp>&) noexcept
 {
@@ -1357,7 +1357,7 @@ operator<=(nullopt_t, const optional<_Tp>&) noexcept
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator>(const optional<_Tp>& __x, nullopt_t) noexcept
 {
@@ -1365,7 +1365,7 @@ operator>(const optional<_Tp>& __x, nullopt_t) noexcept
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator>(nullopt_t, const optional<_Tp>&) noexcept
 {
@@ -1373,7 +1373,7 @@ operator>(nullopt_t, const optional<_Tp>&) noexcept
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator>=(const optional<_Tp>&, nullopt_t) noexcept
 {
@@ -1381,7 +1381,7 @@ operator>=(const optional<_Tp>&, nullopt_t) noexcept
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 bool
 operator>=(nullopt_t, const optional<_Tp>& __x) noexcept
 {
@@ -1390,7 +1390,7 @@ operator>=(nullopt_t, const optional<_Tp>& __x) noexcept
 
 // Comparisons with T
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() ==
         declval<const _Up&>()), bool>,
@@ -1402,7 +1402,7 @@ operator==(const optional<_Tp>& __x, const _Up& __v)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() ==
         declval<const _Up&>()), bool>,
@@ -1414,7 +1414,7 @@ operator==(const _Tp& __v, const optional<_Up>& __x)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() !=
         declval<const _Up&>()), bool>,
@@ -1426,7 +1426,7 @@ operator!=(const optional<_Tp>& __x, const _Up& __v)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() !=
         declval<const _Up&>()), bool>,
@@ -1438,7 +1438,7 @@ operator!=(const _Tp& __v, const optional<_Up>& __x)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() <
         declval<const _Up&>()), bool>,
@@ -1450,7 +1450,7 @@ operator<(const optional<_Tp>& __x, const _Up& __v)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() <
         declval<const _Up&>()), bool>,
@@ -1462,7 +1462,7 @@ operator<(const _Tp& __v, const optional<_Up>& __x)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() <=
         declval<const _Up&>()), bool>,
@@ -1474,7 +1474,7 @@ operator<=(const optional<_Tp>& __x, const _Up& __v)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() <=
         declval<const _Up&>()), bool>,
@@ -1486,7 +1486,7 @@ operator<=(const _Tp& __v, const optional<_Up>& __x)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() >
         declval<const _Up&>()), bool>,
@@ -1498,7 +1498,7 @@ operator>(const optional<_Tp>& __x, const _Up& __v)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() >
         declval<const _Up&>()), bool>,
@@ -1510,7 +1510,7 @@ operator>(const _Tp& __v, const optional<_Up>& __x)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() >=
         declval<const _Up&>()), bool>,
@@ -1522,7 +1522,7 @@ operator>=(const optional<_Tp>& __x, const _Up& __v)
 }
 
 template <class _Tp, class _Up>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 enable_if_t<
     is_convertible_v<decltype(declval<const _Tp&>() >=
         declval<const _Up&>()), bool>,
@@ -1535,7 +1535,7 @@ operator>=(const _Tp& __v, const optional<_Up>& __x)
 
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 enable_if_t<
     is_move_constructible_v<_Tp> && is_swappable_v<_Tp>,
     void
@@ -1546,45 +1546,45 @@ swap(optional<_Tp>& __x, optional<_Tp>& __y) noexcept(noexcept(__x.swap(__y)))
 }
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 optional<decay_t<_Tp>> make_optional(_Tp&& __v)
 {
-    return optional<decay_t<_Tp>>(_VSTD::forward<_Tp>(__v));
+    return optional<decay_t<_Tp>>(_CUDA_VSTD::forward<_Tp>(__v));
 }
 
 template <class _Tp, class... _Args>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 optional<_Tp> make_optional(_Args&&... __args)
 {
-    return optional<_Tp>(in_place, _VSTD::forward<_Args>(__args)...);
+    return optional<_Tp>(in_place, _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 template <class _Tp, class _Up, class... _Args>
-_LIBCPP_INLINE_VISIBILITY constexpr
+_LIBCUDACXX_INLINE_VISIBILITY constexpr
 optional<_Tp> make_optional(initializer_list<_Up> __il,  _Args&&... __args)
 {
-    return optional<_Tp>(in_place, __il, _VSTD::forward<_Args>(__args)...);
+    return optional<_Tp>(in_place, __il, _CUDA_VSTD::forward<_Args>(__args)...);
 }
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS hash<
+struct _LIBCUDACXX_TEMPLATE_VIS hash<
     __enable_hash_helper<optional<_Tp>, remove_const_t<_Tp>>
 >
 {
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef optional<_Tp> argument_type;
-    _LIBCPP_DEPRECATED_IN_CXX17 typedef size_t        result_type;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS)
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef optional<_Tp> argument_type;
+    _LIBCUDACXX_DEPRECATED_IN_CXX17 typedef size_t        result_type;
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const optional<_Tp>& __opt) const
     {
         return static_cast<bool>(__opt) ? hash<remove_const_t<_Tp>>()(*__opt) : 0;
     }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-#endif // _LIBCPP_OPTIONAL
+#endif // _LIBCUDACXX_OPTIONAL

diff  --git a/libcxx/include/ostream b/libcxx/include/ostream
index 14b49d78cb03..53fd04e1b6f8 100644
--- a/libcxx/include/ostream
+++ b/libcxx/include/ostream
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_OSTREAM
-#define _LIBCPP_OSTREAM
+#ifndef _LIBCUDACXX_OSTREAM
+#define _LIBCUDACXX_OSTREAM
 
 /*
     ostream synopsis
@@ -171,18 +171,18 @@ basic_ostream<wchar_t, traits>& operator<<(basic_ostream<wchar_t, traits>&, cons
 #include <streambuf>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <iterator>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_ostream
+class _LIBCUDACXX_TEMPLATE_VIS basic_ostream
     : virtual public basic_ios<_CharT, _Traits>
 {
 public:
@@ -194,19 +194,19 @@ public:
     typedef typename traits_type::off_type off_type;
 
     // 27.7.2.2 Constructor/destructor:
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     explicit basic_ostream(basic_streambuf<char_type, traits_type>* __sb)
     { this->init(__sb); }
     virtual ~basic_ostream();
 protected:
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream(basic_ostream&& __rhs);
 
     // 27.7.2.3 Assign/swap
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream& operator=(basic_ostream&& __rhs);
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     void swap(basic_ostream& __rhs)
     { basic_ios<char_type, traits_type>::swap(__rhs); }
 
@@ -215,19 +215,19 @@ protected:
 
 public:
     // 27.7.2.4 Prefix/suffix:
-    class _LIBCPP_TEMPLATE_VIS sentry;
+    class _LIBCUDACXX_TEMPLATE_VIS sentry;
 
     // 27.7.2.6 Formatted output:
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_ostream& operator<<(basic_ostream& (*__pf)(basic_ostream&))
     { return __pf(*this); }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_ostream& operator<<(basic_ios<char_type, traits_type>&
                               (*__pf)(basic_ios<char_type,traits_type>&))
     { __pf(*this); return *this; }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_ostream& operator<<(ios_base& (*__pf)(ios_base&))
     { __pf(*this); return *this; }
 
@@ -245,8 +245,8 @@ public:
     basic_ostream& operator<<(long double __f);
     basic_ostream& operator<<(const void* __p);
 
-#if _LIBCPP_STD_VER > 20
-    _LIBCPP_HIDE_FROM_ABI
+#if _LIBCUDACXX_STD_VER > 20
+    _LIBCUDACXX_HIDE_FROM_ABI
     basic_ostream& operator<<(const volatile void* __p) {
         return operator<<(const_cast<const void*>(__p));
     }
@@ -254,10 +254,10 @@ public:
 
     basic_ostream& operator<<(basic_streambuf<char_type, traits_type>* __sb);
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 // LWG 2221 - nullptr. This is not backported to older standards modes.
 // See https://reviews.llvm.org/D127033 for more info on the rationale.
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream& operator<<(nullptr_t)
     { return *this << "nullptr"; }
 #endif
@@ -268,20 +268,20 @@ public:
     basic_ostream& flush();
 
     // 27.7.2.5 seeks:
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     pos_type tellp();
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_ostream& seekp(pos_type __pos);
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_ostream& seekp(off_type __off, ios_base::seekdir __dir);
 
 protected:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostream() {}  // extension, intentially does not initialize
 };
 
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_ostream<_CharT, _Traits>::sentry
+class _LIBCUDACXX_TEMPLATE_VIS basic_ostream<_CharT, _Traits>::sentry
 {
     bool __ok_;
     basic_ostream<_CharT, _Traits>& __os_;
@@ -292,7 +292,7 @@ public:
     sentry(const sentry&) = delete;
     sentry& operator=(const sentry&) = delete;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit operator bool() const {return __ok_;}
 };
 
@@ -315,18 +315,18 @@ basic_ostream<_CharT, _Traits>::sentry::~sentry()
     if (__os_.rdbuf() && __os_.good() && (__os_.flags() & ios_base::unitbuf)
                       && !uncaught_exception())
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             if (__os_.rdbuf()->pubsync() == -1)
                 __os_.setstate(ios_base::badbit);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
@@ -353,19 +353,19 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<char_type, traits_type>* __sb)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
             if (__sb)
             {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
                 try
                 {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
                     typedef istreambuf_iterator<_CharT, _Traits> _Ip;
                     typedef ostreambuf_iterator<_CharT, _Traits> _Op;
                     _Ip __i(__sb);
@@ -380,24 +380,24 @@ basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<char_type, traits_typ
                     }
                     if (__c == 0)
                         this->setstate(ios_base::failbit);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
                 }
                 catch (...)
                 {
                     this->__set_failbit_and_consider_rethrow();
                 }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             }
             else
                 this->setstate(ios_base::badbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -405,10 +405,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(bool __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -417,13 +417,13 @@ basic_ostream<_CharT, _Traits>::operator<<(bool __n)
             if (__f.put(*this, *this, this->fill(), __n).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -431,10 +431,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(short __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -447,13 +447,13 @@ basic_ostream<_CharT, _Traits>::operator<<(short __n)
                         static_cast<long>(__n)).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -461,10 +461,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(unsigned short __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -473,13 +473,13 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned short __n)
             if (__f.put(*this, *this, this->fill(), static_cast<unsigned long>(__n)).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -487,10 +487,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(int __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -503,13 +503,13 @@ basic_ostream<_CharT, _Traits>::operator<<(int __n)
                         static_cast<long>(__n)).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -517,10 +517,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(unsigned int __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -529,13 +529,13 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned int __n)
             if (__f.put(*this, *this, this->fill(), static_cast<unsigned long>(__n)).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -543,10 +543,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(long __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -555,13 +555,13 @@ basic_ostream<_CharT, _Traits>::operator<<(long __n)
             if (__f.put(*this, *this, this->fill(), __n).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -569,10 +569,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(unsigned long __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -581,13 +581,13 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned long __n)
             if (__f.put(*this, *this, this->fill(), __n).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -595,10 +595,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(long long __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -607,13 +607,13 @@ basic_ostream<_CharT, _Traits>::operator<<(long long __n)
             if (__f.put(*this, *this, this->fill(), __n).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -621,10 +621,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(unsigned long long __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -633,13 +633,13 @@ basic_ostream<_CharT, _Traits>::operator<<(unsigned long long __n)
             if (__f.put(*this, *this, this->fill(), __n).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -647,10 +647,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(float __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -659,13 +659,13 @@ basic_ostream<_CharT, _Traits>::operator<<(float __n)
             if (__f.put(*this, *this, this->fill(), static_cast<double>(__n)).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -673,10 +673,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(double __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -685,13 +685,13 @@ basic_ostream<_CharT, _Traits>::operator<<(double __n)
             if (__f.put(*this, *this, this->fill(), __n).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -699,10 +699,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(long double __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -711,13 +711,13 @@ basic_ostream<_CharT, _Traits>::operator<<(long double __n)
             if (__f.put(*this, *this, this->fill(), __n).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -725,10 +725,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::operator<<(const void* __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -737,13 +737,13 @@ basic_ostream<_CharT, _Traits>::operator<<(const void* __n)
             if (__f.put(*this, *this, this->fill(), __n).failed())
                 this->setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -752,10 +752,10 @@ basic_ostream<_CharT, _Traits>&
 __put_character_sequence(basic_ostream<_CharT, _Traits>& __os,
                           const _CharT* __str, size_t __len)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
         if (__s)
         {
@@ -770,13 +770,13 @@ __put_character_sequence(basic_ostream<_CharT, _Traits>& __os,
                                  __os.fill()).failed())
                 __os.setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         __os.__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return __os;
 }
 
@@ -785,17 +785,17 @@ template<class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c)
 {
-    return _VSTD::__put_character_sequence(__os, &__c, 1);
+    return _CUDA_VSTD::__put_character_sequence(__os, &__c, 1);
 }
 
 template<class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
         if (__s)
         {
@@ -811,13 +811,13 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, char __cn)
                                  __os.fill()).failed())
                 __os.setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         __os.__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return __os;
 }
 
@@ -825,38 +825,38 @@ template<class _Traits>
 basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, char __c)
 {
-    return _VSTD::__put_character_sequence(__os, &__c, 1);
+    return _CUDA_VSTD::__put_character_sequence(__os, &__c, 1);
 }
 
 template<class _Traits>
 basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, signed char __c)
 {
-    return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
+    return _CUDA_VSTD::__put_character_sequence(__os, (char *) &__c, 1);
 }
 
 template<class _Traits>
 basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, unsigned char __c)
 {
-    return _VSTD::__put_character_sequence(__os, (char *) &__c, 1);
+    return _CUDA_VSTD::__put_character_sequence(__os, (char *) &__c, 1);
 }
 
 template<class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __str)
 {
-    return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
+    return _CUDA_VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
 }
 
 template<class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         typename basic_ostream<_CharT, _Traits>::sentry __s(__os);
         if (__s)
         {
@@ -885,13 +885,13 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __strn)
                                  __os.fill()).failed())
                 __os.setstate(ios_base::badbit | ios_base::failbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         __os.__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return __os;
 }
 
@@ -899,7 +899,7 @@ template<class _Traits>
 basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, const char* __str)
 {
-    return _VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
+    return _CUDA_VSTD::__put_character_sequence(__os, __str, _Traits::length(__str));
 }
 
 template<class _Traits>
@@ -907,7 +907,7 @@ basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, const signed char* __str)
 {
     const char *__s = (const char *) __str;
-    return _VSTD::__put_character_sequence(__os, __s, _Traits::length(__s));
+    return _CUDA_VSTD::__put_character_sequence(__os, __s, _Traits::length(__s));
 }
 
 template<class _Traits>
@@ -915,17 +915,17 @@ basic_ostream<char, _Traits>&
 operator<<(basic_ostream<char, _Traits>& __os, const unsigned char* __str)
 {
     const char *__s = (const char *) __str;
-    return _VSTD::__put_character_sequence(__os, __s, _Traits::length(__s));
+    return _CUDA_VSTD::__put_character_sequence(__os, __s, _Traits::length(__s));
 }
 
 template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::put(char_type __c)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __s(*this);
         if (__s)
         {
@@ -935,13 +935,13 @@ basic_ostream<_CharT, _Traits>::put(char_type __c)
             if (__o.failed())
                 this->setstate(ios_base::badbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -949,23 +949,23 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::write(const char_type* __s, streamsize __n)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         sentry __sen(*this);
         if (__sen && __n)
         {
             if (this->rdbuf()->sputn(__s, __n) != __n)
                 this->setstate(ios_base::badbit);
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -973,10 +973,10 @@ template <class _CharT, class _Traits>
 basic_ostream<_CharT, _Traits>&
 basic_ostream<_CharT, _Traits>::flush()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         if (this->rdbuf())
         {
             sentry __s(*this);
@@ -986,13 +986,13 @@ basic_ostream<_CharT, _Traits>::flush()
                     this->setstate(ios_base::badbit);
             }
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
         this->__set_badbit_and_consider_rethrow();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return *this;
 }
 
@@ -1071,11 +1071,11 @@ template <class _Stream, class _Tp, class = typename enable_if<
     _And<is_base_of<ios_base, _Stream>,
          __is_ostreamable<_Stream&, const _Tp&> >::value
 >::type>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Stream&& operator<<(_Stream&& __os, const _Tp& __x)
 {
     __os << __x;
-    return _VSTD::move(__os);
+    return _CUDA_VSTD::move(__os);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
@@ -1083,7 +1083,7 @@ basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            const basic_string<_CharT, _Traits, _Allocator>& __str)
 {
-    return _VSTD::__put_character_sequence(__os, __str.data(), __str.size());
+    return _CUDA_VSTD::__put_character_sequence(__os, __str.data(), __str.size());
 }
 
 template<class _CharT, class _Traits>
@@ -1091,11 +1091,11 @@ basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os,
            basic_string_view<_CharT, _Traits> __sv)
 {
-    return _VSTD::__put_character_sequence(__os, __sv.data(), __sv.size());
+    return _CUDA_VSTD::__put_character_sequence(__os, __sv.data(), __sv.size());
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec)
 {
@@ -1103,7 +1103,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __ec)
 }
 
 template<class _CharT, class _Traits, class _Yp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p)
 {
@@ -1111,7 +1111,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p)
 }
 
 template<class _CharT, class _Traits, class _Yp, class _Dp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     is_same<void, typename __void_t<decltype((declval<basic_ostream<_CharT, _Traits>&>() << declval<typename unique_ptr<_Yp, _Dp>::pointer>()))>::type>::value,
@@ -1131,9 +1131,9 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Size>& __x)
                          use_facet<ctype<_CharT> >(__os.getloc()).widen('1'));
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class _Traits>
 basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, wchar_t) = delete;
 
@@ -1152,9 +1152,9 @@ basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, co
 template <class _Traits>
 basic_ostream<wchar_t, _Traits>& operator<<(basic_ostream<wchar_t, _Traits>&, const char32_t*) = delete;
 
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 template <class _Traits>
 basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, char8_t) = delete;
 
@@ -1180,13 +1180,13 @@ basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const ch
 template <class _Traits>
 basic_ostream<char, _Traits>& operator<<(basic_ostream<char, _Traits>&, const char32_t*) = delete;
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_OSTREAM
+#endif // _LIBCUDACXX_OSTREAM

diff  --git a/libcxx/include/queue b/libcxx/include/queue
index 9a5cfb39f24e..03ecfec55f5b 100644
--- a/libcxx/include/queue
+++ b/libcxx/include/queue
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_QUEUE
-#define _LIBCPP_QUEUE
+#ifndef _LIBCUDACXX_QUEUE
+#define _LIBCUDACXX_QUEUE
 
 /*
     queue synopsis
@@ -231,7 +231,7 @@ template <class T, class Container, class Compare>
 #include <vector>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <functional>
 #endif
 
@@ -239,26 +239,26 @@ template <class T, class Container, class Compare>
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp, class _Container = deque<_Tp> > class _LIBCPP_TEMPLATE_VIS queue;
+template <class _Tp, class _Container = deque<_Tp> > class _LIBCUDACXX_TEMPLATE_VIS queue;
 
 template <class _Tp, class _Container>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y);
 
 template <class _Tp, class _Container>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y);
 
 template <class _Tp, class _Container /*= deque<_Tp>*/>
-class _LIBCPP_TEMPLATE_VIS queue
+class _LIBCUDACXX_TEMPLATE_VIS queue
 {
 public:
     typedef _Container                               container_type;
@@ -272,132 +272,132 @@ protected:
     container_type c;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     queue()
         _NOEXCEPT_(is_nothrow_default_constructible<container_type>::value)
         : c() {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     queue(const queue& __q) : c(__q.c) {}
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     template <class _InputIterator,
               class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     queue(_InputIterator __first, _InputIterator __last) : c(__first, __last) {}
 
     template <class _InputIterator,
               class _Alloc,
               class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>,
               class = __enable_if_t<uses_allocator<container_type, _Alloc>::value>>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     queue(_InputIterator __first, _InputIterator __second, const _Alloc& __alloc) : c(__first, __second, __alloc) {}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     queue& operator=(const queue& __q) {c = __q.c; return *this;}
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     queue(queue&& __q)
         _NOEXCEPT_(is_nothrow_move_constructible<container_type>::value)
-        : c(_VSTD::move(__q.c)) {}
+        : c(_CUDA_VSTD::move(__q.c)) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     queue& operator=(queue&& __q)
         _NOEXCEPT_(is_nothrow_move_assignable<container_type>::value)
-        {c = _VSTD::move(__q.c); return *this;}
-#endif // _LIBCPP_CXX03_LANG
+        {c = _CUDA_VSTD::move(__q.c); return *this;}
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit queue(const container_type& __c)  : c(__c) {}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
-    explicit queue(container_type&& __c) : c(_VSTD::move(__c)) {}
-#endif // _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
+    explicit queue(container_type&& __c) : c(_CUDA_VSTD::move(__c)) {}
+#endif // _LIBCUDACXX_CXX03_LANG
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit queue(const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
             : c(__a) {}
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         queue(const queue& __q, const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
             : c(__q.c, __a) {}
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         queue(const container_type& __c, const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
             : c(__c, __a) {}
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         queue(container_type&& __c, const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
-            : c(_VSTD::move(__c), __a) {}
+            : c(_CUDA_VSTD::move(__c), __a) {}
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         queue(queue&& __q, const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
-            : c(_VSTD::move(__q.c), __a) {}
+            : c(_CUDA_VSTD::move(__q.c), __a) {}
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool      empty() const {return c.empty();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const  {return c.size();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference       front()       {return c.front();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference front() const {return c.front();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference       back()        {return c.back();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference back() const  {return c.back();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void push(const value_type& __v) {c.push_back(__v);}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
-    void push(value_type&& __v)      {c.push_back(_VSTD::move(__v));}
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void push(value_type&& __v)      {c.push_back(_CUDA_VSTD::move(__v));}
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
-#if _LIBCPP_STD_VER > 14
+        _LIBCUDACXX_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
         decltype(auto) emplace(_Args&&... __args)
-            { return c.emplace_back(_VSTD::forward<_Args>(__args)...);}
+            { return c.emplace_back(_CUDA_VSTD::forward<_Args>(__args)...);}
 #else
         void     emplace(_Args&&... __args)
-            {        c.emplace_back(_VSTD::forward<_Args>(__args)...);}
+            {        c.emplace_back(_CUDA_VSTD::forward<_Args>(__args)...);}
 #endif
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     void pop() {c.pop_front();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(queue& __q)
         _NOEXCEPT_(__is_nothrow_swappable<container_type>::value)
     {
-        using _VSTD::swap;
+        using _CUDA_VSTD::swap;
         swap(c, __q.c);
     }
 
     template <class _T1, class _C1>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool
     operator==(const queue<_T1, _C1>& __x,const queue<_T1, _C1>& __y);
 
     template <class _T1, class _C1>
     friend
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool
     operator< (const queue<_T1, _C1>& __x,const queue<_T1, _C1>& __y);
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template<class _Container,
          class = enable_if_t<!__is_allocator<_Container>::value>
 >
@@ -413,7 +413,7 @@ queue(_Container, _Alloc)
     -> queue<typename _Container::value_type, _Container>;
 #endif
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 template <class _InputIterator,
           class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>>
 queue(_InputIterator, _InputIterator)
@@ -428,7 +428,7 @@ queue(_InputIterator, _InputIterator, _Alloc)
 #endif
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 {
@@ -436,7 +436,7 @@ operator==(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 {
@@ -444,7 +444,7 @@ operator< (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 {
@@ -452,7 +452,7 @@ operator!=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator> (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 {
@@ -460,7 +460,7 @@ operator> (const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 {
@@ -468,7 +468,7 @@ operator>=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 {
@@ -476,7 +476,7 @@ operator<=(const queue<_Tp, _Container>& __x,const queue<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __enable_if_t<__is_swappable<_Container>::value, void>
 swap(queue<_Tp, _Container>& __x, queue<_Tp, _Container>& __y)
     _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
@@ -485,14 +485,14 @@ swap(queue<_Tp, _Container>& __x, queue<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator<queue<_Tp, _Container>, _Alloc>
+struct _LIBCUDACXX_TEMPLATE_VIS uses_allocator<queue<_Tp, _Container>, _Alloc>
     : public uses_allocator<_Container, _Alloc>
 {
 };
 
 template <class _Tp, class _Container = vector<_Tp>,
           class _Compare = less<typename _Container::value_type> >
-class _LIBCPP_TEMPLATE_VIS priority_queue
+class _LIBCUDACXX_TEMPLATE_VIS priority_queue
 {
 public:
     typedef _Container                               container_type;
@@ -508,136 +508,136 @@ protected:
     value_compare comp;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     priority_queue()
         _NOEXCEPT_(is_nothrow_default_constructible<container_type>::value &&
                    is_nothrow_default_constructible<value_compare>::value)
         : c(), comp() {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     priority_queue(const priority_queue& __q) : c(__q.c), comp(__q.comp) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     priority_queue& operator=(const priority_queue& __q)
         {c = __q.c; comp = __q.comp; return *this;}
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     priority_queue(priority_queue&& __q)
         _NOEXCEPT_(is_nothrow_move_constructible<container_type>::value &&
                    is_nothrow_move_constructible<value_compare>::value)
-        : c(_VSTD::move(__q.c)), comp(_VSTD::move(__q.comp)) {}
+        : c(_CUDA_VSTD::move(__q.c)), comp(_CUDA_VSTD::move(__q.comp)) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     priority_queue& operator=(priority_queue&& __q)
         _NOEXCEPT_(is_nothrow_move_assignable<container_type>::value &&
                    is_nothrow_move_assignable<value_compare>::value)
-        {c = _VSTD::move(__q.c); comp = _VSTD::move(__q.comp); return *this;}
-#endif // _LIBCPP_CXX03_LANG
+        {c = _CUDA_VSTD::move(__q.c); comp = _CUDA_VSTD::move(__q.comp); return *this;}
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit priority_queue(const value_compare& __comp)
         : c(), comp(__comp) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     priority_queue(const value_compare& __comp, const container_type& __c);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     priority_queue(const value_compare& __comp, container_type&& __c);
 #endif
     template <class _InputIter, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(_InputIter __f, _InputIter __l,
                        const value_compare& __comp = value_compare());
     template <class _InputIter, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(_InputIter __f, _InputIter __l,
                        const value_compare& __comp, const container_type& __c);
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _InputIter, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(_InputIter __f, _InputIter __l,
                        const value_compare& __comp, container_type&& __c);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit priority_queue(const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(const value_compare& __comp, const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(const value_compare& __comp, const container_type& __c,
                        const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(const priority_queue& __q, const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(const value_compare& __comp, container_type&& __c,
                        const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(priority_queue&& __q, const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(_InputIter __f, _InputIter __l, const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
 
     template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(_InputIter __f, _InputIter __l,
                        const value_compare& __comp, const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
 
     template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(_InputIter __f, _InputIter __l,
                        const value_compare& __comp, const container_type& __c, const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _InputIter, class _Alloc, class = __enable_if_t<__is_cpp17_input_iterator<_InputIter>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         priority_queue(_InputIter __f, _InputIter __l,
                        const value_compare& __comp, container_type&& __c, const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0);
-#endif  // _LIBCPP_CXX03_LANG
+#endif  // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool            empty() const {return c.empty();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type       size() const  {return c.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference top() const   {return c.front();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void push(const value_type& __v);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     void push(value_type&& __v);
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void emplace(_Args&&... __args);
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     void pop();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(priority_queue& __q)
         _NOEXCEPT_(__is_nothrow_swappable<container_type>::value &&
                    __is_nothrow_swappable<value_compare>::value);
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template <class _Compare,
           class _Container,
           class = enable_if_t<!__is_allocator<_Compare>::value>,
@@ -701,22 +701,22 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const _Compare& __comp
     : c(__c),
       comp(__comp)
 {
-    _VSTD::make_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::make_heap(c.begin(), c.end(), comp);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Container, class _Compare>
 inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& __comp,
                                                           container_type&& __c)
-    : c(_VSTD::move(__c)),
+    : c(_CUDA_VSTD::move(__c)),
       comp(__comp)
 {
-    _VSTD::make_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::make_heap(c.begin(), c.end(), comp);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Container, class _Compare>
 template <class _InputIter, class>
@@ -726,7 +726,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _Input
     : c(__f, __l),
       comp(__comp)
 {
-    _VSTD::make_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::make_heap(c.begin(), c.end(), comp);
 }
 
 template <class _Tp, class _Container, class _Compare>
@@ -739,10 +739,10 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _Input
       comp(__comp)
 {
     c.insert(c.end(), __f, __l);
-    _VSTD::make_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::make_heap(c.begin(), c.end(), comp);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Container, class _Compare>
 template <class _InputIter, class>
@@ -750,14 +750,14 @@ inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(_InputIter __f, _InputIter __l,
                                                           const value_compare& __comp,
                                                           container_type&& __c)
-    : c(_VSTD::move(__c)),
+    : c(_CUDA_VSTD::move(__c)),
       comp(__comp)
 {
     c.insert(c.end(), __f, __l);
-    _VSTD::make_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::make_heap(c.begin(), c.end(), comp);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Container, class _Compare>
 template <class _Alloc>
@@ -789,7 +789,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& _
     : c(__c, __a),
       comp(__comp)
 {
-    _VSTD::make_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::make_heap(c.begin(), c.end(), comp);
 }
 
 template <class _Tp, class _Container, class _Compare>
@@ -803,7 +803,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const priority_queue&
 {
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Container, class _Compare>
 template <class _Alloc>
@@ -812,10 +812,10 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(const value_compare& _
                                                           container_type&& __c,
                                                           const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
-    : c(_VSTD::move(__c), __a),
+    : c(_CUDA_VSTD::move(__c), __a),
       comp(__comp)
 {
-    _VSTD::make_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::make_heap(c.begin(), c.end(), comp);
 }
 
 template <class _Tp, class _Container, class _Compare>
@@ -824,12 +824,12 @@ inline
 priority_queue<_Tp, _Container, _Compare>::priority_queue(priority_queue&& __q,
                                                           const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
-    : c(_VSTD::move(__q.c), __a),
-      comp(_VSTD::move(__q.comp))
+    : c(_CUDA_VSTD::move(__q.c), __a),
+      comp(_CUDA_VSTD::move(__q.comp))
 {
 }
 
-#endif  // _LIBCPP_CXX03_LANG
+#endif  // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Container, class _Compare>
 template <class _InputIter, class _Alloc, class>
@@ -840,7 +840,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(
     : c(__f, __l, __a),
       comp()
 {
-    _VSTD::make_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::make_heap(c.begin(), c.end(), comp);
 }
 
 template <class _Tp, class _Container, class _Compare>
@@ -853,7 +853,7 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(
     : c(__f, __l, __a),
       comp(__comp)
 {
-    _VSTD::make_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::make_heap(c.begin(), c.end(), comp);
 }
 
 template <class _Tp, class _Container, class _Compare>
@@ -867,10 +867,10 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(
       comp(__comp)
 {
     c.insert(c.end(), __f, __l);
-    _VSTD::make_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::make_heap(c.begin(), c.end(), comp);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Tp, class _Container, class _Compare>
 template <class _InputIter, class _Alloc, class>
 inline
@@ -878,13 +878,13 @@ priority_queue<_Tp, _Container, _Compare>::priority_queue(
         _InputIter __f, _InputIter __l, const value_compare& __comp,
         container_type&& __c, const _Alloc& __a,
         __enable_if_t<uses_allocator<container_type, _Alloc>::value>*)
-    : c(_VSTD::move(__c), __a),
+    : c(_CUDA_VSTD::move(__c), __a),
       comp(__comp)
 {
     c.insert(c.end(), __f, __l);
-    _VSTD::make_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::make_heap(c.begin(), c.end(), comp);
 }
-#endif  // _LIBCPP_CXX03_LANG
+#endif  // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Container, class _Compare>
 inline
@@ -892,18 +892,18 @@ void
 priority_queue<_Tp, _Container, _Compare>::push(const value_type& __v)
 {
     c.push_back(__v);
-    _VSTD::push_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::push_heap(c.begin(), c.end(), comp);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Container, class _Compare>
 inline
 void
 priority_queue<_Tp, _Container, _Compare>::push(value_type&& __v)
 {
-    c.push_back(_VSTD::move(__v));
-    _VSTD::push_heap(c.begin(), c.end(), comp);
+    c.push_back(_CUDA_VSTD::move(__v));
+    _CUDA_VSTD::push_heap(c.begin(), c.end(), comp);
 }
 
 template <class _Tp, class _Container, class _Compare>
@@ -912,18 +912,18 @@ inline
 void
 priority_queue<_Tp, _Container, _Compare>::emplace(_Args&&... __args)
 {
-    c.emplace_back(_VSTD::forward<_Args>(__args)...);
-    _VSTD::push_heap(c.begin(), c.end(), comp);
+    c.emplace_back(_CUDA_VSTD::forward<_Args>(__args)...);
+    _CUDA_VSTD::push_heap(c.begin(), c.end(), comp);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Container, class _Compare>
 inline
 void
 priority_queue<_Tp, _Container, _Compare>::pop()
 {
-    _VSTD::pop_heap(c.begin(), c.end(), comp);
+    _CUDA_VSTD::pop_heap(c.begin(), c.end(), comp);
     c.pop_back();
 }
 
@@ -934,13 +934,13 @@ priority_queue<_Tp, _Container, _Compare>::swap(priority_queue& __q)
         _NOEXCEPT_(__is_nothrow_swappable<container_type>::value &&
                    __is_nothrow_swappable<value_compare>::value)
 {
-    using _VSTD::swap;
+    using _CUDA_VSTD::swap;
     swap(c, __q.c);
     swap(comp, __q.comp);
 }
 
 template <class _Tp, class _Container, class _Compare>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __enable_if_t<
     __is_swappable<_Container>::value && __is_swappable<_Compare>::value,
     void
@@ -953,11 +953,11 @@ swap(priority_queue<_Tp, _Container, _Compare>& __x,
 }
 
 template <class _Tp, class _Container, class _Compare, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc>
+struct _LIBCUDACXX_TEMPLATE_VIS uses_allocator<priority_queue<_Tp, _Container, _Compare>, _Alloc>
     : public uses_allocator<_Container, _Alloc>
 {
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_QUEUE
+#endif // _LIBCUDACXX_QUEUE

diff  --git a/libcxx/include/random b/libcxx/include/random
index 41ee4d85fda3..c05198adf2b1 100644
--- a/libcxx/include/random
+++ b/libcxx/include/random
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_RANDOM
-#define _LIBCPP_RANDOM
+#ifndef _LIBCUDACXX_RANDOM
+#define _LIBCUDACXX_RANDOM
 
 /*
     random synopsis
@@ -1718,7 +1718,7 @@ class piecewise_linear_distribution
 #include <__random/weibull_distribution.h>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #endif
 
@@ -1735,8 +1735,8 @@ class piecewise_linear_distribution
 #include <type_traits> // for backward compatibility; TODO remove it
 #include <vector>      // for backward compatibility; TODO remove it
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_RANDOM
+#endif // _LIBCUDACXX_RANDOM

diff  --git a/libcxx/include/ranges b/libcxx/include/ranges
index 82378a6b0daa..527298773f03 100644
--- a/libcxx/include/ranges
+++ b/libcxx/include/ranges
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_RANGES
-#define _LIBCPP_RANGES
+#ifndef _LIBCUDACXX_RANGES
+#define _LIBCUDACXX_RANGES
 
 /*
 
@@ -309,8 +309,8 @@ namespace std {
 #include <type_traits>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_RANGES
+#endif // _LIBCUDACXX_RANGES

diff  --git a/libcxx/include/ratio b/libcxx/include/ratio
index 5d7af88a2ac8..d2434485d320 100644
--- a/libcxx/include/ratio
+++ b/libcxx/include/ratio
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_RATIO
-#define _LIBCPP_RATIO
+#ifndef _LIBCUDACXX_RATIO
+#define _LIBCUDACXX_RATIO
 
 /*
     ratio synopsis
@@ -84,15 +84,15 @@ typedef ratio<1000000000000000000000000, 1> yotta;  // not supported
 #include <type_traits>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // __static_gcd
 
@@ -247,27 +247,27 @@ public:
 };
 
 template <intmax_t _Num, intmax_t _Den = 1>
-class _LIBCPP_TEMPLATE_VIS ratio
+class _LIBCUDACXX_TEMPLATE_VIS ratio
 {
     static_assert(__static_abs<_Num>::value >= 0, "ratio numerator is out of range");
     static_assert(_Den != 0, "ratio divide by 0");
     static_assert(__static_abs<_Den>::value >  0, "ratio denominator is out of range");
-    static _LIBCPP_CONSTEXPR const intmax_t __na = __static_abs<_Num>::value;
-    static _LIBCPP_CONSTEXPR const intmax_t __da = __static_abs<_Den>::value;
-    static _LIBCPP_CONSTEXPR const intmax_t __s = __static_sign<_Num>::value * __static_sign<_Den>::value;
-    static _LIBCPP_CONSTEXPR const intmax_t __gcd = __static_gcd<__na, __da>::value;
+    static _LIBCUDACXX_CONSTEXPR const intmax_t __na = __static_abs<_Num>::value;
+    static _LIBCUDACXX_CONSTEXPR const intmax_t __da = __static_abs<_Den>::value;
+    static _LIBCUDACXX_CONSTEXPR const intmax_t __s = __static_sign<_Num>::value * __static_sign<_Den>::value;
+    static _LIBCUDACXX_CONSTEXPR const intmax_t __gcd = __static_gcd<__na, __da>::value;
 public:
-    static _LIBCPP_CONSTEXPR const intmax_t num = __s * __na / __gcd;
-    static _LIBCPP_CONSTEXPR const intmax_t den = __da / __gcd;
+    static _LIBCUDACXX_CONSTEXPR const intmax_t num = __s * __na / __gcd;
+    static _LIBCUDACXX_CONSTEXPR const intmax_t den = __da / __gcd;
 
     typedef ratio<num, den> type;
 };
 
 template <intmax_t _Num, intmax_t _Den>
-_LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::num;
+_LIBCUDACXX_CONSTEXPR const intmax_t ratio<_Num, _Den>::num;
 
 template <intmax_t _Num, intmax_t _Den>
-_LIBCPP_CONSTEXPR const intmax_t ratio<_Num, _Den>::den;
+_LIBCUDACXX_CONSTEXPR const intmax_t ratio<_Num, _Den>::den;
 
 template <class _Tp>                    struct __is_ratio                     : false_type {};
 template <intmax_t _Num, intmax_t _Den> struct __is_ratio<ratio<_Num, _Den> > : true_type  {};
@@ -303,18 +303,18 @@ public:
         >::type type;
 };
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _R1, class _R2> using ratio_multiply
                                     = typename __ratio_multiply<_R1, _R2>::type;
 
-#else  // _LIBCPP_CXX03_LANG
+#else  // _LIBCUDACXX_CXX03_LANG
 
 template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_multiply
+struct _LIBCUDACXX_TEMPLATE_VIS ratio_multiply
     : public __ratio_multiply<_R1, _R2>::type {};
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _R1, class _R2>
 struct __ratio_divide
@@ -330,18 +330,18 @@ public:
         >::type type;
 };
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _R1, class _R2> using ratio_divide
                                       = typename __ratio_divide<_R1, _R2>::type;
 
-#else  // _LIBCPP_CXX03_LANG
+#else  // _LIBCUDACXX_CXX03_LANG
 
 template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_divide
+struct _LIBCUDACXX_TEMPLATE_VIS ratio_divide
     : public __ratio_divide<_R1, _R2>::type {};
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _R1, class _R2>
 struct __ratio_add
@@ -365,18 +365,18 @@ public:
         >::type type;
 };
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _R1, class _R2> using ratio_add
                                          = typename __ratio_add<_R1, _R2>::type;
 
-#else  // _LIBCPP_CXX03_LANG
+#else  // _LIBCUDACXX_CXX03_LANG
 
 template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_add
+struct _LIBCUDACXX_TEMPLATE_VIS ratio_add
     : public __ratio_add<_R1, _R2>::type {};
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _R1, class _R2>
 struct __ratio_subtract
@@ -400,27 +400,27 @@ public:
         >::type type;
 };
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _R1, class _R2> using ratio_subtract
                                     = typename __ratio_subtract<_R1, _R2>::type;
 
-#else  // _LIBCPP_CXX03_LANG
+#else  // _LIBCUDACXX_CXX03_LANG
 
 template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_subtract
+struct _LIBCUDACXX_TEMPLATE_VIS ratio_subtract
     : public __ratio_subtract<_R1, _R2>::type {};
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 // ratio_equal
 
 template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_equal
+struct _LIBCUDACXX_TEMPLATE_VIS ratio_equal
     : _BoolConstant<(_R1::num == _R2::num && _R1::den == _R2::den)> {};
 
 template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_not_equal
+struct _LIBCUDACXX_TEMPLATE_VIS ratio_not_equal
     : _BoolConstant<!ratio_equal<_R1, _R2>::value> {};
 
 // ratio_less
@@ -479,19 +479,19 @@ struct __ratio_less<_R1, _R2, -1LL, -1LL>
 };
 
 template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_less
+struct _LIBCUDACXX_TEMPLATE_VIS ratio_less
     : _BoolConstant<__ratio_less<_R1, _R2>::value> {};
 
 template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_less_equal
+struct _LIBCUDACXX_TEMPLATE_VIS ratio_less_equal
     : _BoolConstant<!ratio_less<_R2, _R1>::value> {};
 
 template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_greater
+struct _LIBCUDACXX_TEMPLATE_VIS ratio_greater
     : _BoolConstant<ratio_less<_R2, _R1>::value> {};
 
 template <class _R1, class _R2>
-struct _LIBCPP_TEMPLATE_VIS ratio_greater_equal
+struct _LIBCUDACXX_TEMPLATE_VIS ratio_greater_equal
     : _BoolConstant<!ratio_less<_R1, _R2>::value> {};
 
 template <class _R1, class _R2>
@@ -501,7 +501,7 @@ struct __ratio_gcd
                   __static_lcm<_R1::den, _R2::den>::value> type;
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _R1, class _R2>
 inline constexpr bool ratio_equal_v = ratio_equal<_R1, _R2>::value;
 
@@ -521,8 +521,8 @@ template <class _R1, class _R2>
 inline constexpr bool ratio_greater_equal_v = ratio_greater_equal<_R1, _R2>::value;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_RATIO
+#endif // _LIBCUDACXX_RATIO

diff  --git a/libcxx/include/regex b/libcxx/include/regex
index 26887e84bf28..0bd99b06d26a 100644
--- a/libcxx/include/regex
+++ b/libcxx/include/regex
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_REGEX
-#define _LIBCPP_REGEX
+#ifndef _LIBCUDACXX_REGEX
+#define _LIBCUDACXX_REGEX
 
 /*
     regex synopsis
@@ -778,7 +778,7 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
 #include <vector>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <iterator>
 #  include <utility>
 #endif
@@ -796,17 +796,17 @@ typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-#define _LIBCPP_REGEX_COMPLEXITY_FACTOR 4096
+#define _LIBCUDACXX_REGEX_COMPLEXITY_FACTOR 4096
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace regex_constants
 {
@@ -819,7 +819,7 @@ enum syntax_option_type
     nosubs     = 1 << 1,
     optimize   = 1 << 2,
     collate    = 1 << 3,
-#ifdef _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO
+#ifdef _LIBCUDACXX_ABI_REGEX_CONSTANTS_NONZERO
     ECMAScript = 1 << 9,
 #else
     ECMAScript = 0,
@@ -833,49 +833,49 @@ enum syntax_option_type
     multiline  = 1 << 10
 };
 
-inline _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_CONSTEXPR
 syntax_option_type __get_grammar(syntax_option_type __g)
 {
-#ifdef _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO
+#ifdef _LIBCUDACXX_ABI_REGEX_CONSTANTS_NONZERO
     return static_cast<syntax_option_type>(__g & 0x3F0);
 #else
     return static_cast<syntax_option_type>(__g & 0x1F0);
 #endif
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 syntax_option_type
 operator~(syntax_option_type __x)
 {
     return syntax_option_type(~int(__x) & 0x1FF);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 syntax_option_type
 operator&(syntax_option_type __x, syntax_option_type __y)
 {
     return syntax_option_type(int(__x) & int(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 syntax_option_type
 operator|(syntax_option_type __x, syntax_option_type __y)
 {
     return syntax_option_type(int(__x) | int(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 syntax_option_type
 operator^(syntax_option_type __x, syntax_option_type __y)
 {
     return syntax_option_type(int(__x) ^ int(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 syntax_option_type&
 operator&=(syntax_option_type& __x, syntax_option_type __y)
 {
@@ -883,7 +883,7 @@ operator&=(syntax_option_type& __x, syntax_option_type __y)
     return __x;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 syntax_option_type&
 operator|=(syntax_option_type& __x, syntax_option_type __y)
 {
@@ -891,7 +891,7 @@ operator|=(syntax_option_type& __x, syntax_option_type __y)
     return __x;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 syntax_option_type&
 operator^=(syntax_option_type& __x, syntax_option_type __y)
 {
@@ -920,39 +920,39 @@ enum match_flag_type
     __full_match      = 1 << 12
 };
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 match_flag_type
 operator~(match_flag_type __x)
 {
     return match_flag_type(~int(__x) & 0x0FFF);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 match_flag_type
 operator&(match_flag_type __x, match_flag_type __y)
 {
     return match_flag_type(int(__x) & int(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 match_flag_type
 operator|(match_flag_type __x, match_flag_type __y)
 {
     return match_flag_type(int(__x) | int(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR
 match_flag_type
 operator^(match_flag_type __x, match_flag_type __y)
 {
     return match_flag_type(int(__x) ^ int(__y));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 match_flag_type&
 operator&=(match_flag_type& __x, match_flag_type __y)
 {
@@ -960,7 +960,7 @@ operator&=(match_flag_type& __x, match_flag_type __y)
     return __x;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 match_flag_type&
 operator|=(match_flag_type& __x, match_flag_type __y)
 {
@@ -968,7 +968,7 @@ operator|=(match_flag_type& __x, match_flag_type __y)
     return __x;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 match_flag_type&
 operator^=(match_flag_type& __x, match_flag_type __y)
 {
@@ -999,7 +999,7 @@ enum error_type
 
 } // namespace regex_constants
 
-class _LIBCPP_EXCEPTION_ABI regex_error
+class _LIBCUDACXX_EXCEPTION_ABI regex_error
     : public runtime_error
 {
     regex_constants::error_type __code_;
@@ -1007,23 +1007,23 @@ public:
     explicit regex_error(regex_constants::error_type __ecode);
     regex_error(const regex_error&) _NOEXCEPT = default;
     virtual ~regex_error() _NOEXCEPT;
-     _LIBCPP_INLINE_VISIBILITY
+     _LIBCUDACXX_INLINE_VISIBILITY
     regex_constants::error_type code() const {return __code_;}
 };
 
 template <regex_constants::error_type _Ev>
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_regex_error()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw regex_error(_Ev);
 #else
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
 template <class _CharT>
-struct _LIBCPP_TEMPLATE_VIS regex_traits
+struct _LIBCUDACXX_TEMPLATE_VIS regex_traits
 {
 public:
     typedef _CharT                  char_type;
@@ -1052,37 +1052,37 @@ private:
 public:
     regex_traits();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static size_t length(const char_type* __p)
         {return char_traits<char_type>::length(__p);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char_type translate(char_type __c) const {return __c;}
     char_type translate_nocase(char_type __c) const;
     template <class _ForwardIterator>
         string_type
         transform(_ForwardIterator __f, _ForwardIterator __l) const;
     template <class _ForwardIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         string_type
         transform_primary( _ForwardIterator __f, _ForwardIterator __l) const
             {return __transform_primary(__f, __l, char_type());}
     template <class _ForwardIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         string_type
         lookup_collatename(_ForwardIterator __f, _ForwardIterator __l) const
             {return __lookup_collatename(__f, __l, char_type());}
     template <class _ForwardIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         char_class_type
         lookup_classname(_ForwardIterator __f, _ForwardIterator __l,
                          bool __icase = false) const
             {return __lookup_classname(__f, __l, __icase, char_type());}
     bool isctype(char_type __c, char_class_type __m) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int value(char_type __ch, int __radix) const
         {return __regex_traits_value(__ch, __radix);}
     locale_type imbue(locale_type __l);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     locale_type getloc()const {return __loc_;}
 
 private:
@@ -1091,7 +1091,7 @@ private:
     template <class _ForwardIterator>
         string_type
         __transform_primary(_ForwardIterator __f, _ForwardIterator __l, char) const;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     template <class _ForwardIterator>
         string_type
         __transform_primary(_ForwardIterator __f, _ForwardIterator __l, wchar_t) const;
@@ -1099,7 +1099,7 @@ private:
     template <class _ForwardIterator>
         string_type
         __lookup_collatename(_ForwardIterator __f, _ForwardIterator __l, char) const;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     template <class _ForwardIterator>
         string_type
         __lookup_collatename(_ForwardIterator __f, _ForwardIterator __l, wchar_t) const;
@@ -1108,7 +1108,7 @@ private:
         char_class_type
         __lookup_classname(_ForwardIterator __f, _ForwardIterator __l,
                            bool __icase, char) const;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     template <class _ForwardIterator>
         char_class_type
         __lookup_classname(_ForwardIterator __f, _ForwardIterator __l,
@@ -1116,11 +1116,11 @@ private:
 #endif
 
     static int __regex_traits_value(unsigned char __ch, int __radix);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int __regex_traits_value(char __ch, int __radix) const
         {return __regex_traits_value(static_cast<unsigned char>(__ch), __radix);}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+    _LIBCUDACXX_INLINE_VISIBILITY
     int __regex_traits_value(wchar_t __ch, int __radix) const;
 #endif
 };
@@ -1193,7 +1193,7 @@ regex_traits<_CharT>::__transform_primary(_ForwardIterator __f,
     return __d;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class _CharT>
 template <class _ForwardIterator>
 typename regex_traits<_CharT>::string_type
@@ -1219,7 +1219,7 @@ regex_traits<_CharT>::__transform_primary(_ForwardIterator __f,
 
 // lookup_collatename is very FreeBSD-specific
 
-_LIBCPP_FUNC_VIS string __get_collation_name(const char* __s);
+_LIBCUDACXX_FUNC_VIS string __get_collation_name(const char* __s);
 
 template <class _CharT>
 template <class _ForwardIterator>
@@ -1244,7 +1244,7 @@ regex_traits<_CharT>::__lookup_collatename(_ForwardIterator __f,
     return __r;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class _CharT>
 template <class _ForwardIterator>
 typename regex_traits<_CharT>::string_type
@@ -1278,11 +1278,11 @@ regex_traits<_CharT>::__lookup_collatename(_ForwardIterator __f,
     }
     return __r;
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // lookup_classname
 
-regex_traits<char>::char_class_type _LIBCPP_FUNC_VIS
+regex_traits<char>::char_class_type _LIBCUDACXX_FUNC_VIS
 __get_classname(const char* __s, bool __icase);
 
 template <class _CharT>
@@ -1297,7 +1297,7 @@ regex_traits<_CharT>::__lookup_classname(_ForwardIterator __f,
     return __get_classname(__s.c_str(), __icase);
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class _CharT>
 template <class _ForwardIterator>
 typename regex_traits<_CharT>::char_class_type
@@ -1318,7 +1318,7 @@ regex_traits<_CharT>::__lookup_classname(_ForwardIterator __f,
     }
     return __get_classname(__n.c_str(), __icase);
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 template <class _CharT>
 bool
@@ -1329,7 +1329,7 @@ regex_traits<_CharT>::isctype(char_type __c, char_class_type __m) const
     return (__c == '_' && (__m & __regex_word));
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool __is_07(unsigned char __c)
 {
     return (__c & 0xF8u) ==
@@ -1340,7 +1340,7 @@ bool __is_07(unsigned char __c)
 #endif
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool __is_89(unsigned char __c)
 {
     return (__c & 0xFEu) ==
@@ -1351,7 +1351,7 @@ bool __is_89(unsigned char __c)
 #endif
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 unsigned char __to_lower(unsigned char __c)
 {
 #if defined(__MVS__) && !defined(__NATIVE_ASCII_F)
@@ -1381,7 +1381,7 @@ regex_traits<_CharT>::__regex_traits_value(unsigned char __ch, int __radix)
     return -1;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <class _CharT>
 inline
 int
@@ -1393,11 +1393,11 @@ regex_traits<_CharT>::__regex_traits_value(wchar_t __ch, int __radix) const
 
 template <class _CharT> class __node;
 
-template <class _BidirectionalIterator> class _LIBCPP_TEMPLATE_VIS sub_match;
+template <class _BidirectionalIterator> class _LIBCUDACXX_TEMPLATE_VIS sub_match;
 
 template <class _BidirectionalIterator,
           class _Allocator = allocator<sub_match<_BidirectionalIterator> > >
-class _LIBCPP_TEMPLATE_VIS match_results;
+class _LIBCUDACXX_TEMPLATE_VIS match_results;
 
 template <class _CharT>
 struct __state
@@ -1426,7 +1426,7 @@ struct __state
     regex_constants::match_flag_type __flags_;
     bool __at_first_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __state()
         : __do_(0), __first_(nullptr), __current_(nullptr), __last_(nullptr),
           __node_(nullptr), __flags_() {}
@@ -1440,16 +1440,16 @@ class __node
     __node(const __node&);
     __node& operator=(const __node&);
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __node() {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual ~__node() {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual void __exec(__state&) const {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual void __exec_split(bool, __state&) const {}
 };
 
@@ -1460,9 +1460,9 @@ class __end_state
     : public __node<_CharT>
 {
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __end_state() {}
 
     virtual void __exec(__state&) const;
@@ -1484,13 +1484,13 @@ class __has_one_state
     __node<_CharT>* __first_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __has_one_state(__node<_CharT>* __s)
         : __first_(__s) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __node<_CharT>*  first() const {return __first_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __node<_CharT>*& first()       {return __first_;}
 };
 
@@ -1503,7 +1503,7 @@ class __owns_one_state
     typedef __has_one_state<_CharT> base;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __owns_one_state(__node<_CharT>* __s)
         : base(__s) {}
 
@@ -1525,9 +1525,9 @@ class __empty_state
     typedef __owns_one_state<_CharT> base;
 
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __empty_state(__node<_CharT>* __s)
         : base(__s) {}
 
@@ -1551,9 +1551,9 @@ class __empty_non_own_state
     typedef __has_one_state<_CharT> base;
 
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __empty_non_own_state(__node<_CharT>* __s)
         : base(__s) {}
 
@@ -1577,9 +1577,9 @@ class __repeat_one_loop
     typedef __has_one_state<_CharT> base;
 
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __repeat_one_loop(__node<_CharT>* __s)
         : base(__s) {}
 
@@ -1605,15 +1605,15 @@ class __owns_two_states
     base* __second_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __owns_two_states(__node<_CharT>* __s1, base* __s2)
         : base(__s1), __second_(__s2) {}
 
     virtual ~__owns_two_states();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     base*  second() const {return __second_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     base*& second()       {return __second_;}
 };
 
@@ -1639,9 +1639,9 @@ class __loop
     bool __greedy_;
 
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __loop(unsigned __loop_id,
                           __node<_CharT>* __s1, __owns_one_state<_CharT>* __s2,
                           unsigned __mexp_begin, unsigned __mexp_end,
@@ -1656,7 +1656,7 @@ public:
     virtual void __exec_split(bool __second, __state& __s) const;
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __init_repeat(__state& __s) const
     {
         __s.__loop_data_[__loop_id_].second = __s.__current_;
@@ -1738,9 +1738,9 @@ class __alternate
     typedef __owns_two_states<_CharT> base;
 
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __alternate(__owns_one_state<_CharT>* __s1,
                          __owns_one_state<_CharT>* __s2)
         : base(__s1, __s2) {}
@@ -1777,9 +1777,9 @@ class __begin_marked_subexpression
 
     unsigned __mexp_;
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __begin_marked_subexpression(unsigned __mexp, __node<_CharT>* __s)
         : base(__s), __mexp_(__mexp) {}
 
@@ -1805,9 +1805,9 @@ class __end_marked_subexpression
 
     unsigned __mexp_;
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __end_marked_subexpression(unsigned __mexp, __node<_CharT>* __s)
         : base(__s), __mexp_(__mexp) {}
 
@@ -1834,9 +1834,9 @@ class __back_ref
 
     unsigned __mexp_;
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __back_ref(unsigned __mexp, __node<_CharT>* __s)
         : base(__s), __mexp_(__mexp) {}
 
@@ -1854,7 +1854,7 @@ __back_ref<_CharT>::__exec(__state& __s) const
     {
         ptr
diff _t __len = __sm.second - __sm.first;
         if (__s.__last_ - __s.__current_ >= __len &&
-            _VSTD::equal(__sm.first, __sm.second, __s.__current_))
+            _CUDA_VSTD::equal(__sm.first, __sm.second, __s.__current_))
         {
             __s.__do_ = __state::__accept_but_not_consume;
             __s.__current_ += __len;
@@ -1884,9 +1884,9 @@ class __back_ref_icase
     _Traits __traits_;
     unsigned __mexp_;
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __back_ref_icase(const _Traits& __traits, unsigned __mexp,
                               __node<_CharT>* __s)
         : base(__s), __traits_(__traits), __mexp_(__mexp) {}
@@ -1939,9 +1939,9 @@ class __back_ref_collate
     _Traits __traits_;
     unsigned __mexp_;
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __back_ref_collate(const _Traits& __traits, unsigned __mexp,
                               __node<_CharT>* __s)
         : base(__s), __traits_(__traits), __mexp_(__mexp) {}
@@ -1994,9 +1994,9 @@ class __word_boundary
     _Traits __traits_;
     bool __invert_;
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __word_boundary(const _Traits& __traits, bool __invert,
                              __node<_CharT>* __s)
         : base(__s), __traits_(__traits), __invert_(__invert) {}
@@ -2056,7 +2056,7 @@ __word_boundary<_CharT, _Traits>::__exec(__state& __s) const
 // __l_anchor
 
 template <class _CharT>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 bool __is_eol(_CharT __c)
 {
     return __c == '\r' || __c == '\n';
@@ -2071,9 +2071,9 @@ class __l_anchor_multiline
     bool __multiline_;
 
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __l_anchor_multiline(bool __multiline, __node<_CharT>* __s)
         : base(__s), __multiline_(__multiline) {}
 
@@ -2092,7 +2092,7 @@ __l_anchor_multiline<_CharT>::__exec(__state& __s) const
     }
     else if (__multiline_ &&
              !__s.__at_first_ &&
-             __is_eol(*_VSTD::prev(__s.__current_)))
+             __is_eol(*_CUDA_VSTD::prev(__s.__current_)))
     {
         __s.__do_ = __state::__accept_but_not_consume;
         __s.__node_ = this->first();
@@ -2115,9 +2115,9 @@ class __r_anchor_multiline
     bool __multiline_;
 
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __r_anchor_multiline(bool __multiline, __node<_CharT>* __s)
         : base(__s), __multiline_(__multiline) {}
 
@@ -2155,9 +2155,9 @@ class __match_any
     typedef __owns_one_state<_CharT> base;
 
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __match_any(__node<_CharT>* __s)
         : base(__s) {}
 
@@ -2190,18 +2190,18 @@ class __match_any_but_newline
     typedef __owns_one_state<_CharT> base;
 
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __match_any_but_newline(__node<_CharT>* __s)
         : base(__s) {}
 
     virtual void __exec(__state&) const;
 };
 
-template <> _LIBCPP_FUNC_VIS void __match_any_but_newline<char>::__exec(__state&) const;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template <> _LIBCPP_FUNC_VIS void __match_any_but_newline<wchar_t>::__exec(__state&) const;
+template <> _LIBCUDACXX_FUNC_VIS void __match_any_but_newline<char>::__exec(__state&) const;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+template <> _LIBCUDACXX_FUNC_VIS void __match_any_but_newline<wchar_t>::__exec(__state&) const;
 #endif
 
 // __match_char
@@ -2217,9 +2217,9 @@ class __match_char
     __match_char(const __match_char&);
     __match_char& operator=(const __match_char&);
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __match_char(_CharT __c, __node<_CharT>* __s)
         : base(__s), __c_(__c) {}
 
@@ -2257,9 +2257,9 @@ class __match_char_icase
     __match_char_icase(const __match_char_icase&);
     __match_char_icase& operator=(const __match_char_icase&);
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __match_char_icase(const _Traits& __traits, _CharT __c, __node<_CharT>* __s)
         : base(__s), __traits_(__traits), __c_(__traits.translate_nocase(__c)) {}
 
@@ -2298,9 +2298,9 @@ class __match_char_collate
     __match_char_collate(const __match_char_collate&);
     __match_char_collate& operator=(const __match_char_collate&);
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __match_char_collate(const _Traits& __traits, _CharT __c, __node<_CharT>* __s)
         : base(__s), __traits_(__traits), __c_(__traits.translate(__c)) {}
 
@@ -2350,9 +2350,9 @@ class __bracket_expression
     __bracket_expression(const __bracket_expression&);
     __bracket_expression& operator=(const __bracket_expression&);
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __bracket_expression(const _Traits& __traits, __node<_CharT>* __s,
                                  bool __negate, bool __icase, bool __collate)
         : base(__s), __traits_(__traits), __mask_(), __neg_mask_(),
@@ -2361,10 +2361,10 @@ public:
 
     virtual void __exec(__state&) const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool __negated() const {return __negate_;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __add_char(_CharT __c)
         {
             if (__icase_)
@@ -2374,7 +2374,7 @@ public:
             else
                 __chars_.push_back(__c);
         }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __add_neg_char(_CharT __c)
         {
             if (__icase_)
@@ -2384,7 +2384,7 @@ public:
             else
                 __neg_chars_.push_back(__c);
         }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __add_range(string_type __b, string_type __e)
         {
             if (__collate_)
@@ -2416,10 +2416,10 @@ public:
                     __b[0] = __traits_.translate_nocase(__b[0]);
                     __e[0] = __traits_.translate_nocase(__e[0]);
                 }
-                __ranges_.push_back(make_pair(_VSTD::move(__b), _VSTD::move(__e)));
+                __ranges_.push_back(make_pair(_CUDA_VSTD::move(__b), _CUDA_VSTD::move(__e)));
             }
         }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __add_digraph(_CharT __c1, _CharT __c2)
         {
             if (__icase_)
@@ -2431,13 +2431,13 @@ public:
             else
                 __digraphs_.push_back(make_pair(__c1, __c2));
         }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __add_equivalence(const string_type& __s)
         {__equivalences_.push_back(__s);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __add_class(typename regex_traits<_CharT>::char_class_type __mask)
         {__mask_ |= __mask;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __add_neg_class(typename regex_traits<_CharT>::char_class_type __mask)
         {__neg_mask_ |= __mask;}
 };
@@ -2453,7 +2453,7 @@ __bracket_expression<_CharT, _Traits>::__exec(__state& __s) const
         ++__consumed;
         if (__might_have_digraph_)
         {
-            const _CharT* __next = _VSTD::next(__s.__current_);
+            const _CharT* __next = _CUDA_VSTD::next(__s.__current_);
             if (__next != __s.__last_)
             {
                 pair<_CharT, _CharT> __ch2(*__s.__current_, *__next);
@@ -2547,7 +2547,7 @@ __bracket_expression<_CharT, _Traits>::__exec(__state& __s) const
         {
             const bool __in_neg_mask = __traits_.isctype(__ch, __neg_mask_);
           const bool __in_neg_chars =
-              _VSTD::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) !=
+              _CUDA_VSTD::find(__neg_chars_.begin(), __neg_chars_.end(), __ch) !=
               __neg_chars_.end();
           if (!(__in_neg_mask || __in_neg_chars))
           {
@@ -2606,18 +2606,18 @@ __exit:
 template <class _CharT, class _Traits> class __lookahead;
 
 template <class _CharT, class _Traits = regex_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS basic_regex;
+    class _LIBCUDACXX_TEMPLATE_VIS basic_regex;
 
 typedef basic_regex<char>    regex;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef basic_regex<wchar_t> wregex;
 #endif
 
 template <class _CharT, class _Traits>
 class
-    _LIBCPP_TEMPLATE_VIS
-    _LIBCPP_PREFERRED_NAME(regex)
-    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wregex))
+    _LIBCUDACXX_TEMPLATE_VIS
+    _LIBCUDACXX_PREFERRED_NAME(regex)
+    _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wregex))
     basic_regex
 {
 public:
@@ -2637,8 +2637,8 @@ private:
     shared_ptr<__empty_state<_CharT> > __start_;
     __owns_one_state<_CharT>* __end_;
 
-    typedef _VSTD::__state<_CharT> __state;
-    typedef _VSTD::__node<_CharT> __node;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__node<_CharT> __node;
 
 public:
     // constants:
@@ -2655,12 +2655,12 @@ public:
     static const regex_constants::syntax_option_type multiline = regex_constants::multiline;
 
     // construct/copy/destroy:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_regex()
         : __flags_(regex_constants::ECMAScript), __marked_count_(0), __loop_count_(0), __open_count_(0),
           __end_(nullptr)
         {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_regex(const value_type* __p, flag_type __f = regex_constants::ECMAScript)
         : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0),
           __end_(nullptr)
@@ -2668,7 +2668,7 @@ public:
         __init(__p, __p + __traits_.length(__p));
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_regex(const value_type* __p, size_t __len, flag_type __f = regex_constants::ECMAScript)
         : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0),
           __end_(nullptr)
@@ -2679,7 +2679,7 @@ public:
 //     basic_regex(const basic_regex&) = default;
 //     basic_regex(basic_regex&&) = default;
     template <class _ST, class _SA>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit basic_regex(const basic_string<value_type, _ST, _SA>& __p,
                              flag_type __f = regex_constants::ECMAScript)
         : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0),
@@ -2689,7 +2689,7 @@ public:
         }
 
     template <class _ForwardIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         basic_regex(_ForwardIterator __first, _ForwardIterator __last,
                     flag_type __f = regex_constants::ECMAScript)
         : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0),
@@ -2697,8 +2697,8 @@ public:
         {
         __init(__first, __last);
         }
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_regex(initializer_list<value_type> __il,
                 flag_type __f = regex_constants::ECMAScript)
         : __flags_(__f), __marked_count_(0), __loop_count_(0), __open_count_(0),
@@ -2706,48 +2706,48 @@ public:
         {
         __init(__il.begin(), __il.end());
         }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 //    ~basic_regex() = default;
 
 //     basic_regex& operator=(const basic_regex&) = default;
 //     basic_regex& operator=(basic_regex&&) = default;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_regex& operator=(const value_type* __p)
         {return assign(__p);}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_regex& operator=(initializer_list<value_type> __il)
         {return assign(__il);}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
     template <class _ST, class _SA>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         basic_regex& operator=(const basic_string<value_type, _ST, _SA>& __p)
         {return assign(__p);}
 
     // assign:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_regex& assign(const basic_regex& __that)
         {return *this = __that;}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_regex& assign(basic_regex&& __that) _NOEXCEPT
-        {return *this = _VSTD::move(__that);}
+        {return *this = _CUDA_VSTD::move(__that);}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_regex& assign(const value_type* __p, flag_type __f = regex_constants::ECMAScript)
         {return assign(__p, __p + __traits_.length(__p), __f);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_regex& assign(const value_type* __p, size_t __len, flag_type __f = regex_constants::ECMAScript)
         {return assign(__p, __p + __len, __f);}
     template <class _ST, class _SA>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         basic_regex& assign(const basic_string<value_type, _ST, _SA>& __s,
                             flag_type __f = regex_constants::ECMAScript)
             {return assign(__s.begin(), __s.end(), __f);}
 
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value, basic_regex&>::type
         assign(_InputIterator __first, _InputIterator __last,
                             flag_type __f = regex_constants::ECMAScript)
@@ -2757,7 +2757,7 @@ public:
         }
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __member_init(flag_type __f)
     {
         __flags_ = __f;
@@ -2769,7 +2769,7 @@ private:
 public:
 
     template <class _ForwardIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if
         <
             __is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -2781,40 +2781,40 @@ public:
             return assign(basic_regex(__first, __last, __f));
         }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_regex& assign(initializer_list<value_type> __il,
                         flag_type __f = regex_constants::ECMAScript)
         {return assign(__il.begin(), __il.end(), __f);}
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     // const operations:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unsigned mark_count() const {return __marked_count_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     flag_type flags() const {return __flags_;}
 
     // locale:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     locale_type imbue(locale_type __loc)
     {
         __member_init(ECMAScript);
         __start_.reset();
         return __traits_.imbue(__loc);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     locale_type getloc() const {return __traits_.getloc();}
 
     // swap:
     void swap(basic_regex& __r);
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unsigned __loop_count() const {return __loop_count_;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool __use_multiline() const
     {
         return __get_grammar(__flags_) == ECMAScript && (__flags_ & multiline);
@@ -2965,17 +2965,17 @@ private:
 
     bool __test_back_ref(_CharT);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __push_l_anchor();
     void __push_r_anchor();
     void __push_match_any();
     void __push_match_any_but_newline();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __push_greedy_inf_repeat(size_t __min, __owns_one_state<_CharT>* __s,
                                   unsigned __mexp_begin = 0, unsigned __mexp_end = 0)
         {__push_loop(__min, numeric_limits<size_t>::max(), __s,
                      __mexp_begin, __mexp_end);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __push_nongreedy_inf_repeat(size_t __min, __owns_one_state<_CharT>* __s,
                                   unsigned __mexp_begin = 0, unsigned __mexp_end = 0)
         {__push_loop(__min, numeric_limits<size_t>::max(), __s,
@@ -3078,7 +3078,7 @@ private:
     template <class, class> friend class __lookahead;
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template <class _ForwardIterator,
           class = typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value, nullptr_t>::type
 >
@@ -3112,7 +3112,7 @@ template <class _CharT, class _Traits>
 void
 basic_regex<_CharT, _Traits>::swap(basic_regex& __r)
 {
-    using _VSTD::swap;
+    using _CUDA_VSTD::swap;
     swap(__traits_, __r.__traits_);
     swap(__flags_, __r.__flags_);
     swap(__marked_count_, __r.__marked_count_);
@@ -3123,7 +3123,7 @@ basic_regex<_CharT, _Traits>::swap(basic_regex& __r)
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(basic_regex<_CharT, _Traits>& __x, basic_regex<_CharT, _Traits>& __y)
 {
@@ -3145,9 +3145,9 @@ class __lookahead
     __lookahead(const __lookahead&);
     __lookahead& operator=(const __lookahead&);
 public:
-    typedef _VSTD::__state<_CharT> __state;
+    typedef _CUDA_VSTD::__state<_CharT> __state;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __lookahead(const basic_regex<_CharT, _Traits>& __exp, bool __invert, __node<_CharT>* __s, unsigned __mexp)
         : base(__s), __exp_(__exp), __mexp_(__mexp), __invert_(__invert) {}
 
@@ -3246,7 +3246,7 @@ basic_regex<_CharT, _Traits>::__parse_basic_reg_exp(_ForwardIterator __first,
             __first = __parse_RE_expression(__first, __last);
             if (__first != __last)
             {
-                _ForwardIterator __temp = _VSTD::next(__first);
+                _ForwardIterator __temp = _CUDA_VSTD::next(__first);
                 if (__temp == __last && *__first == '$')
                 {
                     __push_r_anchor();
@@ -3463,7 +3463,7 @@ basic_regex<_CharT, _Traits>::__parse_Back_open_paren(_ForwardIterator __first,
 {
     if (__first != __last)
     {
-        _ForwardIterator __temp = _VSTD::next(__first);
+        _ForwardIterator __temp = _CUDA_VSTD::next(__first);
         if (__temp != __last)
         {
             if (*__first == '\\' && *__temp == '(')
@@ -3481,7 +3481,7 @@ basic_regex<_CharT, _Traits>::__parse_Back_close_paren(_ForwardIterator __first,
 {
     if (__first != __last)
     {
-        _ForwardIterator __temp = _VSTD::next(__first);
+        _ForwardIterator __temp = _CUDA_VSTD::next(__first);
         if (__temp != __last)
         {
             if (*__first == '\\' && *__temp == ')')
@@ -3499,7 +3499,7 @@ basic_regex<_CharT, _Traits>::__parse_Back_open_brace(_ForwardIterator __first,
 {
     if (__first != __last)
     {
-        _ForwardIterator __temp = _VSTD::next(__first);
+        _ForwardIterator __temp = _CUDA_VSTD::next(__first);
         if (__temp != __last)
         {
             if (*__first == '\\' && *__temp == '{')
@@ -3517,7 +3517,7 @@ basic_regex<_CharT, _Traits>::__parse_Back_close_brace(_ForwardIterator __first,
 {
     if (__first != __last)
     {
-        _ForwardIterator __temp = _VSTD::next(__first);
+        _ForwardIterator __temp = _CUDA_VSTD::next(__first);
         if (__temp != __last)
         {
             if (*__first == '\\' && *__temp == '}')
@@ -3535,7 +3535,7 @@ basic_regex<_CharT, _Traits>::__parse_BACKREF(_ForwardIterator __first,
 {
     if (__first != __last)
     {
-        _ForwardIterator __temp = _VSTD::next(__first);
+        _ForwardIterator __temp = _CUDA_VSTD::next(__first);
         if (__temp != __last && *__first == '\\' && __test_back_ref(*__temp))
             __first = ++__temp;
     }
@@ -3550,7 +3550,7 @@ basic_regex<_CharT, _Traits>::__parse_ORD_CHAR(_ForwardIterator __first,
 {
     if (__first != __last)
     {
-        _ForwardIterator __temp = _VSTD::next(__first);
+        _ForwardIterator __temp = _CUDA_VSTD::next(__first);
         if (__temp == __last && *__first == '$')
             return __first;
         // Not called inside a bracket
@@ -3608,7 +3608,7 @@ basic_regex<_CharT, _Traits>::__parse_QUOTED_CHAR(_ForwardIterator __first,
 {
     if (__first != __last)
     {
-        _ForwardIterator __temp = _VSTD::next(__first);
+        _ForwardIterator __temp = _CUDA_VSTD::next(__first);
         if (__temp != __last)
         {
             if (*__first == '\\')
@@ -3639,7 +3639,7 @@ basic_regex<_CharT, _Traits>::__parse_QUOTED_CHAR_ERE(_ForwardIterator __first,
 {
     if (__first != __last)
     {
-        _ForwardIterator __temp = _VSTD::next(__first);
+        _ForwardIterator __temp = _CUDA_VSTD::next(__first);
         if (__temp != __last)
         {
             if (*__first == '\\')
@@ -3920,7 +3920,7 @@ basic_regex<_CharT, _Traits>::__parse_expression_term(_ForwardIterator __first,
 {
     if (__first != __last && *__first != ']')
     {
-        _ForwardIterator __temp = _VSTD::next(__first);
+        _ForwardIterator __temp = _CUDA_VSTD::next(__first);
         basic_string<_CharT> __start_range;
         if (__temp != __last && *__first == '[')
         {
@@ -3949,7 +3949,7 @@ basic_regex<_CharT, _Traits>::__parse_expression_term(_ForwardIterator __first,
         }
         if (__first != __last && *__first != ']')
         {
-            __temp = _VSTD::next(__first);
+            __temp = _CUDA_VSTD::next(__first);
             if (__temp != __last && *__first == '-' && *__temp != ']')
             {
                 // parse a range
@@ -3975,7 +3975,7 @@ basic_regex<_CharT, _Traits>::__parse_expression_term(_ForwardIterator __first,
                         ++__first;
                     }
                 }
-                __ml->__add_range(_VSTD::move(__start_range), _VSTD::move(__end_range));
+                __ml->__add_range(_CUDA_VSTD::move(__start_range), _CUDA_VSTD::move(__end_range));
             }
             else if (!__start_range.empty())
             {
@@ -4130,7 +4130,7 @@ basic_regex<_CharT, _Traits>::__parse_equivalence_class(_ForwardIterator __first
     // Found [=
     //   This means =] must exist
     value_type _Equal_close[2] = {'=', ']'};
-    _ForwardIterator __temp = _VSTD::search(__first, __last, _Equal_close,
+    _ForwardIterator __temp = _CUDA_VSTD::search(__first, __last, _Equal_close,
                                                             _Equal_close+2);
     if (__temp == __last)
         __throw_regex_error<regex_constants::error_brack>();
@@ -4158,7 +4158,7 @@ basic_regex<_CharT, _Traits>::__parse_equivalence_class(_ForwardIterator __first
             __throw_regex_error<regex_constants::error_collate>();
         }
     }
-    __first = _VSTD::next(__temp, 2);
+    __first = _CUDA_VSTD::next(__temp, 2);
     return __first;
 }
 
@@ -4172,7 +4172,7 @@ basic_regex<_CharT, _Traits>::__parse_character_class(_ForwardIterator __first,
     // Found [:
     //   This means :] must exist
     value_type _Colon_close[2] = {':', ']'};
-    _ForwardIterator __temp = _VSTD::search(__first, __last, _Colon_close,
+    _ForwardIterator __temp = _CUDA_VSTD::search(__first, __last, _Colon_close,
                                                             _Colon_close+2);
     if (__temp == __last)
         __throw_regex_error<regex_constants::error_brack>();
@@ -4183,7 +4183,7 @@ basic_regex<_CharT, _Traits>::__parse_character_class(_ForwardIterator __first,
     if (__class_type == 0)
         __throw_regex_error<regex_constants::error_ctype>();
     __ml->__add_class(__class_type);
-    __first = _VSTD::next(__temp, 2);
+    __first = _CUDA_VSTD::next(__temp, 2);
     return __first;
 }
 
@@ -4197,7 +4197,7 @@ basic_regex<_CharT, _Traits>::__parse_collating_symbol(_ForwardIterator __first,
     // Found [.
     //   This means .] must exist
     value_type _Dot_close[2] = {'.', ']'};
-    _ForwardIterator __temp = _VSTD::search(__first, __last, _Dot_close,
+    _ForwardIterator __temp = _CUDA_VSTD::search(__first, __last, _Dot_close,
                                                             _Dot_close+2);
     if (__temp == __last)
         __throw_regex_error<regex_constants::error_brack>();
@@ -4211,7 +4211,7 @@ basic_regex<_CharT, _Traits>::__parse_collating_symbol(_ForwardIterator __first,
     default:
         __throw_regex_error<regex_constants::error_collate>();
     }
-    __first = _VSTD::next(__temp, 2);
+    __first = _CUDA_VSTD::next(__temp, 2);
     return __first;
 }
 
@@ -4322,7 +4322,7 @@ basic_regex<_CharT, _Traits>::__parse_assertion(_ForwardIterator __first,
             break;
         case '\\':
             {
-                _ForwardIterator __temp = _VSTD::next(__first);
+                _ForwardIterator __temp = _CUDA_VSTD::next(__first);
                 if (__temp != __last)
                 {
                     if (*__temp == 'b')
@@ -4340,7 +4340,7 @@ basic_regex<_CharT, _Traits>::__parse_assertion(_ForwardIterator __first,
             break;
         case '(':
             {
-                _ForwardIterator __temp = _VSTD::next(__first);
+                _ForwardIterator __temp = _CUDA_VSTD::next(__first);
                 if (__temp != __last && *__temp == '?')
                 {
                     if (++__temp != __last)
@@ -4353,7 +4353,7 @@ basic_regex<_CharT, _Traits>::__parse_assertion(_ForwardIterator __first,
                                 __exp.__flags_ = __flags_;
                                 __temp = __exp.__parse(++__temp, __last);
                                 unsigned __mexp = __exp.__marked_count_;
-                                __push_lookahead(_VSTD::move(__exp), false, __marked_count_);
+                                __push_lookahead(_CUDA_VSTD::move(__exp), false, __marked_count_);
                                 __marked_count_ += __mexp;
                                 if (__temp == __last || *__temp != ')')
                                     __throw_regex_error<regex_constants::error_paren>();
@@ -4366,7 +4366,7 @@ basic_regex<_CharT, _Traits>::__parse_assertion(_ForwardIterator __first,
                                 __exp.__flags_ = __flags_;
                                 __temp = __exp.__parse(++__temp, __last);
                                 unsigned __mexp = __exp.__marked_count_;
-                                __push_lookahead(_VSTD::move(__exp), true, __marked_count_);
+                                __push_lookahead(_CUDA_VSTD::move(__exp), true, __marked_count_);
                                 __marked_count_ += __mexp;
                                 if (__temp == __last || *__temp != ')')
                                     __throw_regex_error<regex_constants::error_paren>();
@@ -4408,7 +4408,7 @@ basic_regex<_CharT, _Traits>::__parse_atom(_ForwardIterator __first,
                 ++__first;
                 if (__first == __last)
                     __throw_regex_error<regex_constants::error_paren>();
-                _ForwardIterator __temp = _VSTD::next(__first);
+                _ForwardIterator __temp = _CUDA_VSTD::next(__first);
                 if (__temp != __last && *__first == '?' && *__temp == ':')
                 {
                     ++__open_count_;
@@ -4454,7 +4454,7 @@ basic_regex<_CharT, _Traits>::__parse_atom_escape(_ForwardIterator __first,
 {
     if (__first != __last && *__first == '\\')
     {
-        _ForwardIterator __t1 = _VSTD::next(__first);
+        _ForwardIterator __t1 = _CUDA_VSTD::next(__first);
         if (__t1 == __last)
             __throw_regex_error<regex_constants::error_escape>();
 
@@ -4606,7 +4606,7 @@ basic_regex<_CharT, _Traits>::__parse_character_escape(_ForwardIterator __first,
             ++__first;
             break;
         case 'c':
-            if ((__t = _VSTD::next(__first)) != __last)
+            if ((__t = _CUDA_VSTD::next(__first)) != __last)
             {
                 if (('A' <= *__t && *__t <= 'Z') ||
                     ('a' <= *__t && *__t <= 'z'))
@@ -4725,7 +4725,7 @@ basic_regex<_CharT, _Traits>::__parse_grep(_ForwardIterator __first,
                                            _ForwardIterator __last)
 {
     __owns_one_state<_CharT>* __sa = __end_;
-    _ForwardIterator __t1 = _VSTD::find(__first, __last, _CharT('\n'));
+    _ForwardIterator __t1 = _CUDA_VSTD::find(__first, __last, _CharT('\n'));
     if (__t1 != __first)
         __parse_basic_reg_exp(__first, __t1);
     else
@@ -4735,7 +4735,7 @@ basic_regex<_CharT, _Traits>::__parse_grep(_ForwardIterator __first,
         ++__first;
     while (__first != __last)
     {
-        __t1 = _VSTD::find(__first, __last, _CharT('\n'));
+        __t1 = _CUDA_VSTD::find(__first, __last, _CharT('\n'));
         __owns_one_state<_CharT>* __sb = __end_;
         if (__t1 != __first)
             __parse_basic_reg_exp(__first, __t1);
@@ -4756,7 +4756,7 @@ basic_regex<_CharT, _Traits>::__parse_egrep(_ForwardIterator __first,
                                             _ForwardIterator __last)
 {
     __owns_one_state<_CharT>* __sa = __end_;
-    _ForwardIterator __t1 = _VSTD::find(__first, __last, _CharT('\n'));
+    _ForwardIterator __t1 = _CUDA_VSTD::find(__first, __last, _CharT('\n'));
     if (__t1 != __first)
         __parse_extended_reg_exp(__first, __t1);
     else
@@ -4766,7 +4766,7 @@ basic_regex<_CharT, _Traits>::__parse_egrep(_ForwardIterator __first,
         ++__first;
     while (__first != __last)
     {
-        __t1 = _VSTD::find(__first, __last, _CharT('\n'));
+        __t1 = _CUDA_VSTD::find(__first, __last, _CharT('\n'));
         __owns_one_state<_CharT>* __sb = __end_;
         if (__t1 != __first)
             __parse_extended_reg_exp(__first, __t1);
@@ -4962,18 +4962,18 @@ basic_regex<_CharT, _Traits>::__push_lookahead(const basic_regex& __exp,
 
 typedef sub_match<const char*>             csub_match;
 typedef sub_match<string::const_iterator>  ssub_match;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef sub_match<const wchar_t*>          wcsub_match;
 typedef sub_match<wstring::const_iterator> wssub_match;
 #endif
 
 template <class _BidirectionalIterator>
 class
-    _LIBCPP_TEMPLATE_VIS
-    _LIBCPP_PREFERRED_NAME(csub_match)
-    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wcsub_match))
-    _LIBCPP_PREFERRED_NAME(ssub_match)
-    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wssub_match))
+    _LIBCUDACXX_TEMPLATE_VIS
+    _LIBCUDACXX_PREFERRED_NAME(csub_match)
+    _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wcsub_match))
+    _LIBCUDACXX_PREFERRED_NAME(ssub_match)
+    _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wssub_match))
     sub_match
     : public pair<_BidirectionalIterator, _BidirectionalIterator>
 {
@@ -4985,32 +4985,32 @@ public:
 
     bool matched;
 
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR sub_match() : matched() {}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR sub_match() : matched() {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     
diff erence_type length() const
-        {return matched ? _VSTD::distance(this->first, this->second) : 0;}
-    _LIBCPP_INLINE_VISIBILITY
+        {return matched ? _CUDA_VSTD::distance(this->first, this->second) : 0;}
+    _LIBCUDACXX_INLINE_VISIBILITY
     string_type str() const
         {return matched ? string_type(this->first, this->second) : string_type();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator string_type() const
         {return str();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int compare(const sub_match& __s) const
         {return str().compare(__s.str());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int compare(const string_type& __s) const
         {return str().compare(__s);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int compare(const value_type* __s) const
         {return str().compare(__s);}
 };
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 {
@@ -5018,7 +5018,7 @@ operator==(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 {
@@ -5026,7 +5026,7 @@ operator!=(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 {
@@ -5034,7 +5034,7 @@ operator<(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 {
@@ -5042,7 +5042,7 @@ operator<=(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 {
@@ -5050,7 +5050,7 @@ operator>=(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 {
@@ -5058,7 +5058,7 @@ operator>(const sub_match<_BiIter>& __x, const sub_match<_BiIter>& __y)
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __x,
            const sub_match<_BiIter>& __y)
@@ -5067,7 +5067,7 @@ operator==(const basic_string<typename iterator_traits<_BiIter>::value_type, _ST
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __x,
            const sub_match<_BiIter>& __y)
@@ -5076,7 +5076,7 @@ operator!=(const basic_string<typename iterator_traits<_BiIter>::value_type, _ST
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __x,
           const sub_match<_BiIter>& __y)
@@ -5085,7 +5085,7 @@ operator<(const basic_string<typename iterator_traits<_BiIter>::value_type, _ST,
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>(const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __x,
           const sub_match<_BiIter>& __y)
@@ -5094,7 +5094,7 @@ operator>(const basic_string<typename iterator_traits<_BiIter>::value_type, _ST,
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator>=(const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __x,
                 const sub_match<_BiIter>& __y)
 {
@@ -5102,7 +5102,7 @@ bool operator>=(const basic_string<typename iterator_traits<_BiIter>::value_type
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __x,
            const sub_match<_BiIter>& __y)
@@ -5111,7 +5111,7 @@ operator<=(const basic_string<typename iterator_traits<_BiIter>::value_type, _ST
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const sub_match<_BiIter>& __x,
            const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __y)
@@ -5120,7 +5120,7 @@ operator==(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const sub_match<_BiIter>& __x,
            const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __y)
@@ -5129,7 +5129,7 @@ operator!=(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(const sub_match<_BiIter>& __x,
           const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __y)
@@ -5138,7 +5138,7 @@ operator<(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool operator>(const sub_match<_BiIter>& __x,
                const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __y)
 {
@@ -5146,7 +5146,7 @@ bool operator>(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const sub_match<_BiIter>& __x,
            const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __y)
@@ -5155,7 +5155,7 @@ operator>=(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const sub_match<_BiIter>& __x,
            const basic_string<typename iterator_traits<_BiIter>::value_type, _ST, _SA>& __y)
@@ -5164,7 +5164,7 @@ operator<=(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(typename iterator_traits<_BiIter>::value_type const* __x,
            const sub_match<_BiIter>& __y)
@@ -5173,7 +5173,7 @@ operator==(typename iterator_traits<_BiIter>::value_type const* __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(typename iterator_traits<_BiIter>::value_type const* __x,
            const sub_match<_BiIter>& __y)
@@ -5182,7 +5182,7 @@ operator!=(typename iterator_traits<_BiIter>::value_type const* __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(typename iterator_traits<_BiIter>::value_type const* __x,
           const sub_match<_BiIter>& __y)
@@ -5191,7 +5191,7 @@ operator<(typename iterator_traits<_BiIter>::value_type const* __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>(typename iterator_traits<_BiIter>::value_type const* __x,
           const sub_match<_BiIter>& __y)
@@ -5200,7 +5200,7 @@ operator>(typename iterator_traits<_BiIter>::value_type const* __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(typename iterator_traits<_BiIter>::value_type const* __x,
            const sub_match<_BiIter>& __y)
@@ -5209,7 +5209,7 @@ operator>=(typename iterator_traits<_BiIter>::value_type const* __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(typename iterator_traits<_BiIter>::value_type const* __x,
            const sub_match<_BiIter>& __y)
@@ -5218,7 +5218,7 @@ operator<=(typename iterator_traits<_BiIter>::value_type const* __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const sub_match<_BiIter>& __x,
            typename iterator_traits<_BiIter>::value_type const* __y)
@@ -5227,7 +5227,7 @@ operator==(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const sub_match<_BiIter>& __x,
            typename iterator_traits<_BiIter>::value_type const* __y)
@@ -5236,7 +5236,7 @@ operator!=(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(const sub_match<_BiIter>& __x,
           typename iterator_traits<_BiIter>::value_type const* __y)
@@ -5245,7 +5245,7 @@ operator<(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>(const sub_match<_BiIter>& __x,
           typename iterator_traits<_BiIter>::value_type const* __y)
@@ -5254,7 +5254,7 @@ operator>(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const sub_match<_BiIter>& __x,
            typename iterator_traits<_BiIter>::value_type const* __y)
@@ -5263,7 +5263,7 @@ operator>=(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const sub_match<_BiIter>& __x,
            typename iterator_traits<_BiIter>::value_type const* __y)
@@ -5272,7 +5272,7 @@ operator<=(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(typename iterator_traits<_BiIter>::value_type const& __x,
            const sub_match<_BiIter>& __y)
@@ -5282,7 +5282,7 @@ operator==(typename iterator_traits<_BiIter>::value_type const& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(typename iterator_traits<_BiIter>::value_type const& __x,
            const sub_match<_BiIter>& __y)
@@ -5291,7 +5291,7 @@ operator!=(typename iterator_traits<_BiIter>::value_type const& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(typename iterator_traits<_BiIter>::value_type const& __x,
           const sub_match<_BiIter>& __y)
@@ -5301,7 +5301,7 @@ operator<(typename iterator_traits<_BiIter>::value_type const& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>(typename iterator_traits<_BiIter>::value_type const& __x,
           const sub_match<_BiIter>& __y)
@@ -5310,7 +5310,7 @@ operator>(typename iterator_traits<_BiIter>::value_type const& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(typename iterator_traits<_BiIter>::value_type const& __x,
            const sub_match<_BiIter>& __y)
@@ -5319,7 +5319,7 @@ operator>=(typename iterator_traits<_BiIter>::value_type const& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(typename iterator_traits<_BiIter>::value_type const& __x,
            const sub_match<_BiIter>& __y)
@@ -5328,7 +5328,7 @@ operator<=(typename iterator_traits<_BiIter>::value_type const& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const sub_match<_BiIter>& __x,
            typename iterator_traits<_BiIter>::value_type const& __y)
@@ -5338,7 +5338,7 @@ operator==(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const sub_match<_BiIter>& __x,
            typename iterator_traits<_BiIter>::value_type const& __y)
@@ -5347,7 +5347,7 @@ operator!=(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(const sub_match<_BiIter>& __x,
           typename iterator_traits<_BiIter>::value_type const& __y)
@@ -5357,7 +5357,7 @@ operator<(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>(const sub_match<_BiIter>& __x,
           typename iterator_traits<_BiIter>::value_type const& __y)
@@ -5366,7 +5366,7 @@ operator>(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const sub_match<_BiIter>& __x,
            typename iterator_traits<_BiIter>::value_type const& __y)
@@ -5375,7 +5375,7 @@ operator>=(const sub_match<_BiIter>& __x,
 }
 
 template <class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const sub_match<_BiIter>& __x,
            typename iterator_traits<_BiIter>::value_type const& __y)
@@ -5384,7 +5384,7 @@ operator<=(const sub_match<_BiIter>& __x,
 }
 
 template <class _CharT, class _ST, class _BiIter>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_ostream<_CharT, _ST>&
 operator<<(basic_ostream<_CharT, _ST>& __os, const sub_match<_BiIter>& __m)
 {
@@ -5393,18 +5393,18 @@ operator<<(basic_ostream<_CharT, _ST>& __os, const sub_match<_BiIter>& __m)
 
 typedef match_results<const char*>             cmatch;
 typedef match_results<string::const_iterator>  smatch;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef match_results<const wchar_t*>          wcmatch;
 typedef match_results<wstring::const_iterator> wsmatch;
 #endif
 
 template <class _BidirectionalIterator, class _Allocator>
 class
-    _LIBCPP_TEMPLATE_VIS
-    _LIBCPP_PREFERRED_NAME(cmatch)
-    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wcmatch))
-    _LIBCPP_PREFERRED_NAME(smatch)
-    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wsmatch))
+    _LIBCUDACXX_TEMPLATE_VIS
+    _LIBCUDACXX_PREFERRED_NAME(cmatch)
+    _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wcmatch))
+    _LIBCUDACXX_PREFERRED_NAME(smatch)
+    _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wsmatch))
     match_results
 {
 public:
@@ -5430,7 +5430,7 @@ public:
     typedef basic_string<char_type>                           string_type;
 
     // construct/copy/destroy:
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     match_results() : match_results(allocator_type()) {}
     explicit match_results(const allocator_type& __a);
 #else
@@ -5443,63 +5443,63 @@ public:
 //    match_results& operator=(match_results&& __m) = default;
 //    ~match_results() = default;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool ready() const {return __ready_;}
 
     // size:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT {return __matches_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT {return __matches_.max_size();}
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool empty() const _NOEXCEPT {return size() == 0;}
 
     // element access:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     
diff erence_type length(size_type __sub = 0) const
         {
-        _LIBCPP_ASSERT(ready(), "match_results::length() called when not ready");
+        _LIBCUDACXX_ASSERT(ready(), "match_results::length() called when not ready");
         return (*this)[__sub].length();
         }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     
diff erence_type position(size_type __sub = 0) const
         {
-        _LIBCPP_ASSERT(ready(), "match_results::position() called when not ready");
-        return _VSTD::distance(__position_start_, (*this)[__sub].first);
+        _LIBCUDACXX_ASSERT(ready(), "match_results::position() called when not ready");
+        return _CUDA_VSTD::distance(__position_start_, (*this)[__sub].first);
         }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     string_type str(size_type __sub = 0) const
         {
-        _LIBCPP_ASSERT(ready(), "match_results::str() called when not ready");
+        _LIBCUDACXX_ASSERT(ready(), "match_results::str() called when not ready");
         return (*this)[__sub].str();
         }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference operator[](size_type __n) const
         {
-        _LIBCPP_ASSERT(ready(), "match_results::operator[]() called when not ready");
+        _LIBCUDACXX_ASSERT(ready(), "match_results::operator[]() called when not ready");
         return __n < __matches_.size() ? __matches_[__n] : __unmatched_;
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference prefix() const
         {
-        _LIBCPP_ASSERT(ready(), "match_results::prefix() called when not ready");
+        _LIBCUDACXX_ASSERT(ready(), "match_results::prefix() called when not ready");
         return __prefix_;
         }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference suffix() const
         {
-        _LIBCPP_ASSERT(ready(), "match_results::suffix() called when not ready");
+        _LIBCUDACXX_ASSERT(ready(), "match_results::suffix() called when not ready");
         return __suffix_;
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin() const {return empty() ? __matches_.end() : __matches_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end() const {return __matches_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin() const {return empty() ? __matches_.end() : __matches_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend() const {return __matches_.end();}
 
     // format:
@@ -5509,13 +5509,13 @@ public:
                const char_type* __fmt_last,
                regex_constants::match_flag_type __flags = regex_constants::format_default) const;
     template <class _OutputIter, class _ST, class _SA>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         _OutputIter
         format(_OutputIter __output_iter, const basic_string<char_type, _ST, _SA>& __fmt,
                regex_constants::match_flag_type __flags = regex_constants::format_default) const
             {return format(__output_iter, __fmt.data(), __fmt.data() + __fmt.size(), __flags);}
     template <class _ST, class _SA>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         basic_string<char_type, _ST, _SA>
         format(const basic_string<char_type, _ST, _SA>& __fmt,
                regex_constants::match_flag_type __flags = regex_constants::format_default) const
@@ -5525,7 +5525,7 @@ public:
                    __flags);
             return __r;
         }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     string_type
         format(const char_type* __fmt,
                regex_constants::match_flag_type __flags = regex_constants::format_default) const
@@ -5537,14 +5537,14 @@ public:
         }
 
     // allocator:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const {return __matches_.get_allocator();}
 
     // swap:
     void swap(match_results& __m);
 
     template <class _Bp, class _Ap>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void __assign(_BidirectionalIterator __f, _BidirectionalIterator __l,
                       const match_results<_Bp, _Ap>& __m, bool __no_update_pos)
     {
@@ -5552,18 +5552,18 @@ public:
         __matches_.resize(__m.size());
         for (size_type __i = 0; __i < __matches_.size(); ++__i)
         {
-            __matches_[__i].first = _VSTD::next(__f, _VSTD::distance(__mf, __m[__i].first));
-            __matches_[__i].second = _VSTD::next(__f, _VSTD::distance(__mf, __m[__i].second));
+            __matches_[__i].first = _CUDA_VSTD::next(__f, _CUDA_VSTD::distance(__mf, __m[__i].first));
+            __matches_[__i].second = _CUDA_VSTD::next(__f, _CUDA_VSTD::distance(__mf, __m[__i].second));
             __matches_[__i].matched = __m[__i].matched;
         }
         __unmatched_.first   = __l;
         __unmatched_.second  = __l;
         __unmatched_.matched = false;
-        __prefix_.first = _VSTD::next(__f, _VSTD::distance(__mf, __m.prefix().first));
-        __prefix_.second = _VSTD::next(__f, _VSTD::distance(__mf, __m.prefix().second));
+        __prefix_.first = _CUDA_VSTD::next(__f, _CUDA_VSTD::distance(__mf, __m.prefix().first));
+        __prefix_.second = _CUDA_VSTD::next(__f, _CUDA_VSTD::distance(__mf, __m.prefix().second));
         __prefix_.matched = __m.prefix().matched;
-        __suffix_.first = _VSTD::next(__f, _VSTD::distance(__mf, __m.suffix().first));
-        __suffix_.second = _VSTD::next(__f, _VSTD::distance(__mf, __m.suffix().second));
+        __suffix_.first = _CUDA_VSTD::next(__f, _CUDA_VSTD::distance(__mf, __m.suffix().first));
+        __suffix_.second = _CUDA_VSTD::next(__f, _CUDA_VSTD::distance(__mf, __m.suffix().second));
         __suffix_.matched = __m.suffix().matched;
         if (!__no_update_pos)
             __position_start_ = __prefix_.first;
@@ -5629,13 +5629,13 @@ match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __output_i
         const char_type* __fmt_first, const char_type* __fmt_last,
         regex_constants::match_flag_type __flags) const
 {
-    _LIBCPP_ASSERT(ready(), "match_results::format() called when not ready");
+    _LIBCUDACXX_ASSERT(ready(), "match_results::format() called when not ready");
     if (__flags & regex_constants::format_sed)
     {
         for (; __fmt_first != __fmt_last; ++__fmt_first)
         {
             if (*__fmt_first == '&')
-                __output_iter = _VSTD::copy(__matches_[0].first, __matches_[0].second,
+                __output_iter = _CUDA_VSTD::copy(__matches_[0].first, __matches_[0].second,
                                    __output_iter);
             else if (*__fmt_first == '\\' && __fmt_first + 1 != __fmt_last)
             {
@@ -5643,7 +5643,7 @@ match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __output_i
                 if ('0' <= *__fmt_first && *__fmt_first <= '9')
                 {
                     size_t __i = *__fmt_first - '0';
-                    __output_iter = _VSTD::copy((*this)[__i].first,
+                    __output_iter = _CUDA_VSTD::copy((*this)[__i].first,
                                         (*this)[__i].second, __output_iter);
                 }
                 else
@@ -5673,16 +5673,16 @@ match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __output_i
                     break;
                 case '&':
                     ++__fmt_first;
-                    __output_iter = _VSTD::copy(__matches_[0].first, __matches_[0].second,
+                    __output_iter = _CUDA_VSTD::copy(__matches_[0].first, __matches_[0].second,
                                        __output_iter);
                     break;
                 case '`':
                     ++__fmt_first;
-                    __output_iter = _VSTD::copy(__prefix_.first, __prefix_.second, __output_iter);
+                    __output_iter = _CUDA_VSTD::copy(__prefix_.first, __prefix_.second, __output_iter);
                     break;
                 case '\'':
                     ++__fmt_first;
-                    __output_iter = _VSTD::copy(__suffix_.first, __suffix_.second, __output_iter);
+                    __output_iter = _CUDA_VSTD::copy(__suffix_.first, __suffix_.second, __output_iter);
                     break;
                 default:
                     if ('0' <= __fmt_first[1] && __fmt_first[1] <= '9')
@@ -5697,7 +5697,7 @@ match_results<_BidirectionalIterator, _Allocator>::format(_OutputIter __output_i
                                 __throw_regex_error<regex_constants::error_escape>();
                             __idx = 10 * __idx + *__fmt_first - '0';
                         }
-                        __output_iter = _VSTD::copy((*this)[__idx].first,
+                        __output_iter = _CUDA_VSTD::copy((*this)[__idx].first,
                                             (*this)[__idx].second, __output_iter);
                     }
                     else
@@ -5722,7 +5722,7 @@ template <class _BidirectionalIterator, class _Allocator>
 void
 match_results<_BidirectionalIterator, _Allocator>::swap(match_results& __m)
 {
-    using _VSTD::swap;
+    using _CUDA_VSTD::swap;
     swap(__matches_, __m.__matches_);
     swap(__unmatched_, __m.__unmatched_);
     swap(__prefix_, __m.__prefix_);
@@ -5746,7 +5746,7 @@ operator==(const match_results<_BidirectionalIterator, _Allocator>& __x,
 }
 
 template <class _BidirectionalIterator, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const match_results<_BidirectionalIterator, _Allocator>& __x,
            const match_results<_BidirectionalIterator, _Allocator>& __y)
@@ -5755,7 +5755,7 @@ operator!=(const match_results<_BidirectionalIterator, _Allocator>& __x,
 }
 
 template <class _BidirectionalIterator, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(match_results<_BidirectionalIterator, _Allocator>& __x,
      match_results<_BidirectionalIterator, _Allocator>& __y)
@@ -5797,8 +5797,8 @@ basic_regex<_CharT, _Traits>::__match_at_start_ecma(
         do
         {
             ++__counter;
-            if (__counter % _LIBCPP_REGEX_COMPLEXITY_FACTOR == 0 &&
-                __counter / _LIBCPP_REGEX_COMPLEXITY_FACTOR >= __length)
+            if (__counter % _LIBCUDACXX_REGEX_COMPLEXITY_FACTOR == 0 &&
+                __counter / _LIBCUDACXX_REGEX_COMPLEXITY_FACTOR >= __length)
               __throw_regex_error<regex_constants::error_complexity>();
             __state& __s = __states.back();
             if (__s.__node_)
@@ -5819,7 +5819,7 @@ basic_regex<_CharT, _Traits>::__match_at_start_ecma(
                   break;
                 }
                 __m.__matches_[0].first = __first;
-                __m.__matches_[0].second = _VSTD::next(__first, __s.__current_ - __first);
+                __m.__matches_[0].second = _CUDA_VSTD::next(__first, __s.__current_ - __first);
                 __m.__matches_[0].matched = true;
                 for (unsigned __i = 0; __i < __s.__sub_matches_.size(); ++__i)
                     __m.__matches_[__i+1] = __s.__sub_matches_[__i];
@@ -5833,7 +5833,7 @@ basic_regex<_CharT, _Traits>::__match_at_start_ecma(
                 __state __snext = __s;
                 __s.__node_->__exec_split(true, __s);
                 __snext.__node_->__exec_split(false, __snext);
-                __states.push_back(_VSTD::move(__snext));
+                __states.push_back(_CUDA_VSTD::move(__snext));
                 }
                 break;
             case __state::__reject:
@@ -5859,7 +5859,7 @@ basic_regex<_CharT, _Traits>::__match_at_start_posix_nosubs(
 {
     deque<__state> __states;
     ptr
diff _t __highest_j = 0;
-    ptr
diff _t _Np = _VSTD::distance(__first, __last);
+    ptr
diff _t _Np = _CUDA_VSTD::distance(__first, __last);
     __node* __st = __start_.get();
     if (__st)
     {
@@ -5878,8 +5878,8 @@ basic_regex<_CharT, _Traits>::__match_at_start_posix_nosubs(
         do
         {
             ++__counter;
-            if (__counter % _LIBCPP_REGEX_COMPLEXITY_FACTOR == 0 &&
-                __counter / _LIBCPP_REGEX_COMPLEXITY_FACTOR >= __length)
+            if (__counter % _LIBCUDACXX_REGEX_COMPLEXITY_FACTOR == 0 &&
+                __counter / _LIBCUDACXX_REGEX_COMPLEXITY_FACTOR >= __length)
               __throw_regex_error<regex_constants::error_complexity>();
             __state& __s = __states.back();
             if (__s.__node_)
@@ -5910,7 +5910,7 @@ basic_regex<_CharT, _Traits>::__match_at_start_posix_nosubs(
             case __state::__consume_input:
                 break;
             case __state::__accept_and_consume:
-                __states.push_front(_VSTD::move(__s));
+                __states.push_front(_CUDA_VSTD::move(__s));
                 __states.pop_back();
                 break;
             case __state::__repeat:
@@ -5921,7 +5921,7 @@ basic_regex<_CharT, _Traits>::__match_at_start_posix_nosubs(
                 __state __snext = __s;
                 __s.__node_->__exec_split(true, __s);
                 __snext.__node_->__exec_split(false, __snext);
-                __states.push_back(_VSTD::move(__snext));
+                __states.push_back(_CUDA_VSTD::move(__snext));
                 }
                 break;
             case __state::__reject:
@@ -5935,7 +5935,7 @@ basic_regex<_CharT, _Traits>::__match_at_start_posix_nosubs(
         if (__matched)
         {
             __m.__matches_[0].first = __first;
-            __m.__matches_[0].second = _VSTD::next(__first, __highest_j);
+            __m.__matches_[0].second = _CUDA_VSTD::next(__first, __highest_j);
             __m.__matches_[0].matched = true;
             return true;
         }
@@ -5954,7 +5954,7 @@ basic_regex<_CharT, _Traits>::__match_at_start_posix_subs(
     vector<__state> __states;
     __state __best_state;
     ptr
diff _t __highest_j = 0;
-    ptr
diff _t _Np = _VSTD::distance(__first, __last);
+    ptr
diff _t _Np = _CUDA_VSTD::distance(__first, __last);
     __node* __st = __start_.get();
     if (__st)
     {
@@ -5979,8 +5979,8 @@ basic_regex<_CharT, _Traits>::__match_at_start_posix_subs(
         do
         {
             ++__counter;
-            if (__counter % _LIBCPP_REGEX_COMPLEXITY_FACTOR == 0 &&
-                __counter / _LIBCPP_REGEX_COMPLEXITY_FACTOR >= __length)
+            if (__counter % _LIBCUDACXX_REGEX_COMPLEXITY_FACTOR == 0 &&
+                __counter / _LIBCUDACXX_REGEX_COMPLEXITY_FACTOR >= __length)
               __throw_regex_error<regex_constants::error_complexity>();
             __state& __s = __states.back();
             if (__s.__node_)
@@ -6020,7 +6020,7 @@ basic_regex<_CharT, _Traits>::__match_at_start_posix_subs(
                 __state __snext = __s;
                 __s.__node_->__exec_split(true, __s);
                 __snext.__node_->__exec_split(false, __snext);
-                __states.push_back(_VSTD::move(__snext));
+                __states.push_back(_CUDA_VSTD::move(__snext));
                 }
                 break;
             case __state::__reject:
@@ -6034,7 +6034,7 @@ basic_regex<_CharT, _Traits>::__match_at_start_posix_subs(
         if (__matched)
         {
             __m.__matches_[0].first = __first;
-            __m.__matches_[0].second = _VSTD::next(__first, __highest_j);
+            __m.__matches_[0].second = _CUDA_VSTD::next(__first, __highest_j);
             __m.__matches_[0].matched = true;
             for (unsigned __i = 0; __i < __best_state.__sub_matches_.size(); ++__i)
                 __m.__matches_[__i+1] = __best_state.__sub_matches_[__i];
@@ -6103,7 +6103,7 @@ basic_regex<_CharT, _Traits>::__search(
 }
 
 template <class _BidirectionalIterator, class _Allocator, class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_search(_BidirectionalIterator __first, _BidirectionalIterator __last,
              match_results<_BidirectionalIterator, _Allocator>& __m,
@@ -6111,7 +6111,7 @@ regex_search(_BidirectionalIterator __first, _BidirectionalIterator __last,
              regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
     int __offset = (__flags & regex_constants::match_prev_avail) ? 1 : 0;
-    basic_string<_CharT> __s(_VSTD::prev(__first, __offset), __last);
+    basic_string<_CharT> __s(_CUDA_VSTD::prev(__first, __offset), __last);
     match_results<const _CharT*> __mc;
     bool __r = __e.__search(__s.data() + __offset, __s.data() + __s.size(), __mc, __flags);
     __m.__assign(__first, __last, __mc, __flags & regex_constants::__no_update_pos);
@@ -6119,7 +6119,7 @@ regex_search(_BidirectionalIterator __first, _BidirectionalIterator __last,
 }
 
 template <class _Iter, class _Allocator, class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_search(__wrap_iter<_Iter> __first,
              __wrap_iter<_Iter> __last,
@@ -6134,7 +6134,7 @@ regex_search(__wrap_iter<_Iter> __first,
 }
 
 template <class _Allocator, class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_search(const _CharT* __first, const _CharT* __last,
              match_results<const _CharT*, _Allocator>& __m,
@@ -6145,7 +6145,7 @@ regex_search(const _CharT* __first, const _CharT* __last,
 }
 
 template <class _BidirectionalIterator, class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_search(_BidirectionalIterator __first, _BidirectionalIterator __last,
              const basic_regex<_CharT, _Traits>& __e,
@@ -6157,7 +6157,7 @@ regex_search(_BidirectionalIterator __first, _BidirectionalIterator __last,
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_search(const _CharT* __first, const _CharT* __last,
              const basic_regex<_CharT, _Traits>& __e,
@@ -6168,7 +6168,7 @@ regex_search(const _CharT* __first, const _CharT* __last,
 }
 
 template <class _CharT, class _Allocator, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_search(const _CharT* __str, match_results<const _CharT*, _Allocator>& __m,
              const basic_regex<_CharT, _Traits>& __e,
@@ -6178,17 +6178,17 @@ regex_search(const _CharT* __str, match_results<const _CharT*, _Allocator>& __m,
 }
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_search(const _CharT* __str, const basic_regex<_CharT, _Traits>& __e,
              regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
     match_results<const _CharT*> __m;
-    return _VSTD::regex_search(__str, __m, __e, __flags);
+    return _CUDA_VSTD::regex_search(__str, __m, __e, __flags);
 }
 
 template <class _ST, class _SA, class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_search(const basic_string<_CharT, _ST, _SA>& __s,
              const basic_regex<_CharT, _Traits>& __e,
@@ -6199,7 +6199,7 @@ regex_search(const basic_string<_CharT, _ST, _SA>& __s,
 }
 
 template <class _ST, class _SA, class _Allocator, class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_search(const basic_string<_CharT, _ST, _SA>& __s,
              match_results<typename basic_string<_CharT, _ST, _SA>::const_iterator, _Allocator>& __m,
@@ -6212,7 +6212,7 @@ regex_search(const basic_string<_CharT, _ST, _SA>& __s,
     return __r;
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _ST, class _SA, class _Ap, class _Cp, class _Tp>
 bool
 regex_search(const basic_string<_Cp, _ST, _SA>&& __s,
@@ -6230,7 +6230,7 @@ regex_match(_BidirectionalIterator __first, _BidirectionalIterator __last,
             const basic_regex<_CharT, _Traits>& __e,
             regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
-    bool __r = _VSTD::regex_search(
+    bool __r = _CUDA_VSTD::regex_search(
         __first, __last, __m, __e,
         __flags | regex_constants::match_continuous |
         regex_constants::__full_match);
@@ -6244,40 +6244,40 @@ regex_match(_BidirectionalIterator __first, _BidirectionalIterator __last,
 }
 
 template <class _BidirectionalIterator, class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_match(_BidirectionalIterator __first, _BidirectionalIterator __last,
             const basic_regex<_CharT, _Traits>& __e,
             regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
     match_results<_BidirectionalIterator> __m;
-    return _VSTD::regex_match(__first, __last, __m, __e, __flags);
+    return _CUDA_VSTD::regex_match(__first, __last, __m, __e, __flags);
 }
 
 template <class _CharT, class _Allocator, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_match(const _CharT* __str, match_results<const _CharT*, _Allocator>& __m,
             const basic_regex<_CharT, _Traits>& __e,
             regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
-    return _VSTD::regex_match(__str, __str + _Traits::length(__str), __m, __e, __flags);
+    return _CUDA_VSTD::regex_match(__str, __str + _Traits::length(__str), __m, __e, __flags);
 }
 
 template <class _ST, class _SA, class _Allocator, class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_match(const basic_string<_CharT, _ST, _SA>& __s,
             match_results<typename basic_string<_CharT, _ST, _SA>::const_iterator, _Allocator>& __m,
             const basic_regex<_CharT, _Traits>& __e,
             regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
-    return _VSTD::regex_match(__s.begin(), __s.end(), __m, __e, __flags);
+    return _CUDA_VSTD::regex_match(__s.begin(), __s.end(), __m, __e, __flags);
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _ST, class _SA, class _Allocator, class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_match(const basic_string<_CharT, _ST, _SA>&& __s,
             match_results<typename basic_string<_CharT, _ST, _SA>::const_iterator, _Allocator>& __m,
@@ -6286,22 +6286,22 @@ regex_match(const basic_string<_CharT, _ST, _SA>&& __s,
 #endif
 
 template <class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_match(const _CharT* __str, const basic_regex<_CharT, _Traits>& __e,
             regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
-    return _VSTD::regex_match(__str, __str + _Traits::length(__str), __e, __flags);
+    return _CUDA_VSTD::regex_match(__str, __str + _Traits::length(__str), __e, __flags);
 }
 
 template <class _ST, class _SA, class _CharT, class _Traits>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 regex_match(const basic_string<_CharT, _ST, _SA>& __s,
             const basic_regex<_CharT, _Traits>& __e,
             regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
-    return _VSTD::regex_match(__s.begin(), __s.end(), __e, __flags);
+    return _CUDA_VSTD::regex_match(__s.begin(), __s.end(), __e, __flags);
 }
 
 // regex_iterator
@@ -6309,22 +6309,22 @@ regex_match(const basic_string<_CharT, _ST, _SA>& __s,
 template <class _BidirectionalIterator,
           class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type,
           class _Traits = regex_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS regex_iterator;
+    class _LIBCUDACXX_TEMPLATE_VIS regex_iterator;
 
 typedef regex_iterator<const char*>             cregex_iterator;
 typedef regex_iterator<string::const_iterator>  sregex_iterator;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef regex_iterator<const wchar_t*>          wcregex_iterator;
 typedef regex_iterator<wstring::const_iterator> wsregex_iterator;
 #endif
 
 template <class _BidirectionalIterator, class _CharT, class _Traits>
 class
-    _LIBCPP_TEMPLATE_VIS
-    _LIBCPP_PREFERRED_NAME(cregex_iterator)
-    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wcregex_iterator))
-    _LIBCPP_PREFERRED_NAME(sregex_iterator)
-    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wsregex_iterator))
+    _LIBCUDACXX_TEMPLATE_VIS
+    _LIBCUDACXX_PREFERRED_NAME(cregex_iterator)
+    _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wcregex_iterator))
+    _LIBCUDACXX_PREFERRED_NAME(sregex_iterator)
+    _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wsregex_iterator))
     regex_iterator
 {
 public:
@@ -6348,7 +6348,7 @@ public:
                    const regex_type& __re,
                    regex_constants::match_flag_type __m
                                               = regex_constants::match_default);
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     regex_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
                    const regex_type&& __re,
                    regex_constants::match_flag_type __m
@@ -6356,16 +6356,16 @@ public:
 #endif
 
     bool operator==(const regex_iterator& __x) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const regex_iterator& __x) const {return !(*this == __x);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {return  __match_;}
-    _LIBCPP_INLINE_VISIBILITY
-    pointer operator->() const  {return _VSTD::addressof(__match_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    pointer operator->() const  {return _CUDA_VSTD::addressof(__match_);}
 
     regex_iterator& operator++();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     regex_iterator operator++(int)
     {
         regex_iterator __t(*this);
@@ -6386,10 +6386,10 @@ regex_iterator<_BidirectionalIterator, _CharT, _Traits>::
                    const regex_type& __re, regex_constants::match_flag_type __m)
     : __begin_(__a),
       __end_(__b),
-      __pregex_(_VSTD::addressof(__re)),
+      __pregex_(_CUDA_VSTD::addressof(__re)),
       __flags_(__m)
 {
-    _VSTD::regex_search(__begin_, __end_, __match_, *__pregex_, __flags_);
+    _CUDA_VSTD::regex_search(__begin_, __end_, __match_, *__pregex_, __flags_);
 }
 
 template <class _BidirectionalIterator, class _CharT, class _Traits>
@@ -6421,7 +6421,7 @@ regex_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++()
             __match_ = value_type();
             return *this;
         }
-        else if (_VSTD::regex_search(__start, __end_, __match_, *__pregex_,
+        else if (_CUDA_VSTD::regex_search(__start, __end_, __match_, *__pregex_,
                                     __flags_ | regex_constants::match_not_null |
                                     regex_constants::match_continuous))
             return *this;
@@ -6429,7 +6429,7 @@ regex_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++()
             ++__start;
     }
     __flags_ |= regex_constants::match_prev_avail;
-    if (!_VSTD::regex_search(__start, __end_, __match_, *__pregex_, __flags_))
+    if (!_CUDA_VSTD::regex_search(__start, __end_, __match_, *__pregex_, __flags_))
         __match_ = value_type();
     return *this;
 }
@@ -6439,22 +6439,22 @@ regex_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++()
 template <class _BidirectionalIterator,
           class _CharT = typename iterator_traits<_BidirectionalIterator>::value_type,
           class _Traits = regex_traits<_CharT> >
-    class _LIBCPP_TEMPLATE_VIS regex_token_iterator;
+    class _LIBCUDACXX_TEMPLATE_VIS regex_token_iterator;
 
 typedef regex_token_iterator<const char*>             cregex_token_iterator;
 typedef regex_token_iterator<string::const_iterator>  sregex_token_iterator;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 typedef regex_token_iterator<const wchar_t*>          wcregex_token_iterator;
 typedef regex_token_iterator<wstring::const_iterator> wsregex_token_iterator;
 #endif
 
 template <class _BidirectionalIterator, class _CharT, class _Traits>
 class
-    _LIBCPP_TEMPLATE_VIS
-    _LIBCPP_PREFERRED_NAME(cregex_token_iterator)
-    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wcregex_token_iterator))
-    _LIBCPP_PREFERRED_NAME(sregex_token_iterator)
-    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wsregex_token_iterator))
+    _LIBCUDACXX_TEMPLATE_VIS
+    _LIBCUDACXX_PREFERRED_NAME(cregex_token_iterator)
+    _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wcregex_token_iterator))
+    _LIBCUDACXX_PREFERRED_NAME(sregex_token_iterator)
+    _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wsregex_token_iterator))
     regex_token_iterator
 {
 public:
@@ -6480,7 +6480,7 @@ public:
                          const regex_type& __re, int __submatch = 0,
                          regex_constants::match_flag_type __m =
                                                 regex_constants::match_default);
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
                          const regex_type&& __re, int __submatch = 0,
                          regex_constants::match_flag_type __m =
@@ -6491,28 +6491,28 @@ public:
                          const regex_type& __re, const vector<int>& __submatches,
                          regex_constants::match_flag_type __m =
                                                 regex_constants::match_default);
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
                          const regex_type&& __re, const vector<int>& __submatches,
                          regex_constants::match_flag_type __m =
                                      regex_constants::match_default) = delete;
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
                          const regex_type& __re,
                          initializer_list<int> __submatches,
                          regex_constants::match_flag_type __m =
                                                 regex_constants::match_default);
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     regex_token_iterator(_BidirectionalIterator __a, _BidirectionalIterator __b,
                          const regex_type&& __re,
                          initializer_list<int> __submatches,
                          regex_constants::match_flag_type __m =
                                        regex_constants::match_default) = delete;
 #endif
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
     template <size_t _Np>
         regex_token_iterator(_BidirectionalIterator __a,
                              _BidirectionalIterator __b,
@@ -6520,7 +6520,7 @@ public:
                              const int (&__submatches)[_Np],
                              regex_constants::match_flag_type __m =
                                                 regex_constants::match_default);
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <size_t _Np>
         regex_token_iterator(_BidirectionalIterator __a,
                              _BidirectionalIterator __b,
@@ -6534,16 +6534,16 @@ public:
     regex_token_iterator& operator=(const regex_token_iterator&);
 
     bool operator==(const regex_token_iterator& __x) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const regex_token_iterator& __x) const {return !(*this == __x);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const value_type& operator*() const {return *__result_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const value_type* operator->() const {return __result_;}
 
     regex_token_iterator& operator++();
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     regex_token_iterator operator++(int)
     {
         regex_token_iterator __t(*this);
@@ -6612,7 +6612,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
     __init(__a, __b);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _BidirectionalIterator, class _CharT, class _Traits>
 regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
@@ -6627,7 +6627,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::
     __init(__a, __b);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _BidirectionalIterator, class _CharT, class _Traits>
 template <size_t _Np>
@@ -6718,7 +6718,7 @@ regex_token_iterator<_BidirectionalIterator, _CharT, _Traits>::operator++()
             __establish_result();
         else
         {
-            if (_VSTD::find(__subs_.begin(), __subs_.end(), -1) != __subs_.end()
+            if (_CUDA_VSTD::find(__subs_.begin(), __subs_.end(), -1) != __subs_.end()
                 && __prev->suffix().length() != 0)
             {
                 __suffix_.matched = true;
@@ -6749,7 +6749,7 @@ regex_replace(_OutputIterator __output_iter,
     if (__i == __eof)
     {
         if (!(__flags & regex_constants::format_no_copy))
-            __output_iter = _VSTD::copy(__first, __last, __output_iter);
+            __output_iter = _CUDA_VSTD::copy(__first, __last, __output_iter);
     }
     else
     {
@@ -6757,21 +6757,21 @@ regex_replace(_OutputIterator __output_iter,
         for (size_t __len = char_traits<_CharT>::length(__fmt); __i != __eof; ++__i)
         {
             if (!(__flags & regex_constants::format_no_copy))
-                __output_iter = _VSTD::copy(__i->prefix().first, __i->prefix().second, __output_iter);
+                __output_iter = _CUDA_VSTD::copy(__i->prefix().first, __i->prefix().second, __output_iter);
             __output_iter = __i->format(__output_iter, __fmt, __fmt + __len, __flags);
             __lm = __i->suffix();
             if (__flags & regex_constants::format_first_only)
                 break;
         }
         if (!(__flags & regex_constants::format_no_copy))
-            __output_iter = _VSTD::copy(__lm.first, __lm.second, __output_iter);
+            __output_iter = _CUDA_VSTD::copy(__lm.first, __lm.second, __output_iter);
     }
     return __output_iter;
 }
 
 template <class _OutputIterator, class _BidirectionalIterator,
           class _Traits, class _CharT, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _OutputIterator
 regex_replace(_OutputIterator __output_iter,
               _BidirectionalIterator __first, _BidirectionalIterator __last,
@@ -6779,12 +6779,12 @@ regex_replace(_OutputIterator __output_iter,
               const basic_string<_CharT, _ST, _SA>& __fmt,
               regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
-    return _VSTD::regex_replace(__output_iter, __first, __last, __e, __fmt.c_str(), __flags);
+    return _CUDA_VSTD::regex_replace(__output_iter, __first, __last, __e, __fmt.c_str(), __flags);
 }
 
 template <class _Traits, class _CharT, class _ST, class _SA, class _FST,
           class _FSA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_string<_CharT, _ST, _SA>
 regex_replace(const basic_string<_CharT, _ST, _SA>& __s,
               const basic_regex<_CharT, _Traits>& __e,
@@ -6792,26 +6792,26 @@ regex_replace(const basic_string<_CharT, _ST, _SA>& __s,
               regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
     basic_string<_CharT, _ST, _SA> __r;
-    _VSTD::regex_replace(back_inserter(__r), __s.begin(), __s.end(), __e,
+    _CUDA_VSTD::regex_replace(back_inserter(__r), __s.begin(), __s.end(), __e,
                         __fmt.c_str(), __flags);
     return __r;
 }
 
 template <class _Traits, class _CharT, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_string<_CharT, _ST, _SA>
 regex_replace(const basic_string<_CharT, _ST, _SA>& __s,
               const basic_regex<_CharT, _Traits>& __e, const _CharT* __fmt,
               regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
     basic_string<_CharT, _ST, _SA> __r;
-    _VSTD::regex_replace(back_inserter(__r), __s.begin(), __s.end(), __e,
+    _CUDA_VSTD::regex_replace(back_inserter(__r), __s.begin(), __s.end(), __e,
                         __fmt, __flags);
     return __r;
 }
 
 template <class _Traits, class _CharT, class _ST, class _SA>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_string<_CharT>
 regex_replace(const _CharT* __s,
               const basic_regex<_CharT, _Traits>& __e,
@@ -6819,14 +6819,14 @@ regex_replace(const _CharT* __s,
               regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
     basic_string<_CharT> __r;
-    _VSTD::regex_replace(back_inserter(__r), __s,
+    _CUDA_VSTD::regex_replace(back_inserter(__r), __s,
                         __s + char_traits<_CharT>::length(__s), __e,
                         __fmt.c_str(), __flags);
     return __r;
 }
 
 template <class _Traits, class _CharT>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 basic_string<_CharT>
 regex_replace(const _CharT* __s,
               const basic_regex<_CharT, _Traits>& __e,
@@ -6834,14 +6834,14 @@ regex_replace(const _CharT* __s,
               regex_constants::match_flag_type __flags = regex_constants::match_default)
 {
     basic_string<_CharT> __r;
-    _VSTD::regex_replace(back_inserter(__r), __s,
+    _CUDA_VSTD::regex_replace(back_inserter(__r), __s,
                         __s + char_traits<_CharT>::length(__s), __e,
                         __fmt, __flags);
     return __r;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_REGEX
+#endif // _LIBCUDACXX_REGEX

diff  --git a/libcxx/include/scoped_allocator b/libcxx/include/scoped_allocator
index cf82affba78f..2ecb3114fa04 100644
--- a/libcxx/include/scoped_allocator
+++ b/libcxx/include/scoped_allocator
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SCOPED_ALLOCATOR
-#define _LIBCPP_SCOPED_ALLOCATOR
+#ifndef _LIBCUDACXX_SCOPED_ALLOCATOR
+#define _LIBCUDACXX_SCOPED_ALLOCATOR
 
 /*
     scoped_allocator synopsis
@@ -115,13 +115,13 @@ template <class OuterA1, class OuterA2, class... InnerAllocs>
 #include <memory>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if !defined(_LIBCPP_CXX03_LANG)
+#if !defined(_LIBCUDACXX_CXX03_LANG)
 
 // scoped_allocator_adaptor
 
@@ -211,24 +211,24 @@ private:
 
 protected:
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __scoped_allocator_storage() _NOEXCEPT {}
 
     template <class _OuterA2,
               class = typename enable_if<
                         is_constructible<outer_allocator_type, _OuterA2>::value
                       >::type>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         __scoped_allocator_storage(_OuterA2&& __outer_alloc,
                                    const _InnerAllocs& ...__inner_allocs) _NOEXCEPT
-            : outer_allocator_type(_VSTD::forward<_OuterA2>(__outer_alloc)),
+            : outer_allocator_type(_CUDA_VSTD::forward<_OuterA2>(__outer_alloc)),
               __inner_(__inner_allocs...) {}
 
     template <class _OuterA2,
               class = typename enable_if<
                         is_constructible<outer_allocator_type, const _OuterA2&>::value
                       >::type>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         __scoped_allocator_storage(
             const __scoped_allocator_storage<_OuterA2, _InnerAllocs...>& __other) _NOEXCEPT
             : outer_allocator_type(__other.outer_allocator()),
@@ -238,38 +238,38 @@ protected:
               class = typename enable_if<
                         is_constructible<outer_allocator_type, _OuterA2>::value
                       >::type>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         __scoped_allocator_storage(
             __scoped_allocator_storage<_OuterA2, _InnerAllocs...>&& __other) _NOEXCEPT
-            : outer_allocator_type(_VSTD::move(__other.outer_allocator())),
-              __inner_(_VSTD::move(__other.inner_allocator())) {}
+            : outer_allocator_type(_CUDA_VSTD::move(__other.outer_allocator())),
+              __inner_(_CUDA_VSTD::move(__other.inner_allocator())) {}
 
     template <class _OuterA2,
               class = typename enable_if<
                         is_constructible<outer_allocator_type, _OuterA2>::value
                       >::type>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         __scoped_allocator_storage(_OuterA2&& __o,
                                    const inner_allocator_type& __i) _NOEXCEPT
-            : outer_allocator_type(_VSTD::forward<_OuterA2>(__o)),
+            : outer_allocator_type(_CUDA_VSTD::forward<_OuterA2>(__o)),
               __inner_(__i)
         {
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     inner_allocator_type& inner_allocator() _NOEXCEPT             {return __inner_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const inner_allocator_type& inner_allocator() const _NOEXCEPT {return __inner_;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     outer_allocator_type& outer_allocator() _NOEXCEPT
         {return static_cast<outer_allocator_type&>(*this);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const outer_allocator_type& outer_allocator() const _NOEXCEPT
         {return static_cast<const outer_allocator_type&>(*this);}
 
     scoped_allocator_adaptor<outer_allocator_type, _InnerAllocs...>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     select_on_container_copy_construction() const _NOEXCEPT
         {
             return scoped_allocator_adaptor<outer_allocator_type, _InnerAllocs...>
@@ -292,22 +292,22 @@ class __scoped_allocator_storage<_OuterAlloc>
 protected:
     typedef scoped_allocator_adaptor<_OuterAlloc> inner_allocator_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __scoped_allocator_storage() _NOEXCEPT {}
 
     template <class _OuterA2,
               class = typename enable_if<
                         is_constructible<outer_allocator_type, _OuterA2>::value
                       >::type>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         __scoped_allocator_storage(_OuterA2&& __outer_alloc) _NOEXCEPT
-            : outer_allocator_type(_VSTD::forward<_OuterA2>(__outer_alloc)) {}
+            : outer_allocator_type(_CUDA_VSTD::forward<_OuterA2>(__outer_alloc)) {}
 
     template <class _OuterA2,
               class = typename enable_if<
                         is_constructible<outer_allocator_type, const _OuterA2&>::value
                       >::type>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         __scoped_allocator_storage(
             const __scoped_allocator_storage<_OuterA2>& __other) _NOEXCEPT
             : outer_allocator_type(__other.outer_allocator()) {}
@@ -316,26 +316,26 @@ protected:
               class = typename enable_if<
                         is_constructible<outer_allocator_type, _OuterA2>::value
                       >::type>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         __scoped_allocator_storage(
             __scoped_allocator_storage<_OuterA2>&& __other) _NOEXCEPT
-            : outer_allocator_type(_VSTD::move(__other.outer_allocator())) {}
+            : outer_allocator_type(_CUDA_VSTD::move(__other.outer_allocator())) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     inner_allocator_type& inner_allocator() _NOEXCEPT
         {return static_cast<inner_allocator_type&>(*this);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const inner_allocator_type& inner_allocator() const _NOEXCEPT
         {return static_cast<const inner_allocator_type&>(*this);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     outer_allocator_type& outer_allocator() _NOEXCEPT
         {return static_cast<outer_allocator_type&>(*this);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const outer_allocator_type& outer_allocator() const _NOEXCEPT
         {return static_cast<const outer_allocator_type&>(*this);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     scoped_allocator_adaptor<outer_allocator_type>
     select_on_container_copy_construction() const _NOEXCEPT
         {return scoped_allocator_adaptor<outer_allocator_type>(
@@ -372,7 +372,7 @@ template <class _Alloc, bool = __has_outer_allocator<_Alloc>::value>
 struct __outermost
 {
     typedef _Alloc type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     type& operator()(type& __a) const _NOEXCEPT {return __a;}
 };
 
@@ -384,13 +384,13 @@ struct __outermost<_Alloc, true>
                         decltype(declval<_Alloc>().outer_allocator())
                      >::type                                    _OuterAlloc;
     typedef typename __outermost<_OuterAlloc>::type             type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     type& operator()(_Alloc& __a) const _NOEXCEPT
         {return __outermost<_OuterAlloc>()(__a.outer_allocator());}
 };
 
 template <class _OuterAlloc, class... _InnerAllocs>
-class _LIBCPP_TEMPLATE_VIS scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...>
+class _LIBCUDACXX_TEMPLATE_VIS scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...>
     : public __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...>
 {
     typedef __scoped_allocator_storage<_OuterAlloc, _InnerAllocs...> base;
@@ -437,22 +437,22 @@ public:
         > other;
     };
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     scoped_allocator_adaptor() _NOEXCEPT {}
     template <class _OuterA2,
               class = typename enable_if<
                         is_constructible<outer_allocator_type, _OuterA2>::value
                       >::type>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         scoped_allocator_adaptor(_OuterA2&& __outer_alloc,
                                  const _InnerAllocs& ...__inner_allocs) _NOEXCEPT
-            : base(_VSTD::forward<_OuterA2>(__outer_alloc), __inner_allocs...) {}
+            : base(_CUDA_VSTD::forward<_OuterA2>(__outer_alloc), __inner_allocs...) {}
     // scoped_allocator_adaptor(const scoped_allocator_adaptor& __other) = default;
     template <class _OuterA2,
               class = typename enable_if<
                         is_constructible<outer_allocator_type, const _OuterA2&>::value
                       >::type>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         scoped_allocator_adaptor(
             const scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>& __other) _NOEXCEPT
                 : base(__other) {}
@@ -460,52 +460,52 @@ public:
               class = typename enable_if<
                         is_constructible<outer_allocator_type, _OuterA2>::value
                       >::type>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         scoped_allocator_adaptor(
             scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>&& __other) _NOEXCEPT
-                : base(_VSTD::move(__other)) {}
+                : base(_CUDA_VSTD::move(__other)) {}
 
     // scoped_allocator_adaptor& operator=(const scoped_allocator_adaptor&) = default;
     // scoped_allocator_adaptor& operator=(scoped_allocator_adaptor&&) = default;
     // ~scoped_allocator_adaptor() = default;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     inner_allocator_type& inner_allocator() _NOEXCEPT
         {return base::inner_allocator();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const inner_allocator_type& inner_allocator() const _NOEXCEPT
         {return base::inner_allocator();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     outer_allocator_type& outer_allocator() _NOEXCEPT
         {return base::outer_allocator();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const outer_allocator_type& outer_allocator() const _NOEXCEPT
         {return base::outer_allocator();}
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     pointer allocate(size_type __n)
         {return allocator_traits<outer_allocator_type>::
             allocate(outer_allocator(), __n);}
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     pointer allocate(size_type __n, const_void_pointer __hint)
         {return allocator_traits<outer_allocator_type>::
             allocate(outer_allocator(), __n, __hint);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void deallocate(pointer __p, size_type __n) _NOEXCEPT
         {allocator_traits<outer_allocator_type>::
             deallocate(outer_allocator(), __p, __n);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const
         {return allocator_traits<outer_allocator_type>::max_size(outer_allocator());}
 
     template <class _Tp, class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void construct(_Tp* __p, _Args&& ...__args)
             {__construct(__uses_alloc_ctor<_Tp, inner_allocator_type&, _Args...>(),
-                         __p, _VSTD::forward<_Args>(__args)...);}
+                         __p, _CUDA_VSTD::forward<_Args>(__args)...);}
 
     template <class _T1, class _T2, class... _Args1, class... _Args2>
     void construct(pair<_T1, _T2>* __p, piecewise_construct_t,
@@ -518,14 +518,14 @@ public:
               typename __uses_alloc_ctor<
                   _T1, inner_allocator_type&, _Args1...
               >::type()
-            , _VSTD::move(__x)
+            , _CUDA_VSTD::move(__x)
             , typename __make_tuple_indices<sizeof...(_Args1)>::type{}
           )
           , __transform_tuple(
               typename __uses_alloc_ctor<
                   _T2, inner_allocator_type&, _Args2...
               >::type()
-            , _VSTD::move(__y)
+            , _CUDA_VSTD::move(__y)
             , typename __make_tuple_indices<sizeof...(_Args2)>::type{}
           )
         );
@@ -538,26 +538,26 @@ public:
     template <class _T1, class _T2, class _Up, class _Vp>
     void construct(pair<_T1, _T2>* __p, _Up&& __x, _Vp&& __y) {
         construct(__p, piecewise_construct,
-                  _VSTD::forward_as_tuple(_VSTD::forward<_Up>(__x)),
-                  _VSTD::forward_as_tuple(_VSTD::forward<_Vp>(__y)));
+                  _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Up>(__x)),
+                  _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Vp>(__y)));
     }
 
     template <class _T1, class _T2, class _Up, class _Vp>
     void construct(pair<_T1, _T2>* __p, const pair<_Up, _Vp>& __x) {
         construct(__p, piecewise_construct,
-                  _VSTD::forward_as_tuple(__x.first),
-                  _VSTD::forward_as_tuple(__x.second));
+                  _CUDA_VSTD::forward_as_tuple(__x.first),
+                  _CUDA_VSTD::forward_as_tuple(__x.second));
     }
 
     template <class _T1, class _T2, class _Up, class _Vp>
     void construct(pair<_T1, _T2>* __p, pair<_Up, _Vp>&& __x) {
         construct(__p, piecewise_construct,
-                  _VSTD::forward_as_tuple(_VSTD::forward<_Up>(__x.first)),
-                  _VSTD::forward_as_tuple(_VSTD::forward<_Vp>(__x.second)));
+                  _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Up>(__x.first)),
+                  _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Vp>(__x.second)));
     }
 
     template <class _Tp>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void destroy(_Tp* __p)
             {
                 typedef __outermost<outer_allocator_type> _OM;
@@ -565,7 +565,7 @@ public:
                                          destroy(_OM()(outer_allocator()), __p);
             }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     scoped_allocator_adaptor select_on_container_copy_construction() const _NOEXCEPT
         {return base::select_on_container_copy_construction();}
 
@@ -576,13 +576,13 @@ private:
               class = typename enable_if<
                         is_constructible<outer_allocator_type, _OuterA2>::value
                       >::type>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     scoped_allocator_adaptor(_OuterA2&& __o,
                              const inner_allocator_type& __i) _NOEXCEPT
-        : base(_VSTD::forward<_OuterA2>(__o), __i) {}
+        : base(_CUDA_VSTD::forward<_OuterA2>(__o), __i) {}
 
     template <class _Tp, class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void __construct(integral_constant<int, 0>, _Tp* __p, _Args&& ...__args)
             {
                 typedef __outermost<outer_allocator_type> _OM;
@@ -590,12 +590,12 @@ private:
                 (
                     _OM()(outer_allocator()),
                     __p,
-                    _VSTD::forward<_Args>(__args)...
+                    _CUDA_VSTD::forward<_Args>(__args)...
                 );
             }
 
     template <class _Tp, class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void __construct(integral_constant<int, 1>, _Tp* __p, _Args&& ...__args)
             {
                 typedef __outermost<outer_allocator_type> _OM;
@@ -603,12 +603,12 @@ private:
                 (
                     _OM()(outer_allocator()),
                     __p, allocator_arg, inner_allocator(),
-                    _VSTD::forward<_Args>(__args)...
+                    _CUDA_VSTD::forward<_Args>(__args)...
                 );
             }
 
     template <class _Tp, class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void __construct(integral_constant<int, 2>, _Tp* __p, _Args&& ...__args)
             {
                 typedef __outermost<outer_allocator_type> _OM;
@@ -616,52 +616,52 @@ private:
                 (
                     _OM()(outer_allocator()),
                     __p,
-                    _VSTD::forward<_Args>(__args)...,
+                    _CUDA_VSTD::forward<_Args>(__args)...,
                     inner_allocator()
                 );
             }
 
     template <class ..._Args, size_t ..._Idx>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     tuple<_Args&&...>
     __transform_tuple(integral_constant<int, 0>, tuple<_Args...>&& __t,
                       __tuple_indices<_Idx...>)
     {
-        return _VSTD::forward_as_tuple(_VSTD::get<_Idx>(_VSTD::move(__t))...);
+        return _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__t))...);
     }
 
     template <class ..._Args, size_t ..._Idx>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     tuple<allocator_arg_t, inner_allocator_type&, _Args&&...>
     __transform_tuple(integral_constant<int, 1>, tuple<_Args...> && __t,
                       __tuple_indices<_Idx...>)
     {
         using _Tup = tuple<allocator_arg_t, inner_allocator_type&, _Args&&...>;
         return _Tup(allocator_arg, inner_allocator(),
-                    _VSTD::get<_Idx>(_VSTD::move(__t))...);
+                    _CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__t))...);
     }
 
     template <class ..._Args, size_t ..._Idx>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     tuple<_Args&&..., inner_allocator_type&>
     __transform_tuple(integral_constant<int, 2>, tuple<_Args...> && __t,
                       __tuple_indices<_Idx...>)
     {
         using _Tup = tuple<_Args&&..., inner_allocator_type&>;
-        return _Tup(_VSTD::get<_Idx>(_VSTD::move(__t))..., inner_allocator());
+        return _Tup(_CUDA_VSTD::get<_Idx>(_CUDA_VSTD::move(__t))..., inner_allocator());
     }
 
     template <class...> friend class __scoped_allocator_storage;
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template<class _OuterAlloc, class... _InnerAllocs>
     scoped_allocator_adaptor(_OuterAlloc, _InnerAllocs...)
         -> scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs...>;
 #endif
 
 template <class _OuterA1, class _OuterA2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const scoped_allocator_adaptor<_OuterA1>& __a,
            const scoped_allocator_adaptor<_OuterA2>& __b) _NOEXCEPT
@@ -670,7 +670,7 @@ operator==(const scoped_allocator_adaptor<_OuterA1>& __a,
 }
 
 template <class _OuterA1, class _OuterA2, class _InnerA0, class... _InnerAllocs>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const scoped_allocator_adaptor<_OuterA1, _InnerA0, _InnerAllocs...>& __a,
            const scoped_allocator_adaptor<_OuterA2, _InnerA0, _InnerAllocs...>& __b) _NOEXCEPT
@@ -680,7 +680,7 @@ operator==(const scoped_allocator_adaptor<_OuterA1, _InnerA0, _InnerAllocs...>&
 }
 
 template <class _OuterA1, class _OuterA2, class... _InnerAllocs>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const scoped_allocator_adaptor<_OuterA1, _InnerAllocs...>& __a,
            const scoped_allocator_adaptor<_OuterA2, _InnerAllocs...>& __b) _NOEXCEPT
@@ -688,8 +688,8 @@ operator!=(const scoped_allocator_adaptor<_OuterA1, _InnerAllocs...>& __a,
     return !(__a == __b);
 }
 
-#endif // !defined(_LIBCPP_CXX03_LANG)
+#endif // !defined(_LIBCUDACXX_CXX03_LANG)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_SCOPED_ALLOCATOR
+#endif // _LIBCUDACXX_SCOPED_ALLOCATOR

diff  --git a/libcxx/include/semaphore b/libcxx/include/semaphore
index 228cf773f0fd..c3cdaab4d123 100644
--- a/libcxx/include/semaphore
+++ b/libcxx/include/semaphore
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SEMAPHORE
-#define _LIBCPP_SEMAPHORE
+#ifndef _LIBCUDACXX_SEMAPHORE
+#define _LIBCUDACXX_SEMAPHORE
 
 /*
     semaphore synopsis
@@ -55,20 +55,20 @@ using binary_semaphore = counting_semaphore<1>;
 #include <limits>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifdef _LIBCPP_HAS_NO_THREADS
+#ifdef _LIBCUDACXX_HAS_NO_THREADS
 # error "<semaphore> is not supported since libc++ has been configured without support for threads."
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 /*
 
@@ -83,11 +83,11 @@ class __atomic_semaphore_base
     __atomic_base<ptr
diff _t> __a;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit __atomic_semaphore_base(ptr
diff _t __count) : __a(__count)
     {
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void release(ptr
diff _t __update = 1)
     {
         if(0 < __a.fetch_add(__update, memory_order_release))
@@ -97,7 +97,7 @@ public:
         else
             __a.notify_one();
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void acquire()
     {
         auto const __test_fn = [this]() -> bool {
@@ -107,15 +107,15 @@ public:
         __cxx_atomic_wait(&__a.__a_, __test_fn);
     }
     template <class Rep, class Period>
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     bool try_acquire_for(chrono::duration<Rep, Period> const& __rel_time)
     {
         if (__rel_time == chrono::duration<Rep, Period>::zero())
             return try_acquire();
         auto const __test_fn = [this]() { return try_acquire(); };
-        return __libcpp_thread_poll_with_backoff(__test_fn, __libcpp_timed_backoff_policy(), __rel_time);
+        return __LIBCUDACXX_thread_poll_with_backoff(__test_fn, __LIBCUDACXX_timed_backoff_policy(), __rel_time);
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     bool try_acquire()
     {
         auto __old = __a.load(memory_order_acquire);
@@ -128,9 +128,9 @@ public:
     }
 };
 
-#define _LIBCPP_SEMAPHORE_MAX (numeric_limits<ptr
diff _t>::max())
+#define _LIBCUDACXX_SEMAPHORE_MAX (numeric_limits<ptr
diff _t>::max())
 
-template<ptr
diff _t __least_max_value = _LIBCPP_SEMAPHORE_MAX>
+template<ptr
diff _t __least_max_value = _LIBCUDACXX_SEMAPHORE_MAX>
 class counting_semaphore
 {
     __atomic_semaphore_base __semaphore;
@@ -140,36 +140,36 @@ public:
         return __least_max_value;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit counting_semaphore(ptr
diff _t __count) : __semaphore(__count) { }
     ~counting_semaphore() = default;
 
     counting_semaphore(const counting_semaphore&) = delete;
     counting_semaphore& operator=(const counting_semaphore&) = delete;
 
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void release(ptr
diff _t __update = 1)
     {
         __semaphore.release(__update);
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     void acquire()
     {
         __semaphore.acquire();
     }
     template<class Rep, class Period>
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     bool try_acquire_for(chrono::duration<Rep, Period> const& __rel_time)
     {
         return __semaphore.try_acquire_for(chrono::duration_cast<chrono::nanoseconds>(__rel_time));
     }
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     bool try_acquire()
     {
         return __semaphore.try_acquire();
     }
     template <class Clock, class Duration>
-    _LIBCPP_AVAILABILITY_SYNC _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_SYNC _LIBCUDACXX_INLINE_VISIBILITY
     bool try_acquire_until(chrono::time_point<Clock, Duration> const& __abs_time)
     {
         auto const current = Clock::now();
@@ -182,10 +182,10 @@ public:
 
 using binary_semaphore = counting_semaphore<1>;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER >= 14
+#endif // _LIBCUDACXX_STD_VER >= 14
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif //_LIBCPP_SEMAPHORE
+#endif //_LIBCUDACXX_SEMAPHORE

diff  --git a/libcxx/include/set b/libcxx/include/set
index da62f6f5ca5b..9409f02c812e 100644
--- a/libcxx/include/set
+++ b/libcxx/include/set
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SET
-#define _LIBCPP_SET
+#ifndef _LIBCUDACXX_SET
+#define _LIBCUDACXX_SET
 
 /*
 
@@ -485,7 +485,7 @@ erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);  // C++20
 #include <__utility/forward.h>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <functional>
 #  include <iterator>
 #endif
@@ -503,18 +503,18 @@ erase_if(multiset<Key, Compare, Allocator>& c, Predicate pred);  // C++20
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Key, class _Compare, class _Allocator>
 class multiset;
 
 template <class _Key, class _Compare = less<_Key>,
           class _Allocator = allocator<_Key> >
-class _LIBCPP_TEMPLATE_VIS set
+class _LIBCUDACXX_TEMPLATE_VIS set
 {
 public:
     // types:
@@ -542,20 +542,20 @@ public:
     typedef typename __base::
diff erence_type       
diff erence_type;
     typedef typename __base::const_iterator        iterator;
     typedef typename __base::const_iterator        const_iterator;
-    typedef _VSTD::reverse_iterator<iterator>       reverse_iterator;
-    typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<iterator>       reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     typedef __set_node_handle<typename __base::__node, allocator_type> node_type;
     typedef __insert_return_type<iterator, node_type> insert_return_type;
 #endif
 
     template <class _Key2, class _Compare2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS set;
+        friend class _LIBCUDACXX_TEMPLATE_VIS set;
     template <class _Key2, class _Compare2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS multiset;
+        friend class _LIBCUDACXX_TEMPLATE_VIS multiset;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     set()
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
@@ -563,18 +563,18 @@ public:
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(value_compare()) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit set(const value_compare& __comp)
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__comp) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit set(const value_compare& __comp, const allocator_type& __a)
         : __tree_(__comp, __a) {}
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         set(_InputIterator __f, _InputIterator __l,
             const value_compare& __comp = value_compare())
         : __tree_(__comp)
@@ -583,7 +583,7 @@ public:
         }
 
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         set(_InputIterator __f, _InputIterator __l, const value_compare& __comp,
             const allocator_type& __a)
         : __tree_(__comp, __a)
@@ -591,56 +591,56 @@ public:
             insert(__f, __l);
         }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
         template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         set(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
             : set(__f, __l, key_compare(), __a) {}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     set(const set& __s)
         : __tree_(__s.__tree_)
         {
             insert(__s.begin(), __s.end());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     set& operator=(const set& __s)
         {
             __tree_ = __s.__tree_;
             return *this;
         }
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     set(set&& __s)
         _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
-        : __tree_(_VSTD::move(__s.__tree_)) {}
-#endif // _LIBCPP_CXX03_LANG
+        : __tree_(_CUDA_VSTD::move(__s.__tree_)) {}
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit set(const allocator_type& __a)
         : __tree_(__a) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     set(const set& __s, const allocator_type& __a)
         : __tree_(__s.__tree_.value_comp(), __a)
         {
             insert(__s.begin(), __s.end());
         }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     set(set&& __s, const allocator_type& __a);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     set(initializer_list<value_type> __il, const value_compare& __comp = value_compare())
         : __tree_(__comp)
         {
             insert(__il.begin(), __il.end());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     set(initializer_list<value_type> __il, const value_compare& __comp,
         const allocator_type& __a)
         : __tree_(__comp, __a)
@@ -648,284 +648,284 @@ public:
             insert(__il.begin(), __il.end());
         }
 
-#if _LIBCPP_STD_VER > 11
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 11
+    _LIBCUDACXX_INLINE_VISIBILITY
     set(initializer_list<value_type> __il, const allocator_type& __a)
         : set(__il, key_compare(), __a) {}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     set& operator=(initializer_list<value_type> __il)
         {
             __tree_.__assign_unique(__il.begin(), __il.end());
             return *this;
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     set& operator=(set&& __s)
         _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
         {
-            __tree_ = _VSTD::move(__s.__tree_);
+            __tree_ = _CUDA_VSTD::move(__s.__tree_);
             return *this;
         }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~set() {
         static_assert(sizeof(__diagnose_non_const_comparator<_Key, _Compare>()), "");
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator begin() _NOEXCEPT       {return __tree_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin() const _NOEXCEPT {return __tree_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator end() _NOEXCEPT         {return __tree_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()   const _NOEXCEPT {return __tree_.end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           reverse_iterator rbegin() _NOEXCEPT
             {return reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rbegin() const _NOEXCEPT
         {return const_reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           reverse_iterator rend() _NOEXCEPT
             {return reverse_iterator(begin());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rend() const _NOEXCEPT
         {return const_reverse_iterator(begin());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin()  const _NOEXCEPT {return begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend() const _NOEXCEPT {return end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crend() const _NOEXCEPT {return rend();}
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool empty() const _NOEXCEPT {return __tree_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT {return __tree_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT {return __tree_.max_size();}
 
     // modifiers:
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> emplace(_Args&&... __args)
-            {return __tree_.__emplace_unique(_VSTD::forward<_Args>(__args)...);}
+            {return __tree_.__emplace_unique(_CUDA_VSTD::forward<_Args>(__args)...);}
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator emplace_hint(const_iterator __p, _Args&&... __args)
-            {return __tree_.__emplace_hint_unique(__p, _VSTD::forward<_Args>(__args)...);}
-#endif // _LIBCPP_CXX03_LANG
+            {return __tree_.__emplace_hint_unique(__p, _CUDA_VSTD::forward<_Args>(__args)...);}
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator,bool> insert(const value_type& __v)
         {return __tree_.__insert_unique(__v);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, const value_type& __v)
         {return __tree_.__insert_unique(__p, __v);}
 
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void insert(_InputIterator __f, _InputIterator __l)
         {
             for (const_iterator __e = cend(); __f != __l; ++__f)
                 __tree_.__insert_unique(__e, *__f);
         }
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator,bool> insert(value_type&& __v)
-        {return __tree_.__insert_unique(_VSTD::move(__v));}
+        {return __tree_.__insert_unique(_CUDA_VSTD::move(__v));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, value_type&& __v)
-        {return __tree_.__insert_unique(__p, _VSTD::move(__v));}
+        {return __tree_.__insert_unique(__p, _CUDA_VSTD::move(__v));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void insert(initializer_list<value_type> __il)
         {insert(__il.begin(), __il.end());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator  erase(const_iterator __p) {return __tree_.erase(__p);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k)
         {return __tree_.__erase_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator  erase(const_iterator __f, const_iterator __l)
         {return __tree_.erase(__f, __l);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT {__tree_.clear();}
 
-#if _LIBCPP_STD_VER > 14
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
+    _LIBCUDACXX_INLINE_VISIBILITY
     insert_return_type insert(node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to set::insert()");
         return __tree_.template __node_handle_insert_unique<
-            node_type, insert_return_type>(_VSTD::move(__nh));
+            node_type, insert_return_type>(_CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __hint, node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to set::insert()");
         return __tree_.template __node_handle_insert_unique<node_type>(
-            __hint, _VSTD::move(__nh));
+            __hint, _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(key_type const& __key)
     {
         return __tree_.template __node_handle_extract<node_type>(__key);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(const_iterator __it)
     {
         return __tree_.template __node_handle_extract<node_type>(__it);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(set<key_type, _Compare2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_unique(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(set<key_type, _Compare2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_unique(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(multiset<key_type, _Compare2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_unique(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(multiset<key_type, _Compare2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_unique(__source.__tree_);
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(set& __s) _NOEXCEPT_(__is_nothrow_swappable<__base>::value)
         {__tree_.swap(__s.__tree_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT {return __tree_.__alloc();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_compare    key_comp()      const {return __tree_.value_comp();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_compare  value_comp()    const {return __tree_.value_comp();}
 
     // set operations:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator find(const key_type& __k)             {return __tree_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __tree_.find(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
     find(const _K2& __k)                           {return __tree_.find(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
     find(const _K2& __k) const                     {return __tree_.find(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type      count(const key_type& __k) const
         {return __tree_.__count_unique(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,size_type>::type
     count(const _K2& __k) const                    {return __tree_.__count_multi(__k);}
 #endif
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const key_type& __k) const {return find(__k) != end();}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value, bool>::type
     contains(const _K2& __k) const { return find(__k) != end(); }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator lower_bound(const key_type& __k)
         {return __tree_.lower_bound(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator lower_bound(const key_type& __k) const
         {return __tree_.lower_bound(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
     lower_bound(const _K2& __k)       {return __tree_.lower_bound(__k);}
 
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
     lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator upper_bound(const key_type& __k)
         {return __tree_.upper_bound(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator upper_bound(const key_type& __k) const
         {return __tree_.upper_bound(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
     upper_bound(const _K2& __k)       {return __tree_.upper_bound(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
     upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator,iterator> equal_range(const key_type& __k)
         {return __tree_.__equal_range_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator,const_iterator> equal_range(const key_type& __k) const
         {return __tree_.__equal_range_unique(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,pair<iterator,iterator>>::type
     equal_range(const _K2& __k)       {return __tree_.__equal_range_multi(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,pair<const_iterator,const_iterator>>::type
     equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);}
 #endif
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator,
          class _Compare = less<__iter_value_type<_InputIterator>>,
          class _Allocator = allocator<__iter_value_type<_InputIterator>>,
@@ -955,42 +955,42 @@ set(initializer_list<_Key>, _Allocator)
   -> set<_Key, less<_Key>, _Allocator>;
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Compare, class _Allocator>
 set<_Key, _Compare, _Allocator>::set(set&& __s, const allocator_type& __a)
-    : __tree_(_VSTD::move(__s.__tree_), __a)
+    : __tree_(_CUDA_VSTD::move(__s.__tree_), __a)
 {
     if (__a != __s.get_allocator())
     {
         const_iterator __e = cend();
         while (!__s.empty())
-            insert(__e, _VSTD::move(__s.__tree_.remove(__s.begin())->__value_));
+            insert(__e, _CUDA_VSTD::move(__s.__tree_.remove(__s.begin())->__value_));
     }
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const set<_Key, _Compare, _Allocator>& __x,
            const set<_Key, _Compare, _Allocator>& __y)
 {
-    return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
+    return __x.size() == __y.size() && _CUDA_VSTD::equal(__x.begin(), __x.end(), __y.begin());
 }
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const set<_Key, _Compare, _Allocator>& __x,
            const set<_Key, _Compare, _Allocator>& __y)
 {
-    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
+    return _CUDA_VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
 }
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const set<_Key, _Compare, _Allocator>& __x,
            const set<_Key, _Compare, _Allocator>& __y)
@@ -999,7 +999,7 @@ operator!=(const set<_Key, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator> (const set<_Key, _Compare, _Allocator>& __x,
            const set<_Key, _Compare, _Allocator>& __y)
@@ -1008,7 +1008,7 @@ operator> (const set<_Key, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const set<_Key, _Compare, _Allocator>& __x,
            const set<_Key, _Compare, _Allocator>& __y)
@@ -1017,7 +1017,7 @@ operator>=(const set<_Key, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const set<_Key, _Compare, _Allocator>& __x,
            const set<_Key, _Compare, _Allocator>& __y)
@@ -1027,7 +1027,7 @@ operator<=(const set<_Key, _Compare, _Allocator>& __x,
 
 // specialized algorithms:
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(set<_Key, _Compare, _Allocator>& __x,
      set<_Key, _Compare, _Allocator>& __y)
@@ -1036,18 +1036,18 @@ swap(set<_Key, _Compare, _Allocator>& __x,
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Key, class _Compare, class _Allocator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
     typename set<_Key, _Compare, _Allocator>::size_type
     erase_if(set<_Key, _Compare, _Allocator>& __c, _Predicate __pred) {
-  return _VSTD::__libcpp_erase_if_container(__c, __pred);
+  return _CUDA_VSTD::__LIBCUDACXX_erase_if_container(__c, __pred);
 }
 #endif
 
 template <class _Key, class _Compare = less<_Key>,
           class _Allocator = allocator<_Key> >
-class _LIBCPP_TEMPLATE_VIS multiset
+class _LIBCUDACXX_TEMPLATE_VIS multiset
 {
 public:
     // types:
@@ -1075,20 +1075,20 @@ public:
     typedef typename __base::
diff erence_type       
diff erence_type;
     typedef typename __base::const_iterator        iterator;
     typedef typename __base::const_iterator        const_iterator;
-    typedef _VSTD::reverse_iterator<iterator>       reverse_iterator;
-    typedef _VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<iterator>       reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<const_iterator> const_reverse_iterator;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     typedef __set_node_handle<typename __base::__node, allocator_type> node_type;
 #endif
 
     template <class _Key2, class _Compare2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS set;
+        friend class _LIBCUDACXX_TEMPLATE_VIS set;
     template <class _Key2, class _Compare2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS multiset;
+        friend class _LIBCUDACXX_TEMPLATE_VIS multiset;
 
     // construct/copy/destroy:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multiset()
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
@@ -1096,18 +1096,18 @@ public:
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(value_compare()) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit multiset(const value_compare& __comp)
         _NOEXCEPT_(
             is_nothrow_default_constructible<allocator_type>::value &&
             is_nothrow_copy_constructible<key_compare>::value)
         : __tree_(__comp) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit multiset(const value_compare& __comp, const allocator_type& __a)
         : __tree_(__comp, __a) {}
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         multiset(_InputIterator __f, _InputIterator __l,
                  const value_compare& __comp = value_compare())
         : __tree_(__comp)
@@ -1115,15 +1115,15 @@ public:
             insert(__f, __l);
         }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
         template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         multiset(_InputIterator __f, _InputIterator __l, const allocator_type& __a)
             : multiset(__f, __l, key_compare(), __a) {}
 #endif
 
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         multiset(_InputIterator __f, _InputIterator __l,
                  const value_compare& __comp, const allocator_type& __a)
         : __tree_(__comp, __a)
@@ -1131,7 +1131,7 @@ public:
             insert(__f, __l);
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multiset(const multiset& __s)
         : __tree_(__s.__tree_.value_comp(),
           __alloc_traits::select_on_container_copy_construction(__s.__tree_.__alloc()))
@@ -1139,40 +1139,40 @@ public:
             insert(__s.begin(), __s.end());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multiset& operator=(const multiset& __s)
         {
             __tree_ = __s.__tree_;
             return *this;
         }
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     multiset(multiset&& __s)
         _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)
-        : __tree_(_VSTD::move(__s.__tree_)) {}
+        : __tree_(_CUDA_VSTD::move(__s.__tree_)) {}
 
     multiset(multiset&& __s, const allocator_type& __a);
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit multiset(const allocator_type& __a)
         : __tree_(__a) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multiset(const multiset& __s, const allocator_type& __a)
         : __tree_(__s.__tree_.value_comp(), __a)
         {
             insert(__s.begin(), __s.end());
         }
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     multiset(initializer_list<value_type> __il, const value_compare& __comp = value_compare())
         : __tree_(__comp)
         {
             insert(__il.begin(), __il.end());
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multiset(initializer_list<value_type> __il, const value_compare& __comp,
         const allocator_type& __a)
         : __tree_(__comp, __a)
@@ -1180,284 +1180,284 @@ public:
             insert(__il.begin(), __il.end());
         }
 
-#if _LIBCPP_STD_VER > 11
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 11
+    _LIBCUDACXX_INLINE_VISIBILITY
     multiset(initializer_list<value_type> __il, const allocator_type& __a)
         : multiset(__il, key_compare(), __a) {}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multiset& operator=(initializer_list<value_type> __il)
         {
             __tree_.__assign_multi(__il.begin(), __il.end());
             return *this;
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     multiset& operator=(multiset&& __s)
         _NOEXCEPT_(is_nothrow_move_assignable<__base>::value)
         {
-            __tree_ = _VSTD::move(__s.__tree_);
+            __tree_ = _CUDA_VSTD::move(__s.__tree_);
             return *this;
         }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~multiset() {
         static_assert(sizeof(__diagnose_non_const_comparator<_Key, _Compare>()), "");
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator begin() _NOEXCEPT       {return __tree_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin() const _NOEXCEPT {return __tree_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           iterator end() _NOEXCEPT         {return __tree_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()   const _NOEXCEPT {return __tree_.end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           reverse_iterator rbegin() _NOEXCEPT
             {return reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rbegin() const _NOEXCEPT
         {return const_reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
           reverse_iterator rend() _NOEXCEPT
             {return       reverse_iterator(begin());}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rend() const _NOEXCEPT
         {return const_reverse_iterator(begin());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin()  const _NOEXCEPT {return begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend() const _NOEXCEPT {return end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crbegin() const _NOEXCEPT {return rbegin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crend() const _NOEXCEPT {return rend();}
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool empty() const _NOEXCEPT {return __tree_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT {return __tree_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT {return __tree_.max_size();}
 
     // modifiers:
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator emplace(_Args&&... __args)
-            {return __tree_.__emplace_multi(_VSTD::forward<_Args>(__args)...);}
+            {return __tree_.__emplace_multi(_CUDA_VSTD::forward<_Args>(__args)...);}
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator emplace_hint(const_iterator __p, _Args&&... __args)
-            {return __tree_.__emplace_hint_multi(__p, _VSTD::forward<_Args>(__args)...);}
-#endif // _LIBCPP_CXX03_LANG
+            {return __tree_.__emplace_hint_multi(__p, _CUDA_VSTD::forward<_Args>(__args)...);}
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const value_type& __v)
         {return __tree_.__insert_multi(__v);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, const value_type& __v)
         {return __tree_.__insert_multi(__p, __v);}
 
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void insert(_InputIterator __f, _InputIterator __l)
         {
             for (const_iterator __e = cend(); __f != __l; ++__f)
                 __tree_.__insert_multi(__e, *__f);
         }
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(value_type&& __v)
-        {return __tree_.__insert_multi(_VSTD::move(__v));}
+        {return __tree_.__insert_multi(_CUDA_VSTD::move(__v));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, value_type&& __v)
-        {return __tree_.__insert_multi(__p, _VSTD::move(__v));}
+        {return __tree_.__insert_multi(__p, _CUDA_VSTD::move(__v));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void insert(initializer_list<value_type> __il)
         {insert(__il.begin(), __il.end());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator  erase(const_iterator __p) {return __tree_.erase(__p);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k) {return __tree_.__erase_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator  erase(const_iterator __f, const_iterator __l)
         {return __tree_.erase(__f, __l);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT {__tree_.clear();}
 
-#if _LIBCPP_STD_VER > 14
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to multiset::insert()");
         return __tree_.template __node_handle_insert_multi<node_type>(
-            _VSTD::move(__nh));
+            _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __hint, node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to multiset::insert()");
         return __tree_.template __node_handle_insert_multi<node_type>(
-            __hint, _VSTD::move(__nh));
+            __hint, _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(key_type const& __key)
     {
         return __tree_.template __node_handle_extract<node_type>(__key);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(const_iterator __it)
     {
         return __tree_.template __node_handle_extract<node_type>(__it);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(multiset<key_type, _Compare2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_multi(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(multiset<key_type, _Compare2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_multi(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(set<key_type, _Compare2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_multi(__source.__tree_);
     }
     template <class _Compare2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(set<key_type, _Compare2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __tree_.__node_handle_merge_multi(__source.__tree_);
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(multiset& __s)
         _NOEXCEPT_(__is_nothrow_swappable<__base>::value)
         {__tree_.swap(__s.__tree_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT {return __tree_.__alloc();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_compare    key_comp()      const {return __tree_.value_comp();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_compare  value_comp()    const {return __tree_.value_comp();}
 
     // set operations:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator find(const key_type& __k)             {return __tree_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __tree_.find(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
     find(const _K2& __k)                           {return __tree_.find(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
     find(const _K2& __k) const                     {return __tree_.find(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type      count(const key_type& __k) const
         {return __tree_.__count_multi(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,size_type>::type
     count(const _K2& __k) const            {return __tree_.__count_multi(__k);}
 #endif
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const key_type& __k) const {return find(__k) != end();}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value, bool>::type
     contains(const _K2& __k) const { return find(__k) != end(); }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator lower_bound(const key_type& __k)
         {return __tree_.lower_bound(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator lower_bound(const key_type& __k) const
             {return __tree_.lower_bound(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
     lower_bound(const _K2& __k)       {return __tree_.lower_bound(__k);}
 
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
     lower_bound(const _K2& __k) const {return __tree_.lower_bound(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator upper_bound(const key_type& __k)
             {return __tree_.upper_bound(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator upper_bound(const key_type& __k) const
             {return __tree_.upper_bound(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,iterator>::type
     upper_bound(const _K2& __k)       {return __tree_.upper_bound(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,const_iterator>::type
     upper_bound(const _K2& __k) const {return __tree_.upper_bound(__k);}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator,iterator>             equal_range(const key_type& __k)
             {return __tree_.__equal_range_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator,const_iterator> equal_range(const key_type& __k) const
             {return __tree_.__equal_range_multi(__k);}
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,pair<iterator,iterator>>::type
     equal_range(const _K2& __k)       {return __tree_.__equal_range_multi(__k);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     typename enable_if<__is_transparent<_Compare, _K2>::value,pair<const_iterator,const_iterator>>::type
     equal_range(const _K2& __k) const {return __tree_.__equal_range_multi(__k);}
 #endif
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator,
          class _Compare = less<__iter_value_type<_InputIterator>>,
          class _Allocator = allocator<__iter_value_type<_InputIterator>>,
@@ -1487,42 +1487,42 @@ multiset(initializer_list<_Key>, _Allocator)
   -> multiset<_Key, less<_Key>, _Allocator>;
 #endif
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Compare, class _Allocator>
 multiset<_Key, _Compare, _Allocator>::multiset(multiset&& __s, const allocator_type& __a)
-    : __tree_(_VSTD::move(__s.__tree_), __a)
+    : __tree_(_CUDA_VSTD::move(__s.__tree_), __a)
 {
     if (__a != __s.get_allocator())
     {
         const_iterator __e = cend();
         while (!__s.empty())
-            insert(__e, _VSTD::move(__s.__tree_.remove(__s.begin())->__value_));
+            insert(__e, _CUDA_VSTD::move(__s.__tree_.remove(__s.begin())->__value_));
     }
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const multiset<_Key, _Compare, _Allocator>& __x,
            const multiset<_Key, _Compare, _Allocator>& __y)
 {
-    return __x.size() == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
+    return __x.size() == __y.size() && _CUDA_VSTD::equal(__x.begin(), __x.end(), __y.begin());
 }
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const multiset<_Key, _Compare, _Allocator>& __x,
            const multiset<_Key, _Compare, _Allocator>& __y)
 {
-    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
+    return _CUDA_VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
 }
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const multiset<_Key, _Compare, _Allocator>& __x,
            const multiset<_Key, _Compare, _Allocator>& __y)
@@ -1531,7 +1531,7 @@ operator!=(const multiset<_Key, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator> (const multiset<_Key, _Compare, _Allocator>& __x,
            const multiset<_Key, _Compare, _Allocator>& __y)
@@ -1540,7 +1540,7 @@ operator> (const multiset<_Key, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const multiset<_Key, _Compare, _Allocator>& __x,
            const multiset<_Key, _Compare, _Allocator>& __y)
@@ -1549,7 +1549,7 @@ operator>=(const multiset<_Key, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const multiset<_Key, _Compare, _Allocator>& __x,
            const multiset<_Key, _Compare, _Allocator>& __y)
@@ -1558,7 +1558,7 @@ operator<=(const multiset<_Key, _Compare, _Allocator>& __x,
 }
 
 template <class _Key, class _Compare, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(multiset<_Key, _Compare, _Allocator>& __x,
      multiset<_Key, _Compare, _Allocator>& __y)
@@ -1567,15 +1567,15 @@ swap(multiset<_Key, _Compare, _Allocator>& __x,
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Key, class _Compare, class _Allocator, class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
     typename multiset<_Key, _Compare, _Allocator>::size_type
     erase_if(multiset<_Key, _Compare, _Allocator>& __c, _Predicate __pred) {
-  return _VSTD::__libcpp_erase_if_container(__c, __pred);
+  return _CUDA_VSTD::__LIBCUDACXX_erase_if_container(__c, __pred);
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_SET
+#endif // _LIBCUDACXX_SET

diff  --git a/libcxx/include/setjmp.h b/libcxx/include/setjmp.h
index de4f9edf4886..4d6962d4d9aa 100644
--- a/libcxx/include/setjmp.h
+++ b/libcxx/include/setjmp.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SETJMP_H
-#define _LIBCPP_SETJMP_H
+#ifndef _LIBCUDACXX_SETJMP_H
+#define _LIBCUDACXX_SETJMP_H
 
 /*
     setjmp.h synopsis
@@ -27,7 +27,7 @@ void longjmp(jmp_buf env, int val);
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -41,4 +41,4 @@ void longjmp(jmp_buf env, int val);
 
 #endif // __cplusplus
 
-#endif // _LIBCPP_SETJMP_H
+#endif // _LIBCUDACXX_SETJMP_H

diff  --git a/libcxx/include/shared_mutex b/libcxx/include/shared_mutex
index f85cf6ec4c4f..87ca7c659d96 100644
--- a/libcxx/include/shared_mutex
+++ b/libcxx/include/shared_mutex
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SHARED_MUTEX
-#define _LIBCPP_SHARED_MUTEX
+#ifndef _LIBCUDACXX_SHARED_MUTEX
+#define _LIBCUDACXX_SHARED_MUTEX
 
 /*
     shared_mutex synopsis
@@ -127,25 +127,25 @@ template <class Mutex>
 #include <__config>
 #include <version>
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-#if _LIBCPP_STD_VER > 11 || defined(_LIBCPP_BUILDING_LIBRARY)
+#if _LIBCUDACXX_STD_VER > 11 || defined(_LIBCUDACXX_BUILDING_LIBRARY)
 
 #include <__mutex_base>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#ifdef _LIBCPP_HAS_NO_THREADS
+#ifdef _LIBCUDACXX_HAS_NO_THREADS
 # error "<shared_mutex> is not supported since libc++ has been configured without support for threads."
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-struct _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("shared_mutex"))
+struct _LIBCUDACXX_TYPE_VIS _LIBCUDACXX_AVAILABILITY_SHARED_MUTEX _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(capability("shared_mutex"))
 __shared_mutex_base
 {
     mutex               __mut_;
@@ -157,59 +157,59 @@ __shared_mutex_base
     static const unsigned __n_readers_ = ~__write_entered_;
 
     __shared_mutex_base();
-    _LIBCPP_INLINE_VISIBILITY ~__shared_mutex_base() = default;
+    _LIBCUDACXX_INLINE_VISIBILITY ~__shared_mutex_base() = default;
 
     __shared_mutex_base(const __shared_mutex_base&) = delete;
     __shared_mutex_base& operator=(const __shared_mutex_base&) = delete;
 
     // Exclusive ownership
-    void lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_capability()); // blocking
-    bool try_lock() _LIBCPP_THREAD_SAFETY_ANNOTATION(try_acquire_capability(true));
-    void unlock() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_capability());
+    void lock() _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(acquire_capability()); // blocking
+    bool try_lock() _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(try_acquire_capability(true));
+    void unlock() _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(release_capability());
 
     // Shared ownership
-    void lock_shared() _LIBCPP_THREAD_SAFETY_ANNOTATION(acquire_shared_capability()); // blocking
-    bool try_lock_shared() _LIBCPP_THREAD_SAFETY_ANNOTATION(try_acquire_shared_capability(true));
-    void unlock_shared() _LIBCPP_THREAD_SAFETY_ANNOTATION(release_shared_capability());
+    void lock_shared() _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(acquire_shared_capability()); // blocking
+    bool try_lock_shared() _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(try_acquire_shared_capability(true));
+    void unlock_shared() _LIBCUDACXX_THREAD_SAFETY_ANNOTATION(release_shared_capability());
 
 //     typedef implementation-defined native_handle_type; // See 30.2.3
 //     native_handle_type native_handle(); // See 30.2.3
 };
 
 
-#if _LIBCPP_STD_VER > 14
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
+#if _LIBCUDACXX_STD_VER > 14
+class _LIBCUDACXX_TYPE_VIS _LIBCUDACXX_AVAILABILITY_SHARED_MUTEX shared_mutex
 {
     __shared_mutex_base __base;
 public:
-    _LIBCPP_INLINE_VISIBILITY shared_mutex() : __base() {}
-    _LIBCPP_INLINE_VISIBILITY ~shared_mutex() = default;
+    _LIBCUDACXX_INLINE_VISIBILITY shared_mutex() : __base() {}
+    _LIBCUDACXX_INLINE_VISIBILITY ~shared_mutex() = default;
 
     shared_mutex(const shared_mutex&) = delete;
     shared_mutex& operator=(const shared_mutex&) = delete;
 
     // Exclusive ownership
-    _LIBCPP_INLINE_VISIBILITY void lock()     { return __base.lock(); }
-    _LIBCPP_INLINE_VISIBILITY bool try_lock() { return __base.try_lock(); }
-    _LIBCPP_INLINE_VISIBILITY void unlock()   { return __base.unlock(); }
+    _LIBCUDACXX_INLINE_VISIBILITY void lock()     { return __base.lock(); }
+    _LIBCUDACXX_INLINE_VISIBILITY bool try_lock() { return __base.try_lock(); }
+    _LIBCUDACXX_INLINE_VISIBILITY void unlock()   { return __base.unlock(); }
 
     // Shared ownership
-    _LIBCPP_INLINE_VISIBILITY void lock_shared()     { return __base.lock_shared(); }
-    _LIBCPP_INLINE_VISIBILITY bool try_lock_shared() { return __base.try_lock_shared(); }
-    _LIBCPP_INLINE_VISIBILITY void unlock_shared()   { return __base.unlock_shared(); }
+    _LIBCUDACXX_INLINE_VISIBILITY void lock_shared()     { return __base.lock_shared(); }
+    _LIBCUDACXX_INLINE_VISIBILITY bool try_lock_shared() { return __base.try_lock_shared(); }
+    _LIBCUDACXX_INLINE_VISIBILITY void unlock_shared()   { return __base.unlock_shared(); }
 
 //     typedef __shared_mutex_base::native_handle_type native_handle_type;
-//     _LIBCPP_INLINE_VISIBILITY native_handle_type native_handle() { return __base::unlock_shared(); }
+//     _LIBCUDACXX_INLINE_VISIBILITY native_handle_type native_handle() { return __base::unlock_shared(); }
 };
 #endif
 
 
-class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_timed_mutex
+class _LIBCUDACXX_TYPE_VIS _LIBCUDACXX_AVAILABILITY_SHARED_MUTEX shared_timed_mutex
 {
     __shared_mutex_base __base;
 public:
     shared_timed_mutex();
-    _LIBCPP_INLINE_VISIBILITY ~shared_timed_mutex() = default;
+    _LIBCUDACXX_INLINE_VISIBILITY ~shared_timed_mutex() = default;
 
     shared_timed_mutex(const shared_timed_mutex&) = delete;
     shared_timed_mutex& operator=(const shared_timed_mutex&) = delete;
@@ -218,14 +218,14 @@ public:
     void lock();
     bool try_lock();
     template <class _Rep, class _Period>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         bool
         try_lock_for(const chrono::duration<_Rep, _Period>& __rel_time)
         {
             return try_lock_until(chrono::steady_clock::now() + __rel_time);
         }
     template <class _Clock, class _Duration>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         bool
         try_lock_until(const chrono::time_point<_Clock, _Duration>& __abs_time);
     void unlock();
@@ -234,14 +234,14 @@ public:
     void lock_shared();
     bool try_lock_shared();
     template <class _Rep, class _Period>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         bool
         try_lock_shared_for(const chrono::duration<_Rep, _Period>& __rel_time)
         {
             return try_lock_shared_until(chrono::steady_clock::now() + __rel_time);
         }
     template <class _Clock, class _Duration>
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         bool
         try_lock_shared_until(const chrono::time_point<_Clock, _Duration>& __abs_time);
     void unlock_shared();
@@ -318,53 +318,53 @@ private:
     bool __owns_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_lock() _NOEXCEPT
         : __m_(nullptr),
           __owns_(false)
         {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit shared_lock(mutex_type& __m)
-        : __m_(_VSTD::addressof(__m)),
+        : __m_(_CUDA_VSTD::addressof(__m)),
           __owns_(true)
         {__m_->lock_shared();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_lock(mutex_type& __m, defer_lock_t) _NOEXCEPT
-        : __m_(_VSTD::addressof(__m)),
+        : __m_(_CUDA_VSTD::addressof(__m)),
           __owns_(false)
         {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_lock(mutex_type& __m, try_to_lock_t)
-        : __m_(_VSTD::addressof(__m)),
+        : __m_(_CUDA_VSTD::addressof(__m)),
           __owns_(__m.try_lock_shared())
         {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_lock(mutex_type& __m, adopt_lock_t)
-        : __m_(_VSTD::addressof(__m)),
+        : __m_(_CUDA_VSTD::addressof(__m)),
           __owns_(true)
         {}
 
     template <class _Clock, class _Duration>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         shared_lock(mutex_type& __m,
                     const chrono::time_point<_Clock, _Duration>& __abs_time)
-            : __m_(_VSTD::addressof(__m)),
+            : __m_(_CUDA_VSTD::addressof(__m)),
               __owns_(__m.try_lock_shared_until(__abs_time))
             {}
 
     template <class _Rep, class _Period>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         shared_lock(mutex_type& __m,
                     const chrono::duration<_Rep, _Period>& __rel_time)
-            : __m_(_VSTD::addressof(__m)),
+            : __m_(_CUDA_VSTD::addressof(__m)),
               __owns_(__m.try_lock_shared_for(__rel_time))
             {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~shared_lock()
     {
         if (__owns_)
@@ -374,7 +374,7 @@ public:
     shared_lock(shared_lock const&) = delete;
     shared_lock& operator=(shared_lock const&) = delete;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_lock(shared_lock&& __u) _NOEXCEPT
         : __m_(__u.__m_),
           __owns_(__u.__owns_)
@@ -383,7 +383,7 @@ public:
             __u.__owns_ = false;
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     shared_lock& operator=(shared_lock&& __u) _NOEXCEPT
     {
         if (__owns_)
@@ -406,14 +406,14 @@ public:
     void unlock();
 
     // Setters
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(shared_lock& __u) _NOEXCEPT
     {
-        _VSTD::swap(__m_, __u.__m_);
-        _VSTD::swap(__owns_, __u.__owns_);
+        _CUDA_VSTD::swap(__m_, __u.__m_);
+        _CUDA_VSTD::swap(__owns_, __u.__owns_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     mutex_type* release() _NOEXCEPT
     {
         mutex_type* __m = __m_;
@@ -423,13 +423,13 @@ public:
     }
 
     // Getters
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool owns_lock() const _NOEXCEPT {return __owns_;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit operator bool () const _NOEXCEPT {return __owns_;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     mutex_type* mutex() const _NOEXCEPT {return __m_;}
 };
 
@@ -494,15 +494,15 @@ shared_lock<_Mutex>::unlock()
 }
 
 template <class _Mutex>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) _NOEXCEPT
     {__x.swap(__y);}
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER > 11
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_SHARED_MUTEX
+#endif // _LIBCUDACXX_SHARED_MUTEX

diff  --git a/libcxx/include/span b/libcxx/include/span
index 67d2ac241ff2..f705d3b71926 100644
--- a/libcxx/include/span
+++ b/libcxx/include/span
@@ -7,8 +7,8 @@
 //
 //===---------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SPAN
-#define _LIBCPP_SPAN
+#ifndef _LIBCUDACXX_SPAN
+#define _LIBCUDACXX_SPAN
 
 /*
     span synopsis
@@ -148,7 +148,7 @@ template<class R>
 #include <type_traits>  // for remove_cv, etc
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <functional>
 #  include <iterator>
 #endif
@@ -162,16 +162,16 @@ template<class R>
 #include <__iterator/reverse_access.h>
 #include <__iterator/size.h>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 template <class _Tp>
 struct __is_std_array : false_type {};
@@ -185,7 +185,7 @@ struct __is_std_span : false_type {};
 template <class _Tp, size_t _Sz>
 struct __is_std_span<span<_Tp, _Sz>> : true_type {};
 
-#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 // This is a temporary workaround until we ship <ranges> -- we've unfortunately been
 // shipping <span> before its API was finalized, and we used to provide a constructor
 // from container types that had the requirements below. To avoid breaking code that
@@ -211,7 +211,7 @@ concept __span_compatible_range =
   !__is_std_array<remove_cvref_t<_Range>>::value &&
   !is_array_v<remove_cvref_t<_Range>> &&
   is_convertible_v<remove_reference_t<ranges::range_reference_t<_Range>>(*)[], _ElementType(*)[]>;
-#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 template <class _From, class _To>
 concept __span_array_convertible = is_convertible_v<_From(*)[], _To(*)[]>;
@@ -223,7 +223,7 @@ template <class _Sentinel, class _It>
 concept __span_compatible_sentinel_for = sized_sentinel_for<_Sentinel, _It> && !is_convertible_v<_Sentinel, size_t>;
 
 template <typename _Tp, size_t _Extent>
-class _LIBCPP_TEMPLATE_VIS span {
+class _LIBCUDACXX_TEMPLATE_VIS span {
 public:
 //  constants and types
     using element_type           = _Tp;
@@ -234,86 +234,86 @@ public:
     using const_pointer          = const _Tp *;
     using reference              = _Tp &;
     using const_reference        = const _Tp &;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
     using iterator               = __bounded_iter<pointer>;
 #else
     using iterator               = __wrap_iter<pointer>;
 #endif
-    using reverse_iterator       = _VSTD::reverse_iterator<iterator>;
+    using reverse_iterator       = _CUDA_VSTD::reverse_iterator<iterator>;
 
     static constexpr size_type extent = _Extent;
 
 // [span.cons], span constructors, copy, assignment, and destructor
     template <size_t _Sz = _Extent> requires(_Sz == 0)
-    _LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data{nullptr} {}
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr span() noexcept : __data{nullptr} {}
 
     constexpr span           (const span&) noexcept = default;
     constexpr span& operator=(const span&) noexcept = default;
 
     template <__span_compatible_iterator<element_type> _It>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit span(_It __first, size_type __count)
-        : __data{_VSTD::to_address(__first)} {
+        : __data{_CUDA_VSTD::to_address(__first)} {
       (void)__count;
-      _LIBCPP_ASSERT(_Extent == __count, "size mismatch in span's constructor (iterator, len)");
+      _LIBCUDACXX_ASSERT(_Extent == __count, "size mismatch in span's constructor (iterator, len)");
     }
 
     template <__span_compatible_iterator<element_type> _It, __span_compatible_sentinel_for<_It> _End>
-    _LIBCPP_INLINE_VISIBILITY
-    constexpr explicit span(_It __first, _End __last) : __data{_VSTD::to_address(__first)} {
+    _LIBCUDACXX_INLINE_VISIBILITY
+    constexpr explicit span(_It __first, _End __last) : __data{_CUDA_VSTD::to_address(__first)} {
       (void)__last;
-      _LIBCPP_ASSERT((__last - __first >= 0), "invalid range in span's constructor (iterator, sentinel)");
-      _LIBCPP_ASSERT(__last - __first == _Extent,
+      _LIBCUDACXX_ASSERT((__last - __first >= 0), "invalid range in span's constructor (iterator, sentinel)");
+      _LIBCUDACXX_ASSERT(__last - __first == _Extent,
                      "invalid range in span's constructor (iterator, sentinel): last - first != extent");
     }
 
-    _LIBCPP_INLINE_VISIBILITY constexpr span(type_identity_t<element_type> (&__arr)[_Extent]) noexcept : __data{__arr} {}
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr span(type_identity_t<element_type> (&__arr)[_Extent]) noexcept : __data{__arr} {}
 
     template <__span_array_convertible<element_type> _OtherElementType>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span(array<_OtherElementType, _Extent>& __arr) noexcept : __data{__arr.data()} {}
 
     template <class _OtherElementType>
         requires __span_array_convertible<const _OtherElementType, element_type>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span(const array<_OtherElementType, _Extent>& __arr) noexcept : __data{__arr.data()} {}
 
-#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
     template <class _Container>
         requires __span_compatible_range<_Container, element_type>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit span(_Container& __c) : __data{std::data(__c)} {
-      _LIBCPP_ASSERT(std::size(__c) == _Extent, "size mismatch in span's constructor (range)");
+      _LIBCUDACXX_ASSERT(std::size(__c) == _Extent, "size mismatch in span's constructor (range)");
     }
     template <class _Container>
         requires __span_compatible_range<const _Container, element_type>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit span(const _Container& __c) : __data{std::data(__c)} {
-      _LIBCPP_ASSERT(std::size(__c) == _Extent, "size mismatch in span's constructor (range)");
+      _LIBCUDACXX_ASSERT(std::size(__c) == _Extent, "size mismatch in span's constructor (range)");
     }
 #else
     template <__span_compatible_range<element_type> _Range>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr explicit span(_Range&& __r) : __data{ranges::data(__r)} {
-      _LIBCPP_ASSERT(ranges::size(__r) == _Extent, "size mismatch in span's constructor (range)");
+      _LIBCUDACXX_ASSERT(ranges::size(__r) == _Extent, "size mismatch in span's constructor (range)");
     }
 #endif
 
     template <__span_array_convertible<element_type> _OtherElementType>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
         constexpr span(const span<_OtherElementType, _Extent>& __other)
         : __data{__other.data()} {}
 
     template <__span_array_convertible<element_type> _OtherElementType>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
         constexpr explicit span(const span<_OtherElementType, dynamic_extent>& __other) noexcept
-        : __data{__other.data()} { _LIBCPP_ASSERT(_Extent == __other.size(), "size mismatch in span's constructor (other span)"); }
+        : __data{__other.data()} { _LIBCUDACXX_ASSERT(_Extent == __other.size(), "size mismatch in span's constructor (other span)"); }
 
 
 //  ~span() noexcept = default;
 
     template <size_t _Count>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span<element_type, _Count> first() const noexcept
     {
         static_assert(_Count <= _Extent, "span<T, N>::first<Count>(): Count out of range");
@@ -321,29 +321,29 @@ public:
     }
 
     template <size_t _Count>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span<element_type, _Count> last() const noexcept
     {
         static_assert(_Count <= _Extent, "span<T, N>::last<Count>(): Count out of range");
         return span<element_type, _Count>{data() + size() - _Count, _Count};
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span<element_type, dynamic_extent> first(size_type __count) const noexcept
     {
-        _LIBCPP_ASSERT(__count <= size(), "span<T, N>::first(count): count out of range");
+        _LIBCUDACXX_ASSERT(__count <= size(), "span<T, N>::first(count): count out of range");
         return {data(), __count};
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span<element_type, dynamic_extent> last(size_type __count) const noexcept
     {
-        _LIBCPP_ASSERT(__count <= size(), "span<T, N>::last(count): count out of range");
+        _LIBCUDACXX_ASSERT(__count <= size(), "span<T, N>::last(count): count out of range");
         return {data() + size() - __count, __count};
     }
 
     template <size_t _Offset, size_t _Count = dynamic_extent>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr auto subspan() const noexcept
         -> span<element_type, _Count != dynamic_extent ? _Count : _Extent - _Offset>
     {
@@ -355,64 +355,64 @@ public:
     }
 
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span<element_type, dynamic_extent>
        subspan(size_type __offset, size_type __count = dynamic_extent) const noexcept
     {
-        _LIBCPP_ASSERT(__offset <= size(), "span<T, N>::subspan(offset, count): offset out of range");
-        _LIBCPP_ASSERT(__count  <= size() || __count == dynamic_extent, "span<T, N>::subspan(offset, count): count out of range");
+        _LIBCUDACXX_ASSERT(__offset <= size(), "span<T, N>::subspan(offset, count): offset out of range");
+        _LIBCUDACXX_ASSERT(__count  <= size() || __count == dynamic_extent, "span<T, N>::subspan(offset, count): count out of range");
         if (__count == dynamic_extent)
             return {data() + __offset, size() - __offset};
-        _LIBCPP_ASSERT(__count <= size() - __offset, "span<T, N>::subspan(offset, count): offset + count out of range");
+        _LIBCUDACXX_ASSERT(__count <= size() - __offset, "span<T, N>::subspan(offset, count): offset + count out of range");
         return {data() + __offset, __count};
     }
 
-    _LIBCPP_INLINE_VISIBILITY constexpr size_type size()           const noexcept { return _Extent; }
-    _LIBCPP_INLINE_VISIBILITY constexpr size_type size_bytes()     const noexcept { return _Extent * sizeof(element_type); }
-    [[nodiscard]] _LIBCPP_INLINE_VISIBILITY constexpr bool empty() const noexcept { return _Extent == 0; }
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr size_type size()           const noexcept { return _Extent; }
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr size_type size_bytes()     const noexcept { return _Extent * sizeof(element_type); }
+    [[nodiscard]] _LIBCUDACXX_INLINE_VISIBILITY constexpr bool empty() const noexcept { return _Extent == 0; }
 
-    _LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
     {
-        _LIBCPP_ASSERT(__idx < size(), "span<T, N>::operator[](index): index out of range");
+        _LIBCUDACXX_ASSERT(__idx < size(), "span<T, N>::operator[](index): index out of range");
         return __data[__idx];
     }
 
-    _LIBCPP_INLINE_VISIBILITY constexpr reference front() const noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr reference front() const noexcept
     {
-        _LIBCPP_ASSERT(!empty(), "span<T, N>::front() on empty span");
+        _LIBCUDACXX_ASSERT(!empty(), "span<T, N>::front() on empty span");
         return __data[0];
     }
 
-    _LIBCPP_INLINE_VISIBILITY constexpr reference back() const noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr reference back() const noexcept
     {
-        _LIBCPP_ASSERT(!empty(), "span<T, N>::back() on empty span");
+        _LIBCUDACXX_ASSERT(!empty(), "span<T, N>::back() on empty span");
         return __data[size()-1];
     }
 
-    _LIBCPP_INLINE_VISIBILITY constexpr pointer data()                         const noexcept { return __data; }
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr pointer data()                         const noexcept { return __data; }
 
 // [span.iter], span iterator support
-    _LIBCPP_INLINE_VISIBILITY constexpr iterator begin() const noexcept {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr iterator begin() const noexcept {
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
         return std::__make_bounded_iter(data(), data(), data() + size());
 #else
         return iterator(this, data());
 #endif
     }
-    _LIBCPP_INLINE_VISIBILITY constexpr iterator end() const noexcept {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr iterator end() const noexcept {
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
         return std::__make_bounded_iter(data() + size(), data(), data() + size());
 #else
         return iterator(this, data() + size());
 #endif
     }
-    _LIBCPP_INLINE_VISIBILITY constexpr reverse_iterator        rbegin() const noexcept { return reverse_iterator(end()); }
-    _LIBCPP_INLINE_VISIBILITY constexpr reverse_iterator          rend() const noexcept { return reverse_iterator(begin()); }
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr reverse_iterator        rbegin() const noexcept { return reverse_iterator(end()); }
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr reverse_iterator          rend() const noexcept { return reverse_iterator(begin()); }
 
-    _LIBCPP_INLINE_VISIBILITY span<const byte, _Extent * sizeof(element_type)> __as_bytes() const noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY span<const byte, _Extent * sizeof(element_type)> __as_bytes() const noexcept
     { return span<const byte, _Extent * sizeof(element_type)>{reinterpret_cast<const byte *>(data()), size_bytes()}; }
 
-    _LIBCPP_INLINE_VISIBILITY span<byte, _Extent * sizeof(element_type)> __as_writable_bytes() const noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY span<byte, _Extent * sizeof(element_type)> __as_writable_bytes() const noexcept
     { return span<byte, _Extent * sizeof(element_type)>{reinterpret_cast<byte *>(data()), size_bytes()}; }
 
 private:
@@ -421,7 +421,7 @@ private:
 
 
 template <typename _Tp>
-class _LIBCPP_TEMPLATE_VIS span<_Tp, dynamic_extent> {
+class _LIBCUDACXX_TEMPLATE_VIS span<_Tp, dynamic_extent> {
 public:
 //  constants and types
     using element_type           = _Tp;
@@ -432,165 +432,165 @@ public:
     using const_pointer          = const _Tp *;
     using reference              = _Tp &;
     using const_reference        = const _Tp &;
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
     using iterator               = __bounded_iter<pointer>;
 #else
     using iterator               = __wrap_iter<pointer>;
 #endif
-    using reverse_iterator       = _VSTD::reverse_iterator<iterator>;
+    using reverse_iterator       = _CUDA_VSTD::reverse_iterator<iterator>;
 
     static constexpr size_type extent = dynamic_extent;
 
 // [span.cons], span constructors, copy, assignment, and destructor
-    _LIBCPP_INLINE_VISIBILITY constexpr span() noexcept : __data{nullptr}, __size{0} {}
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr span() noexcept : __data{nullptr}, __size{0} {}
 
     constexpr span           (const span&) noexcept = default;
     constexpr span& operator=(const span&) noexcept = default;
 
     template <__span_compatible_iterator<element_type> _It>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span(_It __first, size_type __count)
-        : __data{_VSTD::to_address(__first)}, __size{__count} {}
+        : __data{_CUDA_VSTD::to_address(__first)}, __size{__count} {}
 
     template <__span_compatible_iterator<element_type> _It, __span_compatible_sentinel_for<_It> _End>
-    _LIBCPP_INLINE_VISIBILITY constexpr span(_It __first, _End __last)
-        : __data(_VSTD::to_address(__first)), __size(__last - __first) {
-      _LIBCPP_ASSERT(__last - __first >= 0, "invalid range in span's constructor (iterator, sentinel)");
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr span(_It __first, _End __last)
+        : __data(_CUDA_VSTD::to_address(__first)), __size(__last - __first) {
+      _LIBCUDACXX_ASSERT(__last - __first >= 0, "invalid range in span's constructor (iterator, sentinel)");
     }
 
     template <size_t _Sz>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span(type_identity_t<element_type> (&__arr)[_Sz]) noexcept : __data{__arr}, __size{_Sz} {}
 
     template <__span_array_convertible<element_type> _OtherElementType, size_t _Sz>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span(array<_OtherElementType, _Sz>& __arr) noexcept : __data{__arr.data()}, __size{_Sz} {}
 
     template <class _OtherElementType, size_t _Sz>
         requires __span_array_convertible<const _OtherElementType, element_type>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span(const array<_OtherElementType, _Sz>& __arr) noexcept : __data{__arr.data()}, __size{_Sz} {}
 
-#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
     template <class _Container>
         requires __span_compatible_range<_Container, element_type>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span(_Container& __c) : __data(std::data(__c)), __size{std::size(__c)} {}
     template <class _Container>
         requires __span_compatible_range<const _Container, element_type>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span(const _Container& __c) : __data(std::data(__c)), __size{std::size(__c)} {}
 #else
     template <__span_compatible_range<element_type> _Range>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span(_Range&& __r) : __data(ranges::data(__r)), __size{ranges::size(__r)} {}
 #endif
 
     template <__span_array_convertible<element_type> _OtherElementType, size_t _OtherExtent>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
         constexpr span(const span<_OtherElementType, _OtherExtent>& __other)  noexcept
         : __data{__other.data()}, __size{__other.size()} {}
 
 //    ~span() noexcept = default;
 
     template <size_t _Count>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span<element_type, _Count> first() const noexcept
     {
-        _LIBCPP_ASSERT(_Count <= size(), "span<T>::first<Count>(): Count out of range");
+        _LIBCUDACXX_ASSERT(_Count <= size(), "span<T>::first<Count>(): Count out of range");
         return span<element_type, _Count>{data(), _Count};
     }
 
     template <size_t _Count>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span<element_type, _Count> last() const noexcept
     {
-        _LIBCPP_ASSERT(_Count <= size(), "span<T>::last<Count>(): Count out of range");
+        _LIBCUDACXX_ASSERT(_Count <= size(), "span<T>::last<Count>(): Count out of range");
         return span<element_type, _Count>{data() + size() - _Count, _Count};
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span<element_type, dynamic_extent> first(size_type __count) const noexcept
     {
-        _LIBCPP_ASSERT(__count <= size(), "span<T>::first(count): count out of range");
+        _LIBCUDACXX_ASSERT(__count <= size(), "span<T>::first(count): count out of range");
         return {data(), __count};
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span<element_type, dynamic_extent> last (size_type __count) const noexcept
     {
-        _LIBCPP_ASSERT(__count <= size(), "span<T>::last(count): count out of range");
+        _LIBCUDACXX_ASSERT(__count <= size(), "span<T>::last(count): count out of range");
         return {data() + size() - __count, __count};
     }
 
     template <size_t _Offset, size_t _Count = dynamic_extent>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr span<element_type, _Count> subspan() const noexcept
     {
-        _LIBCPP_ASSERT(_Offset <= size(), "span<T>::subspan<Offset, Count>(): Offset out of range");
-        _LIBCPP_ASSERT(_Count == dynamic_extent || _Count <= size() - _Offset, "span<T>::subspan<Offset, Count>(): Offset + Count out of range");
+        _LIBCUDACXX_ASSERT(_Offset <= size(), "span<T>::subspan<Offset, Count>(): Offset out of range");
+        _LIBCUDACXX_ASSERT(_Count == dynamic_extent || _Count <= size() - _Offset, "span<T>::subspan<Offset, Count>(): Offset + Count out of range");
         return span<element_type, _Count>{data() + _Offset, _Count == dynamic_extent ? size() - _Offset : _Count};
     }
 
     constexpr span<element_type, dynamic_extent>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     subspan(size_type __offset, size_type __count = dynamic_extent) const noexcept
     {
-        _LIBCPP_ASSERT(__offset <= size(), "span<T>::subspan(offset, count): offset out of range");
-        _LIBCPP_ASSERT(__count <= size() || __count == dynamic_extent, "span<T>::subspan(offset, count): count out of range");
+        _LIBCUDACXX_ASSERT(__offset <= size(), "span<T>::subspan(offset, count): offset out of range");
+        _LIBCUDACXX_ASSERT(__count <= size() || __count == dynamic_extent, "span<T>::subspan(offset, count): count out of range");
         if (__count == dynamic_extent)
             return {data() + __offset, size() - __offset};
-        _LIBCPP_ASSERT(__count <= size() - __offset, "span<T>::subspan(offset, count): offset + count out of range");
+        _LIBCUDACXX_ASSERT(__count <= size() - __offset, "span<T>::subspan(offset, count): offset + count out of range");
         return {data() + __offset, __count};
     }
 
-    _LIBCPP_INLINE_VISIBILITY constexpr size_type size()           const noexcept { return __size; }
-    _LIBCPP_INLINE_VISIBILITY constexpr size_type size_bytes()     const noexcept { return __size * sizeof(element_type); }
-    [[nodiscard]] _LIBCPP_INLINE_VISIBILITY constexpr bool empty() const noexcept { return __size == 0; }
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr size_type size()           const noexcept { return __size; }
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr size_type size_bytes()     const noexcept { return __size * sizeof(element_type); }
+    [[nodiscard]] _LIBCUDACXX_INLINE_VISIBILITY constexpr bool empty() const noexcept { return __size == 0; }
 
-    _LIBCPP_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr reference operator[](size_type __idx) const noexcept
     {
-        _LIBCPP_ASSERT(__idx < size(), "span<T>::operator[](index): index out of range");
+        _LIBCUDACXX_ASSERT(__idx < size(), "span<T>::operator[](index): index out of range");
         return __data[__idx];
     }
 
-    _LIBCPP_INLINE_VISIBILITY constexpr reference front() const noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr reference front() const noexcept
     {
-        _LIBCPP_ASSERT(!empty(), "span<T>::front() on empty span");
+        _LIBCUDACXX_ASSERT(!empty(), "span<T>::front() on empty span");
         return __data[0];
     }
 
-    _LIBCPP_INLINE_VISIBILITY constexpr reference back() const noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr reference back() const noexcept
     {
-        _LIBCPP_ASSERT(!empty(), "span<T>::back() on empty span");
+        _LIBCUDACXX_ASSERT(!empty(), "span<T>::back() on empty span");
         return __data[size()-1];
     }
 
 
-    _LIBCPP_INLINE_VISIBILITY constexpr pointer data()                         const noexcept { return __data; }
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr pointer data()                         const noexcept { return __data; }
 
 // [span.iter], span iterator support
-    _LIBCPP_INLINE_VISIBILITY constexpr iterator begin() const noexcept {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr iterator begin() const noexcept {
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
         return std::__make_bounded_iter(data(), data(), data() + size());
 #else
         return iterator(this, data());
 #endif
     }
-    _LIBCPP_INLINE_VISIBILITY constexpr iterator end() const noexcept {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr iterator end() const noexcept {
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
         return std::__make_bounded_iter(data() + size(), data(), data() + size());
 #else
         return iterator(this, data() + size());
 #endif
     }
-    _LIBCPP_INLINE_VISIBILITY constexpr reverse_iterator        rbegin() const noexcept { return reverse_iterator(end()); }
-    _LIBCPP_INLINE_VISIBILITY constexpr reverse_iterator          rend() const noexcept { return reverse_iterator(begin()); }
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr reverse_iterator        rbegin() const noexcept { return reverse_iterator(end()); }
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr reverse_iterator          rend() const noexcept { return reverse_iterator(begin()); }
 
-    _LIBCPP_INLINE_VISIBILITY span<const byte, dynamic_extent> __as_bytes() const noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY span<const byte, dynamic_extent> __as_bytes() const noexcept
     { return {reinterpret_cast<const byte *>(data()), size_bytes()}; }
 
-    _LIBCPP_INLINE_VISIBILITY span<byte, dynamic_extent> __as_writable_bytes() const noexcept
+    _LIBCUDACXX_INLINE_VISIBILITY span<byte, dynamic_extent> __as_writable_bytes() const noexcept
     { return {reinterpret_cast<byte *>(data()), size_bytes()}; }
 
 private:
@@ -606,19 +606,19 @@ inline constexpr bool ranges::enable_view<span<_ElementType, _Extent>> = true;
 
 //  as_bytes & as_writable_bytes
 template <class _Tp, size_t _Extent>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 auto as_bytes(span<_Tp, _Extent> __s) noexcept
 { return __s.__as_bytes(); }
 
 template <class _Tp, size_t _Extent> requires(!is_const_v<_Tp>)
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 auto as_writable_bytes(span<_Tp, _Extent> __s) noexcept
 { return __s.__as_writable_bytes(); }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template<contiguous_iterator _It, class _EndOrSize>
     span(_It, _EndOrSize) -> span<remove_reference_t<iter_reference_t<_It>>>;
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 template<class _Tp, size_t _Sz>
     span(_Tp (&)[_Sz]) -> span<_Tp, _Sz>;
@@ -629,7 +629,7 @@ template<class _Tp, size_t _Sz>
 template<class _Tp, size_t _Sz>
     span(const array<_Tp, _Sz>&) -> span<const _Tp, _Sz>;
 
-#if defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 template<class _Container>
     span(_Container&) -> span<typename _Container::value_type>;
 
@@ -640,10 +640,10 @@ template<ranges::contiguous_range _Range>
     span(_Range&&) -> span<remove_reference_t<ranges::range_reference_t<_Range>>>;
 #endif
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_SPAN
+#endif // _LIBCUDACXX_SPAN

diff  --git a/libcxx/include/sstream b/libcxx/include/sstream
index 602a1b55b4a9..8da15897fb4a 100644
--- a/libcxx/include/sstream
+++ b/libcxx/include/sstream
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SSTREAM
-#define _LIBCPP_SSTREAM
+#ifndef _LIBCUDACXX_SSTREAM
+#define _LIBCUDACXX_SSTREAM
 
 /*
     sstream synopsis
@@ -188,20 +188,20 @@ typedef basic_stringstream<wchar_t> wstringstream;
 #include <string>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // basic_stringbuf
 
 template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TEMPLATE_VIS basic_stringbuf
+class _LIBCUDACXX_TEMPLATE_VIS basic_stringbuf
     : public basic_streambuf<_CharT, _Traits>
 {
 public:
@@ -222,15 +222,15 @@ private:
 
 public:
     // 30.8.2.1 [stringbuf.cons], constructors
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_stringbuf()
         : __hm_(nullptr), __mode_(ios_base::in | ios_base::out) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_stringbuf(ios_base::openmode __wch)
         : __hm_(nullptr), __mode_(__wch) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_stringbuf(const string_type& __s,
                              ios_base::openmode __wch = ios_base::in | ios_base::out)
         : __str_(__s.get_allocator()), __hm_(nullptr), __mode_(__wch)
@@ -255,7 +255,7 @@ protected:
     virtual int_type overflow (int_type __c = traits_type::eof());
     virtual pos_type seekoff(off_type __off, ios_base::seekdir __way,
                              ios_base::openmode __wch = ios_base::in | ios_base::out);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     virtual pos_type seekpos(pos_type __sp,
                              ios_base::openmode __wch = ios_base::in | ios_base::out) {
         return seekoff(__sp, ios_base::beg, __wch);
@@ -286,7 +286,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::basic_stringbuf(basic_stringbuf&&
         __eout = __rhs.epptr() - __p;
     }
     ptr
diff _t __hm = __rhs.__hm_ == nullptr ? -1 : __rhs.__hm_ - __p;
-    __str_ = _VSTD::move(__rhs.__str_);
+    __str_ = _CUDA_VSTD::move(__rhs.__str_);
     __p = const_cast<char_type*>(__str_.data());
     if (__binp != -1)
         this->setg(__p + __binp, __p + __ninp, __p + __einp);
@@ -327,7 +327,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::operator=(basic_stringbuf&& __rhs)
         __eout = __rhs.epptr() - __p;
     }
     ptr
diff _t __hm = __rhs.__hm_ == nullptr ? -1 : __rhs.__hm_ - __p;
-    __str_ = _VSTD::move(__rhs.__str_);
+    __str_ = _CUDA_VSTD::move(__rhs.__str_);
     __p = const_cast<char_type*>(__str_.data());
     if (__binp != -1)
         this->setg(__p + __binp, __p + __ninp, __p + __einp);
@@ -395,7 +395,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::swap(basic_stringbuf& __rhs)
         __leout = this->epptr() - __p;
     }
     ptr
diff _t __lhm = __hm_ == nullptr ? -1 : __hm_ - __p;
-    _VSTD::swap(__mode_, __rhs.__mode_);
+    _CUDA_VSTD::swap(__mode_, __rhs.__mode_);
     __str_.swap(__rhs.__str_);
     __p = const_cast<char_type*>(__str_.data());
     if (__rbinp != -1)
@@ -429,7 +429,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::swap(basic_stringbuf& __rhs)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(basic_stringbuf<_CharT, _Traits, _Allocator>& __x,
      basic_stringbuf<_CharT, _Traits, _Allocator>& __y)
@@ -536,10 +536,10 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::overflow(int_type __c)
         {
             if (!(__mode_ & ios_base::out))
                 return traits_type::eof();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
             try
             {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
                 ptr
diff _t __nout = this->pptr()  - this->pbase();
                 ptr
diff _t __hm = __hm_ - this->pbase();
                 __str_.push_back(char_type());
@@ -548,15 +548,15 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::overflow(int_type __c)
                 this->setp(__p, __p + __str_.size());
                 this->__pbump(__nout);
                 __hm_ = this->pbase() + __hm;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
             }
             catch (...)
             {
                 return traits_type::eof();
             }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         }
-        __hm_ = _VSTD::max(this->pptr() + 1, __hm_);
+        __hm_ = _CUDA_VSTD::max(this->pptr() + 1, __hm_);
         if (__mode_ & ios_base::in)
         {
             char_type* __p = const_cast<char_type*>(__str_.data());
@@ -622,7 +622,7 @@ basic_stringbuf<_CharT, _Traits, _Allocator>::seekoff(off_type __off,
 // basic_istringstream
 
 template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TEMPLATE_VIS basic_istringstream
+class _LIBCUDACXX_TEMPLATE_VIS basic_istringstream
     : public basic_istream<_CharT, _Traits>
 {
 public:
@@ -640,58 +640,58 @@ private:
 
 public:
     // 30.8.3.1 [istringstream.cons], constructors
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_istringstream()
         : basic_istream<_CharT, _Traits>(&__sb_), __sb_(ios_base::in) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_istringstream(ios_base::openmode __wch)
         : basic_istream<_CharT, _Traits>(&__sb_), __sb_(__wch | ios_base::in) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_istringstream(const string_type& __s,
                                  ios_base::openmode __wch = ios_base::in)
         : basic_istream<_CharT, _Traits>(&__sb_)
         , __sb_(__s, __wch | ios_base::in)
     { }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_istringstream(basic_istringstream&& __rhs)
-        : basic_istream<_CharT, _Traits>(_VSTD::move(__rhs))
-        , __sb_(_VSTD::move(__rhs.__sb_))
+        : basic_istream<_CharT, _Traits>(_CUDA_VSTD::move(__rhs))
+        , __sb_(_CUDA_VSTD::move(__rhs.__sb_))
     {
         basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_);
     }
 
     // 27.8.2.2 Assign and swap:
     basic_istringstream& operator=(basic_istringstream&& __rhs) {
-        basic_istream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
-        __sb_ = _VSTD::move(__rhs.__sb_);
+        basic_istream<char_type, traits_type>::operator=(_CUDA_VSTD::move(__rhs));
+        __sb_ = _CUDA_VSTD::move(__rhs.__sb_);
         return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(basic_istringstream& __rhs) {
         basic_istream<char_type, traits_type>::swap(__rhs);
         __sb_.swap(__rhs.__sb_);
     }
 
     // 27.8.2.3 Members:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const {
         return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     string_type str() const {
         return __sb_.str();
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void str(const string_type& __s) {
         __sb_.str(__s);
     }
 };
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x,
      basic_istringstream<_CharT, _Traits, _Allocator>& __y)
@@ -702,7 +702,7 @@ swap(basic_istringstream<_CharT, _Traits, _Allocator>& __x,
 // basic_ostringstream
 
 template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TEMPLATE_VIS basic_ostringstream
+class _LIBCUDACXX_TEMPLATE_VIS basic_ostringstream
     : public basic_ostream<_CharT, _Traits>
 {
 public:
@@ -720,59 +720,59 @@ private:
 
 public:
     // 30.8.4.1 [ostringstream.cons], constructors
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostringstream()
         : basic_ostream<_CharT, _Traits>(&__sb_), __sb_(ios_base::out) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_ostringstream(ios_base::openmode __wch)
         : basic_ostream<_CharT, _Traits>(&__sb_), __sb_(__wch | ios_base::out) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_ostringstream(const string_type& __s,
                                  ios_base::openmode __wch = ios_base::out)
         : basic_ostream<_CharT, _Traits>(&__sb_)
         , __sb_(__s, __wch | ios_base::out)
     { }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_ostringstream(basic_ostringstream&& __rhs)
-        : basic_ostream<_CharT, _Traits>(_VSTD::move(__rhs))
-        , __sb_(_VSTD::move(__rhs.__sb_))
+        : basic_ostream<_CharT, _Traits>(_CUDA_VSTD::move(__rhs))
+        , __sb_(_CUDA_VSTD::move(__rhs.__sb_))
     {
         basic_ostream<_CharT, _Traits>::set_rdbuf(&__sb_);
     }
 
     // 27.8.2.2 Assign and swap:
     basic_ostringstream& operator=(basic_ostringstream&& __rhs) {
-        basic_ostream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
-        __sb_ = _VSTD::move(__rhs.__sb_);
+        basic_ostream<char_type, traits_type>::operator=(_CUDA_VSTD::move(__rhs));
+        __sb_ = _CUDA_VSTD::move(__rhs.__sb_);
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(basic_ostringstream& __rhs) {
         basic_ostream<char_type, traits_type>::swap(__rhs);
         __sb_.swap(__rhs.__sb_);
     }
 
     // 27.8.2.3 Members:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const {
         return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     string_type str() const {
         return __sb_.str();
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void str(const string_type& __s) {
         __sb_.str(__s);
     }
 };
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x,
      basic_ostringstream<_CharT, _Traits, _Allocator>& __y)
@@ -783,7 +783,7 @@ swap(basic_ostringstream<_CharT, _Traits, _Allocator>& __x,
 // basic_stringstream
 
 template <class _CharT, class _Traits, class _Allocator>
-class _LIBCPP_TEMPLATE_VIS basic_stringstream
+class _LIBCUDACXX_TEMPLATE_VIS basic_stringstream
     : public basic_iostream<_CharT, _Traits>
 {
 public:
@@ -801,58 +801,58 @@ private:
 
 public:
     // 30.8.5.1 [stringstream.cons], constructors
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_stringstream()
         : basic_iostream<_CharT, _Traits>(&__sb_), __sb_(ios_base::in | ios_base::out) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_stringstream(ios_base::openmode __wch)
         : basic_iostream<_CharT, _Traits>(&__sb_), __sb_(__wch) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit basic_stringstream(const string_type& __s,
                                 ios_base::openmode __wch = ios_base::in | ios_base::out)
         : basic_iostream<_CharT, _Traits>(&__sb_)
         , __sb_(__s, __wch)
     { }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_stringstream(basic_stringstream&& __rhs)
-        : basic_iostream<_CharT, _Traits>(_VSTD::move(__rhs))
-        , __sb_(_VSTD::move(__rhs.__sb_))
+        : basic_iostream<_CharT, _Traits>(_CUDA_VSTD::move(__rhs))
+        , __sb_(_CUDA_VSTD::move(__rhs.__sb_))
     {
         basic_istream<_CharT, _Traits>::set_rdbuf(&__sb_);
     }
 
     // 27.8.2.2 Assign and swap:
     basic_stringstream& operator=(basic_stringstream&& __rhs) {
-        basic_iostream<char_type, traits_type>::operator=(_VSTD::move(__rhs));
-        __sb_ = _VSTD::move(__rhs.__sb_);
+        basic_iostream<char_type, traits_type>::operator=(_CUDA_VSTD::move(__rhs));
+        __sb_ = _CUDA_VSTD::move(__rhs.__sb_);
         return *this;
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(basic_stringstream& __rhs) {
         basic_iostream<char_type, traits_type>::swap(__rhs);
         __sb_.swap(__rhs.__sb_);
     }
 
     // 27.8.2.3 Members:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_stringbuf<char_type, traits_type, allocator_type>* rdbuf() const {
         return const_cast<basic_stringbuf<char_type, traits_type, allocator_type>*>(&__sb_);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     string_type str() const {
         return __sb_.str();
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void str(const string_type& __s) {
         __sb_.str(__s);
     }
 };
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x,
      basic_stringstream<_CharT, _Traits, _Allocator>& __y)
@@ -860,15 +860,15 @@ swap(basic_stringstream<_CharT, _Traits, _Allocator>& __x,
     __x.swap(__y);
 }
 
-#if defined(_LIBCPP_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1)
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_stringbuf<char>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_stringstream<char>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostringstream<char>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istringstream<char>;
+#if defined(_LIBCUDACXX_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1)
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_stringbuf<char>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_stringstream<char>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_ostringstream<char>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_istringstream<char>;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_SSTREAM
+#endif // _LIBCUDACXX_SSTREAM

diff  --git a/libcxx/include/stack b/libcxx/include/stack
index 86435c4559de..9646773653c5 100644
--- a/libcxx/include/stack
+++ b/libcxx/include/stack
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_STACK
-#define _LIBCPP_STACK
+#ifndef _LIBCUDACXX_STACK
+#define _LIBCUDACXX_STACK
 
 /*
     stack synopsis
@@ -107,7 +107,7 @@ template <class T, class Container>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <functional>
 #endif
 
@@ -115,26 +115,26 @@ template <class T, class Container>
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp, class _Container = deque<_Tp> > class _LIBCPP_TEMPLATE_VIS stack;
+template <class _Tp, class _Container = deque<_Tp> > class _LIBCUDACXX_TEMPLATE_VIS stack;
 
 template <class _Tp, class _Container>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y);
 
 template <class _Tp, class _Container>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y);
 
 template <class _Tp, class _Container /*= deque<_Tp>*/>
-class _LIBCPP_TEMPLATE_VIS stack
+class _LIBCUDACXX_TEMPLATE_VIS stack
 {
 public:
     typedef _Container                               container_type;
@@ -148,112 +148,112 @@ protected:
     container_type c;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     stack()
         _NOEXCEPT_(is_nothrow_default_constructible<container_type>::value)
         : c() {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     stack(const stack& __q) : c(__q.c) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     stack& operator=(const stack& __q) {c = __q.c; return *this;}
 
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     stack(stack&& __q)
         _NOEXCEPT_(is_nothrow_move_constructible<container_type>::value)
-        : c(_VSTD::move(__q.c)) {}
+        : c(_CUDA_VSTD::move(__q.c)) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     stack& operator=(stack&& __q)
         _NOEXCEPT_(is_nothrow_move_assignable<container_type>::value)
-        {c = _VSTD::move(__q.c); return *this;}
+        {c = _CUDA_VSTD::move(__q.c); return *this;}
 
-    _LIBCPP_INLINE_VISIBILITY
-    explicit stack(container_type&& __c) : c(_VSTD::move(__c)) {}
-#endif // _LIBCPP_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
+    explicit stack(container_type&& __c) : c(_CUDA_VSTD::move(__c)) {}
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit stack(const container_type& __c) : c(__c) {}
 
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         explicit stack(const _Alloc& __a,
                        __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
             : c(__a) {}
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         stack(const container_type& __c, const _Alloc& __a,
               __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
             : c(__c, __a) {}
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         stack(const stack& __s, const _Alloc& __a,
               __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
             : c(__s.c, __a) {}
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         stack(container_type&& __c, const _Alloc& __a,
               __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
-            : c(_VSTD::move(__c), __a) {}
+            : c(_CUDA_VSTD::move(__c), __a) {}
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         stack(stack&& __s, const _Alloc& __a,
               __enable_if_t<uses_allocator<container_type, _Alloc>::value>* = 0)
-            : c(_VSTD::move(__s.c), __a) {}
-#endif // _LIBCPP_CXX03_LANG
+            : c(_CUDA_VSTD::move(__s.c), __a) {}
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     template <class _InputIterator,
               class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     stack(_InputIterator __first, _InputIterator __last) : c(__first, __last) {}
 
     template <class _InputIterator,
               class _Alloc,
               class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>,
               class = __enable_if_t<uses_allocator<container_type, _Alloc>::value>>
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     stack(_InputIterator __first, _InputIterator __last, const _Alloc& __alloc) : c(__first, __last, __alloc) {}
 #endif
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool empty()     const      {return c.empty();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const      {return c.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference top()             {return c.back();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_reference top() const {return c.back();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void push(const value_type& __v) {c.push_back(__v);}
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
-    void push(value_type&& __v) {c.push_back(_VSTD::move(__v));}
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void push(value_type&& __v) {c.push_back(_CUDA_VSTD::move(__v));}
 
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
-#if _LIBCPP_STD_VER > 14
+        _LIBCUDACXX_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
         decltype(auto) emplace(_Args&&... __args)
-        { return c.emplace_back(_VSTD::forward<_Args>(__args)...);}
+        { return c.emplace_back(_CUDA_VSTD::forward<_Args>(__args)...);}
 #else
         void      emplace(_Args&&... __args)
-        {        c.emplace_back(_VSTD::forward<_Args>(__args)...);}
+        {        c.emplace_back(_CUDA_VSTD::forward<_Args>(__args)...);}
 #endif
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void pop() {c.pop_back();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(stack& __s)
         _NOEXCEPT_(__is_nothrow_swappable<container_type>::value)
     {
-        using _VSTD::swap;
+        using _CUDA_VSTD::swap;
         swap(c, __s.c);
     }
 
@@ -268,7 +268,7 @@ public:
     operator< (const stack<T1, _C1>& __x, const stack<T1, _C1>& __y);
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template<class _Container,
          class = enable_if_t<!__is_allocator<_Container>::value>
 >
@@ -284,7 +284,7 @@ stack(_Container, _Alloc)
     -> stack<typename _Container::value_type, _Container>;
 #endif
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 template<class _InputIterator,
          class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>>
 stack(_InputIterator, _InputIterator)
@@ -299,7 +299,7 @@ stack(_InputIterator, _InputIterator, _Alloc)
 #endif
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -307,7 +307,7 @@ operator==(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -315,7 +315,7 @@ operator< (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -323,7 +323,7 @@ operator!=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator> (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -331,7 +331,7 @@ operator> (const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -339,7 +339,7 @@ operator>=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 {
@@ -347,7 +347,7 @@ operator<=(const stack<_Tp, _Container>& __x, const stack<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 __enable_if_t<__is_swappable<_Container>::value, void>
 swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y)
     _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
@@ -356,11 +356,11 @@ swap(stack<_Tp, _Container>& __x, stack<_Tp, _Container>& __y)
 }
 
 template <class _Tp, class _Container, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator<stack<_Tp, _Container>, _Alloc>
+struct _LIBCUDACXX_TEMPLATE_VIS uses_allocator<stack<_Tp, _Container>, _Alloc>
     : public uses_allocator<_Container, _Alloc>
 {
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STACK
+#endif // _LIBCUDACXX_STACK

diff  --git a/libcxx/include/stdatomic.h b/libcxx/include/stdatomic.h
index d9550c44061c..f5cd7f7555c7 100644
--- a/libcxx/include/stdatomic.h
+++ b/libcxx/include/stdatomic.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_STDATOMIC_H
-#define _LIBCPP_STDATOMIC_H
+#ifndef _LIBCUDACXX_STDATOMIC_H
+#define _LIBCUDACXX_STDATOMIC_H
 
 /*
     stdatomic.h synopsis
@@ -117,11 +117,11 @@ using std::atomic_signal_fence                         // see below
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 
 #include <atomic>
 #include <version>
@@ -132,95 +132,95 @@ using std::atomic_signal_fence                         // see below
 
 #define _Atomic(_Tp) ::std::atomic<_Tp>
 
-using std::memory_order _LIBCPP_USING_IF_EXISTS;
-using std::memory_order_relaxed _LIBCPP_USING_IF_EXISTS;
-using std::memory_order_consume _LIBCPP_USING_IF_EXISTS;
-using std::memory_order_acquire _LIBCPP_USING_IF_EXISTS;
-using std::memory_order_release _LIBCPP_USING_IF_EXISTS;
-using std::memory_order_acq_rel _LIBCPP_USING_IF_EXISTS;
-using std::memory_order_seq_cst _LIBCPP_USING_IF_EXISTS;
-
-using std::atomic_flag _LIBCPP_USING_IF_EXISTS;
-
-using std::atomic_bool _LIBCPP_USING_IF_EXISTS;
-using std::atomic_char _LIBCPP_USING_IF_EXISTS;
-using std::atomic_schar _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uchar _LIBCPP_USING_IF_EXISTS;
-using std::atomic_short _LIBCPP_USING_IF_EXISTS;
-using std::atomic_ushort _LIBCPP_USING_IF_EXISTS;
-using std::atomic_int _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint _LIBCPP_USING_IF_EXISTS;
-using std::atomic_long _LIBCPP_USING_IF_EXISTS;
-using std::atomic_ulong _LIBCPP_USING_IF_EXISTS;
-using std::atomic_llong _LIBCPP_USING_IF_EXISTS;
-using std::atomic_ullong _LIBCPP_USING_IF_EXISTS;
-using std::atomic_char8_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_char16_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_char32_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_wchar_t _LIBCPP_USING_IF_EXISTS;
-
-using std::atomic_int8_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint8_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_int16_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint16_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_int32_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint32_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_int64_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint64_t _LIBCPP_USING_IF_EXISTS;
-
-using std::atomic_int_least8_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint_least8_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_int_least16_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint_least16_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_int_least32_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint_least32_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_int_least64_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint_least64_t _LIBCPP_USING_IF_EXISTS;
-
-using std::atomic_int_fast8_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint_fast8_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_int_fast16_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint_fast16_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_int_fast32_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint_fast32_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_int_fast64_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uint_fast64_t _LIBCPP_USING_IF_EXISTS;
-
-using std::atomic_intptr_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uintptr_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_size_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_ptr
diff _t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_intmax_t _LIBCPP_USING_IF_EXISTS;
-using std::atomic_uintmax_t _LIBCPP_USING_IF_EXISTS;
-
-using std::atomic_compare_exchange_strong _LIBCPP_USING_IF_EXISTS;
-using std::atomic_compare_exchange_strong_explicit _LIBCPP_USING_IF_EXISTS;
-using std::atomic_compare_exchange_weak _LIBCPP_USING_IF_EXISTS;
-using std::atomic_compare_exchange_weak_explicit _LIBCPP_USING_IF_EXISTS;
-using std::atomic_exchange _LIBCPP_USING_IF_EXISTS;
-using std::atomic_exchange_explicit _LIBCPP_USING_IF_EXISTS;
-using std::atomic_fetch_add _LIBCPP_USING_IF_EXISTS;
-using std::atomic_fetch_add_explicit _LIBCPP_USING_IF_EXISTS;
-using std::atomic_fetch_and _LIBCPP_USING_IF_EXISTS;
-using std::atomic_fetch_and_explicit _LIBCPP_USING_IF_EXISTS;
-using std::atomic_fetch_or _LIBCPP_USING_IF_EXISTS;
-using std::atomic_fetch_or_explicit _LIBCPP_USING_IF_EXISTS;
-using std::atomic_fetch_sub _LIBCPP_USING_IF_EXISTS;
-using std::atomic_fetch_sub_explicit _LIBCPP_USING_IF_EXISTS;
-using std::atomic_flag_clear _LIBCPP_USING_IF_EXISTS;
-using std::atomic_flag_clear_explicit _LIBCPP_USING_IF_EXISTS;
-using std::atomic_flag_test_and_set _LIBCPP_USING_IF_EXISTS;
-using std::atomic_flag_test_and_set_explicit _LIBCPP_USING_IF_EXISTS;
-using std::atomic_is_lock_free _LIBCPP_USING_IF_EXISTS;
-using std::atomic_load _LIBCPP_USING_IF_EXISTS;
-using std::atomic_load_explicit _LIBCPP_USING_IF_EXISTS;
-using std::atomic_store _LIBCPP_USING_IF_EXISTS;
-using std::atomic_store_explicit _LIBCPP_USING_IF_EXISTS;
-
-using std::atomic_signal_fence _LIBCPP_USING_IF_EXISTS;
-using std::atomic_thread_fence _LIBCPP_USING_IF_EXISTS;
-
-#elif defined(_LIBCPP_COMPILER_CLANG_BASED)
+using std::memory_order _LIBCUDACXX_USING_IF_EXISTS;
+using std::memory_order_relaxed _LIBCUDACXX_USING_IF_EXISTS;
+using std::memory_order_consume _LIBCUDACXX_USING_IF_EXISTS;
+using std::memory_order_acquire _LIBCUDACXX_USING_IF_EXISTS;
+using std::memory_order_release _LIBCUDACXX_USING_IF_EXISTS;
+using std::memory_order_acq_rel _LIBCUDACXX_USING_IF_EXISTS;
+using std::memory_order_seq_cst _LIBCUDACXX_USING_IF_EXISTS;
+
+using std::atomic_flag _LIBCUDACXX_USING_IF_EXISTS;
+
+using std::atomic_bool _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_char _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_schar _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uchar _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_short _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_ushort _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_int _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_long _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_ulong _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_llong _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_ullong _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_char8_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_char16_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_char32_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_wchar_t _LIBCUDACXX_USING_IF_EXISTS;
+
+using std::atomic_int8_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint8_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_int16_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint16_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_int32_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint32_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_int64_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint64_t _LIBCUDACXX_USING_IF_EXISTS;
+
+using std::atomic_int_least8_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint_least8_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_int_least16_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint_least16_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_int_least32_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint_least32_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_int_least64_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint_least64_t _LIBCUDACXX_USING_IF_EXISTS;
+
+using std::atomic_int_fast8_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint_fast8_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_int_fast16_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint_fast16_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_int_fast32_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint_fast32_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_int_fast64_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uint_fast64_t _LIBCUDACXX_USING_IF_EXISTS;
+
+using std::atomic_intptr_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uintptr_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_size_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_ptr
diff _t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_intmax_t _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_uintmax_t _LIBCUDACXX_USING_IF_EXISTS;
+
+using std::atomic_compare_exchange_strong _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_compare_exchange_strong_explicit _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_compare_exchange_weak _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_compare_exchange_weak_explicit _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_exchange _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_exchange_explicit _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_fetch_add _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_fetch_add_explicit _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_fetch_and _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_fetch_and_explicit _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_fetch_or _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_fetch_or_explicit _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_fetch_sub _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_fetch_sub_explicit _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_flag_clear _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_flag_clear_explicit _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_flag_test_and_set _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_flag_test_and_set_explicit _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_is_lock_free _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_load _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_load_explicit _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_store _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_store_explicit _LIBCUDACXX_USING_IF_EXISTS;
+
+using std::atomic_signal_fence _LIBCUDACXX_USING_IF_EXISTS;
+using std::atomic_thread_fence _LIBCUDACXX_USING_IF_EXISTS;
+
+#elif defined(_LIBCUDACXX_COMPILER_CLANG_BASED)
 
 // Before C++23, we include the next <stdatomic.h> on the path to avoid hijacking
 // the header. We do this because Clang has historically shipped a <stdatomic.h>
@@ -230,6 +230,6 @@ using std::atomic_thread_fence _LIBCPP_USING_IF_EXISTS;
 #   include_next <stdatomic.h>
 # endif
 
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
-#endif // _LIBCPP_STDATOMIC_H
+#endif // _LIBCUDACXX_STDATOMIC_H

diff  --git a/libcxx/include/stdbool.h b/libcxx/include/stdbool.h
index 0bc1aa8304ad..e8353e0ad45d 100644
--- a/libcxx/include/stdbool.h
+++ b/libcxx/include/stdbool.h
@@ -6,8 +6,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_STDBOOL_H
-#define _LIBCPP_STDBOOL_H
+#ifndef _LIBCUDACXX_STDBOOL_H
+#define _LIBCUDACXX_STDBOOL_H
 
 /*
     stdbool.h synopsis
@@ -20,7 +20,7 @@
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -34,4 +34,4 @@
 #define __bool_true_false_are_defined 1
 #endif
 
-#endif // _LIBCPP_STDBOOL_H
+#endif // _LIBCUDACXX_STDBOOL_H

diff  --git a/libcxx/include/stddef.h b/libcxx/include/stddef.h
index 19e344f2a000..8884db648537 100644
--- a/libcxx/include/stddef.h
+++ b/libcxx/include/stddef.h
@@ -10,14 +10,14 @@
 #if defined(__need_ptr
diff _t) || defined(__need_size_t) || \
     defined(__need_wchar_t) || defined(__need_NULL) || defined(__need_wint_t)
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 #include_next <stddef.h>
 
-#elif !defined(_LIBCPP_STDDEF_H)
-#define _LIBCPP_STDDEF_H
+#elif !defined(_LIBCUDACXX_STDDEF_H)
+#define _LIBCUDACXX_STDDEF_H
 
 /*
     stddef.h synopsis
@@ -38,7 +38,7 @@
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -48,4 +48,4 @@
     typedef decltype(nullptr) nullptr_t;
 #endif
 
-#endif // _LIBCPP_STDDEF_H
+#endif // _LIBCUDACXX_STDDEF_H

diff  --git a/libcxx/include/stdexcept b/libcxx/include/stdexcept
index ee5a296cd930..5c665e03ba9d 100644
--- a/libcxx/include/stdexcept
+++ b/libcxx/include/stdexcept
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_STDEXCEPT
-#define _LIBCPP_STDEXCEPT
+#ifndef _LIBCUDACXX_STDEXCEPT
+#define _LIBCUDACXX_STDEXCEPT
 
 /*
     stdexcept synopsis
@@ -47,39 +47,39 @@ public:
 #include <exception>
 #include <iosfwd>  // for string forward decl
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_ABI_VCRUNTIME
-class _LIBCPP_HIDDEN __libcpp_refstring
+#ifndef _LIBCUDACXX_ABI_VCRUNTIME
+class _LIBCUDACXX_HIDDEN __LIBCUDACXX_refstring
 {
     const char* __imp_;
 
     bool __uses_refcount() const;
 public:
-    explicit __libcpp_refstring(const char* __msg);
-    __libcpp_refstring(const __libcpp_refstring& __s) _NOEXCEPT;
-    __libcpp_refstring& operator=(const __libcpp_refstring& __s) _NOEXCEPT;
-    ~__libcpp_refstring();
+    explicit __LIBCUDACXX_refstring(const char* __msg);
+    __LIBCUDACXX_refstring(const __LIBCUDACXX_refstring& __s) _NOEXCEPT;
+    __LIBCUDACXX_refstring& operator=(const __LIBCUDACXX_refstring& __s) _NOEXCEPT;
+    ~__LIBCUDACXX_refstring();
 
     const char* c_str() const _NOEXCEPT {return __imp_;}
 };
-#endif // !_LIBCPP_ABI_VCRUNTIME
+#endif // !_LIBCUDACXX_ABI_VCRUNTIME
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 namespace std  // purposefully not using versioning namespace
 {
 
-class _LIBCPP_EXCEPTION_ABI logic_error
+class _LIBCUDACXX_EXCEPTION_ABI logic_error
     : public exception
 {
-#ifndef _LIBCPP_ABI_VCRUNTIME
+#ifndef _LIBCUDACXX_ABI_VCRUNTIME
 private:
-    _VSTD::__libcpp_refstring __imp_;
+    _CUDA_VSTD::__LIBCUDACXX_refstring __imp_;
 public:
     explicit logic_error(const string&);
     explicit logic_error(const char*);
@@ -92,17 +92,17 @@ public:
     virtual const char* what() const _NOEXCEPT;
 #else
 public:
-    explicit logic_error(const _VSTD::string&); // Symbol uses versioned std::string
-    _LIBCPP_INLINE_VISIBILITY explicit logic_error(const char* __s) : exception(__s) {}
+    explicit logic_error(const _CUDA_VSTD::string&); // Symbol uses versioned std::string
+    _LIBCUDACXX_INLINE_VISIBILITY explicit logic_error(const char* __s) : exception(__s) {}
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI runtime_error
+class _LIBCUDACXX_EXCEPTION_ABI runtime_error
     : public exception
 {
-#ifndef _LIBCPP_ABI_VCRUNTIME
+#ifndef _LIBCUDACXX_ABI_VCRUNTIME
 private:
-    _VSTD::__libcpp_refstring __imp_;
+    _CUDA_VSTD::__LIBCUDACXX_refstring __imp_;
 public:
     explicit runtime_error(const string&);
     explicit runtime_error(const char*);
@@ -115,96 +115,96 @@ public:
     virtual const char* what() const _NOEXCEPT;
 #else
 public:
-   explicit runtime_error(const _VSTD::string&); // Symbol uses versioned std::string
-   _LIBCPP_INLINE_VISIBILITY explicit runtime_error(const char* __s) : exception(__s) {}
-#endif // _LIBCPP_ABI_VCRUNTIME
+   explicit runtime_error(const _CUDA_VSTD::string&); // Symbol uses versioned std::string
+   _LIBCUDACXX_INLINE_VISIBILITY explicit runtime_error(const char* __s) : exception(__s) {}
+#endif // _LIBCUDACXX_ABI_VCRUNTIME
 };
 
-class _LIBCPP_EXCEPTION_ABI domain_error
+class _LIBCUDACXX_EXCEPTION_ABI domain_error
     : public logic_error
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit domain_error(const string& __s) : logic_error(__s) {}
-    _LIBCPP_INLINE_VISIBILITY explicit domain_error(const char* __s)   : logic_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit domain_error(const string& __s) : logic_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit domain_error(const char* __s)   : logic_error(__s) {}
 
-#ifndef _LIBCPP_ABI_VCRUNTIME
+#ifndef _LIBCUDACXX_ABI_VCRUNTIME
     domain_error(const domain_error&) _NOEXCEPT = default;
     virtual ~domain_error() _NOEXCEPT;
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI invalid_argument
+class _LIBCUDACXX_EXCEPTION_ABI invalid_argument
     : public logic_error
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit invalid_argument(const string& __s) : logic_error(__s) {}
-    _LIBCPP_INLINE_VISIBILITY explicit invalid_argument(const char* __s)   : logic_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit invalid_argument(const string& __s) : logic_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit invalid_argument(const char* __s)   : logic_error(__s) {}
 
-#ifndef _LIBCPP_ABI_VCRUNTIME
+#ifndef _LIBCUDACXX_ABI_VCRUNTIME
     invalid_argument(const invalid_argument&) _NOEXCEPT = default;
     virtual ~invalid_argument() _NOEXCEPT;
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI length_error
+class _LIBCUDACXX_EXCEPTION_ABI length_error
     : public logic_error
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit length_error(const string& __s) : logic_error(__s) {}
-    _LIBCPP_INLINE_VISIBILITY explicit length_error(const char* __s)   : logic_error(__s) {}
-#ifndef _LIBCPP_ABI_VCRUNTIME
+    _LIBCUDACXX_INLINE_VISIBILITY explicit length_error(const string& __s) : logic_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit length_error(const char* __s)   : logic_error(__s) {}
+#ifndef _LIBCUDACXX_ABI_VCRUNTIME
     length_error(const length_error&) _NOEXCEPT = default;
     virtual ~length_error() _NOEXCEPT;
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI out_of_range
+class _LIBCUDACXX_EXCEPTION_ABI out_of_range
     : public logic_error
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit out_of_range(const string& __s) : logic_error(__s) {}
-    _LIBCPP_INLINE_VISIBILITY explicit out_of_range(const char* __s)   : logic_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit out_of_range(const string& __s) : logic_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit out_of_range(const char* __s)   : logic_error(__s) {}
 
-#ifndef _LIBCPP_ABI_VCRUNTIME
+#ifndef _LIBCUDACXX_ABI_VCRUNTIME
     out_of_range(const out_of_range&) _NOEXCEPT = default;
     virtual ~out_of_range() _NOEXCEPT;
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI range_error
+class _LIBCUDACXX_EXCEPTION_ABI range_error
     : public runtime_error
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit range_error(const string& __s) : runtime_error(__s) {}
-    _LIBCPP_INLINE_VISIBILITY explicit range_error(const char* __s)   : runtime_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit range_error(const string& __s) : runtime_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit range_error(const char* __s)   : runtime_error(__s) {}
 
-#ifndef _LIBCPP_ABI_VCRUNTIME
+#ifndef _LIBCUDACXX_ABI_VCRUNTIME
     range_error(const range_error&) _NOEXCEPT = default;
     virtual ~range_error() _NOEXCEPT;
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI overflow_error
+class _LIBCUDACXX_EXCEPTION_ABI overflow_error
     : public runtime_error
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit overflow_error(const string& __s) : runtime_error(__s) {}
-    _LIBCPP_INLINE_VISIBILITY explicit overflow_error(const char* __s)   : runtime_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit overflow_error(const string& __s) : runtime_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit overflow_error(const char* __s)   : runtime_error(__s) {}
 
-#ifndef _LIBCPP_ABI_VCRUNTIME
+#ifndef _LIBCUDACXX_ABI_VCRUNTIME
     overflow_error(const overflow_error&) _NOEXCEPT = default;
     virtual ~overflow_error() _NOEXCEPT;
 #endif
 };
 
-class _LIBCPP_EXCEPTION_ABI underflow_error
+class _LIBCUDACXX_EXCEPTION_ABI underflow_error
     : public runtime_error
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY explicit underflow_error(const string& __s) : runtime_error(__s) {}
-    _LIBCPP_INLINE_VISIBILITY explicit underflow_error(const char* __s)   : runtime_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit underflow_error(const string& __s) : runtime_error(__s) {}
+    _LIBCUDACXX_INLINE_VISIBILITY explicit underflow_error(const char* __s)   : runtime_error(__s) {}
 
-#ifndef _LIBCPP_ABI_VCRUNTIME
+#ifndef _LIBCUDACXX_ABI_VCRUNTIME
     underflow_error(const underflow_error&) _NOEXCEPT = default;
     virtual ~underflow_error() _NOEXCEPT;
 #endif
@@ -212,99 +212,99 @@ public:
 
 } // namespace std
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // in the dylib
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS void __throw_runtime_error(const char*);
+_LIBCUDACXX_NORETURN _LIBCUDACXX_FUNC_VIS void __throw_runtime_error(const char*);
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_logic_error(const char*__msg)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw logic_error(__msg);
 #else
     ((void)__msg);
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_domain_error(const char*__msg)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw domain_error(__msg);
 #else
     ((void)__msg);
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_invalid_argument(const char*__msg)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw invalid_argument(__msg);
 #else
     ((void)__msg);
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_length_error(const char*__msg)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw length_error(__msg);
 #else
     ((void)__msg);
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_out_of_range(const char*__msg)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw out_of_range(__msg);
 #else
     ((void)__msg);
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_range_error(const char*__msg)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw range_error(__msg);
 #else
     ((void)__msg);
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_overflow_error(const char*__msg)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw overflow_error(__msg);
 #else
     ((void)__msg);
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_underflow_error(const char*__msg)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw underflow_error(__msg);
 #else
     ((void)__msg);
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STDEXCEPT
+#endif // _LIBCUDACXX_STDEXCEPT

diff  --git a/libcxx/include/stdint.h b/libcxx/include/stdint.h
index ee71f62ab095..693505bfb2e6 100644
--- a/libcxx/include/stdint.h
+++ b/libcxx/include/stdint.h
@@ -7,12 +7,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_STDINT_H
+#ifndef _LIBCUDACXX_STDINT_H
 // AIX system headers need stdint.h to be re-enterable while _STD_TYPES_T
 // is defined until an inclusion of it without _STD_TYPES_T occurs, in which
 // case the header guard macro is defined.
 #if !defined(_AIX) || !defined(_STD_TYPES_T)
-#define _LIBCPP_STDINT_H
+#define _LIBCUDACXX_STDINT_H
 #endif // _STD_TYPES_T
 
 /*
@@ -105,7 +105,7 @@
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -122,4 +122,4 @@
 
 #include_next <stdint.h>
 
-#endif // _LIBCPP_STDINT_H
+#endif // _LIBCUDACXX_STDINT_H

diff  --git a/libcxx/include/stdio.h b/libcxx/include/stdio.h
index ad1b4c05f1fa..4294a737768c 100644
--- a/libcxx/include/stdio.h
+++ b/libcxx/include/stdio.h
@@ -9,14 +9,14 @@
 
 #if defined(__need_FILE) || defined(__need___FILE)
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 #include_next <stdio.h>
 
-#elif !defined(_LIBCPP_STDIO_H)
-#define _LIBCPP_STDIO_H
+#elif !defined(_LIBCUDACXX_STDIO_H)
+#define _LIBCUDACXX_STDIO_H
 
 /*
     stdio.h synopsis
@@ -100,7 +100,7 @@ void perror(const char* s);
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -116,4 +116,4 @@ void perror(const char* s);
 
 #endif
 
-#endif // _LIBCPP_STDIO_H
+#endif // _LIBCUDACXX_STDIO_H

diff  --git a/libcxx/include/stdlib.h b/libcxx/include/stdlib.h
index e4dce9c54546..c7230696de4e 100644
--- a/libcxx/include/stdlib.h
+++ b/libcxx/include/stdlib.h
@@ -9,14 +9,14 @@
 
 #if defined(__need_malloc_and_calloc)
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 #include_next <stdlib.h>
 
-#elif !defined(_LIBCPP_STDLIB_H)
-#define _LIBCPP_STDLIB_H
+#elif !defined(_LIBCUDACXX_STDLIB_H)
+#define _LIBCUDACXX_STDLIB_H
 
 /*
     stdlib.h synopsis
@@ -86,7 +86,7 @@ void *aligned_alloc(size_t alignment, size_t size);                       // C11
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -107,25 +107,25 @@ extern "C++" {
 #endif
 
 // MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
-#if !defined(_LIBCPP_MSVCRT) && !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
+#if !defined(_LIBCUDACXX_MSVCRT) && !defined(__sun__)
+inline _LIBCUDACXX_INLINE_VISIBILITY long abs(long __x) _NOEXCEPT {
   return __builtin_labs(__x);
 }
-inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {
+inline _LIBCUDACXX_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {
   return __builtin_llabs(__x);
 }
-#endif // !defined(_LIBCPP_MSVCRT) && !defined(__sun__)
+#endif // !defined(_LIBCUDACXX_MSVCRT) && !defined(__sun__)
 
 #if !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY float abs(float __lcpp_x) _NOEXCEPT {
+inline _LIBCUDACXX_INLINE_VISIBILITY float abs(float __lcpp_x) _NOEXCEPT {
   return __builtin_fabsf(__lcpp_x); // Use builtins to prevent needing math.h
 }
 
-inline _LIBCPP_INLINE_VISIBILITY double abs(double __lcpp_x) _NOEXCEPT {
+inline _LIBCUDACXX_INLINE_VISIBILITY double abs(double __lcpp_x) _NOEXCEPT {
   return __builtin_fabs(__lcpp_x);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY long double
+inline _LIBCUDACXX_INLINE_VISIBILITY long double
 abs(long double __lcpp_x) _NOEXCEPT {
   return __builtin_fabsl(__lcpp_x);
 }
@@ -144,18 +144,18 @@ abs(long double __lcpp_x) _NOEXCEPT {
 #endif
 
 // MSVCRT already has the correct prototype in <stdlib.h> if __cplusplus is defined
-#if !defined(_LIBCPP_MSVCRT) && !defined(__sun__)
-inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
+#if !defined(_LIBCUDACXX_MSVCRT) && !defined(__sun__)
+inline _LIBCUDACXX_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
   return ::ldiv(__x, __y);
 }
 #if !(defined(__FreeBSD__) && !defined(__LONG_LONG_SUPPORTED))
-inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,
+inline _LIBCUDACXX_INLINE_VISIBILITY lldiv_t div(long long __x,
                                              long long __y) _NOEXCEPT {
   return ::lldiv(__x, __y);
 }
 #endif
-#endif // _LIBCPP_MSVCRT / __sun__
+#endif // _LIBCUDACXX_MSVCRT / __sun__
 } // extern "C++"
 #endif // __cplusplus
 
-#endif // _LIBCPP_STDLIB_H
+#endif // _LIBCUDACXX_STDLIB_H

diff  --git a/libcxx/include/streambuf b/libcxx/include/streambuf
index 53a71720f11a..6961e57d594f 100644
--- a/libcxx/include/streambuf
+++ b/libcxx/include/streambuf
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_STREAMBUF
-#define _LIBCPP_STREAMBUF
+#ifndef _LIBCUDACXX_STREAMBUF
+#define _LIBCUDACXX_STREAMBUF
 
 /*
     streambuf synopsis
@@ -114,17 +114,17 @@ protected:
 #include <iosfwd>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _CharT, class _Traits>
-class _LIBCPP_TEMPLATE_VIS basic_streambuf
+class _LIBCUDACXX_TEMPLATE_VIS basic_streambuf
 {
 public:
     // types:
@@ -140,7 +140,7 @@ public:
     virtual ~basic_streambuf();
 
     // 27.6.2.2.1 locales:
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     locale pubimbue(const locale& __loc) {
         imbue(__loc);
         locale __r = __loc_;
@@ -148,70 +148,70 @@ public:
         return __r;
     }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     locale getloc() const { return __loc_; }
 
     // 27.6.2.2.2 buffer and positioning:
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     basic_streambuf* pubsetbuf(char_type* __s, streamsize __n)
     { return setbuf(__s, __n); }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     pos_type pubseekoff(off_type __off, ios_base::seekdir __way,
                         ios_base::openmode __which = ios_base::in | ios_base::out)
     { return seekoff(__off, __way, __which); }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     pos_type pubseekpos(pos_type __sp,
                         ios_base::openmode __which = ios_base::in | ios_base::out)
     { return seekpos(__sp, __which); }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     int pubsync() { return sync(); }
 
     // Get and put areas:
     // 27.6.2.2.3 Get area:
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     streamsize in_avail() {
         if (__ninp_ < __einp_)
             return static_cast<streamsize>(__einp_ - __ninp_);
         return showmanyc();
     }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     int_type snextc() {
         if (sbumpc() == traits_type::eof())
             return traits_type::eof();
         return sgetc();
     }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     int_type sbumpc() {
         if (__ninp_ == __einp_)
             return uflow();
         return traits_type::to_int_type(*__ninp_++);
     }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     int_type sgetc() {
         if (__ninp_ == __einp_)
             return underflow();
         return traits_type::to_int_type(*__ninp_);
     }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     streamsize sgetn(char_type* __s, streamsize __n)
     { return xsgetn(__s, __n); }
 
     // 27.6.2.2.4 Putback:
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     int_type sputbackc(char_type __c) {
         if (__binp_ == __ninp_ || !traits_type::eq(__c, __ninp_[-1]))
             return pbackfail(traits_type::to_int_type(__c));
         return traits_type::to_int_type(*--__ninp_);
     }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     int_type sungetc() {
         if (__binp_ == __ninp_)
           return pbackfail();
@@ -219,7 +219,7 @@ public:
     }
 
     // 27.6.2.2.5 Put area:
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     int_type sputc(char_type __c) {
         if (__nout_ == __eout_)
             return overflow(traits_type::to_int_type(__c));
@@ -227,7 +227,7 @@ public:
         return traits_type::to_int_type(__c);
     }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     streamsize sputn(const char_type* __s, streamsize __n)
     { return xsputn(__s, __n); }
 
@@ -238,14 +238,14 @@ protected:
     void swap(basic_streambuf& __rhs);
 
     // 27.6.2.3.2 Get area:
-    _LIBCPP_INLINE_VISIBILITY char_type* eback() const {return __binp_;}
-    _LIBCPP_INLINE_VISIBILITY char_type* gptr()  const {return __ninp_;}
-    _LIBCPP_INLINE_VISIBILITY char_type* egptr() const {return __einp_;}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type* eback() const {return __binp_;}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type* gptr()  const {return __ninp_;}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type* egptr() const {return __einp_;}
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     void gbump(int __n) { __ninp_ += __n; }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     void setg(char_type* __gbeg, char_type* __gnext, char_type* __gend) {
         __binp_ = __gbeg;
         __ninp_ = __gnext;
@@ -253,17 +253,17 @@ protected:
     }
 
     // 27.6.2.3.3 Put area:
-    _LIBCPP_INLINE_VISIBILITY char_type* pbase() const {return __bout_;}
-    _LIBCPP_INLINE_VISIBILITY char_type* pptr()  const {return __nout_;}
-    _LIBCPP_INLINE_VISIBILITY char_type* epptr() const {return __eout_;}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type* pbase() const {return __bout_;}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type* pptr()  const {return __nout_;}
+    _LIBCUDACXX_INLINE_VISIBILITY char_type* epptr() const {return __eout_;}
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     void pbump(int __n) { __nout_ += __n; }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __pbump(streamsize __n) { __nout_ += __n; }
 
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     void setp(char_type* __pbeg, char_type* __pend) {
         __bout_ = __nout_ = __pbeg;
         __eout_ = __pend;
@@ -350,13 +350,13 @@ template <class _CharT, class _Traits>
 void
 basic_streambuf<_CharT, _Traits>::swap(basic_streambuf& __sb)
 {
-    _VSTD::swap(__loc_, __sb.__loc_);
-    _VSTD::swap(__binp_, __sb.__binp_);
-    _VSTD::swap(__ninp_, __sb.__ninp_);
-    _VSTD::swap(__einp_, __sb.__einp_);
-    _VSTD::swap(__bout_, __sb.__bout_);
-    _VSTD::swap(__nout_, __sb.__nout_);
-    _VSTD::swap(__eout_, __sb.__eout_);
+    _CUDA_VSTD::swap(__loc_, __sb.__loc_);
+    _CUDA_VSTD::swap(__binp_, __sb.__binp_);
+    _CUDA_VSTD::swap(__ninp_, __sb.__ninp_);
+    _CUDA_VSTD::swap(__einp_, __sb.__einp_);
+    _CUDA_VSTD::swap(__bout_, __sb.__bout_);
+    _CUDA_VSTD::swap(__nout_, __sb.__nout_);
+    _CUDA_VSTD::swap(__eout_, __sb.__eout_);
 }
 
 template <class _CharT, class _Traits>
@@ -412,8 +412,8 @@ basic_streambuf<_CharT, _Traits>::xsgetn(char_type* __s, streamsize __n)
     {
         if (__ninp_ < __einp_)
         {
-            const streamsize __len = _VSTD::min(static_cast<streamsize>(INT_MAX),
-                                _VSTD::min(__einp_ - __ninp_, __n - __i));
+            const streamsize __len = _CUDA_VSTD::min(static_cast<streamsize>(INT_MAX),
+                                _CUDA_VSTD::min(__einp_ - __ninp_, __n - __i));
             traits_type::copy(__s, __ninp_, __len);
             __s +=  __len;
             __i +=  __len;
@@ -471,7 +471,7 @@ basic_streambuf<_CharT, _Traits>::xsputn(const char_type* __s, streamsize __n)
         }
         else
         {
-            streamsize __chunk_size = _VSTD::min(__eout_ - __nout_, __n - __i);
+            streamsize __chunk_size = _CUDA_VSTD::min(__eout_ - __nout_, __n - __i);
             traits_type::copy(__nout_, __s, __chunk_size);
             __nout_ += __chunk_size;
             __s     += __chunk_size;
@@ -488,14 +488,14 @@ basic_streambuf<_CharT, _Traits>::overflow(int_type)
     return traits_type::eof();
 }
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>;
 
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<char>;
-extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ios<wchar_t>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_ios<char>;
+extern template class _LIBCUDACXX_EXTERN_TEMPLATE_TYPE_VIS basic_ios<wchar_t>;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_STREAMBUF
+#endif // _LIBCUDACXX_STREAMBUF

diff  --git a/libcxx/include/string b/libcxx/include/string
index 3723dc8a3938..4d9b6fa99c80 100644
--- a/libcxx/include/string
+++ b/libcxx/include/string
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_STRING
-#define _LIBCPP_STRING
+#ifndef _LIBCUDACXX_STRING
+#define _LIBCUDACXX_STRING
 
 /*
     string synopsis
@@ -552,11 +552,11 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len );
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 #  include <cwchar>
 #endif
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #  include <functional>
 #  include <iterator>
@@ -579,45 +579,45 @@ basic_string<char32_t> operator "" s( const char32_t *str, size_t len );
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // basic_string
 
 template<class _CharT, class _Traits, class _Allocator>
 basic_string<_CharT, _Traits, _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 operator+(const basic_string<_CharT, _Traits, _Allocator>& __x,
           const basic_string<_CharT, _Traits, _Allocator>& __y);
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(const _CharT* __x, const basic_string<_CharT,_Traits,_Allocator>& __y);
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(_CharT __x, const basic_string<_CharT,_Traits,_Allocator>& __y);
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, const _CharT* __y);
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(const basic_string<_CharT, _Traits, _Allocator>& __x, _CharT __y);
 
-extern template _LIBCPP_FUNC_VIS string operator+<char, char_traits<char>, allocator<char> >(char const*, string const&);
+extern template _LIBCUDACXX_FUNC_VIS string operator+<char, char_traits<char>, allocator<char> >(char const*, string const&);
 
 template <class _Iter>
 struct __string_is_trivial_iterator : public false_type {};
@@ -636,7 +636,7 @@ struct __can_be_converted_to_string_view : public _BoolConstant<
      !is_convertible<const _Tp&, const _CharT*>::value
     > {};
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 typedef basic_string<char8_t> u8string;
 #endif
 typedef basic_string<char16_t> u16string;
@@ -646,12 +646,12 @@ struct __uninitialized_size_tag {};
 
 template<class _CharT, class _Traits, class _Allocator>
 class
-    _LIBCPP_TEMPLATE_VIS
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-    _LIBCPP_PREFERRED_NAME(u8string)
+    _LIBCUDACXX_TEMPLATE_VIS
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
+    _LIBCUDACXX_PREFERRED_NAME(u8string)
 #endif
-    _LIBCPP_PREFERRED_NAME(u16string)
-    _LIBCPP_PREFERRED_NAME(u32string)
+    _LIBCUDACXX_PREFERRED_NAME(u16string)
+    _LIBCUDACXX_PREFERRED_NAME(u32string)
     basic_string
 {
 public:
@@ -684,7 +684,7 @@ public:
 private:
     static_assert(CHAR_BIT == 8, "This implementation assumes that one byte contains 8 bits");
 
-#ifdef _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
+#ifdef _LIBCUDACXX_ABI_ALTERNATE_STRING_LAYOUT
 
     struct __long
     {
@@ -718,15 +718,15 @@ private:
 // This does not impact the short string representation, since we never need the MSB
 // for representing the size of a short string anyway.
 
-#ifdef _LIBCPP_BIG_ENDIAN
+#ifdef _LIBCUDACXX_BIG_ENDIAN
     static const size_type __endian_factor = 2;
 #else
     static const size_type __endian_factor = 1;
 #endif
 
-#else // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
+#else // _LIBCUDACXX_ABI_ALTERNATE_STRING_LAYOUT
 
-#ifdef _LIBCPP_BIG_ENDIAN
+#ifdef _LIBCUDACXX_BIG_ENDIAN
     static const size_type __endian_factor = 1;
 #else
     static const size_type __endian_factor = 2;
@@ -738,7 +738,7 @@ private:
     // size used, e.g., it is 4 bytes on AIX. See D128285 for details.
     struct __long
     {
-        struct _LIBCPP_PACKED {
+        struct _LIBCUDACXX_PACKED {
             size_type __is_long_ : 1;
             size_type __cap_ : sizeof(size_type) * CHAR_BIT - 1;
         };
@@ -751,7 +751,7 @@ private:
 
     struct __short
     {
-        struct _LIBCPP_PACKED {
+        struct _LIBCUDACXX_PACKED {
             unsigned char __is_long_ : 1;
             unsigned char __size_ : 7;
         };
@@ -759,7 +759,7 @@ private:
         value_type __data_[__min_cap];
     };
 
-#endif // _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT
+#endif // _LIBCUDACXX_ABI_ALTERNATE_STRING_LAYOUT
 
     static_assert(sizeof(__short) == (sizeof(value_type) * (__min_cap + 1)), "__short has an unexpected size.");
 
@@ -787,7 +787,7 @@ private:
     // Construct a string with the given allocator and enough storage to hold `__size` characters, but
     // don't initialize the characters. The contents of the string, including the null terminator, must be
     // initialized separately.
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     explicit basic_string(__uninitialized_size_tag, size_type __size, const allocator_type& __a)
             : __r_(__default_init_tag(), __a) {
         if (__size > max_size())
@@ -807,207 +807,207 @@ private:
     }
 
 public:
-    _LIBCPP_TEMPLATE_DATA_VIS
+    _LIBCUDACXX_TEMPLATE_DATA_VIS
     static const size_type npos = -1;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string()
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string()
         _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit basic_string(const allocator_type& __a)
-#if _LIBCPP_STD_VER <= 14
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit basic_string(const allocator_type& __a)
+#if _LIBCUDACXX_STD_VER <= 14
         _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value);
 #else
         _NOEXCEPT;
 #endif
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string(const basic_string& __str);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string(const basic_string& __str, const allocator_type& __a);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string(const basic_string& __str);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string(const basic_string& __str, const allocator_type& __a);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string(basic_string&& __str)
-#if _LIBCPP_STD_VER <= 14
+#if _LIBCUDACXX_STD_VER <= 14
         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
 #else
         _NOEXCEPT;
 #endif
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string(basic_string&& __str, const allocator_type& __a);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string(const _CharT* __s) : __r_(__default_init_tag(), __default_init_tag()) {
-      _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr");
+      _LIBCUDACXX_ASSERT(__s != nullptr, "basic_string(const char*) detected nullptr");
       __init(__s, traits_type::length(__s));
       std::__debug_db_insert_c(this);
     }
 
     template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
-        _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         basic_string(const _CharT* __s, const _Allocator& __a);
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     basic_string(nullptr_t) = delete;
 #endif
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string(const _CharT* __s, size_type __n);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string(const _CharT* __s, size_type __n, const _Allocator& __a);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string(size_type __n, _CharT __c);
 
     template <class = __enable_if_t<__is_allocator<_Allocator>::value, nullptr_t> >
-        _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         basic_string(size_type __n, _CharT __c, const _Allocator& __a);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string(const basic_string& __str, size_type __pos, size_type __n,
                  const _Allocator& __a = _Allocator());
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string(const basic_string& __str, size_type __pos,
                  const _Allocator& __a = _Allocator());
 
     template<class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value> >
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         basic_string(const _Tp& __t, size_type __pos, size_type __n,
                      const allocator_type& __a = allocator_type());
 
     template<class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                                           !__is_same_uncvref<_Tp, basic_string>::value> >
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         explicit basic_string(const _Tp& __t);
 
     template<class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value> >
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         explicit basic_string(const _Tp& __t, const allocator_type& __a);
 
     template<class _InputIterator, class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value> >
-        _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         basic_string(_InputIterator __first, _InputIterator __last);
     template<class _InputIterator, class = __enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value> >
-        _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         basic_string(_InputIterator __first, _InputIterator __last, const allocator_type& __a);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string(initializer_list<_CharT> __il);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string(initializer_list<_CharT> __il, const _Allocator& __a);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    inline _LIBCPP_CONSTEXPR_AFTER_CXX17 ~basic_string();
+    inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 ~basic_string();
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     operator __self_view() const _NOEXCEPT { return __self_view(data(), size()); }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator=(const basic_string& __str);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& operator=(const basic_string& __str);
 
     template <class _Tp, class = __enable_if_t<__can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value &&
                                                !__is_same_uncvref<_Tp, basic_string>::value> >
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator=(const _Tp& __t) {
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& operator=(const _Tp& __t) {
       __self_view __sv = __t;
       return assign(__sv);
     }
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& operator=(basic_string&& __str)
         _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
-     _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+     _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& operator=(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
 #endif
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& operator=(const value_type* __s) {return assign(__s);}
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     basic_string& operator=(nullptr_t) = delete;
 #endif
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator=(value_type __c);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& operator=(value_type __c);
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     iterator begin() _NOEXCEPT
         {return iterator(this, __get_pointer());}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_iterator begin() const _NOEXCEPT
         {return const_iterator(this, __get_pointer());}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     iterator end() _NOEXCEPT
         {return iterator(this, __get_pointer() + size());}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_iterator end() const _NOEXCEPT
         {return const_iterator(this, __get_pointer() + size());}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     reverse_iterator rbegin() _NOEXCEPT
         {return reverse_iterator(end());}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_reverse_iterator rbegin() const _NOEXCEPT
         {return const_reverse_iterator(end());}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     reverse_iterator rend() _NOEXCEPT
         {return reverse_iterator(begin());}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_reverse_iterator rend() const _NOEXCEPT
         {return const_reverse_iterator(begin());}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_iterator cbegin() const _NOEXCEPT
         {return begin();}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_iterator cend() const _NOEXCEPT
         {return end();}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_reverse_iterator crbegin() const _NOEXCEPT
         {return rbegin();}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_reverse_iterator crend() const _NOEXCEPT
         {return rend();}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type size() const _NOEXCEPT
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 size_type size() const _NOEXCEPT
         {return __is_long() ? __get_long_size() : __get_short_size();}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type length() const _NOEXCEPT {return size();}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type max_size() const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type capacity() const _NOEXCEPT {
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 size_type length() const _NOEXCEPT {return size();}
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 size_type max_size() const _NOEXCEPT;
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 size_type capacity() const _NOEXCEPT {
         return (__is_long() ? __get_long_cap() : static_cast<size_type>(__min_cap)) - 1;
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void resize(size_type __n, value_type __c);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void resize(size_type __n) { resize(__n, value_type()); }
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void resize(size_type __n, value_type __c);
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void resize(size_type __n) { resize(__n, value_type()); }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void reserve(size_type __requested_capacity);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void reserve(size_type __requested_capacity);
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     template <class _Op>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     void resize_and_overwrite(size_type __n, _Op __op) {
       __resize_default_init(__n);
-      __erase_to_end(std::move(__op)(data(), _LIBCPP_AUTO_CAST(__n)));
+      __erase_to_end(std::move(__op)(data(), _LIBCUDACXX_AUTO_CAST(__n)));
     }
 #endif
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __resize_default_init(size_type __n);
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __resize_default_init(size_type __n);
 
-    _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_HIDE_FROM_ABI void reserve() _NOEXCEPT { shrink_to_fit(); }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void clear() _NOEXCEPT;
+    _LIBCUDACXX_DEPRECATED_IN_CXX20 _LIBCUDACXX_HIDE_FROM_ABI void reserve() _NOEXCEPT { shrink_to_fit(); }
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void clear() _NOEXCEPT;
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     bool empty() const _NOEXCEPT {return size() == 0;}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_reference operator[](size_type __pos) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reference operator[](size_type __pos) _NOEXCEPT;
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 reference operator[](size_type __pos) _NOEXCEPT;
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference at(size_type __n) const;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 reference       at(size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 const_reference at(size_type __n) const;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 reference       at(size_type __n);
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator+=(const basic_string& __str) {
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& operator+=(const basic_string& __str) {
         return append(__str);
     }
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
@@ -1018,35 +1018,35 @@ public:
         __self_view __sv = __t; return append(__sv);
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator+=(const value_type* __s) {
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& operator+=(const value_type* __s) {
         return append(__s);
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& operator+=(value_type __c) {
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& operator+=(value_type __c) {
         push_back(__c);
         return *this;
     }
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& operator+=(initializer_list<value_type> __il) { return append(__il); }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& append(const basic_string& __str);
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t<
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
             && !__is_same_uncvref<_Tp, basic_string>::value,
             basic_string&
         >
                   append(const _Tp& __t) { __self_view __sv = __t; return append(__sv.data(), __sv.size()); }
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& append(const basic_string& __str, size_type __pos, size_type __n=npos);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& append(const basic_string& __str, size_type __pos, size_type __n=npos);
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
@@ -1054,67 +1054,67 @@ public:
             basic_string&
         >
                   append(const _Tp& __t, size_type __pos, size_type __n=npos);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& append(const value_type* __s, size_type __n);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& append(const value_type* __s);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& append(size_type __n, value_type __c);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& append(const value_type* __s, size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& append(const value_type* __s);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& append(size_type __n, value_type __c);
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __append_default_init(size_type __n);
 
     template<class _InputIterator>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
     __enable_if_t
         <
             __is_exactly_cpp17_input_iterator<_InputIterator>::value,
             basic_string&
         >
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     append(_InputIterator __first, _InputIterator __last) {
       const basic_string __temp(__first, __last, __alloc());
       append(__temp.data(), __temp.size());
       return *this;
     }
     template<class _ForwardIterator>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
     __enable_if_t
         <
             __is_cpp17_forward_iterator<_ForwardIterator>::value,
             basic_string&
         >
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     append(_ForwardIterator __first, _ForwardIterator __last);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& append(initializer_list<value_type> __il) {return append(__il.begin(), __il.size());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void push_back(value_type __c);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void pop_back();
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reference       front() _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference front() const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 reference       back() _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference back() const _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void push_back(value_type __c);
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void pop_back();
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 reference       front() _NOEXCEPT;
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 const_reference front() const _NOEXCEPT;
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 reference       back() _NOEXCEPT;
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 const_reference back() const _NOEXCEPT;
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             basic_string&
         >
                  assign(const _Tp & __t) { __self_view __sv = __t; return assign(__sv.data(), __sv.size()); }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& assign(const basic_string& __str) { return *this = __str; }
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& assign(basic_string&& __str)
         _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
         {*this = std::move(__str); return *this;}
 #endif
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& assign(const basic_string& __str, size_type __pos, size_type __n=npos);
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
@@ -1122,11 +1122,11 @@ public:
             basic_string&
         >
                   assign(const _Tp & __t, size_type __pos, size_type __n=npos);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& assign(const value_type* __s, size_type __n);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& assign(const value_type* __s);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& assign(size_type __n, value_type __c);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& assign(const value_type* __s, size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& assign(const value_type* __s);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& assign(size_type __n, value_type __c);
     template<class _InputIterator>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __is_exactly_cpp17_input_iterator<_InputIterator>::value,
@@ -1134,23 +1134,23 @@ public:
         >
         assign(_InputIterator __first, _InputIterator __last);
     template<class _ForwardIterator>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __is_cpp17_forward_iterator<_ForwardIterator>::value,
             basic_string&
         >
         assign(_ForwardIterator __first, _ForwardIterator __last);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& assign(initializer_list<value_type> __il) {return assign(__il.begin(), __il.size());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& insert(size_type __pos1, const basic_string& __str);
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -1160,23 +1160,23 @@ public:
     { __self_view __sv = __t; return insert(__pos1, __sv.data(), __sv.size()); }
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string>::value,
             basic_string&
         >
                   insert(size_type __pos1, const _Tp& __t, size_type __pos2, size_type __n=npos);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& insert(size_type __pos1, const basic_string& __str, size_type __pos2, size_type __n=npos);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& insert(size_type __pos, const value_type* __s, size_type __n);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& insert(size_type __pos, const value_type* __s);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& insert(size_type __pos, size_type __n, value_type __c);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator      insert(const_iterator __pos, value_type __c);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& insert(size_type __pos, const value_type* __s, size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& insert(size_type __pos, const value_type* __s);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& insert(size_type __pos, size_type __n, value_type __c);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator      insert(const_iterator __pos, value_type __c);
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     iterator      insert(const_iterator __pos, size_type __n, value_type __c);
     template<class _InputIterator>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __is_exactly_cpp17_input_iterator<_InputIterator>::value,
@@ -1184,55 +1184,55 @@ public:
         >
         insert(const_iterator __pos, _InputIterator __first, _InputIterator __last);
     template<class _ForwardIterator>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __is_cpp17_forward_iterator<_ForwardIterator>::value,
             iterator
         >
         insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     iterator insert(const_iterator __pos, initializer_list<value_type> __il)
                     {return insert(__pos, __il.begin(), __il.end());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& erase(size_type __pos = 0, size_type __n = npos);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& erase(size_type __pos = 0, size_type __n = npos);
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     iterator      erase(const_iterator __pos);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     iterator      erase(const_iterator __first, const_iterator __last);
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str);
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             basic_string&
         >
                   replace(size_type __pos1, size_type __n1, const _Tp& __t) { __self_view __sv = __t; return replace(__pos1, __n1, __sv.data(), __sv.size()); }
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& replace(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2, size_type __n2=npos);
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value  && !__is_same_uncvref<_Tp, basic_string>::value,
             basic_string&
         >
                   replace(size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2=npos);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& replace(size_type __pos, size_type __n1, const value_type* __s);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& replace(size_type __pos, size_type __n1, size_type __n2, value_type __c);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& replace(size_type __pos, size_type __n1, const value_type* __s);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& replace(size_type __pos, size_type __n1, size_type __n2, value_type __c);
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& replace(const_iterator __i1, const_iterator __i2, const basic_string& __str);
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -1240,162 +1240,162 @@ public:
         >
                   replace(const_iterator __i1, const_iterator __i2, const _Tp& __t) { __self_view __sv = __t; return replace(__i1 - begin(), __i2 - __i1, __sv); }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& replace(const_iterator __i1, const_iterator __i2, const value_type* __s);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c);
     template<class _InputIterator>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __is_cpp17_input_iterator<_InputIterator>::value,
             basic_string&
         >
         replace(const_iterator __i1, const_iterator __i2, _InputIterator __j1, _InputIterator __j2);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& replace(const_iterator __i1, const_iterator __i2, initializer_list<value_type> __il)
         {return replace(__i1, __i2, __il.begin(), __il.end());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type copy(value_type* __s, size_type __n, size_type __pos = 0) const;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 size_type copy(value_type* __s, size_type __n, size_type __pos = 0) const;
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string substr(size_type __pos = 0, size_type __n = npos) const;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void swap(basic_string& __str)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT;
 #else
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                     __is_nothrow_swappable<allocator_type>::value);
 #endif
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const value_type* c_str() const _NOEXCEPT {return data();}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const value_type* data() const _NOEXCEPT  {return std::__to_address(__get_pointer());}
-#if _LIBCPP_STD_VER > 14 || defined(_LIBCPP_BUILDING_LIBRARY)
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#if _LIBCUDACXX_STD_VER > 14 || defined(_LIBCUDACXX_BUILDING_LIBRARY)
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     value_type* data()             _NOEXCEPT  {return std::__to_address(__get_pointer());}
 #endif
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     allocator_type get_allocator() const _NOEXCEPT {return __alloc();}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
               find(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type find(value_type __c, size_type __pos = 0) const _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 size_type find(value_type __c, size_type __pos = 0) const _NOEXCEPT;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type rfind(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
               rfind(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type rfind(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type rfind(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type rfind(value_type __c, size_type __pos = npos) const _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 size_type rfind(value_type __c, size_type __pos = npos) const _NOEXCEPT;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_first_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
               find_first_of(const _Tp& __t, size_type __pos = 0) const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_first_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_first_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_first_of(value_type __c, size_type __pos = 0) const _NOEXCEPT;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_last_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
               find_last_of(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_last_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_last_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_last_of(value_type __c, size_type __pos = npos) const _NOEXCEPT;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_first_not_of(const basic_string& __str, size_type __pos = 0) const _NOEXCEPT;
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
               find_first_not_of(const _Tp &__t, size_type __pos = 0) const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_first_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_first_not_of(const value_type* __s, size_type __pos = 0) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_first_not_of(value_type __c, size_type __pos = 0) const _NOEXCEPT;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_last_not_of(const basic_string& __str, size_type __pos = npos) const _NOEXCEPT;
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
             size_type
         >
               find_last_not_of(const _Tp& __t, size_type __pos = npos) const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_last_not_of(const value_type* __s, size_type __pos, size_type __n) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_last_not_of(const value_type* __s, size_type __pos = npos) const _NOEXCEPT;
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type find_last_not_of(value_type __c, size_type __pos = npos) const _NOEXCEPT;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     int compare(const basic_string& __str) const _NOEXCEPT;
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -1404,7 +1404,7 @@ public:
         compare(const _Tp &__t) const _NOEXCEPT;
 
     template <class _Tp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -1412,108 +1412,108 @@ public:
         >
          compare(size_type __pos1, size_type __n1, const _Tp& __t) const;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     int compare(size_type __pos1, size_type __n1, const basic_string& __str) const;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     int compare(size_type __pos1, size_type __n1, const basic_string& __str, size_type __pos2,
                 size_type __n2 = npos) const;
 
     template <class _Tp>
-    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         __enable_if_t
         <
             __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value  && !__is_same_uncvref<_Tp, basic_string>::value,
             int
         >
         compare(size_type __pos1, size_type __n1, const _Tp& __t, size_type __pos2, size_type __n2=npos) const;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 int compare(const value_type* __s) const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 int compare(size_type __pos1, size_type __n1, const value_type* __s) const;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 int compare(const value_type* __s) const _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 int compare(size_type __pos1, size_type __n1, const value_type* __s) const;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     int compare(size_type __pos1, size_type __n1, const value_type* __s, size_type __n2) const;
 
-#if _LIBCPP_STD_VER > 17
-    constexpr _LIBCPP_HIDE_FROM_ABI
+#if _LIBCUDACXX_STD_VER > 17
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI
     bool starts_with(__self_view __sv) const noexcept
     { return __self_view(data(), size()).starts_with(__sv); }
 
-    constexpr _LIBCPP_HIDE_FROM_ABI
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI
     bool starts_with(value_type __c) const noexcept
     { return !empty() && _Traits::eq(front(), __c); }
 
-    constexpr _LIBCPP_HIDE_FROM_ABI
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI
     bool starts_with(const value_type* __s) const noexcept
     { return starts_with(__self_view(__s)); }
 
-    constexpr _LIBCPP_HIDE_FROM_ABI
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI
     bool ends_with(__self_view __sv) const noexcept
     { return __self_view(data(), size()).ends_with( __sv); }
 
-    constexpr _LIBCPP_HIDE_FROM_ABI
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI
     bool ends_with(value_type __c) const noexcept
     { return !empty() && _Traits::eq(back(), __c); }
 
-    constexpr _LIBCPP_HIDE_FROM_ABI
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI
     bool ends_with(const value_type* __s) const noexcept
     { return ends_with(__self_view(__s)); }
 #endif
 
-#if _LIBCPP_STD_VER > 20
-    constexpr _LIBCPP_HIDE_FROM_ABI
+#if _LIBCUDACXX_STD_VER > 20
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI
     bool contains(__self_view __sv) const noexcept
     { return __self_view(data(), size()).contains(__sv); }
 
-    constexpr _LIBCPP_HIDE_FROM_ABI
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI
     bool contains(value_type __c) const noexcept
     { return __self_view(data(), size()).contains(__c); }
 
-    constexpr _LIBCPP_HIDE_FROM_ABI
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI
     bool contains(const value_type* __s) const
     { return __self_view(data(), size()).contains(__s); }
 #endif
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __clear_and_shrink() _NOEXCEPT;
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __clear_and_shrink() _NOEXCEPT;
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
     bool __dereferenceable(const const_iterator* __i) const;
     bool __decrementable(const const_iterator* __i) const;
     bool __addable(const const_iterator* __i, ptr
diff _t __n) const;
     bool __subscriptable(const const_iterator* __i, ptr
diff _t __n) const;
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 private:
     template<class _Alloc>
-    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     bool friend operator==(const basic_string<char, char_traits<char>, _Alloc>& __lhs,
                            const basic_string<char, char_traits<char>, _Alloc>& __rhs) _NOEXCEPT;
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __shrink_or_extend(size_type __target_capacity);
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __shrink_or_extend(size_type __target_capacity);
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     bool __is_long() const _NOEXCEPT {
-        if (__libcpp_is_constant_evaluated())
+        if (__LIBCUDACXX_is_constant_evaluated())
             return true;
         return __r_.first().__s.__is_long_;
     }
 
-    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __begin_lifetime(pointer __begin, size_type __n) {
-#if _LIBCPP_STD_VER > 17
-        if (__libcpp_is_constant_evaluated()) {
+    static _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __begin_lifetime(pointer __begin, size_type __n) {
+#if _LIBCUDACXX_STD_VER > 17
+        if (__LIBCUDACXX_is_constant_evaluated()) {
             for (size_type __i = 0; __i != __n; ++__i)
                 std::construct_at(std::addressof(__begin[__i]));
         }
 #else
         (void)__begin;
         (void)__n;
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __default_init() {
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __default_init() {
         __zero();
-        if (__libcpp_is_constant_evaluated()) {
+        if (__LIBCUDACXX_is_constant_evaluated()) {
             size_type __sz = __recommend(0) + 1;
             pointer __ptr = __alloc_traits::allocate(__alloc(), __sz);
             __begin_lifetime(__ptr, __sz);
@@ -1523,18 +1523,18 @@ private:
         }
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __deallocate_constexpr() {
-        if (__libcpp_is_constant_evaluated() && __get_pointer() != nullptr)
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __deallocate_constexpr() {
+        if (__LIBCUDACXX_is_constant_evaluated() && __get_pointer() != nullptr)
             __alloc_traits::deallocate(__alloc(), __get_pointer(), __get_long_cap());
     }
 
-    _LIBCPP_CONSTEXPR _LIBCPP_HIDE_FROM_ABI static bool __fits_in_sso(size_type __sz) {
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_HIDE_FROM_ABI static bool __fits_in_sso(size_type __sz) {
         // SSO is disabled during constant evaluation because `__is_long` isn't constexpr friendly
-        return !__libcpp_is_constant_evaluated() && (__sz < __min_cap);
+        return !__LIBCUDACXX_is_constant_evaluated() && (__sz < __min_cap);
     }
 
     template <class _ForwardIterator>
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     iterator __insert_from_safe_copy(size_type __n, size_type __ip, _ForwardIterator __first, _ForwardIterator __last) {
         size_type __sz = size();
         size_type __cap = capacity();
@@ -1560,80 +1560,80 @@ private:
         return begin() + __ip;
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11 allocator_type& __alloc() _NOEXCEPT { return __r_.second(); }
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR const allocator_type& __alloc() const _NOEXCEPT { return __r_.second(); }
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 allocator_type& __alloc() _NOEXCEPT { return __r_.second(); }
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR const allocator_type& __alloc() const _NOEXCEPT { return __r_.second(); }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __set_short_size(size_type __s) _NOEXCEPT {
-        _LIBCPP_ASSERT(__s < __min_cap, "__s should never be greater than or equal to the short string capacity");
+        _LIBCUDACXX_ASSERT(__s < __min_cap, "__s should never be greater than or equal to the short string capacity");
         __r_.first().__s.__size_ = __s;
         __r_.first().__s.__is_long_ = false;
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type __get_short_size() const _NOEXCEPT {
-        _LIBCPP_ASSERT(!__r_.first().__s.__is_long_, "String has to be short when trying to get the short size");
+        _LIBCUDACXX_ASSERT(!__r_.first().__s.__is_long_, "String has to be short when trying to get the short size");
         return __r_.first().__s.__size_;
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __set_long_size(size_type __s) _NOEXCEPT
         {__r_.first().__l.__size_ = __s;}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type __get_long_size() const _NOEXCEPT
         {return __r_.first().__l.__size_;}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __set_size(size_type __s) _NOEXCEPT
         {if (__is_long()) __set_long_size(__s); else __set_short_size(__s);}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __set_long_cap(size_type __s) _NOEXCEPT {
         __r_.first().__l.__cap_ = __s / __endian_factor;
         __r_.first().__l.__is_long_ = true;
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type __get_long_cap() const _NOEXCEPT {
         return __r_.first().__l.__cap_ * __endian_factor;
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __set_long_pointer(pointer __p) _NOEXCEPT
         {__r_.first().__l.__data_ = __p;}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     pointer __get_long_pointer() _NOEXCEPT
         {return __r_.first().__l.__data_;}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_pointer __get_long_pointer() const _NOEXCEPT
         {return __r_.first().__l.__data_;}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     pointer __get_short_pointer() _NOEXCEPT
         {return pointer_traits<pointer>::pointer_to(__r_.first().__s.__data_[0]);}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_pointer __get_short_pointer() const _NOEXCEPT
         {return pointer_traits<const_pointer>::pointer_to(__r_.first().__s.__data_[0]);}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     pointer __get_pointer() _NOEXCEPT
         {return __is_long() ? __get_long_pointer() : __get_short_pointer();}
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_pointer __get_pointer() const _NOEXCEPT
         {return __is_long() ? __get_long_pointer() : __get_short_pointer();}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __zero() _NOEXCEPT {
         __r_.first() = __rep();
     }
 
     template <size_type __a> static
-        _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         size_type __align_it(size_type __s) _NOEXCEPT
             {return (__s + (__a-1)) & ~(__a-1);}
     enum {__alignment = 16};
-    static _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    static _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type __recommend(size_type __s) _NOEXCEPT
     {
         if (__s < __min_cap) {
-            if (__libcpp_is_constant_evaluated())
+            if (__LIBCUDACXX_is_constant_evaluated())
                 return static_cast<size_type>(__min_cap);
             else
                 return static_cast<size_type>(__min_cap) - 1;
@@ -1644,11 +1644,11 @@ private:
         return __guess;
     }
 
-    inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+    inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __init(const value_type* __s, size_type __sz, size_type __reserve);
-    inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+    inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __init(const value_type* __s, size_type __sz);
-    inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+    inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __init(size_type __n, value_type __c);
 
     // Slow path for the (inlined) copy constructor for 'long' strings.
@@ -1659,10 +1659,10 @@ private:
     // to call the __init() functions as those are marked as inline which may
     // result in over-aggressive inlining by the compiler, where our aim is
     // to only inline the fast path code directly in the ctor.
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __init_copy_ctor_external(const value_type* __s, size_type __sz);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __init_copy_ctor_external(const value_type* __s, size_type __sz);
 
     template <class _InputIterator>
-    inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+    inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
     <
         __is_exactly_cpp17_input_iterator<_InputIterator>::value
@@ -1670,17 +1670,17 @@ private:
     __init(_InputIterator __first, _InputIterator __last);
 
     template <class _ForwardIterator>
-    inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+    inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
     <
         __is_cpp17_forward_iterator<_ForwardIterator>::value
     >
     __init(_ForwardIterator __first, _ForwardIterator __last);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __grow_by(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
                    size_type __n_copy,  size_type __n_del,     size_type __n_add = 0);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __grow_by_and_replace(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
                                size_type __n_copy,  size_type __n_del,
                                size_type __n_add, const value_type* __p_new_stuff);
@@ -1689,21 +1689,21 @@ private:
     // have proof that the input does not alias the current instance.
     // For example, operator=(basic_string) performs a 'self' check.
     template <bool __is_short>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& __assign_no_alias(const value_type* __s, size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& __assign_no_alias(const value_type* __s, size_type __n);
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __erase_to_end(size_type __pos);
 
     // __erase_external_with_move is invoked for erase() invocations where
     // `n ~= npos`, likely requiring memory moves on the string data.
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __erase_external_with_move(size_type __pos, size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __erase_external_with_move(size_type __pos, size_type __n);
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __copy_assign_alloc(const basic_string& __str)
         {__copy_assign_alloc(__str, integral_constant<bool,
                       __alloc_traits::propagate_on_container_copy_assignment::value>());}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __copy_assign_alloc(const basic_string& __str, true_type)
         {
             if (__alloc() == __str.__alloc())
@@ -1729,24 +1729,24 @@ private:
             }
         }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __copy_assign_alloc(const basic_string&, false_type) _NOEXCEPT
         {}
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __move_assign(basic_string& __str, false_type)
         _NOEXCEPT_(__alloc_traits::is_always_equal::value);
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __move_assign(basic_string& __str, true_type)
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
         _NOEXCEPT;
 #else
         _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
 #endif
 #endif
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void
     __move_assign_alloc(basic_string& __str)
         _NOEXCEPT_(
@@ -1755,20 +1755,20 @@ private:
     {__move_assign_alloc(__str, integral_constant<bool,
                       __alloc_traits::propagate_on_container_move_assignment::value>());}
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __move_assign_alloc(basic_string& __c, true_type)
         _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
         {
             __alloc() = std::move(__c.__alloc());
         }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __move_assign_alloc(basic_string&, false_type)
         _NOEXCEPT
         {}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& __assign_external(const value_type* __s);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string& __assign_external(const value_type* __s, size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& __assign_external(const value_type* __s);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string& __assign_external(const value_type* __s, size_type __n);
 
     // Assigns the value in __s, guaranteed to be __n < __min_cap in length.
     inline basic_string& __assign_short(const value_type* __s, size_type __n) {
@@ -1780,7 +1780,7 @@ private:
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string& __null_terminate_at(value_type* __p, size_type __newsz) {
       __set_size(__newsz);
       __invalidate_iterators_past(__newsz);
@@ -1788,53 +1788,53 @@ private:
       return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __invalidate_iterators_past(size_type);
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __invalidate_iterators_past(size_type);
 
     template<class _Tp>
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     bool __addr_in_range(_Tp&& __t) const {
         // assume that the ranges overlap, because we can't check during constant evaluation
-        if (__libcpp_is_constant_evaluated())
+        if (__LIBCUDACXX_is_constant_evaluated())
           return true;
         const volatile void *__p = std::addressof(__t);
         return data() <= __p && __p <= data() + size();
     }
 
-    _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_NORETURN _LIBCUDACXX_HIDE_FROM_ABI
     void __throw_length_error() const {
         std::__throw_length_error("basic_string");
     }
 
-    _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_NORETURN _LIBCUDACXX_HIDE_FROM_ABI
     void __throw_out_of_range() const {
         std::__throw_out_of_range("basic_string");
     }
 
-    friend _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const basic_string&, const basic_string&);
-    friend _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const value_type*, const basic_string&);
-    friend _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(value_type, const basic_string&);
-    friend _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const basic_string&, const value_type*);
-    friend _LIBCPP_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const basic_string&, value_type);
+    friend _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const basic_string&, const basic_string&);
+    friend _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const value_type*, const basic_string&);
+    friend _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(value_type, const basic_string&);
+    friend _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const basic_string&, const value_type*);
+    friend _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 basic_string operator+<>(const basic_string&, value_type);
 };
 
 // These declarations must appear before any functions are implicitly used
 // so that they have the correct visibility specifier.
-#define _LIBCPP_DECLARE(...) extern template __VA_ARGS__;
-#ifdef _LIBCPP_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION
-    _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, char)
-#   ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-        _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, wchar_t)
+#define _LIBCUDACXX_DECLARE(...) extern template __VA_ARGS__;
+#ifdef _LIBCUDACXX_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION
+    _LIBCUDACXX_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCUDACXX_DECLARE, char)
+#   ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+        _LIBCUDACXX_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCUDACXX_DECLARE, wchar_t)
 #   endif
 #else
-    _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, char)
-#   ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-        _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_DECLARE, wchar_t)
+    _LIBCUDACXX_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCUDACXX_DECLARE, char)
+#   ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+        _LIBCUDACXX_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCUDACXX_DECLARE, wchar_t)
 #   endif
 #endif
-#undef _LIBCPP_DECLARE
+#undef _LIBCUDACXX_DECLARE
 
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator,
          class _CharT = __iter_value_type<_InputIterator>,
          class _Allocator = allocator<_CharT>,
@@ -1863,12 +1863,12 @@ basic_string(basic_string_view<_CharT, _Traits>, _Sz, _Sz, const _Allocator& = _
 #endif
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type __pos)
 {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
-    if (!__libcpp_is_constant_evaluated()) {
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
+    if (!__LIBCUDACXX_is_constant_evaluated()) {
         __c_node* __c = __get_db()->__find_c_and_lock(this);
         if (__c)
         {
@@ -1889,11 +1889,11 @@ basic_string<_CharT, _Traits, _Allocator>::__invalidate_iterators_past(size_type
     }
 #else
     (void)__pos;
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string()
     _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
      : __r_(__default_init_tag(), __default_init_tag())
@@ -1903,9 +1903,9 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string()
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a)
-#if _LIBCPP_STD_VER <= 14
+#if _LIBCUDACXX_STD_VER <= 14
         _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
 #else
         _NOEXCEPT
@@ -1917,12 +1917,12 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s,
                                                        size_type __sz,
                                                        size_type __reserve)
 {
-    if (__libcpp_is_constant_evaluated())
+    if (__LIBCUDACXX_is_constant_evaluated())
         __zero();
     if (__reserve > max_size())
         __throw_length_error();
@@ -1946,11 +1946,11 @@ void basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s,
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_type __sz)
 {
-    if (__libcpp_is_constant_evaluated())
+    if (__LIBCUDACXX_is_constant_evaluated())
         __zero();
     if (__sz > max_size())
         __throw_length_error();
@@ -1975,37 +1975,37 @@ basic_string<_CharT, _Traits, _Allocator>::__init(const value_type* __s, size_ty
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, const _Allocator& __a)
     : __r_(__default_init_tag(), __a)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "basic_string(const char*, allocator) detected nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "basic_string(const char*, allocator) detected nullptr");
     __init(__s, traits_type::length(__s));
     std::__debug_db_insert_c(this);
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_type __n)
      : __r_(__default_init_tag(), __default_init_tag())
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr");
+    _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n) detected nullptr");
     __init(__s, __n);
     std::__debug_db_insert_c(this);
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(const _CharT* __s, size_type __n, const _Allocator& __a)
     : __r_(__default_init_tag(), __a)
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n, allocator) detected nullptr");
+    _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "basic_string(const char*, n, allocator) detected nullptr");
     __init(__s, __n);
     std::__debug_db_insert_c(this);
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str)
     : __r_(__default_init_tag(), __alloc_traits::select_on_container_copy_construction(__str.__alloc()))
 {
@@ -2018,7 +2018,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(
     const basic_string& __str, const allocator_type& __a)
     : __r_(__default_init_tag(), __a)
@@ -2032,10 +2032,10 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void basic_string<_CharT, _Traits, _Allocator>::__init_copy_ctor_external(
     const value_type* __s, size_type __sz) {
-  if (__libcpp_is_constant_evaluated())
+  if (__LIBCUDACXX_is_constant_evaluated())
     __zero();
   pointer __p;
   if (__fits_in_sso(__sz)) {
@@ -2054,12 +2054,12 @@ void basic_string<_CharT, _Traits, _Allocator>::__init_copy_ctor_external(
   traits_type::copy(std::__to_address(__p), __s, __sz + 1);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str)
-#if _LIBCPP_STD_VER <= 14
+#if _LIBCUDACXX_STD_VER <= 14
         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
 #else
         _NOEXCEPT
@@ -2073,7 +2073,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str, const allocator_type& __a)
     : __r_(__default_init_tag(), __a)
 {
@@ -2081,7 +2081,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str, co
         __init(std::__to_address(__str.__get_long_pointer()), __str.__get_long_size());
     else
     {
-        if (__libcpp_is_constant_evaluated()) {
+        if (__LIBCUDACXX_is_constant_evaluated()) {
             __zero();
             __r_.first().__l = __str.__r_.first().__l;
         } else {
@@ -2094,14 +2094,14 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(basic_string&& __str, co
         std::__debug_db_swap(this, &__str);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c)
 {
-    if (__libcpp_is_constant_evaluated())
+    if (__LIBCUDACXX_is_constant_evaluated())
         __zero();
     if (__n > max_size())
         __throw_length_error();
@@ -2125,7 +2125,7 @@ basic_string<_CharT, _Traits, _Allocator>::__init(size_type __n, value_type __c)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __c)
      : __r_(__default_init_tag(), __default_init_tag())
 {
@@ -2135,7 +2135,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __c, const _Allocator& __a)
     : __r_(__default_init_tag(), __a)
 {
@@ -2144,7 +2144,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(size_type __n, _CharT __
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str,
                                                         size_type __pos, size_type __n,
                                                         const _Allocator& __a)
@@ -2158,7 +2158,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __str, size_type __pos,
                                                         const _Allocator& __a)
     : __r_(__default_init_tag(), __a)
@@ -2172,7 +2172,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const basic_string& __st
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _Tp, class>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(
              const _Tp& __t, size_type __pos, size_type __n, const allocator_type& __a)
     : __r_(__default_init_tag(), __a)
@@ -2185,7 +2185,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _Tp, class>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp & __t)
      : __r_(__default_init_tag(), __default_init_tag())
 {
@@ -2196,7 +2196,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp & __t)
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _Tp, class>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp & __t, const _Allocator& __a)
     : __r_(__default_init_tag(), __a)
 {
@@ -2207,7 +2207,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(const _Tp & __t, const _
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __is_exactly_cpp17_input_iterator<_InputIterator>::value
@@ -2215,13 +2215,13 @@ __enable_if_t
 basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _InputIterator __last)
 {
     __default_init();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     for (; __first != __last; ++__first)
         push_back(*__first);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -2229,19 +2229,19 @@ basic_string<_CharT, _Traits, _Allocator>::__init(_InputIterator __first, _Input
             __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap());
         throw;
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __is_cpp17_forward_iterator<_ForwardIterator>::value
 >
 basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator __first, _ForwardIterator __last)
 {
-    if (__libcpp_is_constant_evaluated())
+    if (__LIBCUDACXX_is_constant_evaluated())
         __zero();
     size_type __sz = static_cast<size_type>(std::distance(__first, __last));
     if (__sz > max_size())
@@ -2262,14 +2262,14 @@ basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator __first, _For
         __set_long_size(__sz);
     }
 
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif  // _LIBCPP_NO_EXCEPTIONS
+#endif  // _LIBCUDACXX_NO_EXCEPTIONS
     for (; __first != __last; ++__first, (void) ++__p)
         traits_type::assign(*__p, *__first);
     traits_type::assign(*__p, value_type());
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -2277,12 +2277,12 @@ basic_string<_CharT, _Traits, _Allocator>::__init(_ForwardIterator __first, _For
             __alloc_traits::deallocate(__alloc(), __get_long_pointer(), __get_long_cap());
         throw;
     }
-#endif  // _LIBCPP_NO_EXCEPTIONS
+#endif  // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template <class _CharT, class _Traits, class _Allocator>
 template<class _InputIterator, class>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first, _InputIterator __last)
      : __r_(__default_init_tag(), __default_init_tag())
 {
@@ -2292,7 +2292,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first,
 
 template <class _CharT, class _Traits, class _Allocator>
 template<class _InputIterator, class>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first, _InputIterator __last,
                                                         const allocator_type& __a)
     : __r_(__default_init_tag(), __a)
@@ -2301,10 +2301,10 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(_InputIterator __first,
     std::__debug_db_insert_c(this);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(
     initializer_list<_CharT> __il)
      : __r_(__default_init_tag(), __default_init_tag())
@@ -2314,7 +2314,7 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::basic_string(
     initializer_list<_CharT> __il, const _Allocator& __a)
     : __r_(__default_init_tag(), __a)
@@ -2323,10 +2323,10 @@ basic_string<_CharT, _Traits, _Allocator>::basic_string(
     std::__debug_db_insert_c(this);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::~basic_string()
 {
     std::__debug_db_erase_c(this);
@@ -2335,7 +2335,7 @@ basic_string<_CharT, _Traits, _Allocator>::~basic_string()
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace
     (size_type __old_cap, size_type __delta_cap, size_type __old_sz,
@@ -2361,7 +2361,7 @@ basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace
     if (__sec_cp_sz != 0)
         traits_type::copy(std::__to_address(__p) + __n_copy + __n_add,
                           std::__to_address(__old_p) + __n_copy + __n_del, __sec_cp_sz);
-    if (__old_cap+1 != __min_cap || __libcpp_is_constant_evaluated())
+    if (__old_cap+1 != __min_cap || __LIBCUDACXX_is_constant_evaluated())
         __alloc_traits::deallocate(__alloc(), __old_p, __old_cap+1);
     __set_long_pointer(__p);
     __set_long_cap(__allocation.count);
@@ -2372,7 +2372,7 @@ basic_string<_CharT, _Traits, _Allocator>::__grow_by_and_replace
 
 template <class _CharT, class _Traits, class _Allocator>
 void
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>::__grow_by(size_type __old_cap, size_type __delta_cap, size_type __old_sz,
                                                      size_type __n_copy,  size_type __n_del,     size_type __n_add)
 {
@@ -2395,7 +2395,7 @@ basic_string<_CharT, _Traits, _Allocator>::__grow_by(size_type __old_cap, size_t
         traits_type::copy(std::__to_address(__p) + __n_copy + __n_add,
                           std::__to_address(__old_p) + __n_copy + __n_del,
                           __sec_cp_sz);
-    if (__libcpp_is_constant_evaluated() || __old_cap + 1 != __min_cap)
+    if (__LIBCUDACXX_is_constant_evaluated() || __old_cap + 1 != __min_cap)
         __alloc_traits::deallocate(__alloc(), __old_p, __old_cap + 1);
     __set_long_pointer(__p);
     __set_long_cap(__allocation.count);
@@ -2405,7 +2405,7 @@ basic_string<_CharT, _Traits, _Allocator>::__grow_by(size_type __old_cap, size_t
 
 template <class _CharT, class _Traits, class _Allocator>
 template <bool __is_short>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::__assign_no_alias(
     const value_type* __s, size_type __n) {
@@ -2424,7 +2424,7 @@ basic_string<_CharT, _Traits, _Allocator>::__assign_no_alias(
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::__assign_external(
     const value_type* __s, size_type __n) {
@@ -2441,18 +2441,18 @@ basic_string<_CharT, _Traits, _Allocator>::__assign_external(
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s, size_type __n)
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::assign received nullptr");
+    _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string::assign received nullptr");
     return (__builtin_constant_p(__n) && __fits_in_sso(__n))
                ? __assign_short(__s, __n)
                : __assign_external(__s, __n);
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::assign(size_type __n, value_type __c)
 {
@@ -2468,7 +2468,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(size_type __n, value_type __c)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::operator=(value_type __c)
 {
@@ -2490,7 +2490,7 @@ basic_string<_CharT, _Traits, _Allocator>::operator=(value_type __c)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::operator=(const basic_string& __str)
 {
@@ -2509,10 +2509,10 @@ basic_string<_CharT, _Traits, _Allocator>::operator=(const basic_string& __str)
   return *this;
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, false_type)
     _NOEXCEPT_(__alloc_traits::is_always_equal::value)
@@ -2524,10 +2524,10 @@ basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, fa
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, true_type)
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     _NOEXCEPT
 #else
     _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
@@ -2536,7 +2536,7 @@ basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, tr
   if (__is_long()) {
     __alloc_traits::deallocate(__alloc(), __get_long_pointer(),
                                __get_long_cap());
-#if _LIBCPP_STD_VER <= 14
+#if _LIBCUDACXX_STD_VER <= 14
     if (!is_nothrow_move_assignable<allocator_type>::value) {
       __set_short_size(0);
       traits_type::assign(__get_short_pointer()[0], value_type());
@@ -2545,7 +2545,7 @@ basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, tr
   }
   __move_assign_alloc(__str);
   __r_.first() = __str.__r_.first();
-  if (__libcpp_is_constant_evaluated()) {
+  if (__LIBCUDACXX_is_constant_evaluated()) {
     __str.__default_init();
   } else {
     __str.__set_short_size(0);
@@ -2554,7 +2554,7 @@ basic_string<_CharT, _Traits, _Allocator>::__move_assign(basic_string& __str, tr
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::operator=(basic_string&& __str)
     _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
@@ -2568,7 +2568,7 @@ basic_string<_CharT, _Traits, _Allocator>::operator=(basic_string&& __str)
 
 template <class _CharT, class _Traits, class _Allocator>
 template<class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
      __is_exactly_cpp17_input_iterator<_InputIterator>::value,
@@ -2583,7 +2583,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(_InputIterator __first, _Input
 
 template <class _CharT, class _Traits, class _Allocator>
 template<class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -2619,7 +2619,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(_ForwardIterator __first, _For
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, size_type __pos, size_type __n)
 {
@@ -2631,7 +2631,7 @@ basic_string<_CharT, _Traits, _Allocator>::assign(const basic_string& __str, siz
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
@@ -2649,18 +2649,18 @@ basic_string<_CharT, _Traits, _Allocator>::assign(const _Tp & __t, size_type __p
 
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::__assign_external(const value_type* __s) {
   return __assign_external(__s, traits_type::length(__s));
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::assign received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::assign received nullptr");
     return __builtin_constant_p(*__s)
                ? (__fits_in_sso(traits_type::length(__s))
                       ? __assign_short(__s, traits_type::length(__s))
@@ -2670,11 +2670,11 @@ basic_string<_CharT, _Traits, _Allocator>::assign(const value_type* __s)
 // append
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_type __n)
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::append received nullptr");
+    _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string::append received nullptr");
     size_type __cap = capacity();
     size_type __sz = size();
     if (__cap - __sz >= __n)
@@ -2694,7 +2694,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s, size_ty
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::append(size_type __n, value_type __c)
 {
@@ -2714,7 +2714,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(size_type __n, value_type __c)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 inline void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 inline void
 basic_string<_CharT, _Traits, _Allocator>::__append_default_init(size_type __n)
 {
     if (__n)
@@ -2731,7 +2731,7 @@ basic_string<_CharT, _Traits, _Allocator>::__append_default_init(size_type __n)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::push_back(value_type __c)
 {
@@ -2770,7 +2770,7 @@ basic_string<_CharT, _Traits, _Allocator>::push_back(value_type __c)
 
 template <class _CharT, class _Traits, class _Allocator>
 template<class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -2805,7 +2805,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str)
 {
@@ -2813,7 +2813,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str, size_type __pos, size_type __n)
 {
@@ -2825,7 +2825,7 @@ basic_string<_CharT, _Traits, _Allocator>::append(const basic_string& __str, siz
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __enable_if_t
     <
         __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value  && !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
@@ -2841,27 +2841,27 @@ basic_string<_CharT, _Traits, _Allocator>::append(const _Tp & __t, size_type __p
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::append(const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::append received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::append received nullptr");
     return append(__s, traits_type::length(__s));
 }
 
 // insert
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s, size_type __n)
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::insert received nullptr");
+    _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string::insert received nullptr");
     size_type __sz = size();
     if (__pos > __sz)
         __throw_out_of_range();
     size_type __cap = capacity();
-    if (__libcpp_is_constant_evaluated()) {
+    if (__LIBCUDACXX_is_constant_evaluated()) {
         if (__cap - __sz >= __n)
             __grow_by_and_replace(__cap, 0, __sz, __pos, 0, __n, __s);
         else
@@ -2892,7 +2892,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_t
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, size_type __n, value_type __c)
 {
@@ -2925,7 +2925,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, size_type __n
 
 template <class _CharT, class _Traits, class _Allocator>
 template<class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
    __is_exactly_cpp17_input_iterator<_InputIterator>::value,
@@ -2933,7 +2933,7 @@ __enable_if_t
 >
 basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _InputIterator __first, _InputIterator __last)
 {
-  _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
+  _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
                        "string::insert(iterator, range) called with an iterator not"
                        " referring to this string");
   const basic_string __temp(__first, __last, __alloc());
@@ -2942,7 +2942,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _InputIt
 
 template <class _CharT, class _Traits, class _Allocator>
 template<class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -2950,7 +2950,7 @@ __enable_if_t
 >
 basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _ForwardIterator __first, _ForwardIterator __last)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
                          "string::insert(iterator, range) called with an iterator not referring to this string");
 
     size_type __ip = static_cast<size_type>(__pos - begin());
@@ -2970,7 +2970,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, _Forward
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const basic_string& __str)
 {
@@ -2978,7 +2978,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const basic_
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const basic_string& __str,
                                                   size_type __pos2, size_type __n)
@@ -2991,7 +2991,7 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const basic_
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value  && !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
@@ -3008,20 +3008,20 @@ basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos1, const _Tp& _
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::insert(size_type __pos, const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::insert received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::insert received nullptr");
     return insert(__pos, __s, traits_type::length(__s));
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::iterator
 basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, value_type __c)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
                          "string::insert(iterator, character) called with an iterator not"
                          " referring to this string");
 
@@ -3048,11 +3048,11 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, value_ty
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::iterator
 basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, size_type __n, value_type __c)
 {
-  _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
+  _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
                        "string::insert(iterator, n, value) called with an iterator not"
                        " referring to this string");
   
diff erence_type __p = __pos - begin();
@@ -3063,12 +3063,12 @@ basic_string<_CharT, _Traits, _Allocator>::insert(const_iterator __pos, size_typ
 // replace
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s, size_type __n2)
-    _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
+    _LIBCUDACXX_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK
 {
-    _LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::replace received nullptr");
+    _LIBCUDACXX_ASSERT(__n2 == 0 || __s != nullptr, "string::replace received nullptr");
     size_type __sz = size();
     if (__pos > __sz)
         __throw_out_of_range();
@@ -3076,7 +3076,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __
     size_type __cap = capacity();
     if (__cap - __sz + __n1 >= __n2)
     {
-        if (__libcpp_is_constant_evaluated()) {
+        if (__LIBCUDACXX_is_constant_evaluated()) {
             __grow_by_and_replace(__cap, 0, __sz, __pos, __n1, __n2, __s);
             return *this;
         }
@@ -3117,7 +3117,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, size_type __n2, value_type __c)
 {
@@ -3148,7 +3148,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __
 
 template <class _CharT, class _Traits, class _Allocator>
 template<class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __is_cpp17_input_iterator<_InputIterator>::value,
@@ -3162,7 +3162,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_it
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos1, size_type __n1, const basic_string& __str)
 {
@@ -3170,7 +3170,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos1, size_type _
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos1, size_type __n1, const basic_string& __str,
                                                    size_type __pos2, size_type __n2)
@@ -3183,7 +3183,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos1, size_type _
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value && !__is_same_uncvref<_Tp, basic_string<_CharT, _Traits, _Allocator> >::value,
@@ -3200,16 +3200,16 @@ basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos1, size_type _
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(size_type __pos, size_type __n1, const value_type* __s)
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::replace received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::replace received nullptr");
     return replace(__pos, __n1, __s, traits_type::length(__s));
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_iterator __i2, const basic_string& __str)
 {
@@ -3218,7 +3218,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_it
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_iterator __i2, const value_type* __s, size_type __n)
 {
@@ -3226,7 +3226,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_it
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_iterator __i2, const value_type* __s)
 {
@@ -3234,7 +3234,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_it
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_iterator __i2, size_type __n, value_type __c)
 {
@@ -3246,7 +3246,7 @@ basic_string<_CharT, _Traits, _Allocator>::replace(const_iterator __i1, const_it
 // 'externally instantiated' erase() implementation, called when __n != npos.
 // Does not check __pos against size()
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::__erase_external_with_move(
     size_type __pos, size_type __n)
@@ -3264,7 +3264,7 @@ basic_string<_CharT, _Traits, _Allocator>::__erase_external_with_move(
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>&
 basic_string<_CharT, _Traits, _Allocator>::erase(size_type __pos,
                                                  size_type __n) {
@@ -3279,15 +3279,15 @@ basic_string<_CharT, _Traits, _Allocator>::erase(size_type __pos,
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::iterator
 basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __pos)
 {
-  _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
+  _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__pos) == this,
                        "string::erase(iterator) called with an iterator not"
                        " referring to this string");
 
-  _LIBCPP_ASSERT(__pos != end(), "string::erase(iterator) called with a non-dereferenceable iterator");
+  _LIBCUDACXX_ASSERT(__pos != end(), "string::erase(iterator) called with a non-dereferenceable iterator");
   iterator __b = begin();
   size_type __r = static_cast<size_type>(__pos - __b);
   erase(__r, 1);
@@ -3295,15 +3295,15 @@ basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __pos)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::iterator
 basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __first, const_iterator __last)
 {
-  _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__first) == this,
+  _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(&__first) == this,
                        "string::erase(iterator,  iterator) called with an iterator not"
                        " referring to this string");
 
-  _LIBCPP_ASSERT(__first <= __last, "string::erase(first, last) called with invalid range");
+  _LIBCUDACXX_ASSERT(__first <= __last, "string::erase(first, last) called with invalid range");
   iterator __b = begin();
   size_type __r = static_cast<size_type>(__first - __b);
   erase(__r, static_cast<size_type>(__last - __first));
@@ -3311,16 +3311,16 @@ basic_string<_CharT, _Traits, _Allocator>::erase(const_iterator __first, const_i
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::pop_back()
 {
-    _LIBCPP_ASSERT(!empty(), "string::pop_back(): string is already empty");
+    _LIBCUDACXX_ASSERT(!empty(), "string::pop_back(): string is already empty");
     __erase_to_end(size() - 1);
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::clear() _NOEXCEPT
 {
@@ -3338,7 +3338,7 @@ basic_string<_CharT, _Traits, _Allocator>::clear() _NOEXCEPT
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::__erase_to_end(size_type __pos)
 {
@@ -3346,7 +3346,7 @@ basic_string<_CharT, _Traits, _Allocator>::__erase_to_end(size_type __pos)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::resize(size_type __n, value_type __c)
 {
@@ -3358,7 +3358,7 @@ basic_string<_CharT, _Traits, _Allocator>::resize(size_type __n, value_type __c)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 inline void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 inline void
 basic_string<_CharT, _Traits, _Allocator>::__resize_default_init(size_type __n)
 {
     size_type __sz = size();
@@ -3369,7 +3369,7 @@ basic_string<_CharT, _Traits, _Allocator>::__resize_default_init(size_type __n)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::max_size() const _NOEXCEPT
 {
@@ -3383,7 +3383,7 @@ basic_string<_CharT, _Traits, _Allocator>::max_size() const _NOEXCEPT
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __requested_capacity)
 {
@@ -3404,7 +3404,7 @@ basic_string<_CharT, _Traits, _Allocator>::reserve(size_type __requested_capacit
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::shrink_to_fit() _NOEXCEPT
 {
@@ -3415,7 +3415,7 @@ basic_string<_CharT, _Traits, _Allocator>::shrink_to_fit() _NOEXCEPT
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target_capacity)
 {
@@ -3440,23 +3440,23 @@ basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target
         }
         else
         {
-        #ifndef _LIBCPP_NO_EXCEPTIONS
+        #ifndef _LIBCUDACXX_NO_EXCEPTIONS
             try
             {
-        #endif // _LIBCPP_NO_EXCEPTIONS
+        #endif // _LIBCUDACXX_NO_EXCEPTIONS
                 auto __allocation = std::__allocate_at_least(__alloc(), __target_capacity + 1);
                 __new_data = __allocation.ptr;
                 __target_capacity = __allocation.count - 1;
-        #ifndef _LIBCPP_NO_EXCEPTIONS
+        #ifndef _LIBCUDACXX_NO_EXCEPTIONS
             }
             catch (...)
             {
                 return;
             }
-        #else  // _LIBCPP_NO_EXCEPTIONS
+        #else  // _LIBCUDACXX_NO_EXCEPTIONS
             if (__new_data == nullptr)
                 return;
-        #endif // _LIBCPP_NO_EXCEPTIONS
+        #endif // _LIBCUDACXX_NO_EXCEPTIONS
         }
         __begin_lifetime(__new_data, __target_capacity + 1);
         __now_long = true;
@@ -3479,25 +3479,25 @@ basic_string<_CharT, _Traits, _Allocator>::__shrink_or_extend(size_type __target
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::const_reference
 basic_string<_CharT, _Traits, _Allocator>::operator[](size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__pos <= size(), "string index out of bounds");
+    _LIBCUDACXX_ASSERT(__pos <= size(), "string index out of bounds");
     return *(data() + __pos);
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::reference
 basic_string<_CharT, _Traits, _Allocator>::operator[](size_type __pos) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__pos <= size(), "string index out of bounds");
+    _LIBCUDACXX_ASSERT(__pos <= size(), "string index out of bounds");
     return *(__get_pointer() + __pos);
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::const_reference
 basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) const
 {
@@ -3507,7 +3507,7 @@ basic_string<_CharT, _Traits, _Allocator>::at(size_type __n) const
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::reference
 basic_string<_CharT, _Traits, _Allocator>::at(size_type __n)
 {
@@ -3517,43 +3517,43 @@ basic_string<_CharT, _Traits, _Allocator>::at(size_type __n)
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::reference
 basic_string<_CharT, _Traits, _Allocator>::front() _NOEXCEPT
 {
-    _LIBCPP_ASSERT(!empty(), "string::front(): string is empty");
+    _LIBCUDACXX_ASSERT(!empty(), "string::front(): string is empty");
     return *__get_pointer();
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::const_reference
 basic_string<_CharT, _Traits, _Allocator>::front() const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(!empty(), "string::front(): string is empty");
+    _LIBCUDACXX_ASSERT(!empty(), "string::front(): string is empty");
     return *data();
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::reference
 basic_string<_CharT, _Traits, _Allocator>::back() _NOEXCEPT
 {
-    _LIBCPP_ASSERT(!empty(), "string::back(): string is empty");
+    _LIBCUDACXX_ASSERT(!empty(), "string::back(): string is empty");
     return *(__get_pointer() + size() - 1);
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::const_reference
 basic_string<_CharT, _Traits, _Allocator>::back() const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(!empty(), "string::back(): string is empty");
+    _LIBCUDACXX_ASSERT(!empty(), "string::back(): string is empty");
     return *(data() + size() - 1);
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::copy(value_type* __s, size_type __n, size_type __pos) const
 {
@@ -3566,7 +3566,7 @@ basic_string<_CharT, _Traits, _Allocator>::copy(value_type* __s, size_type __n,
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 basic_string<_CharT, _Traits, _Allocator>::substr(size_type __pos, size_type __n) const
 {
@@ -3574,10 +3574,10 @@ basic_string<_CharT, _Traits, _Allocator>::substr(size_type __pos, size_type __n
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT
 #else
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
@@ -3590,7 +3590,7 @@ basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str)
         std::__debug_db_invalidate_all(&__str);
     std::__debug_db_swap(this, &__str);
 
-    _LIBCPP_ASSERT(
+    _LIBCUDACXX_ASSERT(
         __alloc_traits::propagate_on_container_swap::value ||
         __alloc_traits::is_always_equal::value ||
         __alloc() == __str.__alloc(), "swapping non-equal allocators");
@@ -3601,28 +3601,28 @@ basic_string<_CharT, _Traits, _Allocator>::swap(basic_string& __str)
 // find
 
 template <class _Traits>
-struct _LIBCPP_HIDDEN __traits_eq
+struct _LIBCUDACXX_HIDDEN __traits_eq
 {
     typedef typename _Traits::char_type char_type;
-    _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_HIDE_FROM_ABI
     bool operator()(const char_type& __x, const char_type& __y) _NOEXCEPT
         {return _Traits::eq(__x, __y);}
 };
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
                                                 size_type __pos,
                                                 size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find(): received nullptr");
+    _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string::find(): received nullptr");
     return __str_find<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find(const basic_string& __str,
                                                 size_type __pos) const _NOEXCEPT
@@ -3633,7 +3633,7 @@ basic_string<_CharT, _Traits, _Allocator>::find(const basic_string& __str,
 
 template<class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3648,18 +3648,18 @@ basic_string<_CharT, _Traits, _Allocator>::find(const _Tp &__t,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find(const value_type* __s,
                                                 size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find(): received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::find(): received nullptr");
     return __str_find<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find(value_type __c,
                                                 size_type __pos) const _NOEXCEPT
@@ -3671,19 +3671,19 @@ basic_string<_CharT, _Traits, _Allocator>::find(value_type __c,
 // rfind
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
                                                  size_type __pos,
                                                  size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::rfind(): received nullptr");
+    _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string::rfind(): received nullptr");
     return __str_rfind<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::rfind(const basic_string& __str,
                                                  size_type __pos) const _NOEXCEPT
@@ -3694,7 +3694,7 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(const basic_string& __str,
 
 template<class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3709,18 +3709,18 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(const _Tp& __t,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::rfind(const value_type* __s,
                                                  size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::rfind(): received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::rfind(): received nullptr");
     return __str_rfind<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::rfind(value_type __c,
                                                  size_type __pos) const _NOEXCEPT
@@ -3732,19 +3732,19 @@ basic_string<_CharT, _Traits, _Allocator>::rfind(value_type __c,
 // find_first_of
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
                                                          size_type __pos,
                                                          size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_of(): received nullptr");
+    _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string::find_first_of(): received nullptr");
     return __str_find_first_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_first_of(const basic_string& __str,
                                                          size_type __pos) const _NOEXCEPT
@@ -3755,7 +3755,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(const basic_string& __s
 
 template<class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3770,18 +3770,18 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(const _Tp& __t,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_first_of(const value_type* __s,
                                                          size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_first_of(): received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::find_first_of(): received nullptr");
     return __str_find_first_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_first_of(value_type __c,
                                                          size_type __pos) const _NOEXCEPT
@@ -3792,19 +3792,19 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_of(value_type __c,
 // find_last_of
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
                                                         size_type __pos,
                                                         size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_of(): received nullptr");
+    _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string::find_last_of(): received nullptr");
     return __str_find_last_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_last_of(const basic_string& __str,
                                                         size_type __pos) const _NOEXCEPT
@@ -3815,7 +3815,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(const basic_string& __st
 
 template<class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3830,18 +3830,18 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(const _Tp& __t,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_last_of(const value_type* __s,
                                                         size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_last_of(): received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::find_last_of(): received nullptr");
     return __str_find_last_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_last_of(value_type __c,
                                                         size_type __pos) const _NOEXCEPT
@@ -3852,19 +3852,19 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_of(value_type __c,
 // find_first_not_of
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* __s,
                                                              size_type __pos,
                                                              size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_first_not_of(): received nullptr");
+    _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string::find_first_not_of(): received nullptr");
     return __str_find_first_not_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const basic_string& __str,
                                                              size_type __pos) const _NOEXCEPT
@@ -3875,7 +3875,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const basic_string&
 
 template<class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3890,18 +3890,18 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const _Tp& __t,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(const value_type* __s,
                                                              size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_first_not_of(): received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::find_first_not_of(): received nullptr");
     return __str_find_first_not_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(value_type __c,
                                                              size_type __pos) const _NOEXCEPT
@@ -3913,19 +3913,19 @@ basic_string<_CharT, _Traits, _Allocator>::find_first_not_of(value_type __c,
 // find_last_not_of
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __s,
                                                             size_type __pos,
                                                             size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string::find_last_not_of(): received nullptr");
+    _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string::find_last_not_of(): received nullptr");
     return __str_find_last_not_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, __n);
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const basic_string& __str,
                                                             size_type __pos) const _NOEXCEPT
@@ -3936,7 +3936,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const basic_string&
 
 template<class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3951,18 +3951,18 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const _Tp& __t,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(const value_type* __s,
                                                             size_type __pos) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::find_last_not_of(): received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::find_last_not_of(): received nullptr");
     return __str_find_last_not_of<value_type, size_type, traits_type, npos>
         (data(), size(), __s, __pos, traits_type::length(__s));
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename basic_string<_CharT, _Traits, _Allocator>::size_type
 basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(value_type __c,
                                                             size_type __pos) const _NOEXCEPT
@@ -3975,7 +3975,7 @@ basic_string<_CharT, _Traits, _Allocator>::find_last_not_of(value_type __c,
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -3998,7 +3998,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(const _Tp& __t) const _NOEXCE
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 int
 basic_string<_CharT, _Traits, _Allocator>::compare(const basic_string& __str) const _NOEXCEPT
 {
@@ -4006,14 +4006,14 @@ basic_string<_CharT, _Traits, _Allocator>::compare(const basic_string& __str) co
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 int
 basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
                                                    size_type __n1,
                                                    const value_type* __s,
                                                    size_type __n2) const
 {
-    _LIBCPP_ASSERT(__n2 == 0 || __s != nullptr, "string::compare(): received nullptr");
+    _LIBCUDACXX_ASSERT(__n2 == 0 || __s != nullptr, "string::compare(): received nullptr");
     size_type __sz = size();
     if (__pos1 > __sz || __n2 == npos)
         __throw_out_of_range();
@@ -4031,7 +4031,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value,
@@ -4046,7 +4046,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 int
 basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
                                                    size_type __n1,
@@ -4057,7 +4057,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
 
 template <class _CharT, class _Traits, class _Allocator>
 template <class _Tp>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t
 <
     __can_be_converted_to_string_view<_CharT, _Traits, _Tp>::value
@@ -4075,7 +4075,7 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 int
 basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
                                                    size_type __n1,
@@ -4087,29 +4087,29 @@ basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 int
 basic_string<_CharT, _Traits, _Allocator>::compare(const value_type* __s) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::compare(): received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::compare(): received nullptr");
     return compare(0, npos, __s, traits_type::length(__s));
 }
 
 template <class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 int
 basic_string<_CharT, _Traits, _Allocator>::compare(size_type __pos1,
                                                    size_type __n1,
                                                    const value_type* __s) const
 {
-    _LIBCPP_ASSERT(__s != nullptr, "string::compare(): received nullptr");
+    _LIBCUDACXX_ASSERT(__s != nullptr, "string::compare(): received nullptr");
     return compare(__pos1, __n1, __s, traits_type::length(__s));
 }
 
 // __invariants
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 basic_string<_CharT, _Traits, _Allocator>::__invariants() const
 {
@@ -4127,7 +4127,7 @@ basic_string<_CharT, _Traits, _Allocator>::__invariants() const
 // __clear_and_shrink
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT
 {
@@ -4144,7 +4144,7 @@ basic_string<_CharT, _Traits, _Allocator>::__clear_and_shrink() _NOEXCEPT
 // operator==
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator==(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4156,7 +4156,7 @@ operator==(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
 }
 
 template<class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator==(const basic_string<char, char_traits<char>, _Allocator>& __lhs,
            const basic_string<char, char_traits<char>, _Allocator>& __rhs) _NOEXCEPT
@@ -4175,33 +4175,33 @@ operator==(const basic_string<char, char_traits<char>, _Allocator>& __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator==(const _CharT* __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
 {
     typedef basic_string<_CharT, _Traits, _Allocator> _String;
-    _LIBCPP_ASSERT(__lhs != nullptr, "operator==(char*, basic_string): received nullptr");
+    _LIBCUDACXX_ASSERT(__lhs != nullptr, "operator==(char*, basic_string): received nullptr");
     size_t __lhs_len = _Traits::length(__lhs);
     if (__lhs_len != __rhs.size()) return false;
     return __rhs.compare(0, _String::npos, __lhs, __lhs_len) == 0;
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator==(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
            const _CharT* __rhs) _NOEXCEPT
 {
     typedef basic_string<_CharT, _Traits, _Allocator> _String;
-    _LIBCPP_ASSERT(__rhs != nullptr, "operator==(basic_string, char*): received nullptr");
+    _LIBCUDACXX_ASSERT(__rhs != nullptr, "operator==(basic_string, char*): received nullptr");
     size_t __rhs_len = _Traits::length(__rhs);
     if (__rhs_len != __lhs.size()) return false;
     return __lhs.compare(0, _String::npos, __rhs, __rhs_len) == 0;
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4210,7 +4210,7 @@ operator!=(const basic_string<_CharT,_Traits,_Allocator>& __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator!=(const _CharT* __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4219,7 +4219,7 @@ operator!=(const _CharT* __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator!=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const _CharT* __rhs) _NOEXCEPT
@@ -4230,7 +4230,7 @@ operator!=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
 // operator<
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4239,7 +4239,7 @@ operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const _CharT* __rhs) _NOEXCEPT
@@ -4248,7 +4248,7 @@ operator< (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator< (const _CharT* __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4259,7 +4259,7 @@ operator< (const _CharT* __lhs,
 // operator>
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4268,7 +4268,7 @@ operator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const _CharT* __rhs) _NOEXCEPT
@@ -4277,7 +4277,7 @@ operator> (const basic_string<_CharT, _Traits, _Allocator>& __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator> (const _CharT* __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4288,7 +4288,7 @@ operator> (const _CharT* __lhs,
 // operator<=
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator<=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4297,7 +4297,7 @@ operator<=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator<=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const _CharT* __rhs) _NOEXCEPT
@@ -4306,7 +4306,7 @@ operator<=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator<=(const _CharT* __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4317,7 +4317,7 @@ operator<=(const _CharT* __lhs,
 // operator>=
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator>=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4326,7 +4326,7 @@ operator>=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator>=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
            const _CharT* __rhs) _NOEXCEPT
@@ -4335,7 +4335,7 @@ operator>=(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI
 bool
 operator>=(const _CharT* __lhs,
            const basic_string<_CharT, _Traits, _Allocator>& __rhs) _NOEXCEPT
@@ -4346,7 +4346,7 @@ operator>=(const _CharT* __lhs,
 // operator +
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
           const basic_string<_CharT, _Traits, _Allocator>& __rhs)
@@ -4365,7 +4365,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs,
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(const _CharT* __lhs , const basic_string<_CharT,_Traits,_Allocator>& __rhs)
 {
@@ -4383,7 +4383,7 @@ operator+(const _CharT* __lhs , const basic_string<_CharT,_Traits,_Allocator>& _
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Allocator>& __rhs)
 {
@@ -4400,7 +4400,7 @@ operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Allocator>& __rhs)
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT* __rhs)
 {
@@ -4418,7 +4418,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, const _CharT*
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs)
 {
@@ -4434,10 +4434,10 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, _CharT __rhs)
     return __r;
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const basic_string<_CharT, _Traits, _Allocator>& __rhs)
 {
@@ -4445,7 +4445,7 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const basic_string<
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs)
 {
@@ -4453,7 +4453,7 @@ operator+(const basic_string<_CharT, _Traits, _Allocator>& __lhs, basic_string<_
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, basic_string<_CharT, _Traits, _Allocator>&& __rhs)
 {
@@ -4461,7 +4461,7 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, basic_string<_CharT
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(const _CharT* __lhs , basic_string<_CharT,_Traits,_Allocator>&& __rhs)
 {
@@ -4469,7 +4469,7 @@ operator+(const _CharT* __lhs , basic_string<_CharT,_Traits,_Allocator>&& __rhs)
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(_CharT __lhs, basic_string<_CharT,_Traits,_Allocator>&& __rhs)
 {
@@ -4478,7 +4478,7 @@ operator+(_CharT __lhs, basic_string<_CharT,_Traits,_Allocator>&& __rhs)
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const _CharT* __rhs)
 {
@@ -4486,7 +4486,7 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, const _CharT* __rhs
 }
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 basic_string<_CharT, _Traits, _Allocator>
 operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs)
 {
@@ -4494,12 +4494,12 @@ operator+(basic_string<_CharT, _Traits, _Allocator>&& __lhs, _CharT __rhs)
     return std::move(__lhs);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 // swap
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 swap(basic_string<_CharT, _Traits, _Allocator>& __lhs,
      basic_string<_CharT, _Traits, _Allocator>& __rhs)
@@ -4508,55 +4508,55 @@ swap(basic_string<_CharT, _Traits, _Allocator>& __lhs,
     __lhs.swap(__rhs);
 }
 
-_LIBCPP_FUNC_VIS int                stoi  (const string& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS long               stol  (const string& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS unsigned long      stoul (const string& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS long long          stoll (const string& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS unsigned long long stoull(const string& __str, size_t* __idx = nullptr, int __base = 10);
-
-_LIBCPP_FUNC_VIS float       stof (const string& __str, size_t* __idx = nullptr);
-_LIBCPP_FUNC_VIS double      stod (const string& __str, size_t* __idx = nullptr);
-_LIBCPP_FUNC_VIS long double stold(const string& __str, size_t* __idx = nullptr);
-
-_LIBCPP_FUNC_VIS string to_string(int __val);
-_LIBCPP_FUNC_VIS string to_string(unsigned __val);
-_LIBCPP_FUNC_VIS string to_string(long __val);
-_LIBCPP_FUNC_VIS string to_string(unsigned long __val);
-_LIBCPP_FUNC_VIS string to_string(long long __val);
-_LIBCPP_FUNC_VIS string to_string(unsigned long long __val);
-_LIBCPP_FUNC_VIS string to_string(float __val);
-_LIBCPP_FUNC_VIS string to_string(double __val);
-_LIBCPP_FUNC_VIS string to_string(long double __val);
-
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_LIBCPP_FUNC_VIS int                stoi  (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS long               stol  (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS unsigned long      stoul (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS long long          stoll (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
-_LIBCPP_FUNC_VIS unsigned long long stoull(const wstring& __str, size_t* __idx = nullptr, int __base = 10);
-
-_LIBCPP_FUNC_VIS float       stof (const wstring& __str, size_t* __idx = nullptr);
-_LIBCPP_FUNC_VIS double      stod (const wstring& __str, size_t* __idx = nullptr);
-_LIBCPP_FUNC_VIS long double stold(const wstring& __str, size_t* __idx = nullptr);
-
-_LIBCPP_FUNC_VIS wstring to_wstring(int __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(unsigned __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(long __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(unsigned long __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(long long __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(unsigned long long __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(float __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(double __val);
-_LIBCPP_FUNC_VIS wstring to_wstring(long double __val);
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+_LIBCUDACXX_FUNC_VIS int                stoi  (const string& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCUDACXX_FUNC_VIS long               stol  (const string& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCUDACXX_FUNC_VIS unsigned long      stoul (const string& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCUDACXX_FUNC_VIS long long          stoll (const string& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCUDACXX_FUNC_VIS unsigned long long stoull(const string& __str, size_t* __idx = nullptr, int __base = 10);
+
+_LIBCUDACXX_FUNC_VIS float       stof (const string& __str, size_t* __idx = nullptr);
+_LIBCUDACXX_FUNC_VIS double      stod (const string& __str, size_t* __idx = nullptr);
+_LIBCUDACXX_FUNC_VIS long double stold(const string& __str, size_t* __idx = nullptr);
+
+_LIBCUDACXX_FUNC_VIS string to_string(int __val);
+_LIBCUDACXX_FUNC_VIS string to_string(unsigned __val);
+_LIBCUDACXX_FUNC_VIS string to_string(long __val);
+_LIBCUDACXX_FUNC_VIS string to_string(unsigned long __val);
+_LIBCUDACXX_FUNC_VIS string to_string(long long __val);
+_LIBCUDACXX_FUNC_VIS string to_string(unsigned long long __val);
+_LIBCUDACXX_FUNC_VIS string to_string(float __val);
+_LIBCUDACXX_FUNC_VIS string to_string(double __val);
+_LIBCUDACXX_FUNC_VIS string to_string(long double __val);
+
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+_LIBCUDACXX_FUNC_VIS int                stoi  (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCUDACXX_FUNC_VIS long               stol  (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCUDACXX_FUNC_VIS unsigned long      stoul (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCUDACXX_FUNC_VIS long long          stoll (const wstring& __str, size_t* __idx = nullptr, int __base = 10);
+_LIBCUDACXX_FUNC_VIS unsigned long long stoull(const wstring& __str, size_t* __idx = nullptr, int __base = 10);
+
+_LIBCUDACXX_FUNC_VIS float       stof (const wstring& __str, size_t* __idx = nullptr);
+_LIBCUDACXX_FUNC_VIS double      stod (const wstring& __str, size_t* __idx = nullptr);
+_LIBCUDACXX_FUNC_VIS long double stold(const wstring& __str, size_t* __idx = nullptr);
+
+_LIBCUDACXX_FUNC_VIS wstring to_wstring(int __val);
+_LIBCUDACXX_FUNC_VIS wstring to_wstring(unsigned __val);
+_LIBCUDACXX_FUNC_VIS wstring to_wstring(long __val);
+_LIBCUDACXX_FUNC_VIS wstring to_wstring(unsigned long __val);
+_LIBCUDACXX_FUNC_VIS wstring to_wstring(long long __val);
+_LIBCUDACXX_FUNC_VIS wstring to_wstring(unsigned long long __val);
+_LIBCUDACXX_FUNC_VIS wstring to_wstring(float __val);
+_LIBCUDACXX_FUNC_VIS wstring to_wstring(double __val);
+_LIBCUDACXX_FUNC_VIS wstring to_wstring(long double __val);
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 template<class _CharT, class _Traits, class _Allocator>
-_LIBCPP_TEMPLATE_DATA_VIS
+_LIBCUDACXX_TEMPLATE_DATA_VIS
 const typename basic_string<_CharT, _Traits, _Allocator>::size_type
                basic_string<_CharT, _Traits, _Allocator>::npos;
 
 template <class _CharT, class _Allocator>
-struct _LIBCPP_TEMPLATE_VIS
+struct _LIBCUDACXX_TEMPLATE_VIS
     hash<basic_string<_CharT, char_traits<_CharT>, _Allocator> >
     : public __unary_function<basic_string<_CharT, char_traits<_CharT>, _Allocator>, size_t>
 {
@@ -4581,26 +4581,26 @@ getline(basic_istream<_CharT, _Traits>& __is,
         basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm);
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 basic_istream<_CharT, _Traits>&
 getline(basic_istream<_CharT, _Traits>& __is,
         basic_string<_CharT, _Traits, _Allocator>& __str);
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 basic_istream<_CharT, _Traits>&
 getline(basic_istream<_CharT, _Traits>&& __is,
         basic_string<_CharT, _Traits, _Allocator>& __str, _CharT __dlm);
 
 template<class _CharT, class _Traits, class _Allocator>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
 basic_istream<_CharT, _Traits>&
 getline(basic_istream<_CharT, _Traits>&& __is,
         basic_string<_CharT, _Traits, _Allocator>& __str);
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _CharT, class _Traits, class _Allocator, class _Up>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
     typename basic_string<_CharT, _Traits, _Allocator>::size_type
     erase(basic_string<_CharT, _Traits, _Allocator>& __str, const _Up& __v) {
   auto __old_size = __str.size();
@@ -4609,7 +4609,7 @@ inline _LIBCPP_HIDE_FROM_ABI
 }
 
 template <class _CharT, class _Traits, class _Allocator, class _Predicate>
-inline _LIBCPP_HIDE_FROM_ABI
+inline _LIBCUDACXX_HIDE_FROM_ABI
     typename basic_string<_CharT, _Traits, _Allocator>::size_type
     erase_if(basic_string<_CharT, _Traits, _Allocator>& __str,
              _Predicate __pred) {
@@ -4620,7 +4620,7 @@ inline _LIBCPP_HIDE_FROM_ABI
 }
 #endif
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 template<class _CharT, class _Traits, class _Allocator>
 bool
@@ -4654,43 +4654,43 @@ basic_string<_CharT, _Traits, _Allocator>::__subscriptable(const const_iterator*
     return data() <= __p && __p < data() + size();
 }
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 // Literal suffixes for basic_string [basic.string.literals]
 inline namespace literals
 {
   inline namespace string_literals
   {
-    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string<char> operator "" s( const char *__str, size_t __len )
     {
         return basic_string<char> (__str, __len);
     }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+    inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string<wchar_t> operator "" s( const wchar_t *__str, size_t __len )
     {
         return basic_string<wchar_t> (__str, __len);
     }
 #endif
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-    inline _LIBCPP_HIDE_FROM_ABI constexpr
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
+    inline _LIBCUDACXX_HIDE_FROM_ABI constexpr
     basic_string<char8_t> operator "" s(const char8_t *__str, size_t __len) _NOEXCEPT
     {
         return basic_string<char8_t> (__str, __len);
     }
 #endif
 
-    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string<char16_t> operator "" s( const char16_t *__str, size_t __len )
     {
         return basic_string<char16_t> (__str, __len);
     }
 
-    inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17
+    inline _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     basic_string<char32_t> operator "" s( const char32_t *__str, size_t __len )
     {
         return basic_string<char32_t> (__str, __len);
@@ -4698,10 +4698,10 @@ inline namespace literals
   } // namespace string_literals
 } // namespace literals
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <>
 inline constexpr bool __format::__enable_insertable<std::basic_string<char>> = true;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 inline constexpr bool __format::__enable_insertable<std::basic_string<wchar_t>> = true;
 #endif
@@ -4709,8 +4709,8 @@ inline constexpr bool __format::__enable_insertable<std::basic_string<wchar_t>>
 
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_STRING
+#endif // _LIBCUDACXX_STRING

diff  --git a/libcxx/include/string.h b/libcxx/include/string.h
index 082c632a29bc..3bc60bde9e66 100644
--- a/libcxx/include/string.h
+++ b/libcxx/include/string.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_STRING_H
-#define _LIBCPP_STRING_H
+#ifndef _LIBCUDACXX_STRING_H
+#define _LIBCUDACXX_STRING_H
 
 /*
     string.h synopsis
@@ -53,7 +53,7 @@ size_t strlen(const char* s);
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -62,48 +62,48 @@ size_t strlen(const char* s);
 // MSVCRT, GNU libc and its derivates may already have the correct prototype in
 // <string.h>. This macro can be defined by users if their C library provides
 // the right signature.
-#if defined(__CORRECT_ISO_CPP_STRING_H_PROTO) || defined(_LIBCPP_MSVCRT) || \
+#if defined(__CORRECT_ISO_CPP_STRING_H_PROTO) || defined(_LIBCUDACXX_MSVCRT) || \
     defined(__sun__) || defined(_STRING_H_CPLUSPLUS_98_CONFORMANCE_)
-#define _LIBCPP_STRING_H_HAS_CONST_OVERLOADS
+#define _LIBCUDACXX_STRING_H_HAS_CONST_OVERLOADS
 #endif
 
-#if defined(__cplusplus) && !defined(_LIBCPP_STRING_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
+#if defined(__cplusplus) && !defined(_LIBCUDACXX_STRING_H_HAS_CONST_OVERLOADS) && defined(_LIBCUDACXX_PREFERRED_OVERLOAD)
 extern "C++" {
-inline _LIBCPP_INLINE_VISIBILITY
-char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-      char* strchr(      char* __s, int __c) {return __libcpp_strchr(__s, __c);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-char* __libcpp_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const char* strpbrk(const char* __s1, const char* __s2) {return __libcpp_strpbrk(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-      char* strpbrk(      char* __s1, const char* __s2) {return __libcpp_strpbrk(__s1, __s2);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-char* __libcpp_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const char* strrchr(const char* __s, int __c) {return __libcpp_strrchr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-      char* strrchr(      char* __s, int __c) {return __libcpp_strrchr(__s, __c);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-void* __libcpp_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const void* memchr(const void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-      void* memchr(      void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const char* strstr(const char* __s1, const char* __s2) {return __libcpp_strstr(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-      char* strstr(      char* __s1, const char* __s2) {return __libcpp_strstr(__s1, __s2);}
+inline _LIBCUDACXX_INLINE_VISIBILITY
+char* __LIBCUDACXX_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+const char* strchr(const char* __s, int __c) {return __LIBCUDACXX_strchr(__s, __c);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+      char* strchr(      char* __s, int __c) {return __LIBCUDACXX_strchr(__s, __c);}
+
+inline _LIBCUDACXX_INLINE_VISIBILITY
+char* __LIBCUDACXX_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+const char* strpbrk(const char* __s1, const char* __s2) {return __LIBCUDACXX_strpbrk(__s1, __s2);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+      char* strpbrk(      char* __s1, const char* __s2) {return __LIBCUDACXX_strpbrk(__s1, __s2);}
+
+inline _LIBCUDACXX_INLINE_VISIBILITY
+char* __LIBCUDACXX_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+const char* strrchr(const char* __s, int __c) {return __LIBCUDACXX_strrchr(__s, __c);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+      char* strrchr(      char* __s, int __c) {return __LIBCUDACXX_strrchr(__s, __c);}
+
+inline _LIBCUDACXX_INLINE_VISIBILITY
+void* __LIBCUDACXX_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+const void* memchr(const void* __s, int __c, size_t __n) {return __LIBCUDACXX_memchr(__s, __c, __n);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+      void* memchr(      void* __s, int __c, size_t __n) {return __LIBCUDACXX_memchr(__s, __c, __n);}
+
+inline _LIBCUDACXX_INLINE_VISIBILITY
+char* __LIBCUDACXX_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+const char* strstr(const char* __s1, const char* __s2) {return __LIBCUDACXX_strstr(__s1, __s2);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+      char* strstr(      char* __s1, const char* __s2) {return __LIBCUDACXX_strstr(__s1, __s2);}
 }
 #endif
 
-#endif // _LIBCPP_STRING_H
+#endif // _LIBCUDACXX_STRING_H

diff  --git a/libcxx/include/string_view b/libcxx/include/string_view
index a84ed5019614..54e584562bd0 100644
--- a/libcxx/include/string_view
+++ b/libcxx/include/string_view
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_STRING_VIEW
-#define _LIBCPP_STRING_VIEW
+#ifndef _LIBCUDACXX_STRING_VIEW
+#define _LIBCUDACXX_STRING_VIEW
 
 /*
 
@@ -218,7 +218,7 @@ namespace std {
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #  include <functional>
 #  include <iterator>
@@ -236,34 +236,34 @@ namespace std {
 // [string.view.synop]
 #include <compare>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // TODO: This is a workaround for some vendors to carry a downstream 
diff  to accept `nullptr` in
 //       string_view constructors. This can be refactored when this exact form isn't needed anymore.
 template <class _Traits>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR
 inline size_t __char_traits_length_checked(const typename _Traits::char_type* __s) _NOEXCEPT {
   // This needs to be a single statement for C++11 constexpr
-  return _LIBCPP_ASSERT(__s != nullptr, "null pointer passed to non-null argument of char_traits<...>::length"), _Traits::length(__s);
+  return _LIBCUDACXX_ASSERT(__s != nullptr, "null pointer passed to non-null argument of char_traits<...>::length"), _Traits::length(__s);
 }
 
 template<class _CharT, class _Traits>
 class
-    _LIBCPP_PREFERRED_NAME(string_view)
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-    _LIBCPP_PREFERRED_NAME(u8string_view)
+    _LIBCUDACXX_PREFERRED_NAME(string_view)
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
+    _LIBCUDACXX_PREFERRED_NAME(u8string_view)
 #endif
-    _LIBCPP_PREFERRED_NAME(u16string_view)
-    _LIBCPP_PREFERRED_NAME(u32string_view)
-    _LIBCPP_IF_WIDE_CHARACTERS(_LIBCPP_PREFERRED_NAME(wstring_view))
+    _LIBCUDACXX_PREFERRED_NAME(u16string_view)
+    _LIBCUDACXX_PREFERRED_NAME(u32string_view)
+    _LIBCUDACXX_IF_WIDE_CHARACTERS(_LIBCUDACXX_PREFERRED_NAME(wstring_view))
     basic_string_view {
 public:
     // types
@@ -275,11 +275,11 @@ public:
     typedef const _CharT&                              const_reference;
     typedef const_pointer                              const_iterator; // See [string.view.iterators]
     typedef const_iterator                             iterator;
-    typedef _VSTD::reverse_iterator<const_iterator>    const_reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<const_iterator>    const_reverse_iterator;
     typedef const_reverse_iterator                     reverse_iterator;
     typedef size_t                                     size_type;
     typedef ptr
diff _t                                  
diff erence_type;
-    static _LIBCPP_CONSTEXPR const size_type npos = -1; // size_type(-1);
+    static _LIBCUDACXX_CONSTEXPR const size_type npos = -1; // size_type(-1);
 
     static_assert((!is_array<value_type>::value), "Character type of basic_string_view must not be an array");
     static_assert(( is_standard_layout<value_type>::value), "Character type of basic_string_view must be standard-layout");
@@ -288,35 +288,35 @@ public:
                   "traits_type::char_type must be the same type as CharT");
 
     // [string.view.cons], construct/copy
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     basic_string_view() _NOEXCEPT : __data (nullptr), __size(0) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_string_view(const basic_string_view&) _NOEXCEPT = default;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     basic_string_view& operator=(const basic_string_view&) _NOEXCEPT = default;
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     basic_string_view(const _CharT* __s, size_type __len) _NOEXCEPT
         : __data(__s), __size(__len)
     {
-#if _LIBCPP_STD_VER > 11
-    _LIBCPP_ASSERT(__len == 0 || __s != nullptr, "string_view::string_view(_CharT *, size_t): received nullptr");
+#if _LIBCUDACXX_STD_VER > 11
+    _LIBCUDACXX_ASSERT(__len == 0 || __s != nullptr, "string_view::string_view(_CharT *, size_t): received nullptr");
 #endif
     }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <contiguous_iterator _It, sized_sentinel_for<_It> _End>
       requires (is_same_v<iter_value_t<_It>, _CharT> && !is_convertible_v<_End, size_type>)
-    constexpr _LIBCPP_HIDE_FROM_ABI basic_string_view(_It __begin, _End __end)
-       : __data(_VSTD::to_address(__begin)), __size(__end - __begin)
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI basic_string_view(_It __begin, _End __end)
+       : __data(_CUDA_VSTD::to_address(__begin)), __size(__end - __begin)
     {
-      _LIBCPP_ASSERT((__end - __begin) >= 0, "std::string_view::string_view(iterator, sentinel) received invalid range");
+      _LIBCUDACXX_ASSERT((__end - __begin) >= 0, "std::string_view::string_view(iterator, sentinel) received invalid range");
     }
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 20 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
     template <class _Range>
       requires (
         !is_same_v<remove_cvref_t<_Range>, basic_string_view> &&
@@ -325,69 +325,69 @@ public:
         is_same_v<ranges::range_value_t<_Range>, _CharT> &&
         !is_convertible_v<_Range, const _CharT*> &&
         (!requires(remove_cvref_t<_Range>& __d) {
-          __d.operator _VSTD::basic_string_view<_CharT, _Traits>();
+          __d.operator _CUDA_VSTD::basic_string_view<_CharT, _Traits>();
         }) &&
         (!requires {
          typename remove_reference_t<_Range>::traits_type;
         } || is_same_v<typename remove_reference_t<_Range>::traits_type, _Traits>)
       )
-    constexpr _LIBCPP_HIDE_FROM_ABI
+    constexpr _LIBCUDACXX_HIDE_FROM_ABI
     basic_string_view(_Range&& __r) : __data(ranges::data(__r)), __size(ranges::size(__r)) {}
-#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 20 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     basic_string_view(const _CharT* __s)
-        : __data(__s), __size(_VSTD::__char_traits_length_checked<_Traits>(__s)) {}
+        : __data(__s), __size(_CUDA_VSTD::__char_traits_length_checked<_Traits>(__s)) {}
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     basic_string_view(nullptr_t) = delete;
 #endif
 
     // [string.view.iterators], iterators
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin()  const _NOEXCEPT { return cbegin(); }
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()    const _NOEXCEPT { return cend(); }
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin() const _NOEXCEPT { return __data; }
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend()   const _NOEXCEPT { return __data + __size; }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rbegin()   const _NOEXCEPT { return const_reverse_iterator(cend()); }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rend()     const _NOEXCEPT { return const_reverse_iterator(cbegin()); }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crbegin()  const _NOEXCEPT { return const_reverse_iterator(cend()); }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX14 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX14 _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crend()    const _NOEXCEPT { return const_reverse_iterator(cbegin()); }
 
     // [string.view.capacity], capacity
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     size_type size()     const _NOEXCEPT { return __size; }
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     size_type length()   const _NOEXCEPT { return __size; }
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT { return numeric_limits<size_type>::max() / sizeof(value_type); }
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     bool empty()         const _NOEXCEPT { return __size == 0; }
 
     // [string.view.access], element access
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     const_reference operator[](size_type __pos) const _NOEXCEPT {
-      return _LIBCPP_ASSERT(__pos < size(), "string_view[] index out of bounds"), __data[__pos];
+      return _LIBCUDACXX_ASSERT(__pos < size(), "string_view[] index out of bounds"), __data[__pos];
     }
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     const_reference at(size_type __pos) const
     {
         return __pos >= size()
@@ -395,38 +395,38 @@ public:
             : __data[__pos];
     }
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     const_reference front() const _NOEXCEPT
     {
-        return _LIBCPP_ASSERT(!empty(), "string_view::front(): string is empty"), __data[0];
+        return _LIBCUDACXX_ASSERT(!empty(), "string_view::front(): string is empty"), __data[0];
     }
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     const_reference back() const _NOEXCEPT
     {
-        return _LIBCPP_ASSERT(!empty(), "string_view::back(): string is empty"), __data[__size-1];
+        return _LIBCUDACXX_ASSERT(!empty(), "string_view::back(): string is empty"), __data[__size-1];
     }
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     const_pointer data() const _NOEXCEPT { return __data; }
 
     // [string.view.modifiers], modifiers:
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     void remove_prefix(size_type __n) _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__n <= size(), "remove_prefix() can't remove more than size()");
+        _LIBCUDACXX_ASSERT(__n <= size(), "remove_prefix() can't remove more than size()");
         __data += __n;
         __size -= __n;
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     void remove_suffix(size_type __n) _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__n <= size(), "remove_suffix() can't remove more than size()");
+        _LIBCUDACXX_ASSERT(__n <= size(), "remove_suffix() can't remove more than size()");
         __size -= __n;
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     void swap(basic_string_view& __other) _NOEXCEPT
     {
         const value_type *__p = __data;
@@ -438,286 +438,286 @@ public:
         __other.__size = __sz;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type copy(_CharT* __s, size_type __n, size_type __pos = 0) const
     {
         if (__pos > size())
             __throw_out_of_range("string_view::copy");
-        size_type __rlen = _VSTD::min(__n, size() - __pos);
+        size_type __rlen = _CUDA_VSTD::min(__n, size() - __pos);
         _Traits::copy(__s, data() + __pos, __rlen);
         return __rlen;
     }
 
-    _LIBCPP_CONSTEXPR _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR _LIBCUDACXX_INLINE_VISIBILITY
     basic_string_view substr(size_type __pos = 0, size_type __n = npos) const
     {
         return __pos > size()
             ? (__throw_out_of_range("string_view::substr"), basic_string_view())
-            : basic_string_view(data() + __pos, _VSTD::min(__n, size() - __pos));
+            : basic_string_view(data() + __pos, _CUDA_VSTD::min(__n, size() - __pos));
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 int compare(basic_string_view __sv) const _NOEXCEPT
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 int compare(basic_string_view __sv) const _NOEXCEPT
     {
-        size_type __rlen = _VSTD::min( size(), __sv.size());
+        size_type __rlen = _CUDA_VSTD::min( size(), __sv.size());
         int __retval = _Traits::compare(data(), __sv.data(), __rlen);
         if ( __retval == 0 ) // first __rlen chars matched
             __retval = size() == __sv.size() ? 0 : ( size() < __sv.size() ? -1 : 1 );
         return __retval;
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     int compare(size_type __pos1, size_type __n1, basic_string_view __sv) const
     {
         return substr(__pos1, __n1).compare(__sv);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     int compare(                       size_type __pos1, size_type __n1,
                 basic_string_view __sv, size_type __pos2, size_type __n2) const
     {
         return substr(__pos1, __n1).compare(__sv.substr(__pos2, __n2));
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     int compare(const _CharT* __s) const _NOEXCEPT
     {
         return compare(basic_string_view(__s));
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     int compare(size_type __pos1, size_type __n1, const _CharT* __s) const
     {
         return substr(__pos1, __n1).compare(basic_string_view(__s));
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     int compare(size_type __pos1, size_type __n1, const _CharT* __s, size_type __n2) const
     {
         return substr(__pos1, __n1).compare(basic_string_view(__s, __n2));
     }
 
     // find
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
         return __str_find<value_type, size_type, traits_type, npos>
             (data(), size(), __s.data(), __pos, __s.size());
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find(_CharT __c, size_type __pos = 0) const _NOEXCEPT
     {
         return __str_find<value_type, size_type, traits_type, npos>
             (data(), size(), __c, __pos);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find(): received nullptr");
+        _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string_view::find(): received nullptr");
         return __str_find<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, __n);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find(const _CharT* __s, size_type __pos = 0) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s != nullptr, "string_view::find(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s != nullptr, "string_view::find(): received nullptr");
         return __str_find<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, traits_type::length(__s));
     }
 
     // rfind
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type rfind(basic_string_view __s, size_type __pos = npos) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find(): received nullptr");
         return __str_rfind<value_type, size_type, traits_type, npos>
             (data(), size(), __s.data(), __pos, __s.size());
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type rfind(_CharT __c, size_type __pos = npos) const _NOEXCEPT
     {
         return __str_rfind<value_type, size_type, traits_type, npos>
             (data(), size(), __c, __pos);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type rfind(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::rfind(): received nullptr");
+        _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string_view::rfind(): received nullptr");
         return __str_rfind<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, __n);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type rfind(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s != nullptr, "string_view::rfind(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s != nullptr, "string_view::rfind(): received nullptr");
         return __str_rfind<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, traits_type::length(__s));
     }
 
     // find_first_of
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_first_of(basic_string_view __s, size_type __pos = 0) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_of(): received nullptr");
         return __str_find_first_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s.data(), __pos, __s.size());
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_first_of(_CharT __c, size_type __pos = 0) const _NOEXCEPT
     { return find(__c, __pos); }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_first_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_of(): received nullptr");
         return __str_find_first_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, __n);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_first_of(const _CharT* __s, size_type __pos=0) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s != nullptr, "string_view::find_first_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s != nullptr, "string_view::find_first_of(): received nullptr");
         return __str_find_first_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, traits_type::length(__s));
     }
 
     // find_last_of
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_last_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_of(): received nullptr");
         return __str_find_last_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s.data(), __pos, __s.size());
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_last_of(_CharT __c, size_type __pos = npos) const _NOEXCEPT
     { return rfind(__c, __pos); }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_last_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_of(): received nullptr");
         return __str_find_last_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, __n);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_last_of(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s != nullptr, "string_view::find_last_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s != nullptr, "string_view::find_last_of(): received nullptr");
         return __str_find_last_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, traits_type::length(__s));
     }
 
     // find_first_not_of
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_first_not_of(basic_string_view __s, size_type __pos=0) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_not_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_first_not_of(): received nullptr");
         return __str_find_first_not_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s.data(), __pos, __s.size());
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_first_not_of(_CharT __c, size_type __pos=0) const _NOEXCEPT
     {
         return __str_find_first_not_of<value_type, size_type, traits_type, npos>
             (data(), size(), __c, __pos);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_not_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string_view::find_first_not_of(): received nullptr");
         return __str_find_first_not_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, __n);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_first_not_of(const _CharT* __s, size_type __pos=0) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s != nullptr, "string_view::find_first_not_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s != nullptr, "string_view::find_first_not_of(): received nullptr");
         return __str_find_first_not_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, traits_type::length(__s));
     }
 
     // find_last_not_of
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_last_not_of(basic_string_view __s, size_type __pos=npos) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_not_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s.size() == 0 || __s.data() != nullptr, "string_view::find_last_not_of(): received nullptr");
         return __str_find_last_not_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s.data(), __pos, __s.size());
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_last_not_of(_CharT __c, size_type __pos=npos) const _NOEXCEPT
     {
         return __str_find_last_not_of<value_type, size_type, traits_type, npos>
             (data(), size(), __c, __pos);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_not_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__n == 0 || __s != nullptr, "string_view::find_last_not_of(): received nullptr");
         return __str_find_last_not_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, __n);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
     size_type find_last_not_of(const _CharT* __s, size_type __pos=npos) const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(__s != nullptr, "string_view::find_last_not_of(): received nullptr");
+        _LIBCUDACXX_ASSERT(__s != nullptr, "string_view::find_last_not_of(): received nullptr");
         return __str_find_last_not_of<value_type, size_type, traits_type, npos>
             (data(), size(), __s, __pos, traits_type::length(__s));
     }
 
-#if _LIBCPP_STD_VER > 17
-    constexpr _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+    constexpr _LIBCUDACXX_INLINE_VISIBILITY
     bool starts_with(basic_string_view __s) const noexcept
     { return size() >= __s.size() && compare(0, __s.size(), __s) == 0; }
 
-    constexpr _LIBCPP_INLINE_VISIBILITY
+    constexpr _LIBCUDACXX_INLINE_VISIBILITY
     bool starts_with(value_type __c) const noexcept
     { return !empty() && _Traits::eq(front(), __c); }
 
-    constexpr _LIBCPP_INLINE_VISIBILITY
+    constexpr _LIBCUDACXX_INLINE_VISIBILITY
     bool starts_with(const value_type* __s) const noexcept
     { return starts_with(basic_string_view(__s)); }
 
-    constexpr _LIBCPP_INLINE_VISIBILITY
+    constexpr _LIBCUDACXX_INLINE_VISIBILITY
     bool ends_with(basic_string_view __s) const noexcept
     { return size() >= __s.size() && compare(size() - __s.size(), npos, __s) == 0; }
 
-    constexpr _LIBCPP_INLINE_VISIBILITY
+    constexpr _LIBCUDACXX_INLINE_VISIBILITY
     bool ends_with(value_type __c) const noexcept
     { return !empty() && _Traits::eq(back(), __c); }
 
-    constexpr _LIBCPP_INLINE_VISIBILITY
+    constexpr _LIBCUDACXX_INLINE_VISIBILITY
     bool ends_with(const value_type* __s) const noexcept
     { return ends_with(basic_string_view(__s)); }
 #endif
 
-#if _LIBCPP_STD_VER > 20
-    constexpr _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 20
+    constexpr _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(basic_string_view __sv) const noexcept
     { return find(__sv) != npos; }
 
-    constexpr _LIBCPP_INLINE_VISIBILITY
+    constexpr _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(value_type __c) const noexcept
     { return find(__c) != npos; }
 
-    constexpr _LIBCPP_INLINE_VISIBILITY
+    constexpr _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const value_type* __s) const
     { return find(__s) != npos; }
 #endif
@@ -727,31 +727,31 @@ private:
     size_type           __size;
 };
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _CharT, class _Traits>
 inline constexpr bool ranges::enable_view<basic_string_view<_CharT, _Traits>> = true;
 
 template <class _CharT, class _Traits>
 inline constexpr bool ranges::enable_borrowed_range<basic_string_view<_CharT, _Traits> > = true;
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 // [string.view.deduct]
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <contiguous_iterator _It, sized_sentinel_for<_It> _End>
   basic_string_view(_It, _End) -> basic_string_view<iter_value_t<_It>>;
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 
-#if _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCUDACXX_STD_VER > 20 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 template <ranges::contiguous_range _Range>
   basic_string_view(_Range) -> basic_string_view<ranges::range_value_t<_Range>>;
-#endif // _LIBCPP_STD_VER > 20 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCUDACXX_STD_VER > 20 && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 // [string.view.comparison]
 // operator ==
 template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator==(basic_string_view<_CharT, _Traits> __lhs,
                 basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
@@ -762,7 +762,7 @@ bool operator==(basic_string_view<_CharT, _Traits> __lhs,
 // The dummy default template parameters are used to work around a MSVC issue with mangling, see VSO-409326 for details.
 // This applies to the other sufficient overloads below for the other comparison operators.
 template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator==(basic_string_view<_CharT, _Traits> __lhs,
                 typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
 {
@@ -771,7 +771,7 @@ bool operator==(basic_string_view<_CharT, _Traits> __lhs,
 }
 
 template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator==(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
                 basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
@@ -782,7 +782,7 @@ bool operator==(typename common_type<basic_string_view<_CharT, _Traits> >::type
 
 // operator !=
 template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator!=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
     if ( __lhs.size() != __rhs.size())
@@ -791,7 +791,7 @@ bool operator!=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_Cha
 }
 
 template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator!=(basic_string_view<_CharT, _Traits> __lhs,
                 typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
 {
@@ -801,7 +801,7 @@ bool operator!=(basic_string_view<_CharT, _Traits> __lhs,
 }
 
 template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator!=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
                 basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
@@ -813,14 +813,14 @@ bool operator!=(typename common_type<basic_string_view<_CharT, _Traits> >::type
 
 // operator <
 template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator<(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
     return __lhs.compare(__rhs) < 0;
 }
 
 template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator<(basic_string_view<_CharT, _Traits> __lhs,
                 typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
 {
@@ -828,7 +828,7 @@ bool operator<(basic_string_view<_CharT, _Traits> __lhs,
 }
 
 template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator<(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
                 basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
@@ -838,14 +838,14 @@ bool operator<(typename common_type<basic_string_view<_CharT, _Traits> >::type _
 
 // operator >
 template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator> (basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
     return __lhs.compare(__rhs) > 0;
 }
 
 template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator>(basic_string_view<_CharT, _Traits> __lhs,
                 typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
 {
@@ -853,7 +853,7 @@ bool operator>(basic_string_view<_CharT, _Traits> __lhs,
 }
 
 template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator>(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
                 basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
@@ -863,14 +863,14 @@ bool operator>(typename common_type<basic_string_view<_CharT, _Traits> >::type _
 
 // operator <=
 template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator<=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
     return __lhs.compare(__rhs) <= 0;
 }
 
 template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator<=(basic_string_view<_CharT, _Traits> __lhs,
                 typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
 {
@@ -878,7 +878,7 @@ bool operator<=(basic_string_view<_CharT, _Traits> __lhs,
 }
 
 template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator<=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
                 basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
@@ -888,7 +888,7 @@ bool operator<=(typename common_type<basic_string_view<_CharT, _Traits> >::type
 
 // operator >=
 template<class _CharT, class _Traits>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator>=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
     return __lhs.compare(__rhs) >= 0;
@@ -896,7 +896,7 @@ bool operator>=(basic_string_view<_CharT, _Traits> __lhs, basic_string_view<_Cha
 
 
 template<class _CharT, class _Traits, int = 1>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator>=(basic_string_view<_CharT, _Traits> __lhs,
                 typename common_type<basic_string_view<_CharT, _Traits> >::type __rhs) _NOEXCEPT
 {
@@ -904,7 +904,7 @@ bool operator>=(basic_string_view<_CharT, _Traits> __lhs,
 }
 
 template<class _CharT, class _Traits, int = 2>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 _LIBCUDACXX_INLINE_VISIBILITY
 bool operator>=(typename common_type<basic_string_view<_CharT, _Traits> >::type __lhs,
                 basic_string_view<_CharT, _Traits> __rhs) _NOEXCEPT
 {
@@ -919,49 +919,49 @@ operator<<(basic_ostream<_CharT, _Traits>& __os,
 
 // [string.view.hash]
 template<class _CharT>
-struct _LIBCPP_TEMPLATE_VIS hash<basic_string_view<_CharT, char_traits<_CharT> > >
+struct _LIBCUDACXX_TEMPLATE_VIS hash<basic_string_view<_CharT, char_traits<_CharT> > >
     : public __unary_function<basic_string_view<_CharT, char_traits<_CharT> >, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const basic_string_view<_CharT, char_traits<_CharT> > __val) const _NOEXCEPT {
         return __do_string_hash(__val.data(), __val.data() + __val.size());
     }
 };
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 inline namespace literals
 {
   inline namespace string_view_literals
   {
-    inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     basic_string_view<char> operator "" sv(const char *__str, size_t __len) _NOEXCEPT
     {
         return basic_string_view<char> (__str, __len);
     }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-    inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+    inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     basic_string_view<wchar_t> operator "" sv(const wchar_t *__str, size_t __len) _NOEXCEPT
     {
         return basic_string_view<wchar_t> (__str, __len);
     }
 #endif
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-    inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
+    inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     basic_string_view<char8_t> operator "" sv(const char8_t *__str, size_t __len) _NOEXCEPT
     {
         return basic_string_view<char8_t> (__str, __len);
     }
 #endif
 
-    inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     basic_string_view<char16_t> operator "" sv(const char16_t *__str, size_t __len) _NOEXCEPT
     {
         return basic_string_view<char16_t> (__str, __len);
     }
 
-    inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     basic_string_view<char32_t> operator "" sv(const char32_t *__str, size_t __len) _NOEXCEPT
     {
         return basic_string_view<char32_t> (__str, __len);
@@ -969,8 +969,8 @@ inline namespace literals
   } // namespace string_view_literals
 } // namespace literals
 #endif
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_STRING_VIEW
+#endif // _LIBCUDACXX_STRING_VIEW

diff  --git a/libcxx/include/strstream b/libcxx/include/strstream
index 72386bb9567f..f31566acacae 100644
--- a/libcxx/include/strstream
+++ b/libcxx/include/strstream
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_STRSTREAM
-#define _LIBCPP_STRSTREAM
+#ifndef _LIBCUDACXX_STRSTREAM
+#define _LIBCUDACXX_STRSTREAM
 
 /*
     strstream synopsis
@@ -135,17 +135,17 @@ private:
 #include <ostream>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TYPE_VIS strstreambuf
+class _LIBCUDACXX_TYPE_VIS strstreambuf
     : public streambuf
 {
 public:
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     strstreambuf() : strstreambuf(0) {}
     explicit strstreambuf(streamsize __alsize);
 #else
@@ -160,12 +160,12 @@ public:
     strstreambuf(unsigned char* __gnext, streamsize __n, unsigned char* __pbeg = nullptr);
     strstreambuf(const unsigned char* __gnext, streamsize __n);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     strstreambuf(strstreambuf&& __rhs);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     strstreambuf& operator=(strstreambuf&& __rhs);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     virtual ~strstreambuf();
 
@@ -200,9 +200,9 @@ private:
     void __init(char* __gnext, streamsize __n, char* __pbeg);
 };
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 strstreambuf::strstreambuf(strstreambuf&& __rhs)
     : streambuf(__rhs),
       __strmode_(__rhs.__strmode_),
@@ -214,7 +214,7 @@ strstreambuf::strstreambuf(strstreambuf&& __rhs)
     __rhs.setp(nullptr, nullptr);
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 strstreambuf&
 strstreambuf::operator=(strstreambuf&& __rhs)
 {
@@ -235,115 +235,115 @@ strstreambuf::operator=(strstreambuf&& __rhs)
     return *this;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-class _LIBCPP_TYPE_VIS istrstream
+class _LIBCUDACXX_TYPE_VIS istrstream
     : public istream
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit istrstream(const char* __s)
         : istream(&__sb_), __sb_(__s, 0) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit istrstream(char* __s)
         : istream(&__sb_), __sb_(__s, 0) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     istrstream(const char* __s, streamsize __n)
         : istream(&__sb_), __sb_(__s, __n) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     istrstream(char* __s, streamsize __n)
         : istream(&__sb_), __sb_(__s, __n) {}
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     istrstream(istrstream&& __rhs)
-        : istream(_VSTD::move(__rhs)),
-          __sb_(_VSTD::move(__rhs.__sb_))
+        : istream(_CUDA_VSTD::move(__rhs)),
+          __sb_(_CUDA_VSTD::move(__rhs.__sb_))
     {
         istream::set_rdbuf(&__sb_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     istrstream& operator=(istrstream&& __rhs)
     {
-        __sb_ = _VSTD::move(__rhs.__sb_);
-        istream::operator=(_VSTD::move(__rhs));
+        __sb_ = _CUDA_VSTD::move(__rhs.__sb_);
+        istream::operator=(_CUDA_VSTD::move(__rhs));
         return *this;
     }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     virtual ~istrstream();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(istrstream& __rhs)
     {
         istream::swap(__rhs);
         __sb_.swap(__rhs.__sb_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     strstreambuf* rdbuf() const {return const_cast<strstreambuf*>(&__sb_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char *str() {return __sb_.str();}
 
 private:
     strstreambuf __sb_;
 };
 
-class _LIBCPP_TYPE_VIS ostrstream
+class _LIBCUDACXX_TYPE_VIS ostrstream
     : public ostream
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ostrstream()
         : ostream(&__sb_) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ostrstream(char* __s, int __n, ios_base::openmode __mode = ios_base::out)
         : ostream(&__sb_),
-          __sb_(__s, __n, __s + (__mode & ios::app ? _VSTD::strlen(__s) : 0))
+          __sb_(__s, __n, __s + (__mode & ios::app ? _CUDA_VSTD::strlen(__s) : 0))
         {}
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     ostrstream(ostrstream&& __rhs)
-        : ostream(_VSTD::move(__rhs)),
-          __sb_(_VSTD::move(__rhs.__sb_))
+        : ostream(_CUDA_VSTD::move(__rhs)),
+          __sb_(_CUDA_VSTD::move(__rhs.__sb_))
     {
         ostream::set_rdbuf(&__sb_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ostrstream& operator=(ostrstream&& __rhs)
     {
-        __sb_ = _VSTD::move(__rhs.__sb_);
-        ostream::operator=(_VSTD::move(__rhs));
+        __sb_ = _CUDA_VSTD::move(__rhs.__sb_);
+        ostream::operator=(_CUDA_VSTD::move(__rhs));
         return *this;
     }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     virtual ~ostrstream();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(ostrstream& __rhs)
     {
         ostream::swap(__rhs);
         __sb_.swap(__rhs.__sb_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     strstreambuf* rdbuf() const {return const_cast<strstreambuf*>(&__sb_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void freeze(bool __freezefl = true) {__sb_.freeze(__freezefl);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char* str()         {return __sb_.str();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int pcount() const  {return __sb_.pcount();}
 
 private:
     strstreambuf __sb_; // exposition only
 };
 
-class _LIBCPP_TYPE_VIS strstream
+class _LIBCUDACXX_TYPE_VIS strstream
     : public iostream
 {
 public:
@@ -354,36 +354,36 @@ public:
     typedef char_traits<char>::off_type off_type;
 
     // constructors/destructor
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     strstream()
         : iostream(&__sb_) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     strstream(char* __s, int __n, ios_base::openmode __mode = ios_base::in | ios_base::out)
         : iostream(&__sb_),
-          __sb_(__s, __n, __s + (__mode & ios::app ? _VSTD::strlen(__s) : 0))
+          __sb_(__s, __n, __s + (__mode & ios::app ? _CUDA_VSTD::strlen(__s) : 0))
         {}
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     strstream(strstream&& __rhs)
-        : iostream(_VSTD::move(__rhs)),
-          __sb_(_VSTD::move(__rhs.__sb_))
+        : iostream(_CUDA_VSTD::move(__rhs)),
+          __sb_(_CUDA_VSTD::move(__rhs.__sb_))
     {
         iostream::set_rdbuf(&__sb_);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     strstream& operator=(strstream&& __rhs)
     {
-        __sb_ = _VSTD::move(__rhs.__sb_);
-        iostream::operator=(_VSTD::move(__rhs));
+        __sb_ = _CUDA_VSTD::move(__rhs.__sb_);
+        iostream::operator=(_CUDA_VSTD::move(__rhs));
         return *this;
     }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     virtual ~strstream();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(strstream& __rhs)
     {
         iostream::swap(__rhs);
@@ -391,19 +391,19 @@ public:
     }
 
     // Members:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     strstreambuf* rdbuf() const {return const_cast<strstreambuf*>(&__sb_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void freeze(bool __freezefl = true) {__sb_.freeze(__freezefl);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int pcount() const {return __sb_.pcount();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     char* str()        {return __sb_.str();}
 
 private:
     strstreambuf __sb_; // exposition only
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_STRSTREAM
+#endif // _LIBCUDACXX_STRSTREAM

diff  --git a/libcxx/include/system_error b/libcxx/include/system_error
index 3b705aa81ebc..30b7acb1def4 100644
--- a/libcxx/include/system_error
+++ b/libcxx/include/system_error
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SYSTEM_ERROR
-#define _LIBCPP_SYSTEM_ERROR
+#ifndef _LIBCUDACXX_SYSTEM_ERROR
+#define _LIBCUDACXX_SYSTEM_ERROR
 
 /*
     system_error synopsis
@@ -155,19 +155,19 @@ template <> struct hash<std::error_condition>;
 // standard-mandated includes
 #include <compare>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // is_error_code_enum
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_error_code_enum
+struct _LIBCUDACXX_TEMPLATE_VIS is_error_code_enum
     : public false_type {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_error_code_enum_v = is_error_code_enum<_Tp>::value;
 #endif
@@ -175,41 +175,41 @@ inline constexpr bool is_error_code_enum_v = is_error_code_enum<_Tp>::value;
 // is_error_condition_enum
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum
+struct _LIBCUDACXX_TEMPLATE_VIS is_error_condition_enum
     : public false_type {};
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr bool is_error_condition_enum_v = is_error_condition_enum<_Tp>::value;
 #endif
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc>
+struct _LIBCUDACXX_TEMPLATE_VIS is_error_condition_enum<errc>
     : true_type { };
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
 template <>
-struct _LIBCPP_TEMPLATE_VIS is_error_condition_enum<errc::__lx>
+struct _LIBCUDACXX_TEMPLATE_VIS is_error_condition_enum<errc::__lx>
     : true_type { };
 #endif
 
-class _LIBCPP_TYPE_VIS error_condition;
-class _LIBCPP_TYPE_VIS error_code;
+class _LIBCUDACXX_TYPE_VIS error_condition;
+class _LIBCUDACXX_TYPE_VIS error_code;
 
 // class error_category
 
-class _LIBCPP_HIDDEN __do_message;
+class _LIBCUDACXX_HIDDEN __do_message;
 
-class _LIBCPP_TYPE_VIS error_category
+class _LIBCUDACXX_TYPE_VIS error_category
 {
 public:
     virtual ~error_category() _NOEXCEPT;
 
-#if defined(_LIBCPP_ERROR_CATEGORY_DEFINE_LEGACY_INLINE_FUNCTIONS)
+#if defined(_LIBCUDACXX_ERROR_CATEGORY_DEFINE_LEGACY_INLINE_FUNCTIONS)
     error_category() noexcept;
 #else
-    _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT = default;
+    _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 error_category() _NOEXCEPT = default;
 #endif
     error_category(const error_category&) = delete;
     error_category& operator=(const error_category&) = delete;
@@ -220,48 +220,48 @@ public:
     virtual bool equivalent(const error_code& __code, int __condition) const _NOEXCEPT;
     virtual string message(int __ev) const = 0;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const error_category& __rhs) const _NOEXCEPT {return this == &__rhs;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const error_category& __rhs) const _NOEXCEPT {return !(*this == __rhs);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator< (const error_category& __rhs) const _NOEXCEPT {return this < &__rhs;}
 
-    friend class _LIBCPP_HIDDEN __do_message;
+    friend class _LIBCUDACXX_HIDDEN __do_message;
 };
 
-class _LIBCPP_HIDDEN __do_message
+class _LIBCUDACXX_HIDDEN __do_message
     : public error_category
 {
 public:
     virtual string message(int __ev) const;
 };
 
-_LIBCPP_FUNC_VIS const error_category& generic_category() _NOEXCEPT;
-_LIBCPP_FUNC_VIS const error_category& system_category() _NOEXCEPT;
+_LIBCUDACXX_FUNC_VIS const error_category& generic_category() _NOEXCEPT;
+_LIBCUDACXX_FUNC_VIS const error_category& system_category() _NOEXCEPT;
 
-class _LIBCPP_TYPE_VIS error_condition
+class _LIBCUDACXX_TYPE_VIS error_condition
 {
     int __val_;
     const error_category* __cat_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     error_condition() _NOEXCEPT : __val_(0), __cat_(&generic_category()) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     error_condition(int __val, const error_category& __cat) _NOEXCEPT
         : __val_(__val), __cat_(&__cat) {}
 
     template <class _Ep>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         error_condition(_Ep __e,
               typename enable_if<is_error_condition_enum<_Ep>::value>::type* = nullptr
                                                                      ) _NOEXCEPT
             {*this = make_error_condition(__e);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void assign(int __val, const error_category& __cat) _NOEXCEPT
     {
         __val_ = __val;
@@ -269,7 +269,7 @@ public:
     }
 
     template <class _Ep>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if
         <
             is_error_condition_enum<_Ep>::value,
@@ -278,32 +278,32 @@ public:
         operator=(_Ep __e) _NOEXCEPT
             {*this = make_error_condition(__e); return *this;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT
     {
         __val_ = 0;
         __cat_ = &generic_category();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int value() const _NOEXCEPT {return __val_;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const error_category& category() const _NOEXCEPT {return *__cat_;}
     string message() const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit operator bool() const _NOEXCEPT {return __val_ != 0;}
 };
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 error_condition
 make_error_condition(errc __e) _NOEXCEPT
 {
     return error_condition(static_cast<int>(__e), generic_category());
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(const error_condition& __x, const error_condition& __y) _NOEXCEPT
 {
@@ -313,26 +313,26 @@ operator<(const error_condition& __x, const error_condition& __y) _NOEXCEPT
 
 // error_code
 
-class _LIBCPP_TYPE_VIS error_code
+class _LIBCUDACXX_TYPE_VIS error_code
 {
     int __val_;
     const error_category* __cat_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     error_code() _NOEXCEPT : __val_(0), __cat_(&system_category()) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     error_code(int __val, const error_category& __cat) _NOEXCEPT
         : __val_(__val), __cat_(&__cat) {}
 
     template <class _Ep>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         error_code(_Ep __e,
                    typename enable_if<is_error_code_enum<_Ep>::value>::type* = nullptr
                                                                      ) _NOEXCEPT
             {*this = make_error_code(__e);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void assign(int __val, const error_category& __cat) _NOEXCEPT
     {
         __val_ = __val;
@@ -340,7 +340,7 @@ public:
     }
 
     template <class _Ep>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         typename enable_if
         <
             is_error_code_enum<_Ep>::value,
@@ -349,37 +349,37 @@ public:
         operator=(_Ep __e) _NOEXCEPT
             {*this = make_error_code(__e); return *this;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT
     {
         __val_ = 0;
         __cat_ = &system_category();
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     int value() const _NOEXCEPT {return __val_;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const error_category& category() const _NOEXCEPT {return *__cat_;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     error_condition default_error_condition() const _NOEXCEPT
         {return __cat_->default_error_condition(__val_);}
 
     string message() const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit operator bool() const _NOEXCEPT {return __val_ != 0;}
 };
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 error_code
 make_error_code(errc __e) _NOEXCEPT
 {
     return error_code(static_cast<int>(__e), generic_category());
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<(const error_code& __x, const error_code& __y) _NOEXCEPT
 {
@@ -387,14 +387,14 @@ operator<(const error_code& __x, const error_code& __y) _NOEXCEPT
         || (__x.category() == __y.category() && __x.value() < __y.value());
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const error_code& __x, const error_code& __y) _NOEXCEPT
 {
     return __x.category() == __y.category() && __x.value() == __y.value();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const error_code& __x, const error_condition& __y) _NOEXCEPT
 {
@@ -402,45 +402,45 @@ operator==(const error_code& __x, const error_condition& __y) _NOEXCEPT
         || __y.category().equivalent(__x, __y.value());
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const error_condition& __x, const error_code& __y) _NOEXCEPT
 {
     return __y == __x;
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const error_condition& __x, const error_condition& __y) _NOEXCEPT
 {
     return __x.category() == __y.category() && __x.value() == __y.value();
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const error_code& __x, const error_code& __y) _NOEXCEPT
 {return !(__x == __y);}
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const error_code& __x, const error_condition& __y) _NOEXCEPT
 {return !(__x == __y);}
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const error_condition& __x, const error_code& __y) _NOEXCEPT
 {return !(__x == __y);}
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const error_condition& __x, const error_condition& __y) _NOEXCEPT
 {return !(__x == __y);}
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<error_code>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<error_code>
     : public __unary_function<error_code, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const error_code& __ec) const _NOEXCEPT
     {
         return static_cast<size_t>(__ec.value());
@@ -448,10 +448,10 @@ struct _LIBCPP_TEMPLATE_VIS hash<error_code>
 };
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<error_condition>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<error_condition>
     : public __unary_function<error_condition, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const error_condition& __ec) const _NOEXCEPT
     {
         return static_cast<size_t>(__ec.value());
@@ -460,7 +460,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<error_condition>
 
 // system_error
 
-class _LIBCPP_TYPE_VIS system_error
+class _LIBCUDACXX_TYPE_VIS system_error
     : public runtime_error
 {
     error_code __ec_;
@@ -474,16 +474,16 @@ public:
     system_error(const system_error&) _NOEXCEPT = default;
     ~system_error() _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const error_code& code() const _NOEXCEPT {return __ec_;}
 
 private:
     static string __init(const error_code&, string);
 };
 
-_LIBCPP_NORETURN _LIBCPP_FUNC_VIS
+_LIBCUDACXX_NORETURN _LIBCUDACXX_FUNC_VIS
 void __throw_system_error(int __ev, const char* __what_arg);
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_SYSTEM_ERROR
+#endif // _LIBCUDACXX_SYSTEM_ERROR

diff  --git a/libcxx/include/tgmath.h b/libcxx/include/tgmath.h
index c65091708a9a..9cd83f4d63e8 100644
--- a/libcxx/include/tgmath.h
+++ b/libcxx/include/tgmath.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_TGMATH_H
-#define _LIBCPP_TGMATH_H
+#ifndef _LIBCUDACXX_TGMATH_H
+#define _LIBCUDACXX_TGMATH_H
 
 /*
     tgmath.h synopsis
@@ -19,7 +19,7 @@
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -33,4 +33,4 @@
 
 #endif // __cplusplus
 
-#endif // _LIBCPP_TGMATH_H
+#endif // _LIBCUDACXX_TGMATH_H

diff  --git a/libcxx/include/thread b/libcxx/include/thread
index 1c8eb198986d..a1c0927c6800 100644
--- a/libcxx/include/thread
+++ b/libcxx/include/thread
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_THREAD
-#define _LIBCPP_THREAD
+#ifndef _LIBCUDACXX_THREAD
+#define _LIBCUDACXX_THREAD
 
 /*
 
@@ -98,7 +98,7 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <chrono>
 #  include <functional>
 #endif
@@ -106,27 +106,27 @@ void sleep_for(const chrono::duration<Rep, Period>& rel_time);
 // standard-mandated includes
 #include <compare>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-#ifdef _LIBCPP_HAS_NO_THREADS
+#ifdef _LIBCUDACXX_HAS_NO_THREADS
 # error "<thread> is not supported since libc++ has been configured without support for threads."
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp> class __thread_specific_ptr;
-class _LIBCPP_TYPE_VIS __thread_struct;
-class _LIBCPP_HIDDEN __thread_struct_imp;
+class _LIBCUDACXX_TYPE_VIS __thread_struct;
+class _LIBCUDACXX_HIDDEN __thread_struct_imp;
 class __assoc_sub_state;
 
-_LIBCPP_FUNC_VIS __thread_specific_ptr<__thread_struct>& __thread_local_data();
+_LIBCUDACXX_FUNC_VIS __thread_specific_ptr<__thread_struct>& __thread_local_data();
 
-class _LIBCPP_TYPE_VIS __thread_struct
+class _LIBCUDACXX_TYPE_VIS __thread_struct
 {
     __thread_struct_imp* __p_;
 
@@ -143,35 +143,35 @@ public:
 template <class _Tp>
 class __thread_specific_ptr
 {
-    __libcpp_tls_key __key_;
+    __LIBCUDACXX_tls_key __key_;
 
      // Only __thread_local_data() may construct a __thread_specific_ptr
      // and only with _Tp == __thread_struct.
     static_assert((is_same<_Tp, __thread_struct>::value), "");
     __thread_specific_ptr();
-    friend _LIBCPP_FUNC_VIS __thread_specific_ptr<__thread_struct>& __thread_local_data();
+    friend _LIBCUDACXX_FUNC_VIS __thread_specific_ptr<__thread_struct>& __thread_local_data();
 
     __thread_specific_ptr(const __thread_specific_ptr&);
     __thread_specific_ptr& operator=(const __thread_specific_ptr&);
 
-    _LIBCPP_HIDDEN static void _LIBCPP_TLS_DESTRUCTOR_CC __at_thread_exit(void*);
+    _LIBCUDACXX_HIDDEN static void _LIBCUDACXX_TLS_DESTRUCTOR_CC __at_thread_exit(void*);
 
 public:
     typedef _Tp* pointer;
 
     ~__thread_specific_ptr();
 
-    _LIBCPP_INLINE_VISIBILITY
-    pointer get() const {return static_cast<_Tp*>(__libcpp_tls_get(__key_));}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
+    pointer get() const {return static_cast<_Tp*>(__LIBCUDACXX_tls_get(__key_));}
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator*() const {return *get();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {return get();}
     void set_pointer(pointer __p);
 };
 
 template <class _Tp>
-void _LIBCPP_TLS_DESTRUCTOR_CC
+void _LIBCUDACXX_TLS_DESTRUCTOR_CC
 __thread_specific_ptr<_Tp>::__at_thread_exit(void* __p)
 {
     delete static_cast<pointer>(__p);
@@ -181,7 +181,7 @@ template <class _Tp>
 __thread_specific_ptr<_Tp>::__thread_specific_ptr()
 {
   int __ec =
-      __libcpp_tls_create(&__key_, &__thread_specific_ptr::__at_thread_exit);
+      __LIBCUDACXX_tls_create(&__key_, &__thread_specific_ptr::__at_thread_exit);
   if (__ec)
     __throw_system_error(__ec, "__thread_specific_ptr construction failed");
 }
@@ -199,100 +199,100 @@ template <class _Tp>
 void
 __thread_specific_ptr<_Tp>::set_pointer(pointer __p)
 {
-    _LIBCPP_ASSERT(get() == nullptr,
+    _LIBCUDACXX_ASSERT(get() == nullptr,
                    "Attempting to overwrite thread local data");
-    __libcpp_tls_set(__key_, __p);
+    __LIBCUDACXX_tls_set(__key_, __p);
 }
 
 template<>
-struct _LIBCPP_TEMPLATE_VIS hash<__thread_id>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<__thread_id>
     : public __unary_function<__thread_id, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(__thread_id __v) const _NOEXCEPT
     {
-        return hash<__libcpp_thread_id>()(__v.__id_);
+        return hash<__LIBCUDACXX_thread_id>()(__v.__id_);
     }
 };
 
 template<class _CharT, class _Traits>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, __thread_id __id)
 {return __os << __id.__id_;}
 
-class _LIBCPP_TYPE_VIS thread
+class _LIBCUDACXX_TYPE_VIS thread
 {
-    __libcpp_thread_t __t_;
+    __LIBCUDACXX_thread_t __t_;
 
     thread(const thread&);
     thread& operator=(const thread&);
 public:
     typedef __thread_id id;
-    typedef __libcpp_thread_t native_handle_type;
+    typedef __LIBCUDACXX_thread_t native_handle_type;
 
-    _LIBCPP_INLINE_VISIBILITY
-    thread() _NOEXCEPT : __t_(_LIBCPP_NULL_THREAD) {}
-#ifndef _LIBCPP_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
+    thread() _NOEXCEPT : __t_(_LIBCUDACXX_NULL_THREAD) {}
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class _Fp, class ..._Args,
               class = __enable_if_t<!is_same<__uncvref_t<_Fp>, thread>::value> >
-        _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+        _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
         explicit thread(_Fp&& __f, _Args&&... __args);
-#else  // _LIBCPP_CXX03_LANG
+#else  // _LIBCUDACXX_CXX03_LANG
     template <class _Fp>
-    _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
+    _LIBCUDACXX_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS
     explicit thread(_Fp __f);
 #endif
     ~thread();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     thread(thread&& __t) _NOEXCEPT : __t_(__t.__t_) {
-        __t.__t_ = _LIBCPP_NULL_THREAD;
+        __t.__t_ = _LIBCUDACXX_NULL_THREAD;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     thread& operator=(thread&& __t) _NOEXCEPT {
-        if (!__libcpp_thread_isnull(&__t_))
+        if (!__LIBCUDACXX_thread_isnull(&__t_))
             terminate();
         __t_ = __t.__t_;
-        __t.__t_ = _LIBCPP_NULL_THREAD;
+        __t.__t_ = _LIBCUDACXX_NULL_THREAD;
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
-    void swap(thread& __t) _NOEXCEPT {_VSTD::swap(__t_, __t.__t_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    void swap(thread& __t) _NOEXCEPT {_CUDA_VSTD::swap(__t_, __t.__t_);}
 
-    _LIBCPP_INLINE_VISIBILITY
-    bool joinable() const _NOEXCEPT {return !__libcpp_thread_isnull(&__t_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    bool joinable() const _NOEXCEPT {return !__LIBCUDACXX_thread_isnull(&__t_);}
     void join();
     void detach();
-    _LIBCPP_INLINE_VISIBILITY
-    id get_id() const _NOEXCEPT {return __libcpp_thread_get_id(&__t_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
+    id get_id() const _NOEXCEPT {return __LIBCUDACXX_thread_get_id(&__t_);}
+    _LIBCUDACXX_INLINE_VISIBILITY
     native_handle_type native_handle() _NOEXCEPT {return __t_;}
 
     static unsigned hardware_concurrency() _NOEXCEPT;
 };
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _TSp, class _Fp, class ..._Args, size_t ..._Indices>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 __thread_execute(tuple<_TSp, _Fp, _Args...>& __t, __tuple_indices<_Indices...>)
 {
-    _VSTD::__invoke(_VSTD::move(_VSTD::get<1>(__t)), _VSTD::move(_VSTD::get<_Indices>(__t))...);
+    _CUDA_VSTD::__invoke(_CUDA_VSTD::move(_CUDA_VSTD::get<1>(__t)), _CUDA_VSTD::move(_CUDA_VSTD::get<_Indices>(__t))...);
 }
 
 template <class _Fp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 void* __thread_proxy(void* __vp)
 {
     // _Fp = tuple< unique_ptr<__thread_struct>, Functor, Args...>
     unique_ptr<_Fp> __p(static_cast<_Fp*>(__vp));
-    __thread_local_data().set_pointer(_VSTD::get<0>(*__p.get()).release());
+    __thread_local_data().set_pointer(_CUDA_VSTD::get<0>(*__p.get()).release());
     typedef typename __make_tuple_indices<tuple_size<_Fp>::value, 2>::type _Index;
-    _VSTD::__thread_execute(*__p.get(), _Index());
+    _CUDA_VSTD::__thread_execute(*__p.get(), _Index());
     return nullptr;
 }
 
@@ -305,17 +305,17 @@ thread::thread(_Fp&& __f, _Args&&... __args)
     _TSPtr __tsp(new __thread_struct);
     typedef tuple<_TSPtr, typename decay<_Fp>::type, typename decay<_Args>::type...> _Gp;
     unique_ptr<_Gp> __p(
-            new _Gp(_VSTD::move(__tsp),
-                    _VSTD::forward<_Fp>(__f),
-                    _VSTD::forward<_Args>(__args)...));
-    int __ec = _VSTD::__libcpp_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get());
+            new _Gp(_CUDA_VSTD::move(__tsp),
+                    _CUDA_VSTD::forward<_Fp>(__f),
+                    _CUDA_VSTD::forward<_Args>(__args)...));
+    int __ec = _CUDA_VSTD::__LIBCUDACXX_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get());
     if (__ec == 0)
         __p.release();
     else
         __throw_system_error(__ec, "thread constructor failed");
 }
 
-#else  // _LIBCPP_CXX03_LANG
+#else  // _LIBCUDACXX_CXX03_LANG
 
 template <class _Fp>
 struct __thread_invoke_pair {
@@ -343,22 +343,22 @@ thread::thread(_Fp __f)
     typedef __thread_invoke_pair<_Fp> _InvokePair;
     typedef unique_ptr<_InvokePair> _PairPtr;
     _PairPtr __pp(new _InvokePair(__f));
-    int __ec = _VSTD::__libcpp_thread_create(&__t_, &__thread_proxy_cxx03<_InvokePair>, __pp.get());
+    int __ec = _CUDA_VSTD::__LIBCUDACXX_thread_create(&__t_, &__thread_proxy_cxx03<_InvokePair>, __pp.get());
     if (__ec == 0)
         __pp.release();
     else
         __throw_system_error(__ec, "thread constructor failed");
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void swap(thread& __x, thread& __y) _NOEXCEPT {__x.swap(__y);}
 
 namespace this_thread
 {
 
-_LIBCPP_FUNC_VIS void sleep_for(const chrono::nanoseconds& __ns);
+_LIBCUDACXX_FUNC_VIS void sleep_for(const chrono::nanoseconds& __ns);
 
 template <class _Rep, class _Period>
 void
@@ -369,7 +369,7 @@ sleep_for(const chrono::duration<_Rep, _Period>& __d)
         // The standard guarantees a 64bit signed integer resolution for nanoseconds,
         // so use INT64_MAX / 1e9 as cut-off point. Use a constant to avoid <climits>
         // and issues with long double folding on PowerPC with GCC.
-        _LIBCPP_CONSTEXPR chrono::duration<long double> _Max =
+        _LIBCUDACXX_CONSTEXPR chrono::duration<long double> _Max =
             chrono::duration<long double>(9223372036.0L);
         chrono::nanoseconds __ns;
         if (__d < _Max)
@@ -396,20 +396,20 @@ sleep_until(const chrono::time_point<_Clock, _Duration>& __t)
 }
 
 template <class _Duration>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 sleep_until(const chrono::time_point<chrono::steady_clock, _Duration>& __t)
 {
     this_thread::sleep_for(__t - chrono::steady_clock::now());
 }
 
-inline _LIBCPP_INLINE_VISIBILITY
-void yield() _NOEXCEPT {__libcpp_thread_yield();}
+inline _LIBCUDACXX_INLINE_VISIBILITY
+void yield() _NOEXCEPT {__LIBCUDACXX_thread_yield();}
 
 } // namespace this_thread
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_THREAD
+#endif // _LIBCUDACXX_THREAD

diff  --git a/libcxx/include/tuple b/libcxx/include/tuple
index 79527cca5853..e9cf6b44735f 100644
--- a/libcxx/include/tuple
+++ b/libcxx/include/tuple
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_TUPLE
-#define _LIBCPP_TUPLE
+#ifndef _LIBCUDACXX_TUPLE
+#define _LIBCUDACXX_TUPLE
 
 /*
     tuple synopsis
@@ -219,7 +219,7 @@ template <class... Types>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <exception>
 #  include <iosfwd>
 #  include <new>
@@ -230,24 +230,24 @@ template <class... Types>
 // standard-mandated includes
 #include <compare>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 
 // __tuple_leaf
 
 template <size_t _Ip, class _Hp,
-          bool=is_empty<_Hp>::value && !__libcpp_is_final<_Hp>::value
+          bool=is_empty<_Hp>::value && !__LIBCUDACXX_is_final<_Hp>::value
          >
 class __tuple_leaf;
 
 template <size_t _Ip, class _Hp, bool _Ep>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void swap(__tuple_leaf<_Ip, _Hp, _Ep>& __x, __tuple_leaf<_Ip, _Hp, _Ep>& __y)
     _NOEXCEPT_(__is_nothrow_swappable<_Hp>::value)
 {
@@ -255,7 +255,7 @@ void swap(__tuple_leaf<_Ip, _Hp, _Ep>& __x, __tuple_leaf<_Ip, _Hp, _Ep>& __y)
 }
 
 template <size_t _Ip, class _Hp, bool _Ep>
-_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void swap(const __tuple_leaf<_Ip, _Hp, _Ep>& __x, const __tuple_leaf<_Ip, _Hp, _Ep>& __y)
      _NOEXCEPT_(__is_nothrow_swappable<const _Hp>::value) {
   swap(__x.get(), __y.get());
@@ -275,30 +275,30 @@ class __tuple_leaf
 #endif
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     __tuple_leaf& operator=(const __tuple_leaf&);
 public:
-    _LIBCPP_INLINE_VISIBILITY constexpr __tuple_leaf()
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr __tuple_leaf()
              _NOEXCEPT_(is_nothrow_default_constructible<_Hp>::value) : __value_()
        {static_assert(!is_reference<_Hp>::value,
               "Attempted to default construct a reference element in a tuple");}
 
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY constexpr
+        _LIBCUDACXX_INLINE_VISIBILITY constexpr
         __tuple_leaf(integral_constant<int, 0>, const _Alloc&)
             : __value_()
         {static_assert(!is_reference<_Hp>::value,
               "Attempted to default construct a reference element in a tuple");}
 
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY constexpr
+        _LIBCUDACXX_INLINE_VISIBILITY constexpr
         __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a)
             : __value_(allocator_arg_t(), __a)
         {static_assert(!is_reference<_Hp>::value,
               "Attempted to default construct a reference element in a tuple");}
 
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY constexpr
+        _LIBCUDACXX_INLINE_VISIBILITY constexpr
         __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a)
             : __value_(__a)
         {static_assert(!is_reference<_Hp>::value,
@@ -312,74 +312,74 @@ public:
                     >::value
                 >
             >
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
-            : __value_(_VSTD::forward<_Tp>(__t))
+            : __value_(_CUDA_VSTD::forward<_Tp>(__t))
         {static_assert(__can_bind_reference<_Tp&&>(),
        "Attempted construction of reference element binds to a temporary whose lifetime has ended");}
 
     template <class _Tp, class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
-            : __value_(_VSTD::forward<_Tp>(__t))
+            : __value_(_CUDA_VSTD::forward<_Tp>(__t))
         {static_assert(__can_bind_reference<_Tp&&>(),
        "Attempted construction of reference element binds to a temporary whose lifetime has ended");}
 
     template <class _Tp, class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a, _Tp&& __t)
-            : __value_(allocator_arg_t(), __a, _VSTD::forward<_Tp>(__t))
+            : __value_(allocator_arg_t(), __a, _CUDA_VSTD::forward<_Tp>(__t))
         {static_assert(!is_reference<_Hp>::value,
             "Attempted to uses-allocator construct a reference element in a tuple");}
 
     template <class _Tp, class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
-            : __value_(_VSTD::forward<_Tp>(__t), __a)
+            : __value_(_CUDA_VSTD::forward<_Tp>(__t), __a)
         {static_assert(!is_reference<_Hp>::value,
            "Attempted to uses-allocator construct a reference element in a tuple");}
 
     __tuple_leaf(const __tuple_leaf& __t) = default;
     __tuple_leaf(__tuple_leaf&& __t) = default;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     int swap(__tuple_leaf& __t) _NOEXCEPT_(__is_nothrow_swappable<__tuple_leaf>::value)
     {
-        _VSTD::swap(*this, __t);
+        _CUDA_VSTD::swap(*this, __t);
         return 0;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     int swap(const __tuple_leaf& __t) const _NOEXCEPT_(__is_nothrow_swappable<const __tuple_leaf>::value) {
-        _VSTD::swap(*this, __t);
+        _CUDA_VSTD::swap(*this, __t);
         return 0;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11       _Hp& get()       _NOEXCEPT {return __value_;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const _Hp& get() const _NOEXCEPT {return __value_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11       _Hp& get()       _NOEXCEPT {return __value_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 const _Hp& get() const _NOEXCEPT {return __value_;}
 };
 
 template <size_t _Ip, class _Hp>
 class __tuple_leaf<_Ip, _Hp, true>
     : private _Hp
 {
-    _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     __tuple_leaf& operator=(const __tuple_leaf&);
 public:
-    _LIBCPP_INLINE_VISIBILITY constexpr __tuple_leaf()
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr __tuple_leaf()
              _NOEXCEPT_(is_nothrow_default_constructible<_Hp>::value) {}
 
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY constexpr
+        _LIBCUDACXX_INLINE_VISIBILITY constexpr
         __tuple_leaf(integral_constant<int, 0>, const _Alloc&) {}
 
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY constexpr
+        _LIBCUDACXX_INLINE_VISIBILITY constexpr
         __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a)
             : _Hp(allocator_arg_t(), __a) {}
 
     template <class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY constexpr
+        _LIBCUDACXX_INLINE_VISIBILITY constexpr
         __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a)
             : _Hp(__a) {}
 
@@ -391,48 +391,48 @@ public:
                   >::value
                 >
             >
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         explicit __tuple_leaf(_Tp&& __t) _NOEXCEPT_((is_nothrow_constructible<_Hp, _Tp>::value))
-            : _Hp(_VSTD::forward<_Tp>(__t)) {}
+            : _Hp(_CUDA_VSTD::forward<_Tp>(__t)) {}
 
     template <class _Tp, class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY constexpr
+        _LIBCUDACXX_INLINE_VISIBILITY constexpr
         explicit __tuple_leaf(integral_constant<int, 0>, const _Alloc&, _Tp&& __t)
-            : _Hp(_VSTD::forward<_Tp>(__t)) {}
+            : _Hp(_CUDA_VSTD::forward<_Tp>(__t)) {}
 
     template <class _Tp, class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY constexpr
+        _LIBCUDACXX_INLINE_VISIBILITY constexpr
         explicit __tuple_leaf(integral_constant<int, 1>, const _Alloc& __a, _Tp&& __t)
-            : _Hp(allocator_arg_t(), __a, _VSTD::forward<_Tp>(__t)) {}
+            : _Hp(allocator_arg_t(), __a, _CUDA_VSTD::forward<_Tp>(__t)) {}
 
     template <class _Tp, class _Alloc>
-        _LIBCPP_INLINE_VISIBILITY constexpr
+        _LIBCUDACXX_INLINE_VISIBILITY constexpr
         explicit __tuple_leaf(integral_constant<int, 2>, const _Alloc& __a, _Tp&& __t)
-            : _Hp(_VSTD::forward<_Tp>(__t), __a) {}
+            : _Hp(_CUDA_VSTD::forward<_Tp>(__t), __a) {}
 
     __tuple_leaf(__tuple_leaf const &) = default;
     __tuple_leaf(__tuple_leaf &&) = default;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     int
     swap(__tuple_leaf& __t) _NOEXCEPT_(__is_nothrow_swappable<__tuple_leaf>::value)
     {
-        _VSTD::swap(*this, __t);
+        _CUDA_VSTD::swap(*this, __t);
         return 0;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     int swap(const __tuple_leaf& __rhs) const _NOEXCEPT_(__is_nothrow_swappable<const __tuple_leaf>::value) {
-        _VSTD::swap(*this, __rhs);
+        _CUDA_VSTD::swap(*this, __rhs);
         return 0;
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11       _Hp& get()       _NOEXCEPT {return static_cast<_Hp&>(*this);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11 const _Hp& get() const _NOEXCEPT {return static_cast<const _Hp&>(*this);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11       _Hp& get()       _NOEXCEPT {return static_cast<_Hp&>(*this);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 const _Hp& get() const _NOEXCEPT {return static_cast<const _Hp&>(*this);}
 };
 
 template <class ..._Tp>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void __swallow(_Tp&&...) _NOEXCEPT {}
 
 template <class _Tp>
@@ -448,106 +448,106 @@ struct __all_default_constructible<__tuple_types<_Tp...>>
 template<class _Indx, class ..._Tp> struct __tuple_impl;
 
 template<size_t ..._Indx, class ..._Tp>
-struct _LIBCPP_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
+struct _LIBCUDACXX_DECLSPEC_EMPTY_BASES __tuple_impl<__tuple_indices<_Indx...>, _Tp...>
     : public __tuple_leaf<_Indx, _Tp>...
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr __tuple_impl()
         _NOEXCEPT_(__all<is_nothrow_default_constructible<_Tp>::value...>::value) {}
 
     template <size_t ..._Uf, class ..._Tf,
               size_t ..._Ul, class ..._Tl, class ..._Up>
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         explicit
         __tuple_impl(__tuple_indices<_Uf...>, __tuple_types<_Tf...>,
                      __tuple_indices<_Ul...>, __tuple_types<_Tl...>,
                      _Up&&... __u)
                      _NOEXCEPT_((__all<is_nothrow_constructible<_Tf, _Up>::value...>::value &&
                                  __all<is_nothrow_default_constructible<_Tl>::value...>::value)) :
-            __tuple_leaf<_Uf, _Tf>(_VSTD::forward<_Up>(__u))...,
+            __tuple_leaf<_Uf, _Tf>(_CUDA_VSTD::forward<_Up>(__u))...,
             __tuple_leaf<_Ul, _Tl>()...
             {}
 
     template <class _Alloc, size_t ..._Uf, class ..._Tf,
               size_t ..._Ul, class ..._Tl, class ..._Up>
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         explicit
         __tuple_impl(allocator_arg_t, const _Alloc& __a,
                      __tuple_indices<_Uf...>, __tuple_types<_Tf...>,
                      __tuple_indices<_Ul...>, __tuple_types<_Tl...>,
                      _Up&&... __u) :
             __tuple_leaf<_Uf, _Tf>(__uses_alloc_ctor<_Tf, _Alloc, _Up>(), __a,
-            _VSTD::forward<_Up>(__u))...,
+            _CUDA_VSTD::forward<_Up>(__u))...,
             __tuple_leaf<_Ul, _Tl>(__uses_alloc_ctor<_Tl, _Alloc>(), __a)...
             {}
 
     template <class _Tuple,
               class = __enable_if_t<__tuple_constructible<_Tuple, tuple<_Tp...> >::value>
              >
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         __tuple_impl(_Tuple&& __t) _NOEXCEPT_((__all<is_nothrow_constructible<_Tp, typename tuple_element<_Indx,
                                        typename __make_tuple_types<_Tuple>::type>::type>::value...>::value))
-            : __tuple_leaf<_Indx, _Tp>(_VSTD::forward<typename tuple_element<_Indx,
-                                       typename __make_tuple_types<_Tuple>::type>::type>(_VSTD::get<_Indx>(__t)))...
+            : __tuple_leaf<_Indx, _Tp>(_CUDA_VSTD::forward<typename tuple_element<_Indx,
+                                       typename __make_tuple_types<_Tuple>::type>::type>(_CUDA_VSTD::get<_Indx>(__t)))...
             {}
 
     template <class _Alloc, class _Tuple,
               class = __enable_if_t<__tuple_constructible<_Tuple, tuple<_Tp...> >::value>
              >
-        _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+        _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         __tuple_impl(allocator_arg_t, const _Alloc& __a, _Tuple&& __t)
             : __tuple_leaf<_Indx, _Tp>(__uses_alloc_ctor<_Tp, _Alloc, typename tuple_element<_Indx,
                                        typename __make_tuple_types<_Tuple>::type>::type>(), __a,
-                                       _VSTD::forward<typename tuple_element<_Indx,
-                                       typename __make_tuple_types<_Tuple>::type>::type>(_VSTD::get<_Indx>(__t)))...
+                                       _CUDA_VSTD::forward<typename tuple_element<_Indx,
+                                       typename __make_tuple_types<_Tuple>::type>::type>(_CUDA_VSTD::get<_Indx>(__t)))...
             {}
 
     __tuple_impl(const __tuple_impl&) = default;
     __tuple_impl(__tuple_impl&&) = default;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     void swap(__tuple_impl& __t)
         _NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
     {
-        _VSTD::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t))...);
+        _CUDA_VSTD::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<__tuple_leaf<_Indx, _Tp>&>(__t))...);
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     void swap(const __tuple_impl& __t) const
         _NOEXCEPT_(__all<__is_nothrow_swappable<const _Tp>::value...>::value)
     {
-        _VSTD::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<const __tuple_leaf<_Indx, _Tp>&>(__t))...);
+        _CUDA_VSTD::__swallow(__tuple_leaf<_Indx, _Tp>::swap(static_cast<const __tuple_leaf<_Indx, _Tp>&>(__t))...);
     }
 };
 
 template<class _Dest, class _Source, size_t ..._Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void __memberwise_copy_assign(_Dest& __dest, _Source const& __source, __tuple_indices<_Np...>) {
-    _VSTD::__swallow(((_VSTD::get<_Np>(__dest) = _VSTD::get<_Np>(__source)), void(), 0)...);
+    _CUDA_VSTD::__swallow(((_CUDA_VSTD::get<_Np>(__dest) = _CUDA_VSTD::get<_Np>(__source)), void(), 0)...);
 }
 
 template<class _Dest, class _Source, class ..._Up, size_t ..._Np>
-_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+_LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 void __memberwise_forward_assign(_Dest& __dest, _Source&& __source, __tuple_types<_Up...>, __tuple_indices<_Np...>) {
-    _VSTD::__swallow(((
-        _VSTD::get<_Np>(__dest) = _VSTD::forward<_Up>(_VSTD::get<_Np>(__source))
+    _CUDA_VSTD::__swallow(((
+        _CUDA_VSTD::get<_Np>(__dest) = _CUDA_VSTD::forward<_Up>(_CUDA_VSTD::get<_Np>(__source))
     ), void(), 0)...);
 }
 
 template <class ..._Tp>
-class _LIBCPP_TEMPLATE_VIS tuple
+class _LIBCUDACXX_TEMPLATE_VIS tuple
 {
     typedef __tuple_impl<typename __make_tuple_indices<sizeof...(_Tp)>::type, _Tp...> _BaseT;
 
     _BaseT __base_;
 
-    template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_AFTER_CXX11
+    template <size_t _Jp, class ..._Up> friend _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         typename tuple_element<_Jp, tuple<_Up...> >::type& get(tuple<_Up...>&) _NOEXCEPT;
-    template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_AFTER_CXX11
+    template <size_t _Jp, class ..._Up> friend _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         const typename tuple_element<_Jp, tuple<_Up...> >::type& get(const tuple<_Up...>&) _NOEXCEPT;
-    template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_AFTER_CXX11
+    template <size_t _Jp, class ..._Up> friend _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         typename tuple_element<_Jp, tuple<_Up...> >::type&& get(tuple<_Up...>&&) _NOEXCEPT;
-    template <size_t _Jp, class ..._Up> friend _LIBCPP_CONSTEXPR_AFTER_CXX11
+    template <size_t _Jp, class ..._Up> friend _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
         const typename tuple_element<_Jp, tuple<_Up...> >::type&& get(const tuple<_Up...>&&) _NOEXCEPT;
 public:
     // [tuple.cnstr]
@@ -558,7 +558,7 @@ public:
             _IsImpDefault<_Tp>... // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     tuple()
         _NOEXCEPT_(_And<is_nothrow_default_constructible<_Tp>...>::value)
     { }
@@ -570,7 +570,7 @@ public:
             _Not<_Lazy<_And, _IsImpDefault<_Tp>...> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
     explicit tuple()
         _NOEXCEPT_(_And<is_nothrow_default_constructible<_Tp>...>::value)
     { }
@@ -580,7 +580,7 @@ public:
             _IsImpDefault<_Tp>... // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple(allocator_arg_t, _Alloc const& __a)
       : __base_(allocator_arg_t(), __a,
                     __tuple_indices<>(), __tuple_types<>(),
@@ -595,7 +595,7 @@ public:
             _Not<_Lazy<_And, _IsImpDefault<_Tp>...> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     explicit tuple(allocator_arg_t, _Alloc const& __a)
       : __base_(allocator_arg_t(), __a,
                     __tuple_indices<>(), __tuple_types<>(),
@@ -610,7 +610,7 @@ public:
             is_convertible<const _Tp&, _Tp>... // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     tuple(const _Tp& ... __t)
         _NOEXCEPT_(_And<is_nothrow_copy_constructible<_Tp>...>::value)
         : __base_(typename __make_tuple_indices<sizeof...(_Tp)>::type(),
@@ -627,7 +627,7 @@ public:
             _Not<_Lazy<_And, is_convertible<const _Tp&, _Tp>...> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit tuple(const _Tp& ... __t)
         _NOEXCEPT_(_And<is_nothrow_copy_constructible<_Tp>...>::value)
         : __base_(typename __make_tuple_indices<sizeof...(_Tp)>::type(),
@@ -644,7 +644,7 @@ public:
             is_convertible<const _Tp&, _Tp>... // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
         : __base_(allocator_arg_t(), __a,
                 typename __make_tuple_indices<sizeof...(_Tp)>::type(),
@@ -661,7 +661,7 @@ public:
             _Not<_Lazy<_And, is_convertible<const _Tp&, _Tp>...> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     explicit tuple(allocator_arg_t, const _Alloc& __a, const _Tp& ... __t)
         : __base_(allocator_arg_t(), __a,
                 typename __make_tuple_indices<sizeof...(_Tp)>::type(),
@@ -689,14 +689,14 @@ public:
             is_convertible<_Up, _Tp>... // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     tuple(_Up&&... __u)
         _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
         : __base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
                     typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
                     typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(),
                     typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
-                    _VSTD::forward<_Up>(__u)...) {}
+                    _CUDA_VSTD::forward<_Up>(__u)...) {}
 
     template <class ..._Up, __enable_if_t<
         _And<
@@ -705,14 +705,14 @@ public:
             _Not<_Lazy<_And, is_convertible<_Up, _Tp>...> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit tuple(_Up&&... __u)
         _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
         : __base_(typename __make_tuple_indices<sizeof...(_Up)>::type(),
                     typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
                     typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(),
                     typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
-                    _VSTD::forward<_Up>(__u)...) {}
+                    _CUDA_VSTD::forward<_Up>(__u)...) {}
 
     template <class _Alloc, class ..._Up, __enable_if_t<
         _And<
@@ -721,14 +721,14 @@ public:
             is_convertible<_Up, _Tp>... // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
         : __base_(allocator_arg_t(), __a,
                     typename __make_tuple_indices<sizeof...(_Up)>::type(),
                     typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
                     typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(),
                     typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
-                    _VSTD::forward<_Up>(__u)...) {}
+                    _CUDA_VSTD::forward<_Up>(__u)...) {}
 
     template <class _Alloc, class ..._Up, __enable_if_t<
         _And<
@@ -737,14 +737,14 @@ public:
             _Not<_Lazy<_And, is_convertible<_Up, _Tp>...> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     explicit tuple(allocator_arg_t, const _Alloc& __a, _Up&&... __u)
         : __base_(allocator_arg_t(), __a,
                     typename __make_tuple_indices<sizeof...(_Up)>::type(),
                     typename __make_tuple_types<tuple, sizeof...(_Up)>::type(),
                     typename __make_tuple_indices<sizeof...(_Tp), sizeof...(_Up)>::type(),
                     typename __make_tuple_types<tuple, sizeof...(_Tp), sizeof...(_Up)>::type(),
-                    _VSTD::forward<_Up>(__u)...) {}
+                    _CUDA_VSTD::forward<_Up>(__u)...) {}
 
     // Copy and move constructors (including the allocator_arg_t variants)
     tuple(const tuple&) = default;
@@ -753,7 +753,7 @@ public:
     template <class _Alloc, template<class...> class _And = _And, __enable_if_t<
         _And<is_copy_constructible<_Tp>...>::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple(allocator_arg_t, const _Alloc& __alloc, const tuple& __t)
         : __base_(allocator_arg_t(), __alloc, __t)
     { }
@@ -761,9 +761,9 @@ public:
     template <class _Alloc, template<class...> class _And = _And, __enable_if_t<
         _And<is_move_constructible<_Tp>...>::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple(allocator_arg_t, const _Alloc& __alloc, tuple&& __t)
-        : __base_(allocator_arg_t(), __alloc, _VSTD::move(__t))
+        : __base_(allocator_arg_t(), __alloc, _CUDA_VSTD::move(__t))
     { }
 
     // tuple(const tuple<U...>&) constructors (including allocator_arg_t variants)
@@ -797,7 +797,7 @@ public:
             is_convertible<const _Up&, _Tp>... // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     tuple(const tuple<_Up...>& __t)
         _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, const _Up&>...>::value))
         : __base_(__t)
@@ -809,7 +809,7 @@ public:
             _Not<_Lazy<_And, is_convertible<const _Up&, _Tp>...> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit tuple(const tuple<_Up...>& __t)
         _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, const _Up&>...>::value))
         : __base_(__t)
@@ -821,7 +821,7 @@ public:
             is_convertible<const _Up&, _Tp>... // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple(allocator_arg_t, const _Alloc& __a, const tuple<_Up...>& __t)
         : __base_(allocator_arg_t(), __a, __t)
     { }
@@ -832,26 +832,26 @@ public:
             _Not<_Lazy<_And, is_convertible<const _Up&, _Tp>...> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     explicit tuple(allocator_arg_t, const _Alloc& __a, const tuple<_Up...>& __t)
         : __base_(allocator_arg_t(), __a, __t)
     { }
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     // tuple(tuple<U...>&) constructors (including allocator_arg_t variants)
 
     template <class... _Up, enable_if_t<
         _EnableCtorFromUTypesTuple<tuple<_Up...>&>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
         explicit(!(is_convertible_v<_Up&, _Tp> && ...))
     tuple(tuple<_Up...>& __t) : __base_(__t) {}
 
     template <class _Alloc, class... _Up, enable_if_t<
         _EnableCtorFromUTypesTuple<tuple<_Up...>&>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
         explicit(!(is_convertible_v<_Up&, _Tp> && ...))
     tuple(allocator_arg_t, const _Alloc& __alloc, tuple<_Up...>& __t) : __base_(allocator_arg_t(), __alloc, __t) {}
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
     // tuple(tuple<U...>&&) constructors (including allocator_arg_t variants)
 
@@ -861,10 +861,10 @@ public:
             is_convertible<_Up, _Tp>... // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     tuple(tuple<_Up...>&& __t)
         _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
-        : __base_(_VSTD::move(__t))
+        : __base_(_CUDA_VSTD::move(__t))
     { }
 
     template <class ..._Up, __enable_if_t<
@@ -873,10 +873,10 @@ public:
             _Not<_Lazy<_And, is_convertible<_Up, _Tp>...> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit tuple(tuple<_Up...>&& __t)
         _NOEXCEPT_((_And<is_nothrow_constructible<_Tp, _Up>...>::value))
-        : __base_(_VSTD::move(__t))
+        : __base_(_CUDA_VSTD::move(__t))
     { }
 
     template <class _Alloc, class ..._Up, __enable_if_t<
@@ -885,9 +885,9 @@ public:
             is_convertible<_Up, _Tp>... // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple(allocator_arg_t, const _Alloc& __a, tuple<_Up...>&& __t)
-        : __base_(allocator_arg_t(), __a, _VSTD::move(__t))
+        : __base_(allocator_arg_t(), __a, _CUDA_VSTD::move(__t))
     { }
 
     template <class _Alloc, class ..._Up, __enable_if_t<
@@ -896,27 +896,27 @@ public:
             _Not<_Lazy<_And, is_convertible<_Up, _Tp>...> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     explicit tuple(allocator_arg_t, const _Alloc& __a, tuple<_Up...>&& __t)
-        : __base_(allocator_arg_t(), __a, _VSTD::move(__t))
+        : __base_(allocator_arg_t(), __a, _CUDA_VSTD::move(__t))
     { }
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     // tuple(const tuple<U...>&&) constructors (including allocator_arg_t variants)
 
     template <class... _Up, enable_if_t<
         _EnableCtorFromUTypesTuple<const tuple<_Up...>&&>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
         explicit(!(is_convertible_v<const _Up&&, _Tp> && ...))
     tuple(const tuple<_Up...>&& __t) : __base_(std::move(__t)) {}
 
     template <class _Alloc, class... _Up, enable_if_t<
         _EnableCtorFromUTypesTuple<const tuple<_Up...>&&>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
         explicit(!(is_convertible_v<const _Up&&, _Tp> && ...))
     tuple(allocator_arg_t, const _Alloc& __alloc, const tuple<_Up...>&& __t)
         : __base_(allocator_arg_t(), __alloc, std::move(__t)) {}
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
     // tuple(const pair<U1, U2>&) constructors (including allocator_arg_t variants)
 
@@ -950,7 +950,7 @@ public:
             _BothImplicitlyConvertible<const pair<_Up1, _Up2>&> // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     tuple(const pair<_Up1, _Up2>& __p)
         _NOEXCEPT_((_NothrowConstructibleFromPair<const pair<_Up1, _Up2>&>::value))
         : __base_(__p)
@@ -962,7 +962,7 @@ public:
             _Not<_BothImplicitlyConvertible<const pair<_Up1, _Up2>&> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit tuple(const pair<_Up1, _Up2>& __p)
         _NOEXCEPT_((_NothrowConstructibleFromPair<const pair<_Up1, _Up2>&>::value))
         : __base_(__p)
@@ -974,7 +974,7 @@ public:
             _BothImplicitlyConvertible<const pair<_Up1, _Up2>&> // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple(allocator_arg_t, const _Alloc& __a, const pair<_Up1, _Up2>& __p)
         : __base_(allocator_arg_t(), __a, __p)
     { }
@@ -985,23 +985,23 @@ public:
             _Not<_BothImplicitlyConvertible<const pair<_Up1, _Up2>&> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     explicit tuple(allocator_arg_t, const _Alloc& __a, const pair<_Up1, _Up2>& __p)
         : __base_(allocator_arg_t(), __a, __p)
     { }
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     // tuple(pair<U1, U2>&) constructors (including allocator_arg_t variants)
 
     template <class _U1, class _U2, enable_if_t<
         _EnableCtorFromPair<pair<_U1, _U2>&>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
         explicit(!_BothImplicitlyConvertible<pair<_U1, _U2>&>::value)
     tuple(pair<_U1, _U2>& __p) : __base_(__p) {}
 
     template <class _Alloc, class _U1, class _U2, enable_if_t<
         _EnableCtorFromPair<std::pair<_U1, _U2>&>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
         explicit(!_BothImplicitlyConvertible<pair<_U1, _U2>&>::value)
     tuple(allocator_arg_t, const _Alloc& __alloc, pair<_U1, _U2>& __p) : __base_(allocator_arg_t(), __alloc, __p) {}
 #endif
@@ -1014,10 +1014,10 @@ public:
             _BothImplicitlyConvertible<pair<_Up1, _Up2>&&> // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     tuple(pair<_Up1, _Up2>&& __p)
         _NOEXCEPT_((_NothrowConstructibleFromPair<pair<_Up1, _Up2>&&>::value))
-        : __base_(_VSTD::move(__p))
+        : __base_(_CUDA_VSTD::move(__p))
     { }
 
     template <class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
@@ -1026,10 +1026,10 @@ public:
             _Not<_BothImplicitlyConvertible<pair<_Up1, _Up2>&&> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     explicit tuple(pair<_Up1, _Up2>&& __p)
         _NOEXCEPT_((_NothrowConstructibleFromPair<pair<_Up1, _Up2>&&>::value))
-        : __base_(_VSTD::move(__p))
+        : __base_(_CUDA_VSTD::move(__p))
     { }
 
     template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
@@ -1038,9 +1038,9 @@ public:
             _BothImplicitlyConvertible<pair<_Up1, _Up2>&&> // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple(allocator_arg_t, const _Alloc& __a, pair<_Up1, _Up2>&& __p)
-        : __base_(allocator_arg_t(), __a, _VSTD::move(__p))
+        : __base_(allocator_arg_t(), __a, _CUDA_VSTD::move(__p))
     { }
 
     template <class _Alloc, class _Up1, class _Up2, template<class...> class _And = _And, __enable_if_t<
@@ -1049,47 +1049,47 @@ public:
             _Not<_BothImplicitlyConvertible<pair<_Up1, _Up2>&&> > // explicit check
         >::value
     , int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     explicit tuple(allocator_arg_t, const _Alloc& __a, pair<_Up1, _Up2>&& __p)
-        : __base_(allocator_arg_t(), __a, _VSTD::move(__p))
+        : __base_(allocator_arg_t(), __a, _CUDA_VSTD::move(__p))
     { }
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     // tuple(const pair<U1, U2>&&) constructors (including allocator_arg_t variants)
 
     template <class _U1, class _U2, enable_if_t<
         _EnableCtorFromPair<const pair<_U1, _U2>&&>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
         explicit(!_BothImplicitlyConvertible<const pair<_U1, _U2>&&>::value)
     tuple(const pair<_U1, _U2>&& __p) : __base_(std::move(__p)) {}
 
     template <class _Alloc, class _U1, class _U2, enable_if_t<
         _EnableCtorFromPair<const pair<_U1, _U2>&&>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
         explicit(!_BothImplicitlyConvertible<const pair<_U1, _U2>&&>::value)
     tuple(allocator_arg_t, const _Alloc& __alloc, const pair<_U1, _U2>&& __p)
         : __base_(allocator_arg_t(), __alloc, std::move(__p)) {}
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
     // [tuple.assign]
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple& operator=(_If<_And<is_copy_assignable<_Tp>...>::value, tuple, __nat> const& __tuple)
         _NOEXCEPT_((_And<is_nothrow_copy_assignable<_Tp>...>::value))
     {
-        _VSTD::__memberwise_copy_assign(*this, __tuple,
+        _CUDA_VSTD::__memberwise_copy_assign(*this, __tuple,
             typename __make_tuple_indices<sizeof...(_Tp)>::type());
         return *this;
     }
 
-#if _LIBCPP_STD_VER > 20
-    _LIBCPP_HIDE_FROM_ABI constexpr
+#if _LIBCUDACXX_STD_VER > 20
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     const tuple& operator=(tuple const& __tuple) const
       requires (_And<is_copy_assignable<const _Tp>...>::value) {
         std::__memberwise_copy_assign(*this, __tuple, typename __make_tuple_indices<sizeof...(_Tp)>::type());
         return *this;
     }
 
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     const tuple& operator=(tuple&& __tuple) const
       requires (_And<is_assignable<const _Tp&, _Tp>...>::value) {
         std::__memberwise_forward_assign(*this,
@@ -1098,13 +1098,13 @@ public:
                                          typename __make_tuple_indices<sizeof...(_Tp)>::type());
         return *this;
     }
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple& operator=(_If<_And<is_move_assignable<_Tp>...>::value, tuple, __nat>&& __tuple)
         _NOEXCEPT_((_And<is_nothrow_move_assignable<_Tp>...>::value))
     {
-        _VSTD::__memberwise_forward_assign(*this, _VSTD::move(__tuple),
+        _CUDA_VSTD::__memberwise_forward_assign(*this, _CUDA_VSTD::move(__tuple),
             __tuple_types<_Tp...>(),
             typename __make_tuple_indices<sizeof...(_Tp)>::type());
         return *this;
@@ -1116,11 +1116,11 @@ public:
             is_assignable<_Tp&, _Up const&>...
         >::value
     ,int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple& operator=(tuple<_Up...> const& __tuple)
         _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value))
     {
-        _VSTD::__memberwise_copy_assign(*this, __tuple,
+        _CUDA_VSTD::__memberwise_copy_assign(*this, __tuple,
             typename __make_tuple_indices<sizeof...(_Tp)>::type());
         return *this;
     }
@@ -1131,22 +1131,22 @@ public:
             is_assignable<_Tp&, _Up>...
         >::value
     ,int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple& operator=(tuple<_Up...>&& __tuple)
         _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up>...>::value))
     {
-        _VSTD::__memberwise_forward_assign(*this, _VSTD::move(__tuple),
+        _CUDA_VSTD::__memberwise_forward_assign(*this, _CUDA_VSTD::move(__tuple),
             __tuple_types<_Up...>(),
             typename __make_tuple_indices<sizeof...(_Tp)>::type());
         return *this;
     }
 
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     template <class... _UTypes, enable_if_t<
         _And<_BoolConstant<sizeof...(_Tp) == sizeof...(_UTypes)>,
              is_assignable<const _Tp&, const _UTypes&>...>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     const tuple& operator=(const tuple<_UTypes...>& __u) const {
         std::__memberwise_copy_assign(*this,
                                       __u,
@@ -1157,7 +1157,7 @@ public:
     template <class... _UTypes, enable_if_t<
         _And<_BoolConstant<sizeof...(_Tp) == sizeof...(_UTypes)>,
              is_assignable<const _Tp&, _UTypes>...>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     const tuple& operator=(tuple<_UTypes...>&& __u) const {
         std::__memberwise_forward_assign(*this,
                                          __u,
@@ -1165,7 +1165,7 @@ public:
                                          typename __make_tuple_indices<sizeof...(_Tp)>::type());
         return *this;
     }
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
     template <template<class...> class Pred, bool _Const,
               class _Pair, class _DecayedPair = __uncvref_t<_Pair>, class _Tuple = tuple>
@@ -1184,10 +1184,10 @@ public:
     template <bool _Const, class _Pair>
     struct _NothrowAssignFromPair : _AssignPredicateFromPair<is_nothrow_assignable, _Const, _Pair> {};
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
     template <class _U1, class _U2, enable_if_t<
         _EnableAssignFromPair<true, const pair<_U1, _U2>&>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     const tuple& operator=(const pair<_U1, _U2>& __pair) const
       noexcept(_NothrowAssignFromPair<true, const pair<_U1, _U2>&>::value) {
         std::get<0>(*this) = __pair.first;
@@ -1197,36 +1197,36 @@ public:
 
     template <class _U1, class _U2, enable_if_t<
         _EnableAssignFromPair<true, pair<_U1, _U2>&&>::value>* = nullptr>
-    _LIBCPP_HIDE_FROM_ABI constexpr
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     const tuple& operator=(pair<_U1, _U2>&& __pair) const
       noexcept(_NothrowAssignFromPair<true, pair<_U1, _U2>&&>::value) {
         std::get<0>(*this) = std::move(__pair.first);
         std::get<1>(*this) = std::move(__pair.second);
         return *this;
     }
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
     template<class _Up1, class _Up2, __enable_if_t<
         _EnableAssignFromPair<false, pair<_Up1, _Up2> const&>::value
     ,int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple& operator=(pair<_Up1, _Up2> const& __pair)
         _NOEXCEPT_((_NothrowAssignFromPair<false, pair<_Up1, _Up2> const&>::value))
     {
-        _VSTD::get<0>(*this) = __pair.first;
-        _VSTD::get<1>(*this) = __pair.second;
+        _CUDA_VSTD::get<0>(*this) = __pair.first;
+        _CUDA_VSTD::get<1>(*this) = __pair.second;
         return *this;
     }
 
     template<class _Up1, class _Up2, __enable_if_t<
         _EnableAssignFromPair<false, pair<_Up1, _Up2>&&>::value
     ,int> = 0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple& operator=(pair<_Up1, _Up2>&& __pair)
         _NOEXCEPT_((_NothrowAssignFromPair<false, pair<_Up1, _Up2>&&>::value))
     {
-        _VSTD::get<0>(*this) = _VSTD::forward<_Up1>(__pair.first);
-        _VSTD::get<1>(*this) = _VSTD::forward<_Up2>(__pair.second);
+        _CUDA_VSTD::get<0>(*this) = _CUDA_VSTD::forward<_Up1>(__pair.first);
+        _CUDA_VSTD::get<1>(*this) = _CUDA_VSTD::forward<_Up2>(__pair.second);
         return *this;
     }
 
@@ -1237,11 +1237,11 @@ public:
             is_assignable<_Tp&, _Up const&>...
         >::value
     > >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple& operator=(array<_Up, _Np> const& __array)
         _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up const&>...>::value))
     {
-        _VSTD::__memberwise_copy_assign(*this, __array,
+        _CUDA_VSTD::__memberwise_copy_assign(*this, __array,
             typename __make_tuple_indices<sizeof...(_Tp)>::type());
         return *this;
     }
@@ -1253,55 +1253,55 @@ public:
             is_assignable<_Tp&, _Up>...
         >::value
     > >
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     tuple& operator=(array<_Up, _Np>&& __array)
         _NOEXCEPT_((_And<is_nothrow_assignable<_Tp&, _Up>...>::value))
     {
-        _VSTD::__memberwise_forward_assign(*this, _VSTD::move(__array),
+        _CUDA_VSTD::__memberwise_forward_assign(*this, _CUDA_VSTD::move(__array),
             __tuple_types<_If<true, _Up, _Tp>...>(),
             typename __make_tuple_indices<sizeof...(_Tp)>::type());
         return *this;
     }
 
     // [tuple.swap]
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void swap(tuple& __t) _NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
         {__base_.swap(__t.__base_);}
 
-#if _LIBCPP_STD_VER > 20
-    _LIBCPP_HIDE_FROM_ABI constexpr
+#if _LIBCUDACXX_STD_VER > 20
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr
     void swap(const tuple& __t) const noexcept(__all<is_nothrow_swappable_v<const _Tp&>...>::value) {
         __base_.swap(__t.__base_);
     }
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 };
 
 template <>
-class _LIBCPP_TEMPLATE_VIS tuple<>
+class _LIBCUDACXX_TEMPLATE_VIS tuple<>
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY constexpr
+    _LIBCUDACXX_INLINE_VISIBILITY constexpr
         tuple() _NOEXCEPT = default;
     template <class _Alloc>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         tuple(allocator_arg_t, const _Alloc&) _NOEXCEPT {}
     template <class _Alloc>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         tuple(allocator_arg_t, const _Alloc&, const tuple&) _NOEXCEPT {}
     template <class _Up>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         tuple(array<_Up, 0>) _NOEXCEPT {}
     template <class _Alloc, class _Up>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         tuple(allocator_arg_t, const _Alloc&, array<_Up, 0>) _NOEXCEPT {}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void swap(tuple&) _NOEXCEPT {}
-#if _LIBCPP_STD_VER > 20
-    _LIBCPP_HIDE_FROM_ABI constexpr void swap(const tuple&) const noexcept {}
+#if _LIBCUDACXX_STD_VER > 20
+    _LIBCUDACXX_HIDE_FROM_ABI constexpr void swap(const tuple&) const noexcept {}
 #endif
 };
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 template <class... _TTypes, class... _UTypes, template<class> class _TQual, template<class> class _UQual>
     requires requires { typename tuple<common_reference_t<_TQual<_TTypes>, _UQual<_UTypes>>...>; }
 struct basic_common_reference<tuple<_TTypes...>, tuple<_UTypes...>, _TQual, _UQual> {
@@ -1313,9 +1313,9 @@ template <class... _TTypes, class... _UTypes>
 struct common_type<tuple<_TTypes...>, tuple<_UTypes...>> {
     using type = tuple<common_type_t<_TTypes, _UTypes>...>;
 };
-#endif // _LIBCPP_STD_VER > 20
+#endif // _LIBCUDACXX_STD_VER > 20
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class ..._Tp>
 tuple(_Tp...) -> tuple<_Tp...>;
 template <class _Tp1, class _Tp2>
@@ -1329,15 +1329,15 @@ tuple(allocator_arg_t, _Alloc, tuple<_Tp...>) -> tuple<_Tp...>;
 #endif
 
 template <class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 __enable_if_t<__all<__is_swappable<_Tp>::value...>::value, void>
 swap(tuple<_Tp...>& __t, tuple<_Tp...>& __u)
                  _NOEXCEPT_(__all<__is_nothrow_swappable<_Tp>::value...>::value)
     {__t.swap(__u);}
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 template <class... _Tp>
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 enable_if_t<__all<is_swappable_v<const _Tp>...>::value, void>
 swap(const tuple<_Tp...>& __lhs, const tuple<_Tp...>& __rhs)
         noexcept(__all<is_nothrow_swappable_v<const _Tp>...>::value) {
@@ -1348,58 +1348,58 @@ swap(const tuple<_Tp...>& __lhs, const tuple<_Tp...>& __rhs)
 // get
 
 template <size_t _Ip, class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 typename tuple_element<_Ip, tuple<_Tp...> >::type&
 get(tuple<_Tp...>& __t) _NOEXCEPT
 {
-    typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
+    typedef _LIBCUDACXX_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
     return static_cast<__tuple_leaf<_Ip, type>&>(__t.__base_).get();
 }
 
 template <size_t _Ip, class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const typename tuple_element<_Ip, tuple<_Tp...> >::type&
 get(const tuple<_Tp...>& __t) _NOEXCEPT
 {
-    typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
+    typedef _LIBCUDACXX_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
     return static_cast<const __tuple_leaf<_Ip, type>&>(__t.__base_).get();
 }
 
 template <size_t _Ip, class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 typename tuple_element<_Ip, tuple<_Tp...> >::type&&
 get(tuple<_Tp...>&& __t) _NOEXCEPT
 {
-    typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
+    typedef _LIBCUDACXX_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
     return static_cast<type&&>(
              static_cast<__tuple_leaf<_Ip, type>&&>(__t.__base_).get());
 }
 
 template <size_t _Ip, class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 const typename tuple_element<_Ip, tuple<_Tp...> >::type&&
 get(const tuple<_Tp...>&& __t) _NOEXCEPT
 {
-    typedef _LIBCPP_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
+    typedef _LIBCUDACXX_NODEBUG typename tuple_element<_Ip, tuple<_Tp...> >::type type;
     return static_cast<const type&&>(
              static_cast<const __tuple_leaf<_Ip, type>&&>(__t.__base_).get());
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 
 namespace __find_detail {
 
 static constexpr size_t __not_found = static_cast<size_t>(-1);
 static constexpr size_t __ambiguous = __not_found - 1;
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr size_t __find_idx_return(size_t __curr_i, size_t __res, bool __matches) {
     return !__matches ? __res :
         (__res == __not_found ? __curr_i : __ambiguous);
 }
 
 template <size_t _Nx>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr size_t __find_idx(size_t __i, const bool (&__matches)[_Nx]) {
   return __i == _Nx ? __not_found :
       __find_idx_return(__i, __find_idx(__i + 1, __matches), __matches[__i]);
@@ -1426,31 +1426,31 @@ struct __find_exactly_one_t
 };
 
 template <class _T1, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1& get(tuple<_Args...>& __tup) noexcept
 {
-    return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup);
+    return _CUDA_VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup);
 }
 
 template <class _T1, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1 const& get(tuple<_Args...> const& __tup) noexcept
 {
-    return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup);
+    return _CUDA_VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(__tup);
 }
 
 template <class _T1, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1&& get(tuple<_Args...>&& __tup) noexcept
 {
-    return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(_VSTD::move(__tup));
+    return _CUDA_VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(_CUDA_VSTD::move(__tup));
 }
 
 template <class _T1, class... _Args>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _T1 const&& get(tuple<_Args...> const&& __tup) noexcept
 {
-    return _VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(_VSTD::move(__tup));
+    return _CUDA_VSTD::get<__find_exactly_one_t<_T1, _Args...>::value>(_CUDA_VSTD::move(__tup));
 }
 
 #endif
@@ -1458,7 +1458,7 @@ constexpr _T1 const&& get(tuple<_Args...> const&& __tup) noexcept
 // tie
 
 template <class ..._Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 tuple<_Tp&...>
 tie(_Tp&... __t) _NOEXCEPT
 {
@@ -1469,7 +1469,7 @@ template <class _Up>
 struct __ignore_t
 {
     template <class _Tp>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     const __ignore_t& operator=(_Tp&&) const {return *this;}
 };
 
@@ -1478,29 +1478,29 @@ namespace {
 } // namespace
 
 template <class... _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 tuple<typename __unwrap_ref_decay<_Tp>::type...>
 make_tuple(_Tp&&... __t)
 {
-    return tuple<typename __unwrap_ref_decay<_Tp>::type...>(_VSTD::forward<_Tp>(__t)...);
+    return tuple<typename __unwrap_ref_decay<_Tp>::type...>(_CUDA_VSTD::forward<_Tp>(__t)...);
 }
 
 template <class... _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 tuple<_Tp&&...>
 forward_as_tuple(_Tp&&... __t) _NOEXCEPT
 {
-    return tuple<_Tp&&...>(_VSTD::forward<_Tp>(__t)...);
+    return tuple<_Tp&&...>(_CUDA_VSTD::forward<_Tp>(__t)...);
 }
 
 template <size_t _Ip>
 struct __tuple_equal
 {
     template <class _Tp, class _Up>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _Tp& __x, const _Up& __y)
     {
-        return __tuple_equal<_Ip - 1>()(__x, __y) && _VSTD::get<_Ip-1>(__x) == _VSTD::get<_Ip-1>(__y);
+        return __tuple_equal<_Ip - 1>()(__x, __y) && _CUDA_VSTD::get<_Ip-1>(__x) == _CUDA_VSTD::get<_Ip-1>(__y);
     }
 };
 
@@ -1508,7 +1508,7 @@ template <>
 struct __tuple_equal<0>
 {
     template <class _Tp, class _Up>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _Tp&, const _Up&)
     {
         return true;
@@ -1516,7 +1516,7 @@ struct __tuple_equal<0>
 };
 
 template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
 {
@@ -1524,32 +1524,32 @@ operator==(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
     return __tuple_equal<sizeof...(_Tp)>()(__x, __y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 // operator<=>
 
 template <class ..._Tp, class ..._Up, size_t ..._Is>
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 auto
 __tuple_compare_three_way(const tuple<_Tp...>& __x, const tuple<_Up...>& __y, index_sequence<_Is...>) {
     common_comparison_category_t<__synth_three_way_result<_Tp, _Up>...> __result = strong_ordering::equal;
-    static_cast<void>(((__result = _VSTD::__synth_three_way(_VSTD::get<_Is>(__x), _VSTD::get<_Is>(__y)), __result != 0) || ...));
+    static_cast<void>(((__result = _CUDA_VSTD::__synth_three_way(_CUDA_VSTD::get<_Is>(__x), _CUDA_VSTD::get<_Is>(__y)), __result != 0) || ...));
     return __result;
 }
 
 template <class ..._Tp, class ..._Up>
 requires (sizeof...(_Tp) == sizeof...(_Up))
-_LIBCPP_HIDE_FROM_ABI constexpr
+_LIBCUDACXX_HIDE_FROM_ABI constexpr
 common_comparison_category_t<__synth_three_way_result<_Tp, _Up>...>
 operator<=>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
 {
-    return _VSTD::__tuple_compare_three_way(__x, __y, index_sequence_for<_Tp...>{});
+    return _CUDA_VSTD::__tuple_compare_three_way(__x, __y, index_sequence_for<_Tp...>{});
 }
 
-#else // _LIBCPP_STD_VER > 17
+#else // _LIBCUDACXX_STD_VER > 17
 
 template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator!=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
 {
@@ -1560,13 +1560,13 @@ template <size_t _Ip>
 struct __tuple_less
 {
     template <class _Tp, class _Up>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _Tp& __x, const _Up& __y)
     {
         const size_t __idx = tuple_size<_Tp>::value - _Ip;
-        if (_VSTD::get<__idx>(__x) < _VSTD::get<__idx>(__y))
+        if (_CUDA_VSTD::get<__idx>(__x) < _CUDA_VSTD::get<__idx>(__y))
             return true;
-        if (_VSTD::get<__idx>(__y) < _VSTD::get<__idx>(__x))
+        if (_CUDA_VSTD::get<__idx>(__y) < _CUDA_VSTD::get<__idx>(__x))
             return false;
         return __tuple_less<_Ip-1>()(__x, __y);
     }
@@ -1576,7 +1576,7 @@ template <>
 struct __tuple_less<0>
 {
     template <class _Tp, class _Up>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     bool operator()(const _Tp&, const _Up&)
     {
         return false;
@@ -1584,7 +1584,7 @@ struct __tuple_less<0>
 };
 
 template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
 {
@@ -1593,7 +1593,7 @@ operator<(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
 }
 
 template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
 {
@@ -1601,7 +1601,7 @@ operator>(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
 }
 
 template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator>=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
 {
@@ -1609,14 +1609,14 @@ operator>=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
 }
 
 template <class ..._Tp, class ..._Up>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 bool
 operator<=(const tuple<_Tp...>& __x, const tuple<_Up...>& __y)
 {
     return !(__y < __x);
 }
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
 // tuple_cat
 
@@ -1625,7 +1625,7 @@ template <class _Tp, class _Up> struct __tuple_cat_type;
 template <class ..._Ttypes, class ..._Utypes>
 struct __tuple_cat_type<tuple<_Ttypes...>, __tuple_types<_Utypes...> >
 {
-    typedef _LIBCPP_NODEBUG tuple<_Ttypes..., _Utypes...> type;
+    typedef _LIBCUDACXX_NODEBUG tuple<_Ttypes..., _Utypes...> type;
 };
 
 template <class _ResultTuple, bool _Is_Tuple0TupleLike, class ..._Tuples>
@@ -1636,7 +1636,7 @@ struct __tuple_cat_return_1
 template <class ..._Types, class _Tuple0>
 struct __tuple_cat_return_1<tuple<_Types...>, true, _Tuple0>
 {
-  using type _LIBCPP_NODEBUG = typename __tuple_cat_type<
+  using type _LIBCUDACXX_NODEBUG = typename __tuple_cat_type<
       tuple<_Types...>,
       typename __make_tuple_types<__uncvref_t<_Tuple0> >::type
     >::type;
@@ -1667,10 +1667,10 @@ struct __tuple_cat_return<_Tuple0, _Tuples...>
 template <>
 struct __tuple_cat_return<>
 {
-    typedef _LIBCPP_NODEBUG tuple<> type;
+    typedef _LIBCUDACXX_NODEBUG tuple<> type;
 };
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 tuple<>
 tuple_cat()
 {
@@ -1683,7 +1683,7 @@ struct __tuple_cat_return_ref_imp;
 template <class ..._Types, size_t ..._I0, class _Tuple0>
 struct __tuple_cat_return_ref_imp<tuple<_Types...>, __tuple_indices<_I0...>, _Tuple0>
 {
-    typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple0>::type _T0;
+    typedef _LIBCUDACXX_NODEBUG typename remove_reference<_Tuple0>::type _T0;
     typedef tuple<_Types..., typename __apply_cv<_Tuple0,
                           typename tuple_element<_I0, _T0>::type>::type&&...> type;
 };
@@ -1717,24 +1717,24 @@ template <class ..._Types, size_t ..._I0, size_t ..._J0>
 struct __tuple_cat<tuple<_Types...>, __tuple_indices<_I0...>, __tuple_indices<_J0...> >
 {
     template <class _Tuple0>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&>::type
     operator()(tuple<_Types...> __t, _Tuple0&& __t0)
     {
         (void)__t; // avoid unused parameter warning on GCC when _I0 is empty
-        return _VSTD::forward_as_tuple(
-            _VSTD::forward<_Types>(_VSTD::get<_I0>(__t))...,
-            _VSTD::get<_J0>(_VSTD::forward<_Tuple0>(__t0))...);
+        return _CUDA_VSTD::forward_as_tuple(
+            _CUDA_VSTD::forward<_Types>(_CUDA_VSTD::get<_I0>(__t))...,
+            _CUDA_VSTD::get<_J0>(_CUDA_VSTD::forward<_Tuple0>(__t0))...);
     }
 
     template <class _Tuple0, class _Tuple1, class ..._Tuples>
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
     typename __tuple_cat_return_ref<tuple<_Types...>&&, _Tuple0&&, _Tuple1&&, _Tuples&&...>::type
     operator()(tuple<_Types...> __t, _Tuple0&& __t0, _Tuple1&& __t1, _Tuples&& ...__tpls)
     {
         (void)__t; // avoid unused parameter warning on GCC when _I0 is empty
-        typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple0>::type _T0;
-        typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple1>::type _T1;
+        typedef _LIBCUDACXX_NODEBUG typename remove_reference<_Tuple0>::type _T0;
+        typedef _LIBCUDACXX_NODEBUG typename remove_reference<_Tuple1>::type _T1;
         return __tuple_cat<
             tuple<_Types...,
                   typename __apply_cv<_Tuple0, typename tuple_element<
@@ -1742,86 +1742,86 @@ struct __tuple_cat<tuple<_Types...>, __tuple_indices<_I0...>, __tuple_indices<_J
             typename __make_tuple_indices<sizeof...(_Types) +
                                           tuple_size<_T0>::value>::type,
             typename __make_tuple_indices<tuple_size<_T1>::value>::type>()(
-            _VSTD::forward_as_tuple(
-                _VSTD::forward<_Types>(_VSTD::get<_I0>(__t))...,
-                _VSTD::get<_J0>(_VSTD::forward<_Tuple0>(__t0))...),
-            _VSTD::forward<_Tuple1>(__t1), _VSTD::forward<_Tuples>(__tpls)...);
+            _CUDA_VSTD::forward_as_tuple(
+                _CUDA_VSTD::forward<_Types>(_CUDA_VSTD::get<_I0>(__t))...,
+                _CUDA_VSTD::get<_J0>(_CUDA_VSTD::forward<_Tuple0>(__t0))...),
+            _CUDA_VSTD::forward<_Tuple1>(__t1), _CUDA_VSTD::forward<_Tuples>(__tpls)...);
     }
 };
 
 template <class _Tuple0, class... _Tuples>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX11
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX11
 typename __tuple_cat_return<_Tuple0, _Tuples...>::type
 tuple_cat(_Tuple0&& __t0, _Tuples&&... __tpls)
 {
-    typedef _LIBCPP_NODEBUG typename remove_reference<_Tuple0>::type _T0;
+    typedef _LIBCUDACXX_NODEBUG typename remove_reference<_Tuple0>::type _T0;
     return __tuple_cat<tuple<>, __tuple_indices<>,
                   typename __make_tuple_indices<tuple_size<_T0>::value>::type>()
-                  (tuple<>(), _VSTD::forward<_Tuple0>(__t0),
-                                            _VSTD::forward<_Tuples>(__tpls)...);
+                  (tuple<>(), _CUDA_VSTD::forward<_Tuple0>(__t0),
+                                            _CUDA_VSTD::forward<_Tuples>(__tpls)...);
 }
 
 template <class ..._Tp, class _Alloc>
-struct _LIBCPP_TEMPLATE_VIS uses_allocator<tuple<_Tp...>, _Alloc>
+struct _LIBCUDACXX_TEMPLATE_VIS uses_allocator<tuple<_Tp...>, _Alloc>
     : true_type {};
 
 template <class _T1, class _T2>
 template <class... _Args1, class... _Args2, size_t ..._I1, size_t ..._I2>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 pair<_T1, _T2>::pair(piecewise_construct_t,
                      tuple<_Args1...>& __first_args, tuple<_Args2...>& __second_args,
                      __tuple_indices<_I1...>, __tuple_indices<_I2...>)
-    :  first(_VSTD::forward<_Args1>(_VSTD::get<_I1>( __first_args))...),
-      second(_VSTD::forward<_Args2>(_VSTD::get<_I2>(__second_args))...)
+    :  first(_CUDA_VSTD::forward<_Args1>(_CUDA_VSTD::get<_I1>( __first_args))...),
+      second(_CUDA_VSTD::forward<_Args2>(_CUDA_VSTD::get<_I2>(__second_args))...)
 {
 }
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template <class _Tp>
 inline constexpr size_t tuple_size_v = tuple_size<_Tp>::value;
 
-#define _LIBCPP_NOEXCEPT_RETURN(...) noexcept(noexcept(__VA_ARGS__)) { return __VA_ARGS__; }
+#define _LIBCUDACXX_NOEXCEPT_RETURN(...) noexcept(noexcept(__VA_ARGS__)) { return __VA_ARGS__; }
 
 template <class _Fn, class _Tuple, size_t ..._Id>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr decltype(auto) __apply_tuple_impl(_Fn && __f, _Tuple && __t,
                                             __tuple_indices<_Id...>)
-_LIBCPP_NOEXCEPT_RETURN(
-    _VSTD::__invoke(
-        _VSTD::forward<_Fn>(__f),
-        _VSTD::get<_Id>(_VSTD::forward<_Tuple>(__t))...)
+_LIBCUDACXX_NOEXCEPT_RETURN(
+    _CUDA_VSTD::__invoke(
+        _CUDA_VSTD::forward<_Fn>(__f),
+        _CUDA_VSTD::get<_Id>(_CUDA_VSTD::forward<_Tuple>(__t))...)
 )
 
 template <class _Fn, class _Tuple>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr decltype(auto) apply(_Fn && __f, _Tuple && __t)
-_LIBCPP_NOEXCEPT_RETURN(
-    _VSTD::__apply_tuple_impl(
-        _VSTD::forward<_Fn>(__f), _VSTD::forward<_Tuple>(__t),
+_LIBCUDACXX_NOEXCEPT_RETURN(
+    _CUDA_VSTD::__apply_tuple_impl(
+        _CUDA_VSTD::forward<_Fn>(__f), _CUDA_VSTD::forward<_Tuple>(__t),
         typename __make_tuple_indices<tuple_size_v<remove_reference_t<_Tuple>>>::type{})
 )
 
 template <class _Tp, class _Tuple, size_t... _Idx>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _Tp __make_from_tuple_impl(_Tuple&& __t, __tuple_indices<_Idx...>)
-_LIBCPP_NOEXCEPT_RETURN(
-    _Tp(_VSTD::get<_Idx>(_VSTD::forward<_Tuple>(__t))...)
+_LIBCUDACXX_NOEXCEPT_RETURN(
+    _Tp(_CUDA_VSTD::get<_Idx>(_CUDA_VSTD::forward<_Tuple>(__t))...)
 )
 
 template <class _Tp, class _Tuple>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _Tp make_from_tuple(_Tuple&& __t)
-_LIBCPP_NOEXCEPT_RETURN(
-    _VSTD::__make_from_tuple_impl<_Tp>(_VSTD::forward<_Tuple>(__t),
+_LIBCUDACXX_NOEXCEPT_RETURN(
+    _CUDA_VSTD::__make_from_tuple_impl<_Tp>(_CUDA_VSTD::forward<_Tuple>(__t),
         typename __make_tuple_indices<tuple_size_v<remove_reference_t<_Tuple>>>::type{})
 )
 
-#undef _LIBCPP_NOEXCEPT_RETURN
+#undef _LIBCUDACXX_NOEXCEPT_RETURN
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-#endif // !defined(_LIBCPP_CXX03_LANG)
+#endif // !defined(_LIBCUDACXX_CXX03_LANG)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_TUPLE
+#endif // _LIBCUDACXX_TUPLE

diff  --git a/libcxx/include/type_traits b/libcxx/include/type_traits
index 3a086c595f92..7ed2989a4e9a 100644
--- a/libcxx/include/type_traits
+++ b/libcxx/include/type_traits
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_TYPE_TRAITS
-#define _LIBCPP_TYPE_TRAITS
+#ifndef _LIBCUDACXX_TYPE_TRAITS
+#define _LIBCUDACXX_TYPE_TRAITS
 
 /*
     type_traits synopsis
@@ -527,28 +527,28 @@ namespace std
 #include <cstdint>
 #include <version>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _T1, class _T2> struct _LIBCPP_TEMPLATE_VIS pair;
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
+template <class _T1, class _T2> struct _LIBCUDACXX_TEMPLATE_VIS pair;
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS hash;
 
 // Member detector base
 
 template <class _Tp, bool>
-struct _LIBCPP_TEMPLATE_VIS __dependent_type : public _Tp {};
+struct _LIBCUDACXX_TEMPLATE_VIS __dependent_type : public _Tp {};
 
 // is_integral
 
 template <class _Tp>
 struct __unconstref {
-    typedef _LIBCPP_NODEBUG typename remove_const<typename remove_reference<_Tp>::type>::type type;
+    typedef _LIBCUDACXX_NODEBUG typename remove_const<typename remove_reference<_Tp>::type>::type type;
 };
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 // First of all, we can't implement this check in C++03 mode because the {}
 // default initialization syntax isn't valid.
 // Second, we implement the trait in a funny manner with two defaulted template
@@ -574,19 +574,19 @@ struct __is_implicitly_default_constructible<_Tp, decltype(__test_implicit_defau
 
 // result_of
 
-#if _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
-template <class _Callable> class _LIBCPP_DEPRECATED_IN_CXX17 result_of;
+#if _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
+template <class _Callable> class _LIBCUDACXX_DEPRECATED_IN_CXX17 result_of;
 
 template <class _Fp, class ..._Args>
-class _LIBCPP_TEMPLATE_VIS result_of<_Fp(_Args...)>
+class _LIBCUDACXX_TEMPLATE_VIS result_of<_Fp(_Args...)>
     : public __invoke_of<_Fp, _Args...>
 {
 };
 
-#if _LIBCPP_STD_VER > 11
-template <class _Tp> using result_of_t _LIBCPP_DEPRECATED_IN_CXX17 = typename result_of<_Tp>::type;
-#endif // _LIBCPP_STD_VER > 11
-#endif // _LIBCPP_STD_VER <= 17 || defined(_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
+#if _LIBCUDACXX_STD_VER > 11
+template <class _Tp> using result_of_t _LIBCUDACXX_DEPRECATED_IN_CXX17 = typename result_of<_Tp>::type;
+#endif // _LIBCUDACXX_STD_VER > 11
+#endif // _LIBCUDACXX_STD_VER <= 17 || defined(_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS)
 
 // __swappable
 
@@ -594,7 +594,7 @@ template <class _Tp> struct __is_swappable;
 template <class _Tp> struct __is_nothrow_swappable;
 
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Tp>
 using __swap_result_t = typename enable_if<is_move_constructible<_Tp>::value && is_move_assignable<_Tp>::value>::type;
 #else
@@ -603,13 +603,13 @@ using __swap_result_t = void;
 #endif
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_CONSTEXPR_AFTER_CXX17 __swap_result_t<_Tp>
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __swap_result_t<_Tp>
 swap(_Tp& __x, _Tp& __y) _NOEXCEPT_(is_nothrow_move_constructible<_Tp>::value &&
                                     is_nothrow_move_assignable<_Tp>::value);
 
 template<class _Tp, size_t _Np>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename enable_if<
     __is_swappable<_Tp>::value
 >::type
@@ -643,7 +643,7 @@ struct __swappable_with<_Tp, _Up,  false> : false_type {};
 template <class _Tp, class _Up = _Tp, bool _Swappable = __swappable_with<_Tp, _Up>::value>
 struct __nothrow_swappable_with {
   static const bool value =
-#ifndef _LIBCPP_HAS_NO_NOEXCEPT
+#ifndef _LIBCUDACXX_HAS_NO_NOEXCEPT
       noexcept(swap(declval<_Tp>(), declval<_Up>()))
   &&  noexcept(swap(declval<_Up>(), declval<_Tp>()));
 #else
@@ -668,16 +668,16 @@ struct __is_nothrow_swappable
 {
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 template <class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS is_swappable_with
+struct _LIBCUDACXX_TEMPLATE_VIS is_swappable_with
     : public integral_constant<bool, __detail::__swappable_with<_Tp, _Up>::value>
 {
 };
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_swappable
+struct _LIBCUDACXX_TEMPLATE_VIS is_swappable
     : public conditional<
         __is_referenceable<_Tp>::value,
         is_swappable_with<
@@ -689,13 +689,13 @@ struct _LIBCPP_TEMPLATE_VIS is_swappable
 };
 
 template <class _Tp, class _Up>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable_with
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_swappable_with
     : public integral_constant<bool, __detail::__nothrow_swappable_with<_Tp, _Up>::value>
 {
 };
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS is_nothrow_swappable
+struct _LIBCUDACXX_TEMPLATE_VIS is_nothrow_swappable
     : public conditional<
         __is_referenceable<_Tp>::value,
         is_nothrow_swappable_with<
@@ -718,7 +718,7 @@ inline constexpr bool is_nothrow_swappable_with_v = is_nothrow_swappable_with<_T
 template <class _Tp>
 inline constexpr bool is_nothrow_swappable_v = is_nothrow_swappable<_Tp>::value;
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
 template <class _Tp, bool = is_enum<_Tp>::value>
 struct __sfinae_underlying_type
@@ -730,39 +730,39 @@ struct __sfinae_underlying_type
 template <class _Tp>
 struct __sfinae_underlying_type<_Tp, false> {};
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 int __convert_to_integral(int __val) { return __val; }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 unsigned __convert_to_integral(unsigned __val) { return __val; }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 long __convert_to_integral(long __val) { return __val; }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 unsigned long __convert_to_integral(unsigned long __val) { return __val; }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 long long __convert_to_integral(long long __val) { return __val; }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 unsigned long long __convert_to_integral(unsigned long long __val) {return __val; }
 
 template<typename _Fp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename enable_if<is_floating_point<_Fp>::value, long long>::type
  __convert_to_integral(_Fp __val) { return __val; }
 
-#ifndef _LIBCPP_HAS_NO_INT128
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+#ifndef _LIBCUDACXX_HAS_NO_INT128
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 __int128_t __convert_to_integral(__int128_t __val) { return __val; }
 
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 __uint128_t __convert_to_integral(__uint128_t __val) { return __val; }
 #endif
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR
 typename __sfinae_underlying_type<_Tp>::__promoted_type
 __convert_to_integral(_Tp __val) { return __val; }
 
@@ -805,6 +805,6 @@ using __make_const_lvalue_ref = const typename remove_reference<_Tp>::type&;
 template<bool _Const, class _Tp>
 using __maybe_const = typename conditional<_Const, const _Tp, _Tp>::type;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_TYPE_TRAITS
+#endif // _LIBCUDACXX_TYPE_TRAITS

diff  --git a/libcxx/include/typeindex b/libcxx/include/typeindex
index 5fb7b30ecfee..2dd80c64d5a2 100644
--- a/libcxx/include/typeindex
+++ b/libcxx/include/typeindex
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_TYPEINDEX
-#define _LIBCPP_TYPEINDEX
+#ifndef _LIBCUDACXX_TYPEINDEX
+#define _LIBCUDACXX_TYPEINDEX
 
 /*
 
@@ -50,7 +50,7 @@ struct hash<type_index>
 #include <typeinfo>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <iosfwd>
 #  include <new>
 #  include <utility>
@@ -59,55 +59,55 @@ struct hash<type_index>
 // standard-mandated includes
 #include <compare>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_TEMPLATE_VIS type_index
+class _LIBCUDACXX_TEMPLATE_VIS type_index
 {
     const type_info* __t_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     type_index(const type_info& __y) _NOEXCEPT : __t_(&__y) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const type_index& __y) const _NOEXCEPT
         {return *__t_ == *__y.__t_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const type_index& __y) const _NOEXCEPT
         {return *__t_ != *__y.__t_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator< (const type_index& __y) const _NOEXCEPT
         {return  __t_->before(*__y.__t_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator<=(const type_index& __y) const _NOEXCEPT
         {return !__y.__t_->before(*__t_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator> (const type_index& __y) const _NOEXCEPT
         {return  __y.__t_->before(*__t_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator>=(const type_index& __y) const _NOEXCEPT
         {return !__t_->before(*__y.__t_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t hash_code() const _NOEXCEPT {return __t_->hash_code();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char* name() const _NOEXCEPT {return __t_->name();}
 };
 
-template <class _Tp> struct _LIBCPP_TEMPLATE_VIS hash;
+template <class _Tp> struct _LIBCUDACXX_TEMPLATE_VIS hash;
 
 template <>
-struct _LIBCPP_TEMPLATE_VIS hash<type_index>
+struct _LIBCUDACXX_TEMPLATE_VIS hash<type_index>
     : public __unary_function<type_index, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(type_index __index) const _NOEXCEPT
         {return __index.hash_code();}
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_TYPEINDEX
+#endif // _LIBCUDACXX_TYPEINDEX

diff  --git a/libcxx/include/typeinfo b/libcxx/include/typeinfo
index a0ac527db782..f1481394ccbf 100644
--- a/libcxx/include/typeinfo
+++ b/libcxx/include/typeinfo
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef __LIBCPP_TYPEINFO
-#define __LIBCPP_TYPEINFO
+#ifndef __LIBCUDACXX_TYPEINFO
+#define __LIBCUDACXX_TYPEINFO
 
 /*
 
@@ -64,15 +64,15 @@ public:
 #include <exception>
 #include <type_traits>
 
-#ifdef _LIBCPP_NO_EXCEPTIONS
+#ifdef _LIBCUDACXX_NO_EXCEPTIONS
 #include <cstdlib>
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if defined(_LIBCPP_ABI_VCRUNTIME)
+#if defined(_LIBCUDACXX_ABI_VCRUNTIME)
 #include <vcruntime_typeinfo.h>
 #else
 
@@ -80,9 +80,9 @@ namespace std  // purposefully not using versioning namespace
 {
 
 
-#if defined(_LIBCPP_ABI_MICROSOFT)
+#if defined(_LIBCUDACXX_ABI_MICROSOFT)
 
-class _LIBCPP_EXCEPTION_ABI type_info
+class _LIBCUDACXX_EXCEPTION_ABI type_info
 {
     type_info& operator=(const type_info&);
     type_info(const type_info&);
@@ -95,36 +95,36 @@ class _LIBCPP_EXCEPTION_ABI type_info
     int __compare(const type_info &__rhs) const _NOEXCEPT;
 
 public:
-    _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE
+    _LIBCUDACXX_AVAILABILITY_TYPEINFO_VTABLE
     virtual ~type_info();
 
     const char *name() const _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool before(const type_info& __arg) const _NOEXCEPT {
       return __compare(__arg) < 0;
     }
 
     size_t hash_code() const _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const type_info& __arg) const _NOEXCEPT {
       return __compare(__arg) == 0;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const type_info& __arg) const _NOEXCEPT
     { return !operator==(__arg); }
 };
 
-#else // !defined(_LIBCPP_ABI_MICROSOFT)
+#else // !defined(_LIBCUDACXX_ABI_MICROSOFT)
 
 // ========================================================================== //
 //                           Implementations
 // ========================================================================== //
 // ------------------------------------------------------------------------- //
 //                               Unique
-//               (_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION = 1)
+//               (_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION = 1)
 // ------------------------------------------------------------------------- //
 // This implementation of type_info assumes a unique copy of the RTTI for a
 // given type inside a program. This is a valid assumption when abiding to the
@@ -134,7 +134,7 @@ public:
 // a deep string comparison.
 // -------------------------------------------------------------------------- //
 //                             NonUnique
-//               (_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION = 2)
+//               (_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION = 2)
 // -------------------------------------------------------------------------- //
 // This implementation of type_info does not assume there is always a unique
 // copy of the RTTI for a given type inside a program. For various reasons
@@ -144,7 +144,7 @@ public:
 // comparison is equal.
 // -------------------------------------------------------------------------- //
 //                          NonUniqueARMRTTIBit
-//               (_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION = 3)
+//               (_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION = 3)
 // -------------------------------------------------------------------------- //
 // This implementation is specific to ARM64 on Apple platforms.
 //
@@ -172,63 +172,63 @@ public:
 
 // This value can be overriden in the __config_site. When it's not overriden,
 // we pick a default implementation based on the platform here.
-#ifndef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION
+#ifndef _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION
 
   // Windows binaries can't merge typeinfos, so use the NonUnique implementation.
-# ifdef _LIBCPP_OBJECT_FORMAT_COFF
-#   define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 2
+# ifdef _LIBCUDACXX_OBJECT_FORMAT_COFF
+#   define _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION 2
 
   // On arm64 on Apple platforms, use the special NonUniqueARMRTTIBit implementation.
 # elif defined(__APPLE__) && defined(__LP64__) && !defined(__x86_64__)
-#   define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 3
+#   define _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION 3
 
   // On all other platforms, assume the Itanium C++ ABI and use the Unique implementation.
 # else
-#   define _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION 1
+#   define _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION 1
 # endif
 #endif
 
 struct __type_info_implementations {
   struct __string_impl_base {
     typedef const char* __type_name_t;
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
-    _LIBCPP_CONSTEXPR static const char* __type_name_to_string(__type_name_t __v) _NOEXCEPT {
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
+    _LIBCUDACXX_CONSTEXPR static const char* __type_name_to_string(__type_name_t __v) _NOEXCEPT {
       return __v;
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
-    _LIBCPP_CONSTEXPR static __type_name_t __string_to_type_name(const char* __v) _NOEXCEPT {
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
+    _LIBCUDACXX_CONSTEXPR static __type_name_t __string_to_type_name(const char* __v) _NOEXCEPT {
       return __v;
     }
   };
 
   struct __unique_impl : __string_impl_base {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
     static size_t __hash(__type_name_t __v) _NOEXCEPT {
       return reinterpret_cast<size_t>(__v);
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
     static bool __eq(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
       return __lhs == __rhs;
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
     static bool __lt(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
       return __lhs < __rhs;
     }
   };
 
   struct __non_unique_impl : __string_impl_base {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
     static size_t __hash(__type_name_t __ptr) _NOEXCEPT {
       size_t __hash = 5381;
       while (unsigned char __c = static_cast<unsigned char>(*__ptr++))
         __hash = (__hash * 33) ^ __c;
       return __hash;
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
     static bool __eq(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
       return __lhs == __rhs || __builtin_strcmp(__lhs, __rhs) == 0;
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
     static bool __lt(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
       return __builtin_strcmp(__lhs, __rhs) < 0;
     }
@@ -237,23 +237,23 @@ struct __type_info_implementations {
   struct __non_unique_arm_rtti_bit_impl {
     typedef uintptr_t __type_name_t;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
     static const char* __type_name_to_string(__type_name_t __v) _NOEXCEPT {
       return reinterpret_cast<const char*>(__v &
           ~__non_unique_rtti_bit::value);
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
     static __type_name_t __string_to_type_name(const char* __v) _NOEXCEPT {
       return reinterpret_cast<__type_name_t>(__v);
     }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
     static size_t __hash(__type_name_t __v) _NOEXCEPT {
       if (__is_type_name_unique(__v))
         return __v;
       return __non_unique_impl::__hash(__type_name_to_string(__v));
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
     static bool __eq(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
       if (__lhs == __rhs)
         return true;
@@ -263,7 +263,7 @@ struct __type_info_implementations {
         return false;
       return __builtin_strcmp(__type_name_to_string(__lhs), __type_name_to_string(__rhs)) == 0;
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_ALWAYS_INLINE
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_ALWAYS_INLINE
     static bool __lt(__type_name_t __lhs, __type_name_t __rhs) _NOEXCEPT {
       if (__is_type_name_unique(__lhs) || __is_type_name_unique(__rhs))
         return __lhs < __rhs;
@@ -276,26 +276,26 @@ struct __type_info_implementations {
     typedef integral_constant<__type_name_t,
       (1ULL << ((__CHAR_BIT__ * sizeof(__type_name_t)) - 1))> __non_unique_rtti_bit;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     static bool __is_type_name_unique(__type_name_t __lhs) _NOEXCEPT {
       return !(__lhs & __non_unique_rtti_bit::value);
     }
   };
 
   typedef
-#if _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION == 1
+#if _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION == 1
     __unique_impl
-#elif _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION == 2
+#elif _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION == 2
     __non_unique_impl
-#elif _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION == 3
+#elif _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION == 3
     __non_unique_arm_rtti_bit_impl
 #else
-#   error invalid configuration for _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION
+#   error invalid configuration for _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION
 #endif
      __impl;
 };
 
-class _LIBCPP_EXCEPTION_ABI type_info
+class _LIBCUDACXX_EXCEPTION_ABI type_info
 {
   type_info& operator=(const type_info&);
   type_info(const type_info&);
@@ -305,45 +305,45 @@ class _LIBCPP_EXCEPTION_ABI type_info
 
     __impl::__type_name_t __type_name;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit type_info(const char* __n)
       : __type_name(__impl::__string_to_type_name(__n)) {}
 
 public:
-    _LIBCPP_AVAILABILITY_TYPEINFO_VTABLE
+    _LIBCUDACXX_AVAILABILITY_TYPEINFO_VTABLE
     virtual ~type_info();
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const char* name() const _NOEXCEPT
     {
       return __impl::__type_name_to_string(__type_name);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool before(const type_info& __arg) const _NOEXCEPT
     {
       return __impl::__lt(__type_name, __arg.__type_name);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t hash_code() const _NOEXCEPT
     {
       return __impl::__hash(__type_name);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const type_info& __arg) const _NOEXCEPT
     {
       return __impl::__eq(__type_name, __arg.__type_name);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const type_info& __arg) const _NOEXCEPT
     { return !operator==(__arg); }
 };
-#endif // defined(_LIBCPP_ABI_MICROSOFT)
+#endif // defined(_LIBCUDACXX_ABI_MICROSOFT)
 
-class _LIBCPP_EXCEPTION_ABI bad_cast
+class _LIBCUDACXX_EXCEPTION_ABI bad_cast
     : public exception
 {
  public:
@@ -353,7 +353,7 @@ class _LIBCPP_EXCEPTION_ABI bad_cast
   virtual const char* what() const _NOEXCEPT;
 };
 
-class _LIBCPP_EXCEPTION_ABI bad_typeid
+class _LIBCUDACXX_EXCEPTION_ABI bad_typeid
     : public exception
 {
  public:
@@ -364,18 +364,18 @@ class _LIBCPP_EXCEPTION_ABI bad_typeid
 
 } // namespace std
 
-#endif // defined(_LIBCPP_ABI_VCRUNTIME)
+#endif // defined(_LIBCUDACXX_ABI_VCRUNTIME)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
-_LIBCPP_NORETURN inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY
 void __throw_bad_cast()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw bad_cast();
 #else
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // __LIBCPP_TYPEINFO
+#endif // __LIBCUDACXX_TYPEINFO

diff  --git a/libcxx/include/uchar.h b/libcxx/include/uchar.h
index bb152c72cb3c..194e023231cb 100644
--- a/libcxx/include/uchar.h
+++ b/libcxx/include/uchar.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_UCHAR_H
-#define _LIBCPP_UCHAR_H
+#ifndef _LIBCUDACXX_UCHAR_H
+#define _LIBCUDACXX_UCHAR_H
 
 /*
     uchar.h synopsis // since C++11
@@ -32,11 +32,11 @@ size_t c32rtomb(char* s, char32_t c32, mbstate_t* ps);
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#if !defined(_LIBCPP_CXX03_LANG)
+#if !defined(_LIBCUDACXX_CXX03_LANG)
 
 // Some platforms don't implement <uchar.h> and we don't want to give a hard
 // error on those platforms. When the platform doesn't provide <uchar.h>, at
@@ -47,6 +47,6 @@ size_t c32rtomb(char* s, char32_t c32, mbstate_t* ps);
 # include <stddef.h>
 #endif
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#endif // _LIBCPP_UCHAR_H
+#endif // _LIBCUDACXX_UCHAR_H

diff  --git a/libcxx/include/unordered_map b/libcxx/include/unordered_map
index b2a12cb638d8..9f401f34fdc3 100644
--- a/libcxx/include/unordered_map
+++ b/libcxx/include/unordered_map
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_UNORDERED_MAP
-#define _LIBCPP_UNORDERED_MAP
+#ifndef _LIBCUDACXX_UNORDERED_MAP
+#define _LIBCUDACXX_UNORDERED_MAP
 
 /*
 
@@ -531,7 +531,7 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
 #include <tuple>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #  include <bit>
 #  include <iterator>
@@ -550,45 +550,45 @@ template <class Key, class T, class Hash, class Pred, class Alloc>
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Key, class _Cp, class _Hash, class _Pred,
-          bool = is_empty<_Hash>::value && !__libcpp_is_final<_Hash>::value>
+          bool = is_empty<_Hash>::value && !__LIBCUDACXX_is_final<_Hash>::value>
 class __unordered_map_hasher
     : private _Hash
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __unordered_map_hasher()
         _NOEXCEPT_(is_nothrow_default_constructible<_Hash>::value)
         : _Hash() {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __unordered_map_hasher(const _Hash& __h)
         _NOEXCEPT_(is_nothrow_copy_constructible<_Hash>::value)
         : _Hash(__h) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Hash& hash_function() const _NOEXCEPT {return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const _Cp& __x) const
         {return static_cast<const _Hash&>(*this)(__x.__get_value().first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const _Key& __x) const
         {return static_cast<const _Hash&>(*this)(__x);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const _K2& __x) const
         {return static_cast<const _Hash&>(*this)(__x);}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(__unordered_map_hasher& __y)
         _NOEXCEPT_(__is_nothrow_swappable<_Hash>::value)
     {
-        using _VSTD::swap;
+        using _CUDA_VSTD::swap;
         swap(static_cast<_Hash&>(*this), static_cast<_Hash&>(__y));
     }
 };
@@ -598,39 +598,39 @@ class __unordered_map_hasher<_Key, _Cp, _Hash, _Pred, false>
 {
     _Hash __hash_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __unordered_map_hasher()
         _NOEXCEPT_(is_nothrow_default_constructible<_Hash>::value)
         : __hash_() {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __unordered_map_hasher(const _Hash& __h)
         _NOEXCEPT_(is_nothrow_copy_constructible<_Hash>::value)
         : __hash_(__h) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Hash& hash_function() const _NOEXCEPT {return __hash_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const _Cp& __x) const
         {return __hash_(__x.__get_value().first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const _Key& __x) const
         {return __hash_(__x);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t operator()(const _K2& __x) const
         {return __hash_(__x);}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(__unordered_map_hasher& __y)
         _NOEXCEPT_(__is_nothrow_swappable<_Hash>::value)
     {
-        using _VSTD::swap;
+        using _CUDA_VSTD::swap;
         swap(__hash_, __y.__hash_);
     }
 };
 
 template <class _Key, class _Cp, class _Hash, class _Pred, bool __b>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(__unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __x,
      __unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __y)
@@ -640,53 +640,53 @@ swap(__unordered_map_hasher<_Key, _Cp, _Hash, _Pred, __b>& __x,
 }
 
 template <class _Key, class _Cp, class _Pred, class _Hash,
-          bool = is_empty<_Pred>::value && !__libcpp_is_final<_Pred>::value>
+          bool = is_empty<_Pred>::value && !__LIBCUDACXX_is_final<_Pred>::value>
 class __unordered_map_equal
     : private _Pred
 {
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __unordered_map_equal()
         _NOEXCEPT_(is_nothrow_default_constructible<_Pred>::value)
         : _Pred() {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __unordered_map_equal(const _Pred& __p)
         _NOEXCEPT_(is_nothrow_copy_constructible<_Pred>::value)
         : _Pred(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Pred& key_eq() const _NOEXCEPT {return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Cp& __x, const _Cp& __y) const
         {return static_cast<const _Pred&>(*this)(__x.__get_value().first, __y.__get_value().first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Cp& __x, const _Key& __y) const
         {return static_cast<const _Pred&>(*this)(__x.__get_value().first, __y);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Key& __x, const _Cp& __y) const
         {return static_cast<const _Pred&>(*this)(__x, __y.__get_value().first);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Cp& __x, const _K2& __y) const
         {return static_cast<const _Pred&>(*this)(__x.__get_value().first, __y);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _K2& __x, const _Cp& __y) const
         {return static_cast<const _Pred&>(*this)(__x, __y.__get_value().first);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Key& __x, const _K2& __y) const
         {return static_cast<const _Pred&>(*this)(__x, __y);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _K2& __x, const _Key& __y) const
         {return static_cast<const _Pred&>(*this)(__x, __y);}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(__unordered_map_equal& __y)
         _NOEXCEPT_(__is_nothrow_swappable<_Pred>::value)
     {
-        using _VSTD::swap;
+        using _CUDA_VSTD::swap;
         swap(static_cast<_Pred&>(*this), static_cast<_Pred&>(__y));
     }
 };
@@ -696,54 +696,54 @@ class __unordered_map_equal<_Key, _Cp, _Pred, _Hash, false>
 {
     _Pred __pred_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __unordered_map_equal()
         _NOEXCEPT_(is_nothrow_default_constructible<_Pred>::value)
         : __pred_() {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __unordered_map_equal(const _Pred& __p)
         _NOEXCEPT_(is_nothrow_copy_constructible<_Pred>::value)
         : __pred_(__p) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const _Pred& key_eq() const _NOEXCEPT {return __pred_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Cp& __x, const _Cp& __y) const
         {return __pred_(__x.__get_value().first, __y.__get_value().first);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Cp& __x, const _Key& __y) const
         {return __pred_(__x.__get_value().first, __y);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Key& __x, const _Cp& __y) const
         {return __pred_(__x, __y.__get_value().first);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Cp& __x, const _K2& __y) const
         {return __pred_(__x.__get_value().first, __y);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _K2& __x, const _Cp& __y) const
         {return __pred_(__x, __y.__get_value().first);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _Key& __x, const _K2& __y) const
         {return __pred_(__x, __y);}
     template <typename _K2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator()(const _K2& __x, const _Key& __y) const
         {return __pred_(__x, __y);}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(__unordered_map_equal& __y)
         _NOEXCEPT_(__is_nothrow_swappable<_Pred>::value)
     {
-        using _VSTD::swap;
+        using _CUDA_VSTD::swap;
         swap(__pred_, __y.__pred_);
     }
 };
 
 template <class _Key, class _Cp, class _Pred, class _Hash, bool __b>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(__unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __x,
      __unordered_map_equal<_Key, _Cp, _Pred, _Hash, __b>& __y)
@@ -771,15 +771,15 @@ public:
     bool __first_constructed;
     bool __second_constructed;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __hash_map_node_destructor(allocator_type& __na) _NOEXCEPT
         : __na_(__na),
           __first_constructed(false),
           __second_constructed(false)
         {}
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_node_destructor(__hash_node_destructor<allocator_type>&& __x)
         _NOEXCEPT
         : __na_(__x.__na_),
@@ -788,8 +788,8 @@ public:
         {
             __x.__value_constructed = false;
         }
-#else  // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#else  // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_node_destructor(const __hash_node_destructor<allocator_type>& __x)
         : __na_(__x.__na_),
           __first_constructed(__x.__value_constructed),
@@ -797,23 +797,23 @@ public:
         {
             const_cast<bool&>(__x.__value_constructed) = false;
         }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator()(pointer __p) _NOEXCEPT
     {
         if (__second_constructed)
-            __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.__get_value().second));
+            __alloc_traits::destroy(__na_, _CUDA_VSTD::addressof(__p->__value_.__get_value().second));
         if (__first_constructed)
-            __alloc_traits::destroy(__na_, _VSTD::addressof(__p->__value_.__get_value().first));
+            __alloc_traits::destroy(__na_, _CUDA_VSTD::addressof(__p->__value_.__get_value().first));
         if (__p)
             __alloc_traits::deallocate(__na_, __p, 1);
     }
 };
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 template <class _Key, class _Tp>
-struct _LIBCPP_STANDALONE_DEBUG __hash_value_type
+struct _LIBCUDACXX_STANDALONE_DEBUG __hash_value_type
 {
     typedef _Key                                     key_type;
     typedef _Tp                                      mapped_type;
@@ -825,50 +825,50 @@ private:
     value_type __cc;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_type& __get_value()
     {
-#if _LIBCPP_STD_VER > 14
-        return *_VSTD::launder(_VSTD::addressof(__cc));
+#if _LIBCUDACXX_STD_VER > 14
+        return *_CUDA_VSTD::launder(_CUDA_VSTD::addressof(__cc));
 #else
         return __cc;
 #endif
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const value_type& __get_value() const
     {
-#if _LIBCPP_STD_VER > 14
-        return *_VSTD::launder(_VSTD::addressof(__cc));
+#if _LIBCUDACXX_STD_VER > 14
+        return *_CUDA_VSTD::launder(_CUDA_VSTD::addressof(__cc));
 #else
         return __cc;
 #endif
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __nc_ref_pair_type __ref()
     {
         value_type& __v = __get_value();
         return __nc_ref_pair_type(const_cast<key_type&>(__v.first), __v.second);
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __nc_rref_pair_type __move()
     {
         value_type& __v = __get_value();
         return __nc_rref_pair_type(
-            _VSTD::move(const_cast<key_type&>(__v.first)),
-            _VSTD::move(__v.second));
+            _CUDA_VSTD::move(const_cast<key_type&>(__v.first)),
+            _CUDA_VSTD::move(__v.second));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_value_type& operator=(const __hash_value_type& __v)
     {
         __ref() = __v.__get_value();
         return *this;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_value_type& operator=(__hash_value_type&& __v)
     {
         __ref() = __v.__move();
@@ -878,10 +878,10 @@ public:
     template <class _ValueTp,
               class = __enable_if_t<__is_same_uncvref<_ValueTp, value_type>::value>
              >
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_value_type& operator=(_ValueTp&& __v)
     {
-        __ref() = _VSTD::forward<_ValueTp>(__v);
+        __ref() = _CUDA_VSTD::forward<_ValueTp>(__v);
         return *this;
     }
 
@@ -907,9 +907,9 @@ private:
     value_type __cc;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_type& __get_value() { return __cc; }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const value_type& __get_value() const { return __cc; }
 
 private:
@@ -919,7 +919,7 @@ private:
 #endif
 
 template <class _HashIterator>
-class _LIBCPP_TEMPLATE_VIS __hash_map_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __hash_map_iterator
 {
     _HashIterator __i_;
 
@@ -932,20 +932,20 @@ public:
     typedef value_type&                                          reference;
     typedef typename _NodeTypes::__map_value_type_pointer       pointer;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_iterator() _NOEXCEPT {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_iterator(_HashIterator __i) _NOEXCEPT : __i_(__i) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {return __i_->__get_value();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {return pointer_traits<pointer>::pointer_to(__i_->__get_value());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_iterator& operator++() {++__i_; return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_iterator operator++(int)
     {
         __hash_map_iterator __t(*this);
@@ -953,22 +953,22 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
         {return __x.__i_ == __y.__i_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const __hash_map_iterator& __x, const __hash_map_iterator& __y)
         {return __x.__i_ != __y.__i_;}
 
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS unordered_map;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS unordered_multimap;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_const_iterator;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_const_local_iterator;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_map_const_iterator;
 };
 
 template <class _HashIterator>
-class _LIBCPP_TEMPLATE_VIS __hash_map_const_iterator
+class _LIBCUDACXX_TEMPLATE_VIS __hash_map_const_iterator
 {
     _HashIterator __i_;
 
@@ -981,25 +981,25 @@ public:
     typedef const value_type&                                    reference;
     typedef typename _NodeTypes::__const_map_value_type_pointer  pointer;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_const_iterator() _NOEXCEPT {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_const_iterator(_HashIterator __i) _NOEXCEPT : __i_(__i) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_const_iterator(
             __hash_map_iterator<typename _HashIterator::__non_const_iterator> __i)
                  _NOEXCEPT
                 : __i_(__i.__i_) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     reference operator*() const {return __i_->__get_value();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pointer operator->() const {return pointer_traits<pointer>::pointer_to(__i_->__get_value());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_const_iterator& operator++() {++__i_; return *this;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __hash_map_const_iterator operator++(int)
     {
         __hash_map_const_iterator __t(*this);
@@ -1007,17 +1007,17 @@ public:
         return __t;
     }
 
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator==(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
         {return __x.__i_ == __y.__i_;}
-    friend _LIBCPP_INLINE_VISIBILITY
+    friend _LIBCUDACXX_INLINE_VISIBILITY
         bool operator!=(const __hash_map_const_iterator& __x, const __hash_map_const_iterator& __y)
         {return __x.__i_ != __y.__i_;}
 
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_map;
-    template <class, class, class, class, class> friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_iterator;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS __hash_const_local_iterator;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS unordered_map;
+    template <class, class, class, class, class> friend class _LIBCUDACXX_TEMPLATE_VIS unordered_multimap;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_const_iterator;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS __hash_const_local_iterator;
 };
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
@@ -1025,7 +1025,7 @@ class unordered_multimap;
 
 template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
           class _Alloc = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS unordered_map
+class _LIBCUDACXX_TEMPLATE_VIS unordered_map
 {
 public:
     // types
@@ -1075,21 +1075,21 @@ public:
     typedef __hash_map_iterator<typename __table::local_iterator> local_iterator;
     typedef __hash_map_const_iterator<typename __table::const_local_iterator> const_local_iterator;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     typedef __map_node_handle<__node, allocator_type> node_type;
     typedef __insert_return_type<iterator, node_type> insert_return_type;
 #endif
 
     template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+        friend class _LIBCUDACXX_TEMPLATE_VIS unordered_map;
     template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+        friend class _LIBCUDACXX_TEMPLATE_VIS unordered_multimap;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_map()
         _NOEXCEPT_(is_nothrow_default_constructible<__table>::value)
     {
-        _VSTD::__debug_db_insert_c(this);
+        _CUDA_VSTD::__debug_db_insert_c(this);
     }
     explicit unordered_map(size_type __n, const hasher& __hf = hasher(),
                            const key_equal& __eql = key_equal());
@@ -1107,12 +1107,12 @@ public:
                       size_type __n, const hasher& __hf,
                       const key_equal& __eql,
                       const allocator_type& __a);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit unordered_map(const allocator_type& __a);
     unordered_map(const unordered_map& __u);
     unordered_map(const unordered_map& __u, const allocator_type& __a);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_map(unordered_map&& __u)
         _NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
     unordered_map(unordered_map&& __u, const allocator_type& __a);
@@ -1122,43 +1122,43 @@ public:
     unordered_map(initializer_list<value_type> __il, size_type __n,
                   const hasher& __hf, const key_equal& __eql,
                   const allocator_type& __a);
-#endif // _LIBCPP_CXX03_LANG
-#if _LIBCPP_STD_VER > 11
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_CXX03_LANG
+#if _LIBCUDACXX_STD_VER > 11
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_map(size_type __n, const allocator_type& __a)
       : unordered_map(__n, hasher(), key_equal(), __a) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_map(size_type __n, const hasher& __hf, const allocator_type& __a)
       : unordered_map(__n, __hf, key_equal(), __a) {}
     template <class _InputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
       unordered_map(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a)
       : unordered_map(__first, __last, __n, hasher(), key_equal(), __a) {}
     template <class _InputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
       unordered_map(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf,
         const allocator_type& __a)
       : unordered_map(__first, __last, __n, __hf, key_equal(), __a) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_map(initializer_list<value_type> __il, size_type __n, const allocator_type& __a)
       : unordered_map(__il, __n, hasher(), key_equal(), __a) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_map(initializer_list<value_type> __il, size_type __n, const hasher& __hf,
       const allocator_type& __a)
       : unordered_map(__il, __n, __hf, key_equal(), __a) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~unordered_map() {
         static_assert(sizeof(__diagnose_unordered_container_requirements<_Key, _Hash, _Pred>(0)), "");
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_map& operator=(const unordered_map& __u)
     {
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
         __table_ = __u.__table_;
 #else
-        if (this != _VSTD::addressof(__u)) {
+        if (this != _CUDA_VSTD::addressof(__u)) {
             __table_.clear();
             __table_.hash_function() = __u.__table_.hash_function();
             __table_.key_eq() = __u.__table_.key_eq();
@@ -1169,44 +1169,44 @@ public:
 #endif
         return *this;
     }
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_map& operator=(unordered_map&& __u)
         _NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_map& operator=(initializer_list<value_type> __il);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT
         {return allocator_type(__table_.__node_alloc());}
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool      empty() const _NOEXCEPT {return __table_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT  {return __table_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT {return __table_.max_size();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       begin() _NOEXCEPT        {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       end() _NOEXCEPT          {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin()  const _NOEXCEPT {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()    const _NOEXCEPT {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin() const _NOEXCEPT {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend()   const _NOEXCEPT {return __table_.end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> insert(const value_type& __x)
         {return __table_.__insert_unique(__x);}
 
     iterator insert(const_iterator __p, const value_type& __x) {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                              "unordered_map::insert(const_iterator, const value_type&) called with an iterator not "
                              "referring to this unordered_map");
         ((void)__p);
@@ -1214,179 +1214,179 @@ public:
     }
 
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void insert(_InputIterator __first, _InputIterator __last);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     void insert(initializer_list<value_type> __il)
         {insert(__il.begin(), __il.end());}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> insert(value_type&& __x)
-        {return __table_.__insert_unique(_VSTD::move(__x));}
+        {return __table_.__insert_unique(_CUDA_VSTD::move(__x));}
 
     iterator insert(const_iterator __p, value_type&& __x) {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                              "unordered_map::insert(const_iterator, const value_type&) called with an iterator not"
                              " referring to this unordered_map");
         ((void)__p);
-        return __table_.__insert_unique(_VSTD::move(__x)).first;
+        return __table_.__insert_unique(_CUDA_VSTD::move(__x)).first;
     }
 
     template <class _Pp,
               class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> insert(_Pp&& __x)
-            {return __table_.__insert_unique(_VSTD::forward<_Pp>(__x));}
+            {return __table_.__insert_unique(_CUDA_VSTD::forward<_Pp>(__x));}
 
     template <class _Pp,
               class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator insert(const_iterator __p, _Pp&& __x)
         {
-            _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+            _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                                  "unordered_map::insert(const_iterator, value_type&&) called with an iterator not"
                                  " referring to this unordered_map");
           ((void)__p);
-            return insert(_VSTD::forward<_Pp>(__x)).first;
+            return insert(_CUDA_VSTD::forward<_Pp>(__x)).first;
         }
 
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> emplace(_Args&&... __args) {
-        return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...);
+        return __table_.__emplace_unique(_CUDA_VSTD::forward<_Args>(__args)...);
     }
 
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator emplace_hint(const_iterator __p, _Args&&... __args) {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__p)) == this,
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__p)) == this,
                              "unordered_map::emplace_hint(const_iterator, args...) called with an iterator not"
                              " referring to this unordered_map");
           ((void)__p);
-        return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...).first;
+        return __table_.__emplace_unique(_CUDA_VSTD::forward<_Args>(__args)...).first;
     }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> try_emplace(const key_type& __k, _Args&&... __args)
     {
         return __table_.__emplace_unique_key_args(__k, piecewise_construct,
-            _VSTD::forward_as_tuple(__k),
-            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...));
+            _CUDA_VSTD::forward_as_tuple(__k),
+            _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Args>(__args)...));
     }
 
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> try_emplace(key_type&& __k, _Args&&... __args)
     {
         return __table_.__emplace_unique_key_args(__k, piecewise_construct,
-            _VSTD::forward_as_tuple(_VSTD::move(__k)),
-            _VSTD::forward_as_tuple(_VSTD::forward<_Args>(__args)...));
+            _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::move(__k)),
+            _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::forward<_Args>(__args)...));
     }
 
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator try_emplace(const_iterator __h, const key_type& __k, _Args&&... __args)
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__h)) == this,
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__h)) == this,
                              "unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not"
                              " referring to this unordered_map");
         ((void)__h);
-        return try_emplace(__k, _VSTD::forward<_Args>(__args)...).first;
+        return try_emplace(__k, _CUDA_VSTD::forward<_Args>(__args)...).first;
     }
 
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator try_emplace(const_iterator __h, key_type&& __k, _Args&&... __args)
     {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__h)) == this,
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__h)) == this,
                              "unordered_map::try_emplace(const_iterator, key, args...) called with an iterator not"
                              " referring to this unordered_map");
         ((void)__h);
-        return try_emplace(_VSTD::move(__k), _VSTD::forward<_Args>(__args)...).first;
+        return try_emplace(_CUDA_VSTD::move(__k), _CUDA_VSTD::forward<_Args>(__args)...).first;
     }
 
     template <class _Vp>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> insert_or_assign(const key_type& __k, _Vp&& __v)
     {
         pair<iterator, bool> __res = __table_.__emplace_unique_key_args(__k,
-            __k, _VSTD::forward<_Vp>(__v));
+            __k, _CUDA_VSTD::forward<_Vp>(__v));
         if (!__res.second) {
-            __res.first->second = _VSTD::forward<_Vp>(__v);
+            __res.first->second = _CUDA_VSTD::forward<_Vp>(__v);
         }
         return __res;
     }
 
     template <class _Vp>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> insert_or_assign(key_type&& __k, _Vp&& __v)
     {
         pair<iterator, bool> __res = __table_.__emplace_unique_key_args(__k,
-            _VSTD::move(__k), _VSTD::forward<_Vp>(__v));
+            _CUDA_VSTD::move(__k), _CUDA_VSTD::forward<_Vp>(__v));
         if (!__res.second) {
-            __res.first->second = _VSTD::forward<_Vp>(__v);
+            __res.first->second = _CUDA_VSTD::forward<_Vp>(__v);
         }
         return __res;
     }
 
     template <class _Vp>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator insert_or_assign(const_iterator, const key_type& __k, _Vp&& __v)
      {
           // FIXME: Add debug mode checking for the iterator input
-          return insert_or_assign(__k, _VSTD::forward<_Vp>(__v)).first;
+          return insert_or_assign(__k, _CUDA_VSTD::forward<_Vp>(__v)).first;
      }
 
     template <class _Vp>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator insert_or_assign(const_iterator, key_type&& __k, _Vp&& __v)
      {
         // FIXME: Add debug mode checking for the iterator input
-        return insert_or_assign(_VSTD::move(__k), _VSTD::forward<_Vp>(__v)).first;
+        return insert_or_assign(_CUDA_VSTD::move(__k), _CUDA_VSTD::forward<_Vp>(__v)).first;
      }
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(iterator __p)       {return __table_.erase(__p.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k) {return __table_.__erase_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(const_iterator __first, const_iterator __last)
         {return __table_.erase(__first.__i_, __last.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
         void clear() _NOEXCEPT {__table_.clear();}
 
-#if _LIBCPP_STD_VER > 14
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
+    _LIBCUDACXX_INLINE_VISIBILITY
     insert_return_type insert(node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to unordered_map::insert()");
         return __table_.template __node_handle_insert_unique<
-            node_type, insert_return_type>(_VSTD::move(__nh));
+            node_type, insert_return_type>(_CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __hint, node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to unordered_map::insert()");
         return __table_.template __node_handle_insert_unique<node_type>(
-            __hint.__i_, _VSTD::move(__nh));
+            __hint.__i_, _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(key_type const& __key)
     {
         return __table_.template __node_handle_extract<node_type>(__key);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(const_iterator __it)
     {
         return __table_.template __node_handle_extract<node_type>(
@@ -1394,162 +1394,162 @@ public:
     }
 
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_map<key_type, mapped_type, _H2, _P2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_unique(__source.__table_);
     }
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_map<key_type, mapped_type, _H2, _P2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_unique(__source.__table_);
     }
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_multimap<key_type, mapped_type, _H2, _P2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_unique(__source.__table_);
     }
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_multimap<key_type, mapped_type, _H2, _P2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_unique(__source.__table_);
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(unordered_map& __u)
         _NOEXCEPT_(__is_nothrow_swappable<__table>::value)
         { __table_.swap(__u.__table_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hasher hash_function() const
         {return __table_.hash_function().hash_function();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_equal key_eq() const
         {return __table_.key_eq().key_eq();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const key_type& __k)       {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __table_.find(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const _K2& __k)            {return __table_.find(__k);}
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const _K2& __k) const      {return __table_.find(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const _K2& __k) const      {return __table_.__count_unique(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const key_type& __k) const {return find(__k) != end();}
 
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const _K2& __k) const      {return find(__k) != end();}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, iterator>             equal_range(const key_type& __k)
         {return __table_.__equal_range_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
         {return __table_.__equal_range_unique(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, iterator>             equal_range(const _K2& __k)
         {return __table_.__equal_range_unique(__k);}
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator, const_iterator> equal_range(const _K2& __k) const
         {return __table_.__equal_range_unique(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
     mapped_type& operator[](const key_type& __k);
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     mapped_type& operator[](key_type&& __k);
 #endif
 
     mapped_type&       at(const key_type& __k);
     const mapped_type& at(const key_type& __k) const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_count() const _NOEXCEPT {return __table_.bucket_count();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_bucket_count() const _NOEXCEPT {return __table_.max_bucket_count();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_size(size_type __n) const
         {return __table_.bucket_size(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket(const key_type& __k) const {return __table_.bucket(__k);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     local_iterator       begin(size_type __n)        {return __table_.begin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     local_iterator       end(size_type __n)          {return __table_.end(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator begin(size_type __n) const  {return __table_.cbegin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator end(size_type __n) const    {return __table_.cend(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator cbegin(size_type __n) const {return __table_.cbegin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator cend(size_type __n) const   {return __table_.cend(__n);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     float load_factor() const _NOEXCEPT {return __table_.load_factor();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     float max_load_factor() const _NOEXCEPT {return __table_.max_load_factor();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void rehash(size_type __n) {__table_.__rehash_unique(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reserve(size_type __n) {__table_.__reserve_unique(__n);}
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
     bool __dereferenceable(const const_iterator* __i) const
-        {return __table_.__dereferenceable(_VSTD::addressof(__i->__i_));}
+        {return __table_.__dereferenceable(_CUDA_VSTD::addressof(__i->__i_));}
     bool __decrementable(const const_iterator* __i) const
-        {return __table_.__decrementable(_VSTD::addressof(__i->__i_));}
+        {return __table_.__decrementable(_CUDA_VSTD::addressof(__i->__i_));}
     bool __addable(const const_iterator* __i, ptr
diff _t __n) const
-        {return __table_.__addable(_VSTD::addressof(__i->__i_), __n);}
+        {return __table_.__addable(_CUDA_VSTD::addressof(__i->__i_), __n);}
     bool __subscriptable(const const_iterator* __i, ptr
diff _t __n) const
-        {return __table_.__addable(_VSTD::addressof(__i->__i_), __n);}
+        {return __table_.__addable(_CUDA_VSTD::addressof(__i->__i_), __n);}
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 private:
 
-#ifdef _LIBCPP_CXX03_LANG
+#ifdef _LIBCUDACXX_CXX03_LANG
     __node_holder __construct_node_with_key(const key_type& __k);
 #endif
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator,
          class _Hash = hash<__iter_key_type<_InputIterator>>,
          class _Pred = equal_to<__iter_key_type<_InputIterator>>,
@@ -1625,7 +1625,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         size_type __n, const hasher& __hf, const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
 }
 
@@ -1635,7 +1635,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         const allocator_type& __a)
     : __table_(__hf, __eql, typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
 }
 
@@ -1645,7 +1645,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         const allocator_type& __a)
     : __table_(typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
@@ -1653,7 +1653,7 @@ template <class _InputIterator>
 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         _InputIterator __first, _InputIterator __last)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     insert(__first, __last);
 }
 
@@ -1664,7 +1664,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         const hasher& __hf, const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
     insert(__first, __last);
 }
@@ -1676,7 +1676,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         const hasher& __hf, const key_equal& __eql, const allocator_type& __a)
     : __table_(__hf, __eql, typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
     insert(__first, __last);
 }
@@ -1686,7 +1686,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         const unordered_map& __u)
     : __table_(__u.__table_)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__u.bucket_count());
     insert(__u.begin(), __u.end());
 }
@@ -1696,30 +1696,30 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         const unordered_map& __u, const allocator_type& __a)
     : __table_(__u.__table_, typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__u.bucket_count());
     insert(__u.begin(), __u.end());
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
 inline
 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         unordered_map&& __u)
     _NOEXCEPT_(is_nothrow_move_constructible<__table>::value)
-    : __table_(_VSTD::move(__u.__table_))
+    : __table_(_CUDA_VSTD::move(__u.__table_))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     std::__debug_db_swap(this, std::addressof(__u));
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         unordered_map&& __u, const allocator_type& __a)
-    : __table_(_VSTD::move(__u.__table_), typename __table::allocator_type(__a))
+    : __table_(_CUDA_VSTD::move(__u.__table_), typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     if (__a != __u.get_allocator())
     {
         iterator __i = __u.begin();
@@ -1736,7 +1736,7 @@ template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         initializer_list<value_type> __il)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     insert(__il.begin(), __il.end());
 }
 
@@ -1746,7 +1746,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
     insert(__il.begin(), __il.end());
 }
@@ -1757,7 +1757,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_map(
         const key_equal& __eql, const allocator_type& __a)
     : __table_(__hf, __eql, typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
     insert(__il.begin(), __il.end());
 }
@@ -1768,7 +1768,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&
 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_map&& __u)
     _NOEXCEPT_(is_nothrow_move_assignable<__table>::value)
 {
-    __table_ = _VSTD::move(__u.__table_);
+    __table_ = _CUDA_VSTD::move(__u.__table_);
     return *this;
 }
 
@@ -1782,7 +1782,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
     return *this;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
 template <class _InputIterator>
@@ -1795,15 +1795,15 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
         __table_.__insert_unique(*__first);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
 _Tp&
 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k)
 {
     return __table_.__emplace_unique_key_args(__k,
-        piecewise_construct, _VSTD::forward_as_tuple(__k),
-                             _VSTD::forward_as_tuple()).first->__get_value().second;
+        piecewise_construct, _CUDA_VSTD::forward_as_tuple(__k),
+                             _CUDA_VSTD::forward_as_tuple()).first->__get_value().second;
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
@@ -1811,10 +1811,10 @@ _Tp&
 unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](key_type&& __k)
 {
     return __table_.__emplace_unique_key_args(__k,
-        piecewise_construct, _VSTD::forward_as_tuple(_VSTD::move(__k)),
-                             _VSTD::forward_as_tuple()).first->__get_value().second;
+        piecewise_construct, _CUDA_VSTD::forward_as_tuple(_CUDA_VSTD::move(__k)),
+                             _CUDA_VSTD::forward_as_tuple()).first->__get_value().second;
 }
-#else // _LIBCPP_CXX03_LANG
+#else // _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
 typename unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__node_holder
@@ -1822,9 +1822,9 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::__construct_node_with_key(const
 {
     __node_allocator& __na = __table_.__node_alloc();
     __node_holder __h(__node_traits::allocate(__na, 1), _Dp(__na));
-    __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().first), __k);
+    __node_traits::construct(__na, _CUDA_VSTD::addressof(__h->__value_.__get_value().first), __k);
     __h.get_deleter().__first_constructed = true;
-    __node_traits::construct(__na, _VSTD::addressof(__h->__value_.__get_value().second));
+    __node_traits::construct(__na, _CUDA_VSTD::addressof(__h->__value_.__get_value().second));
     __h.get_deleter().__second_constructed = true;
     return __h;
 }
@@ -1842,7 +1842,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::operator[](const key_type& __k)
     return __r.first->second;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
 _Tp&
@@ -1865,7 +1865,7 @@ unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::at(const key_type& __k) const
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
      unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
@@ -1874,14 +1874,14 @@ swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
           class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
     typename unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type
     erase_if(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __c,
              _Predicate __pred) {
-  return _VSTD::__libcpp_erase_if_container(__c, __pred);
+  return _CUDA_VSTD::__LIBCUDACXX_erase_if_container(__c, __pred);
 }
 #endif
 
@@ -1905,7 +1905,7 @@ operator==(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
            const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
@@ -1915,7 +1915,7 @@ operator!=(const unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
 
 template <class _Key, class _Tp, class _Hash = hash<_Key>, class _Pred = equal_to<_Key>,
           class _Alloc = allocator<pair<const _Key, _Tp> > >
-class _LIBCPP_TEMPLATE_VIS unordered_multimap
+class _LIBCUDACXX_TEMPLATE_VIS unordered_multimap
 {
 public:
     // types
@@ -1963,20 +1963,20 @@ public:
     typedef __hash_map_iterator<typename __table::local_iterator> local_iterator;
     typedef __hash_map_const_iterator<typename __table::const_local_iterator> const_local_iterator;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     typedef __map_node_handle<__node, allocator_type> node_type;
 #endif
 
     template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS unordered_map;
+        friend class _LIBCUDACXX_TEMPLATE_VIS unordered_map;
     template <class _Key2, class _Tp2, class _Hash2, class _Pred2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS unordered_multimap;
+        friend class _LIBCUDACXX_TEMPLATE_VIS unordered_multimap;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multimap()
         _NOEXCEPT_(is_nothrow_default_constructible<__table>::value)
     {
-        _VSTD::__debug_db_insert_c(this);
+        _CUDA_VSTD::__debug_db_insert_c(this);
     }
     explicit unordered_multimap(size_type __n, const hasher& __hf = hasher(),
                                 const key_equal& __eql = key_equal());
@@ -1994,12 +1994,12 @@ public:
                       size_type __n, const hasher& __hf,
                       const key_equal& __eql,
                       const allocator_type& __a);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit unordered_multimap(const allocator_type& __a);
     unordered_multimap(const unordered_multimap& __u);
     unordered_multimap(const unordered_multimap& __u, const allocator_type& __a);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multimap(unordered_multimap&& __u)
         _NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
     unordered_multimap(unordered_multimap&& __u, const allocator_type& __a);
@@ -2010,43 +2010,43 @@ public:
     unordered_multimap(initializer_list<value_type> __il, size_type __n,
                        const hasher& __hf, const key_equal& __eql,
                        const allocator_type& __a);
-#endif // _LIBCPP_CXX03_LANG
-#if _LIBCPP_STD_VER > 11
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_CXX03_LANG
+#if _LIBCUDACXX_STD_VER > 11
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multimap(size_type __n, const allocator_type& __a)
       : unordered_multimap(__n, hasher(), key_equal(), __a) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multimap(size_type __n, const hasher& __hf, const allocator_type& __a)
       : unordered_multimap(__n, __hf, key_equal(), __a) {}
     template <class _InputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
       unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n, const allocator_type& __a)
       : unordered_multimap(__first, __last, __n, hasher(), key_equal(), __a) {}
     template <class _InputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
       unordered_multimap(_InputIterator __first, _InputIterator __last, size_type __n, const hasher& __hf,
         const allocator_type& __a)
       : unordered_multimap(__first, __last, __n, __hf, key_equal(), __a) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multimap(initializer_list<value_type> __il, size_type __n, const allocator_type& __a)
       : unordered_multimap(__il, __n, hasher(), key_equal(), __a) {}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multimap(initializer_list<value_type> __il, size_type __n, const hasher& __hf,
       const allocator_type& __a)
       : unordered_multimap(__il, __n, __hf, key_equal(), __a) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~unordered_multimap() {
         static_assert(sizeof(__diagnose_unordered_container_requirements<_Key, _Hash, _Pred>(0)), "");
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multimap& operator=(const unordered_multimap& __u)
     {
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
         __table_ = __u.__table_;
 #else
-        if (this != _VSTD::addressof(__u)) {
+        if (this != _CUDA_VSTD::addressof(__u)) {
             __table_.clear();
             __table_.hash_function() = __u.__table_.hash_function();
             __table_.key_eq() = __u.__table_.key_eq();
@@ -2057,119 +2057,119 @@ public:
 #endif
         return *this;
     }
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multimap& operator=(unordered_multimap&& __u)
         _NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multimap& operator=(initializer_list<value_type> __il);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT
         {return allocator_type(__table_.__node_alloc());}
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool      empty() const _NOEXCEPT {return __table_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT  {return __table_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT {return __table_.max_size();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       begin() _NOEXCEPT        {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       end() _NOEXCEPT          {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin()  const _NOEXCEPT {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()    const _NOEXCEPT {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin() const _NOEXCEPT {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend()   const _NOEXCEPT {return __table_.end();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, const value_type& __x)
         {return __table_.__insert_multi(__p.__i_, __x);}
 
     template <class _InputIterator>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void insert(_InputIterator __first, _InputIterator __last);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     void insert(initializer_list<value_type> __il)
         {insert(__il.begin(), __il.end());}
-    _LIBCPP_INLINE_VISIBILITY
-    iterator insert(value_type&& __x) {return __table_.__insert_multi(_VSTD::move(__x));}
+    _LIBCUDACXX_INLINE_VISIBILITY
+    iterator insert(value_type&& __x) {return __table_.__insert_multi(_CUDA_VSTD::move(__x));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, value_type&& __x)
-        {return __table_.__insert_multi(__p.__i_, _VSTD::move(__x));}
+        {return __table_.__insert_multi(__p.__i_, _CUDA_VSTD::move(__x));}
 
     template <class _Pp,
               class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(_Pp&& __x)
-        {return __table_.__insert_multi(_VSTD::forward<_Pp>(__x));}
+        {return __table_.__insert_multi(_CUDA_VSTD::forward<_Pp>(__x));}
 
     template <class _Pp,
               class = __enable_if_t<is_constructible<value_type, _Pp>::value> >
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, _Pp&& __x)
-        {return __table_.__insert_multi(__p.__i_, _VSTD::forward<_Pp>(__x));}
+        {return __table_.__insert_multi(__p.__i_, _CUDA_VSTD::forward<_Pp>(__x));}
 
     template <class... _Args>
     iterator emplace(_Args&&... __args) {
-        return __table_.__emplace_multi(_VSTD::forward<_Args>(__args)...);
+        return __table_.__emplace_multi(_CUDA_VSTD::forward<_Args>(__args)...);
     }
 
     template <class... _Args>
     iterator emplace_hint(const_iterator __p, _Args&&... __args) {
-        return __table_.__emplace_hint_multi(__p.__i_, _VSTD::forward<_Args>(__args)...);
+        return __table_.__emplace_hint_multi(__p.__i_, _CUDA_VSTD::forward<_Args>(__args)...);
     }
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(const_iterator __p) {return __table_.erase(__p.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(iterator __p)       {return __table_.erase(__p.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k) {return __table_.__erase_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(const_iterator __first, const_iterator __last)
         {return __table_.erase(__first.__i_, __last.__i_);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT {__table_.clear();}
 
-#if _LIBCPP_STD_VER > 14
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to unordered_multimap::insert()");
         return __table_.template __node_handle_insert_multi<node_type>(
-            _VSTD::move(__nh));
+            _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __hint, node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to unordered_multimap::insert()");
         return __table_.template __node_handle_insert_multi<node_type>(
-            __hint.__i_, _VSTD::move(__nh));
+            __hint.__i_, _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(key_type const& __key)
     {
         return __table_.template __node_handle_extract<node_type>(__key);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(const_iterator __it)
     {
         return __table_.template __node_handle_extract<node_type>(
@@ -2177,151 +2177,151 @@ public:
     }
 
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_multimap<key_type, mapped_type, _H2, _P2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_multi(__source.__table_);
     }
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_multimap<key_type, mapped_type, _H2, _P2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_multi(__source.__table_);
     }
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_map<key_type, mapped_type, _H2, _P2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_multi(__source.__table_);
     }
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_map<key_type, mapped_type, _H2, _P2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_multi(__source.__table_);
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(unordered_multimap& __u)
         _NOEXCEPT_(__is_nothrow_swappable<__table>::value)
         {__table_.swap(__u.__table_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hasher hash_function() const
         {return __table_.hash_function().hash_function();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_equal key_eq() const
         {return __table_.key_eq().key_eq();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const key_type& __k)       {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __table_.find(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const _K2& __k)            {return __table_.find(__k);}
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const _K2& __k) const      {return __table_.find(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const _K2& __k) const      {return __table_.__count_multi(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const key_type& __k) const {return find(__k) != end();}
 
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const _K2& __k) const      {return find(__k) != end();}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, iterator>             equal_range(const key_type& __k)
         {return __table_.__equal_range_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
         {return __table_.__equal_range_multi(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, iterator>             equal_range(const _K2& __k)
         {return __table_.__equal_range_multi(__k);}
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator, const_iterator> equal_range(const _K2& __k) const
         {return __table_.__equal_range_multi(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_count() const _NOEXCEPT {return __table_.bucket_count();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_bucket_count() const _NOEXCEPT
         {return __table_.max_bucket_count();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_size(size_type __n) const
         {return __table_.bucket_size(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket(const key_type& __k) const {return __table_.bucket(__k);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     local_iterator       begin(size_type __n)        {return __table_.begin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     local_iterator       end(size_type __n)          {return __table_.end(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator begin(size_type __n) const  {return __table_.cbegin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator end(size_type __n) const    {return __table_.cend(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator cbegin(size_type __n) const {return __table_.cbegin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator cend(size_type __n) const   {return __table_.cend(__n);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     float load_factor() const _NOEXCEPT {return __table_.load_factor();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     float max_load_factor() const _NOEXCEPT {return __table_.max_load_factor();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void rehash(size_type __n) {__table_.__rehash_multi(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reserve(size_type __n) {__table_.__reserve_multi(__n);}
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
     bool __dereferenceable(const const_iterator* __i) const
-        {return __table_.__dereferenceable(_VSTD::addressof(__i->__i_));}
+        {return __table_.__dereferenceable(_CUDA_VSTD::addressof(__i->__i_));}
     bool __decrementable(const const_iterator* __i) const
-        {return __table_.__decrementable(_VSTD::addressof(__i->__i_));}
+        {return __table_.__decrementable(_CUDA_VSTD::addressof(__i->__i_));}
     bool __addable(const const_iterator* __i, ptr
diff _t __n) const
-        {return __table_.__addable(_VSTD::addressof(__i->__i_), __n);}
+        {return __table_.__addable(_CUDA_VSTD::addressof(__i->__i_), __n);}
     bool __subscriptable(const const_iterator* __i, ptr
diff _t __n) const
-        {return __table_.__addable(_VSTD::addressof(__i->__i_), __n);}
+        {return __table_.__addable(_CUDA_VSTD::addressof(__i->__i_), __n);}
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator,
          class _Hash = hash<__iter_key_type<_InputIterator>>,
          class _Pred = equal_to<__iter_key_type<_InputIterator>>,
@@ -2397,7 +2397,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         size_type __n, const hasher& __hf, const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
 }
 
@@ -2407,7 +2407,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         const allocator_type& __a)
     : __table_(__hf, __eql, typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
 }
 
@@ -2416,7 +2416,7 @@ template <class _InputIterator>
 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         _InputIterator __first, _InputIterator __last)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     insert(__first, __last);
 }
 
@@ -2427,7 +2427,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         const hasher& __hf, const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
     insert(__first, __last);
 }
@@ -2439,7 +2439,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         const hasher& __hf, const key_equal& __eql, const allocator_type& __a)
     : __table_(__hf, __eql, typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
     insert(__first, __last);
 }
@@ -2450,7 +2450,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         const allocator_type& __a)
     : __table_(typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
@@ -2458,7 +2458,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         const unordered_multimap& __u)
     : __table_(__u.__table_)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__u.bucket_count());
     insert(__u.begin(), __u.end());
 }
@@ -2468,30 +2468,30 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         const unordered_multimap& __u, const allocator_type& __a)
     : __table_(__u.__table_, typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__u.bucket_count());
     insert(__u.begin(), __u.end());
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
 inline
 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         unordered_multimap&& __u)
     _NOEXCEPT_(is_nothrow_move_constructible<__table>::value)
-    : __table_(_VSTD::move(__u.__table_))
+    : __table_(_CUDA_VSTD::move(__u.__table_))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     std::__debug_db_swap(this, std::addressof(__u));
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         unordered_multimap&& __u, const allocator_type& __a)
-    : __table_(_VSTD::move(__u.__table_), typename __table::allocator_type(__a))
+    : __table_(_CUDA_VSTD::move(__u.__table_), typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     if (__a != __u.get_allocator())
     {
         iterator __i = __u.begin();
@@ -2509,7 +2509,7 @@ template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         initializer_list<value_type> __il)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     insert(__il.begin(), __il.end());
 }
 
@@ -2519,7 +2519,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
     insert(__il.begin(), __il.end());
 }
@@ -2530,7 +2530,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::unordered_multimap(
         const key_equal& __eql, const allocator_type& __a)
     : __table_(__hf, __eql, typename __table::allocator_type(__a))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
     insert(__il.begin(), __il.end());
 }
@@ -2541,7 +2541,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&
 unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(unordered_multimap&& __u)
     _NOEXCEPT_(is_nothrow_move_assignable<__table>::value)
 {
-    __table_ = _VSTD::move(__u.__table_);
+    __table_ = _CUDA_VSTD::move(__u.__table_);
     return *this;
 }
 
@@ -2555,7 +2555,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::operator=(
     return *this;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 
 
@@ -2571,7 +2571,7 @@ unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::insert(_InputIterator __fir
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
      unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
@@ -2580,14 +2580,14 @@ swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc,
           class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
     typename unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>::size_type
     erase_if(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __c,
              _Predicate __pred) {
-  return _VSTD::__libcpp_erase_if_container(__c, __pred);
+  return _CUDA_VSTD::__LIBCUDACXX_erase_if_container(__c, __pred);
 }
 #endif
 
@@ -2605,9 +2605,9 @@ operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
     {
         _EqRng __xeq = __x.equal_range(__i->first);
         _EqRng __yeq = __y.equal_range(__i->first);
-        if (_VSTD::distance(__xeq.first, __xeq.second) !=
-            _VSTD::distance(__yeq.first, __yeq.second) ||
-                  !_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first))
+        if (_CUDA_VSTD::distance(__xeq.first, __xeq.second) !=
+            _CUDA_VSTD::distance(__yeq.first, __yeq.second) ||
+                  !_CUDA_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first))
             return false;
         __i = __xeq.second;
     }
@@ -2615,7 +2615,7 @@ operator==(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
 }
 
 template <class _Key, class _Tp, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
            const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __y)
@@ -2623,6 +2623,6 @@ operator!=(const unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x,
     return !(__x == __y);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_UNORDERED_MAP
+#endif // _LIBCUDACXX_UNORDERED_MAP

diff  --git a/libcxx/include/unordered_set b/libcxx/include/unordered_set
index fc6e8e21c0cb..f2a932d569c7 100644
--- a/libcxx/include/unordered_set
+++ b/libcxx/include/unordered_set
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_UNORDERED_SET
-#define _LIBCPP_UNORDERED_SET
+#ifndef _LIBCUDACXX_UNORDERED_SET
+#define _LIBCUDACXX_UNORDERED_SET
 
 /*
 
@@ -474,7 +474,7 @@ template <class Value, class Hash, class Pred, class Alloc>
 #include <__utility/forward.h>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <functional>
 #  include <iterator>
 #endif
@@ -492,18 +492,18 @@ template <class Value, class Hash, class Pred, class Alloc>
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 class unordered_multiset;
 
 template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
           class _Alloc = allocator<_Value> >
-class _LIBCPP_TEMPLATE_VIS unordered_set
+class _LIBCUDACXX_TEMPLATE_VIS unordered_set
 {
 public:
     // types
@@ -533,29 +533,29 @@ public:
     typedef typename __table::const_local_iterator local_iterator;
     typedef typename __table::const_local_iterator const_local_iterator;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     typedef __set_node_handle<typename __table::__node, allocator_type> node_type;
     typedef __insert_return_type<iterator, node_type> insert_return_type;
 #endif
 
     template <class _Value2, class _Hash2, class _Pred2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS unordered_set;
+        friend class _LIBCUDACXX_TEMPLATE_VIS unordered_set;
     template <class _Value2, class _Hash2, class _Pred2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS unordered_multiset;
+        friend class _LIBCUDACXX_TEMPLATE_VIS unordered_multiset;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_set()
         _NOEXCEPT_(is_nothrow_default_constructible<__table>::value)
     {
-        _VSTD::__debug_db_insert_c(this);
+        _CUDA_VSTD::__debug_db_insert_c(this);
     }
     explicit unordered_set(size_type __n, const hasher& __hf = hasher(),
                            const key_equal& __eql = key_equal());
-#if _LIBCPP_STD_VER > 11
-    inline _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 11
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     unordered_set(size_type __n, const allocator_type& __a)
         : unordered_set(__n, hasher(), key_equal(), __a) {}
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     unordered_set(size_type __n, const hasher& __hf, const allocator_type& __a)
         : unordered_set(__n, __hf, key_equal(), __a) {}
 #endif
@@ -571,9 +571,9 @@ public:
         unordered_set(_InputIterator __first, _InputIterator __last,
                       size_type __n, const hasher& __hf, const key_equal& __eql,
                       const allocator_type& __a);
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <class _InputIterator>
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
         unordered_set(_InputIterator __first, _InputIterator __last,
                     size_type __n, const allocator_type& __a)
             : unordered_set(__first, __last, __n, hasher(), key_equal(), __a) {}
@@ -582,12 +582,12 @@ public:
                       size_type __n, const hasher& __hf, const allocator_type& __a)
             : unordered_set(__first, __last, __n, __hf, key_equal(), __a) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit unordered_set(const allocator_type& __a);
     unordered_set(const unordered_set& __u);
     unordered_set(const unordered_set& __u, const allocator_type& __a);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_set(unordered_set&& __u)
         _NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
     unordered_set(unordered_set&& __u, const allocator_type& __a);
@@ -598,271 +598,271 @@ public:
     unordered_set(initializer_list<value_type> __il, size_type __n,
                   const hasher& __hf, const key_equal& __eql,
                   const allocator_type& __a);
-#if _LIBCPP_STD_VER > 11
-    inline _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 11
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     unordered_set(initializer_list<value_type> __il, size_type __n,
                                                       const allocator_type& __a)
         : unordered_set(__il, __n, hasher(), key_equal(), __a) {}
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     unordered_set(initializer_list<value_type> __il, size_type __n,
                                   const hasher& __hf, const allocator_type& __a)
         : unordered_set(__il, __n, __hf, key_equal(), __a) {}
 #endif
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~unordered_set() {
         static_assert(sizeof(__diagnose_unordered_container_requirements<_Value, _Hash, _Pred>(0)), "");
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_set& operator=(const unordered_set& __u)
     {
         __table_ = __u.__table_;
         return *this;
     }
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_set& operator=(unordered_set&& __u)
         _NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_set& operator=(initializer_list<value_type> __il);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT
         {return allocator_type(__table_.__node_alloc());}
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool      empty() const _NOEXCEPT {return __table_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT  {return __table_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT {return __table_.max_size();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       begin() _NOEXCEPT        {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       end() _NOEXCEPT          {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin()  const _NOEXCEPT {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()    const _NOEXCEPT {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin() const _NOEXCEPT {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend()   const _NOEXCEPT {return __table_.end();}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         pair<iterator, bool> emplace(_Args&&... __args)
-            {return __table_.__emplace_unique(_VSTD::forward<_Args>(__args)...);}
+            {return __table_.__emplace_unique(_CUDA_VSTD::forward<_Args>(__args)...);}
     template <class... _Args>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator emplace_hint(const_iterator __p, _Args&&... __args) {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this,
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this,
             "unordered_set::emplace_hint(const_iterator, args...) called with an iterator not"
             " referring to this unordered_set");
         (void)__p;
         return __table_.__emplace_unique(std::forward<_Args>(__args)...).first;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> insert(value_type&& __x)
-        {return __table_.__insert_unique(_VSTD::move(__x));}
-    _LIBCPP_INLINE_VISIBILITY
+        {return __table_.__insert_unique(_CUDA_VSTD::move(__x));}
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, value_type&& __x) {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this,
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this,
             "unordered_set::insert(const_iterator, value_type&&) called with an iterator not"
             " referring to this unordered_set");
         (void)__p;
         return insert(std::move(__x)).first;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void insert(initializer_list<value_type> __il)
         {insert(__il.begin(), __il.end());}
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, bool> insert(const value_type& __x)
         {return __table_.__insert_unique(__x);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, const value_type& __x) {
-        _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this,
+        _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(std::addressof(__p)) == this,
             "unordered_set::insert(const_iterator, const value_type&) called with an iterator not"
             " referring to this unordered_set");
         (void)__p;
         return insert(__x).first;
     }
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void insert(_InputIterator __first, _InputIterator __last);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(const_iterator __p) {return __table_.erase(__p);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k) {return __table_.__erase_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(const_iterator __first, const_iterator __last)
         {return __table_.erase(__first, __last);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT {__table_.clear();}
 
-#if _LIBCPP_STD_VER > 14
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
+    _LIBCUDACXX_INLINE_VISIBILITY
     insert_return_type insert(node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to unordered_set::insert()");
         return __table_.template __node_handle_insert_unique<
-            node_type, insert_return_type>(_VSTD::move(__nh));
+            node_type, insert_return_type>(_CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __h, node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to unordered_set::insert()");
         return __table_.template __node_handle_insert_unique<node_type>(
-            __h, _VSTD::move(__nh));
+            __h, _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(key_type const& __key)
     {
         return __table_.template __node_handle_extract<node_type>(__key);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(const_iterator __it)
     {
         return __table_.template __node_handle_extract<node_type>(__it);
     }
 
     template<class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_set<key_type, _H2, _P2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __table_.__node_handle_merge_unique(__source.__table_);
     }
     template<class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_set<key_type, _H2, _P2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __table_.__node_handle_merge_unique(__source.__table_);
     }
     template<class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_multiset<key_type, _H2, _P2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __table_.__node_handle_merge_unique(__source.__table_);
     }
     template<class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_multiset<key_type, _H2, _P2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         __table_.__node_handle_merge_unique(__source.__table_);
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(unordered_set& __u)
         _NOEXCEPT_(__is_nothrow_swappable<__table>::value)
         {__table_.swap(__u.__table_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hasher hash_function() const {return __table_.hash_function();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_equal key_eq() const {return __table_.key_eq();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const key_type& __k)       {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __table_.find(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const _K2& __k)            {return __table_.find(__k);}
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const _K2& __k) const      {return __table_.find(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const key_type& __k) const {return __table_.__count_unique(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const _K2& __k) const      {return __table_.__count_unique(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const key_type& __k) const {return find(__k) != end();}
 
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const _K2& __k) const      {return find(__k) != end();}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, iterator>             equal_range(const key_type& __k)
         {return __table_.__equal_range_unique(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
         {return __table_.__equal_range_unique(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, iterator>             equal_range(const _K2& __k)
         {return __table_.__equal_range_unique(__k);}
     template <class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator, const_iterator> equal_range(const _K2& __k) const
         {return __table_.__equal_range_unique(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_count() const _NOEXCEPT {return __table_.bucket_count();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_bucket_count() const _NOEXCEPT {return __table_.max_bucket_count();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_size(size_type __n) const {return __table_.bucket_size(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket(const key_type& __k) const {return __table_.bucket(__k);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     local_iterator       begin(size_type __n)        {return __table_.begin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     local_iterator       end(size_type __n)          {return __table_.end(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator begin(size_type __n) const  {return __table_.cbegin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator end(size_type __n) const    {return __table_.cend(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator cbegin(size_type __n) const {return __table_.cbegin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator cend(size_type __n) const   {return __table_.cend(__n);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     float load_factor() const _NOEXCEPT {return __table_.load_factor();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     float max_load_factor() const _NOEXCEPT {return __table_.max_load_factor();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void rehash(size_type __n) {__table_.__rehash_unique(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reserve(size_type __n) {__table_.__reserve_unique(__n);}
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
     bool __dereferenceable(const const_iterator* __i) const
         {return __table_.__dereferenceable(__i);}
@@ -873,11 +873,11 @@ public:
     bool __subscriptable(const const_iterator* __i, ptr
diff _t __n) const
         {return __table_.__addable(__i, __n);}
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator,
          class _Hash = hash<__iter_value_type<_InputIterator>>,
          class _Pred = equal_to<__iter_value_type<_InputIterator>>,
@@ -941,7 +941,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(size_type __n,
         const hasher& __hf, const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
 }
 
@@ -950,7 +950,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(size_type __n,
         const hasher& __hf, const key_equal& __eql, const allocator_type& __a)
     : __table_(__hf, __eql, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
 }
 
@@ -959,7 +959,7 @@ template <class _InputIterator>
 unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         _InputIterator __first, _InputIterator __last)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     insert(__first, __last);
 }
 
@@ -970,7 +970,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         const hasher& __hf, const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
     insert(__first, __last);
 }
@@ -982,7 +982,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         const hasher& __hf, const key_equal& __eql, const allocator_type& __a)
     : __table_(__hf, __eql, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
     insert(__first, __last);
 }
@@ -993,7 +993,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         const allocator_type& __a)
     : __table_(__a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
@@ -1001,7 +1001,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         const unordered_set& __u)
     : __table_(__u.__table_)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__u.bucket_count());
     insert(__u.begin(), __u.end());
 }
@@ -1011,35 +1011,35 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         const unordered_set& __u, const allocator_type& __a)
     : __table_(__u.__table_, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__u.bucket_count());
     insert(__u.begin(), __u.end());
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 inline
 unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         unordered_set&& __u)
     _NOEXCEPT_(is_nothrow_move_constructible<__table>::value)
-    : __table_(_VSTD::move(__u.__table_))
+    : __table_(_CUDA_VSTD::move(__u.__table_))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     std::__debug_db_swap(this, std::addressof(__u));
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         unordered_set&& __u, const allocator_type& __a)
-    : __table_(_VSTD::move(__u.__table_), __a)
+    : __table_(_CUDA_VSTD::move(__u.__table_), __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     if (__a != __u.get_allocator())
     {
         iterator __i = __u.begin();
         while (__u.size() != 0)
-            __table_.__insert_unique(_VSTD::move(__u.__table_.remove(__i++)->__value_));
+            __table_.__insert_unique(_CUDA_VSTD::move(__u.__table_.remove(__i++)->__value_));
     }
     else
         std::__debug_db_swap(this, std::addressof(__u));
@@ -1049,7 +1049,7 @@ template <class _Value, class _Hash, class _Pred, class _Alloc>
 unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         initializer_list<value_type> __il)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     insert(__il.begin(), __il.end());
 }
 
@@ -1059,7 +1059,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
     insert(__il.begin(), __il.end());
 }
@@ -1070,7 +1070,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::unordered_set(
         const key_equal& __eql, const allocator_type& __a)
     : __table_(__hf, __eql, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_unique(__n);
     insert(__il.begin(), __il.end());
 }
@@ -1081,7 +1081,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>&
 unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(unordered_set&& __u)
     _NOEXCEPT_(is_nothrow_move_assignable<__table>::value)
 {
-    __table_ = _VSTD::move(__u.__table_);
+    __table_ = _CUDA_VSTD::move(__u.__table_);
     return *this;
 }
 
@@ -1095,7 +1095,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::operator=(
     return *this;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 template <class _InputIterator>
@@ -1109,7 +1109,7 @@ unordered_set<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
      unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -1118,14 +1118,14 @@ swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Value, class _Hash, class _Pred, class _Alloc,
           class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
     typename unordered_set<_Value, _Hash, _Pred, _Alloc>::size_type
     erase_if(unordered_set<_Value, _Hash, _Pred, _Alloc>& __c,
              _Predicate __pred) {
-  return _VSTD::__libcpp_erase_if_container(__c, __pred);
+  return _CUDA_VSTD::__LIBCUDACXX_erase_if_container(__c, __pred);
 }
 #endif
 
@@ -1149,7 +1149,7 @@ operator==(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
            const unordered_set<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -1159,7 +1159,7 @@ operator!=(const unordered_set<_Value, _Hash, _Pred, _Alloc>& __x,
 
 template <class _Value, class _Hash = hash<_Value>, class _Pred = equal_to<_Value>,
           class _Alloc = allocator<_Value> >
-class _LIBCPP_TEMPLATE_VIS unordered_multiset
+class _LIBCUDACXX_TEMPLATE_VIS unordered_multiset
 {
 public:
     // types
@@ -1189,30 +1189,30 @@ public:
     typedef typename __table::const_local_iterator local_iterator;
     typedef typename __table::const_local_iterator const_local_iterator;
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
     typedef __set_node_handle<typename __table::__node, allocator_type> node_type;
 #endif
 
     template <class _Value2, class _Hash2, class _Pred2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS unordered_set;
+        friend class _LIBCUDACXX_TEMPLATE_VIS unordered_set;
     template <class _Value2, class _Hash2, class _Pred2, class _Alloc2>
-        friend class _LIBCPP_TEMPLATE_VIS unordered_multiset;
+        friend class _LIBCUDACXX_TEMPLATE_VIS unordered_multiset;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multiset()
         _NOEXCEPT_(is_nothrow_default_constructible<__table>::value)
     {
-        _VSTD::__debug_db_insert_c(this);
+        _CUDA_VSTD::__debug_db_insert_c(this);
     }
     explicit unordered_multiset(size_type __n, const hasher& __hf = hasher(),
                                 const key_equal& __eql = key_equal());
     unordered_multiset(size_type __n, const hasher& __hf,
                        const key_equal& __eql, const allocator_type& __a);
-#if _LIBCPP_STD_VER > 11
-    inline _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 11
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multiset(size_type __n, const allocator_type& __a)
         : unordered_multiset(__n, hasher(), key_equal(), __a) {}
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multiset(size_type __n, const hasher& __hf, const allocator_type& __a)
         : unordered_multiset(__n, __hf, key_equal(), __a) {}
 #endif
@@ -1226,24 +1226,24 @@ public:
         unordered_multiset(_InputIterator __first, _InputIterator __last,
                       size_type __n , const hasher& __hf,
                       const key_equal& __eql, const allocator_type& __a);
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <class _InputIterator>
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multiset(_InputIterator __first, _InputIterator __last,
                        size_type __n, const allocator_type& __a)
         : unordered_multiset(__first, __last, __n, hasher(), key_equal(), __a) {}
     template <class _InputIterator>
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multiset(_InputIterator __first, _InputIterator __last,
                        size_type __n, const hasher& __hf, const allocator_type& __a)
         : unordered_multiset(__first, __last, __n, __hf, key_equal(), __a) {}
 #endif
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit unordered_multiset(const allocator_type& __a);
     unordered_multiset(const unordered_multiset& __u);
     unordered_multiset(const unordered_multiset& __u, const allocator_type& __a);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multiset(unordered_multiset&& __u)
         _NOEXCEPT_(is_nothrow_move_constructible<__table>::value);
     unordered_multiset(unordered_multiset&& __u, const allocator_type& __a);
@@ -1254,253 +1254,253 @@ public:
     unordered_multiset(initializer_list<value_type> __il, size_type __n,
                        const hasher& __hf, const key_equal& __eql,
                        const allocator_type& __a);
-#if _LIBCPP_STD_VER > 11
-    inline _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 11
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multiset(initializer_list<value_type> __il, size_type __n, const allocator_type& __a)
       : unordered_multiset(__il, __n, hasher(), key_equal(), __a) {}
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multiset(initializer_list<value_type> __il, size_type __n, const hasher& __hf, const allocator_type& __a)
       : unordered_multiset(__il, __n, __hf, key_equal(), __a) {}
 #endif
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     ~unordered_multiset() {
         static_assert(sizeof(__diagnose_unordered_container_requirements<_Value, _Hash, _Pred>(0)), "");
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multiset& operator=(const unordered_multiset& __u)
     {
         __table_ = __u.__table_;
         return *this;
     }
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     unordered_multiset& operator=(unordered_multiset&& __u)
         _NOEXCEPT_(is_nothrow_move_assignable<__table>::value);
     unordered_multiset& operator=(initializer_list<value_type> __il);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT
         {return allocator_type(__table_.__node_alloc());}
 
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool      empty() const _NOEXCEPT {return __table_.size() == 0;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT  {return __table_.size();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_size() const _NOEXCEPT {return __table_.max_size();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       begin() _NOEXCEPT        {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       end() _NOEXCEPT          {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator begin()  const _NOEXCEPT {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator end()    const _NOEXCEPT {return __table_.end();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cbegin() const _NOEXCEPT {return __table_.begin();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator cend()   const _NOEXCEPT {return __table_.end();}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator emplace(_Args&&... __args)
-            {return __table_.__emplace_multi(_VSTD::forward<_Args>(__args)...);}
+            {return __table_.__emplace_multi(_CUDA_VSTD::forward<_Args>(__args)...);}
     template <class... _Args>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         iterator emplace_hint(const_iterator __p, _Args&&... __args)
-            {return __table_.__emplace_hint_multi(__p, _VSTD::forward<_Args>(__args)...);}
+            {return __table_.__emplace_hint_multi(__p, _CUDA_VSTD::forward<_Args>(__args)...);}
 
-    _LIBCPP_INLINE_VISIBILITY
-    iterator insert(value_type&& __x) {return __table_.__insert_multi(_VSTD::move(__x));}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
+    iterator insert(value_type&& __x) {return __table_.__insert_multi(_CUDA_VSTD::move(__x));}
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, value_type&& __x)
-        {return __table_.__insert_multi(__p, _VSTD::move(__x));}
-    _LIBCPP_INLINE_VISIBILITY
+        {return __table_.__insert_multi(__p, _CUDA_VSTD::move(__x));}
+    _LIBCUDACXX_INLINE_VISIBILITY
     void insert(initializer_list<value_type> __il)
         {insert(__il.begin(), __il.end());}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const value_type& __x) {return __table_.__insert_multi(__x);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __p, const value_type& __x)
         {return __table_.__insert_multi(__p, __x);}
 
     template <class _InputIterator>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         void insert(_InputIterator __first, _InputIterator __last);
 
-#if _LIBCPP_STD_VER > 14
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to unordered_multiset::insert()");
         return __table_.template __node_handle_insert_multi<node_type>(
-            _VSTD::move(__nh));
+            _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __hint, node_type&& __nh)
     {
-        _LIBCPP_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__nh.empty() || __nh.get_allocator() == get_allocator(),
             "node_type with incompatible allocator passed to unordered_multiset::insert()");
         return __table_.template __node_handle_insert_multi<node_type>(
-            __hint, _VSTD::move(__nh));
+            __hint, _CUDA_VSTD::move(__nh));
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(const_iterator __position)
     {
         return __table_.template __node_handle_extract<node_type>(
             __position);
     }
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     node_type extract(key_type const& __key)
     {
         return __table_.template __node_handle_extract<node_type>(__key);
     }
 
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_multiset<key_type, _H2, _P2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_multi(__source.__table_);
     }
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_multiset<key_type, _H2, _P2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_multi(__source.__table_);
     }
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_set<key_type, _H2, _P2, allocator_type>& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_multi(__source.__table_);
     }
     template <class _H2, class _P2>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void merge(unordered_set<key_type, _H2, _P2, allocator_type>&& __source)
     {
-        _LIBCPP_ASSERT(__source.get_allocator() == get_allocator(),
+        _LIBCUDACXX_ASSERT(__source.get_allocator() == get_allocator(),
                        "merging container with incompatible allocator");
         return __table_.__node_handle_merge_multi(__source.__table_);
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(const_iterator __p) {return __table_.erase(__p);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type erase(const key_type& __k) {return __table_.__erase_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator erase(const_iterator __first, const_iterator __last)
         {return __table_.erase(__first, __last);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT {__table_.clear();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(unordered_multiset& __u)
         _NOEXCEPT_(__is_nothrow_swappable<__table>::value)
         {__table_.swap(__u.__table_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     hasher hash_function() const {return __table_.hash_function();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     key_equal key_eq() const {return __table_.key_eq();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const key_type& __k)       {return __table_.find(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const key_type& __k) const {return __table_.find(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template<class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     iterator       find(const _K2& __k)            {return __table_.find(__k);}
     template<class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator find(const _K2& __k) const      {return __table_.find(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const key_type& __k) const {return __table_.__count_multi(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template<class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type count(const _K2& __k) const      {return __table_.__count_multi(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-#if _LIBCPP_STD_VER > 17
-    _LIBCPP_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 17
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const key_type& __k) const {return find(__k) != end();}
 
     template<class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool contains(const _K2& __k) const      {return find(__k) != end();}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, iterator>             equal_range(const key_type& __k)
         {return __table_.__equal_range_multi(__k);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator, const_iterator> equal_range(const key_type& __k) const
         {return __table_.__equal_range_multi(__k);}
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
     template<class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<iterator, iterator>             equal_range(const _K2& __k)
         {return __table_.__equal_range_multi(__k);}
     template<class _K2, enable_if_t<__is_transparent<hasher, _K2>::value && __is_transparent<key_equal, _K2>::value>* = nullptr>
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     pair<const_iterator, const_iterator> equal_range(const _K2& __k) const
         {return __table_.__equal_range_multi(__k);}
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_count() const _NOEXCEPT {return __table_.bucket_count();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type max_bucket_count() const _NOEXCEPT {return __table_.max_bucket_count();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket_size(size_type __n) const {return __table_.bucket_size(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_type bucket(const key_type& __k) const {return __table_.bucket(__k);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     local_iterator       begin(size_type __n)        {return __table_.begin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     local_iterator       end(size_type __n)          {return __table_.end(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator begin(size_type __n) const  {return __table_.cbegin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator end(size_type __n) const    {return __table_.cend(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator cbegin(size_type __n) const {return __table_.cbegin(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const_local_iterator cend(size_type __n) const   {return __table_.cend(__n);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     float load_factor() const _NOEXCEPT {return __table_.load_factor();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     float max_load_factor() const _NOEXCEPT {return __table_.max_load_factor();}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void max_load_factor(float __mlf) {__table_.max_load_factor(__mlf);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void rehash(size_type __n) {__table_.__rehash_multi(__n);}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void reserve(size_type __n) {__table_.__reserve_multi(__n);}
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
     bool __dereferenceable(const const_iterator* __i) const
         {return __table_.__dereferenceable(__i);}
@@ -1511,11 +1511,11 @@ public:
     bool __subscriptable(const const_iterator* __i, ptr
diff _t __n) const
         {return __table_.__addable(__i, __n);}
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator,
          class _Hash = hash<__iter_value_type<_InputIterator>>,
          class _Pred = equal_to<__iter_value_type<_InputIterator>>,
@@ -1577,7 +1577,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         size_type __n, const hasher& __hf, const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
 }
 
@@ -1587,7 +1587,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         const allocator_type& __a)
     : __table_(__hf, __eql, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
 }
 
@@ -1596,7 +1596,7 @@ template <class _InputIterator>
 unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         _InputIterator __first, _InputIterator __last)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     insert(__first, __last);
 }
 
@@ -1607,7 +1607,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         const hasher& __hf, const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
     insert(__first, __last);
 }
@@ -1619,7 +1619,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         const hasher& __hf, const key_equal& __eql, const allocator_type& __a)
     : __table_(__hf, __eql, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
     insert(__first, __last);
 }
@@ -1630,7 +1630,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         const allocator_type& __a)
     : __table_(__a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
@@ -1638,7 +1638,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         const unordered_multiset& __u)
     : __table_(__u.__table_)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__u.bucket_count());
     insert(__u.begin(), __u.end());
 }
@@ -1648,35 +1648,35 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         const unordered_multiset& __u, const allocator_type& __a)
     : __table_(__u.__table_, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__u.bucket_count());
     insert(__u.begin(), __u.end());
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 inline
 unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         unordered_multiset&& __u)
     _NOEXCEPT_(is_nothrow_move_constructible<__table>::value)
-    : __table_(_VSTD::move(__u.__table_))
+    : __table_(_CUDA_VSTD::move(__u.__table_))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     std::__debug_db_swap(this, std::addressof(__u));
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         unordered_multiset&& __u, const allocator_type& __a)
-    : __table_(_VSTD::move(__u.__table_), __a)
+    : __table_(_CUDA_VSTD::move(__u.__table_), __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     if (__a != __u.get_allocator())
     {
         iterator __i = __u.begin();
         while (__u.size() != 0)
-            __table_.__insert_multi(_VSTD::move(__u.__table_.remove(__i++)->__value_));
+            __table_.__insert_multi(_CUDA_VSTD::move(__u.__table_.remove(__i++)->__value_));
     }
     else
         std::__debug_db_swap(this, std::addressof(__u));
@@ -1686,7 +1686,7 @@ template <class _Value, class _Hash, class _Pred, class _Alloc>
 unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         initializer_list<value_type> __il)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     insert(__il.begin(), __il.end());
 }
 
@@ -1696,7 +1696,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         const key_equal& __eql)
     : __table_(__hf, __eql)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
     insert(__il.begin(), __il.end());
 }
@@ -1707,7 +1707,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::unordered_multiset(
         const key_equal& __eql, const allocator_type& __a)
     : __table_(__hf, __eql, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     __table_.__rehash_multi(__n);
     insert(__il.begin(), __il.end());
 }
@@ -1719,7 +1719,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=(
         unordered_multiset&& __u)
     _NOEXCEPT_(is_nothrow_move_assignable<__table>::value)
 {
-    __table_ = _VSTD::move(__u.__table_);
+    __table_ = _CUDA_VSTD::move(__u.__table_);
     return *this;
 }
 
@@ -1733,7 +1733,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::operator=(
     return *this;
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
 template <class _InputIterator>
@@ -1747,7 +1747,7 @@ unordered_multiset<_Value, _Hash, _Pred, _Alloc>::insert(_InputIterator __first,
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
      unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -1756,14 +1756,14 @@ swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Value, class _Hash, class _Pred, class _Alloc,
           class _Predicate>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
     typename unordered_multiset<_Value, _Hash, _Pred, _Alloc>::size_type
     erase_if(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __c,
              _Predicate __pred) {
-  return _VSTD::__libcpp_erase_if_container(__c, __pred);
+  return _CUDA_VSTD::__LIBCUDACXX_erase_if_container(__c, __pred);
 }
 #endif
 
@@ -1781,9 +1781,9 @@ operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
     {
         _EqRng __xeq = __x.equal_range(*__i);
         _EqRng __yeq = __y.equal_range(*__i);
-        if (_VSTD::distance(__xeq.first, __xeq.second) !=
-            _VSTD::distance(__yeq.first, __yeq.second) ||
-                  !_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first))
+        if (_CUDA_VSTD::distance(__xeq.first, __xeq.second) !=
+            _CUDA_VSTD::distance(__yeq.first, __yeq.second) ||
+                  !_CUDA_VSTD::is_permutation(__xeq.first, __xeq.second, __yeq.first))
             return false;
         __i = __xeq.second;
     }
@@ -1791,7 +1791,7 @@ operator==(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
 }
 
 template <class _Value, class _Hash, class _Pred, class _Alloc>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
            const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __y)
@@ -1799,6 +1799,6 @@ operator!=(const unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x,
     return !(__x == __y);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_UNORDERED_SET
+#endif // _LIBCUDACXX_UNORDERED_SET

diff  --git a/libcxx/include/utility b/libcxx/include/utility
index 7a1a45e334a3..9aa2aa8f60ab 100644
--- a/libcxx/include/utility
+++ b/libcxx/include/utility
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_UTILITY
-#define _LIBCPP_UTILITY
+#ifndef _LIBCUDACXX_UTILITY
+#define _LIBCUDACXX_UTILITY
 
 /*
     utility synopsis
@@ -243,7 +243,7 @@ template <class T>
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <iosfwd>
 #endif
 
@@ -251,8 +251,8 @@ template <class T>
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-#endif // _LIBCPP_UTILITY
+#endif // _LIBCUDACXX_UTILITY

diff  --git a/libcxx/include/valarray b/libcxx/include/valarray
index 6f8a3b84197b..9b9fb320089a 100644
--- a/libcxx/include/valarray
+++ b/libcxx/include/valarray
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_VALARRAY
-#define _LIBCPP_VALARRAY
+#ifndef _LIBCUDACXX_VALARRAY
+#define _LIBCUDACXX_VALARRAY
 
 /*
     valarray synopsis
@@ -360,7 +360,7 @@ template <class T> unspecified2 end(const valarray<T>& v);
 #include <new>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #  include <functional>
 #endif
@@ -368,65 +368,65 @@ template <class T> unspecified2 end(const valarray<T>& v);
 // standard-mandated includes
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template<class _Tp> class _LIBCPP_TEMPLATE_VIS valarray;
+template<class _Tp> class _LIBCUDACXX_TEMPLATE_VIS valarray;
 
-class _LIBCPP_TEMPLATE_VIS slice
+class _LIBCUDACXX_TEMPLATE_VIS slice
 {
     size_t __start_;
     size_t __size_;
     size_t __stride_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     slice()
         : __start_(0),
           __size_(0),
           __stride_(0)
           {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     slice(size_t __start, size_t __size, size_t __stride)
         : __start_(__start),
           __size_(__size),
           __stride_(__stride)
           {}
 
-    _LIBCPP_INLINE_VISIBILITY size_t start()  const {return __start_;}
-    _LIBCPP_INLINE_VISIBILITY size_t size()   const {return __size_;}
-    _LIBCPP_INLINE_VISIBILITY size_t stride() const {return __stride_;}
+    _LIBCUDACXX_INLINE_VISIBILITY size_t start()  const {return __start_;}
+    _LIBCUDACXX_INLINE_VISIBILITY size_t size()   const {return __size_;}
+    _LIBCUDACXX_INLINE_VISIBILITY size_t stride() const {return __stride_;}
 };
 
-template <class _Tp> class _LIBCPP_TEMPLATE_VIS slice_array;
-class _LIBCPP_TYPE_VIS gslice;
-template <class _Tp> class _LIBCPP_TEMPLATE_VIS gslice_array;
-template <class _Tp> class _LIBCPP_TEMPLATE_VIS mask_array;
-template <class _Tp> class _LIBCPP_TEMPLATE_VIS indirect_array;
+template <class _Tp> class _LIBCUDACXX_TEMPLATE_VIS slice_array;
+class _LIBCUDACXX_TYPE_VIS gslice;
+template <class _Tp> class _LIBCUDACXX_TEMPLATE_VIS gslice_array;
+template <class _Tp> class _LIBCUDACXX_TEMPLATE_VIS mask_array;
+template <class _Tp> class _LIBCUDACXX_TEMPLATE_VIS indirect_array;
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp*
 begin(valarray<_Tp>& __v);
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 const _Tp*
 begin(const valarray<_Tp>& __v);
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 _Tp*
 end(valarray<_Tp>& __v);
 
 template <class _Tp>
-_LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_INLINE_VISIBILITY
 const _Tp*
 end(const valarray<_Tp>& __v);
 
@@ -439,13 +439,13 @@ struct _UnaryOp
     _Op __op_;
     _A0 __a0_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _UnaryOp(const _Op& __op, const _A0& __a0) : __op_(__op), __a0_(__a0) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __i) const {return __op_(__a0_[__i]);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __a0_.size();}
 };
 
@@ -459,14 +459,14 @@ struct _BinaryOp
     _A0 __a0_;
     _A1 __a1_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _BinaryOp(const _Op& __op, const _A0& __a0, const _A1& __a1)
         : __op_(__op), __a0_(__a0), __a1_(__a1) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __i) const {return __op_(__a0_[__i], __a1_[__i]);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __a0_.size();}
 };
 
@@ -480,13 +480,13 @@ private:
     const value_type& __t_;
     size_t __s_;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __scalar_expr(const value_type& __t, size_t __s) : __t_(__t), __s_(__s) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t) const {return __t_;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __s_;}
 };
 
@@ -494,7 +494,7 @@ template <class _Tp>
 struct __unary_plus
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return +__x;}
 };
@@ -503,7 +503,7 @@ template <class _Tp>
 struct __bit_not
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return ~__x;}
 };
@@ -512,7 +512,7 @@ template <class _Tp>
 struct __bit_shift_left
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return __x << __y;}
 };
@@ -521,7 +521,7 @@ template <class _Tp>
 struct __bit_shift_right
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return __x >> __y;}
 };
@@ -534,10 +534,10 @@ private:
 public:
     typedef _Tp __result_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __apply_expr(_Fp __f) : __f_(__f) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return __f_(__x);}
 };
@@ -546,7 +546,7 @@ template <class _Tp>
 struct __abs_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return abs(__x);}
 };
@@ -555,7 +555,7 @@ template <class _Tp>
 struct __acos_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return acos(__x);}
 };
@@ -564,7 +564,7 @@ template <class _Tp>
 struct __asin_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return asin(__x);}
 };
@@ -573,7 +573,7 @@ template <class _Tp>
 struct __atan_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return atan(__x);}
 };
@@ -582,7 +582,7 @@ template <class _Tp>
 struct __atan2_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return atan2(__x, __y);}
 };
@@ -591,7 +591,7 @@ template <class _Tp>
 struct __cos_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return cos(__x);}
 };
@@ -600,7 +600,7 @@ template <class _Tp>
 struct __cosh_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return cosh(__x);}
 };
@@ -609,7 +609,7 @@ template <class _Tp>
 struct __exp_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return exp(__x);}
 };
@@ -618,7 +618,7 @@ template <class _Tp>
 struct __log_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return log(__x);}
 };
@@ -627,7 +627,7 @@ template <class _Tp>
 struct __log10_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return log10(__x);}
 };
@@ -636,7 +636,7 @@ template <class _Tp>
 struct __pow_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x, const _Tp& __y) const
         {return pow(__x, __y);}
 };
@@ -645,7 +645,7 @@ template <class _Tp>
 struct __sin_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return sin(__x);}
 };
@@ -654,7 +654,7 @@ template <class _Tp>
 struct __sinh_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return sinh(__x);}
 };
@@ -663,7 +663,7 @@ template <class _Tp>
 struct __sqrt_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return sqrt(__x);}
 };
@@ -672,7 +672,7 @@ template <class _Tp>
 struct __tan_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return tan(__x);}
 };
@@ -681,7 +681,7 @@ template <class _Tp>
 struct __tanh_expr
 {
     typedef _Tp __result_type;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _Tp operator()(const _Tp& __x) const
         {return tanh(__x);}
 };
@@ -700,7 +700,7 @@ private:
     size_t __size_;
     size_t __stride_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __slice_expr(const slice& __sl, const _RmExpr& __e)
         : __expr_(__e),
           __start_(__sl.start()),
@@ -709,15 +709,15 @@ private:
         {}
 public:
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __i) const
         {return __expr_[__start_ + __i * __stride_];}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __size_;}
 
     template <class> friend class __val_expr;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS valarray;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS valarray;
 };
 
 template <class _ValExpr>
@@ -743,7 +743,7 @@ private:
     static const ptr
diff _t _Np = static_cast<ptr
diff _t>(
                                     sizeof(ptr
diff _t) * __CHAR_BIT__ - 1);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __shift_expr(int __n, const _RmExpr& __e)
         : __expr_(__e),
           __size_(__e.size()),
@@ -755,7 +755,7 @@ private:
         }
 public:
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __j) const
         {
             ptr
diff _t __i = static_cast<ptr
diff _t>(__j);
@@ -763,7 +763,7 @@ public:
             return (__expr_[(__i + __n_) & __m] & __m) | (value_type() & ~__m);
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __size_;}
 
     template <class> friend class __val_expr;
@@ -784,7 +784,7 @@ private:
     size_t __o1_;
     size_t __o2_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __cshift_expr(int __n, const _RmExpr& __e)
         : __expr_(__e),
           __size_(__e.size())
@@ -805,7 +805,7 @@ private:
         }
 public:
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __i) const
         {
             if (__i < __m_)
@@ -813,7 +813,7 @@ public:
             return __expr_[__i + __o2_];
         }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __size_;}
 
     template <class> friend class __val_expr;
@@ -832,7 +832,7 @@ template<class _Tp>
 struct __is_val_expr<valarray<_Tp> > : true_type {};
 
 template<class _Tp>
-class _LIBCPP_TEMPLATE_VIS valarray
+class _LIBCUDACXX_TEMPLATE_VIS valarray
 {
 public:
     typedef _Tp value_type;
@@ -844,121 +844,121 @@ private:
 
 public:
     // construct/destroy:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray() : __begin_(nullptr), __end_(nullptr) {}
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     explicit valarray(size_t __n);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray(const value_type& __x, size_t __n);
     valarray(const value_type* __p, size_t __n);
     valarray(const valarray& __v);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray(valarray&& __v) _NOEXCEPT;
     valarray(initializer_list<value_type> __il);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
     valarray(const slice_array<value_type>& __sa);
     valarray(const gslice_array<value_type>& __ga);
     valarray(const mask_array<value_type>& __ma);
     valarray(const indirect_array<value_type>& __ia);
-    inline _LIBCPP_HIDE_FROM_ABI_AFTER_V1
+    inline _LIBCUDACXX_HIDE_FROM_ABI_AFTER_V1
     ~valarray();
 
     // assignment:
     valarray& operator=(const valarray& __v);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator=(valarray&& __v) _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator=(initializer_list<value_type>);
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator=(const value_type& __x);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator=(const slice_array<value_type>& __sa);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator=(const gslice_array<value_type>& __ga);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator=(const mask_array<value_type>& __ma);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator=(const indirect_array<value_type>& __ia);
     template <class _ValExpr>
-        _LIBCPP_INLINE_VISIBILITY
+        _LIBCUDACXX_INLINE_VISIBILITY
         valarray& operator=(const __val_expr<_ValExpr>& __v);
 
     // element access:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const value_type& operator[](size_t __i) const {return __begin_[__i];}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_type&       operator[](size_t __i)       {return __begin_[__i];}
 
     // subset operations:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__slice_expr<const valarray&> >    operator[](slice __s) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     slice_array<value_type>                       operator[](slice __s);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__indirect_expr<const valarray&> > operator[](const gslice& __gs) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     gslice_array<value_type>   operator[](const gslice& __gs);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__indirect_expr<const valarray&> > operator[](gslice&& __gs) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     gslice_array<value_type>                      operator[](gslice&& __gs);
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__mask_expr<const valarray&> >     operator[](const valarray<bool>& __vb) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     mask_array<value_type>                        operator[](const valarray<bool>& __vb);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__mask_expr<const valarray&> >     operator[](valarray<bool>&& __vb) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     mask_array<value_type>                        operator[](valarray<bool>&& __vb);
-#endif // _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#endif // _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__indirect_expr<const valarray&> > operator[](const valarray<size_t>& __vs) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     indirect_array<value_type>                    operator[](const valarray<size_t>& __vs);
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__indirect_expr<const valarray&> > operator[](valarray<size_t>&& __vs) const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     indirect_array<value_type>                    operator[](valarray<size_t>&& __vs);
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     // unary operators:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<_UnaryOp<__unary_plus<_Tp>, const valarray&> >   operator+() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<_UnaryOp<negate<_Tp>, const valarray&> >         operator-() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<_UnaryOp<__bit_not<_Tp>, const valarray&> >      operator~() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<_UnaryOp<logical_not<_Tp>, const valarray&> >    operator!() const;
 
     // computed assignment:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator*= (const value_type& __x);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator/= (const value_type& __x);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator%= (const value_type& __x);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator+= (const value_type& __x);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator-= (const value_type& __x);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator^= (const value_type& __x);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator&= (const value_type& __x);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator|= (const value_type& __x);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator<<=(const value_type& __x);
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray& operator>>=(const value_type& __x);
 
     template <class _Expr>
@@ -967,7 +967,7 @@ public:
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator*= (const _Expr& __v);
 
     template <class _Expr>
@@ -976,7 +976,7 @@ public:
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator/= (const _Expr& __v);
 
     template <class _Expr>
@@ -985,7 +985,7 @@ public:
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator%= (const _Expr& __v);
 
     template <class _Expr>
@@ -994,7 +994,7 @@ public:
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator+= (const _Expr& __v);
 
     template <class _Expr>
@@ -1003,7 +1003,7 @@ public:
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator-= (const _Expr& __v);
 
     template <class _Expr>
@@ -1012,7 +1012,7 @@ public:
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator^= (const _Expr& __v);
 
     template <class _Expr>
@@ -1021,7 +1021,7 @@ public:
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator|= (const _Expr& __v);
 
     template <class _Expr>
@@ -1030,7 +1030,7 @@ public:
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator&= (const _Expr& __v);
 
     template <class _Expr>
@@ -1039,7 +1039,7 @@ public:
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator<<= (const _Expr& __v);
 
     template <class _Expr>
@@ -1048,21 +1048,21 @@ public:
         __is_val_expr<_Expr>::value,
         valarray&
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator>>= (const _Expr& __v);
 
     // member functions:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void swap(valarray& __v) _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return static_cast<size_t>(__end_ - __begin_);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_type sum() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_type min() const;
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     value_type max() const;
 
     valarray shift (int __i) const;
@@ -1072,12 +1072,12 @@ public:
     void     resize(size_t __n, value_type __x = value_type());
 
 private:
-    template <class> friend class _LIBCPP_TEMPLATE_VIS valarray;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS slice_array;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS gslice_array;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS mask_array;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS valarray;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS slice_array;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS gslice_array;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS mask_array;
     template <class> friend class __mask_expr;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS indirect_array;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS indirect_array;
     template <class> friend class __indirect_expr;
     template <class> friend class __val_expr;
 
@@ -1101,17 +1101,17 @@ private:
     const _Up*
     end(const valarray<_Up>& __v);
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void __clear(size_t __capacity);
     valarray& __assign_range(const value_type* __f, const value_type* __l);
 };
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 template<class _Tp, size_t _Size>
 valarray(const _Tp(&)[_Size], size_t) -> valarray<_Tp>;
 #endif
 
-extern template _LIBCPP_FUNC_VIS void valarray<size_t>::resize(size_t, size_t);
+extern template _LIBCUDACXX_FUNC_VIS void valarray<size_t>::resize(size_t, size_t);
 
 template <class _Op, class _Tp>
 struct _UnaryOp<_Op, valarray<_Tp> >
@@ -1122,13 +1122,13 @@ struct _UnaryOp<_Op, valarray<_Tp> >
     _Op __op_;
     const valarray<_Tp>& __a0_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _UnaryOp(const _Op& __op, const valarray<_Tp>& __a0) : __op_(__op), __a0_(__a0) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __i) const {return __op_(__a0_[__i]);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __a0_.size();}
 };
 
@@ -1142,14 +1142,14 @@ struct _BinaryOp<_Op, valarray<_Tp>, _A1>
     const valarray<_Tp>& __a0_;
     _A1 __a1_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _BinaryOp(const _Op& __op, const valarray<_Tp>& __a0, const _A1& __a1)
         : __op_(__op), __a0_(__a0), __a1_(__a1) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __i) const {return __op_(__a0_[__i], __a1_[__i]);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __a0_.size();}
 };
 
@@ -1163,14 +1163,14 @@ struct _BinaryOp<_Op, _A0, valarray<_Tp> >
     _A0 __a0_;
     const valarray<_Tp>& __a1_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _BinaryOp(const _Op& __op, const _A0& __a0, const valarray<_Tp>& __a1)
         : __op_(__op), __a0_(__a0), __a1_(__a1) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __i) const {return __op_(__a0_[__i], __a1_[__i]);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __a0_.size();}
 };
 
@@ -1184,21 +1184,21 @@ struct _BinaryOp<_Op, valarray<_Tp>, valarray<_Tp> >
     const valarray<_Tp>& __a0_;
     const valarray<_Tp>& __a1_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     _BinaryOp(const _Op& __op, const valarray<_Tp>& __a0, const valarray<_Tp>& __a1)
         : __op_(__op), __a0_(__a0), __a1_(__a1) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __i) const {return __op_(__a0_[__i], __a1_[__i]);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __a0_.size();}
 };
 
 // slice_array
 
 template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS slice_array
+class _LIBCUDACXX_TEMPLATE_VIS slice_array
 {
 public:
     typedef _Tp value_type;
@@ -1215,7 +1215,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1224,7 +1224,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator*=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1233,7 +1233,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator/=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1242,7 +1242,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator%=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1251,7 +1251,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator+=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1260,7 +1260,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator-=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1269,7 +1269,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator^=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1278,7 +1278,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator&=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1287,7 +1287,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator|=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1296,7 +1296,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator<<=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1305,22 +1305,22 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator>>=(const _Expr& __v) const;
 
     slice_array(slice_array const&) = default;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const slice_array& operator=(const slice_array& __sa) const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator=(const value_type& __x) const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator=(const valarray<value_type>& __va) const;
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     slice_array(const slice& __sl, const valarray<value_type>& __v)
         : __vp_(const_cast<value_type*>(__v.__begin_ + __sl.start())),
           __size_(__sl.size()),
@@ -1529,55 +1529,55 @@ slice_array<_Tp>::operator=(const value_type& __x) const
 
 // gslice
 
-class _LIBCPP_TYPE_VIS gslice
+class _LIBCUDACXX_TYPE_VIS gslice
 {
     valarray<size_t> __size_;
     valarray<size_t> __stride_;
     valarray<size_t> __1d_;
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     gslice() {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     gslice(size_t __start, const valarray<size_t>& __size,
                            const valarray<size_t>& __stride)
         : __size_(__size),
           __stride_(__stride)
         {__init(__start);}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     gslice(size_t __start, const valarray<size_t>&  __size,
                                  valarray<size_t>&& __stride)
         : __size_(__size),
           __stride_(std::move(__stride))
         {__init(__start);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     gslice(size_t __start,       valarray<size_t>&& __size,
                            const valarray<size_t>&  __stride)
         : __size_(std::move(__size)),
           __stride_(__stride)
         {__init(__start);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     gslice(size_t __start,       valarray<size_t>&& __size,
                                  valarray<size_t>&& __stride)
         : __size_(std::move(__size)),
           __stride_(std::move(__stride))
         {__init(__start);}
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t           start()  const {return __1d_.size() ? __1d_[0] : 0;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray<size_t> size()   const {return __size_;}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     valarray<size_t> stride() const {return __stride_;}
 
 private:
@@ -1591,7 +1591,7 @@ private:
 // gslice_array
 
 template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS gslice_array
+class _LIBCUDACXX_TEMPLATE_VIS gslice_array
 {
 public:
     typedef _Tp value_type;
@@ -1607,7 +1607,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1616,7 +1616,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator*=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1625,7 +1625,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator/=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1634,7 +1634,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator%=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1643,7 +1643,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator+=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1652,7 +1652,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator-=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1661,7 +1661,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator^=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1670,7 +1670,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator&=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1679,7 +1679,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator|=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1688,7 +1688,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator<<=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1697,13 +1697,13 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator>>=(const _Expr& __v) const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const gslice_array& operator=(const gslice_array& __ga) const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator=(const value_type& __x) const;
 
     gslice_array(const gslice_array&)            = default;
@@ -1714,12 +1714,12 @@ private:
           __1d_(__gs.__1d_)
         {}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
     gslice_array(gslice&& __gs, const valarray<value_type>& __v)
         : __vp_(const_cast<value_type*>(__v.__begin_)),
           __1d_(std::move(__gs.__1d_))
         {}
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     template <class> friend class valarray;
 };
@@ -1926,7 +1926,7 @@ gslice_array<_Tp>::operator=(const value_type& __x) const
 // mask_array
 
 template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS mask_array
+class _LIBCUDACXX_TEMPLATE_VIS mask_array
 {
 public:
     typedef _Tp value_type;
@@ -1942,7 +1942,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1951,7 +1951,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator*=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1960,7 +1960,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator/=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1969,7 +1969,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator%=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1978,7 +1978,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator+=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1987,7 +1987,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator-=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -1996,7 +1996,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator^=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2005,7 +2005,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator&=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2014,7 +2014,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator|=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2023,7 +2023,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator<<=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2032,19 +2032,19 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator>>=(const _Expr& __v) const;
 
     mask_array(const mask_array&) = default;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const mask_array& operator=(const mask_array& __ma) const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator=(const value_type& __x) const;
 
 private:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     mask_array(const valarray<bool>& __vb, const valarray<value_type>& __v)
         : __vp_(const_cast<value_type*>(__v.__begin_)),
           __1d_(static_cast<size_t>(count(__vb.__begin_, __vb.__end_, true)))
@@ -2256,7 +2256,7 @@ private:
     _ValExpr __expr_;
     valarray<size_t> __1d_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __mask_expr(const valarray<bool>& __vb, const _RmExpr& __e)
         : __expr_(__e),
           __1d_(static_cast<size_t>(count(__vb.__begin_, __vb.__end_, true)))
@@ -2268,11 +2268,11 @@ private:
           }
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __i) const
         {return __expr_[__1d_[__i]];}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __1d_.size();}
 
     template <class> friend class __val_expr;
@@ -2282,7 +2282,7 @@ public:
 // indirect_array
 
 template <class _Tp>
-class _LIBCPP_TEMPLATE_VIS indirect_array
+class _LIBCUDACXX_TEMPLATE_VIS indirect_array
 {
 public:
     typedef _Tp value_type;
@@ -2298,7 +2298,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2307,7 +2307,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator*=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2316,7 +2316,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator/=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2325,7 +2325,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator%=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2334,7 +2334,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator+=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2343,7 +2343,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator-=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2352,7 +2352,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator^=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2361,7 +2361,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator&=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2370,7 +2370,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator|=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2379,7 +2379,7 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator<<=(const _Expr& __v) const;
 
     template <class _Expr>
@@ -2388,33 +2388,33 @@ public:
         __is_val_expr<_Expr>::value,
         void
     >::type
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     operator>>=(const _Expr& __v) const;
 
     indirect_array(const indirect_array&) = default;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     const indirect_array& operator=(const indirect_array& __ia) const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     void operator=(const value_type& __x) const;
 
 private:
-     _LIBCPP_INLINE_VISIBILITY
+     _LIBCUDACXX_INLINE_VISIBILITY
    indirect_array(const valarray<size_t>& __ia, const valarray<value_type>& __v)
         : __vp_(const_cast<value_type*>(__v.__begin_)),
           __1d_(__ia)
         {}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     indirect_array(valarray<size_t>&& __ia, const valarray<value_type>& __v)
         : __vp_(const_cast<value_type*>(__v.__begin_)),
           __1d_(std::move(__ia))
         {}
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
     template <class> friend class valarray;
 };
@@ -2619,32 +2619,32 @@ private:
     _ValExpr __expr_;
     valarray<size_t> __1d_;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __indirect_expr(const valarray<size_t>& __ia, const _RmExpr& __e)
         : __expr_(__e),
           __1d_(__ia)
           {}
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __indirect_expr(valarray<size_t>&& __ia, const _RmExpr& __e)
         : __expr_(__e),
           __1d_(std::move(__ia))
           {}
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __i) const
         {return __expr_[__1d_[__i]];}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __1d_.size();}
 
     template <class> friend class __val_expr;
-    template <class> friend class _LIBCPP_TEMPLATE_VIS valarray;
+    template <class> friend class _LIBCUDACXX_TEMPLATE_VIS valarray;
 };
 
 template<class _ValExpr>
@@ -2657,42 +2657,42 @@ public:
     typedef typename _RmExpr::value_type value_type;
     typedef typename _RmExpr::__result_type __result_type;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     explicit __val_expr(const _RmExpr& __e) : __expr_(__e) {}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type operator[](size_t __i) const
         {return __expr_[__i];}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__slice_expr<_ValExpr> > operator[](slice __s) const
     {
         typedef __slice_expr<_ValExpr> _NewExpr;
         return __val_expr< _NewExpr >(_NewExpr(__s, __expr_));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__indirect_expr<_ValExpr> > operator[](const gslice& __gs) const
     {
         typedef __indirect_expr<_ValExpr> _NewExpr;
         return __val_expr<_NewExpr >(_NewExpr(__gs.__1d_, __expr_));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__mask_expr<_ValExpr> > operator[](const valarray<bool>& __vb) const
     {
         typedef __mask_expr<_ValExpr> _NewExpr;
         return __val_expr< _NewExpr >( _NewExpr(__vb, __expr_));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__indirect_expr<_ValExpr> > operator[](const valarray<size_t>& __vs) const
     {
         typedef __indirect_expr<_ValExpr> _NewExpr;
         return __val_expr< _NewExpr >(_NewExpr(__vs, __expr_));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<_UnaryOp<__unary_plus<value_type>, _ValExpr> >
     operator+() const
     {
@@ -2700,7 +2700,7 @@ public:
         return __val_expr<_NewExpr>(_NewExpr(__unary_plus<value_type>(), __expr_));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<_UnaryOp<negate<value_type>, _ValExpr> >
     operator-() const
     {
@@ -2708,7 +2708,7 @@ public:
         return __val_expr<_NewExpr>(_NewExpr(negate<value_type>(), __expr_));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<_UnaryOp<__bit_not<value_type>, _ValExpr> >
     operator~() const
     {
@@ -2716,7 +2716,7 @@ public:
         return __val_expr<_NewExpr>(_NewExpr(__bit_not<value_type>(), __expr_));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<_UnaryOp<logical_not<value_type>, _ValExpr> >
     operator!() const
     {
@@ -2726,10 +2726,10 @@ public:
 
     operator valarray<__result_type>() const;
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     size_t size() const {return __expr_.size();}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type sum() const
     {
         size_t __n = __expr_.size();
@@ -2739,7 +2739,7 @@ public:
         return __r;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type min() const
     {
         size_t __n = size();
@@ -2753,7 +2753,7 @@ public:
         return __r;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __result_type max() const
     {
         size_t __n = size();
@@ -2767,15 +2767,15 @@ public:
         return __r;
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__shift_expr<_ValExpr> > shift (int __i) const
         {return __val_expr<__shift_expr<_ValExpr> >(__shift_expr<_ValExpr>(__i, __expr_));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<__cshift_expr<_ValExpr> > cshift(int __i) const
         {return __val_expr<__cshift_expr<_ValExpr> >(__cshift_expr<_ValExpr>(__i, __expr_));}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<_UnaryOp<__apply_expr<value_type, value_type(*)(value_type)>, _ValExpr> >
     apply(value_type __f(value_type)) const
     {
@@ -2784,7 +2784,7 @@ public:
         return __val_expr<_NewExpr>(_NewExpr(_Op(__f), __expr_));
     }
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     __val_expr<_UnaryOp<__apply_expr<value_type, value_type(*)(const value_type&)>, _ValExpr> >
     apply(value_type __f(const value_type&)) const
     {
@@ -2820,20 +2820,20 @@ valarray<_Tp>::valarray(size_t __n)
     if (__n)
     {
         __begin_ = __end_ = allocator<value_type>().allocate(__n);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (size_t __n_left = __n; __n_left; --__n_left, ++__end_)
                 ::new ((void*)__end_) value_type();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __clear(__n);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
@@ -2854,20 +2854,20 @@ valarray<_Tp>::valarray(const value_type* __p, size_t __n)
     if (__n)
     {
         __begin_ = __end_ = allocator<value_type>().allocate(__n);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (size_t __n_left = __n; __n_left; ++__end_, ++__p, --__n_left)
                 ::new ((void*)__end_) value_type(*__p);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __clear(__n);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
@@ -2879,24 +2879,24 @@ valarray<_Tp>::valarray(const valarray& __v)
     if (__v.size())
     {
         __begin_ = __end_ = allocator<value_type>().allocate(__v.size());
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (value_type* __p = __v.__begin_; __p != __v.__end_; ++__end_, ++__p)
                 ::new ((void*)__end_) value_type(*__p);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __clear(__v.size());
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp>
 inline
@@ -2916,25 +2916,25 @@ valarray<_Tp>::valarray(initializer_list<value_type> __il)
     if (__n)
     {
         __begin_ = __end_ = allocator<value_type>().allocate(__n);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             size_t __n_left = __n;
             for (const value_type* __p = __il.begin(); __n_left; ++__end_, ++__p, --__n_left)
                 ::new ((void*)__end_) value_type(*__p);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __clear(__n);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp>
 valarray<_Tp>::valarray(const slice_array<value_type>& __sa)
@@ -2945,21 +2945,21 @@ valarray<_Tp>::valarray(const slice_array<value_type>& __sa)
     if (__n)
     {
         __begin_ = __end_ = allocator<value_type>().allocate(__n);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             size_t __n_left = __n;
             for (const value_type* __p = __sa.__vp_; __n_left; ++__end_, __p += __sa.__stride_, --__n_left)
                 ::new ((void*)__end_) value_type(*__p);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __clear(__n);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
@@ -2972,23 +2972,23 @@ valarray<_Tp>::valarray(const gslice_array<value_type>& __ga)
     if (__n)
     {
         __begin_ = __end_ = allocator<value_type>().allocate(__n);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             typedef const size_t* _Ip;
             const value_type* __s = __ga.__vp_;
             for (_Ip __i = __ga.__1d_.__begin_, __e = __ga.__1d_.__end_;
                     __i != __e; ++__i, ++__end_)
                 ::new ((void*)__end_) value_type(__s[*__i]);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __clear(__n);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
@@ -3001,23 +3001,23 @@ valarray<_Tp>::valarray(const mask_array<value_type>& __ma)
     if (__n)
     {
         __begin_ = __end_ = allocator<value_type>().allocate(__n);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             typedef const size_t* _Ip;
             const value_type* __s = __ma.__vp_;
             for (_Ip __i = __ma.__1d_.__begin_, __e = __ma.__1d_.__end_;
                     __i != __e; ++__i, ++__end_)
                 ::new ((void*)__end_) value_type(__s[*__i]);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __clear(__n);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
@@ -3030,23 +3030,23 @@ valarray<_Tp>::valarray(const indirect_array<value_type>& __ia)
     if (__n)
     {
         __begin_ = __end_ = allocator<value_type>().allocate(__n);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             typedef const size_t* _Ip;
             const value_type* __s = __ia.__vp_;
             for (_Ip __i = __ia.__1d_.__begin_, __e = __ia.__1d_.__end_;
                     __i != __e; ++__i, ++__end_)
                 ::new ((void*)__end_) value_type(__s[*__i]);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __clear(__n);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
@@ -3067,9 +3067,9 @@ valarray<_Tp>::__assign_range(const value_type* __f, const value_type* __l)
         __clear(size());
         __begin_ = allocator<value_type>().allocate(__n);
         __end_ = __begin_ + __n;
-        _VSTD::uninitialized_copy(__f, __l, __begin_);
+        _CUDA_VSTD::uninitialized_copy(__f, __l, __begin_);
     } else {
-        _VSTD::copy(__f, __l, __begin_);
+        _CUDA_VSTD::copy(__f, __l, __begin_);
     }
     return *this;
 }
@@ -3078,12 +3078,12 @@ template <class _Tp>
 valarray<_Tp>&
 valarray<_Tp>::operator=(const valarray& __v)
 {
-    if (this != _VSTD::addressof(__v))
+    if (this != _CUDA_VSTD::addressof(__v))
         return __assign_range(__v.__begin_, __v.__end_);
     return *this;
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp>
 inline
@@ -3106,14 +3106,14 @@ valarray<_Tp>::operator=(initializer_list<value_type> __il)
     return __assign_range(__il.begin(), __il.end());
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp>
 inline
 valarray<_Tp>&
 valarray<_Tp>::operator=(const value_type& __x)
 {
-    _VSTD::fill(__begin_, __end_, __x);
+    _CUDA_VSTD::fill(__begin_, __end_, __x);
     return *this;
 }
 
@@ -3218,7 +3218,7 @@ valarray<_Tp>::operator[](const gslice& __gs)
     return gslice_array<value_type>(__gs, *this);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp>
 inline
@@ -3236,7 +3236,7 @@ valarray<_Tp>::operator[](gslice&& __gs)
     return gslice_array<value_type>(std::move(__gs), *this);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp>
 inline
@@ -3254,7 +3254,7 @@ valarray<_Tp>::operator[](const valarray<bool>& __vb)
     return mask_array<value_type>(__vb, *this);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp>
 inline
@@ -3272,7 +3272,7 @@ valarray<_Tp>::operator[](valarray<bool>&& __vb)
     return mask_array<value_type>(std::move(__vb), *this);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp>
 inline
@@ -3290,7 +3290,7 @@ valarray<_Tp>::operator[](const valarray<size_t>& __vs)
     return indirect_array<value_type>(__vs, *this);
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp>
 inline
@@ -3308,7 +3308,7 @@ valarray<_Tp>::operator[](valarray<size_t>&& __vs)
     return indirect_array<value_type>(std::move(__vs), *this);
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp>
 inline
@@ -3611,8 +3611,8 @@ inline
 void
 valarray<_Tp>::swap(valarray& __v) _NOEXCEPT
 {
-    _VSTD::swap(__begin_, __v.__begin_);
-    _VSTD::swap(__end_, __v.__end_);
+    _CUDA_VSTD::swap(__begin_, __v.__begin_);
+    _CUDA_VSTD::swap(__end_, __v.__end_);
 }
 
 template <class _Tp>
@@ -3636,7 +3636,7 @@ valarray<_Tp>::min() const
 {
     if (__begin_ == __end_)
         return value_type();
-    return *_VSTD::min_element(__begin_, __end_);
+    return *_CUDA_VSTD::min_element(__begin_, __end_);
 }
 
 template <class _Tp>
@@ -3646,7 +3646,7 @@ valarray<_Tp>::max() const
 {
     if (__begin_ == __end_)
         return value_type();
-    return *_VSTD::max_element(__begin_, __end_);
+    return *_CUDA_VSTD::max_element(__begin_, __end_);
 }
 
 template <class _Tp>
@@ -3663,14 +3663,14 @@ valarray<_Tp>::shift(int __i) const
         value_type* __te;
         if (__i >= 0)
         {
-            __i = _VSTD::min(__i, static_cast<int>(__n));
+            __i = _CUDA_VSTD::min(__i, static_cast<int>(__n));
             __sb = __begin_ + __i;
             __tb = __r.__begin_;
             __te = __r.__begin_ + (__n - __i);
         }
         else
         {
-            __i = _VSTD::min(-__i, static_cast<int>(__n));
+            __i = _CUDA_VSTD::min(-__i, static_cast<int>(__n));
             __sb = __begin_;
             __tb = __r.__begin_ + __i;
             __te = __r.__begin_ + __n;
@@ -3755,25 +3755,25 @@ valarray<_Tp>::resize(size_t __n, value_type __x)
     if (__n)
     {
         __begin_ = __end_ = allocator<value_type>().allocate(__n);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             for (size_t __n_left = __n; __n_left; --__n_left, ++__end_)
                 ::new ((void*)__end_) value_type(__x);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             __clear(__n);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
 template<class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(valarray<_Tp>& __x, valarray<_Tp>& __y) _NOEXCEPT
 {
@@ -3781,7 +3781,7 @@ swap(valarray<_Tp>& __x, valarray<_Tp>& __y) _NOEXCEPT
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3795,7 +3795,7 @@ operator*(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3811,7 +3811,7 @@ operator*(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3827,7 +3827,7 @@ operator*(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3841,7 +3841,7 @@ operator/(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3857,7 +3857,7 @@ operator/(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3873,7 +3873,7 @@ operator/(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3887,7 +3887,7 @@ operator%(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3903,7 +3903,7 @@ operator%(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3919,7 +3919,7 @@ operator%(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3933,7 +3933,7 @@ operator+(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3949,7 +3949,7 @@ operator+(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3965,7 +3965,7 @@ operator+(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -3979,7 +3979,7 @@ operator-(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -3995,7 +3995,7 @@ operator-(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4011,7 +4011,7 @@ operator-(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4025,7 +4025,7 @@ operator^(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4041,7 +4041,7 @@ operator^(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4057,7 +4057,7 @@ operator^(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4071,7 +4071,7 @@ operator&(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4087,7 +4087,7 @@ operator&(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4103,7 +4103,7 @@ operator&(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4117,7 +4117,7 @@ operator|(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4133,7 +4133,7 @@ operator|(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4149,7 +4149,7 @@ operator|(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4163,7 +4163,7 @@ operator<<(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4179,7 +4179,7 @@ operator<<(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4195,7 +4195,7 @@ operator<<(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4209,7 +4209,7 @@ operator>>(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4225,7 +4225,7 @@ operator>>(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4241,7 +4241,7 @@ operator>>(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4255,7 +4255,7 @@ operator&&(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4271,7 +4271,7 @@ operator&&(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4287,7 +4287,7 @@ operator&&(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4301,7 +4301,7 @@ operator||(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4317,7 +4317,7 @@ operator||(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4333,7 +4333,7 @@ operator||(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4347,7 +4347,7 @@ operator==(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4363,7 +4363,7 @@ operator==(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4379,7 +4379,7 @@ operator==(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4393,7 +4393,7 @@ operator!=(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4409,7 +4409,7 @@ operator!=(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4425,7 +4425,7 @@ operator!=(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4439,7 +4439,7 @@ operator<(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4455,7 +4455,7 @@ operator<(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4471,7 +4471,7 @@ operator<(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4485,7 +4485,7 @@ operator>(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4501,7 +4501,7 @@ operator>(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4517,7 +4517,7 @@ operator>(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4531,7 +4531,7 @@ operator<=(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4547,7 +4547,7 @@ operator<=(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4563,7 +4563,7 @@ operator<=(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4577,7 +4577,7 @@ operator>=(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4593,7 +4593,7 @@ operator>=(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4609,7 +4609,7 @@ operator>=(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4623,7 +4623,7 @@ abs(const _Expr& __x)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4637,7 +4637,7 @@ acos(const _Expr& __x)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4651,7 +4651,7 @@ asin(const _Expr& __x)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4665,7 +4665,7 @@ atan(const _Expr& __x)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4679,7 +4679,7 @@ atan2(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4695,7 +4695,7 @@ atan2(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4711,7 +4711,7 @@ atan2(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4725,7 +4725,7 @@ cos(const _Expr& __x)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4739,7 +4739,7 @@ cosh(const _Expr& __x)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4753,7 +4753,7 @@ exp(const _Expr& __x)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4767,7 +4767,7 @@ log(const _Expr& __x)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4781,7 +4781,7 @@ log10(const _Expr& __x)
 }
 
 template<class _Expr1, class _Expr2>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr1>::value && __is_val_expr<_Expr2>::value,
@@ -4795,7 +4795,7 @@ pow(const _Expr1& __x, const _Expr2& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4811,7 +4811,7 @@ pow(const _Expr& __x, const typename _Expr::value_type& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4827,7 +4827,7 @@ pow(const typename _Expr::value_type& __x, const _Expr& __y)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4841,7 +4841,7 @@ sin(const _Expr& __x)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4855,7 +4855,7 @@ sinh(const _Expr& __x)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4869,7 +4869,7 @@ sqrt(const _Expr& __x)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4883,7 +4883,7 @@ tan(const _Expr& __x)
 }
 
 template<class _Expr>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if
 <
     __is_val_expr<_Expr>::value,
@@ -4897,7 +4897,7 @@ tanh(const _Expr& __x)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _Tp*
 begin(valarray<_Tp>& __v)
 {
@@ -4905,7 +4905,7 @@ begin(valarray<_Tp>& __v)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 const _Tp*
 begin(const valarray<_Tp>& __v)
 {
@@ -4913,7 +4913,7 @@ begin(const valarray<_Tp>& __v)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 _Tp*
 end(valarray<_Tp>& __v)
 {
@@ -4921,15 +4921,15 @@ end(valarray<_Tp>& __v)
 }
 
 template <class _Tp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 const _Tp*
 end(const valarray<_Tp>& __v)
 {
     return __v.__end_;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_VALARRAY
+#endif // _LIBCUDACXX_VALARRAY

diff  --git a/libcxx/include/variant b/libcxx/include/variant
index b74416b62d91..a078fd79c1d9 100644
--- a/libcxx/include/variant
+++ b/libcxx/include/variant
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_VARIANT
-#define _LIBCPP_VARIANT
+#ifndef _LIBCUDACXX_VARIANT
+#define _LIBCUDACXX_VARIANT
 
 /*
    variant synopsis
@@ -219,7 +219,7 @@ namespace std {
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <typeinfo>
 #  include <utility>
 #endif
@@ -227,25 +227,25 @@ namespace std {
 // standard-mandated includes
 #include <compare>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 namespace std { // explicitly not using versioning namespace
 
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS bad_variant_access : public exception {
+class _LIBCUDACXX_EXCEPTION_ABI _LIBCUDACXX_AVAILABILITY_BAD_VARIANT_ACCESS bad_variant_access : public exception {
 public:
   virtual const char* what() const _NOEXCEPT;
 };
 
 } // namespace std
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 
 // Light N-dimensional array of function pointers. Used in place of std::array to avoid
 // adding a dependency.
@@ -254,66 +254,66 @@ struct __farray {
   static_assert(_Size > 0, "N-dimensional array should never be empty in std::visit");
   _Tp __buf_[_Size] = {};
 
-  _LIBCPP_INLINE_VISIBILITY constexpr
+  _LIBCUDACXX_INLINE_VISIBILITY constexpr
   const _Tp &operator[](size_t __n) const noexcept {
       return __buf_[__n];
   }
 };
 
-_LIBCPP_NORETURN
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+_LIBCUDACXX_NORETURN
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 void __throw_bad_variant_access() {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         throw bad_variant_access();
 #else
-        _VSTD::abort();
+        _CUDA_VSTD::abort();
 #endif
 }
 
 template <class... _Types>
-class _LIBCPP_TEMPLATE_VIS variant;
+class _LIBCUDACXX_TEMPLATE_VIS variant;
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_size;
+struct _LIBCUDACXX_TEMPLATE_VIS variant_size;
 
 template <class _Tp>
 inline constexpr size_t variant_size_v = variant_size<_Tp>::value;
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_size<const _Tp> : variant_size<_Tp> {};
+struct _LIBCUDACXX_TEMPLATE_VIS variant_size<const _Tp> : variant_size<_Tp> {};
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_size<volatile _Tp> : variant_size<_Tp> {};
+struct _LIBCUDACXX_TEMPLATE_VIS variant_size<volatile _Tp> : variant_size<_Tp> {};
 
 template <class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_size<const volatile _Tp>
+struct _LIBCUDACXX_TEMPLATE_VIS variant_size<const volatile _Tp>
     : variant_size<_Tp> {};
 
 template <class... _Types>
-struct _LIBCPP_TEMPLATE_VIS variant_size<variant<_Types...>>
+struct _LIBCUDACXX_TEMPLATE_VIS variant_size<variant<_Types...>>
     : integral_constant<size_t, sizeof...(_Types)> {};
 
 template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_alternative;
+struct _LIBCUDACXX_TEMPLATE_VIS variant_alternative;
 
 template <size_t _Ip, class _Tp>
 using variant_alternative_t = typename variant_alternative<_Ip, _Tp>::type;
 
 template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, const _Tp>
+struct _LIBCUDACXX_TEMPLATE_VIS variant_alternative<_Ip, const _Tp>
     : add_const<variant_alternative_t<_Ip, _Tp>> {};
 
 template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, volatile _Tp>
+struct _LIBCUDACXX_TEMPLATE_VIS variant_alternative<_Ip, volatile _Tp>
     : add_volatile<variant_alternative_t<_Ip, _Tp>> {};
 
 template <size_t _Ip, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, const volatile _Tp>
+struct _LIBCUDACXX_TEMPLATE_VIS variant_alternative<_Ip, const volatile _Tp>
     : add_cv<variant_alternative_t<_Ip, _Tp>> {};
 
 template <size_t _Ip, class... _Types>
-struct _LIBCPP_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> {
+struct _LIBCUDACXX_TEMPLATE_VIS variant_alternative<_Ip, variant<_Types...>> {
   static_assert(_Ip < sizeof...(_Types), "Index out of bounds in std::variant_alternative<>");
   using type = __type_pack_element<_Ip, _Types...>;
 };
@@ -330,7 +330,7 @@ constexpr int __choose_index_type(unsigned int __num_elem) {
 
 template <size_t _NumAlts>
 using __variant_index_t =
-#ifndef _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
+#ifndef _LIBCUDACXX_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
   unsigned int;
 #else
   std::tuple_element_t<
@@ -343,36 +343,36 @@ template <class _IndexType>
 constexpr _IndexType __variant_npos = static_cast<_IndexType>(-1);
 
 template <class... _Types>
-class _LIBCPP_TEMPLATE_VIS variant;
+class _LIBCUDACXX_TEMPLATE_VIS variant;
 
 template <class... _Types>
-_LIBCPP_INLINE_VISIBILITY constexpr variant<_Types...>&
+_LIBCUDACXX_INLINE_VISIBILITY constexpr variant<_Types...>&
 __as_variant(variant<_Types...>& __vs) noexcept {
   return __vs;
 }
 
 template <class... _Types>
-_LIBCPP_INLINE_VISIBILITY constexpr const variant<_Types...>&
+_LIBCUDACXX_INLINE_VISIBILITY constexpr const variant<_Types...>&
 __as_variant(const variant<_Types...>& __vs) noexcept {
   return __vs;
 }
 
 template <class... _Types>
-_LIBCPP_INLINE_VISIBILITY constexpr variant<_Types...>&&
+_LIBCUDACXX_INLINE_VISIBILITY constexpr variant<_Types...>&&
 __as_variant(variant<_Types...>&& __vs) noexcept {
-  return _VSTD::move(__vs);
+  return _CUDA_VSTD::move(__vs);
 }
 
 template <class... _Types>
-_LIBCPP_INLINE_VISIBILITY constexpr const variant<_Types...>&&
+_LIBCUDACXX_INLINE_VISIBILITY constexpr const variant<_Types...>&&
 __as_variant(const variant<_Types...>&& __vs) noexcept {
-  return _VSTD::move(__vs);
+  return _CUDA_VSTD::move(__vs);
 }
 
 namespace __find_detail {
 
 template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr size_t __find_index() {
   constexpr bool __matches[] = {is_same_v<_Tp, _Types>...};
   size_t __result = __not_found;
@@ -417,7 +417,7 @@ constexpr _Trait __trait =
         ? _Trait::_TriviallyAvailable
         : _IsAvailable<_Tp>::value ? _Trait::_Available : _Trait::_Unavailable;
 
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr _Trait __common_trait(initializer_list<_Trait> __traits) {
   _Trait __result = _Trait::_TriviallyAvailable;
   for (_Trait __t : __traits) {
@@ -456,32 +456,32 @@ namespace __access {
 
 struct __union {
   template <class _Vp>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto&& __get_alt(_Vp&& __v, in_place_index_t<0>) {
-    return _VSTD::forward<_Vp>(__v).__head;
+    return _CUDA_VSTD::forward<_Vp>(__v).__head;
   }
 
   template <class _Vp, size_t _Ip>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto&& __get_alt(_Vp&& __v, in_place_index_t<_Ip>) {
-    return __get_alt(_VSTD::forward<_Vp>(__v).__tail, in_place_index<_Ip - 1>);
+    return __get_alt(_CUDA_VSTD::forward<_Vp>(__v).__tail, in_place_index<_Ip - 1>);
   }
 };
 
 struct __base {
   template <size_t _Ip, class _Vp>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto&& __get_alt(_Vp&& __v) {
-    return __union::__get_alt(_VSTD::forward<_Vp>(__v).__data,
+    return __union::__get_alt(_CUDA_VSTD::forward<_Vp>(__v).__data,
                               in_place_index<_Ip>);
   }
 };
 
 struct __variant {
   template <size_t _Ip, class _Vp>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto&& __get_alt(_Vp&& __v) {
-    return __base::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v).__impl);
+    return __base::__get_alt<_Ip>(_CUDA_VSTD::forward<_Vp>(__v).__impl);
   }
 };
 
@@ -491,35 +491,35 @@ namespace __visitation {
 
 struct __base {
   template <class _Visitor, class... _Vs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr decltype(auto)
   __visit_alt_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) {
     constexpr auto __fdiagonal =
         __make_fdiagonal<_Visitor&&,
-                         decltype(_VSTD::forward<_Vs>(__vs).__as_base())...>();
-    return __fdiagonal[__index](_VSTD::forward<_Visitor>(__visitor),
-                                _VSTD::forward<_Vs>(__vs).__as_base()...);
+                         decltype(_CUDA_VSTD::forward<_Vs>(__vs).__as_base())...>();
+    return __fdiagonal[__index](_CUDA_VSTD::forward<_Visitor>(__visitor),
+                                _CUDA_VSTD::forward<_Vs>(__vs).__as_base()...);
   }
 
   template <class _Visitor, class... _Vs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr decltype(auto) __visit_alt(_Visitor&& __visitor,
                                               _Vs&&... __vs) {
     constexpr auto __fmatrix =
         __make_fmatrix<_Visitor&&,
-                       decltype(_VSTD::forward<_Vs>(__vs).__as_base())...>();
+                       decltype(_CUDA_VSTD::forward<_Vs>(__vs).__as_base())...>();
     return __at(__fmatrix, __vs.index()...)(
-        _VSTD::forward<_Visitor>(__visitor),
-        _VSTD::forward<_Vs>(__vs).__as_base()...);
+        _CUDA_VSTD::forward<_Visitor>(__visitor),
+        _CUDA_VSTD::forward<_Vs>(__vs).__as_base()...);
   }
 
 private:
   template <class _Tp>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr const _Tp& __at(const _Tp& __elem) { return __elem; }
 
   template <class _Tp, size_t _Np, typename... _Indices>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto&& __at(const __farray<_Tp, _Np>& __elems,
                                size_t __index, _Indices... __indices) {
     return __at(__elems[__index], __indices...);
@@ -533,45 +533,45 @@ private:
   }
 
   template <class... _Fs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto __make_farray(_Fs&&... __fs) {
     __std_visit_visitor_return_type_check<__uncvref_t<_Fs>...>();
     using __result = __farray<common_type_t<__uncvref_t<_Fs>...>, sizeof...(_Fs)>;
-    return __result{{_VSTD::forward<_Fs>(__fs)...}};
+    return __result{{_CUDA_VSTD::forward<_Fs>(__fs)...}};
   }
 
   template <size_t... _Is>
   struct __dispatcher {
     template <class _Fp, class... _Vs>
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     static constexpr decltype(auto) __dispatch(_Fp __f, _Vs... __vs) {
-        return _VSTD::__invoke(
+        return _CUDA_VSTD::__invoke(
             static_cast<_Fp>(__f),
             __access::__base::__get_alt<_Is>(static_cast<_Vs>(__vs))...);
     }
   };
 
   template <class _Fp, class... _Vs, size_t... _Is>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto __make_dispatch(index_sequence<_Is...>) {
     return __dispatcher<_Is...>::template __dispatch<_Fp, _Vs...>;
   }
 
   template <size_t _Ip, class _Fp, class... _Vs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto __make_fdiagonal_impl() {
     return __make_dispatch<_Fp, _Vs...>(
         index_sequence<((void)__type_identity<_Vs>{}, _Ip)...>{});
   }
 
   template <class _Fp, class... _Vs, size_t... _Is>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto __make_fdiagonal_impl(index_sequence<_Is...>) {
     return __base::__make_farray(__make_fdiagonal_impl<_Is, _Fp, _Vs...>()...);
   }
 
   template <class _Fp, class _Vp, class... _Vs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto __make_fdiagonal() {
     constexpr size_t _Np = __uncvref_t<_Vp>::__size();
     static_assert(__all<(_Np == __uncvref_t<_Vs>::__size())...>::value);
@@ -579,13 +579,13 @@ private:
   }
 
   template <class _Fp, class... _Vs, size_t... _Is>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto __make_fmatrix_impl(index_sequence<_Is...> __is) {
     return __make_dispatch<_Fp, _Vs...>(__is);
   }
 
   template <class _Fp, class... _Vs, size_t... _Is, size_t... _Js, class... _Ls>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto __make_fmatrix_impl(index_sequence<_Is...>,
                                             index_sequence<_Js...>,
                                             _Ls... __ls) {
@@ -594,7 +594,7 @@ private:
   }
 
   template <class _Fp, class... _Vs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto __make_fmatrix() {
     return __make_fmatrix_impl<_Fp, _Vs...>(
         index_sequence<>{}, make_index_sequence<__uncvref_t<_Vs>::__size()>{}...);
@@ -603,50 +603,50 @@ private:
 
 struct __variant {
   template <class _Visitor, class... _Vs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr decltype(auto)
   __visit_alt_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) {
     return __base::__visit_alt_at(__index,
-                                  _VSTD::forward<_Visitor>(__visitor),
-                                  _VSTD::forward<_Vs>(__vs).__impl...);
+                                  _CUDA_VSTD::forward<_Visitor>(__visitor),
+                                  _CUDA_VSTD::forward<_Vs>(__vs).__impl...);
   }
 
   template <class _Visitor, class... _Vs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr decltype(auto) __visit_alt(_Visitor&& __visitor,
                                               _Vs&&... __vs) {
     return __base::__visit_alt(
-        _VSTD::forward<_Visitor>(__visitor),
-        _VSTD::__as_variant(_VSTD::forward<_Vs>(__vs)).__impl...);
+        _CUDA_VSTD::forward<_Visitor>(__visitor),
+        _CUDA_VSTD::__as_variant(_CUDA_VSTD::forward<_Vs>(__vs)).__impl...);
   }
 
   template <class _Visitor, class... _Vs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr decltype(auto)
   __visit_value_at(size_t __index, _Visitor&& __visitor, _Vs&&... __vs) {
     return __visit_alt_at(
         __index,
-        __make_value_visitor(_VSTD::forward<_Visitor>(__visitor)),
-        _VSTD::forward<_Vs>(__vs)...);
+        __make_value_visitor(_CUDA_VSTD::forward<_Visitor>(__visitor)),
+        _CUDA_VSTD::forward<_Vs>(__vs)...);
   }
 
   template <class _Visitor, class... _Vs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr decltype(auto) __visit_value(_Visitor&& __visitor,
                                                 _Vs&&... __vs) {
     return __visit_alt(
-        __make_value_visitor(_VSTD::forward<_Visitor>(__visitor)),
-        _VSTD::forward<_Vs>(__vs)...);
+        __make_value_visitor(_CUDA_VSTD::forward<_Visitor>(__visitor)),
+        _CUDA_VSTD::forward<_Vs>(__vs)...);
   }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
   template <class _Rp, class _Visitor, class... _Vs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr _Rp __visit_value(_Visitor&& __visitor,
                                      _Vs&&... __vs) {
     return __visit_alt(
-        __make_value_visitor<_Rp>(_VSTD::forward<_Visitor>(__visitor)),
-        _VSTD::forward<_Vs>(__vs)...);
+        __make_value_visitor<_Rp>(_CUDA_VSTD::forward<_Visitor>(__visitor)),
+        _CUDA_VSTD::forward<_Vs>(__vs)...);
   }
 #endif
 
@@ -660,33 +660,33 @@ private:
   template <class _Visitor>
   struct __value_visitor {
     template <class... _Alts>
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     constexpr decltype(auto) operator()(_Alts&&... __alts) const {
       __std_visit_exhaustive_visitor_check<
           _Visitor,
-          decltype((_VSTD::forward<_Alts>(__alts).__value))...>();
-      return _VSTD::__invoke(_VSTD::forward<_Visitor>(__visitor),
-                             _VSTD::forward<_Alts>(__alts).__value...);
+          decltype((_CUDA_VSTD::forward<_Alts>(__alts).__value))...>();
+      return _CUDA_VSTD::__invoke(_CUDA_VSTD::forward<_Visitor>(__visitor),
+                             _CUDA_VSTD::forward<_Alts>(__alts).__value...);
     }
     _Visitor&& __visitor;
   };
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
   template <class _Rp, class _Visitor>
   struct __value_visitor_return_type {
     template <class... _Alts>
-    inline _LIBCPP_INLINE_VISIBILITY
+    inline _LIBCUDACXX_INLINE_VISIBILITY
     constexpr _Rp operator()(_Alts&&... __alts) const {
       __std_visit_exhaustive_visitor_check<
           _Visitor,
-          decltype((_VSTD::forward<_Alts>(__alts).__value))...>();
+          decltype((_CUDA_VSTD::forward<_Alts>(__alts).__value))...>();
       if constexpr (is_void_v<_Rp>) {
-        _VSTD::__invoke(_VSTD::forward<_Visitor>(__visitor),
-                        _VSTD::forward<_Alts>(__alts).__value...);
+        _CUDA_VSTD::__invoke(_CUDA_VSTD::forward<_Visitor>(__visitor),
+                        _CUDA_VSTD::forward<_Alts>(__alts).__value...);
       }
       else {
-        return _VSTD::__invoke(_VSTD::forward<_Visitor>(__visitor),
-                               _VSTD::forward<_Alts>(__alts).__value...);
+        return _CUDA_VSTD::__invoke(_CUDA_VSTD::forward<_Visitor>(__visitor),
+                               _CUDA_VSTD::forward<_Alts>(__alts).__value...);
       }
     }
 
@@ -695,16 +695,16 @@ private:
 #endif
 
   template <class _Visitor>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto __make_value_visitor(_Visitor&& __visitor) {
-    return __value_visitor<_Visitor>{_VSTD::forward<_Visitor>(__visitor)};
+    return __value_visitor<_Visitor>{_CUDA_VSTD::forward<_Visitor>(__visitor)};
   }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
   template <class _Rp, class _Visitor>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr auto __make_value_visitor(_Visitor&& __visitor) {
-    return __value_visitor_return_type<_Rp, _Visitor>{_VSTD::forward<_Visitor>(__visitor)};
+    return __value_visitor_return_type<_Rp, _Visitor>{_CUDA_VSTD::forward<_Visitor>(__visitor)};
   }
 #endif
 };
@@ -712,42 +712,42 @@ private:
 } // namespace __visitation
 
 template <size_t _Index, class _Tp>
-struct _LIBCPP_TEMPLATE_VIS __alt {
+struct _LIBCUDACXX_TEMPLATE_VIS __alt {
   using __value_type = _Tp;
 
   template <class... _Args>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   explicit constexpr __alt(in_place_t, _Args&&... __args)
-      : __value(_VSTD::forward<_Args>(__args)...) {}
+      : __value(_CUDA_VSTD::forward<_Args>(__args)...) {}
 
   __value_type __value;
 };
 
 template <_Trait _DestructibleTrait, size_t _Index, class... _Types>
-union _LIBCPP_TEMPLATE_VIS __union;
+union _LIBCUDACXX_TEMPLATE_VIS __union;
 
 template <_Trait _DestructibleTrait, size_t _Index>
-union _LIBCPP_TEMPLATE_VIS __union<_DestructibleTrait, _Index> {};
+union _LIBCUDACXX_TEMPLATE_VIS __union<_DestructibleTrait, _Index> {};
 
-#define _LIBCPP_VARIANT_UNION(destructible_trait, destructor)                  \
+#define _LIBCUDACXX_VARIANT_UNION(destructible_trait, destructor)                  \
   template <size_t _Index, class _Tp, class... _Types>                         \
-  union _LIBCPP_TEMPLATE_VIS __union<destructible_trait,                      \
+  union _LIBCUDACXX_TEMPLATE_VIS __union<destructible_trait,                      \
                                       _Index,                                  \
                                       _Tp,                                     \
                                       _Types...> {                             \
   public:                                                                      \
-    inline _LIBCPP_INLINE_VISIBILITY                                           \
+    inline _LIBCUDACXX_INLINE_VISIBILITY                                           \
     explicit constexpr __union(__valueless_t) noexcept : __dummy{} {}          \
                                                                                \
     template <class... _Args>                                                  \
-    inline _LIBCPP_INLINE_VISIBILITY                                           \
+    inline _LIBCUDACXX_INLINE_VISIBILITY                                           \
     explicit constexpr __union(in_place_index_t<0>, _Args&&... __args)         \
-        : __head(in_place, _VSTD::forward<_Args>(__args)...) {}                \
+        : __head(in_place, _CUDA_VSTD::forward<_Args>(__args)...) {}                \
                                                                                \
     template <size_t _Ip, class... _Args>                                      \
-    inline _LIBCPP_INLINE_VISIBILITY                                           \
+    inline _LIBCUDACXX_INLINE_VISIBILITY                                           \
     explicit constexpr __union(in_place_index_t<_Ip>, _Args&&... __args)       \
-        : __tail(in_place_index<_Ip - 1>, _VSTD::forward<_Args>(__args)...) {} \
+        : __tail(in_place_index<_Ip - 1>, _CUDA_VSTD::forward<_Args>(__args)...) {} \
                                                                                \
     __union(const __union&) = default;                                         \
     __union(__union&&) = default;                                              \
@@ -765,52 +765,52 @@ union _LIBCPP_TEMPLATE_VIS __union<_DestructibleTrait, _Index> {};
     friend struct __access::__union;                                           \
   }
 
-_LIBCPP_VARIANT_UNION(_Trait::_TriviallyAvailable, ~__union() = default;);
-_LIBCPP_VARIANT_UNION(_Trait::_Available, ~__union() {});
-_LIBCPP_VARIANT_UNION(_Trait::_Unavailable, ~__union() = delete;);
+_LIBCUDACXX_VARIANT_UNION(_Trait::_TriviallyAvailable, ~__union() = default;);
+_LIBCUDACXX_VARIANT_UNION(_Trait::_Available, ~__union() {});
+_LIBCUDACXX_VARIANT_UNION(_Trait::_Unavailable, ~__union() = delete;);
 
-#undef _LIBCPP_VARIANT_UNION
+#undef _LIBCUDACXX_VARIANT_UNION
 
 template <_Trait _DestructibleTrait, class... _Types>
-class _LIBCPP_TEMPLATE_VIS __base {
+class _LIBCUDACXX_TEMPLATE_VIS __base {
 public:
   using __index_t = __variant_index_t<sizeof...(_Types)>;
 
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   explicit constexpr __base(__valueless_t __tag) noexcept
       : __data(__tag), __index(__variant_npos<__index_t>) {}
 
   template <size_t _Ip, class... _Args>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   explicit constexpr __base(in_place_index_t<_Ip>, _Args&&... __args)
       :
-        __data(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...),
+        __data(in_place_index<_Ip>, _CUDA_VSTD::forward<_Args>(__args)...),
         __index(_Ip) {}
 
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   constexpr bool valueless_by_exception() const noexcept {
     return index() == variant_npos;
   }
 
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   constexpr size_t index() const noexcept {
     return __index == __variant_npos<__index_t> ? variant_npos : __index;
   }
 
 protected:
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   constexpr auto&& __as_base() & { return *this; }
 
-  inline _LIBCPP_INLINE_VISIBILITY
-  constexpr auto&& __as_base() && { return _VSTD::move(*this); }
+  inline _LIBCUDACXX_INLINE_VISIBILITY
+  constexpr auto&& __as_base() && { return _CUDA_VSTD::move(*this); }
 
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   constexpr auto&& __as_base() const & { return *this; }
 
-  inline _LIBCPP_INLINE_VISIBILITY
-  constexpr auto&& __as_base() const && { return _VSTD::move(*this); }
+  inline _LIBCUDACXX_INLINE_VISIBILITY
+  constexpr auto&& __as_base() const && { return _CUDA_VSTD::move(*this); }
 
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static constexpr size_t __size() { return sizeof...(_Types); }
 
   __union<_DestructibleTrait, 0, _Types...> __data;
@@ -821,11 +821,11 @@ protected:
 };
 
 template <class _Traits, _Trait = _Traits::__destructible_trait>
-class _LIBCPP_TEMPLATE_VIS __dtor;
+class _LIBCUDACXX_TEMPLATE_VIS __dtor;
 
-#define _LIBCPP_VARIANT_DESTRUCTOR(destructible_trait, destructor, destroy)    \
+#define _LIBCUDACXX_VARIANT_DESTRUCTOR(destructible_trait, destructor, destroy)    \
   template <class... _Types>                                                   \
-  class _LIBCPP_TEMPLATE_VIS __dtor<__traits<_Types...>,                       \
+  class _LIBCUDACXX_TEMPLATE_VIS __dtor<__traits<_Types...>,                       \
                                     destructible_trait>                        \
       : public __base<destructible_trait, _Types...> {                         \
     using __base_type = __base<destructible_trait, _Types...>;                 \
@@ -842,16 +842,16 @@ class _LIBCPP_TEMPLATE_VIS __dtor;
     __dtor& operator=(__dtor&&) = default;                                     \
                                                                                \
   protected:                                                                   \
-    inline _LIBCPP_INLINE_VISIBILITY                                           \
+    inline _LIBCUDACXX_INLINE_VISIBILITY                                           \
     destroy                                                                    \
   }
 
-_LIBCPP_VARIANT_DESTRUCTOR(
+_LIBCUDACXX_VARIANT_DESTRUCTOR(
     _Trait::_TriviallyAvailable,
     ~__dtor() = default;,
     void __destroy() noexcept { this->__index = __variant_npos<__index_t>; });
 
-_LIBCPP_VARIANT_DESTRUCTOR(
+_LIBCUDACXX_VARIANT_DESTRUCTOR(
     _Trait::_Available,
     ~__dtor() { __destroy(); },
     void __destroy() noexcept {
@@ -866,15 +866,15 @@ _LIBCPP_VARIANT_DESTRUCTOR(
       this->__index = __variant_npos<__index_t>;
     });
 
-_LIBCPP_VARIANT_DESTRUCTOR(
+_LIBCUDACXX_VARIANT_DESTRUCTOR(
     _Trait::_Unavailable,
     ~__dtor() = delete;,
     void __destroy() noexcept = delete;);
 
-#undef _LIBCPP_VARIANT_DESTRUCTOR
+#undef _LIBCUDACXX_VARIANT_DESTRUCTOR
 
 template <class _Traits>
-class _LIBCPP_TEMPLATE_VIS __ctor : public __dtor<_Traits> {
+class _LIBCUDACXX_TEMPLATE_VIS __ctor : public __dtor<_Traits> {
   using __base_type = __dtor<_Traits>;
 
 public:
@@ -883,15 +883,15 @@ public:
 
 protected:
   template <size_t _Ip, class _Tp, class... _Args>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static _Tp& __construct_alt(__alt<_Ip, _Tp>& __a, _Args&&... __args) {
-    ::new ((void*)_VSTD::addressof(__a))
-        __alt<_Ip, _Tp>(in_place, _VSTD::forward<_Args>(__args)...);
+    ::new ((void*)_CUDA_VSTD::addressof(__a))
+        __alt<_Ip, _Tp>(in_place, _CUDA_VSTD::forward<_Args>(__args)...);
     return __a.__value;
   }
 
   template <class _Rhs>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   static void __generic_construct(__ctor& __lhs, _Rhs&& __rhs) {
     __lhs.__destroy();
     if (!__rhs.valueless_by_exception()) {
@@ -900,21 +900,21 @@ protected:
           [](auto& __lhs_alt, auto&& __rhs_alt) {
             __construct_alt(
                 __lhs_alt,
-                _VSTD::forward<decltype(__rhs_alt)>(__rhs_alt).__value);
+                _CUDA_VSTD::forward<decltype(__rhs_alt)>(__rhs_alt).__value);
           },
-          __lhs, _VSTD::forward<_Rhs>(__rhs));
+          __lhs, _CUDA_VSTD::forward<_Rhs>(__rhs));
       __lhs.__index = __rhs.index();
     }
   }
 };
 
 template <class _Traits, _Trait = _Traits::__move_constructible_trait>
-class _LIBCPP_TEMPLATE_VIS __move_constructor;
+class _LIBCUDACXX_TEMPLATE_VIS __move_constructor;
 
-#define _LIBCPP_VARIANT_MOVE_CONSTRUCTOR(move_constructible_trait,             \
+#define _LIBCUDACXX_VARIANT_MOVE_CONSTRUCTOR(move_constructible_trait,             \
                                          move_constructor)                     \
   template <class... _Types>                                                   \
-  class _LIBCPP_TEMPLATE_VIS __move_constructor<__traits<_Types...>,           \
+  class _LIBCUDACXX_TEMPLATE_VIS __move_constructor<__traits<_Types...>,           \
                                                 move_constructible_trait>      \
       : public __ctor<__traits<_Types...>> {                                   \
     using __base_type = __ctor<__traits<_Types...>>;                           \
@@ -930,31 +930,31 @@ class _LIBCPP_TEMPLATE_VIS __move_constructor;
     __move_constructor& operator=(__move_constructor&&) = default;             \
   }
 
-_LIBCPP_VARIANT_MOVE_CONSTRUCTOR(
+_LIBCUDACXX_VARIANT_MOVE_CONSTRUCTOR(
     _Trait::_TriviallyAvailable,
     __move_constructor(__move_constructor&& __that) = default;);
 
-_LIBCPP_VARIANT_MOVE_CONSTRUCTOR(
+_LIBCUDACXX_VARIANT_MOVE_CONSTRUCTOR(
     _Trait::_Available,
     __move_constructor(__move_constructor&& __that) noexcept(
         __all<is_nothrow_move_constructible_v<_Types>...>::value)
         : __move_constructor(__valueless_t{}) {
-      this->__generic_construct(*this, _VSTD::move(__that));
+      this->__generic_construct(*this, _CUDA_VSTD::move(__that));
     });
 
-_LIBCPP_VARIANT_MOVE_CONSTRUCTOR(
+_LIBCUDACXX_VARIANT_MOVE_CONSTRUCTOR(
     _Trait::_Unavailable,
     __move_constructor(__move_constructor&&) = delete;);
 
-#undef _LIBCPP_VARIANT_MOVE_CONSTRUCTOR
+#undef _LIBCUDACXX_VARIANT_MOVE_CONSTRUCTOR
 
 template <class _Traits, _Trait = _Traits::__copy_constructible_trait>
-class _LIBCPP_TEMPLATE_VIS __copy_constructor;
+class _LIBCUDACXX_TEMPLATE_VIS __copy_constructor;
 
-#define _LIBCPP_VARIANT_COPY_CONSTRUCTOR(copy_constructible_trait,             \
+#define _LIBCUDACXX_VARIANT_COPY_CONSTRUCTOR(copy_constructible_trait,             \
                                          copy_constructor)                     \
   template <class... _Types>                                                   \
-  class _LIBCPP_TEMPLATE_VIS __copy_constructor<__traits<_Types...>,          \
+  class _LIBCUDACXX_TEMPLATE_VIS __copy_constructor<__traits<_Types...>,          \
                                                  copy_constructible_trait>     \
       : public __move_constructor<__traits<_Types...>> {                       \
     using __base_type = __move_constructor<__traits<_Types...>>;               \
@@ -970,25 +970,25 @@ class _LIBCPP_TEMPLATE_VIS __copy_constructor;
     __copy_constructor& operator=(__copy_constructor&&) = default;             \
   }
 
-_LIBCPP_VARIANT_COPY_CONSTRUCTOR(
+_LIBCUDACXX_VARIANT_COPY_CONSTRUCTOR(
     _Trait::_TriviallyAvailable,
     __copy_constructor(const __copy_constructor& __that) = default;);
 
-_LIBCPP_VARIANT_COPY_CONSTRUCTOR(
+_LIBCUDACXX_VARIANT_COPY_CONSTRUCTOR(
     _Trait::_Available,
     __copy_constructor(const __copy_constructor& __that)
         : __copy_constructor(__valueless_t{}) {
       this->__generic_construct(*this, __that);
     });
 
-_LIBCPP_VARIANT_COPY_CONSTRUCTOR(
+_LIBCUDACXX_VARIANT_COPY_CONSTRUCTOR(
     _Trait::_Unavailable,
     __copy_constructor(const __copy_constructor&) = delete;);
 
-#undef _LIBCPP_VARIANT_COPY_CONSTRUCTOR
+#undef _LIBCUDACXX_VARIANT_COPY_CONSTRUCTOR
 
 template <class _Traits>
-class _LIBCPP_TEMPLATE_VIS __assignment : public __copy_constructor<_Traits> {
+class _LIBCUDACXX_TEMPLATE_VIS __assignment : public __copy_constructor<_Traits> {
   using __base_type = __copy_constructor<_Traits>;
 
 public:
@@ -996,39 +996,39 @@ public:
   using __base_type::operator=;
 
   template <size_t _Ip, class... _Args>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   auto& __emplace(_Args&&... __args) {
     this->__destroy();
     auto& __res = this->__construct_alt(__access::__base::__get_alt<_Ip>(*this),
-                          _VSTD::forward<_Args>(__args)...);
+                          _CUDA_VSTD::forward<_Args>(__args)...);
     this->__index = _Ip;
     return __res;
   }
 
 protected:
   template <size_t _Ip, class _Tp, class _Arg>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   void __assign_alt(__alt<_Ip, _Tp>& __a, _Arg&& __arg) {
     if (this->index() == _Ip) {
-      __a.__value = _VSTD::forward<_Arg>(__arg);
+      __a.__value = _CUDA_VSTD::forward<_Arg>(__arg);
     } else {
       struct {
         void operator()(true_type) const {
-          __this->__emplace<_Ip>(_VSTD::forward<_Arg>(__arg));
+          __this->__emplace<_Ip>(_CUDA_VSTD::forward<_Arg>(__arg));
         }
         void operator()(false_type) const {
-          __this->__emplace<_Ip>(_Tp(_VSTD::forward<_Arg>(__arg)));
+          __this->__emplace<_Ip>(_Tp(_CUDA_VSTD::forward<_Arg>(__arg)));
         }
         __assignment* __this;
         _Arg&& __arg;
-      } __impl{this, _VSTD::forward<_Arg>(__arg)};
+      } __impl{this, _CUDA_VSTD::forward<_Arg>(__arg)};
       __impl(bool_constant<is_nothrow_constructible_v<_Tp, _Arg> ||
                            !is_nothrow_move_constructible_v<_Tp>>{});
     }
   }
 
   template <class _That>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   void __generic_assign(_That&& __that) {
     if (this->valueless_by_exception() && __that.valueless_by_exception()) {
       // do nothing.
@@ -1040,20 +1040,20 @@ protected:
           [this](auto& __this_alt, auto&& __that_alt) {
             this->__assign_alt(
                 __this_alt,
-                _VSTD::forward<decltype(__that_alt)>(__that_alt).__value);
+                _CUDA_VSTD::forward<decltype(__that_alt)>(__that_alt).__value);
           },
-          *this, _VSTD::forward<_That>(__that));
+          *this, _CUDA_VSTD::forward<_That>(__that));
     }
   }
 };
 
 template <class _Traits, _Trait = _Traits::__move_assignable_trait>
-class _LIBCPP_TEMPLATE_VIS __move_assignment;
+class _LIBCUDACXX_TEMPLATE_VIS __move_assignment;
 
-#define _LIBCPP_VARIANT_MOVE_ASSIGNMENT(move_assignable_trait,                 \
+#define _LIBCUDACXX_VARIANT_MOVE_ASSIGNMENT(move_assignable_trait,                 \
                                         move_assignment)                       \
   template <class... _Types>                                                   \
-  class _LIBCPP_TEMPLATE_VIS __move_assignment<__traits<_Types...>,           \
+  class _LIBCUDACXX_TEMPLATE_VIS __move_assignment<__traits<_Types...>,           \
                                                 move_assignable_trait>         \
       : public __assignment<__traits<_Types...>> {                             \
     using __base_type = __assignment<__traits<_Types...>>;                     \
@@ -1069,32 +1069,32 @@ class _LIBCPP_TEMPLATE_VIS __move_assignment;
     move_assignment                                                            \
   }
 
-_LIBCPP_VARIANT_MOVE_ASSIGNMENT(
+_LIBCUDACXX_VARIANT_MOVE_ASSIGNMENT(
     _Trait::_TriviallyAvailable,
     __move_assignment& operator=(__move_assignment&& __that) = default;);
 
-_LIBCPP_VARIANT_MOVE_ASSIGNMENT(
+_LIBCUDACXX_VARIANT_MOVE_ASSIGNMENT(
     _Trait::_Available,
     __move_assignment& operator=(__move_assignment&& __that) noexcept(
         __all<(is_nothrow_move_constructible_v<_Types> &&
                is_nothrow_move_assignable_v<_Types>)...>::value) {
-      this->__generic_assign(_VSTD::move(__that));
+      this->__generic_assign(_CUDA_VSTD::move(__that));
       return *this;
     });
 
-_LIBCPP_VARIANT_MOVE_ASSIGNMENT(
+_LIBCUDACXX_VARIANT_MOVE_ASSIGNMENT(
     _Trait::_Unavailable,
     __move_assignment& operator=(__move_assignment&&) = delete;);
 
-#undef _LIBCPP_VARIANT_MOVE_ASSIGNMENT
+#undef _LIBCUDACXX_VARIANT_MOVE_ASSIGNMENT
 
 template <class _Traits, _Trait = _Traits::__copy_assignable_trait>
-class _LIBCPP_TEMPLATE_VIS __copy_assignment;
+class _LIBCUDACXX_TEMPLATE_VIS __copy_assignment;
 
-#define _LIBCPP_VARIANT_COPY_ASSIGNMENT(copy_assignable_trait,                 \
+#define _LIBCUDACXX_VARIANT_COPY_ASSIGNMENT(copy_assignable_trait,                 \
                                         copy_assignment)                       \
   template <class... _Types>                                                   \
-  class _LIBCPP_TEMPLATE_VIS __copy_assignment<__traits<_Types...>,           \
+  class _LIBCUDACXX_TEMPLATE_VIS __copy_assignment<__traits<_Types...>,           \
                                                 copy_assignable_trait>         \
       : public __move_assignment<__traits<_Types...>> {                        \
     using __base_type = __move_assignment<__traits<_Types...>>;                \
@@ -1110,25 +1110,25 @@ class _LIBCPP_TEMPLATE_VIS __copy_assignment;
     __copy_assignment& operator=(__copy_assignment&&) = default;               \
   }
 
-_LIBCPP_VARIANT_COPY_ASSIGNMENT(
+_LIBCUDACXX_VARIANT_COPY_ASSIGNMENT(
     _Trait::_TriviallyAvailable,
     __copy_assignment& operator=(const __copy_assignment& __that) = default;);
 
-_LIBCPP_VARIANT_COPY_ASSIGNMENT(
+_LIBCUDACXX_VARIANT_COPY_ASSIGNMENT(
     _Trait::_Available,
     __copy_assignment& operator=(const __copy_assignment& __that) {
       this->__generic_assign(__that);
       return *this;
     });
 
-_LIBCPP_VARIANT_COPY_ASSIGNMENT(
+_LIBCUDACXX_VARIANT_COPY_ASSIGNMENT(
     _Trait::_Unavailable,
     __copy_assignment& operator=(const __copy_assignment&) = delete;);
 
-#undef _LIBCPP_VARIANT_COPY_ASSIGNMENT
+#undef _LIBCUDACXX_VARIANT_COPY_ASSIGNMENT
 
 template <class... _Types>
-class _LIBCPP_TEMPLATE_VIS __impl
+class _LIBCUDACXX_TEMPLATE_VIS __impl
     : public __copy_assignment<__traits<_Types...>> {
   using __base_type = __copy_assignment<__traits<_Types...>>;
 
@@ -1140,13 +1140,13 @@ public:
   __impl& operator=(__impl&&) = default;
 
   template <size_t _Ip, class _Arg>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   void __assign(_Arg&& __arg) {
     this->__assign_alt(__access::__base::__get_alt<_Ip>(*this),
-                       _VSTD::forward<_Arg>(__arg));
+                       _CUDA_VSTD::forward<_Arg>(__arg));
   }
 
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   void __swap(__impl& __that)  {
     if (this->valueless_by_exception() && __that.valueless_by_exception()) {
       // do nothing.
@@ -1154,30 +1154,30 @@ public:
       __visitation::__base::__visit_alt_at(
           this->index(),
           [](auto& __this_alt, auto& __that_alt) {
-            using _VSTD::swap;
+            using _CUDA_VSTD::swap;
             swap(__this_alt.__value, __that_alt.__value);
           },
           *this,
           __that);
     } else {
       __impl* __lhs = this;
-      __impl* __rhs = _VSTD::addressof(__that);
+      __impl* __rhs = _CUDA_VSTD::addressof(__that);
       if (__lhs->__move_nothrow() && !__rhs->__move_nothrow()) {
-        _VSTD::swap(__lhs, __rhs);
+        _CUDA_VSTD::swap(__lhs, __rhs);
       }
-      __impl __tmp(_VSTD::move(*__rhs));
-#ifndef _LIBCPP_NO_EXCEPTIONS
+      __impl __tmp(_CUDA_VSTD::move(*__rhs));
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
       if constexpr (__all<is_nothrow_move_constructible_v<_Types>...>::value) {
-        this->__generic_construct(*__rhs, _VSTD::move(*__lhs));
+        this->__generic_construct(*__rhs, _CUDA_VSTD::move(*__lhs));
       } else {
         // EXTENSION: When the move construction of `__lhs` into `__rhs` throws
         // and `__tmp` is nothrow move constructible then we move `__tmp` back
         // into `__rhs` and provide the strong exception safety guarantee.
         try {
-          this->__generic_construct(*__rhs, _VSTD::move(*__lhs));
+          this->__generic_construct(*__rhs, _CUDA_VSTD::move(*__lhs));
         } catch (...) {
           if (__tmp.__move_nothrow()) {
-            this->__generic_construct(*__rhs, _VSTD::move(__tmp));
+            this->__generic_construct(*__rhs, _CUDA_VSTD::move(__tmp));
           }
           throw;
         }
@@ -1185,14 +1185,14 @@ public:
 #else
       // this isn't consolidated with the `if constexpr` branch above due to
       // `throw` being ill-formed with exceptions disabled even when discarded.
-      this->__generic_construct(*__rhs, _VSTD::move(*__lhs));
+      this->__generic_construct(*__rhs, _CUDA_VSTD::move(*__lhs));
 #endif
-      this->__generic_construct(*__lhs, _VSTD::move(__tmp));
+      this->__generic_construct(*__lhs, _CUDA_VSTD::move(__tmp));
     }
   }
 
 private:
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   bool __move_nothrow() const {
     constexpr bool __results[] = {is_nothrow_move_constructible_v<_Types>...};
     return this->valueless_by_exception() || __results[this->index()];
@@ -1208,13 +1208,13 @@ struct __narrowing_check {
   template <class _Dest>
   static auto __test_impl(_Dest (&&)[1]) -> __type_identity<_Dest>;
   template <class _Dest, class _Source>
-  using _Apply _LIBCPP_NODEBUG = decltype(__test_impl<_Dest>({declval<_Source>()}));
+  using _Apply _LIBCUDACXX_NODEBUG = decltype(__test_impl<_Dest>({declval<_Source>()}));
 };
 
 template <class _Dest, class _Source>
-using __check_for_narrowing _LIBCPP_NODEBUG =
+using __check_for_narrowing _LIBCUDACXX_NODEBUG =
   typename _If<
-#ifdef _LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT
+#ifdef _LIBCUDACXX_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT
     false &&
 #endif
     is_arithmetic<_Dest>::value,
@@ -1256,11 +1256,11 @@ struct __make_overloads_imp;
 template <size_t ..._Idx>
 struct __make_overloads_imp<__tuple_indices<_Idx...> > {
   template <class ..._Types>
-  using _Apply _LIBCPP_NODEBUG = __all_overloads<__overload<_Types, _Idx>...>;
+  using _Apply _LIBCUDACXX_NODEBUG = __all_overloads<__overload<_Types, _Idx>...>;
 };
 
 template <class ..._Types>
-using _MakeOverloads _LIBCPP_NODEBUG = typename __make_overloads_imp<
+using _MakeOverloads _LIBCUDACXX_NODEBUG = typename __make_overloads_imp<
     __make_indices_imp<sizeof...(_Types), 0> >::template _Apply<_Types...>;
 
 template <class _Tp, class... _Types>
@@ -1270,7 +1270,7 @@ using __best_match_t =
 } // namespace __variant_detail
 
 template <class... _Types>
-class _LIBCPP_TEMPLATE_VIS variant
+class _LIBCUDACXX_TEMPLATE_VIS variant
     : private __sfinae_ctor_base<
           __all<is_copy_constructible_v<_Types>...>::value,
           __all<is_move_constructible_v<_Types>...>::value>,
@@ -1298,7 +1298,7 @@ public:
             enable_if_t<__dependent_type<is_default_constructible<__first_type>,
                                          _Dummy>::value,
                         int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   constexpr variant() noexcept(is_nothrow_default_constructible_v<__first_type>)
       : __impl(in_place_index<0>) {}
 
@@ -1314,20 +1314,20 @@ public:
       size_t _Ip =
           __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
       enable_if_t<is_constructible_v<_Tp, _Arg>, int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   constexpr variant(_Arg&& __arg) noexcept(
       is_nothrow_constructible_v<_Tp, _Arg>)
-      : __impl(in_place_index<_Ip>, _VSTD::forward<_Arg>(__arg)) {}
+      : __impl(in_place_index<_Ip>, _CUDA_VSTD::forward<_Arg>(__arg)) {}
 
   template <size_t _Ip, class... _Args,
             class = enable_if_t<(_Ip < sizeof...(_Types)), int>,
             class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
             enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   explicit constexpr variant(
       in_place_index_t<_Ip>,
       _Args&&... __args) noexcept(is_nothrow_constructible_v<_Tp, _Args...>)
-      : __impl(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...) {}
+      : __impl(in_place_index<_Ip>, _CUDA_VSTD::forward<_Args>(__args)...) {}
 
   template <
       size_t _Ip,
@@ -1337,13 +1337,13 @@ public:
       class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
       enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
                   int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   explicit constexpr variant(
       in_place_index_t<_Ip>,
       initializer_list<_Up> __il,
       _Args&&... __args) noexcept(
       is_nothrow_constructible_v<_Tp, initializer_list<_Up>&, _Args...>)
-      : __impl(in_place_index<_Ip>, __il, _VSTD::forward<_Args>(__args)...) {}
+      : __impl(in_place_index<_Ip>, __il, _CUDA_VSTD::forward<_Args>(__args)...) {}
 
   template <
       class _Tp,
@@ -1351,10 +1351,10 @@ public:
       size_t _Ip =
           __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
       enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   explicit constexpr variant(in_place_type_t<_Tp>, _Args&&... __args) noexcept(
       is_nothrow_constructible_v<_Tp, _Args...>)
-      : __impl(in_place_index<_Ip>, _VSTD::forward<_Args>(__args)...) {}
+      : __impl(in_place_index<_Ip>, _CUDA_VSTD::forward<_Args>(__args)...) {}
 
   template <
       class _Tp,
@@ -1364,13 +1364,13 @@ public:
           __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
       enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
                   int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   explicit constexpr variant(
       in_place_type_t<_Tp>,
       initializer_list<_Up> __il,
       _Args&&... __args) noexcept(
       is_nothrow_constructible_v<_Tp, initializer_list< _Up>&, _Args...>)
-      : __impl(in_place_index<_Ip>, __il, _VSTD::forward<_Args>(__args)...) {}
+      : __impl(in_place_index<_Ip>, __il, _CUDA_VSTD::forward<_Args>(__args)...) {}
 
   ~variant() = default;
 
@@ -1385,11 +1385,11 @@ public:
           __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
       enable_if_t<is_assignable_v<_Tp&, _Arg> && is_constructible_v<_Tp, _Arg>,
                   int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   variant& operator=(_Arg&& __arg) noexcept(
       is_nothrow_assignable_v<_Tp&, _Arg> &&
       is_nothrow_constructible_v<_Tp, _Arg>) {
-    __impl.template __assign<_Ip>(_VSTD::forward<_Arg>(__arg));
+    __impl.template __assign<_Ip>(_CUDA_VSTD::forward<_Arg>(__arg));
     return *this;
   }
 
@@ -1399,9 +1399,9 @@ public:
       enable_if_t<(_Ip < sizeof...(_Types)), int> = 0,
       class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
       enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   _Tp& emplace(_Args&&... __args) {
-    return __impl.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
+    return __impl.template __emplace<_Ip>(_CUDA_VSTD::forward<_Args>(__args)...);
   }
 
   template <
@@ -1412,9 +1412,9 @@ public:
       class _Tp = variant_alternative_t<_Ip, variant<_Types...>>,
       enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
                   int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   _Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) {
-    return __impl.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
+    return __impl.template __emplace<_Ip>(__il, _CUDA_VSTD::forward<_Args>(__args)...);
   }
 
   template <
@@ -1423,9 +1423,9 @@ public:
       size_t _Ip =
           __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
       enable_if_t<is_constructible_v<_Tp, _Args...>, int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   _Tp& emplace(_Args&&... __args) {
-    return __impl.template __emplace<_Ip>(_VSTD::forward<_Args>(__args)...);
+    return __impl.template __emplace<_Ip>(_CUDA_VSTD::forward<_Args>(__args)...);
   }
 
   template <
@@ -1436,17 +1436,17 @@ public:
           __find_detail::__find_unambiguous_index_sfinae<_Tp, _Types...>::value,
       enable_if_t<is_constructible_v<_Tp, initializer_list<_Up>&, _Args...>,
                   int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   _Tp& emplace(initializer_list<_Up> __il, _Args&&... __args) {
-    return __impl.template __emplace<_Ip>(__il, _VSTD::forward<_Args>(__args)...);
+    return __impl.template __emplace<_Ip>(__il, _CUDA_VSTD::forward<_Args>(__args)...);
   }
 
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   constexpr bool valueless_by_exception() const noexcept {
     return __impl.valueless_by_exception();
   }
 
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   constexpr size_t index() const noexcept { return __impl.index(); }
 
   template <
@@ -1456,7 +1456,7 @@ public:
               __dependent_type<is_move_constructible<_Types>, _Dummy>::value &&
               __dependent_type<is_swappable<_Types>, _Dummy>::value)...>::value,
           int> = 0>
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   void swap(variant& __that) noexcept(
       __all<(is_nothrow_move_constructible_v<_Types> &&
              is_nothrow_swappable_v<_Types>)...>::value) {
@@ -1471,31 +1471,31 @@ private:
 };
 
 template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool __holds_alternative(const variant<_Types...>& __v) noexcept {
   return __v.index() == _Ip;
 }
 
 template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool holds_alternative(const variant<_Types...>& __v) noexcept {
   return __holds_alternative<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
 }
 
 template <size_t _Ip, class _Vp>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 constexpr auto&& __generic_get(_Vp&& __v) {
   using __variant_detail::__access::__variant;
   if (!__holds_alternative<_Ip>(__v)) {
     __throw_bad_variant_access();
   }
-  return __variant::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v)).__value;
+  return __variant::__get_alt<_Ip>(_CUDA_VSTD::forward<_Vp>(__v)).__value;
 }
 
 template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 constexpr variant_alternative_t<_Ip, variant<_Types...>>& get(
     variant<_Types...>& __v) {
   static_assert(_Ip < sizeof...(_Types));
@@ -1504,18 +1504,18 @@ constexpr variant_alternative_t<_Ip, variant<_Types...>>& get(
 }
 
 template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 constexpr variant_alternative_t<_Ip, variant<_Types...>>&& get(
     variant<_Types...>&& __v) {
   static_assert(_Ip < sizeof...(_Types));
   static_assert(!is_void_v<variant_alternative_t<_Ip, variant<_Types...>>>);
-  return __generic_get<_Ip>(_VSTD::move(__v));
+  return __generic_get<_Ip>(_CUDA_VSTD::move(__v));
 }
 
 template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 constexpr const variant_alternative_t<_Ip, variant<_Types...>>& get(
     const variant<_Types...>& __v) {
   static_assert(_Ip < sizeof...(_Types));
@@ -1524,60 +1524,60 @@ constexpr const variant_alternative_t<_Ip, variant<_Types...>>& get(
 }
 
 template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 constexpr const variant_alternative_t<_Ip, variant<_Types...>>&& get(
     const variant<_Types...>&& __v) {
   static_assert(_Ip < sizeof...(_Types));
   static_assert(!is_void_v<variant_alternative_t<_Ip, variant<_Types...>>>);
-  return __generic_get<_Ip>(_VSTD::move(__v));
+  return __generic_get<_Ip>(_CUDA_VSTD::move(__v));
 }
 
 template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 constexpr _Tp& get(variant<_Types...>& __v) {
   static_assert(!is_void_v<_Tp>);
-  return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
+  return _CUDA_VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
 }
 
 template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 constexpr _Tp&& get(variant<_Types...>&& __v) {
   static_assert(!is_void_v<_Tp>);
-  return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(
-      _VSTD::move(__v));
+  return _CUDA_VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(
+      _CUDA_VSTD::move(__v));
 }
 
 template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 constexpr const _Tp& get(const variant<_Types...>& __v) {
   static_assert(!is_void_v<_Tp>);
-  return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
+  return _CUDA_VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
 }
 
 template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
-_LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS
 constexpr const _Tp&& get(const variant<_Types...>&& __v) {
   static_assert(!is_void_v<_Tp>);
-  return _VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(
-      _VSTD::move(__v));
+  return _CUDA_VSTD::get<__find_exactly_one_t<_Tp, _Types...>::value>(
+      _CUDA_VSTD::move(__v));
 }
 
 template <size_t _Ip, class _Vp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr auto* __generic_get_if(_Vp* __v) noexcept {
   using __variant_detail::__access::__variant;
   return __v && __holds_alternative<_Ip>(*__v)
-             ? _VSTD::addressof(__variant::__get_alt<_Ip>(*__v).__value)
+             ? _CUDA_VSTD::addressof(__variant::__get_alt<_Ip>(*__v).__value)
              : nullptr;
 }
 
 template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr add_pointer_t<variant_alternative_t<_Ip, variant<_Types...>>>
 get_if(variant<_Types...>* __v) noexcept {
   static_assert(_Ip < sizeof...(_Types));
@@ -1586,7 +1586,7 @@ get_if(variant<_Types...>* __v) noexcept {
 }
 
 template <size_t _Ip, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr add_pointer_t<const variant_alternative_t<_Ip, variant<_Types...>>>
 get_if(const variant<_Types...>* __v) noexcept {
   static_assert(_Ip < sizeof...(_Types));
@@ -1595,33 +1595,33 @@ get_if(const variant<_Types...>* __v) noexcept {
 }
 
 template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr add_pointer_t<_Tp>
 get_if(variant<_Types...>* __v) noexcept {
   static_assert(!is_void_v<_Tp>);
-  return _VSTD::get_if<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
+  return _CUDA_VSTD::get_if<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
 }
 
 template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr add_pointer_t<const _Tp>
 get_if(const variant<_Types...>* __v) noexcept {
   static_assert(!is_void_v<_Tp>);
-  return _VSTD::get_if<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
+  return _CUDA_VSTD::get_if<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
 }
 
 template <class _Operator>
 struct __convert_to_bool {
   template <class _T1, class _T2>
-  _LIBCPP_INLINE_VISIBILITY constexpr bool operator()(_T1 && __t1, _T2&& __t2) const {
-    static_assert(is_convertible<decltype(_Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2))), bool>::value,
+  _LIBCUDACXX_INLINE_VISIBILITY constexpr bool operator()(_T1 && __t1, _T2&& __t2) const {
+    static_assert(is_convertible<decltype(_Operator{}(_CUDA_VSTD::forward<_T1>(__t1), _CUDA_VSTD::forward<_T2>(__t2))), bool>::value,
         "the relational operator does not return a type which is implicitly convertible to bool");
-    return _Operator{}(_VSTD::forward<_T1>(__t1), _VSTD::forward<_T2>(__t2));
+    return _Operator{}(_CUDA_VSTD::forward<_T1>(__t1), _CUDA_VSTD::forward<_T2>(__t2));
   }
 };
 
 template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator==(const variant<_Types...>& __lhs,
                           const variant<_Types...>& __rhs) {
   using __variant_detail::__visitation::__variant;
@@ -1631,7 +1631,7 @@ constexpr bool operator==(const variant<_Types...>& __lhs,
 }
 
 template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator!=(const variant<_Types...>& __lhs,
                           const variant<_Types...>& __rhs) {
   using __variant_detail::__visitation::__variant;
@@ -1642,7 +1642,7 @@ constexpr bool operator!=(const variant<_Types...>& __lhs,
 }
 
 template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator<(const variant<_Types...>& __lhs,
                          const variant<_Types...>& __rhs) {
   using __variant_detail::__visitation::__variant;
@@ -1654,7 +1654,7 @@ constexpr bool operator<(const variant<_Types...>& __lhs,
 }
 
 template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator>(const variant<_Types...>& __lhs,
                          const variant<_Types...>& __rhs) {
   using __variant_detail::__visitation::__variant;
@@ -1666,7 +1666,7 @@ constexpr bool operator>(const variant<_Types...>& __lhs,
 }
 
 template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator<=(const variant<_Types...>& __lhs,
                           const variant<_Types...>& __rhs) {
   using __variant_detail::__visitation::__variant;
@@ -1679,7 +1679,7 @@ constexpr bool operator<=(const variant<_Types...>& __lhs,
 }
 
 template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr bool operator>=(const variant<_Types...>& __lhs,
                           const variant<_Types...>& __rhs) {
   using __variant_detail::__visitation::__variant;
@@ -1692,11 +1692,11 @@ constexpr bool operator>=(const variant<_Types...>& __lhs,
 }
 
 template <class... _Vs>
-inline _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr void
+inline _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr void
     __throw_if_valueless(_Vs&&... __vs) {
   const bool __valueless =
-      (... || _VSTD::__as_variant(__vs).valueless_by_exception());
+      (... || _CUDA_VSTD::__as_variant(__vs).valueless_by_exception());
   if (__valueless) {
     __throw_bad_variant_access();
   }
@@ -1704,44 +1704,44 @@ inline _LIBCPP_INLINE_VISIBILITY
 
 template <
     class _Visitor, class... _Vs,
-    typename = void_t<decltype(_VSTD::__as_variant(declval<_Vs>()))...> >
-inline _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr
+    typename = void_t<decltype(_CUDA_VSTD::__as_variant(declval<_Vs>()))...> >
+inline _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr
     decltype(auto) visit(_Visitor&& __visitor, _Vs&&... __vs) {
   using __variant_detail::__visitation::__variant;
-  _VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...);
-  return __variant::__visit_value(_VSTD::forward<_Visitor>(__visitor),
-                                  _VSTD::forward<_Vs>(__vs)...);
+  _CUDA_VSTD::__throw_if_valueless(_CUDA_VSTD::forward<_Vs>(__vs)...);
+  return __variant::__visit_value(_CUDA_VSTD::forward<_Visitor>(__visitor),
+                                  _CUDA_VSTD::forward<_Vs>(__vs)...);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <
     class _Rp, class _Visitor, class... _Vs,
-    typename = void_t<decltype(_VSTD::__as_variant(declval<_Vs>()))...> >
-inline _LIBCPP_INLINE_VISIBILITY
-    _LIBCPP_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr _Rp
+    typename = void_t<decltype(_CUDA_VSTD::__as_variant(declval<_Vs>()))...> >
+inline _LIBCUDACXX_INLINE_VISIBILITY
+    _LIBCUDACXX_AVAILABILITY_THROW_BAD_VARIANT_ACCESS constexpr _Rp
     visit(_Visitor&& __visitor, _Vs&&... __vs) {
   using __variant_detail::__visitation::__variant;
-  _VSTD::__throw_if_valueless(_VSTD::forward<_Vs>(__vs)...);
-  return __variant::__visit_value<_Rp>(_VSTD::forward<_Visitor>(__visitor),
-                                       _VSTD::forward<_Vs>(__vs)...);
+  _CUDA_VSTD::__throw_if_valueless(_CUDA_VSTD::forward<_Vs>(__vs)...);
+  return __variant::__visit_value<_Rp>(_CUDA_VSTD::forward<_Visitor>(__visitor),
+                                       _CUDA_VSTD::forward<_Vs>(__vs)...);
 }
 #endif
 
 template <class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 auto swap(variant<_Types...>& __lhs, variant<_Types...>& __rhs)
   noexcept(noexcept(__lhs.swap(__rhs)))
   -> decltype(      __lhs.swap(__rhs))
   { return          __lhs.swap(__rhs); }
 
 template <class... _Types>
-struct _LIBCPP_TEMPLATE_VIS hash<
+struct _LIBCUDACXX_TEMPLATE_VIS hash<
     __enable_hash_helper<variant<_Types...>, remove_const_t<_Types>...>> {
   using argument_type = variant<_Types...>;
   using result_type = size_t;
 
-  inline _LIBCPP_INLINE_VISIBILITY
+  inline _LIBCUDACXX_INLINE_VISIBILITY
   result_type operator()(const argument_type& __v) const {
     using __variant_detail::__visitation::__variant;
     size_t __res =
@@ -1763,28 +1763,28 @@ struct _LIBCPP_TEMPLATE_VIS hash<
 // type whereas std::get will throw or returning nullptr. This makes it faster than
 // std::get.
 template <size_t _Ip, class _Vp>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr auto&& __unchecked_get(_Vp&& __v) noexcept {
   using __variant_detail::__access::__variant;
-  return __variant::__get_alt<_Ip>(_VSTD::forward<_Vp>(__v)).__value;
+  return __variant::__get_alt<_Ip>(_CUDA_VSTD::forward<_Vp>(__v)).__value;
 }
 
 template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr auto&& __unchecked_get(const variant<_Types...>& __v) noexcept {
   return __unchecked_get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
 }
 
 template <class _Tp, class... _Types>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 constexpr auto&& __unchecked_get(variant<_Types...>& __v) noexcept {
   return __unchecked_get<__find_exactly_one_t<_Tp, _Types...>::value>(__v);
 }
 
-#endif // _LIBCPP_STD_VER > 14
+#endif // _LIBCUDACXX_STD_VER > 14
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_VARIANT
+#endif // _LIBCUDACXX_VARIANT

diff  --git a/libcxx/include/vector b/libcxx/include/vector
index 252a0f051ff5..37814840d8e3 100644
--- a/libcxx/include/vector
+++ b/libcxx/include/vector
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_VECTOR
-#define _LIBCPP_VECTOR
+#ifndef _LIBCUDACXX_VECTOR
+#define _LIBCUDACXX_VECTOR
 
 /*
     vector synopsis
@@ -307,7 +307,7 @@ erase_if(vector<T, Allocator>& c, Predicate pred);    // C++20
 #include <type_traits>
 #include <version>
 
-#ifndef _LIBCPP_REMOVE_TRANSITIVE_INCLUDES
+#ifndef _LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES
 #  include <algorithm>
 #  include <typeinfo>
 #  include <utility>
@@ -326,18 +326,18 @@ erase_if(vector<T, Allocator>& c, Predicate pred);    // C++20
 #include <compare>
 #include <initializer_list>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 template <class _Tp, class _Allocator /* = allocator<_Tp> */>
-class _LIBCPP_TEMPLATE_VIS vector
+class _LIBCUDACXX_TEMPLATE_VIS vector
 {
 private:
     typedef allocator<_Tp>                                  __default_allocator_type;
@@ -354,39 +354,39 @@ public:
     typedef typename __alloc_traits::const_pointer          const_pointer;
     typedef __wrap_iter<pointer>                            iterator;
     typedef __wrap_iter<const_pointer>                      const_iterator;
-    typedef _VSTD::reverse_iterator<iterator>               reverse_iterator;
-    typedef _VSTD::reverse_iterator<const_iterator>         const_reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<iterator>               reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<const_iterator>         const_reverse_iterator;
 
     static_assert((is_same<typename allocator_type::value_type, value_type>::value),
                   "Allocator::value_type must be same type as value_type");
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
     {
-        _VSTD::__debug_db_insert_c(this);
+        _CUDA_VSTD::__debug_db_insert_c(this);
     }
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY explicit vector(const allocator_type& __a)
-#if _LIBCPP_STD_VER <= 14
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY explicit vector(const allocator_type& __a)
+#if _LIBCUDACXX_STD_VER <= 14
         _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
 #else
         _NOEXCEPT
 #endif
         : __end_cap_(nullptr, __a)
     {
-        _VSTD::__debug_db_insert_c(this);
+        _CUDA_VSTD::__debug_db_insert_c(this);
     }
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n);
-#if _LIBCPP_STD_VER > 11
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n, const allocator_type& __a);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n);
+#if _LIBCUDACXX_STD_VER > 11
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n, const allocator_type& __a);
 #endif
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(size_type __n, const value_type& __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(size_type __n, const value_type& __x);
 
     template <class = __enable_if_t<__is_allocator<_Allocator>::value> >
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     vector(size_type __n, const value_type& __x, const allocator_type& __a)
         : __end_cap_(nullptr, __a)
     {
-      _VSTD::__debug_db_insert_c(this);
+      _CUDA_VSTD::__debug_db_insert_c(this);
       if (__n > 0)
       {
           __vallocate(__n);
@@ -395,7 +395,7 @@ public:
     }
 
     template <class _InputIterator>
-        _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         vector(_InputIterator __first,
                typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
                                  is_constructible<
@@ -403,14 +403,14 @@ public:
                                     typename iterator_traits<_InputIterator>::reference>::value,
                                  _InputIterator>::type __last);
     template <class _InputIterator>
-        _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
                typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
                                  is_constructible<
                                     value_type,
                                     typename iterator_traits<_InputIterator>::reference>::value>::type* = 0);
     template <class _ForwardIterator>
-        _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         vector(_ForwardIterator __first,
                typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
                                  is_constructible<
@@ -418,14 +418,14 @@ public:
                                     typename iterator_traits<_ForwardIterator>::reference>::value,
                                  _ForwardIterator>::type __last);
     template <class _ForwardIterator>
-        _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
                typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
                                  is_constructible<
                                     value_type,
                                     typename iterator_traits<_ForwardIterator>::reference>::value>::type* = 0);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     ~vector()
     {
       __annotate_delete();
@@ -438,39 +438,39 @@ public:
       }
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(const vector& __x);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(const vector& __x, const __type_identity_t<allocator_type>& __a);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(const vector& __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(const vector& __x, const __type_identity_t<allocator_type>& __a);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     vector& operator=(const vector& __x);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     vector(initializer_list<value_type> __il);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     vector(initializer_list<value_type> __il, const allocator_type& __a);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     vector& operator=(initializer_list<value_type> __il)
         {assign(__il.begin(), __il.end()); return *this;}
-#endif // !_LIBCPP_CXX03_LANG
+#endif // !_LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     vector(vector&& __x)
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
         noexcept;
 #else
         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
 #endif
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     vector(vector&& __x, const __type_identity_t<allocator_type>& __a);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     vector& operator=(vector&& __x)
         _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
 
     template <class _InputIterator>
-        _LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
             is_constructible<
                  value_type,
                  typename iterator_traits<_InputIterator>::reference>::value,
@@ -478,7 +478,7 @@ public:
         >::type
         assign(_InputIterator __first, _InputIterator __last);
     template <class _ForwardIterator>
-        _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         typename enable_if
         <
             __is_cpp17_forward_iterator<_ForwardIterator>::value &&
@@ -489,120 +489,120 @@ public:
         >::type
         assign(_ForwardIterator __first, _ForwardIterator __last);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void assign(size_type __n, const_reference __u);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void assign(size_type __n, const_reference __u);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void assign(initializer_list<value_type> __il)
         {assign(__il.begin(), __il.end());}
 #endif
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     allocator_type get_allocator() const _NOEXCEPT
         {return this->__alloc();}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator               begin() _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator         begin()   const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator               end() _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_iterator         end()     const _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY iterator               begin() _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY const_iterator         begin()   const _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY iterator               end() _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY const_iterator         end()     const _NOEXCEPT;
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     reverse_iterator       rbegin() _NOEXCEPT
         {return       reverse_iterator(end());}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rbegin()  const _NOEXCEPT
         {return const_reverse_iterator(end());}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     reverse_iterator       rend() _NOEXCEPT
         {return       reverse_iterator(begin());}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator rend()    const _NOEXCEPT
         {return const_reverse_iterator(begin());}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator         cbegin()  const _NOEXCEPT
         {return begin();}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator         cend()    const _NOEXCEPT
         {return end();}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crbegin() const _NOEXCEPT
         {return rbegin();}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     const_reverse_iterator crend()   const _NOEXCEPT
         {return rend();}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     size_type size() const _NOEXCEPT
         {return static_cast<size_type>(this->__end_ - this->__begin_);}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     size_type capacity() const _NOEXCEPT
         {return static_cast<size_type>(__end_cap() - this->__begin_);}
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     bool empty() const _NOEXCEPT
         {return this->__begin_ == this->__end_;}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type max_size() const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 size_type max_size() const _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference       operator[](size_type __n) _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference operator[](size_type __n) const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 reference       at(size_type __n);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference at(size_type __n) const;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY reference       operator[](size_type __n) _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY const_reference operator[](size_type __n) const _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 reference       at(size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 const_reference at(size_type __n) const;
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference       front() _NOEXCEPT
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY reference       front() _NOEXCEPT
     {
-        _LIBCPP_ASSERT(!empty(), "front() called on an empty vector");
+        _LIBCUDACXX_ASSERT(!empty(), "front() called on an empty vector");
         return *this->__begin_;
     }
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference front() const _NOEXCEPT
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY const_reference front() const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(!empty(), "front() called on an empty vector");
+        _LIBCUDACXX_ASSERT(!empty(), "front() called on an empty vector");
         return *this->__begin_;
     }
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY reference       back() _NOEXCEPT
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY reference       back() _NOEXCEPT
     {
-        _LIBCPP_ASSERT(!empty(), "back() called on an empty vector");
+        _LIBCUDACXX_ASSERT(!empty(), "back() called on an empty vector");
         return *(this->__end_ - 1);
     }
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY const_reference back()  const _NOEXCEPT
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY const_reference back()  const _NOEXCEPT
     {
-        _LIBCPP_ASSERT(!empty(), "back() called on an empty vector");
+        _LIBCUDACXX_ASSERT(!empty(), "back() called on an empty vector");
         return *(this->__end_ - 1);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     value_type*       data() _NOEXCEPT
-        {return _VSTD::__to_address(this->__begin_);}
+        {return _CUDA_VSTD::__to_address(this->__begin_);}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     const value_type* data() const _NOEXCEPT
-        {return _VSTD::__to_address(this->__begin_);}
+        {return _CUDA_VSTD::__to_address(this->__begin_);}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void push_back(const_reference __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY void push_back(const_reference __x);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY void push_back(value_type&& __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY void push_back(value_type&& __x);
 
     template <class... _Args>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
-#if _LIBCPP_STD_VER > 14
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
+#if _LIBCUDACXX_STD_VER > 14
         reference emplace_back(_Args&&... __args);
 #else
         void      emplace_back(_Args&&... __args);
 #endif
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void pop_back();
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, const_reference __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, const_reference __x);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, value_type&& __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, value_type&& __x);
     template <class... _Args>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator emplace(const_iterator __position, _Args&&... __args);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator emplace(const_iterator __position, _Args&&... __args);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, size_type __n, const_reference __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, size_type __n, const_reference __x);
     template <class _InputIterator>
-        _LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
             is_constructible<
                  value_type,
                  typename iterator_traits<_InputIterator>::reference>::value,
@@ -610,7 +610,7 @@ public:
         >::type
         insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
     template <class _ForwardIterator>
-        _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         typename enable_if
         <
             __is_cpp17_forward_iterator<_ForwardIterator>::value &&
@@ -621,16 +621,16 @@ public:
         >::type
         insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     iterator insert(const_iterator __position, initializer_list<value_type> __il)
         {return insert(__position, __il.begin(), __il.end());}
 #endif
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY iterator erase(const_iterator __position);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __first, const_iterator __last);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY iterator erase(const_iterator __position);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __first, const_iterator __last);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void clear() _NOEXCEPT
     {
         size_type __old_size = size();
@@ -639,27 +639,27 @@ public:
         std::__debug_db_invalidate_all(this);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void resize(size_type __sz);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void resize(size_type __sz, const_reference __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void resize(size_type __sz);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void resize(size_type __sz, const_reference __x);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(vector&)
-#if _LIBCPP_STD_VER >= 14
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void swap(vector&)
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT;
 #else
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                     __is_nothrow_swappable<allocator_type>::value);
 #endif
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
     bool __dereferenceable(const const_iterator* __i) const;
     bool __decrementable(const const_iterator* __i) const;
     bool __addable(const const_iterator* __i, ptr
diff _t __n) const;
     bool __subscriptable(const const_iterator* __i, ptr
diff _t __n) const;
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 private:
     pointer __begin_ = nullptr;
@@ -667,7 +667,7 @@ private:
     __compressed_pair<pointer, allocator_type> __end_cap_ =
         __compressed_pair<pointer, allocator_type>(nullptr, __default_init_tag());
 
-    _LIBCPP_INLINE_VISIBILITY void __invalidate_iterators_past(pointer __new_last);
+    _LIBCUDACXX_INLINE_VISIBILITY void __invalidate_iterators_past(pointer __new_last);
 
     //  Allocate space for __n objects
     //  throws length_error if __n > max_size()
@@ -676,7 +676,7 @@ private:
     //  Precondition:  __n > 0
     //  Postcondition:  capacity() >= __n
     //  Postcondition:  size() == 0
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_HIDE_FROM_ABI void __vallocate(size_type __n) {
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_HIDE_FROM_ABI void __vallocate(size_type __n) {
         if (__n > max_size())
             __throw_length_error();
         auto __allocation = std::__allocate_at_least(__alloc(), __n);
@@ -686,36 +686,36 @@ private:
         __annotate_new(0);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __vdeallocate() _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY size_type __recommend(size_type __new_size) const;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __vdeallocate() _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY size_type __recommend(size_type __new_size) const;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void __construct_at_end(size_type __n, const_reference __x);
     template <class _ForwardIterator>
-        _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
         typename enable_if
         <
             __is_cpp17_forward_iterator<_ForwardIterator>::value,
             void
         >::type
         __construct_at_end(_ForwardIterator __first, _ForwardIterator __last, size_type __n);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __append(size_type __n);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __append(size_type __n, const_reference __x);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __append(size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __append(size_type __n, const_reference __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     iterator       __make_iter(pointer __p) _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     const_iterator __make_iter(const_pointer __p) const _NOEXCEPT;
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 pointer __swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_range(pointer __from_s, pointer __from_e, pointer __to);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, true_type)
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 pointer __swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __move_range(pointer __from_s, pointer __from_e, pointer __to);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, true_type)
         _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, false_type)
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, false_type)
         _NOEXCEPT_(__alloc_traits::is_always_equal::value);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void __destruct_at_end(pointer __new_last) _NOEXCEPT
     {
-        if (!__libcpp_is_constant_evaluated())
+        if (!__LIBCUDACXX_is_constant_evaluated())
             __invalidate_iterators_past(__new_last);
         size_type __old_size = size();
         __base_destruct_at_end(__new_last);
@@ -723,52 +723,52 @@ private:
     }
 
     template <class _Up>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     inline void __push_back_slow_path(_Up&& __x);
 
     template <class... _Args>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     inline void __emplace_back_slow_path(_Args&&... __args);
 
     // The following functions are no-ops outside of AddressSanitizer mode.
     // We call annotatations only for the default Allocator because other allocators
     // may not meet the AddressSanitizer alignment constraints.
     // See the documentation for __sanitizer_annotate_contiguous_container for more details.
-#ifndef _LIBCPP_HAS_NO_ASAN
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_HAS_NO_ASAN
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __annotate_contiguous_container(const void *__beg, const void *__end,
                                          const void *__old_mid,
                                          const void *__new_mid) const
     {
 
-      if (!__libcpp_is_constant_evaluated() && __beg && is_same<allocator_type, __default_allocator_type>::value)
+      if (!__LIBCUDACXX_is_constant_evaluated() && __beg && is_same<allocator_type, __default_allocator_type>::value)
         __sanitizer_annotate_contiguous_container(__beg, __end, __old_mid, __new_mid);
     }
 #else
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void __annotate_contiguous_container(const void*, const void*, const void*,
                                          const void*) const _NOEXCEPT {}
 #endif
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void __annotate_new(size_type __current_size) const _NOEXCEPT {
       __annotate_contiguous_container(data(), data() + capacity(),
                                       data() + capacity(), data() + __current_size);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void __annotate_delete() const _NOEXCEPT {
       __annotate_contiguous_container(data(), data() + capacity(),
                                       data() + size(), data() + capacity());
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void __annotate_increase(size_type __n) const _NOEXCEPT
     {
       __annotate_contiguous_container(data(), data() + capacity(),
                                       data() + size(), data() + size() + __n);
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
     void __annotate_shrink(size_type __old_size) const _NOEXCEPT
     {
       __annotate_contiguous_container(data(), data() + capacity(),
@@ -776,16 +776,16 @@ private:
     }
 
   struct _ConstructTransaction {
-    _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     explicit _ConstructTransaction(vector &__v, size_type __n)
       : __v_(__v), __pos_(__v.__end_), __new_end_(__v.__end_ + __n) {
-#ifndef _LIBCPP_HAS_NO_ASAN
+#ifndef _LIBCUDACXX_HAS_NO_ASAN
       __v_.__annotate_increase(__n);
 #endif
     }
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 ~_ConstructTransaction() {
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 ~_ConstructTransaction() {
       __v_.__end_ = __pos_;
-#ifndef _LIBCPP_HAS_NO_ASAN
+#ifndef _LIBCUDACXX_HAS_NO_ASAN
       if (__pos_ != __new_end_) {
         __v_.__annotate_shrink(__new_end_ - __v_.__begin_);
       }
@@ -802,44 +802,44 @@ private:
   };
 
   template <class ..._Args>
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   void __construct_one_at_end(_Args&& ...__args) {
     _ConstructTransaction __tx(*this, 1);
-    __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__tx.__pos_),
-        _VSTD::forward<_Args>(__args)...);
+    __alloc_traits::construct(this->__alloc(), _CUDA_VSTD::__to_address(__tx.__pos_),
+        _CUDA_VSTD::forward<_Args>(__args)...);
     ++__tx.__pos_;
   }
 
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   allocator_type& __alloc() _NOEXCEPT
       {return this->__end_cap_.second();}
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   const allocator_type& __alloc() const _NOEXCEPT
       {return this->__end_cap_.second();}
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   pointer& __end_cap() _NOEXCEPT
       {return this->__end_cap_.first();}
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   const pointer& __end_cap() const _NOEXCEPT
       {return this->__end_cap_.first();}
 
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   void __clear() _NOEXCEPT {__base_destruct_at_end(this->__begin_);}
 
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   void __base_destruct_at_end(pointer __new_last) _NOEXCEPT {
     pointer __soon_to_be_end = this->__end_;
     while (__new_last != __soon_to_be_end)
-        __alloc_traits::destroy(__alloc(), _VSTD::__to_address(--__soon_to_be_end));
+        __alloc_traits::destroy(__alloc(), _CUDA_VSTD::__to_address(--__soon_to_be_end));
     this->__end_ = __new_last;
   }
 
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   void __copy_assign_alloc(const vector& __c)
       {__copy_assign_alloc(__c, integral_constant<bool,
                     __alloc_traits::propagate_on_container_copy_assignment::value>());}
 
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   void __move_assign_alloc(vector& __c)
       _NOEXCEPT_(
           !__alloc_traits::propagate_on_container_move_assignment::value ||
@@ -847,17 +847,17 @@ private:
       {__move_assign_alloc(__c, integral_constant<bool,
                     __alloc_traits::propagate_on_container_move_assignment::value>());}
 
-  _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_NORETURN _LIBCUDACXX_HIDE_FROM_ABI
   void __throw_length_error() const {
-      _VSTD::__throw_length_error("vector");
+      _CUDA_VSTD::__throw_length_error("vector");
   }
 
-  _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
+  _LIBCUDACXX_NORETURN _LIBCUDACXX_HIDE_FROM_ABI
   void __throw_out_of_range() const {
-      _VSTD::__throw_out_of_range("vector");
+      _CUDA_VSTD::__throw_out_of_range("vector");
   }
 
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   void __copy_assign_alloc(const vector& __c, true_type)
   {
     if (__alloc() != __c.__alloc())
@@ -869,24 +869,24 @@ private:
     __alloc() = __c.__alloc();
   }
 
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   void __copy_assign_alloc(const vector&, false_type)
   {}
 
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   void __move_assign_alloc(vector& __c, true_type)
       _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
   {
-    __alloc() = _VSTD::move(__c.__alloc());
+    __alloc() = _CUDA_VSTD::move(__c.__alloc());
   }
 
-  _LIBCPP_CONSTEXPR_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY
   void __move_assign_alloc(vector&, false_type)
       _NOEXCEPT
   {}
 };
 
-#if _LIBCPP_STD_VER >= 17
+#if _LIBCUDACXX_STD_VER >= 17
 template<class _InputIterator,
          class _Alloc = allocator<__iter_value_type<_InputIterator>>,
          class = enable_if_t<__is_cpp17_input_iterator<_InputIterator>::value>,
@@ -905,7 +905,7 @@ vector(_InputIterator, _InputIterator, _Alloc)
 #endif
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v)
 {
@@ -914,16 +914,16 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
     __v.__begin_   = std::__uninitialized_allocator_move_if_noexcept(
                        __alloc(), _RevIter(__end_), _RevIter(__begin_), _RevIter(__v.__begin_))
                        .base();
-    _VSTD::swap(this->__begin_, __v.__begin_);
-    _VSTD::swap(this->__end_, __v.__end_);
-    _VSTD::swap(this->__end_cap(), __v.__end_cap());
+    _CUDA_VSTD::swap(this->__begin_, __v.__begin_);
+    _CUDA_VSTD::swap(this->__end_, __v.__end_);
+    _CUDA_VSTD::swap(this->__end_cap(), __v.__end_cap());
     __v.__first_ = __v.__begin_;
     __annotate_new(size());
     std::__debug_db_invalidate_all(this);
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<_Tp, _Allocator>::pointer
 vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, allocator_type&>& __v, pointer __p)
 {
@@ -934,9 +934,9 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
                        __alloc(), _RevIter(__p), _RevIter(__begin_), _RevIter(__v.__begin_))
                        .base();
     __v.__end_ = std::__uninitialized_allocator_move_if_noexcept(__alloc(), __p, __end_, __v.__end_);
-    _VSTD::swap(this->__begin_, __v.__begin_);
-    _VSTD::swap(this->__end_, __v.__end_);
-    _VSTD::swap(this->__end_cap(), __v.__end_cap());
+    _CUDA_VSTD::swap(this->__begin_, __v.__begin_);
+    _CUDA_VSTD::swap(this->__end_, __v.__end_);
+    _CUDA_VSTD::swap(this->__end_cap(), __v.__end_cap());
     __v.__first_ = __v.__begin_;
     __annotate_new(size());
     std::__debug_db_invalidate_all(this);
@@ -944,7 +944,7 @@ vector<_Tp, _Allocator>::__swap_out_circular_buffer(__split_buffer<value_type, a
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::__vdeallocate() _NOEXCEPT
 {
@@ -957,18 +957,18 @@ vector<_Tp, _Allocator>::__vdeallocate() _NOEXCEPT
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<_Tp, _Allocator>::size_type
 vector<_Tp, _Allocator>::max_size() const _NOEXCEPT
 {
-    return _VSTD::min<size_type>(__alloc_traits::max_size(this->__alloc()),
+    return _CUDA_VSTD::min<size_type>(__alloc_traits::max_size(this->__alloc()),
                                  numeric_limits<
diff erence_type>::max());
 }
 
 //  Precondition:  __new_size > capacity()
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename vector<_Tp, _Allocator>::size_type
 vector<_Tp, _Allocator>::__recommend(size_type __new_size) const
 {
@@ -978,7 +978,7 @@ vector<_Tp, _Allocator>::__recommend(size_type __new_size) const
     const size_type __cap = capacity();
     if (__cap >= __ms / 2)
         return __ms;
-    return _VSTD::max<size_type>(2 * __cap, __new_size);
+    return _CUDA_VSTD::max<size_type>(2 * __cap, __new_size);
 }
 
 //  Default constructs __n objects starting at __end_
@@ -987,14 +987,14 @@ vector<_Tp, _Allocator>::__recommend(size_type __new_size) const
 //  Precondition:  size() + __n <= capacity()
 //  Postcondition:  size() == size() + __n
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::__construct_at_end(size_type __n)
 {
     _ConstructTransaction __tx(*this, __n);
     const_pointer __new_end = __tx.__new_end_;
     for (pointer __pos = __tx.__pos_; __pos != __new_end; __tx.__pos_ = ++__pos) {
-        __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos));
+        __alloc_traits::construct(this->__alloc(), _CUDA_VSTD::__to_address(__pos));
     }
 }
 
@@ -1005,7 +1005,7 @@ vector<_Tp, _Allocator>::__construct_at_end(size_type __n)
 //  Postcondition:  size() == old size() + __n
 //  Postcondition:  [i] == __x for all i in [size() - __n, __n)
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 inline
 void
 vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
@@ -1013,13 +1013,13 @@ vector<_Tp, _Allocator>::__construct_at_end(size_type __n, const_reference __x)
     _ConstructTransaction __tx(*this, __n);
     const_pointer __new_end = __tx.__new_end_;
     for (pointer __pos = __tx.__pos_; __pos != __new_end; __tx.__pos_ = ++__pos) {
-        __alloc_traits::construct(this->__alloc(), _VSTD::__to_address(__pos), __x);
+        __alloc_traits::construct(this->__alloc(), _CUDA_VSTD::__to_address(__pos), __x);
     }
 }
 
 template <class _Tp, class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename enable_if
 <
     __is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -1036,7 +1036,7 @@ vector<_Tp, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIt
 //  Postcondition:  size() == size() + __n
 //  Exception safety: strong.
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::__append(size_type __n)
 {
@@ -1056,7 +1056,7 @@ vector<_Tp, _Allocator>::__append(size_type __n)
 //  Postcondition:  size() == size() + __n
 //  Exception safety: strong.
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::__append(size_type __n, const_reference __x)
 {
@@ -1072,10 +1072,10 @@ vector<_Tp, _Allocator>::__append(size_type __n, const_reference __x)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<_Tp, _Allocator>::vector(size_type __n)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     if (__n > 0)
     {
         __vallocate(__n);
@@ -1083,13 +1083,13 @@ vector<_Tp, _Allocator>::vector(size_type __n)
     }
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a)
     : __end_cap_(nullptr, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     if (__n > 0)
     {
         __vallocate(__n);
@@ -1099,10 +1099,10 @@ vector<_Tp, _Allocator>::vector(size_type __n, const allocator_type& __a)
 #endif
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     if (__n > 0)
     {
         __vallocate(__n);
@@ -1112,7 +1112,7 @@ vector<_Tp, _Allocator>::vector(size_type __n, const value_type& __x)
 
 template <class _Tp, class _Allocator>
 template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<_Tp, _Allocator>::vector(_InputIterator __first,
        typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
                          is_constructible<
@@ -1120,14 +1120,14 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first,
                             typename iterator_traits<_InputIterator>::reference>::value,
                           _InputIterator>::type __last)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     for (; __first != __last; ++__first)
         emplace_back(*__first);
 }
 
 template <class _Tp, class _Allocator>
 template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
        typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
                          is_constructible<
@@ -1135,14 +1135,14 @@ vector<_Tp, _Allocator>::vector(_InputIterator __first, _InputIterator __last, c
                             typename iterator_traits<_InputIterator>::reference>::value>::type*)
     : __end_cap_(nullptr, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     for (; __first != __last; ++__first)
         emplace_back(*__first);
 }
 
 template <class _Tp, class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<_Tp, _Allocator>::vector(_ForwardIterator __first,
                                 typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
                                 is_constructible<
@@ -1150,8 +1150,8 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first,
                                    typename iterator_traits<_ForwardIterator>::reference>::value,
                                                    _ForwardIterator>::type __last)
 {
-    _VSTD::__debug_db_insert_c(this);
-    size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
+    _CUDA_VSTD::__debug_db_insert_c(this);
+    size_type __n = static_cast<size_type>(_CUDA_VSTD::distance(__first, __last));
     if (__n > 0)
     {
         __vallocate(__n);
@@ -1161,7 +1161,7 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first,
 
 template <class _Tp, class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
                                 typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value &&
                                 is_constructible<
@@ -1169,8 +1169,8 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __las
                                    typename iterator_traits<_ForwardIterator>::reference>::value>::type*)
     : __end_cap_(nullptr, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
-    size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
+    _CUDA_VSTD::__debug_db_insert_c(this);
+    size_type __n = static_cast<size_type>(_CUDA_VSTD::distance(__first, __last));
     if (__n > 0)
     {
         __vallocate(__n);
@@ -1179,11 +1179,11 @@ vector<_Tp, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __las
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<_Tp, _Allocator>::vector(const vector& __x)
     : __end_cap_(nullptr, __alloc_traits::select_on_container_copy_construction(__x.__alloc()))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     size_type __n = __x.size();
     if (__n > 0)
     {
@@ -1193,11 +1193,11 @@ vector<_Tp, _Allocator>::vector(const vector& __x)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<_Tp, _Allocator>::vector(const vector& __x, const __type_identity_t<allocator_type>& __a)
     : __end_cap_(nullptr, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     size_type __n = __x.size();
     if (__n > 0)
     {
@@ -1207,17 +1207,17 @@ vector<_Tp, _Allocator>::vector(const vector& __x, const __type_identity_t<alloc
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 vector<_Tp, _Allocator>::vector(vector&& __x)
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
         noexcept
 #else
         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
 #endif
-    : __end_cap_(nullptr, _VSTD::move(__x.__alloc()))
+    : __end_cap_(nullptr, _CUDA_VSTD::move(__x.__alloc()))
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     std::__debug_db_swap(this, std::addressof(__x));
     this->__begin_ = __x.__begin_;
     this->__end_ = __x.__end_;
@@ -1226,12 +1226,12 @@ vector<_Tp, _Allocator>::vector(vector&& __x)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 vector<_Tp, _Allocator>::vector(vector&& __x, const __type_identity_t<allocator_type>& __a)
     : __end_cap_(nullptr, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     if (__a == __x.__alloc())
     {
         this->__begin_ = __x.__begin_;
@@ -1247,14 +1247,14 @@ vector<_Tp, _Allocator>::vector(vector&& __x, const __type_identity_t<allocator_
     }
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     if (__il.size() > 0)
     {
         __vallocate(__il.size());
@@ -1263,12 +1263,12 @@ vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocator_type& __a)
     : __end_cap_(nullptr, __a)
 {
-    _VSTD::__debug_db_insert_c(this);
+    _CUDA_VSTD::__debug_db_insert_c(this);
     if (__il.size() > 0)
     {
         __vallocate(__il.size());
@@ -1276,11 +1276,11 @@ vector<_Tp, _Allocator>::vector(initializer_list<value_type> __il, const allocat
     }
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 vector<_Tp, _Allocator>&
 vector<_Tp, _Allocator>::operator=(vector&& __x)
     _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
@@ -1291,7 +1291,7 @@ vector<_Tp, _Allocator>::operator=(vector&& __x)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::__move_assign(vector& __c, false_type)
     _NOEXCEPT_(__alloc_traits::is_always_equal::value)
@@ -1306,7 +1306,7 @@ vector<_Tp, _Allocator>::__move_assign(vector& __c, false_type)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
     _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
@@ -1321,12 +1321,12 @@ vector<_Tp, _Allocator>::__move_assign(vector& __c, true_type)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 vector<_Tp, _Allocator>&
 vector<_Tp, _Allocator>::operator=(const vector& __x)
 {
-    if (this != _VSTD::addressof(__x))
+    if (this != _CUDA_VSTD::addressof(__x))
     {
         __copy_assign_alloc(__x);
         assign(__x.__begin_, __x.__end_);
@@ -1336,7 +1336,7 @@ vector<_Tp, _Allocator>::operator=(const vector& __x)
 
 template <class _Tp, class _Allocator>
 template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
     is_constructible<
        _Tp,
        typename iterator_traits<_InputIterator>::reference>::value,
@@ -1351,7 +1351,7 @@ vector<_Tp, _Allocator>::assign(_InputIterator __first, _InputIterator __last)
 
 template <class _Tp, class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename enable_if
 <
     __is_cpp17_forward_iterator<_ForwardIterator>::value &&
@@ -1362,7 +1362,7 @@ typename enable_if
 >::type
 vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last)
 {
-    size_type __new_size = static_cast<size_type>(_VSTD::distance(__first, __last));
+    size_type __new_size = static_cast<size_type>(_CUDA_VSTD::distance(__first, __last));
     if (__new_size <= capacity())
     {
         _ForwardIterator __mid = __last;
@@ -1371,9 +1371,9 @@ vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __las
         {
             __growing = true;
             __mid =  __first;
-            _VSTD::advance(__mid, size());
+            _CUDA_VSTD::advance(__mid, size());
         }
-        pointer __m = _VSTD::copy(__first, __mid, this->__begin_);
+        pointer __m = _CUDA_VSTD::copy(__first, __mid, this->__begin_);
         if (__growing)
             __construct_at_end(__mid, __last, __new_size - size());
         else
@@ -1389,14 +1389,14 @@ vector<_Tp, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __las
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u)
 {
     if (__n <= capacity())
     {
         size_type __s = size();
-        _VSTD::fill_n(this->__begin_, _VSTD::min(__n, __s), __u);
+        _CUDA_VSTD::fill_n(this->__begin_, _CUDA_VSTD::min(__n, __s), __u);
         if (__n > __s)
             __construct_at_end(__n - __s, __u);
         else
@@ -1412,8 +1412,8 @@ vector<_Tp, _Allocator>::assign(size_type __n, const_reference __u)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename vector<_Tp, _Allocator>::iterator
 vector<_Tp, _Allocator>::begin() _NOEXCEPT
 {
@@ -1421,8 +1421,8 @@ vector<_Tp, _Allocator>::begin() _NOEXCEPT
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename vector<_Tp, _Allocator>::const_iterator
 vector<_Tp, _Allocator>::begin() const _NOEXCEPT
 {
@@ -1430,8 +1430,8 @@ vector<_Tp, _Allocator>::begin() const _NOEXCEPT
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename vector<_Tp, _Allocator>::iterator
 vector<_Tp, _Allocator>::end() _NOEXCEPT
 {
@@ -1439,8 +1439,8 @@ vector<_Tp, _Allocator>::end() _NOEXCEPT
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename vector<_Tp, _Allocator>::const_iterator
 vector<_Tp, _Allocator>::end() const _NOEXCEPT
 {
@@ -1448,27 +1448,27 @@ vector<_Tp, _Allocator>::end() const _NOEXCEPT
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename vector<_Tp, _Allocator>::reference
 vector<_Tp, _Allocator>::operator[](size_type __n) _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n < size(), "vector[] index out of bounds");
+    _LIBCUDACXX_ASSERT(__n < size(), "vector[] index out of bounds");
     return this->__begin_[__n];
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename vector<_Tp, _Allocator>::const_reference
 vector<_Tp, _Allocator>::operator[](size_type __n) const _NOEXCEPT
 {
-    _LIBCPP_ASSERT(__n < size(), "vector[] index out of bounds");
+    _LIBCUDACXX_ASSERT(__n < size(), "vector[] index out of bounds");
     return this->__begin_[__n];
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<_Tp, _Allocator>::reference
 vector<_Tp, _Allocator>::at(size_type __n)
 {
@@ -1478,7 +1478,7 @@ vector<_Tp, _Allocator>::at(size_type __n)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<_Tp, _Allocator>::const_reference
 vector<_Tp, _Allocator>::at(size_type __n) const
 {
@@ -1488,7 +1488,7 @@ vector<_Tp, _Allocator>::at(size_type __n) const
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::reserve(size_type __n)
 {
@@ -1503,45 +1503,45 @@ vector<_Tp, _Allocator>::reserve(size_type __n)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::shrink_to_fit() _NOEXCEPT
 {
     if (capacity() > size())
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             allocator_type& __a = this->__alloc();
             __split_buffer<value_type, allocator_type&> __v(size(), size(), __a);
             __swap_out_circular_buffer(__v);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
 template <class _Tp, class _Allocator>
 template <class _Up>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::__push_back_slow_path(_Up&& __x)
 {
     allocator_type& __a = this->__alloc();
     __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
-    // __v.push_back(_VSTD::forward<_Up>(__x));
-    __alloc_traits::construct(__a, _VSTD::__to_address(__v.__end_), _VSTD::forward<_Up>(__x));
+    // __v.push_back(_CUDA_VSTD::forward<_Up>(__x));
+    __alloc_traits::construct(__a, _CUDA_VSTD::__to_address(__v.__end_), _CUDA_VSTD::forward<_Up>(__x));
     __v.__end_++;
     __swap_out_circular_buffer(__v);
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 vector<_Tp, _Allocator>::push_back(const_reference __x)
 {
@@ -1554,38 +1554,38 @@ vector<_Tp, _Allocator>::push_back(const_reference __x)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 vector<_Tp, _Allocator>::push_back(value_type&& __x)
 {
     if (this->__end_ < this->__end_cap())
     {
-        __construct_one_at_end(_VSTD::move(__x));
+        __construct_one_at_end(_CUDA_VSTD::move(__x));
     }
     else
-        __push_back_slow_path(_VSTD::move(__x));
+        __push_back_slow_path(_CUDA_VSTD::move(__x));
 }
 
 template <class _Tp, class _Allocator>
 template <class... _Args>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::__emplace_back_slow_path(_Args&&... __args)
 {
     allocator_type& __a = this->__alloc();
     __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), size(), __a);
-//    __v.emplace_back(_VSTD::forward<_Args>(__args)...);
-    __alloc_traits::construct(__a, _VSTD::__to_address(__v.__end_), _VSTD::forward<_Args>(__args)...);
+//    __v.emplace_back(_CUDA_VSTD::forward<_Args>(__args)...);
+    __alloc_traits::construct(__a, _CUDA_VSTD::__to_address(__v.__end_), _CUDA_VSTD::forward<_Args>(__args)...);
     __v.__end_++;
     __swap_out_circular_buffer(__v);
 }
 
 template <class _Tp, class _Allocator>
 template <class... _Args>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 inline
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 typename vector<_Tp, _Allocator>::reference
 #else
 void
@@ -1594,59 +1594,59 @@ vector<_Tp, _Allocator>::emplace_back(_Args&&... __args)
 {
     if (this->__end_ < this->__end_cap())
     {
-        __construct_one_at_end(_VSTD::forward<_Args>(__args)...);
+        __construct_one_at_end(_CUDA_VSTD::forward<_Args>(__args)...);
     }
     else
-        __emplace_back_slow_path(_VSTD::forward<_Args>(__args)...);
-#if _LIBCPP_STD_VER > 14
+        __emplace_back_slow_path(_CUDA_VSTD::forward<_Args>(__args)...);
+#if _LIBCUDACXX_STD_VER > 14
     return this->back();
 #endif
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 inline
 void
 vector<_Tp, _Allocator>::pop_back()
 {
-    _LIBCPP_ASSERT(!empty(), "vector::pop_back called on an empty vector");
+    _LIBCUDACXX_ASSERT(!empty(), "vector::pop_back called on an empty vector");
     this->__destruct_at_end(this->__end_ - 1);
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename vector<_Tp, _Allocator>::iterator
 vector<_Tp, _Allocator>::erase(const_iterator __position)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__position)) == this,
                          "vector::erase(iterator) called with an iterator not referring to this vector");
-    _LIBCPP_ASSERT(__position != end(),
+    _LIBCUDACXX_ASSERT(__position != end(),
         "vector::erase(iterator) called with a non-dereferenceable iterator");
     
diff erence_type __ps = __position - cbegin();
     pointer __p = this->__begin_ + __ps;
-    this->__destruct_at_end(_VSTD::move(__p + 1, this->__end_, __p));
-    if (!__libcpp_is_constant_evaluated())
+    this->__destruct_at_end(_CUDA_VSTD::move(__p + 1, this->__end_, __p));
+    if (!__LIBCUDACXX_is_constant_evaluated())
         this->__invalidate_iterators_past(__p - 1);
     iterator __r = iterator(this, __p);
     return __r;
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<_Tp, _Allocator>::iterator
 vector<_Tp, _Allocator>::erase(const_iterator __first, const_iterator __last)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__first)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__first)) == this,
                          "vector::erase(iterator, iterator) called with an iterator not referring to this vector");
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__last)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__last)) == this,
                          "vector::erase(iterator, iterator) called with an iterator not referring to this vector");
 
-    _LIBCPP_ASSERT(__first <= __last, "vector::erase(first, last) called with invalid range");
+    _LIBCUDACXX_ASSERT(__first <= __last, "vector::erase(first, last) called with invalid range");
     pointer __p = this->__begin_ + (__first - begin());
     if (__first != __last) {
-        this->__destruct_at_end(_VSTD::move(__p + (__last - __first), this->__end_, __p));
-        if (!__libcpp_is_constant_evaluated())
+        this->__destruct_at_end(_CUDA_VSTD::move(__p + (__last - __first), this->__end_, __p));
+        if (!__LIBCUDACXX_is_constant_evaluated())
             this->__invalidate_iterators_past(__p - 1);
     }
     iterator __r = iterator(this, __p);
@@ -1654,7 +1654,7 @@ vector<_Tp, _Allocator>::erase(const_iterator __first, const_iterator __last)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::__move_range(pointer __from_s, pointer __from_e, pointer __to)
 {
@@ -1666,23 +1666,23 @@ vector<_Tp, _Allocator>::__move_range(pointer __from_s, pointer __from_e, pointe
       for (pointer __pos = __tx.__pos_; __i < __from_e;
            ++__i, (void) ++__pos, __tx.__pos_ = __pos) {
           __alloc_traits::construct(this->__alloc(),
-                                    _VSTD::__to_address(__pos),
-                                    _VSTD::move(*__i));
+                                    _CUDA_VSTD::__to_address(__pos),
+                                    _CUDA_VSTD::move(*__i));
       }
     }
-    _VSTD::move_backward(__from_s, __from_s + __n, __old_last);
+    _CUDA_VSTD::move_backward(__from_s, __from_s + __n, __old_last);
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<_Tp, _Allocator>::iterator
 vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__position)) == this,
                          "vector::insert(iterator, x) called with an iterator not referring to this vector");
     pointer __p = this->__begin_ + (__position - begin());
     // We can't compare unrelated pointers inside constant expressions
-    if (!__libcpp_is_constant_evaluated() && this->__end_ < this->__end_cap())
+    if (!__LIBCUDACXX_is_constant_evaluated() && this->__end_ < this->__end_cap())
     {
         if (__p == this->__end_)
         {
@@ -1708,30 +1708,30 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, const_reference __x)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<_Tp, _Allocator>::iterator
 vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__position)) == this,
                          "vector::insert(iterator, x) called with an iterator not referring to this vector");
     pointer __p = this->__begin_ + (__position - begin());
     if (this->__end_ < this->__end_cap())
     {
         if (__p == this->__end_)
         {
-            __construct_one_at_end(_VSTD::move(__x));
+            __construct_one_at_end(_CUDA_VSTD::move(__x));
         }
         else
         {
             __move_range(__p, this->__end_, __p + 1);
-            *__p = _VSTD::move(__x);
+            *__p = _CUDA_VSTD::move(__x);
         }
     }
     else
     {
         allocator_type& __a = this->__alloc();
         __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), __p - this->__begin_, __a);
-        __v.push_back(_VSTD::move(__x));
+        __v.push_back(_CUDA_VSTD::move(__x));
         __p = __swap_out_circular_buffer(__v, __p);
     }
     return iterator(this, __p);
@@ -1739,48 +1739,48 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, value_type&& __x)
 
 template <class _Tp, class _Allocator>
 template <class... _Args>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<_Tp, _Allocator>::iterator
 vector<_Tp, _Allocator>::emplace(const_iterator __position, _Args&&... __args)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__position)) == this,
                          "vector::emplace(iterator, x) called with an iterator not referring to this vector");
     pointer __p = this->__begin_ + (__position - begin());
     if (this->__end_ < this->__end_cap())
     {
         if (__p == this->__end_)
         {
-            __construct_one_at_end(_VSTD::forward<_Args>(__args)...);
+            __construct_one_at_end(_CUDA_VSTD::forward<_Args>(__args)...);
         }
         else
         {
-            __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _VSTD::forward<_Args>(__args)...);
+            __temp_value<value_type, _Allocator> __tmp(this->__alloc(), _CUDA_VSTD::forward<_Args>(__args)...);
             __move_range(__p, this->__end_, __p + 1);
-            *__p = _VSTD::move(__tmp.get());
+            *__p = _CUDA_VSTD::move(__tmp.get());
         }
     }
     else
     {
         allocator_type& __a = this->__alloc();
         __split_buffer<value_type, allocator_type&> __v(__recommend(size() + 1), __p - this->__begin_, __a);
-        __v.emplace_back(_VSTD::forward<_Args>(__args)...);
+        __v.emplace_back(_CUDA_VSTD::forward<_Args>(__args)...);
         __p = __swap_out_circular_buffer(__v, __p);
     }
     return iterator(this, __p);
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<_Tp, _Allocator>::iterator
 vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_reference __x)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__position)) == this,
                          "vector::insert(iterator, n, x) called with an iterator not referring to this vector");
     pointer __p = this->__begin_ + (__position - begin());
     if (__n > 0)
     {
         // We can't compare unrelated pointers inside constant expressions
-        if (!__libcpp_is_constant_evaluated() && __n <= static_cast<size_type>(this->__end_cap() - this->__end_))
+        if (!__LIBCUDACXX_is_constant_evaluated() && __n <= static_cast<size_type>(this->__end_cap() - this->__end_))
         {
             size_type __old_n = __n;
             pointer __old_last = this->__end_;
@@ -1796,7 +1796,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_
                 const_pointer __xr = pointer_traits<const_pointer>::pointer_to(__x);
                 if (__p <= __xr && __xr < this->__end_)
                     __xr += __old_n;
-                _VSTD::fill_n(__p, __n, *__xr);
+                _CUDA_VSTD::fill_n(__p, __n, *__xr);
             }
         }
         else
@@ -1812,7 +1812,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, size_type __n, const_
 
 template <class _Tp, class _Allocator>
 template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value &&
     is_constructible<
        _Tp,
        typename iterator_traits<_InputIterator>::reference>::value,
@@ -1820,7 +1820,7 @@ _LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_itera
 >::type
 vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__position)) == this,
                          "vector::insert(iterator, range) called with an iterator not referring to this vector");
     
diff erence_type __off = __position - begin();
     pointer __p = this->__begin_ + __off;
@@ -1833,34 +1833,34 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, _InputIterator __firs
     __split_buffer<value_type, allocator_type&> __v(__a);
     if (__first != __last)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             __v.__construct_at_end(__first, __last);
             
diff erence_type __old_size = __old_last - this->__begin_;
             
diff erence_type __old_p = __p - this->__begin_;
             reserve(__recommend(size() + __v.size()));
             __p = this->__begin_ + __old_p;
             __old_last = this->__begin_ + __old_size;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             erase(iterator(this, __old_last), end());
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
-    __p = _VSTD::rotate(__p, __old_last, this->__end_);
-    insert(iterator(this, __p), _VSTD::make_move_iterator(__v.begin()),
-                                _VSTD::make_move_iterator(__v.end()));
+    __p = _CUDA_VSTD::rotate(__p, __old_last, this->__end_);
+    insert(iterator(this, __p), _CUDA_VSTD::make_move_iterator(__v.begin()),
+                                _CUDA_VSTD::make_move_iterator(__v.end()));
     return begin() + __off;
 }
 
 template <class _Tp, class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename enable_if
 <
     __is_cpp17_forward_iterator<_ForwardIterator>::value &&
@@ -1871,10 +1871,10 @@ typename enable_if
 >::type
 vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last)
 {
-    _LIBCPP_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_VSTD::addressof(__position)) == this,
+    _LIBCUDACXX_DEBUG_ASSERT(__get_const_db()->__find_c_from_i(_CUDA_VSTD::addressof(__position)) == this,
                          "vector::insert(iterator, range) called with an iterator not referring to this vector");
     pointer __p = this->__begin_ + (__position - begin());
-    
diff erence_type __n = _VSTD::distance(__first, __last);
+    
diff erence_type __n = _CUDA_VSTD::distance(__first, __last);
     if (__n > 0)
     {
         if (__n <= this->__end_cap() - this->__end_)
@@ -1887,14 +1887,14 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __fi
             {
                 __m = __first;
                 
diff erence_type __
diff  = this->__end_ - __p;
-                _VSTD::advance(__m, __
diff );
+                _CUDA_VSTD::advance(__m, __
diff );
                 __construct_at_end(__m, __last, __n - __
diff );
                 __n = __dx;
             }
             if (__n > 0)
             {
                 __move_range(__p, __old_last, __p + __old_n);
-                _VSTD::copy(__first, __m, __p);
+                _CUDA_VSTD::copy(__first, __m, __p);
             }
         }
         else
@@ -1909,7 +1909,7 @@ vector<_Tp, _Allocator>::insert(const_iterator __position, _ForwardIterator __fi
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::resize(size_type __sz)
 {
@@ -1921,7 +1921,7 @@ vector<_Tp, _Allocator>::resize(size_type __sz)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::resize(size_type __sz, const_reference __x)
 {
@@ -1933,30 +1933,30 @@ vector<_Tp, _Allocator>::resize(size_type __sz, const_reference __x)
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<_Tp, _Allocator>::swap(vector& __x)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
     _NOEXCEPT
 #else
     _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                 __is_nothrow_swappable<allocator_type>::value)
 #endif
 {
-    _LIBCPP_ASSERT(__alloc_traits::propagate_on_container_swap::value ||
+    _LIBCUDACXX_ASSERT(__alloc_traits::propagate_on_container_swap::value ||
                    this->__alloc() == __x.__alloc(),
                    "vector::swap: Either propagate_on_container_swap must be true"
                    " or the allocators must compare equal");
-    _VSTD::swap(this->__begin_, __x.__begin_);
-    _VSTD::swap(this->__end_, __x.__end_);
-    _VSTD::swap(this->__end_cap(), __x.__end_cap());
-    _VSTD::__swap_allocator(this->__alloc(), __x.__alloc(),
+    _CUDA_VSTD::swap(this->__begin_, __x.__begin_);
+    _CUDA_VSTD::swap(this->__end_, __x.__end_);
+    _CUDA_VSTD::swap(this->__end_cap(), __x.__end_cap());
+    _CUDA_VSTD::__swap_allocator(this->__alloc(), __x.__alloc(),
         integral_constant<bool,__alloc_traits::propagate_on_container_swap::value>());
     std::__debug_db_swap(this, std::addressof(__x));
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 bool
 vector<_Tp, _Allocator>::__invariants() const
 {
@@ -1977,7 +1977,7 @@ vector<_Tp, _Allocator>::__invariants() const
     return true;
 }
 
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 template <class _Tp, class _Allocator>
 bool
@@ -2009,13 +2009,13 @@ vector<_Tp, _Allocator>::__subscriptable(const const_iterator* __i, ptr
diff _t __
     return this->__begin_ <= __p && __p < this->__end_;
 }
 
-#endif // _LIBCPP_ENABLE_DEBUG_MODE
+#endif // _LIBCUDACXX_ENABLE_DEBUG_MODE
 
 template <class _Tp, class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 vector<_Tp, _Allocator>::__invalidate_iterators_past(pointer __new_last) {
-#ifdef _LIBCPP_ENABLE_DEBUG_MODE
+#ifdef _LIBCUDACXX_ENABLE_DEBUG_MODE
   __c_node* __c = __get_db()->__find_c_and_lock(this);
   for (__i_node** __p = __c->end_; __p != __c->beg_; ) {
     --__p;
@@ -2023,7 +2023,7 @@ vector<_Tp, _Allocator>::__invalidate_iterators_past(pointer __new_last) {
     if (__i->base() > __new_last) {
       (*__p)->__c_ = nullptr;
       if (--__c->end_ != __p)
-        _VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
+        _CUDA_VSTD::memmove(__p, __p+1, (__c->end_ - __p)*sizeof(__i_node*));
     }
   }
   __get_db()->unlock();
@@ -2045,7 +2045,7 @@ struct __has_storage_type<vector<bool, _Allocator> >
 };
 
 template <class _Allocator>
-class _LIBCPP_TEMPLATE_VIS vector<bool, _Allocator>
+class _LIBCUDACXX_TEMPLATE_VIS vector<bool, _Allocator>
 {
 public:
     typedef vector                                   __self;
@@ -2059,8 +2059,8 @@ public:
     typedef __bit_iterator<vector, true>             const_pointer;
     typedef pointer                                  iterator;
     typedef const_pointer                            const_iterator;
-    typedef _VSTD::reverse_iterator<iterator>         reverse_iterator;
-    typedef _VSTD::reverse_iterator<const_iterator>   const_reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<iterator>         reverse_iterator;
+    typedef _CUDA_VSTD::reverse_iterator<const_iterator>   const_reverse_iterator;
 
 private:
     typedef typename __rebind_alloc_helper<__alloc_traits, __storage_type>::type __storage_allocator;
@@ -2073,87 +2073,87 @@ private:
     __compressed_pair<size_type, __storage_allocator> __cap_alloc_;
 public:
     typedef __bit_reference<vector>                  reference;
-#ifdef _LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
+#ifdef _LIBCUDACXX_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL
     using const_reference = bool;
 #else
     typedef __bit_const_reference<vector>            const_reference;
 #endif
 private:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type& __cap() _NOEXCEPT
         {return __cap_alloc_.first();}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const size_type& __cap() const _NOEXCEPT
         {return __cap_alloc_.first();}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     __storage_allocator& __alloc() _NOEXCEPT
         {return __cap_alloc_.second();}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const __storage_allocator& __alloc() const _NOEXCEPT
         {return __cap_alloc_.second();}
 
     static const unsigned __bits_per_word = static_cast<unsigned>(sizeof(__storage_type) * CHAR_BIT);
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static size_type __internal_cap_to_external(size_type __n) _NOEXCEPT
         {return __n * __bits_per_word;}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static size_type __external_cap_to_internal(size_type __n) _NOEXCEPT
         {return (__n - 1) / __bits_per_word + 1;}
 
 public:
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     vector() _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value);
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(const allocator_type& __a)
-#if _LIBCPP_STD_VER <= 14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit vector(const allocator_type& __a)
+#if _LIBCUDACXX_STD_VER <= 14
         _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value);
 #else
         _NOEXCEPT;
 #endif
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 ~vector();
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n);
-#if _LIBCPP_STD_VER > 11
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n, const allocator_type& __a);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 ~vector();
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n);
+#if _LIBCUDACXX_STD_VER > 11
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 explicit vector(size_type __n, const allocator_type& __a);
 #endif
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(size_type __n, const value_type& __v);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(size_type __n, const value_type& __v, const allocator_type& __a);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(size_type __n, const value_type& __v);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(size_type __n, const value_type& __v, const allocator_type& __a);
     template <class _InputIterator>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(_InputIterator __first, _InputIterator __last,
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(_InputIterator __first, _InputIterator __last,
                typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type* = 0);
     template <class _InputIterator>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
                typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type* = 0);
     template <class _ForwardIterator>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(_ForwardIterator __first, _ForwardIterator __last,
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(_ForwardIterator __first, _ForwardIterator __last,
                typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type* = 0);
     template <class _ForwardIterator>
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
                typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type* = 0);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(const vector& __v);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(const vector& __v, const allocator_type& __a);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector& operator=(const vector& __v);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(const vector& __v);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(const vector& __v, const allocator_type& __a);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector& operator=(const vector& __v);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(initializer_list<value_type> __il);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(initializer_list<value_type> __il, const allocator_type& __a);
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(initializer_list<value_type> __il);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(initializer_list<value_type> __il, const allocator_type& __a);
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     vector& operator=(initializer_list<value_type> __il)
         {assign(__il.begin(), __il.end()); return *this;}
 
-#endif // !_LIBCPP_CXX03_LANG
+#endif // !_LIBCUDACXX_CXX03_LANG
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     vector(vector&& __v)
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
         noexcept;
 #else
         _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value);
 #endif
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 vector(vector&& __v, const __type_identity_t<allocator_type>& __a);
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector(vector&& __v, const __type_identity_t<allocator_type>& __a);
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     vector& operator=(vector&& __v)
         _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value));
 
@@ -2161,162 +2161,162 @@ public:
         typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
            void
         >::type
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 assign(_InputIterator __first, _InputIterator __last);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 assign(_InputIterator __first, _InputIterator __last);
     template <class _ForwardIterator>
         typename enable_if
         <
             __is_cpp17_forward_iterator<_ForwardIterator>::value,
            void
         >::type
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 assign(_ForwardIterator __first, _ForwardIterator __last);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 assign(_ForwardIterator __first, _ForwardIterator __last);
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void assign(size_type __n, const value_type& __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void assign(size_type __n, const value_type& __x);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void assign(initializer_list<value_type> __il)
         {assign(__il.begin(), __il.end());}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 allocator_type get_allocator() const _NOEXCEPT
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 allocator_type get_allocator() const _NOEXCEPT
         {return allocator_type(this->__alloc());}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 size_type max_size() const _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 size_type max_size() const _NOEXCEPT;
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type capacity() const _NOEXCEPT
         {return __internal_cap_to_external(__cap());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_type size() const _NOEXCEPT
         {return __size_;}
-    _LIBCPP_NODISCARD_AFTER_CXX17 _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_NODISCARD_AFTER_CXX17 _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     bool empty() const _NOEXCEPT
         {return __size_ == 0;}
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void reserve(size_type __n);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void shrink_to_fit() _NOEXCEPT;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     iterator begin() _NOEXCEPT
         {return __make_iter(0);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_iterator begin() const _NOEXCEPT
         {return __make_iter(0);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     iterator end() _NOEXCEPT
         {return __make_iter(__size_);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_iterator end()   const _NOEXCEPT
         {return __make_iter(__size_);}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     reverse_iterator rbegin() _NOEXCEPT
         {return       reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_reverse_iterator rbegin() const _NOEXCEPT
         {return const_reverse_iterator(end());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     reverse_iterator rend() _NOEXCEPT
         {return       reverse_iterator(begin());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_reverse_iterator rend()   const _NOEXCEPT
         {return const_reverse_iterator(begin());}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_iterator         cbegin()  const _NOEXCEPT
         {return __make_iter(0);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_iterator         cend()    const _NOEXCEPT
         {return __make_iter(__size_);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_reverse_iterator crbegin() const _NOEXCEPT
         {return rbegin();}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_reverse_iterator crend()   const _NOEXCEPT
         {return rend();}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference       operator[](size_type __n)       {return __make_ref(__n);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference operator[](size_type __n) const {return __make_ref(__n);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 reference       operator[](size_type __n)       {return __make_ref(__n);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 const_reference operator[](size_type __n) const {return __make_ref(__n);}
     reference       at(size_type __n);
     const_reference at(size_type __n) const;
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference       front()       {return __make_ref(0);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference front() const {return __make_ref(0);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference       back()        {return __make_ref(__size_ - 1);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 const_reference back()  const {return __make_ref(__size_ - 1);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 reference       front()       {return __make_ref(0);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 const_reference front() const {return __make_ref(0);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 reference       back()        {return __make_ref(__size_ - 1);}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 const_reference back()  const {return __make_ref(__size_ - 1);}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void push_back(const value_type& __x);
-#if _LIBCPP_STD_VER > 11
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void push_back(const value_type& __x);
+#if _LIBCUDACXX_STD_VER > 11
     template <class... _Args>
-#if _LIBCPP_STD_VER > 14
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 reference emplace_back(_Args&&... __args)
+#if _LIBCUDACXX_STD_VER > 14
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 reference emplace_back(_Args&&... __args)
 #else
-    _LIBCPP_INLINE_VISIBILITY void      emplace_back(_Args&&... __args)
+    _LIBCUDACXX_INLINE_VISIBILITY void      emplace_back(_Args&&... __args)
 #endif
     {
-        push_back ( value_type ( _VSTD::forward<_Args>(__args)... ));
-#if _LIBCPP_STD_VER > 14
+        push_back ( value_type ( _CUDA_VSTD::forward<_Args>(__args)... ));
+#if _LIBCUDACXX_STD_VER > 14
         return this->back();
 #endif
     }
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void pop_back() {--__size_;}
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void pop_back() {--__size_;}
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
     template <class... _Args>
-   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator emplace(const_iterator __position, _Args&&... __args)
-        { return insert ( __position, value_type ( _VSTD::forward<_Args>(__args)... )); }
+   _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator emplace(const_iterator __position, _Args&&... __args)
+        { return insert ( __position, value_type ( _CUDA_VSTD::forward<_Args>(__args)... )); }
 #endif
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, const value_type& __x);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, size_type __n, const value_type& __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, const value_type& __x);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator insert(const_iterator __position, size_type __n, const value_type& __x);
     template <class _InputIterator>
         typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
             iterator
         >::type
-        _LIBCPP_CONSTEXPR_AFTER_CXX17 insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 insert(const_iterator __position, _InputIterator __first, _InputIterator __last);
     template <class _ForwardIterator>
         typename enable_if
         <
             __is_cpp17_forward_iterator<_ForwardIterator>::value,
             iterator
         >::type
-        _LIBCPP_CONSTEXPR_AFTER_CXX17 insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last);
 
-#ifndef _LIBCPP_CXX03_LANG
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+#ifndef _LIBCUDACXX_CXX03_LANG
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     iterator insert(const_iterator __position, initializer_list<value_type> __il)
         {return insert(__position, __il.begin(), __il.end());}
 #endif
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __position);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __first, const_iterator __last);
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __position);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 iterator erase(const_iterator __first, const_iterator __last);
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void clear() _NOEXCEPT {__size_ = 0;}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void swap(vector&)
-#if _LIBCPP_STD_VER >= 14
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void swap(vector&)
+#if _LIBCUDACXX_STD_VER >= 14
         _NOEXCEPT;
 #else
         _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                     __is_nothrow_swappable<allocator_type>::value);
 #endif
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 static void swap(reference __x, reference __y) _NOEXCEPT { _VSTD::swap(__x, __y); }
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 static void swap(reference __x, reference __y) _NOEXCEPT { _CUDA_VSTD::swap(__x, __y); }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void resize(size_type __sz, value_type __x = false);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void flip() _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void resize(size_type __sz, value_type __x = false);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void flip() _NOEXCEPT;
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool __invariants() const;
 
 private:
-    _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_NORETURN _LIBCUDACXX_HIDE_FROM_ABI
     void __throw_length_error() const {
-        _VSTD::__throw_length_error("vector");
+        _CUDA_VSTD::__throw_length_error("vector");
     }
 
-    _LIBCPP_NORETURN _LIBCPP_HIDE_FROM_ABI
+    _LIBCUDACXX_NORETURN _LIBCUDACXX_HIDE_FROM_ABI
     void __throw_out_of_range() const {
-        _VSTD::__throw_out_of_range("vector");
+        _CUDA_VSTD::__throw_out_of_range("vector");
     }
 
     //  Allocate space for __n objects
@@ -2326,56 +2326,56 @@ private:
     //  Precondition:  __n > 0
     //  Postcondition:  capacity() >= __n
     //  Postcondition:  size() == 0
-    _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_AFTER_CXX17 void __vallocate(size_type __n) {
+    _LIBCUDACXX_HIDE_FROM_ABI _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __vallocate(size_type __n) {
         if (__n > max_size())
             __throw_length_error();
         auto __allocation = std::__allocate_at_least(__alloc(), __external_cap_to_internal(__n));
         __begin_ = __allocation.ptr;
         __size_ = 0;
         __cap() = __allocation.count;
-        if (__libcpp_is_constant_evaluated()) {
+        if (__LIBCUDACXX_is_constant_evaluated()) {
             for (size_type __i = 0; __i != __cap(); ++__i)
                 std::__construct_at(std::__to_address(__begin_) + __i);
         }
     }
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __vdeallocate() _NOEXCEPT;
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __vdeallocate() _NOEXCEPT;
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     static size_type __align_it(size_type __new_size) _NOEXCEPT
         {return (__new_size + (__bits_per_word-1)) & ~((size_type)__bits_per_word-1);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17  size_type __recommend(size_type __new_size) const;
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n, bool __x);
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17  size_type __recommend(size_type __new_size) const;
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __construct_at_end(size_type __n, bool __x);
     template <class _ForwardIterator>
         typename enable_if
         <
             __is_cpp17_forward_iterator<_ForwardIterator>::value,
             void
         >::type
-        _LIBCPP_CONSTEXPR_AFTER_CXX17 __construct_at_end(_ForwardIterator __first, _ForwardIterator __last);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __append(size_type __n, const_reference __x);
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+        _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 __construct_at_end(_ForwardIterator __first, _ForwardIterator __last);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __append(size_type __n, const_reference __x);
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     reference __make_ref(size_type __pos) _NOEXCEPT
         {return reference(__begin_ + __pos / __bits_per_word, __storage_type(1) << __pos % __bits_per_word);}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_reference __make_ref(size_type __pos) const _NOEXCEPT {
         return __bit_const_reference<vector>(__begin_ + __pos / __bits_per_word,
                                              __storage_type(1) << __pos % __bits_per_word);
     }
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     iterator __make_iter(size_type __pos) _NOEXCEPT
         {return iterator(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word));}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     const_iterator __make_iter(size_type __pos) const _NOEXCEPT
         {return const_iterator(__begin_ + __pos / __bits_per_word, static_cast<unsigned>(__pos % __bits_per_word));}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     iterator __const_iterator_cast(const_iterator __p) _NOEXCEPT
         {return begin() + (__p - cbegin());}
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __copy_assign_alloc(const vector& __v)
         {__copy_assign_alloc(__v, integral_constant<bool,
                       __storage_traits::propagate_on_container_copy_assignment::value>());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __copy_assign_alloc(const vector& __c, true_type)
         {
             if (__alloc() != __c.__alloc())
@@ -2383,44 +2383,44 @@ private:
             __alloc() = __c.__alloc();
         }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __copy_assign_alloc(const vector&, false_type)
         {}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, false_type);
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, true_type)
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, false_type);
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void __move_assign(vector& __c, true_type)
         _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value);
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __move_assign_alloc(vector& __c)
         _NOEXCEPT_(
             !__storage_traits::propagate_on_container_move_assignment::value ||
             is_nothrow_move_assignable<allocator_type>::value)
         {__move_assign_alloc(__c, integral_constant<bool,
                       __storage_traits::propagate_on_container_move_assignment::value>());}
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __move_assign_alloc(vector& __c, true_type)
         _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
         {
-            __alloc() = _VSTD::move(__c.__alloc());
+            __alloc() = _CUDA_VSTD::move(__c.__alloc());
         }
 
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     void __move_assign_alloc(vector&, false_type)
         _NOEXCEPT
         {}
 
-    _LIBCPP_CONSTEXPR_AFTER_CXX17 size_t __hash_code() const _NOEXCEPT;
+    _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 size_t __hash_code() const _NOEXCEPT;
 
     friend class __bit_reference<vector>;
     friend class __bit_const_reference<vector>;
     friend class __bit_iterator<vector, false>;
     friend class __bit_iterator<vector, true>;
     friend struct __bit_array<vector>;
-    friend struct _LIBCPP_TEMPLATE_VIS hash<vector>;
+    friend struct _LIBCUDACXX_TEMPLATE_VIS hash<vector>;
 };
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 vector<bool, _Allocator>::__vdeallocate() _NOEXCEPT
 {
     if (this->__begin_ != nullptr)
@@ -2433,7 +2433,7 @@ vector<bool, _Allocator>::__vdeallocate() _NOEXCEPT
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<bool, _Allocator>::size_type
 vector<bool, _Allocator>::max_size() const _NOEXCEPT
 {
@@ -2446,7 +2446,7 @@ vector<bool, _Allocator>::max_size() const _NOEXCEPT
 
 //  Precondition:  __new_size > capacity()
 template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<bool, _Allocator>::size_type
 vector<bool, _Allocator>::__recommend(size_type __new_size) const
 {
@@ -2456,7 +2456,7 @@ vector<bool, _Allocator>::__recommend(size_type __new_size) const
     const size_type __cap = capacity();
     if (__cap >= __ms / 2)
         return __ms;
-    return _VSTD::max(2 * __cap, __align_it(__new_size));
+    return _CUDA_VSTD::max(2 * __cap, __align_it(__new_size));
 }
 
 //  Default constructs __n objects starting at __end_
@@ -2464,7 +2464,7 @@ vector<bool, _Allocator>::__recommend(size_type __new_size) const
 //  Precondition:  size() + __n <= capacity()
 //  Postcondition:  size() == size() + __n
 template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 void
 vector<bool, _Allocator>::__construct_at_end(size_type __n, bool __x)
 {
@@ -2477,12 +2477,12 @@ vector<bool, _Allocator>::__construct_at_end(size_type __n, bool __x)
         else
             this->__begin_[(this->__size_ - 1) / __bits_per_word] = __storage_type(0);
     }
-    _VSTD::fill_n(__make_iter(__old_size), __n, __x);
+    _CUDA_VSTD::fill_n(__make_iter(__old_size), __n, __x);
 }
 
 template <class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename enable_if
 <
     __is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -2491,7 +2491,7 @@ typename enable_if
 vector<bool, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardIterator __last)
 {
     size_type __old_size = this->__size_;
-    this->__size_ += _VSTD::distance(__first, __last);
+    this->__size_ += _CUDA_VSTD::distance(__first, __last);
     if (__old_size == 0 || ((__old_size - 1) / __bits_per_word) != ((this->__size_ - 1) / __bits_per_word))
     {
         if (this->__size_ <= __bits_per_word)
@@ -2499,11 +2499,11 @@ vector<bool, _Allocator>::__construct_at_end(_ForwardIterator __first, _ForwardI
         else
             this->__begin_[(this->__size_ - 1) / __bits_per_word] = __storage_type(0);
     }
-    _VSTD::copy(__first, __last, __make_iter(__old_size));
+    _CUDA_VSTD::copy(__first, __last, __make_iter(__old_size));
 }
 
 template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector()
     _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)
     : __begin_(nullptr),
@@ -2513,9 +2513,9 @@ vector<bool, _Allocator>::vector()
 }
 
 template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(const allocator_type& __a)
-#if _LIBCPP_STD_VER <= 14
+#if _LIBCUDACXX_STD_VER <= 14
         _NOEXCEPT_(is_nothrow_copy_constructible<allocator_type>::value)
 #else
         _NOEXCEPT
@@ -2527,7 +2527,7 @@ vector<bool, _Allocator>::vector(const allocator_type& __a)
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(size_type __n)
     : __begin_(nullptr),
       __size_(0),
@@ -2540,9 +2540,9 @@ vector<bool, _Allocator>::vector(size_type __n)
     }
 }
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(size_type __n, const allocator_type& __a)
     : __begin_(nullptr),
       __size_(0),
@@ -2557,7 +2557,7 @@ vector<bool, _Allocator>::vector(size_type __n, const allocator_type& __a)
 #endif
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
     : __begin_(nullptr),
       __size_(0),
@@ -2571,7 +2571,7 @@ vector<bool, _Allocator>::vector(size_type __n, const value_type& __x)
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(size_type __n, const value_type& __x, const allocator_type& __a)
     : __begin_(nullptr),
       __size_(0),
@@ -2586,20 +2586,20 @@ vector<bool, _Allocator>::vector(size_type __n, const value_type& __x, const all
 
 template <class _Allocator>
 template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
        typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type*)
     : __begin_(nullptr),
       __size_(0),
       __cap_alloc_(0, __default_init_tag())
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         for (; __first != __last; ++__first)
             push_back(*__first);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -2608,25 +2608,25 @@ vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
         std::__debug_db_invalidate_all(this);
         throw;
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template <class _Allocator>
 template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last, const allocator_type& __a,
        typename enable_if<__is_exactly_cpp17_input_iterator<_InputIterator>::value>::type*)
     : __begin_(nullptr),
       __size_(0),
       __cap_alloc_(0, static_cast<__storage_allocator>(__a))
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         for (; __first != __last; ++__first)
             push_back(*__first);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -2635,19 +2635,19 @@ vector<bool, _Allocator>::vector(_InputIterator __first, _InputIterator __last,
         std::__debug_db_invalidate_all(this);
         throw;
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template <class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last,
                                 typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type*)
     : __begin_(nullptr),
       __size_(0),
       __cap_alloc_(0, __default_init_tag())
 {
-    size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
+    size_type __n = static_cast<size_type>(_CUDA_VSTD::distance(__first, __last));
     if (__n > 0)
     {
         __vallocate(__n);
@@ -2657,14 +2657,14 @@ vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __la
 
 template <class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __last, const allocator_type& __a,
                                 typename enable_if<__is_cpp17_forward_iterator<_ForwardIterator>::value>::type*)
     : __begin_(nullptr),
       __size_(0),
       __cap_alloc_(0, static_cast<__storage_allocator>(__a))
 {
-    size_type __n = static_cast<size_type>(_VSTD::distance(__first, __last));
+    size_type __n = static_cast<size_type>(_CUDA_VSTD::distance(__first, __last));
     if (__n > 0)
     {
         __vallocate(__n);
@@ -2672,10 +2672,10 @@ vector<bool, _Allocator>::vector(_ForwardIterator __first, _ForwardIterator __la
     }
 }
 
-#ifndef _LIBCPP_CXX03_LANG
+#ifndef _LIBCUDACXX_CXX03_LANG
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(initializer_list<value_type> __il)
     : __begin_(nullptr),
       __size_(0),
@@ -2690,7 +2690,7 @@ vector<bool, _Allocator>::vector(initializer_list<value_type> __il)
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(initializer_list<value_type> __il, const allocator_type& __a)
     : __begin_(nullptr),
       __size_(0),
@@ -2704,10 +2704,10 @@ vector<bool, _Allocator>::vector(initializer_list<value_type> __il, const alloca
     }
 }
 
-#endif // _LIBCPP_CXX03_LANG
+#endif // _LIBCUDACXX_CXX03_LANG
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::~vector()
 {
     if (__begin_ != nullptr)
@@ -2716,7 +2716,7 @@ vector<bool, _Allocator>::~vector()
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(const vector& __v)
     : __begin_(nullptr),
       __size_(0),
@@ -2730,7 +2730,7 @@ vector<bool, _Allocator>::vector(const vector& __v)
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(const vector& __v, const allocator_type& __a)
     : __begin_(nullptr),
       __size_(0),
@@ -2744,11 +2744,11 @@ vector<bool, _Allocator>::vector(const vector& __v, const allocator_type& __a)
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>&
 vector<bool, _Allocator>::operator=(const vector& __v)
 {
-    if (this != _VSTD::addressof(__v))
+    if (this != _CUDA_VSTD::addressof(__v))
     {
         __copy_assign_alloc(__v);
         if (__v.__size_)
@@ -2758,7 +2758,7 @@ vector<bool, _Allocator>::operator=(const vector& __v)
                 __vdeallocate();
                 __vallocate(__v.__size_);
             }
-            _VSTD::copy(__v.__begin_, __v.__begin_ + __external_cap_to_internal(__v.__size_), __begin_);
+            _CUDA_VSTD::copy(__v.__begin_, __v.__begin_ + __external_cap_to_internal(__v.__size_), __begin_);
         }
         __size_ = __v.__size_;
     }
@@ -2766,22 +2766,22 @@ vector<bool, _Allocator>::operator=(const vector& __v)
 }
 
 template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17 vector<bool, _Allocator>::vector(vector&& __v)
-#if _LIBCPP_STD_VER > 14
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17 vector<bool, _Allocator>::vector(vector&& __v)
+#if _LIBCUDACXX_STD_VER > 14
     _NOEXCEPT
 #else
     _NOEXCEPT_(is_nothrow_move_constructible<allocator_type>::value)
 #endif
     : __begin_(__v.__begin_),
       __size_(__v.__size_),
-      __cap_alloc_(_VSTD::move(__v.__cap_alloc_)) {
+      __cap_alloc_(_CUDA_VSTD::move(__v.__cap_alloc_)) {
     __v.__begin_ = nullptr;
     __v.__size_ = 0;
     __v.__cap() = 0;
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>::vector(vector&& __v, const __type_identity_t<allocator_type>& __a)
     : __begin_(nullptr),
       __size_(0),
@@ -2803,7 +2803,7 @@ vector<bool, _Allocator>::vector(vector&& __v, const __type_identity_t<allocator
 }
 
 template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 vector<bool, _Allocator>&
 vector<bool, _Allocator>::operator=(vector&& __v)
     _NOEXCEPT_((__noexcept_move_assign_container<_Allocator, __alloc_traits>::value))
@@ -2814,7 +2814,7 @@ vector<bool, _Allocator>::operator=(vector&& __v)
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 vector<bool, _Allocator>::__move_assign(vector& __c, false_type)
 {
     if (__alloc() != __c.__alloc())
@@ -2824,7 +2824,7 @@ vector<bool, _Allocator>::__move_assign(vector& __c, false_type)
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 vector<bool, _Allocator>::__move_assign(vector& __c, true_type)
     _NOEXCEPT_(is_nothrow_move_assignable<allocator_type>::value)
 {
@@ -2838,7 +2838,7 @@ vector<bool, _Allocator>::__move_assign(vector& __c, true_type)
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 vector<bool, _Allocator>::assign(size_type __n, const value_type& __x)
 {
     __size_ = 0;
@@ -2854,14 +2854,14 @@ vector<bool, _Allocator>::assign(size_type __n, const value_type& __x)
             __v.__size_ = __n;
             swap(__v);
         }
-        _VSTD::fill_n(begin(), __n, __x);
+        _CUDA_VSTD::fill_n(begin(), __n, __x);
     }
     std::__debug_db_invalidate_all(this);
 }
 
 template <class _Allocator>
 template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
    void
 >::type
 vector<bool, _Allocator>::assign(_InputIterator __first, _InputIterator __last)
@@ -2873,7 +2873,7 @@ vector<bool, _Allocator>::assign(_InputIterator __first, _InputIterator __last)
 
 template <class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename enable_if
 <
     __is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -2882,8 +2882,8 @@ typename enable_if
 vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __last)
 {
     clear();
-    
diff erence_type __ns = _VSTD::distance(__first, __last);
-    _LIBCPP_ASSERT(__ns >= 0, "invalid range specified");
+    
diff erence_type __ns = _CUDA_VSTD::distance(__first, __last);
+    _LIBCUDACXX_ASSERT(__ns >= 0, "invalid range specified");
     const size_t __n = static_cast<size_type>(__ns);
     if (__n)
     {
@@ -2897,7 +2897,7 @@ vector<bool, _Allocator>::assign(_ForwardIterator __first, _ForwardIterator __la
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 vector<bool, _Allocator>::reserve(size_type __n)
 {
     if (__n > capacity())
@@ -2913,22 +2913,22 @@ vector<bool, _Allocator>::reserve(size_type __n)
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 vector<bool, _Allocator>::shrink_to_fit() _NOEXCEPT
 {
     if (__external_cap_to_internal(size()) > __cap())
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             vector(*this, allocator_type(__alloc())).swap(*this);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
 }
 
@@ -2951,7 +2951,7 @@ vector<bool, _Allocator>::at(size_type __n) const
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 vector<bool, _Allocator>::push_back(const value_type& __x)
 {
     if (this->__size_ == this->capacity())
@@ -2961,7 +2961,7 @@ vector<bool, _Allocator>::push_back(const value_type& __x)
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename vector<bool, _Allocator>::iterator
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 typename vector<bool, _Allocator>::iterator
 vector<bool, _Allocator>::insert(const_iterator __position, const value_type& __x)
 {
     iterator __r;
@@ -2969,7 +2969,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, const value_type& __
     {
         const_iterator __old_end = end();
         ++__size_;
-        _VSTD::copy_backward(__position, __old_end, end());
+        _CUDA_VSTD::copy_backward(__position, __old_end, end());
         __r = __const_iterator_cast(__position);
     }
     else
@@ -2977,8 +2977,8 @@ vector<bool, _Allocator>::insert(const_iterator __position, const value_type& __
         vector __v(get_allocator());
         __v.reserve(__recommend(__size_ + 1));
         __v.__size_ = __size_ + 1;
-        __r = _VSTD::copy(cbegin(), __position, __v.begin());
-        _VSTD::copy_backward(__position, cend(), __v.end());
+        __r = _CUDA_VSTD::copy(cbegin(), __position, __v.begin());
+        _CUDA_VSTD::copy_backward(__position, cend(), __v.end());
         swap(__v);
     }
     *__r = __x;
@@ -2986,7 +2986,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, const value_type& __
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename vector<bool, _Allocator>::iterator
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 typename vector<bool, _Allocator>::iterator
 vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const value_type& __x)
 {
     iterator __r;
@@ -2995,7 +2995,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const
     {
         const_iterator __old_end = end();
         __size_ += __n;
-        _VSTD::copy_backward(__position, __old_end, end());
+        _CUDA_VSTD::copy_backward(__position, __old_end, end());
         __r = __const_iterator_cast(__position);
     }
     else
@@ -3003,17 +3003,17 @@ vector<bool, _Allocator>::insert(const_iterator __position, size_type __n, const
         vector __v(get_allocator());
         __v.reserve(__recommend(__size_ + __n));
         __v.__size_ = __size_ + __n;
-        __r = _VSTD::copy(cbegin(), __position, __v.begin());
-        _VSTD::copy_backward(__position, cend(), __v.end());
+        __r = _CUDA_VSTD::copy(cbegin(), __position, __v.begin());
+        _CUDA_VSTD::copy_backward(__position, cend(), __v.end());
         swap(__v);
     }
-    _VSTD::fill_n(__r, __n, __x);
+    _CUDA_VSTD::fill_n(__r, __n, __x);
     return __r;
 }
 
 template <class _Allocator>
 template <class _InputIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 typename enable_if <__is_exactly_cpp17_input_iterator<_InputIterator>::value,
     typename vector<bool, _Allocator>::iterator
 >::type
 vector<bool, _Allocator>::insert(const_iterator __position, _InputIterator __first, _InputIterator __last)
@@ -3029,33 +3029,33 @@ vector<bool, _Allocator>::insert(const_iterator __position, _InputIterator __fir
     vector __v(get_allocator());
     if (__first != __last)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             __v.assign(__first, __last);
             
diff erence_type __old_size = static_cast<
diff erence_type>(__old_end - begin());
             
diff erence_type __old_p = __p - begin();
             reserve(__recommend(size() + __v.size()));
             __p = begin() + __old_p;
             __old_end = begin() + __old_size;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             erase(__old_end, end());
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
-    __p = _VSTD::rotate(__p, __old_end, end());
+    __p = _CUDA_VSTD::rotate(__p, __old_end, end());
     insert(__p, __v.begin(), __v.end());
     return begin() + __off;
 }
 
 template <class _Allocator>
 template <class _ForwardIterator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename enable_if
 <
     __is_cpp17_forward_iterator<_ForwardIterator>::value,
@@ -3063,8 +3063,8 @@ typename enable_if
 >::type
 vector<bool, _Allocator>::insert(const_iterator __position, _ForwardIterator __first, _ForwardIterator __last)
 {
-    const 
diff erence_type __n_signed = _VSTD::distance(__first, __last);
-    _LIBCPP_ASSERT(__n_signed >= 0, "invalid range specified");
+    const 
diff erence_type __n_signed = _CUDA_VSTD::distance(__first, __last);
+    _LIBCUDACXX_ASSERT(__n_signed >= 0, "invalid range specified");
     const size_type __n = static_cast<size_type>(__n_signed);
     iterator __r;
     size_type __c = capacity();
@@ -3072,7 +3072,7 @@ vector<bool, _Allocator>::insert(const_iterator __position, _ForwardIterator __f
     {
         const_iterator __old_end = end();
         __size_ += __n;
-        _VSTD::copy_backward(__position, __old_end, end());
+        _CUDA_VSTD::copy_backward(__position, __old_end, end());
         __r = __const_iterator_cast(__position);
     }
     else
@@ -3080,56 +3080,56 @@ vector<bool, _Allocator>::insert(const_iterator __position, _ForwardIterator __f
         vector __v(get_allocator());
         __v.reserve(__recommend(__size_ + __n));
         __v.__size_ = __size_ + __n;
-        __r = _VSTD::copy(cbegin(), __position, __v.begin());
-        _VSTD::copy_backward(__position, cend(), __v.end());
+        __r = _CUDA_VSTD::copy(cbegin(), __position, __v.begin());
+        _CUDA_VSTD::copy_backward(__position, cend(), __v.end());
         swap(__v);
     }
-    _VSTD::copy(__first, __last, __r);
+    _CUDA_VSTD::copy(__first, __last, __r);
     return __r;
 }
 
 template <class _Allocator>
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<bool, _Allocator>::iterator
 vector<bool, _Allocator>::erase(const_iterator __position)
 {
     iterator __r = __const_iterator_cast(__position);
-    _VSTD::copy(__position + 1, this->cend(), __r);
+    _CUDA_VSTD::copy(__position + 1, this->cend(), __r);
     --__size_;
     return __r;
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
 typename vector<bool, _Allocator>::iterator
 vector<bool, _Allocator>::erase(const_iterator __first, const_iterator __last)
 {
     iterator __r = __const_iterator_cast(__first);
     
diff erence_type __d = __last - __first;
-    _VSTD::copy(__last, this->cend(), __r);
+    _CUDA_VSTD::copy(__last, this->cend(), __r);
     __size_ -= __d;
     return __r;
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 vector<bool, _Allocator>::swap(vector& __x)
-#if _LIBCPP_STD_VER >= 14
+#if _LIBCUDACXX_STD_VER >= 14
     _NOEXCEPT
 #else
     _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||
                 __is_nothrow_swappable<allocator_type>::value)
 #endif
 {
-    _VSTD::swap(this->__begin_, __x.__begin_);
-    _VSTD::swap(this->__size_, __x.__size_);
-    _VSTD::swap(this->__cap(), __x.__cap());
-    _VSTD::__swap_allocator(this->__alloc(), __x.__alloc(),
+    _CUDA_VSTD::swap(this->__begin_, __x.__begin_);
+    _CUDA_VSTD::swap(this->__size_, __x.__size_);
+    _CUDA_VSTD::swap(this->__cap(), __x.__cap());
+    _CUDA_VSTD::__swap_allocator(this->__alloc(), __x.__alloc(),
         integral_constant<bool, __alloc_traits::propagate_on_container_swap::value>());
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 vector<bool, _Allocator>::resize(size_type __sz, value_type __x)
 {
     size_type __cs = size();
@@ -3148,17 +3148,17 @@ vector<bool, _Allocator>::resize(size_type __sz, value_type __x)
             vector __v(get_allocator());
             __v.reserve(__recommend(__size_ + __n));
             __v.__size_ = __size_ + __n;
-            __r = _VSTD::copy(cbegin(), cend(), __v.begin());
+            __r = _CUDA_VSTD::copy(cbegin(), cend(), __v.begin());
             swap(__v);
         }
-        _VSTD::fill_n(__r, __n, __x);
+        _CUDA_VSTD::fill_n(__r, __n, __x);
     }
     else
         __size_ = __sz;
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 void
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 void
 vector<bool, _Allocator>::flip() _NOEXCEPT
 {
     // do middle whole words
@@ -3177,7 +3177,7 @@ vector<bool, _Allocator>::flip() _NOEXCEPT
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 bool
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 bool
 vector<bool, _Allocator>::__invariants() const
 {
     if (this->__begin_ == nullptr)
@@ -3196,7 +3196,7 @@ vector<bool, _Allocator>::__invariants() const
 }
 
 template <class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17 size_t
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17 size_t
 vector<bool, _Allocator>::__hash_code() const _NOEXCEPT
 {
     size_t __h = 0;
@@ -3215,27 +3215,27 @@ vector<bool, _Allocator>::__hash_code() const _NOEXCEPT
 }
 
 template <class _Allocator>
-struct _LIBCPP_TEMPLATE_VIS hash<vector<bool, _Allocator> >
+struct _LIBCUDACXX_TEMPLATE_VIS hash<vector<bool, _Allocator> >
     : public __unary_function<vector<bool, _Allocator>, size_t>
 {
-    _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
+    _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_CONSTEXPR_AFTER_CXX17
     size_t operator()(const vector<bool, _Allocator>& __vec) const _NOEXCEPT
         {return __vec.__hash_code();}
 };
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator==(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
 {
     const typename vector<_Tp, _Allocator>::size_type __sz = __x.size();
-    return __sz == __y.size() && _VSTD::equal(__x.begin(), __x.end(), __y.begin());
+    return __sz == __y.size() && _CUDA_VSTD::equal(__x.begin(), __x.end(), __y.begin());
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator!=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
 {
@@ -3243,17 +3243,17 @@ operator!=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator< (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
 {
-    return _VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
+    return _CUDA_VSTD::lexicographical_compare(__x.begin(), __x.end(), __y.begin(), __y.end());
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator> (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
 {
@@ -3261,8 +3261,8 @@ operator> (const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator>=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
 {
@@ -3270,8 +3270,8 @@ operator>=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 bool
 operator<=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __y)
 {
@@ -3279,8 +3279,8 @@ operator<=(const vector<_Tp, _Allocator>& __x, const vector<_Tp, _Allocator>& __
 }
 
 template <class _Tp, class _Allocator>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY
 void
 swap(vector<_Tp, _Allocator>& __x, vector<_Tp, _Allocator>& __y)
     _NOEXCEPT_(_NOEXCEPT_(__x.swap(__y)))
@@ -3288,36 +3288,36 @@ swap(vector<_Tp, _Allocator>& __x, vector<_Tp, _Allocator>& __y)
     __x.swap(__y);
 }
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 template <class _Tp, class _Allocator, class _Up>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY typename vector<_Tp, _Allocator>::size_type
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY typename vector<_Tp, _Allocator>::size_type
 erase(vector<_Tp, _Allocator>& __c, const _Up& __v) {
   auto __old_size = __c.size();
-  __c.erase(_VSTD::remove(__c.begin(), __c.end(), __v), __c.end());
+  __c.erase(_CUDA_VSTD::remove(__c.begin(), __c.end(), __v), __c.end());
   return __old_size - __c.size();
 }
 
 template <class _Tp, class _Allocator, class _Predicate>
-_LIBCPP_CONSTEXPR_AFTER_CXX17
-inline _LIBCPP_INLINE_VISIBILITY typename vector<_Tp, _Allocator>::size_type
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX17
+inline _LIBCUDACXX_INLINE_VISIBILITY typename vector<_Tp, _Allocator>::size_type
 erase_if(vector<_Tp, _Allocator>& __c, _Predicate __pred) {
   auto __old_size = __c.size();
-  __c.erase(_VSTD::remove_if(__c.begin(), __c.end(), __pred), __c.end());
+  __c.erase(_CUDA_VSTD::remove_if(__c.begin(), __c.end(), __pred), __c.end());
   return __old_size - __c.size();
 }
 
 template <>
 inline constexpr bool __format::__enable_insertable<std::vector<char>> = true;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 inline constexpr bool __format::__enable_insertable<std::vector<wchar_t>> = true;
 #endif
 
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // _LIBCPP_VECTOR
+#endif // _LIBCUDACXX_VECTOR

diff  --git a/libcxx/include/version b/libcxx/include/version
index 8ffb1747eb27..db6cf247d2d1 100644
--- a/libcxx/include/version
+++ b/libcxx/include/version
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_VERSIONH
-#define _LIBCPP_VERSIONH
+#ifndef _LIBCUDACXX_VERSIONH
+#define _LIBCUDACXX_VERSIONH
 
 /*
   version synopsis
@@ -197,13 +197,13 @@ __cpp_lib_void_t                                        201411L <type_traits>
 #include <__assert> // all public C++ headers provide the assertion handler
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 // clang-format off
 
-#if _LIBCPP_STD_VER > 11
+#if _LIBCUDACXX_STD_VER > 11
 # define __cpp_lib_chrono_udls                          201304L
 # define __cpp_lib_complex_udls                         201309L
 # define __cpp_lib_exchange_function                    201304L
@@ -218,7 +218,7 @@ __cpp_lib_void_t                                        201411L <type_traits>
 # define __cpp_lib_quoted_string_io                     201304L
 # define __cpp_lib_result_of_sfinae                     201210L
 # define __cpp_lib_robust_nonmodifying_seq_ops          201304L
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
 #   define __cpp_lib_shared_timed_mutex                 201402L
 # endif
 # define __cpp_lib_string_udls                          201304L
@@ -228,7 +228,7 @@ __cpp_lib_void_t                                        201411L <type_traits>
 # define __cpp_lib_tuples_by_type                       201304L
 #endif
 
-#if _LIBCPP_STD_VER > 14
+#if _LIBCUDACXX_STD_VER > 14
 # define __cpp_lib_addressof_constexpr                  201603L
 # define __cpp_lib_allocator_traits_is_always_equal     201411L
 # define __cpp_lib_any                                  201606L
@@ -243,7 +243,7 @@ __cpp_lib_void_t                                        201411L <type_traits>
 # define __cpp_lib_clamp                                201603L
 # define __cpp_lib_enable_shared_from_this              201603L
 // # define __cpp_lib_execution                            201603L
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
 #   define __cpp_lib_filesystem                         201703L
 # endif
 # define __cpp_lib_gcd_lcm                              201606L
@@ -271,7 +271,7 @@ __cpp_lib_void_t                                        201411L <type_traits>
 # define __cpp_lib_raw_memory_algorithms                201606L
 # define __cpp_lib_sample                               201603L
 # define __cpp_lib_scoped_lock                          201703L
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
 #   define __cpp_lib_shared_mutex                       201505L
 # endif
 # define __cpp_lib_shared_ptr_arrays                    201611L
@@ -287,7 +287,7 @@ __cpp_lib_void_t                                        201411L <type_traits>
 # define __cpp_lib_void_t                               201411L
 #endif
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 # undef  __cpp_lib_array_constexpr
 # define __cpp_lib_array_constexpr                      201811L
 # define __cpp_lib_assume_aligned                       201811L
@@ -297,17 +297,17 @@ __cpp_lib_void_t                                        201411L <type_traits>
 // # define __cpp_lib_atomic_ref                           201806L
 // # define __cpp_lib_atomic_shared_ptr                    201711L
 # define __cpp_lib_atomic_value_initialization          201911L
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)
 #   define __cpp_lib_atomic_wait                        201907L
 # endif
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)
 #   define __cpp_lib_barrier                            201907L
 # endif
 # define __cpp_lib_bind_front                           201907L
 # define __cpp_lib_bit_cast                             201806L
 // # define __cpp_lib_bitops                               201907L
 # define __cpp_lib_bounded_array_traits                 201902L
-# if !defined(_LIBCPP_HAS_NO_CHAR8_T)
+# if !defined(_LIBCUDACXX_HAS_NO_CHAR8_T)
 #   define __cpp_lib_char8_t                            201907L
 # endif
 # define __cpp_lib_concepts                             202002L
@@ -324,14 +324,14 @@ __cpp_lib_void_t                                        201411L <type_traits>
 # define __cpp_lib_constexpr_utility                    201811L
 // # define __cpp_lib_constexpr_vector                     201907L
 # define __cpp_lib_coroutine                            201902L
-# if _LIBCPP_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
+# if _LIBCUDACXX_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L
 #   define __cpp_lib_destroying_delete                  201806L
 # endif
 # define __cpp_lib_endian                               201907L
 # define __cpp_lib_erase_if                             202002L
 # undef  __cpp_lib_execution
 // # define __cpp_lib_execution                            201902L
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT)
 #   define __cpp_lib_format                             202106L
 # endif
 # define __cpp_lib_generic_unordered_lookup             201811L
@@ -342,20 +342,20 @@ __cpp_lib_void_t                                        201411L <type_traits>
 // # define __cpp_lib_is_layout_compatible                 201907L
 # define __cpp_lib_is_nothrow_convertible               201806L
 // # define __cpp_lib_is_pointer_interconvertible          201907L
-# if !defined(_LIBCPP_HAS_NO_THREADS)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 // #   define __cpp_lib_jthread                            201911L
 # endif
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)
 #   define __cpp_lib_latch                              201907L
 # endif
 # define __cpp_lib_list_remove_return_type              201806L
 # define __cpp_lib_math_constants                       201907L
 // # define __cpp_lib_polymorphic_allocator                201902L
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   define __cpp_lib_ranges                             201811L
 # endif
 # define __cpp_lib_remove_cvref                         201711L
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
 #   define __cpp_lib_semaphore                          201907L
 # endif
 # undef  __cpp_lib_shared_ptr_arrays
@@ -376,7 +376,7 @@ __cpp_lib_void_t                                        201411L <type_traits>
 # define __cpp_lib_unwrap_ref                           201811L
 #endif
 
-#if _LIBCPP_STD_VER > 20
+#if _LIBCUDACXX_STD_VER > 20
 # define __cpp_lib_adaptor_iterator_pair_constructor    202106L
 # define __cpp_lib_allocate_at_least                    202106L
 // # define __cpp_lib_associative_heterogeneous_erasure    202110L
@@ -410,4 +410,4 @@ __cpp_lib_void_t                                        201411L <type_traits>
 
 // clang-format on
 
-#endif // _LIBCPP_VERSIONH
+#endif // _LIBCUDACXX_VERSIONH

diff  --git a/libcxx/include/wchar.h b/libcxx/include/wchar.h
index 0fba53b268ae..a69410f2810d 100644
--- a/libcxx/include/wchar.h
+++ b/libcxx/include/wchar.h
@@ -9,14 +9,14 @@
 
 #if defined(__need_wint_t) || defined(__need_mbstate_t)
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
 #include_next <wchar.h>
 
-#elif !defined(_LIBCPP_WCHAR_H)
-#define _LIBCPP_WCHAR_H
+#elif !defined(_LIBCUDACXX_WCHAR_H)
+#define _LIBCUDACXX_WCHAR_H
 
 /*
     wchar.h synopsis
@@ -108,11 +108,11 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
 #include <__config>
 #include <stddef.h>
 
-#if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   error "The <wchar.h> header is not supported since libc++ has been configured with LIBCXX_ENABLE_WIDE_CHARACTERS disabled"
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -124,63 +124,63 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
 
 // Determine whether we have const-correct overloads for wcschr and friends.
 #if defined(_WCHAR_H_CPLUSPLUS_98_CONFORMANCE_)
-#  define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
+#  define _LIBCUDACXX_WCHAR_H_HAS_CONST_OVERLOADS 1
 #elif defined(__GLIBC_PREREQ)
 #  if __GLIBC_PREREQ(2, 10)
-#    define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
+#    define _LIBCUDACXX_WCHAR_H_HAS_CONST_OVERLOADS 1
 #  endif
-#elif defined(_LIBCPP_MSVCRT)
+#elif defined(_LIBCUDACXX_MSVCRT)
 #  if defined(_CRT_CONST_CORRECT_OVERLOADS)
-#    define _LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS 1
+#    define _LIBCUDACXX_WCHAR_H_HAS_CONST_OVERLOADS 1
 #  endif
 #endif
 
-#if defined(__cplusplus) && !defined(_LIBCPP_WCHAR_H_HAS_CONST_OVERLOADS) && defined(_LIBCPP_PREFERRED_OVERLOAD)
+#if defined(__cplusplus) && !defined(_LIBCUDACXX_WCHAR_H_HAS_CONST_OVERLOADS) && defined(_LIBCUDACXX_PREFERRED_OVERLOAD)
 extern "C++" {
-inline _LIBCPP_INLINE_VISIBILITY
-wchar_t* __libcpp_wcschr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcschr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const wchar_t* wcschr(const wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-      wchar_t* wcschr(      wchar_t* __s, wchar_t __c) {return __libcpp_wcschr(__s, __c);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-wchar_t* __libcpp_wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcspbrk(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const wchar_t* wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcspbrk(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-      wchar_t* wcspbrk(      wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcspbrk(__s1, __s2);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-wchar_t* __libcpp_wcsrchr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcsrchr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const wchar_t* wcsrchr(const wchar_t* __s, wchar_t __c) {return __libcpp_wcsrchr(__s, __c);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-      wchar_t* wcsrchr(      wchar_t* __s, wchar_t __c) {return __libcpp_wcsrchr(__s, __c);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-wchar_t* __libcpp_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcsstr(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const wchar_t* wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcsstr(__s1, __s2);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-      wchar_t* wcsstr(      wchar_t* __s1, const wchar_t* __s2) {return __libcpp_wcsstr(__s1, __s2);}
-
-inline _LIBCPP_INLINE_VISIBILITY
-wchar_t* __libcpp_wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return (wchar_t*)wmemchr(__s, __c, __n);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-const wchar_t* wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return __libcpp_wmemchr(__s, __c, __n);}
-inline _LIBCPP_INLINE_VISIBILITY _LIBCPP_PREFERRED_OVERLOAD
-      wchar_t* wmemchr(      wchar_t* __s, wchar_t __c, size_t __n) {return __libcpp_wmemchr(__s, __c, __n);}
+inline _LIBCUDACXX_INLINE_VISIBILITY
+wchar_t* __LIBCUDACXX_wcschr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcschr(__s, __c);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+const wchar_t* wcschr(const wchar_t* __s, wchar_t __c) {return __LIBCUDACXX_wcschr(__s, __c);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+      wchar_t* wcschr(      wchar_t* __s, wchar_t __c) {return __LIBCUDACXX_wcschr(__s, __c);}
+
+inline _LIBCUDACXX_INLINE_VISIBILITY
+wchar_t* __LIBCUDACXX_wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcspbrk(__s1, __s2);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+const wchar_t* wcspbrk(const wchar_t* __s1, const wchar_t* __s2) {return __LIBCUDACXX_wcspbrk(__s1, __s2);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+      wchar_t* wcspbrk(      wchar_t* __s1, const wchar_t* __s2) {return __LIBCUDACXX_wcspbrk(__s1, __s2);}
+
+inline _LIBCUDACXX_INLINE_VISIBILITY
+wchar_t* __LIBCUDACXX_wcsrchr(const wchar_t* __s, wchar_t __c) {return (wchar_t*)wcsrchr(__s, __c);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+const wchar_t* wcsrchr(const wchar_t* __s, wchar_t __c) {return __LIBCUDACXX_wcsrchr(__s, __c);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+      wchar_t* wcsrchr(      wchar_t* __s, wchar_t __c) {return __LIBCUDACXX_wcsrchr(__s, __c);}
+
+inline _LIBCUDACXX_INLINE_VISIBILITY
+wchar_t* __LIBCUDACXX_wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return (wchar_t*)wcsstr(__s1, __s2);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+const wchar_t* wcsstr(const wchar_t* __s1, const wchar_t* __s2) {return __LIBCUDACXX_wcsstr(__s1, __s2);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+      wchar_t* wcsstr(      wchar_t* __s1, const wchar_t* __s2) {return __LIBCUDACXX_wcsstr(__s1, __s2);}
+
+inline _LIBCUDACXX_INLINE_VISIBILITY
+wchar_t* __LIBCUDACXX_wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return (wchar_t*)wmemchr(__s, __c, __n);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+const wchar_t* wmemchr(const wchar_t* __s, wchar_t __c, size_t __n) {return __LIBCUDACXX_wmemchr(__s, __c, __n);}
+inline _LIBCUDACXX_INLINE_VISIBILITY _LIBCUDACXX_PREFERRED_OVERLOAD
+      wchar_t* wmemchr(      wchar_t* __s, wchar_t __c, size_t __n) {return __LIBCUDACXX_wmemchr(__s, __c, __n);}
 }
 #endif
 
-#if defined(__cplusplus) && (defined(_LIBCPP_MSVCRT_LIKE) || defined(__MVS__))
+#if defined(__cplusplus) && (defined(_LIBCUDACXX_MSVCRT_LIKE) || defined(__MVS__))
 extern "C" {
 size_t mbsnrtowcs(wchar_t *__restrict __dst, const char **__restrict __src,
                   size_t __nmc, size_t __len, mbstate_t *__restrict __ps);
 size_t wcsnrtombs(char *__restrict __dst, const wchar_t **__restrict __src,
                   size_t __nwc, size_t __len, mbstate_t *__restrict __ps);
 }  // extern "C"
-#endif  // __cplusplus && (_LIBCPP_MSVCRT || __MVS__)
+#endif  // __cplusplus && (_LIBCUDACXX_MSVCRT || __MVS__)
 
-#endif // _LIBCPP_WCHAR_H
+#endif // _LIBCUDACXX_WCHAR_H

diff  --git a/libcxx/include/wctype.h b/libcxx/include/wctype.h
index e4dc61ad5cf4..9d8f36d8caee 100644
--- a/libcxx/include/wctype.h
+++ b/libcxx/include/wctype.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_WCTYPE_H
-#define _LIBCPP_WCTYPE_H
+#ifndef _LIBCUDACXX_WCTYPE_H
+#define _LIBCUDACXX_WCTYPE_H
 
 /*
     wctype.h synopsis
@@ -46,11 +46,11 @@ wctrans_t wctrans(const char* property);
 
 #include <__config>
 
-#if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   error "The <wctype.h> header is not supported since libc++ has been configured with LIBCXX_ENABLE_WIDE_CHARACTERS disabled"
 #endif
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -65,7 +65,7 @@ wctrans_t wctrans(const char* property);
 // will fail because it does not refer to the same declaration.
 #if __has_include_next(<wctype.h>)
 #   include_next <wctype.h>
-#   define _LIBCPP_INCLUDED_C_LIBRARY_WCTYPE_H
+#   define _LIBCUDACXX_INCLUDED_C_LIBRARY_WCTYPE_H
 #endif
 
 #ifdef __cplusplus
@@ -91,4 +91,4 @@ wctrans_t wctrans(const char* property);
 
 #endif // __cplusplus
 
-#endif // _LIBCPP_WCTYPE_H
+#endif // _LIBCUDACXX_WCTYPE_H

diff  --git a/libcxx/lib/abi/CHANGELOG.TXT b/libcxx/lib/abi/CHANGELOG.TXT
index 5e65e943c6e9..b18b168eb5f4 100644
--- a/libcxx/lib/abi/CHANGELOG.TXT
+++ b/libcxx/lib/abi/CHANGELOG.TXT
@@ -27,32 +27,32 @@ Version 15.0
 
   All platforms
   -------------
-  Symbol removed: _ZNKSt3__111__libcpp_db15__decrementableEPKv
-  Symbol removed: _ZNKSt3__111__libcpp_db15__find_c_from_iEPv
-  Symbol removed: _ZNKSt3__111__libcpp_db15__subscriptableEPKvl
-  Symbol removed: _ZNKSt3__111__libcpp_db17__dereferenceableEPKv
-  Symbol removed: _ZNKSt3__111__libcpp_db17__find_c_and_lockEPv
-  Symbol removed: _ZNKSt3__111__libcpp_db22__less_than_comparableEPKvS2_
-  Symbol removed: _ZNKSt3__111__libcpp_db6unlockEv
-  Symbol removed: _ZNKSt3__111__libcpp_db8__find_cEPv
-  Symbol removed: _ZNKSt3__111__libcpp_db9__addableEPKvl
-  Symbol removed: _ZNKSt3__119__libcpp_debug_info4whatEv
-  Symbol removed: _ZNSt3__111__libcpp_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E
-  Symbol removed: _ZNSt3__111__libcpp_db10__insert_iEPv
-  Symbol removed: _ZNSt3__111__libcpp_db11__insert_icEPvPKv
-  Symbol removed: _ZNSt3__111__libcpp_db15__iterator_copyEPvPKv
-  Symbol removed: _ZNSt3__111__libcpp_db16__invalidate_allEPv
-  Symbol removed: _ZNSt3__111__libcpp_db4swapEPvS1_
-  Symbol removed: _ZNSt3__111__libcpp_db9__erase_cEPv
-  Symbol removed: _ZNSt3__111__libcpp_db9__erase_iEPv
-  Symbol removed: _ZNSt3__111__libcpp_dbC1Ev
-  Symbol removed: _ZNSt3__111__libcpp_dbC2Ev
-  Symbol removed: _ZNSt3__111__libcpp_dbD1Ev
-  Symbol removed: _ZNSt3__111__libcpp_dbD2Ev
+  Symbol removed: _ZNKSt3__111__LIBCUDACXX_db15__decrementableEPKv
+  Symbol removed: _ZNKSt3__111__LIBCUDACXX_db15__find_c_from_iEPv
+  Symbol removed: _ZNKSt3__111__LIBCUDACXX_db15__subscriptableEPKvl
+  Symbol removed: _ZNKSt3__111__LIBCUDACXX_db17__dereferenceableEPKv
+  Symbol removed: _ZNKSt3__111__LIBCUDACXX_db17__find_c_and_lockEPv
+  Symbol removed: _ZNKSt3__111__LIBCUDACXX_db22__less_than_comparableEPKvS2_
+  Symbol removed: _ZNKSt3__111__LIBCUDACXX_db6unlockEv
+  Symbol removed: _ZNKSt3__111__LIBCUDACXX_db8__find_cEPv
+  Symbol removed: _ZNKSt3__111__LIBCUDACXX_db9__addableEPKvl
+  Symbol removed: _ZNKSt3__119__LIBCUDACXX_debug_info4whatEv
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_db10__insert_iEPv
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_db11__insert_icEPvPKv
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_db15__iterator_copyEPvPKv
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_db16__invalidate_allEPv
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_db4swapEPvS1_
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_db9__erase_cEPv
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_db9__erase_iEPv
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_dbC1Ev
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_dbC2Ev
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_dbD1Ev
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_dbD2Ev
   Symbol removed: _ZNSt3__114__get_const_dbEv
-  Symbol removed: _ZNSt3__123__libcpp_debug_functionE
-  Symbol removed: _ZNSt3__127__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE
-  Symbol removed: _ZNSt3__129__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE
+  Symbol removed: _ZNSt3__123__LIBCUDACXX_debug_functionE
+  Symbol removed: _ZNSt3__127__LIBCUDACXX_set_debug_functionEPFvRKNS_19__LIBCUDACXX_debug_infoEE
+  Symbol removed: _ZNSt3__129__LIBCUDACXX_abort_debug_functionERKNS_19__LIBCUDACXX_debug_infoE
   Symbol removed: _ZNSt3__18__c_node5__addEPNS_8__i_nodeE
   Symbol removed: _ZNSt3__18__c_nodeD0Ev
   Symbol removed: _ZNSt3__18__c_nodeD1Ev
@@ -73,7 +73,7 @@ Version 15.0
 
   All platforms
   -------------
-  Symbol added: _ZNSt3__122__libcpp_verbose_abortEPKcz
+  Symbol added: _ZNSt3__122__LIBCUDACXX_verbose_abortEPKcz
 
 ------------
 Version 14.0
@@ -119,7 +119,7 @@ Version 14.0
   adds symbols to the library. Programs compiled against the library will not
   rely on the vtable being defined in it by default. Reliance on the vtable
   being in the shared library can be enabled by defining the
-  _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION macro.
+  _LIBCUDACXX_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION macro.
 
   Note that this commit also causes the libc++ shared library to start relying
   on std::exception::what() being provided. This is due to the fact that the
@@ -362,14 +362,14 @@ Version 10.0
 
   <arch>-apple-apple-darwin
   -------------------------
-  Symbol added: __ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEEx
-  Symbol added: __ZNSt3__120__libcpp_atomic_waitEPVKvx
+  Symbol added: __ZNSt3__120__LIBCUDACXX_atomic_waitEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEEx
+  Symbol added: __ZNSt3__120__LIBCUDACXX_atomic_waitEPVKvx
   Symbol added: __ZNSt3__123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE
   Symbol added: __ZNSt3__123__cxx_atomic_notify_allEPVKv
   Symbol added: __ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE
   Symbol added: __ZNSt3__123__cxx_atomic_notify_oneEPVKv
-  Symbol added: __ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE
-  Symbol added: __ZNSt3__123__libcpp_atomic_monitorEPVKv
+  Symbol added: __ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE
+  Symbol added: __ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKv
   Symbol added: __ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh
   Symbol added: __ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE
   Symbol added: __ZNSt3__134__construct_barrier_algorithm_baseERl
@@ -495,27 +495,27 @@ Version 9.0
 
   All Platforms (ignoring versioning namespaces)
   ----------------------------------------------
-  Symbol added: _ZNKSt3__119__libcpp_debug_info4whatEv
-  Symbol removed: _ZNKSt3__124__libcpp_debug_exception4whatEv
-  Symbol removed: _ZNSt3__124__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE
-  Symbol removed: _ZNSt3__124__libcpp_debug_exceptionC1ERKS0_
-  Symbol removed: _ZNSt3__124__libcpp_debug_exceptionC1Ev
-  Symbol removed: _ZNSt3__124__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE
-  Symbol removed: _ZNSt3__124__libcpp_debug_exceptionC2ERKS0_
-  Symbol removed: _ZNSt3__124__libcpp_debug_exceptionC2Ev
-  Symbol removed: _ZNSt3__124__libcpp_debug_exceptionD0Ev
-  Symbol removed: _ZNSt3__124__libcpp_debug_exceptionD1Ev
-  Symbol removed: _ZNSt3__124__libcpp_debug_exceptionD2Ev
-  Symbol removed: _ZNSt3__129__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE
-  Symbol removed: _ZTINSt3__124__libcpp_debug_exceptionE
-  Symbol removed: _ZTSNSt3__124__libcpp_debug_exceptionE
-  Symbol removed: _ZTVNSt3__124__libcpp_debug_exceptionE
+  Symbol added: _ZNKSt3__119__LIBCUDACXX_debug_info4whatEv
+  Symbol removed: _ZNKSt3__124__LIBCUDACXX_debug_exception4whatEv
+  Symbol removed: _ZNSt3__124__LIBCUDACXX_debug_exceptionC1ERKNS_19__LIBCUDACXX_debug_infoE
+  Symbol removed: _ZNSt3__124__LIBCUDACXX_debug_exceptionC1ERKS0_
+  Symbol removed: _ZNSt3__124__LIBCUDACXX_debug_exceptionC1Ev
+  Symbol removed: _ZNSt3__124__LIBCUDACXX_debug_exceptionC2ERKNS_19__LIBCUDACXX_debug_infoE
+  Symbol removed: _ZNSt3__124__LIBCUDACXX_debug_exceptionC2ERKS0_
+  Symbol removed: _ZNSt3__124__LIBCUDACXX_debug_exceptionC2Ev
+  Symbol removed: _ZNSt3__124__LIBCUDACXX_debug_exceptionD0Ev
+  Symbol removed: _ZNSt3__124__LIBCUDACXX_debug_exceptionD1Ev
+  Symbol removed: _ZNSt3__124__LIBCUDACXX_debug_exceptionD2Ev
+  Symbol removed: _ZNSt3__129__LIBCUDACXX_throw_debug_functionERKNS_19__LIBCUDACXX_debug_infoE
+  Symbol removed: _ZTINSt3__124__LIBCUDACXX_debug_exceptionE
+  Symbol removed: _ZTSNSt3__124__LIBCUDACXX_debug_exceptionE
+  Symbol removed: _ZTVNSt3__124__LIBCUDACXX_debug_exceptionE
 
 
     x86_64-apple-apple-darwin
     -------------------------
-    Symbol added: __ZNSt3__111__libcpp_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E
-    Symbol removed: __ZNSt3__111__libcpp_db10__insert_cEPv
+    Symbol added: __ZNSt3__111__LIBCUDACXX_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E
+    Symbol removed: __ZNSt3__111__LIBCUDACXX_db10__insert_cEPv
 
 * r355367 - Fix -fsanitize=vptr badness in <__debug>
 
@@ -528,8 +528,8 @@ Version 9.0
 
   All platforms
   -------------
-  Symbol added: _ZNSt3__111__libcpp_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E
-  Symbol removed: _ZNSt3__111__libcpp_db10__insert_cEPv
+  Symbol added: _ZNSt3__111__LIBCUDACXX_db10__insert_cEPvPFPNS_8__c_nodeES1_S1_S3_E
+  Symbol removed: _ZNSt3__111__LIBCUDACXX_db10__insert_cEPv
 
 -----------
 Version 8.0
@@ -710,27 +710,27 @@ Version 5.0
 Version 4.0
 -----------
 
-* r290651 - Add _LIBCPP_ASSERT debug handling functions
+* r290651 - Add _LIBCUDACXX_ASSERT debug handling functions
 
   All Platforms
   -------------
-  Symbol added: _ZNSt3__124__libcpp_debug_exceptionC2ERKNS_19__libcpp_debug_infoE
-  Symbol added: _ZNSt3__124__libcpp_debug_exceptionD1Ev
-  Symbol added: _ZTINSt3__124__libcpp_debug_exceptionE
-  Symbol added: _ZNSt3__129__libcpp_throw_debug_functionERKNS_19__libcpp_debug_infoE
-  Symbol added: _ZNSt3__124__libcpp_debug_exceptionD2Ev
-  Symbol added: _ZNSt3__129__libcpp_abort_debug_functionERKNS_19__libcpp_debug_infoE
-  Symbol added: _ZNSt3__124__libcpp_debug_exceptionC2ERKS0_
-  Symbol added: _ZNSt3__124__libcpp_debug_exceptionC1Ev
-  Symbol added: _ZNSt3__124__libcpp_debug_exceptionC1ERKNS_19__libcpp_debug_infoE
-  Symbol added: _ZNSt3__124__libcpp_debug_exceptionC2Ev
-  Symbol added: _ZTSNSt3__124__libcpp_debug_exceptionE
-  Symbol added: _ZNSt3__123__libcpp_debug_functionE
-  Symbol added: _ZNKSt3__124__libcpp_debug_exception4whatEv
-  Symbol added: _ZNSt3__124__libcpp_debug_exceptionC1ERKS0_
-  Symbol added: _ZNSt3__124__libcpp_debug_exceptionD0Ev
-  Symbol added: _ZTVNSt3__124__libcpp_debug_exceptionE
-  Symbol added: _ZNSt3__127__libcpp_set_debug_functionEPFvRKNS_19__libcpp_debug_infoEE
+  Symbol added: _ZNSt3__124__LIBCUDACXX_debug_exceptionC2ERKNS_19__LIBCUDACXX_debug_infoE
+  Symbol added: _ZNSt3__124__LIBCUDACXX_debug_exceptionD1Ev
+  Symbol added: _ZTINSt3__124__LIBCUDACXX_debug_exceptionE
+  Symbol added: _ZNSt3__129__LIBCUDACXX_throw_debug_functionERKNS_19__LIBCUDACXX_debug_infoE
+  Symbol added: _ZNSt3__124__LIBCUDACXX_debug_exceptionD2Ev
+  Symbol added: _ZNSt3__129__LIBCUDACXX_abort_debug_functionERKNS_19__LIBCUDACXX_debug_infoE
+  Symbol added: _ZNSt3__124__LIBCUDACXX_debug_exceptionC2ERKS0_
+  Symbol added: _ZNSt3__124__LIBCUDACXX_debug_exceptionC1Ev
+  Symbol added: _ZNSt3__124__LIBCUDACXX_debug_exceptionC1ERKNS_19__LIBCUDACXX_debug_infoE
+  Symbol added: _ZNSt3__124__LIBCUDACXX_debug_exceptionC2Ev
+  Symbol added: _ZTSNSt3__124__LIBCUDACXX_debug_exceptionE
+  Symbol added: _ZNSt3__123__LIBCUDACXX_debug_functionE
+  Symbol added: _ZNKSt3__124__LIBCUDACXX_debug_exception4whatEv
+  Symbol added: _ZNSt3__124__LIBCUDACXX_debug_exceptionC1ERKS0_
+  Symbol added: _ZNSt3__124__LIBCUDACXX_debug_exceptionD0Ev
+  Symbol added: _ZTVNSt3__124__LIBCUDACXX_debug_exceptionE
+  Symbol added: _ZNSt3__127__LIBCUDACXX_set_debug_functionEPFvRKNS_19__LIBCUDACXX_debug_infoEE
 
 * r288547 - Implement C++17 <variant>
 
@@ -750,8 +750,8 @@ Version 4.0
 
   x86_64-linux-gnu
   ----------------
-  Symbol removed: _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendIPcEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__libcpp_string_gets_noexcept_iteratorIS9_EE5valueERS5_E4typeES9_S9_
-  Symbol removed: _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendIPwEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__libcpp_string_gets_noexcept_iteratorIS9_EE5valueERS5_E4typeES9_S9_
+  Symbol removed: _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6appendIPcEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__LIBCUDACXX_string_gets_noexcept_iteratorIS9_EE5valueERS5_E4typeES9_S9_
+  Symbol removed: _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6appendIPwEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__LIBCUDACXX_string_gets_noexcept_iteratorIS9_EE5valueERS5_E4typeES9_S9_
 
   x86_64-apple-darwin16.0
   -----------------------
@@ -779,9 +779,9 @@ Version 4.0
   Symbol removed: _ZNSt3__115__codecvt_utf16IwLb1EED0Ev
   Symbol removed: _ZNSt3__117__assoc_sub_stateD0Ev
   Symbol removed: _ZNSt3__117__assoc_sub_stateD2Ev
-  Symbol removed: _ZNSt3__117__libcpp_sscanf_lEPKcP15__locale_structS1_z
-  Symbol removed: _ZNSt3__119__libcpp_asprintf_lEPPcP15__locale_structPKcz
-  Symbol removed: _ZNSt3__119__libcpp_snprintf_lEPcmP15__locale_structPKcz
+  Symbol removed: _ZNSt3__117__LIBCUDACXX_sscanf_lEPKcP15__locale_structS1_z
+  Symbol removed: _ZNSt3__119__LIBCUDACXX_asprintf_lEPPcP15__locale_structPKcz
+  Symbol removed: _ZNSt3__119__LIBCUDACXX_snprintf_lEPcmP15__locale_structPKcz
   Symbol removed: _ZNSt3__120__codecvt_utf8_utf16IDiED0Ev
   Symbol removed: _ZNSt3__120__codecvt_utf8_utf16IDsED0Ev
   Symbol removed: _ZNSt3__120__codecvt_utf8_utf16IwED0Ev
@@ -836,7 +836,7 @@ Version 4.0
 
   x86_64-linux-gnu
   ----------------
-  Symbol removed: _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertIPKcEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__libcpp_string_gets_noexcept_iteratorISA_EE5valueENS_11__wrap_iterIPcEEE4typeENSB_IS8_EESA_SA_
+  Symbol removed: _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE6insertIPKcEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__LIBCUDACXX_string_gets_noexcept_iteratorISA_EE5valueENS_11__wrap_iterIPcEEE4typeENSB_IS8_EESA_SA_
   Symbol removed: _ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE7replaceIPKcEENS_9enable_ifIXsr19__is_input_iteratorIT_EE5valueERS5_E4typeENS_11__wrap_iterIS8_EESF_SA_SA_
-  Symbol removed: _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertIPKwEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__libcpp_string_gets_noexcept_iteratorISA_EE5valueENS_11__wrap_iterIPwEEE4typeENSB_IS8_EESA_SA_
+  Symbol removed: _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE6insertIPKwEENS_9enable_ifIXaasr21__is_forward_iteratorIT_EE5valuesr38__LIBCUDACXX_string_gets_noexcept_iteratorISA_EE5valueENS_11__wrap_iterIPwEEE4typeENSB_IS8_EESA_SA_
   Symbol removed: _ZNSt3__112basic_stringIwNS_11char_traitsIwEENS_9allocatorIwEEE7replaceIPKwEENS_9enable_ifIXsr19__is_input_iteratorIT_EE5valueERS5_E4typeENS_11__wrap_iterIS8_EESF_SA_SA_

diff  --git a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
index 50cbe4c2b013..729fed0d676e 100644
--- a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1514,8 +1514,8 @@
 {'is_defined': True, 'name': '__ZNSt3__119declare_no_pointersEPcm', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__119piecewise_constructE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'}
-{'is_defined': True, 'name': '__ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEEx', 'type': 'FUNC'}
-{'is_defined': True, 'name': '__ZNSt3__120__libcpp_atomic_waitEPVKvx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '__ZNSt3__120__LIBCUDACXX_atomic_waitEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEEx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '__ZNSt3__120__LIBCUDACXX_atomic_waitEPVKvx', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__120__throw_system_errorEiPKc', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__121__throw_runtime_errorEPKc', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__121__undeclare_reachableEPv', 'type': 'FUNC'}
@@ -1531,10 +1531,10 @@
 {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_oneEPVKv', 'type': 'FUNC'}
-{'is_defined': True, 'name': '__ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'}
-{'is_defined': True, 'name': '__ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '__ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '__ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKv', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'}
-{'is_defined': True, 'name': '__ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'}
+{'is_defined': True, 'name': '__ZNSt3__122__LIBCUDACXX_verbose_abortEPKcz', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'type': 'FUNC'}

diff  --git a/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
index 56ec7aaa171d..d604e23151a8 100644
--- a/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -549,8 +549,8 @@
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119declare_no_pointersEPcm', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119piecewise_constructE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
-{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
-{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKvi', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
+{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__LIBCUDACXX_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
+{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__LIBCUDACXX_atomic_waitEPVKvi', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__throw_system_errorEiPKc', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__121__throw_runtime_errorEPKc', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__121__undeclare_reachableEPv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
@@ -566,8 +566,8 @@
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
-{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
-{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
+{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
+{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
@@ -1678,7 +1678,7 @@
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
-{'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
+{'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__122__LIBCUDACXX_verbose_abortEPKcz', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}

diff  --git a/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
index 9d30600440bd..4435fe768ffb 100644
--- a/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -549,8 +549,8 @@
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119declare_no_pointersEPcm', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__119piecewise_constructE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
-{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEEl', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
-{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKvl', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
+{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__LIBCUDACXX_atomic_waitEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEEl', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
+{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__LIBCUDACXX_atomic_waitEPVKvl', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__120__throw_system_errorEiPKc', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__121__throw_runtime_errorEPKc', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__121__undeclare_reachableEPv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
@@ -566,8 +566,8 @@
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
-{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
-{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
+{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
+{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
@@ -1678,7 +1678,7 @@
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
-{'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
+{'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__122__LIBCUDACXX_verbose_abortEPKcz', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}
 {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'storage_mapping_class': 'DS', 'type': 'FUNC'}

diff  --git a/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
index d0e8b7347172..c9b2883a4a00 100644
--- a/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/x86_64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1514,8 +1514,8 @@
 {'is_defined': True, 'name': '__ZNSt3__119declare_no_pointersEPcm', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__119piecewise_constructE', 'size': 0, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '__ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'}
-{'is_defined': True, 'name': '__ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEEx', 'type': 'FUNC'}
-{'is_defined': True, 'name': '__ZNSt3__120__libcpp_atomic_waitEPVKvx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '__ZNSt3__120__LIBCUDACXX_atomic_waitEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEEx', 'type': 'FUNC'}
+{'is_defined': True, 'name': '__ZNSt3__120__LIBCUDACXX_atomic_waitEPVKvx', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__120__throw_system_errorEiPKc', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__121__throw_runtime_errorEPKc', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__121__undeclare_reachableEPv', 'type': 'FUNC'}
@@ -1531,10 +1531,10 @@
 {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_oneEPVKv', 'type': 'FUNC'}
-{'is_defined': True, 'name': '__ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'}
-{'is_defined': True, 'name': '__ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '__ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '__ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKv', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'}
-{'is_defined': True, 'name': '__ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'}
+{'is_defined': True, 'name': '__ZNSt3__122__LIBCUDACXX_verbose_abortEPKcz', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'type': 'FUNC'}
 {'is_defined': True, 'name': '__ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'type': 'FUNC'}

diff  --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist
index 8de5a0b4da94..dc9bbec5c4fc 100644
--- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist
+++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist
@@ -1205,8 +1205,8 @@
 {'is_defined': True, 'name': '_ZNSt3__119declare_no_pointersEPcm', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__119piecewise_constructE', 'size': 1, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'}
-{'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'}
-{'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKvi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__120__LIBCUDACXX_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__120__LIBCUDACXX_atomic_waitEPVKvi', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__120__throw_system_errorEiPKc', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__121__throw_runtime_errorEPKc', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__121__undeclare_reachableEPv', 'type': 'FUNC'}
@@ -1222,10 +1222,10 @@
 {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKv', 'type': 'FUNC'}
-{'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'}
-{'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKv', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'}
-{'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__122__LIBCUDACXX_verbose_abortEPKcz', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'type': 'FUNC'}

diff  --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist
index 90d9a665a1c7..accdf5aee29e 100644
--- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist
+++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist
@@ -1177,8 +1177,8 @@
 {'is_defined': True, 'name': '_ZNSt3__119declare_no_pointersEPcm', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__119piecewise_constructE', 'size': 1, 'type': 'OBJECT'}
 {'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'}
-{'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'}
-{'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKvi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__120__LIBCUDACXX_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__120__LIBCUDACXX_atomic_waitEPVKvi', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__120__throw_system_errorEiPKc', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__121__throw_runtime_errorEPKc', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__121__undeclare_reachableEPv', 'type': 'FUNC'}
@@ -1194,10 +1194,10 @@
 {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKv', 'type': 'FUNC'}
-{'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'}
-{'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__123__LIBCUDACXX_atomic_monitorEPVKv', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'}
-{'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'}
+{'is_defined': True, 'name': '_ZNSt3__122__LIBCUDACXX_verbose_abortEPKcz', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIaaEEPaEEbT0_S5_T_', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIccEEPcEEbT0_S5_T_', 'type': 'FUNC'}
 {'is_defined': True, 'name': '_ZNSt3__127__insertion_sort_incompleteIRNS_6__lessIddEEPdEEbT0_S5_T_', 'type': 'FUNC'}

diff  --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt
index 9abf548abbb9..1e3642bc233f 100644
--- a/libcxx/src/CMakeLists.txt
+++ b/libcxx/src/CMakeLists.txt
@@ -302,9 +302,9 @@ if (LIBCXX_ENABLE_STATIC)
       append_flags_if_supported(CXX_STATIC_LIBRARY_FLAGS -fvisibility-global-new-delete-hidden)
     endif()
     target_compile_options(cxx_static PRIVATE ${CXX_STATIC_LIBRARY_FLAGS})
-    # _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS can be defined in __config_site
+    # _LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS can be defined in __config_site
     # too. Define it in the same way here, to avoid redefinition conflicts.
-    target_compile_definitions(cxx_static PRIVATE _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS=)
+    target_compile_definitions(cxx_static PRIVATE _LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS=)
   endif()
 
   list(APPEND LIBCXX_BUILD_TARGETS "cxx_static")
@@ -331,9 +331,9 @@ else()
 endif()
 
 if (LIBCXX_HERMETIC_STATIC_LIBRARY)
-  # _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS can be defined in __config_site
+  # _LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS can be defined in __config_site
   # too. Define it in the same way here, to avoid redefinition conflicts.
-  target_compile_definitions(cxx_experimental PRIVATE _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS=)
+  target_compile_definitions(cxx_experimental PRIVATE _LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS=)
 endif()
 
 set_target_properties(cxx_experimental
@@ -342,7 +342,7 @@ set_target_properties(cxx_experimental
     OUTPUT_NAME   "c++experimental"
 )
 cxx_add_common_build_flags(cxx_experimental)
-target_compile_options(cxx_experimental PUBLIC -D_LIBCPP_ENABLE_EXPERIMENTAL)
+target_compile_options(cxx_experimental PUBLIC -D_LIBCUDACXX_ENABLE_EXPERIMENTAL)
 
 
 if (LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY)

diff  --git a/libcxx/src/algorithm.cpp b/libcxx/src/algorithm.cpp
index bd47e08b3805..7a442a5661cf 100644
--- a/libcxx/src/algorithm.cpp
+++ b/libcxx/src/algorithm.cpp
@@ -8,12 +8,12 @@
 
 #include <algorithm>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // TODO(varconst): this currently doesn't benefit `ranges::sort` because it uses `ranges::less` instead of `__less`.
 
 template void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
 #endif
 template void __sort<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
@@ -31,7 +31,7 @@ template void __sort<__less<double>&, double*>(double*, double*, __less<double>&
 template void __sort<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
 
 template bool __insertion_sort_incomplete<__less<char>&, char*>(char*, char*, __less<char>&);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template bool __insertion_sort_incomplete<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
 #endif
 template bool __insertion_sort_incomplete<__less<signed char>&, signed char*>(signed char*, signed char*, __less<signed char>&);
@@ -50,4 +50,4 @@ template bool __insertion_sort_incomplete<__less<long double>&, long double*>(lo
 
 template unsigned __sort5<__less<long double>&, long double*>(long double*, long double*, long double*, long double*, long double*, __less<long double>&);
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/any.cpp b/libcxx/src/any.cpp
index 9a101b44a71a..f2e36c7a03b6 100644
--- a/libcxx/src/any.cpp
+++ b/libcxx/src/any.cpp
@@ -19,9 +19,9 @@ const char* bad_any_cast::what() const noexcept {
 
 //  Preserve std::experimental::any_bad_cast for ABI compatibility
 //  Even though it no longer exists in a header file
-_LIBCPP_BEGIN_NAMESPACE_LFTS
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS
 
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
+class _LIBCUDACXX_EXCEPTION_ABI _LIBCUDACXX_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast
 {
 public:
     virtual const char* what() const noexcept;
@@ -31,4 +31,4 @@ const char* bad_any_cast::what() const noexcept {
     return "bad any cast";
 }
 
-_LIBCPP_END_NAMESPACE_LFTS
+_LIBCUDACXX_END_NAMESPACE_LFTS

diff  --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp
index 250d33e98b02..013b4075c937 100644
--- a/libcxx/src/atomic.cpp
+++ b/libcxx/src/atomic.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include <__config>
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 
 #include <atomic>
 #include <climits>
@@ -32,24 +32,24 @@
 
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #ifdef __linux__
 
-static void __libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr,
+static void __LIBCUDACXX_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr,
                                               __cxx_contention_t __val)
 {
     static constexpr timespec __timeout = { 2, 0 };
     syscall(SYS_futex, __ptr, FUTEX_WAIT_PRIVATE, __val, &__timeout, 0, 0);
 }
 
-static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const volatile* __ptr,
+static void __LIBCUDACXX_platform_wake_by_address(__cxx_atomic_contention_t const volatile* __ptr,
                                               bool __notify_one)
 {
     syscall(SYS_futex, __ptr, FUTEX_WAKE_PRIVATE, __notify_one ? 1 : INT_MAX, 0, 0, 0);
 }
 
-#elif defined(__APPLE__) && defined(_LIBCPP_USE_ULOCK)
+#elif defined(__APPLE__) && defined(_LIBCUDACXX_USE_ULOCK)
 
 extern "C" int __ulock_wait(uint32_t operation, void *addr, uint64_t value,
 		uint32_t timeout); /* timeout is specified in microseconds */
@@ -58,14 +58,14 @@ extern "C" int __ulock_wake(uint32_t operation, void *addr, uint64_t wake_value)
 #define UL_COMPARE_AND_WAIT				1
 #define ULF_WAKE_ALL					0x00000100
 
-static void __libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr,
+static void __LIBCUDACXX_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr,
                                               __cxx_contention_t __val)
 {
     __ulock_wait(UL_COMPARE_AND_WAIT,
                  const_cast<__cxx_atomic_contention_t*>(__ptr), __val, 0);
 }
 
-static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const volatile* __ptr,
+static void __LIBCUDACXX_platform_wake_by_address(__cxx_atomic_contention_t const volatile* __ptr,
                                               bool __notify_one)
 {
     __ulock_wake(UL_COMPARE_AND_WAIT | (__notify_one ? 0 : ULF_WAKE_ALL),
@@ -76,119 +76,119 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo
 
 // Baseline is just a timed backoff
 
-static void __libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr,
+static void __LIBCUDACXX_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr,
                                               __cxx_contention_t __val)
 {
-    __libcpp_thread_poll_with_backoff([=]() -> bool {
+    __LIBCUDACXX_thread_poll_with_backoff([=]() -> bool {
         return !__cxx_nonatomic_compare_equal(__cxx_atomic_load(__ptr, memory_order_relaxed), __val);
-    }, __libcpp_timed_backoff_policy());
+    }, __LIBCUDACXX_timed_backoff_policy());
 }
 
-static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const volatile*, bool) { }
+static void __LIBCUDACXX_platform_wake_by_address(__cxx_atomic_contention_t const volatile*, bool) { }
 
 #endif // __linux__
 
-static constexpr size_t __libcpp_contention_table_size = (1 << 8);  /* < there's no magic in this number */
+static constexpr size_t __LIBCUDACXX_contention_table_size = (1 << 8);  /* < there's no magic in this number */
 
-struct alignas(64) /*  aim to avoid false sharing */ __libcpp_contention_table_entry
+struct alignas(64) /*  aim to avoid false sharing */ __LIBCUDACXX_contention_table_entry
 {
     __cxx_atomic_contention_t __contention_state;
     __cxx_atomic_contention_t __platform_state;
-    inline constexpr __libcpp_contention_table_entry() :
+    inline constexpr __LIBCUDACXX_contention_table_entry() :
         __contention_state(0), __platform_state(0) { }
 };
 
-static __libcpp_contention_table_entry __libcpp_contention_table[ __libcpp_contention_table_size ];
+static __LIBCUDACXX_contention_table_entry __LIBCUDACXX_contention_table[ __LIBCUDACXX_contention_table_size ];
 
-static hash<void const volatile*> __libcpp_contention_hasher;
+static hash<void const volatile*> __LIBCUDACXX_contention_hasher;
 
-static __libcpp_contention_table_entry* __libcpp_contention_state(void const volatile * p)
+static __LIBCUDACXX_contention_table_entry* __LIBCUDACXX_contention_state(void const volatile * p)
 {
-    return &__libcpp_contention_table[__libcpp_contention_hasher(p) & (__libcpp_contention_table_size - 1)];
+    return &__LIBCUDACXX_contention_table[__LIBCUDACXX_contention_hasher(p) & (__LIBCUDACXX_contention_table_size - 1)];
 }
 
 /* Given an atomic to track contention and an atomic to actually wait on, which may be
    the same atomic, we try to detect contention to avoid spuriously calling the platform. */
 
-static void __libcpp_contention_notify(__cxx_atomic_contention_t volatile* __contention_state,
+static void __LIBCUDACXX_contention_notify(__cxx_atomic_contention_t volatile* __contention_state,
                                        __cxx_atomic_contention_t const volatile* __platform_state,
                                        bool __notify_one)
 {
     if(0 != __cxx_atomic_load(__contention_state, memory_order_seq_cst))
         // We only call 'wake' if we consumed a contention bit here.
-        __libcpp_platform_wake_by_address(__platform_state, __notify_one);
+        __LIBCUDACXX_platform_wake_by_address(__platform_state, __notify_one);
 }
-static __cxx_contention_t __libcpp_contention_monitor_for_wait(__cxx_atomic_contention_t volatile* __contention_state,
+static __cxx_contention_t __LIBCUDACXX_contention_monitor_for_wait(__cxx_atomic_contention_t volatile* __contention_state,
                                                                __cxx_atomic_contention_t const volatile* __platform_state)
 {
     // We will monitor this value.
     return __cxx_atomic_load(__platform_state, memory_order_acquire);
 }
-static void __libcpp_contention_wait(__cxx_atomic_contention_t volatile* __contention_state,
+static void __LIBCUDACXX_contention_wait(__cxx_atomic_contention_t volatile* __contention_state,
                                      __cxx_atomic_contention_t const volatile* __platform_state,
                                      __cxx_contention_t __old_value)
 {
     __cxx_atomic_fetch_add(__contention_state, __cxx_contention_t(1), memory_order_seq_cst);
     // We sleep as long as the monitored value hasn't changed.
-    __libcpp_platform_wait_on_address(__platform_state, __old_value);
+    __LIBCUDACXX_platform_wait_on_address(__platform_state, __old_value);
     __cxx_atomic_fetch_sub(__contention_state, __cxx_contention_t(1), memory_order_release);
 }
 
 /* When the incoming atomic is the wrong size for the platform wait size, need to
    launder the value sequence through an atomic from our table. */
 
-static void __libcpp_atomic_notify(void const volatile* __location)
+static void __LIBCUDACXX_atomic_notify(void const volatile* __location)
 {
-    auto const __entry = __libcpp_contention_state(__location);
+    auto const __entry = __LIBCUDACXX_contention_state(__location);
     // The value sequence laundering happens on the next line below.
     __cxx_atomic_fetch_add(&__entry->__platform_state, __cxx_contention_t(1), memory_order_release);
-    __libcpp_contention_notify(&__entry->__contention_state,
+    __LIBCUDACXX_contention_notify(&__entry->__contention_state,
                                &__entry->__platform_state,
                                false /* when laundering, we can't handle notify_one */);
 }
-_LIBCPP_EXPORTED_FROM_ABI
+_LIBCUDACXX_EXPORTED_FROM_ABI
 void __cxx_atomic_notify_one(void const volatile* __location)
-    { __libcpp_atomic_notify(__location); }
-_LIBCPP_EXPORTED_FROM_ABI
+    { __LIBCUDACXX_atomic_notify(__location); }
+_LIBCUDACXX_EXPORTED_FROM_ABI
 void __cxx_atomic_notify_all(void const volatile* __location)
-    { __libcpp_atomic_notify(__location); }
-_LIBCPP_EXPORTED_FROM_ABI
-__cxx_contention_t __libcpp_atomic_monitor(void const volatile* __location)
+    { __LIBCUDACXX_atomic_notify(__location); }
+_LIBCUDACXX_EXPORTED_FROM_ABI
+__cxx_contention_t __LIBCUDACXX_atomic_monitor(void const volatile* __location)
 {
-    auto const __entry = __libcpp_contention_state(__location);
-    return __libcpp_contention_monitor_for_wait(&__entry->__contention_state, &__entry->__platform_state);
+    auto const __entry = __LIBCUDACXX_contention_state(__location);
+    return __LIBCUDACXX_contention_monitor_for_wait(&__entry->__contention_state, &__entry->__platform_state);
 }
-_LIBCPP_EXPORTED_FROM_ABI
-void __libcpp_atomic_wait(void const volatile* __location, __cxx_contention_t __old_value)
+_LIBCUDACXX_EXPORTED_FROM_ABI
+void __LIBCUDACXX_atomic_wait(void const volatile* __location, __cxx_contention_t __old_value)
 {
-    auto const __entry = __libcpp_contention_state(__location);
-    __libcpp_contention_wait(&__entry->__contention_state, &__entry->__platform_state, __old_value);
+    auto const __entry = __LIBCUDACXX_contention_state(__location);
+    __LIBCUDACXX_contention_wait(&__entry->__contention_state, &__entry->__platform_state, __old_value);
 }
 
 /* When the incoming atomic happens to be the platform wait size, we still need to use the
    table for the contention detection, but we can use the atomic directly for the wait. */
 
-_LIBCPP_EXPORTED_FROM_ABI
+_LIBCUDACXX_EXPORTED_FROM_ABI
 void __cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile* __location)
 {
-    __libcpp_contention_notify(&__libcpp_contention_state(__location)->__contention_state, __location, true);
+    __LIBCUDACXX_contention_notify(&__LIBCUDACXX_contention_state(__location)->__contention_state, __location, true);
 }
-_LIBCPP_EXPORTED_FROM_ABI
+_LIBCUDACXX_EXPORTED_FROM_ABI
 void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile* __location)
 {
-    __libcpp_contention_notify(&__libcpp_contention_state(__location)->__contention_state, __location, false);
+    __LIBCUDACXX_contention_notify(&__LIBCUDACXX_contention_state(__location)->__contention_state, __location, false);
 }
-_LIBCPP_EXPORTED_FROM_ABI
-__cxx_contention_t __libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile* __location)
+_LIBCUDACXX_EXPORTED_FROM_ABI
+__cxx_contention_t __LIBCUDACXX_atomic_monitor(__cxx_atomic_contention_t const volatile* __location)
 {
-    return __libcpp_contention_monitor_for_wait(&__libcpp_contention_state(__location)->__contention_state, __location);
+    return __LIBCUDACXX_contention_monitor_for_wait(&__LIBCUDACXX_contention_state(__location)->__contention_state, __location);
 }
-_LIBCPP_EXPORTED_FROM_ABI
-void __libcpp_atomic_wait(__cxx_atomic_contention_t const volatile* __location, __cxx_contention_t __old_value)
+_LIBCUDACXX_EXPORTED_FROM_ABI
+void __LIBCUDACXX_atomic_wait(__cxx_atomic_contention_t const volatile* __location, __cxx_contention_t __old_value)
 {
-    __libcpp_contention_wait(&__libcpp_contention_state(__location)->__contention_state, __location, __old_value);
+    __LIBCUDACXX_contention_wait(&__LIBCUDACXX_contention_state(__location)->__contention_state, __location, __old_value);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif //_LIBCPP_HAS_NO_THREADS
+#endif //_LIBCUDACXX_HAS_NO_THREADS

diff  --git a/libcxx/src/barrier.cpp b/libcxx/src/barrier.cpp
index 8ce2c043cf81..28330e0c6175 100644
--- a/libcxx/src/barrier.cpp
+++ b/libcxx/src/barrier.cpp
@@ -8,14 +8,14 @@
 
 #include <__config>
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 
 #include <barrier>
 #include <thread>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if !defined(_LIBCPP_HAS_NO_TREE_BARRIER)
+#if !defined(_LIBCUDACXX_HAS_NO_TREE_BARRIER)
 
 class __barrier_algorithm_base {
 public:
@@ -29,14 +29,14 @@ class __barrier_algorithm_base {
     ptr
diff _t&              __expected;
     unique_ptr<__state_t[]> __state;
 
-    _LIBCPP_HIDDEN
+    _LIBCUDACXX_HIDDEN
     __barrier_algorithm_base(ptr
diff _t& __expected)
         : __expected(__expected)
     {
         size_t const __count = (__expected + 1) >> 1;
         __state = unique_ptr<__state_t[]>(new __state_t[__count]);
     }
-    _LIBCPP_HIDDEN
+    _LIBCUDACXX_HIDDEN
     bool __arrive(__barrier_phase_t __old_phase)
     {
         __barrier_phase_t const __half_step = __old_phase + 1,
@@ -73,25 +73,25 @@ class __barrier_algorithm_base {
     }
 };
 
-_LIBCPP_EXPORTED_FROM_ABI
+_LIBCUDACXX_EXPORTED_FROM_ABI
 __barrier_algorithm_base * __construct_barrier_algorithm_base(ptr
diff _t& __expected)
 {
     return new __barrier_algorithm_base(__expected);
 }
-_LIBCPP_EXPORTED_FROM_ABI
+_LIBCUDACXX_EXPORTED_FROM_ABI
 bool __arrive_barrier_algorithm_base(__barrier_algorithm_base* __barrier,
                                      __barrier_phase_t __old_phase)
 {
     return __barrier->__arrive(__old_phase);
 }
-_LIBCPP_EXPORTED_FROM_ABI
+_LIBCUDACXX_EXPORTED_FROM_ABI
 void __destroy_barrier_algorithm_base(__barrier_algorithm_base* __barrier)
 {
     delete __barrier;
 }
 
-#endif // !defined(_LIBCPP_HAS_NO_TREE_BARRIER)
+#endif // !defined(_LIBCUDACXX_HAS_NO_TREE_BARRIER)
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif //_LIBCPP_HAS_NO_THREADS
+#endif //_LIBCUDACXX_HAS_NO_THREADS

diff  --git a/libcxx/src/bind.cpp b/libcxx/src/bind.cpp
index 0e217e5fc5d6..bd274b1ac51f 100644
--- a/libcxx/src/bind.cpp
+++ b/libcxx/src/bind.cpp
@@ -8,7 +8,7 @@
 
 #include <functional>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace placeholders
 {
@@ -26,4 +26,4 @@ const __ph<10> _10{};
 
 }  // placeholders
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/charconv.cpp b/libcxx/src/charconv.cpp
index 05ee2cbd4ac8..282c2a5f8730 100644
--- a/libcxx/src/charconv.cpp
+++ b/libcxx/src/charconv.cpp
@@ -11,20 +11,20 @@
 
 #include "include/to_chars_floating_point.h"
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_ABI_DO_NOT_EXPORT_TO_CHARS_BASE_10
+#ifndef _LIBCUDACXX_ABI_DO_NOT_EXPORT_TO_CHARS_BASE_10
 
 namespace __itoa
 {
 
-_LIBCPP_FUNC_VIS char*
+_LIBCUDACXX_FUNC_VIS char*
 __u32toa(uint32_t value, char* buffer) noexcept
 {
 	return __base_10_u32(buffer, value);
 }
 
-_LIBCPP_FUNC_VIS char*
+_LIBCUDACXX_FUNC_VIS char*
 __u64toa(uint64_t value, char* buffer) noexcept
 {
 	return __base_10_u64(buffer, value);
@@ -32,7 +32,7 @@ __u64toa(uint64_t value, char* buffer) noexcept
 
 }  // namespace __itoa
 
-#endif // _LIBCPP_ABI_DO_NOT_EXPORT_TO_CHARS_BASE_10
+#endif // _LIBCUDACXX_ABI_DO_NOT_EXPORT_TO_CHARS_BASE_10
 
 // The original version of floating-point to_chars was written by Microsoft and
 // contributed with the following license.
@@ -83,4 +83,4 @@ to_chars_result to_chars(char* __first, char* __last, long double __value, chars
       __first, __last, static_cast<double>(__value), __fmt, __precision);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/chrono.cpp b/libcxx/src/chrono.cpp
index 0af89d6a526c..b4372c194f62 100644
--- a/libcxx/src/chrono.cpp
+++ b/libcxx/src/chrono.cpp
@@ -32,17 +32,17 @@
 #endif
 
 #if !defined(__APPLE__) && defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0
-# define _LIBCPP_USE_CLOCK_GETTIME
+# define _LIBCUDACXX_USE_CLOCK_GETTIME
 #endif
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 #  define WIN32_LEAN_AND_MEAN
 #  define VC_EXTRA_LEAN
 #  include <windows.h>
 #  if _WIN32_WINNT >= _WIN32_WINNT_WIN8
 #    include <winapifamily.h>
 #  endif
-#endif // defined(_LIBCPP_WIN32API)
+#endif // defined(_LIBCUDACXX_WIN32API)
 
 #if defined(__Fuchsia__)
 #  include <zircon/syscalls.h>
@@ -52,11 +52,11 @@
 # include <mach/mach_time.h>
 #endif
 
-#if defined(__ELF__) && defined(_LIBCPP_LINK_RT_LIB)
+#if defined(__ELF__) && defined(_LIBCUDACXX_LINK_RT_LIB)
 #  pragma comment(lib, "rt")
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace chrono
 {
@@ -65,7 +65,7 @@ namespace chrono
 // system_clock
 //
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 
 #if _WIN32_WINNT < _WIN32_WINNT_WIN8
 
@@ -91,15 +91,15 @@ class GetSystemTimeInit {
 
 #endif
 
-static system_clock::time_point __libcpp_system_clock_now() {
+static system_clock::time_point __LIBCUDACXX_system_clock_now() {
   // FILETIME is in 100ns units
   using filetime_duration =
-      _VSTD::chrono::duration<__int64,
-                              _VSTD::ratio_multiply<_VSTD::ratio<100, 1>,
+      _CUDA_VSTD::chrono::duration<__int64,
+                              _CUDA_VSTD::ratio_multiply<_CUDA_VSTD::ratio<100, 1>,
                                                     nanoseconds::period>>;
 
   // The Windows epoch is Jan 1 1601, the Unix epoch Jan 1 1970.
-  static _LIBCPP_CONSTEXPR const seconds nt_to_unix_epoch{11644473600};
+  static _LIBCUDACXX_CONSTEXPR const seconds nt_to_unix_epoch{11644473600};
 
   FILETIME ft;
 #if (_WIN32_WINNT >= _WIN32_WINNT_WIN8 && WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)) || \
@@ -116,9 +116,9 @@ static system_clock::time_point __libcpp_system_clock_now() {
   return system_clock::time_point(duration_cast<system_clock::duration>(d - nt_to_unix_epoch));
 }
 
-#elif defined(CLOCK_REALTIME) && defined(_LIBCPP_USE_CLOCK_GETTIME)
+#elif defined(CLOCK_REALTIME) && defined(_LIBCUDACXX_USE_CLOCK_GETTIME)
 
-static system_clock::time_point __libcpp_system_clock_now() {
+static system_clock::time_point __LIBCUDACXX_system_clock_now() {
   struct timespec tp;
   if (0 != clock_gettime(CLOCK_REALTIME, &tp))
     __throw_system_error(errno, "clock_gettime(CLOCK_REALTIME) failed");
@@ -127,7 +127,7 @@ static system_clock::time_point __libcpp_system_clock_now() {
 
 #else
 
-static system_clock::time_point __libcpp_system_clock_now() {
+static system_clock::time_point __LIBCUDACXX_system_clock_now() {
     timeval tv;
     gettimeofday(&tv, 0);
     return system_clock::time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
@@ -140,7 +140,7 @@ const bool system_clock::is_steady;
 system_clock::time_point
 system_clock::now() noexcept
 {
-    return __libcpp_system_clock_now();
+    return __LIBCUDACXX_system_clock_now();
 }
 
 time_t
@@ -163,7 +163,7 @@ system_clock::from_time_t(time_t t) noexcept
 //  instead.
 //
 
-#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
+#ifndef _LIBCUDACXX_HAS_NO_MONOTONIC_CLOCK
 
 #if defined(__APPLE__)
 
@@ -176,10 +176,10 @@ system_clock::from_time_t(time_t t) noexcept
     (defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ < 100000) || \
     (defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ < 100000) || \
     (defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__) && __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ < 30000)
-# define _LIBCPP_USE_OLD_MACH_ABSOLUTE_TIME
+# define _LIBCUDACXX_USE_OLD_MACH_ABSOLUTE_TIME
 #endif
 
-#if defined(_LIBCPP_USE_OLD_MACH_ABSOLUTE_TIME)
+#if defined(_LIBCUDACXX_USE_OLD_MACH_ABSOLUTE_TIME)
 
 //   mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of
 //   nanoseconds since the computer booted up.  MachInfo.numer and MachInfo.denom
@@ -213,7 +213,7 @@ static FP init_steady_clock() {
     return &steady_full;
 }
 
-static steady_clock::time_point __libcpp_steady_clock_now() {
+static steady_clock::time_point __LIBCUDACXX_steady_clock_now() {
     static FP fp = init_steady_clock();
     return steady_clock::time_point(steady_clock::duration(fp()));
 }
@@ -225,7 +225,7 @@ static steady_clock::time_point __libcpp_steady_clock_now() {
 // Furthermore, only CLOCK_MONOTONIC_RAW is truly monotonic, because it
 // also counts cycles when the system is asleep. Thus, it is the only
 // acceptable implementation of steady_clock.
-static steady_clock::time_point __libcpp_steady_clock_now() {
+static steady_clock::time_point __LIBCUDACXX_steady_clock_now() {
     struct timespec tp;
     if (0 != clock_gettime(CLOCK_MONOTONIC_RAW, &tp))
         __throw_system_error(errno, "clock_gettime(CLOCK_MONOTONIC_RAW) failed");
@@ -234,7 +234,7 @@ static steady_clock::time_point __libcpp_steady_clock_now() {
 
 #endif
 
-#elif defined(_LIBCPP_WIN32API)
+#elif defined(_LIBCUDACXX_WIN32API)
 
 // https://msdn.microsoft.com/en-us/library/windows/desktop/ms644905(v=vs.85).aspx says:
 //    If the function fails, the return value is zero. <snip>
@@ -249,7 +249,7 @@ __QueryPerformanceFrequency()
     return val;
 }
 
-static steady_clock::time_point __libcpp_steady_clock_now() {
+static steady_clock::time_point __LIBCUDACXX_steady_clock_now() {
   static const LARGE_INTEGER freq = __QueryPerformanceFrequency();
 
   LARGE_INTEGER counter;
@@ -262,7 +262,7 @@ static steady_clock::time_point __libcpp_steady_clock_now() {
 
 #elif defined(__MVS__)
 
-static steady_clock::time_point __libcpp_steady_clock_now() {
+static steady_clock::time_point __LIBCUDACXX_steady_clock_now() {
   struct timespec64 ts;
   if (0 != gettimeofdayMonotonic(&ts))
     __throw_system_error(errno, "failed to obtain time of day");
@@ -272,7 +272,7 @@ static steady_clock::time_point __libcpp_steady_clock_now() {
 
 #  elif defined(__Fuchsia__)
 
-static steady_clock::time_point __libcpp_steady_clock_now() noexcept {
+static steady_clock::time_point __LIBCUDACXX_steady_clock_now() noexcept {
   // Implicitly link against the vDSO system call ABI without
   // requiring the final link to specify -lzircon explicitly when
   // statically linking libc++.
@@ -283,7 +283,7 @@ static steady_clock::time_point __libcpp_steady_clock_now() noexcept {
 
 #  elif defined(CLOCK_MONOTONIC)
 
-static steady_clock::time_point __libcpp_steady_clock_now() {
+static steady_clock::time_point __LIBCUDACXX_steady_clock_now() {
     struct timespec tp;
     if (0 != clock_gettime(CLOCK_MONOTONIC, &tp))
         __throw_system_error(errno, "clock_gettime(CLOCK_MONOTONIC) failed");
@@ -299,11 +299,11 @@ const bool steady_clock::is_steady;
 steady_clock::time_point
 steady_clock::now() noexcept
 {
-    return __libcpp_steady_clock_now();
+    return __LIBCUDACXX_steady_clock_now();
 }
 
-#endif // !_LIBCPP_HAS_NO_MONOTONIC_CLOCK
+#endif // !_LIBCUDACXX_HAS_NO_MONOTONIC_CLOCK
 
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/chrono_system_time_init.h b/libcxx/src/chrono_system_time_init.h
index b1bdc691b385..0aa82b2b1863 100644
--- a/libcxx/src/chrono_system_time_init.h
+++ b/libcxx/src/chrono_system_time_init.h
@@ -1,2 +1,2 @@
 #pragma GCC system_header
-GetSystemTimeInit GetSystemTimeAsFileTimeFunc _LIBCPP_INIT_PRIORITY_MAX;
+GetSystemTimeInit GetSystemTimeAsFileTimeFunc _LIBCUDACXX_INIT_PRIORITY_MAX;

diff  --git a/libcxx/src/condition_variable.cpp b/libcxx/src/condition_variable.cpp
index b17c4cf6458e..7e50c4f91a61 100644
--- a/libcxx/src/condition_variable.cpp
+++ b/libcxx/src/condition_variable.cpp
@@ -8,33 +8,33 @@
 
 #include <__config>
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 
 #include <condition_variable>
 #include <thread>
 #include <system_error>
 
-#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
+#if defined(__ELF__) && defined(_LIBCUDACXX_LINK_PTHREAD_LIB)
 #  pragma comment(lib, "pthread")
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // ~condition_variable is defined elsewhere.
 
 void
 condition_variable::notify_one() noexcept
 {
-    __libcpp_condvar_signal(&__cv_);
+    __LIBCUDACXX_condvar_signal(&__cv_);
 }
 
 void
 condition_variable::notify_all() noexcept
 {
-    __libcpp_condvar_broadcast(&__cv_);
+    __LIBCUDACXX_condvar_broadcast(&__cv_);
 }
 
 void
@@ -43,7 +43,7 @@ condition_variable::wait(unique_lock<mutex>& lk) noexcept
     if (!lk.owns_lock())
         __throw_system_error(EPERM,
                                   "condition_variable::wait: mutex not locked");
-    int ec = __libcpp_condvar_wait(&__cv_, lk.mutex()->native_handle());
+    int ec = __LIBCUDACXX_condvar_wait(&__cv_, lk.mutex()->native_handle());
     if (ec)
         __throw_system_error(ec, "condition_variable wait failed");
 }
@@ -59,10 +59,10 @@ condition_variable::__do_timed_wait(unique_lock<mutex>& lk,
     nanoseconds d = tp.time_since_epoch();
     if (d > nanoseconds(0x59682F000000E941))
         d = nanoseconds(0x59682F000000E941);
-    __libcpp_timespec_t ts;
+    __LIBCUDACXX_timespec_t ts;
     seconds s = duration_cast<seconds>(d);
     typedef decltype(ts.tv_sec) ts_sec;
-    _LIBCPP_CONSTEXPR ts_sec ts_sec_max = numeric_limits<ts_sec>::max();
+    _LIBCUDACXX_CONSTEXPR ts_sec ts_sec_max = numeric_limits<ts_sec>::max();
     if (s.count() < ts_sec_max)
     {
         ts.tv_sec = static_cast<ts_sec>(s.count());
@@ -73,7 +73,7 @@ condition_variable::__do_timed_wait(unique_lock<mutex>& lk,
         ts.tv_sec = ts_sec_max;
         ts.tv_nsec = giga::num - 1;
     }
-    int ec = __libcpp_condvar_timedwait(&__cv_, lk.mutex()->native_handle(), &ts);
+    int ec = __LIBCUDACXX_condvar_timedwait(&__cv_, lk.mutex()->native_handle(), &ts);
     if (ec != 0 && ec != ETIMEDOUT)
         __throw_system_error(ec, "condition_variable timed_wait failed");
 }
@@ -90,8 +90,8 @@ notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk)
     __thread_local_data()->notify_all_at_thread_exit(&cond, lk.release());
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS
 
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // !_LIBCUDACXX_HAS_NO_THREADS

diff  --git a/libcxx/src/condition_variable_destructor.cpp b/libcxx/src/condition_variable_destructor.cpp
index c217a09394fc..7a3dccb4902b 100644
--- a/libcxx/src/condition_variable_destructor.cpp
+++ b/libcxx/src/condition_variable_destructor.cpp
@@ -14,21 +14,21 @@
 #include <__config>
 #include <__threading_support>
 
-#if !defined(_LIBCPP_HAS_NO_THREADS)
-# if _LIBCPP_ABI_VERSION == 1 || !defined(_LIBCPP_HAS_TRIVIAL_CONDVAR_DESTRUCTION)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
+# if _LIBCUDACXX_ABI_VERSION == 1 || !defined(_LIBCUDACXX_HAS_TRIVIAL_CONDVAR_DESTRUCTION)
 #   define NEEDS_CONDVAR_DESTRUCTOR
 # endif
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #ifdef NEEDS_CONDVAR_DESTRUCTOR
 
-class _LIBCPP_TYPE_VIS condition_variable
+class _LIBCUDACXX_TYPE_VIS condition_variable
 {
-    __libcpp_condvar_t __cv_ = _LIBCPP_CONDVAR_INITIALIZER;
+    __LIBCUDACXX_condvar_t __cv_ = _LIBCUDACXX_CONDVAR_INITIALIZER;
 public:
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     constexpr condition_variable() noexcept = default;
 
     ~condition_variable();
@@ -39,8 +39,8 @@ class _LIBCPP_TYPE_VIS condition_variable
 
 condition_variable::~condition_variable()
 {
-    __libcpp_condvar_destroy(&__cv_);
+    __LIBCUDACXX_condvar_destroy(&__cv_);
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/debug.cpp b/libcxx/src/debug.cpp
index 8f1d328f0e0f..8528ba140f2a 100644
--- a/libcxx/src/debug.cpp
+++ b/libcxx/src/debug.cpp
@@ -15,25 +15,25 @@
 #include <functional>
 #include <string>
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 #  include <mutex>
-#  if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
+#  if defined(__ELF__) && defined(_LIBCUDACXX_LINK_PTHREAD_LIB)
 #    pragma comment(lib, "pthread")
 #  endif
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_FUNC_VIS
-__libcpp_db*
+_LIBCUDACXX_FUNC_VIS
+__LIBCUDACXX_db*
 __get_db()
 {
-    static _LIBCPP_NO_DESTROY __libcpp_db db;
+    static _LIBCUDACXX_NO_DESTROY __LIBCUDACXX_db db;
     return &db;
 }
 
-_LIBCPP_FUNC_VIS
-const __libcpp_db*
+_LIBCUDACXX_FUNC_VIS
+const __LIBCUDACXX_db*
 __get_const_db()
 {
     return __get_db();
@@ -42,7 +42,7 @@ __get_const_db()
 namespace
 {
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 typedef mutex mutex_type;
 typedef lock_guard<mutex_type> WLock;
 typedef lock_guard<mutex_type> RLock;
@@ -50,10 +50,10 @@ typedef lock_guard<mutex_type> RLock;
 mutex_type&
 mut()
 {
-    static _LIBCPP_NO_DESTROY mutex_type m;
+    static _LIBCUDACXX_NO_DESTROY mutex_type m;
     return m;
 }
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // !_LIBCUDACXX_HAS_NO_THREADS
 
 }  // unnamed namespace
 
@@ -76,7 +76,7 @@ __c_node::~__c_node()
     }
 }
 
-__libcpp_db::__libcpp_db()
+__LIBCUDACXX_db::__LIBCUDACXX_db()
     : __cbeg_(nullptr),
       __cend_(nullptr),
       __csz_(0),
@@ -86,7 +86,7 @@ __libcpp_db::__libcpp_db()
 {
 }
 
-__libcpp_db::~__libcpp_db()
+__LIBCUDACXX_db::~__LIBCUDACXX_db()
 {
     if (__cbeg_)
     {
@@ -115,20 +115,20 @@ __libcpp_db::~__libcpp_db()
 }
 
 void*
-__libcpp_db::__find_c_from_i(void* __i) const
+__LIBCUDACXX_db::__find_c_from_i(void* __i) const
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     RLock _(mut());
 #endif
     __i_node* i = __find_iterator(__i);
-    _LIBCPP_ASSERT(i != nullptr, "iterator not found in debug database.");
+    _LIBCUDACXX_ASSERT(i != nullptr, "iterator not found in debug database.");
     return i->__c_ != nullptr ? i->__c_->__c_ : nullptr;
 }
 
 void
-__libcpp_db::__insert_ic(void* __i, const void* __c)
+__LIBCUDACXX_db::__insert_ic(void* __i, const void* __c)
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     WLock _(mut());
 #endif
     if (__cbeg_ == __cend_)
@@ -149,9 +149,9 @@ __libcpp_db::__insert_ic(void* __i, const void* __c)
 }
 
 void
-__libcpp_db::__insert_c(void* __c, __libcpp_db::_InsertConstruct *__fn)
+__LIBCUDACXX_db::__insert_c(void* __c, __LIBCUDACXX_db::_InsertConstruct *__fn)
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     WLock _(mut());
 #endif
     if (__csz_ + 1 > static_cast<size_t>(__cend_ - __cbeg_))
@@ -188,9 +188,9 @@ __libcpp_db::__insert_c(void* __c, __libcpp_db::_InsertConstruct *__fn)
 }
 
 void
-__libcpp_db::__erase_i(void* __i)
+__LIBCUDACXX_db::__erase_i(void* __i)
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     WLock _(mut());
 #endif
     if (__ibeg_ != __iend_)
@@ -221,9 +221,9 @@ __libcpp_db::__erase_i(void* __i)
 }
 
 void
-__libcpp_db::__invalidate_all(void* __c)
+__LIBCUDACXX_db::__invalidate_all(void* __c)
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     WLock _(mut());
 #endif
     if (__cend_ != __cbeg_)
@@ -247,14 +247,14 @@ __libcpp_db::__invalidate_all(void* __c)
 }
 
 __c_node*
-__libcpp_db::__find_c_and_lock(void* __c) const
+__LIBCUDACXX_db::__find_c_and_lock(void* __c) const
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     mut().lock();
 #endif
     if (__cend_ == __cbeg_)
     {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
         mut().unlock();
 #endif
         return nullptr;
@@ -263,7 +263,7 @@ __libcpp_db::__find_c_and_lock(void* __c) const
     __c_node* p = __cbeg_[hc];
     if (p == nullptr)
     {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
         mut().unlock();
 #endif
         return nullptr;
@@ -273,7 +273,7 @@ __libcpp_db::__find_c_and_lock(void* __c) const
         p = p->__next_;
         if (p == nullptr)
         {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
             mut().unlock();
 #endif
             return nullptr;
@@ -283,31 +283,31 @@ __libcpp_db::__find_c_and_lock(void* __c) const
 }
 
 __c_node*
-__libcpp_db::__find_c(void* __c) const
+__LIBCUDACXX_db::__find_c(void* __c) const
 {
     size_t hc = hash<void*>()(__c) % static_cast<size_t>(__cend_ - __cbeg_);
     __c_node* p = __cbeg_[hc];
-    _LIBCPP_ASSERT(p != nullptr, "debug mode internal logic error __find_c A");
+    _LIBCUDACXX_ASSERT(p != nullptr, "debug mode internal logic error __find_c A");
     while (p->__c_ != __c)
     {
         p = p->__next_;
-        _LIBCPP_ASSERT(p != nullptr, "debug mode internal logic error __find_c B");
+        _LIBCUDACXX_ASSERT(p != nullptr, "debug mode internal logic error __find_c B");
     }
     return p;
 }
 
 void
-__libcpp_db::unlock() const
+__LIBCUDACXX_db::unlock() const
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     mut().unlock();
 #endif
 }
 
 void
-__libcpp_db::__erase_c(void* __c)
+__LIBCUDACXX_db::__erase_c(void* __c)
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     WLock _(mut());
 #endif
     if (__cend_ != __cbeg_)
@@ -317,14 +317,14 @@ __libcpp_db::__erase_c(void* __c)
         if (p == nullptr)
             return;
         __c_node* q = nullptr;
-        _LIBCPP_ASSERT(p != nullptr, "debug mode internal logic error __erase_c A");
+        _LIBCUDACXX_ASSERT(p != nullptr, "debug mode internal logic error __erase_c A");
         while (p->__c_ != __c)
         {
             q = p;
             p = p->__next_;
             if (p == nullptr)
                 return;
-            _LIBCPP_ASSERT(p != nullptr, "debug mode internal logic error __erase_c B");
+            _LIBCUDACXX_ASSERT(p != nullptr, "debug mode internal logic error __erase_c B");
         }
         if (q == nullptr)
             __cbeg_[hc] = p->__next_;
@@ -342,9 +342,9 @@ __libcpp_db::__erase_c(void* __c)
 }
 
 void
-__libcpp_db::__iterator_copy(void* __i, const void* __i0)
+__LIBCUDACXX_db::__iterator_copy(void* __i, const void* __i0)
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     WLock _(mut());
 #endif
     __i_node* i = __find_iterator(__i);
@@ -370,9 +370,9 @@ __libcpp_db::__iterator_copy(void* __i, const void* __i0)
 }
 
 bool
-__libcpp_db::__dereferenceable(const void* __i) const
+__LIBCUDACXX_db::__dereferenceable(const void* __i) const
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     RLock _(mut());
 #endif
     __i_node* i = __find_iterator(__i);
@@ -380,9 +380,9 @@ __libcpp_db::__dereferenceable(const void* __i) const
 }
 
 bool
-__libcpp_db::__decrementable(const void* __i) const
+__LIBCUDACXX_db::__decrementable(const void* __i) const
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     RLock _(mut());
 #endif
     __i_node* i = __find_iterator(__i);
@@ -390,9 +390,9 @@ __libcpp_db::__decrementable(const void* __i) const
 }
 
 bool
-__libcpp_db::__addable(const void* __i, ptr
diff _t __n) const
+__LIBCUDACXX_db::__addable(const void* __i, ptr
diff _t __n) const
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     RLock _(mut());
 #endif
     __i_node* i = __find_iterator(__i);
@@ -400,9 +400,9 @@ __libcpp_db::__addable(const void* __i, ptr
diff _t __n) const
 }
 
 bool
-__libcpp_db::__subscriptable(const void* __i, ptr
diff _t __n) const
+__LIBCUDACXX_db::__subscriptable(const void* __i, ptr
diff _t __n) const
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     RLock _(mut());
 #endif
     __i_node* i = __find_iterator(__i);
@@ -410,9 +410,9 @@ __libcpp_db::__subscriptable(const void* __i, ptr
diff _t __n) const
 }
 
 bool
-__libcpp_db::__less_than_comparable(const void* __i, const void* __j) const
+__LIBCUDACXX_db::__less_than_comparable(const void* __i, const void* __j) const
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     RLock _(mut());
 #endif
     __i_node* i = __find_iterator(__i);
@@ -423,26 +423,26 @@ __libcpp_db::__less_than_comparable(const void* __i, const void* __j) const
 }
 
 void
-__libcpp_db::swap(void* c1, void* c2)
+__LIBCUDACXX_db::swap(void* c1, void* c2)
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     WLock _(mut());
 #endif
     size_t hc = hash<void*>()(c1) % static_cast<size_t>(__cend_ - __cbeg_);
     __c_node* p1 = __cbeg_[hc];
-    _LIBCPP_ASSERT(p1 != nullptr, "debug mode internal logic error swap A");
+    _LIBCUDACXX_ASSERT(p1 != nullptr, "debug mode internal logic error swap A");
     while (p1->__c_ != c1)
     {
         p1 = p1->__next_;
-        _LIBCPP_ASSERT(p1 != nullptr, "debug mode internal logic error swap B");
+        _LIBCUDACXX_ASSERT(p1 != nullptr, "debug mode internal logic error swap B");
     }
     hc = hash<void*>()(c2) % static_cast<size_t>(__cend_ - __cbeg_);
     __c_node* p2 = __cbeg_[hc];
-    _LIBCPP_ASSERT(p2 != nullptr, "debug mode internal logic error swap C");
+    _LIBCUDACXX_ASSERT(p2 != nullptr, "debug mode internal logic error swap C");
     while (p2->__c_ != c2)
     {
         p2 = p2->__next_;
-        _LIBCPP_ASSERT(p2 != nullptr, "debug mode internal logic error swap D");
+        _LIBCUDACXX_ASSERT(p2 != nullptr, "debug mode internal logic error swap D");
     }
     std::swap(p1->beg_, p2->beg_);
     std::swap(p1->end_, p2->end_);
@@ -454,9 +454,9 @@ __libcpp_db::swap(void* c1, void* c2)
 }
 
 void
-__libcpp_db::__insert_i(void* __i)
+__LIBCUDACXX_db::__insert_i(void* __i)
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     WLock _(mut());
 #endif
     __insert_iterator(__i);
@@ -487,9 +487,9 @@ __c_node::__add(__i_node* i)
 
 // private api
 
-_LIBCPP_HIDDEN
+_LIBCUDACXX_HIDDEN
 __i_node*
-__libcpp_db::__insert_iterator(void* __i)
+__LIBCUDACXX_db::__insert_iterator(void* __i)
 {
     if (__isz_ + 1 > static_cast<size_t>(__iend_ - __ibeg_))
     {
@@ -526,9 +526,9 @@ __libcpp_db::__insert_iterator(void* __i)
     return r;
 }
 
-_LIBCPP_HIDDEN
+_LIBCUDACXX_HIDDEN
 __i_node*
-__libcpp_db::__find_iterator(const void* __i) const
+__LIBCUDACXX_db::__find_iterator(const void* __i) const
 {
     __i_node* r = nullptr;
     if (__ibeg_ != __iend_)
@@ -546,14 +546,14 @@ __libcpp_db::__find_iterator(const void* __i) const
     return r;
 }
 
-_LIBCPP_HIDDEN
+_LIBCUDACXX_HIDDEN
 void
 __c_node::__remove(__i_node* p)
 {
     __i_node** r = find(beg_, end_, p);
-    _LIBCPP_ASSERT(r != end_, "debug mode internal logic error __c_node::__remove");
+    _LIBCUDACXX_ASSERT(r != end_, "debug mode internal logic error __c_node::__remove");
     if (--end_ != r)
         memmove(r, r+1, static_cast<size_t>(end_ - r)*sizeof(__i_node*));
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/exception.cpp b/libcxx/src/exception.cpp
index e5d6b9e73a26..191c8e63007c 100644
--- a/libcxx/src/exception.cpp
+++ b/libcxx/src/exception.cpp
@@ -16,10 +16,10 @@
   #define HAVE_DEPENDENT_EH_ABI 1
 #endif
 
-#if defined(_LIBCPP_ABI_MICROSOFT)
+#if defined(_LIBCUDACXX_ABI_MICROSOFT)
 #include "support/runtime/exception_msvc.ipp"
 #include "support/runtime/exception_pointer_msvc.ipp"
-#elif defined(_LIBCPPABI_VERSION)
+#elif defined(_LIBCUDACXXABI_VERSION)
 #include "support/runtime/exception_libcxxabi.ipp"
 #include "support/runtime/exception_pointer_cxxabi.ipp"
 #elif defined(LIBCXXRT)

diff  --git a/libcxx/src/experimental/memory_resource.cpp b/libcxx/src/experimental/memory_resource.cpp
index e9fb5b59045c..88b04a2219f5 100644
--- a/libcxx/src/experimental/memory_resource.cpp
+++ b/libcxx/src/experimental/memory_resource.cpp
@@ -8,16 +8,16 @@
 
 #include <experimental/memory_resource>
 
-#ifndef _LIBCPP_HAS_NO_ATOMIC_HEADER
+#ifndef _LIBCUDACXX_HAS_NO_ATOMIC_HEADER
 #  include <atomic>
-#elif !defined(_LIBCPP_HAS_NO_THREADS)
+#elif !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #  include <mutex>
-#  if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
+#  if defined(__ELF__) && defined(_LIBCUDACXX_LINK_PTHREAD_LIB)
 #    pragma comment(lib, "pthread")
 #  endif
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_BEGIN_NAMESPACE_LFTS_PMR
 
 // memory_resource
 
@@ -25,19 +25,19 @@ _LIBCPP_BEGIN_NAMESPACE_LFTS_PMR
 
 // new_delete_resource()
 
-class _LIBCPP_TYPE_VIS __new_delete_memory_resource_imp
+class _LIBCUDACXX_TYPE_VIS __new_delete_memory_resource_imp
     : public memory_resource
 {
     void *do_allocate(size_t size, size_t align) override {
-#ifdef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
+#ifdef _LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION
         if (__is_overaligned_for_new(align))
             __throw_bad_alloc();
 #endif
-        return _VSTD::__libcpp_allocate(size, align);
+        return _CUDA_VSTD::__LIBCUDACXX_allocate(size, align);
     }
 
     void do_deallocate(void *p, size_t n, size_t align) override {
-      _VSTD::__libcpp_deallocate(p, n, align);
+      _CUDA_VSTD::__LIBCUDACXX_deallocate(p, n, align);
     }
 
     bool do_is_equal(memory_resource const & other) const noexcept override
@@ -49,7 +49,7 @@ class _LIBCPP_TYPE_VIS __new_delete_memory_resource_imp
 
 // null_memory_resource()
 
-class _LIBCPP_TYPE_VIS __null_memory_resource_imp
+class _LIBCUDACXX_TYPE_VIS __null_memory_resource_imp
     : public memory_resource
 {
 public:
@@ -72,7 +72,7 @@ union ResourceInitHelper {
     __null_memory_resource_imp       null_res;
   } resources;
   char dummy;
-  _LIBCPP_CONSTEXPR_AFTER_CXX11 ResourceInitHelper() : resources() {}
+  _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 ResourceInitHelper() : resources() {}
   ~ResourceInitHelper() {}
 };
 
@@ -96,19 +96,19 @@ memory_resource * null_memory_resource() noexcept {
 static memory_resource *
 __default_memory_resource(bool set = false, memory_resource * new_res = nullptr) noexcept
 {
-#ifndef _LIBCPP_HAS_NO_ATOMIC_HEADER
+#ifndef _LIBCUDACXX_HAS_NO_ATOMIC_HEADER
     static constinit atomic<memory_resource*> __res{&res_init.resources.new_delete_res};
     if (set) {
         new_res = new_res ? new_res : new_delete_resource();
         // TODO: Can a weaker ordering be used?
-        return _VSTD::atomic_exchange_explicit(
+        return _CUDA_VSTD::atomic_exchange_explicit(
             &__res, new_res, memory_order_acq_rel);
     }
     else {
-        return _VSTD::atomic_load_explicit(
+        return _CUDA_VSTD::atomic_load_explicit(
             &__res, memory_order_acquire);
     }
-#elif !defined(_LIBCPP_HAS_NO_THREADS)
+#elif !defined(_LIBCUDACXX_HAS_NO_THREADS)
     static constinit memory_resource *res = &res_init.resources.new_delete_res;
     static mutex res_lock;
     if (set) {
@@ -144,4 +144,4 @@ memory_resource * set_default_resource(memory_resource * __new_res) noexcept
     return __default_memory_resource(true, __new_res);
 }
 
-_LIBCPP_END_NAMESPACE_LFTS_PMR
+_LIBCUDACXX_END_NAMESPACE_LFTS_PMR

diff  --git a/libcxx/src/experimental/memory_resource_init_helper.h b/libcxx/src/experimental/memory_resource_init_helper.h
index 032edc12fa27..10ac81e571ab 100644
--- a/libcxx/src/experimental/memory_resource_init_helper.h
+++ b/libcxx/src/experimental/memory_resource_init_helper.h
@@ -1,2 +1,2 @@
 #pragma GCC system_header
-static constinit ResourceInitHelper res_init _LIBCPP_INIT_PRIORITY_MAX;
+static constinit ResourceInitHelper res_init _LIBCUDACXX_INIT_PRIORITY_MAX;

diff  --git a/libcxx/src/filesystem/directory_iterator.cpp b/libcxx/src/filesystem/directory_iterator.cpp
index 8d069cc080d8..0fdaa7f03c11 100644
--- a/libcxx/src/filesystem/directory_iterator.cpp
+++ b/libcxx/src/filesystem/directory_iterator.cpp
@@ -14,11 +14,11 @@
 
 #include "filesystem_common.h"
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
 using detail::ErrorHandler;
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 class __dir_stream {
 public:
   __dir_stream() = delete;
@@ -182,7 +182,7 @@ directory_iterator::directory_iterator(const path& p, error_code* ec,
 }
 
 directory_iterator& directory_iterator::__increment(error_code* ec) {
-  _LIBCPP_ASSERT(__imp_, "Attempting to increment an invalid iterator");
+  _LIBCUDACXX_ASSERT(__imp_, "Attempting to increment an invalid iterator");
   ErrorHandler<void> err("directory_iterator::operator++()", ec);
 
   error_code m_ec;
@@ -196,7 +196,7 @@ directory_iterator& directory_iterator::__increment(error_code* ec) {
 }
 
 directory_entry const& directory_iterator::__dereference() const {
-  _LIBCPP_ASSERT(__imp_, "Attempting to dereference an invalid iterator");
+  _LIBCUDACXX_ASSERT(__imp_, "Attempting to dereference an invalid iterator");
   return __imp_->__entry_;
 }
 
@@ -225,7 +225,7 @@ recursive_directory_iterator::recursive_directory_iterator(
 }
 
 void recursive_directory_iterator::__pop(error_code* ec) {
-  _LIBCPP_ASSERT(__imp_, "Popping the end iterator");
+  _LIBCUDACXX_ASSERT(__imp_, "Popping the end iterator");
   if (ec)
     ec->clear();
   __imp_->__stack_.pop();
@@ -329,4 +329,4 @@ bool recursive_directory_iterator::__try_recursion(error_code* ec) {
   return false;
 }
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM

diff  --git a/libcxx/src/filesystem/filesystem_common.h b/libcxx/src/filesystem/filesystem_common.h
index 0bd2bbe6f7e9..d054f5b956ae 100644
--- a/libcxx/src/filesystem/filesystem_common.h
+++ b/libcxx/src/filesystem/filesystem_common.h
@@ -21,7 +21,7 @@
 #include <system_error>
 #include <utility>
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 # define WIN32_LEAN_AND_MEAN
 # define NOMINMAX
 # include <windows.h>
@@ -32,7 +32,7 @@
 # include <sys/statvfs.h>
 # include <sys/time.h> // for ::utimes as used in __last_write_time
 # include <unistd.h>
-#endif // defined(_LIBCPP_WIN32API)
+#endif // defined(_LIBCUDACXX_WIN32API)
 
 #include "../include/apple_availability.h"
 
@@ -40,15 +40,15 @@
 // We can use the presence of UTIME_OMIT to detect platforms that provide
 // utimensat.
 #if defined(UTIME_OMIT)
-#define _LIBCPP_USE_UTIMENSAT
+#define _LIBCUDACXX_USE_UTIMENSAT
 #endif
 #endif
 
-_LIBCPP_DIAGNOSTIC_PUSH
-_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wunused-function")
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wunused-function")
+_LIBCUDACXX_DIAGNOSTIC_PUSH
+_LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wunused-function")
+_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wunused-function")
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 #  define PATHSTR(x) (L##x)
 #  define PATH_CSTR_FMT "\"%ls\""
 #else
@@ -56,18 +56,18 @@ _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wunused-function")
 #  define PATH_CSTR_FMT "\"%s\""
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
 namespace detail {
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 // Non anonymous, to allow access from two translation units.
 errc __win_err_to_errc(int err);
 #endif
 
 namespace {
 
-static _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 0) string
+static _LIBCUDACXX_ATTRIBUTE_FORMAT(__printf__, 1, 0) string
 format_string_impl(const char* msg, va_list ap) {
   array<char, 256> buf;
 
@@ -86,36 +86,36 @@ format_string_impl(const char* msg, va_list ap) {
     size_t size_with_null = static_cast<size_t>(ret) + 1;
     result.__resize_default_init(size_with_null - 1);
     ret = ::vsnprintf(&result[0], size_with_null, msg, ap);
-    _LIBCPP_ASSERT(static_cast<size_t>(ret) == (size_with_null - 1), "TODO");
+    _LIBCUDACXX_ASSERT(static_cast<size_t>(ret) == (size_with_null - 1), "TODO");
   }
   return result;
 }
 
-static _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 1, 2) string
+static _LIBCUDACXX_ATTRIBUTE_FORMAT(__printf__, 1, 2) string
 format_string(const char* msg, ...) {
   string ret;
   va_list ap;
   va_start(ap, msg);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   try {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     ret = format_string_impl(msg, ap);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
   } catch (...) {
     va_end(ap);
     throw;
   }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
   va_end(ap);
   return ret;
 }
 
 error_code capture_errno() {
-  _LIBCPP_ASSERT(errno != 0, "Expected errno to be non-zero");
+  _LIBCUDACXX_ASSERT(errno != 0, "Expected errno to be non-zero");
   return error_code(errno, generic_category());
 }
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 error_code make_windows_error(int err) {
   return make_error_code(__win_err_to_errc(err));
 }
@@ -124,7 +124,7 @@ error_code make_windows_error(int err) {
 template <class T>
 T error_value();
 template <>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 void error_value<void>() {}
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 void error_value<void>() {}
 template <>
 bool error_value<bool>() {
   return false;
@@ -140,7 +140,7 @@ uintmax_t error_value<uintmax_t>() {
   return uintmax_t(-1);
 }
 template <>
-_LIBCPP_CONSTEXPR_AFTER_CXX11 file_time_type error_value<file_time_type>() {
+_LIBCUDACXX_CONSTEXPR_AFTER_CXX11 file_time_type error_value<file_time_type>() {
   return file_time_type::min();
 }
 template <>
@@ -176,10 +176,10 @@ struct ErrorHandler {
     case 2:
       __throw_filesystem_error(what, *p1_, *p2_, ec);
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
-  _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 3, 0)
+  _LIBCUDACXX_ATTRIBUTE_FORMAT(__printf__, 3, 0)
   void report_impl(const error_code& ec, const char* msg, va_list ap) const {
     if (ec_) {
       *ec_ = ec;
@@ -195,23 +195,23 @@ struct ErrorHandler {
     case 2:
       __throw_filesystem_error(what, *p1_, *p2_, ec);
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
-  _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 3, 4)
+  _LIBCUDACXX_ATTRIBUTE_FORMAT(__printf__, 3, 4)
   T report(const error_code& ec, const char* msg, ...) const {
     va_list ap;
     va_start(ap, msg);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
       report_impl(ec, msg, ap);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     } catch (...) {
       va_end(ap);
       throw;
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     va_end(ap);
     return error_value<T>();
   }
@@ -220,20 +220,20 @@ struct ErrorHandler {
     return report(make_error_code(err));
   }
 
-  _LIBCPP_ATTRIBUTE_FORMAT(__printf__, 3, 4)
+  _LIBCUDACXX_ATTRIBUTE_FORMAT(__printf__, 3, 4)
   T report(errc const& err, const char* msg, ...) const {
     va_list ap;
     va_start(ap, msg);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
       report_impl(make_error_code(err), msg, ap);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     } catch (...) {
       va_end(ap);
       throw;
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     va_end(ap);
     return error_value<T>();
   }
@@ -246,7 +246,7 @@ struct ErrorHandler {
 using chrono::duration;
 using chrono::duration_cast;
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 // Various C runtime versions (UCRT, or the legacy msvcrt.dll used by
 // some mingw toolchains) provide 
diff erent stat function implementations,
 // with a number of limitations with respect to what we want from the
@@ -309,7 +309,7 @@ struct time_util_base {
           .count();
 
 private:
-  static _LIBCPP_CONSTEXPR_AFTER_CXX11 fs_duration get_min_nsecs() {
+  static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 fs_duration get_min_nsecs() {
     return duration_cast<fs_duration>(
         fs_nanoseconds(min_nsec_timespec) -
         duration_cast<fs_nanoseconds>(fs_seconds(1)));
@@ -319,7 +319,7 @@ struct time_util_base {
                     FileTimeT::duration::min(),
                 "value doesn't roundtrip");
 
-  static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool check_range() {
+  static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 bool check_range() {
     // This kinda sucks, but it's what happens when we don't have __int128_t.
     if (sizeof(TimeT) == sizeof(rep)) {
       typedef duration<long long, ratio<3600 * 24 * 365> > Years;
@@ -385,7 +385,7 @@ struct time_util : time_util_base<FileTimeT, TimeT> {
 
 public:
   template <class CType, class ChronoType>
-  static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool checked_set(CType* out,
+  static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 bool checked_set(CType* out,
                                                         ChronoType time) {
     using Lim = numeric_limits<CType>;
     if (time > Lim::max() || time < Lim::min())
@@ -394,7 +394,7 @@ struct time_util : time_util_base<FileTimeT, TimeT> {
     return true;
   }
 
-  static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool is_representable(TimeSpecT tm) {
+  static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 bool is_representable(TimeSpecT tm) {
     if (tm.tv_sec >= 0) {
       return tm.tv_sec < max_seconds ||
              (tm.tv_sec == max_seconds && tm.tv_nsec <= max_nsec);
@@ -405,7 +405,7 @@ struct time_util : time_util_base<FileTimeT, TimeT> {
     }
   }
 
-  static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool is_representable(FileTimeT tm) {
+  static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 bool is_representable(FileTimeT tm) {
     auto secs = duration_cast<fs_seconds>(tm.time_since_epoch());
     auto nsecs = duration_cast<fs_nanoseconds>(tm.time_since_epoch() - secs);
     if (nsecs.count() < 0) {
@@ -418,7 +418,7 @@ struct time_util : time_util_base<FileTimeT, TimeT> {
     return secs.count() >= TLim::min();
   }
 
-  static _LIBCPP_CONSTEXPR_AFTER_CXX11 FileTimeT
+  static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 FileTimeT
   convert_from_timespec(TimeSpecT tm) {
     if (tm.tv_sec >= 0 || tm.tv_nsec == 0) {
       return FileTimeT(fs_seconds(tm.tv_sec) +
@@ -432,7 +432,7 @@ struct time_util : time_util_base<FileTimeT, TimeT> {
   }
 
   template <class SubSecT>
-  static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool
+  static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 bool
   set_times_checked(TimeT* sec_out, SubSecT* subsec_out, FileTimeT tp) {
     auto dur = tp.time_since_epoch();
     auto sec_dur = duration_cast<fs_seconds>(dur);
@@ -449,7 +449,7 @@ struct time_util : time_util_base<FileTimeT, TimeT> {
     return checked_set(sec_out, sec_dur.count()) &&
            checked_set(subsec_out, subsec_dur.count());
   }
-  static _LIBCPP_CONSTEXPR_AFTER_CXX11 bool convert_to_timespec(TimeSpecT& dest,
+  static _LIBCUDACXX_CONSTEXPR_AFTER_CXX11 bool convert_to_timespec(TimeSpecT& dest,
                                                                 FileTimeT tp) {
     if (!is_representable(tp))
       return false;
@@ -457,7 +457,7 @@ struct time_util : time_util_base<FileTimeT, TimeT> {
   }
 };
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 using fs_time = time_util<file_time_type, int64_t, TimeSpec>;
 #else
 using fs_time = time_util<file_time_type, time_t, TimeSpec>;
@@ -489,7 +489,7 @@ inline TimeSpec extract_mtime(StatT const& st) { return st.st_mtim; }
 inline TimeSpec extract_atime(StatT const& st) { return st.st_atim; }
 #endif
 
-#if !defined(_LIBCPP_WIN32API)
+#if !defined(_LIBCUDACXX_WIN32API)
 inline TimeVal make_timeval(TimeSpec const& ts) {
   using namespace chrono;
   auto Convert = [](long nsec) {
@@ -513,7 +513,7 @@ inline bool posix_utimes(const path& p, std::array<TimeSpec, 2> const& TS,
   return false;
 }
 
-#if defined(_LIBCPP_USE_UTIMENSAT)
+#if defined(_LIBCUDACXX_USE_UTIMENSAT)
 bool posix_utimensat(const path& p, std::array<TimeSpec, 2> const& TS,
                      error_code& ec) {
   if (::utimensat(AT_FDCWD, p.c_str(), TS.data(), 0) == -1) {
@@ -526,7 +526,7 @@ bool posix_utimensat(const path& p, std::array<TimeSpec, 2> const& TS,
 
 bool set_file_times(const path& p, std::array<TimeSpec, 2> const& TS,
                     error_code& ec) {
-#if !defined(_LIBCPP_USE_UTIMENSAT)
+#if !defined(_LIBCUDACXX_USE_UTIMENSAT)
   return posix_utimes(p, TS, ec);
 #else
   return posix_utimensat(p, TS, ec);
@@ -580,7 +580,7 @@ static pair<string_view, file_type> posix_readdir(DIR* dir_stream,
   }
 }
 
-#else // _LIBCPP_WIN32API
+#else // _LIBCUDACXX_WIN32API
 
 static file_type get_file_type(const WIN32_FIND_DATAW& data) {
   if (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT &&
@@ -601,13 +601,13 @@ static file_time_type get_write_time(const WIN32_FIND_DATAW& data) {
   return file_time_type(file_time_type::duration(tmp.QuadPart));
 }
 
-#endif // !_LIBCPP_WIN32API
+#endif // !_LIBCUDACXX_WIN32API
 
 } // namespace
 } // end namespace detail
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
-_LIBCPP_DIAGNOSTIC_POP
+_LIBCUDACXX_DIAGNOSTIC_POP
 
 #endif // FILESYSTEM_COMMON_H

diff  --git a/libcxx/src/filesystem/int128_builtins.cpp b/libcxx/src/filesystem/int128_builtins.cpp
index f003da27a74d..2c2437310bea 100644
--- a/libcxx/src/filesystem/int128_builtins.cpp
+++ b/libcxx/src/filesystem/int128_builtins.cpp
@@ -16,9 +16,9 @@
 #include <__config>
 #include <climits>
 
-#if !defined(_LIBCPP_HAS_NO_INT128)
+#if !defined(_LIBCUDACXX_HAS_NO_INT128)
 
-extern "C" __attribute__((no_sanitize("undefined"))) _LIBCPP_FUNC_VIS
+extern "C" __attribute__((no_sanitize("undefined"))) _LIBCUDACXX_FUNC_VIS
 __int128_t __muloti4(__int128_t a, __int128_t b, int* overflow) {
   const int N = (int)(sizeof(__int128_t) * CHAR_BIT);
   const __int128_t MIN = (__int128_t)1 << (N - 1);

diff  --git a/libcxx/src/filesystem/operations.cpp b/libcxx/src/filesystem/operations.cpp
index 7467abb7c15d..5c996178b131 100644
--- a/libcxx/src/filesystem/operations.cpp
+++ b/libcxx/src/filesystem/operations.cpp
@@ -21,7 +21,7 @@
 
 #include "posix_compat.h"
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 # define WIN32_LEAN_AND_MEAN
 # define NOMINMAX
 # include <windows.h>
@@ -36,31 +36,31 @@
 
 #if __has_include(<sys/sendfile.h>)
 # include <sys/sendfile.h>
-# define _LIBCPP_FILESYSTEM_USE_SENDFILE
+# define _LIBCUDACXX_FILESYSTEM_USE_SENDFILE
 #elif defined(__APPLE__) || __has_include(<copyfile.h>)
 # include <copyfile.h>
-# define _LIBCPP_FILESYSTEM_USE_COPYFILE
+# define _LIBCUDACXX_FILESYSTEM_USE_COPYFILE
 #else
 # include <fstream>
-# define _LIBCPP_FILESYSTEM_USE_FSTREAM
+# define _LIBCUDACXX_FILESYSTEM_USE_FSTREAM
 #endif
 
-#if !defined(CLOCK_REALTIME) && !defined(_LIBCPP_WIN32API)
+#if !defined(CLOCK_REALTIME) && !defined(_LIBCUDACXX_WIN32API)
 # include <sys/time.h> // for gettimeofday and timeval
 #endif
 
-#if defined(__ELF__) && defined(_LIBCPP_LINK_RT_LIB)
+#if defined(__ELF__) && defined(_LIBCUDACXX_LINK_RT_LIB)
 # pragma comment(lib, "rt")
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
 namespace {
 
 bool isSeparator(path::value_type C) {
   if (C == '/')
     return true;
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
   if (C == '\\')
     return true;
 #endif
@@ -131,7 +131,7 @@ struct PathParser {
       if (TkEnd)
         return makeState(PS_InRootName, Start, TkEnd);
     }
-      _LIBCPP_FALLTHROUGH();
+      _LIBCUDACXX_FALLTHROUGH();
     case PS_InRootName: {
       PosPtr TkEnd = consumeAllSeparators(Start, End);
       if (TkEnd)
@@ -156,7 +156,7 @@ struct PathParser {
       return makeState(PS_AtEnd);
 
     case PS_AtEnd:
-      __libcpp_unreachable();
+      __LIBCUDACXX_unreachable();
     }
   }
 
@@ -204,7 +204,7 @@ struct PathParser {
       return makeState(PS_InRootName, Path.data(), RStart + 1);
     case PS_InRootName:
     case PS_BeforeBegin:
-      __libcpp_unreachable();
+      __LIBCUDACXX_unreachable();
     }
   }
 
@@ -226,7 +226,7 @@ struct PathParser {
     case PS_InFilenames:
       return RawEntry;
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
   explicit operator bool() const noexcept {
@@ -287,7 +287,7 @@ struct PathParser {
     case PS_AtEnd:
       return getAfterBack();
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
   /// \brief Return a pointer to the first character in the currently lexed
@@ -304,7 +304,7 @@ struct PathParser {
     case PS_AtEnd:
       return &Path.back() + 1;
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }
 
   // Consume all consecutive separators.
@@ -376,7 +376,7 @@ struct PathParser {
   }
 
   PosPtr consumeRootName(PosPtr P, PosPtr End) const noexcept {
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
     if (PosPtr Ret = consumeDriveLetter(P, End))
       return Ret;
     if (PosPtr Ret = consumeNetworkRoot(P, End))
@@ -404,7 +404,7 @@ string_view_t createView(PosPtr S, PosPtr E) noexcept {
 
 //                       POSIX HELPERS
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 namespace detail {
 
 errc __win_err_to_errc(int err) {
@@ -646,7 +646,7 @@ const bool _FilesystemClock::is_steady;
 
 _FilesystemClock::time_point _FilesystemClock::now() noexcept {
   typedef chrono::duration<rep> __secs;
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
   typedef chrono::duration<rep, nano> __nsecs;
   FILETIME time;
   GetSystemTimeAsFileTime(&time);
@@ -683,7 +683,7 @@ void filesystem_error::__create_what(int __num_paths) {
       return detail::format_string("filesystem error: %s [" PATH_CSTR_FMT "] [" PATH_CSTR_FMT "]",
                                    derived_what, path1().c_str(), path2().c_str());
     }
-    __libcpp_unreachable();
+    __LIBCUDACXX_unreachable();
   }();
 }
 
@@ -708,7 +708,7 @@ path __canonical(path const& orig_p, error_code* ec) {
   ErrorHandler<path> err("canonical", ec, &orig_p, &cwd);
 
   path p = __do_absolute(orig_p, &cwd, ec);
-#if (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112) || defined(_LIBCPP_WIN32API)
+#if (defined(_POSIX_VERSION) && _POSIX_VERSION >= 200112) || defined(_LIBCUDACXX_WIN32API)
   std::unique_ptr<path::value_type, decltype(&::free)>
     hold(detail::realpath(p.c_str(), nullptr), &::free);
   if (hold.get() == nullptr)
@@ -816,7 +816,7 @@ void __copy(const path& from, const path& to, copy_options options,
 namespace detail {
 namespace {
 
-#if defined(_LIBCPP_FILESYSTEM_USE_SENDFILE)
+#if defined(_LIBCUDACXX_FILESYSTEM_USE_SENDFILE)
   bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) {
     size_t count = read_fd.get_stat().st_size;
     do {
@@ -832,7 +832,7 @@ namespace {
 
     return true;
   }
-#elif defined(_LIBCPP_FILESYSTEM_USE_COPYFILE)
+#elif defined(_LIBCUDACXX_FILESYSTEM_USE_COPYFILE)
   bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) {
     struct CopyFileState {
       copyfile_state_t state;
@@ -853,7 +853,7 @@ namespace {
     ec.clear();
     return true;
   }
-#elif defined(_LIBCPP_FILESYSTEM_USE_FSTREAM)
+#elif defined(_LIBCUDACXX_FILESYSTEM_USE_FSTREAM)
   bool copy_file_impl(FileDescriptor& read_fd, FileDescriptor& write_fd, error_code& ec) {
     ifstream in;
     in.__open(read_fd.fd, ios::binary);
@@ -989,7 +989,7 @@ void __copy_symlink(const path& existing_symlink, const path& new_symlink,
   if (ec && *ec) {
     return;
   }
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
   error_code local_ec;
   if (is_directory(real_path, local_ec))
     __create_directory_symlink(real_path, new_symlink, ec);
@@ -1095,7 +1095,7 @@ void __create_symlink(path const& from, path const& to, error_code* ec) {
 path __current_path(error_code* ec) {
   ErrorHandler<path> err("current_path", ec);
 
-#if defined(_LIBCPP_WIN32API) || defined(__GLIBC__) || defined(__APPLE__)
+#if defined(_LIBCUDACXX_WIN32API) || defined(__GLIBC__) || defined(__APPLE__)
   // Common extension outside of POSIX getcwd() spec, without needing to
   // preallocate a buffer. Also supported by a number of other POSIX libcs.
   int size = 0;
@@ -1104,7 +1104,7 @@ path __current_path(error_code* ec) {
   Deleter deleter = &::free;
 #else
   auto size = ::pathconf(".", _PC_PATH_MAX);
-  _LIBCPP_ASSERT(size >= 0, "pathconf returned a 0 as max size");
+  _LIBCUDACXX_ASSERT(size >= 0, "pathconf returned a 0 as max size");
 
   auto buff = unique_ptr<path::value_type[]>(new path::value_type[size + 1]);
   path::value_type* ptr = buff.get();
@@ -1190,7 +1190,7 @@ bool __fs_is_empty(const path& p, error_code* ec) {
   } else if (is_regular_file(st))
     return static_cast<uintmax_t>(pst.st_size) == 0;
 
-  __libcpp_unreachable();
+  __LIBCUDACXX_unreachable();
 }
 
 static file_time_type __extract_last_write_time(const path& p, const StatT& st,
@@ -1221,7 +1221,7 @@ void __last_write_time(const path& p, file_time_type new_time, error_code* ec) {
   using detail::fs_time;
   ErrorHandler<void> err("last_write_time", ec, &p);
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
   TimeSpec ts;
   if (!fs_time::convert_to_timespec(ts, new_time))
     return err.report(errc::value_too_large);
@@ -1234,7 +1234,7 @@ void __last_write_time(const path& p, file_time_type new_time, error_code* ec) {
 #else
   error_code m_ec;
   array<TimeSpec, 2> tbuf;
-#if !defined(_LIBCPP_USE_UTIMENSAT)
+#if !defined(_LIBCUDACXX_USE_UTIMENSAT)
   // This implementation has a race condition between determining the
   // last access time and attempting to set it to the same value using
   // ::utimes
@@ -1264,7 +1264,7 @@ void __permissions(const path& p, perms prms, perm_options opts,
   const bool resolve_symlinks = !has_opt(perm_options::nofollow);
   const bool add_perms = has_opt(perm_options::add);
   const bool remove_perms = has_opt(perm_options::remove);
-  _LIBCPP_ASSERT(
+  _LIBCUDACXX_ASSERT(
       (add_perms + remove_perms + has_opt(perm_options::replace)) == 1,
       "One and only one of the perm_options constants replace, add, or remove "
       "is present in opts");
@@ -1278,7 +1278,7 @@ void __permissions(const path& p, perms prms, perm_options opts,
     set_sym_perms = is_symlink(st);
     if (m_ec)
       return err.report(m_ec);
-    _LIBCPP_ASSERT(st.permissions() != perms::unknown,
+    _LIBCUDACXX_ASSERT(st.permissions() != perms::unknown,
                    "Permissions unexpectedly unknown");
     if (add_perms)
       prms |= st.permissions();
@@ -1324,7 +1324,7 @@ path __read_symlink(const path& p, error_code* ec) {
   detail::SSizeT ret;
   if ((ret = detail::readlink(p.c_str(), buff.get(), size)) == -1)
     return err.report(capture_errno());
-  _LIBCPP_ASSERT(ret > 0, "TODO");
+  _LIBCUDACXX_ASSERT(ret > 0, "TODO");
   if (static_cast<size_t>(ret) >= size)
     return err.report(errc::value_too_large);
   buff[ret] = 0;
@@ -1348,7 +1348,7 @@ bool __remove(const path& p, error_code* ec) {
 //
 // The second implementation is used on platforms where `openat()` & friends are available,
 // and it threads file descriptors through recursive calls to avoid such race conditions.
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 # define REMOVE_ALL_USE_DIRECTORY_ITERATOR
 #endif
 
@@ -1530,7 +1530,7 @@ file_status __symlink_status(const path& p, error_code* ec) {
 path __temp_directory_path(error_code* ec) {
   ErrorHandler<path> err("temp_directory_path", ec);
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
   wchar_t buf[MAX_PATH];
   DWORD retval = GetTempPathW(MAX_PATH, buf);
   if (!retval)
@@ -1744,7 +1744,7 @@ static PathPartKind ClassifyPathPart(string_view_t Part) {
     return PK_DotDot;
   if (Part == PATHSTR("/"))
     return PK_RootSep;
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
   if (Part == PATHSTR("\\"))
     return PK_RootSep;
 #endif
@@ -1805,7 +1805,7 @@ path path::lexically_normal() const {
       break;
     }
     case PK_None:
-      __libcpp_unreachable();
+      __LIBCUDACXX_unreachable();
     }
   }
   // [fs.path.generic]p6.8: If the path is empty, add a dot.
@@ -2011,7 +2011,7 @@ path::iterator& path::iterator::__decrement() {
   return *this;
 }
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 ////////////////////////////////////////////////////////////////////////////
 // Windows path conversions
 size_t __wide_to_char(const wstring &str, char *out, size_t outlen) {
@@ -2099,4 +2099,4 @@ error_code directory_entry::__do_refresh() noexcept {
   return failure_ec;
 }
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM

diff  --git a/libcxx/src/filesystem/posix_compat.h b/libcxx/src/filesystem/posix_compat.h
index 36116ec5a395..99da2bd47e4d 100644
--- a/libcxx/src/filesystem/posix_compat.h
+++ b/libcxx/src/filesystem/posix_compat.h
@@ -28,7 +28,7 @@
 
 #include "filesystem_common.h"
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 # define WIN32_LEAN_AND_MEAN
 # define NOMINMAX
 # include <windows.h>
@@ -41,10 +41,10 @@
 #endif
 #include <time.h>
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 // This struct isn't defined in the normal Windows SDK, but only in the
 // Windows Driver Kit.
-struct LIBCPP_REPARSE_DATA_BUFFER {
+struct LIBCUDACXX_REPARSE_DATA_BUFFER {
   unsigned long  ReparseTag;
   unsigned short ReparseDataLength;
   unsigned short Reserved;
@@ -71,12 +71,12 @@ struct LIBCPP_REPARSE_DATA_BUFFER {
 };
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_BEGIN_NAMESPACE_FILESYSTEM
 
 namespace detail {
 namespace {
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 
 // Various C runtime header sets provide more or less of these. As we
 // provide our own implementation, undef all potential defines from the
@@ -347,7 +347,7 @@ wchar_t *getcwd(wchar_t *buff, size_t size) { return _wgetcwd(buff, size); }
 
 wchar_t *realpath(const wchar_t *path, wchar_t *resolved_name) {
   // Only expected to be used with us allocating the buffer.
-  _LIBCPP_ASSERT(resolved_name == nullptr,
+  _LIBCUDACXX_ASSERT(resolved_name == nullptr,
                  "Windows realpath() assumes a null resolved_name");
 
   WinHandle h(path, FILE_READ_ATTRIBUTES, 0);
@@ -444,8 +444,8 @@ SSizeT readlink(const wchar_t *path, wchar_t *ret_buf, size_t bufsize) {
   if (!DeviceIoControl(h, FSCTL_GET_REPARSE_POINT, nullptr, 0, buf, sizeof(buf),
                        &out, 0))
     return set_errno();
-  const auto *reparse = reinterpret_cast<LIBCPP_REPARSE_DATA_BUFFER *>(buf);
-  size_t path_buf_offset = offsetof(LIBCPP_REPARSE_DATA_BUFFER,
+  const auto *reparse = reinterpret_cast<LIBCUDACXX_REPARSE_DATA_BUFFER *>(buf);
+  size_t path_buf_offset = offsetof(LIBCUDACXX_REPARSE_DATA_BUFFER,
                                     SymbolicLinkReparseBuffer.PathBuffer[0]);
   if (out < path_buf_offset) {
     errno = EINVAL;
@@ -517,6 +517,6 @@ using SSizeT = ::ssize_t;
 } // namespace
 } // end namespace detail
 
-_LIBCPP_END_NAMESPACE_FILESYSTEM
+_LIBCUDACXX_END_NAMESPACE_FILESYSTEM
 
 #endif // POSIX_COMPAT_H

diff  --git a/libcxx/src/format.cpp b/libcxx/src/format.cpp
index cdbcbf8b058d..8767c3e2fb1c 100644
--- a/libcxx/src/format.cpp
+++ b/libcxx/src/format.cpp
@@ -8,8 +8,8 @@
 
 #include <format>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 format_error::~format_error() noexcept = default;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/functional.cpp b/libcxx/src/functional.cpp
index ca1079cdd88d..1dff6e17b08d 100644
--- a/libcxx/src/functional.cpp
+++ b/libcxx/src/functional.cpp
@@ -8,15 +8,15 @@
 
 #include <functional>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
+#ifdef _LIBCUDACXX_ABI_BAD_FUNCTION_CALL_KEY_FUNCTION
 bad_function_call::~bad_function_call() noexcept
 {
 }
 #endif
 
-#ifdef _LIBCPP_ABI_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE
+#ifdef _LIBCUDACXX_ABI_BAD_FUNCTION_CALL_GOOD_WHAT_MESSAGE
 const char*
 bad_function_call::what() const noexcept
 {
@@ -24,4 +24,4 @@ bad_function_call::what() const noexcept
 }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/future.cpp b/libcxx/src/future.cpp
index cdaa93827533..40512ed4fa17 100644
--- a/libcxx/src/future.cpp
+++ b/libcxx/src/future.cpp
@@ -8,14 +8,14 @@
 
 #include <__config>
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 
 #include <future>
 #include <string>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_HIDDEN __future_error_category
+class _LIBCUDACXX_HIDDEN __future_error_category
     : public __do_message
 {
 public:
@@ -29,9 +29,9 @@ __future_error_category::name() const noexcept
     return "future";
 }
 
-_LIBCPP_DIAGNOSTIC_PUSH
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wswitch")
-_LIBCPP_GCC_DIAGNOSTIC_IGNORED("-Wswitch")
+_LIBCUDACXX_DIAGNOSTIC_PUSH
+_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wswitch")
+_LIBCUDACXX_GCC_DIAGNOSTIC_IGNORED("-Wswitch")
 
 string
 __future_error_category::message(int ev) const
@@ -54,7 +54,7 @@ __future_error_category::message(int ev) const
     return string("unspecified future_errc value\n");
 }
 
-_LIBCPP_DIAGNOSTIC_POP
+_LIBCUDACXX_DIAGNOSTIC_POP
 
 const error_category&
 future_category() noexcept
@@ -197,12 +197,12 @@ promise<void>::~promise()
 {
     if (__state_)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         if (!__state_->__has_value() && __state_->use_count() > 1)
             __state_->set_exception(make_exception_ptr(
                       future_error(make_error_code(future_errc::broken_promise))
                                                       ));
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         __state_->__release_shared();
     }
 }
@@ -264,6 +264,6 @@ shared_future<void>::operator=(const shared_future& __rhs)
     return *this;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // !_LIBCUDACXX_HAS_NO_THREADS

diff  --git a/libcxx/src/hash.cpp b/libcxx/src/hash.cpp
index 96cbd38f4dd8..667a71af2955 100644
--- a/libcxx/src/hash.cpp
+++ b/libcxx/src/hash.cpp
@@ -11,9 +11,9 @@
 #include <stdexcept>
 #include <type_traits>
 
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wtautological-constant-out-of-range-compare")
+_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wtautological-constant-out-of-range-compare")
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace {
 
@@ -147,7 +147,7 @@ const unsigned indices[] =
 // against.
 
 template <size_t _Sz = sizeof(size_t)>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if<_Sz == 4, void>::type
 __check_for_overflow(size_t N)
 {
@@ -156,7 +156,7 @@ __check_for_overflow(size_t N)
 }
 
 template <size_t _Sz = sizeof(size_t)>
-inline _LIBCPP_INLINE_VISIBILITY
+inline _LIBCUDACXX_INLINE_VISIBILITY
 typename enable_if<_Sz == 8, void>::type
 __check_for_overflow(size_t N)
 {
@@ -556,4 +556,4 @@ __next_prime(size_t n)
     }
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/include/apple_availability.h b/libcxx/src/include/apple_availability.h
index 504700ebd0a9..2728a84572ab 100644
--- a/libcxx/src/include/apple_availability.h
+++ b/libcxx/src/include/apple_availability.h
@@ -5,47 +5,47 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
-#define _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
+#ifndef _LIBCUDACXX_SRC_INCLUDE_APPLE_AVAILABILITY_H
+#define _LIBCUDACXX_SRC_INCLUDE_APPLE_AVAILABILITY_H
 
 #if defined(__APPLE__)
 
 #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
 #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101300
-#define _LIBCPP_USE_UTIMENSAT
+#define _LIBCUDACXX_USE_UTIMENSAT
 #endif
 #elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
 #if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 110000
-#define _LIBCPP_USE_UTIMENSAT
+#define _LIBCUDACXX_USE_UTIMENSAT
 #endif
 #elif defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__)
 #if __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 110000
-#define _LIBCPP_USE_UTIMENSAT
+#define _LIBCUDACXX_USE_UTIMENSAT
 #endif
 #elif defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__)
 #if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 40000
-#define _LIBCPP_USE_UTIMENSAT
+#define _LIBCUDACXX_USE_UTIMENSAT
 #endif
 #endif // __ENVIRONMENT_.*_VERSION_MIN_REQUIRED__
 
 #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
 #if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 101500
-#define _LIBCPP_USE_ULOCK
+#define _LIBCUDACXX_USE_ULOCK
 #endif
 #elif defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
 #if __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ >= 130000
-#define _LIBCPP_USE_ULOCK
+#define _LIBCUDACXX_USE_ULOCK
 #endif
 #elif defined(__ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__)
 #if __ENVIRONMENT_TV_OS_VERSION_MIN_REQUIRED__ >= 130000
-#define _LIBCPP_USE_ULOCK
+#define _LIBCUDACXX_USE_ULOCK
 #endif
 #elif defined(__ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__)
 #if __ENVIRONMENT_WATCH_OS_VERSION_MIN_REQUIRED__ >= 60000
-#define _LIBCPP_USE_ULOCK
+#define _LIBCUDACXX_USE_ULOCK
 #endif
 #endif // __ENVIRONMENT_.*_VERSION_MIN_REQUIRED__
 
 #endif // __APPLE__
 
-#endif // _LIBCPP_SRC_INCLUDE_APPLE_AVAILABILITY_H
+#endif // _LIBCUDACXX_SRC_INCLUDE_APPLE_AVAILABILITY_H

diff  --git a/libcxx/src/include/atomic_support.h b/libcxx/src/include/atomic_support.h
index 3e73f2ce27f3..287a5c8d482e 100644
--- a/libcxx/src/include/atomic_support.h
+++ b/libcxx/src/include/atomic_support.h
@@ -10,7 +10,7 @@
 #define ATOMIC_SUPPORT_H
 
 #include <__config>
-#include <memory> // for __libcpp_relaxed_load
+#include <memory> // for __LIBCUDACXX_relaxed_load
 
 #if defined(__clang__) && __has_builtin(__atomic_load_n)             \
                        && __has_builtin(__atomic_store_n)            \
@@ -23,26 +23,26 @@
                        && defined(__ATOMIC_RELEASE)                  \
                        && defined(__ATOMIC_ACQ_REL)                  \
                        && defined(__ATOMIC_SEQ_CST)
-#   define _LIBCPP_HAS_ATOMIC_BUILTINS
-#elif defined(_LIBCPP_COMPILER_GCC)
-#   define _LIBCPP_HAS_ATOMIC_BUILTINS
+#   define _LIBCUDACXX_HAS_ATOMIC_BUILTINS
+#elif defined(_LIBCUDACXX_COMPILER_GCC)
+#   define _LIBCUDACXX_HAS_ATOMIC_BUILTINS
 #endif
 
-#if !defined(_LIBCPP_HAS_ATOMIC_BUILTINS) && !defined(_LIBCPP_HAS_NO_THREADS)
-# if defined(_LIBCPP_WARNING)
-    _LIBCPP_WARNING("Building libc++ without __atomic builtins is unsupported")
+#if !defined(_LIBCUDACXX_HAS_ATOMIC_BUILTINS) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
+# if defined(_LIBCUDACXX_WARNING)
+    _LIBCUDACXX_WARNING("Building libc++ without __atomic builtins is unsupported")
 # else
 #   warning Building libc++ without __atomic builtins is unsupported
 # endif
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace {
 
-#if defined(_LIBCPP_HAS_ATOMIC_BUILTINS) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(_LIBCUDACXX_HAS_ATOMIC_BUILTINS) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 
-enum __libcpp_atomic_order {
+enum __LIBCUDACXX_atomic_order {
     _AO_Relaxed = __ATOMIC_RELAXED,
     _AO_Consume = __ATOMIC_CONSUME,
     _AO_Acquire = __ATOMIC_ACQUIRE,
@@ -52,47 +52,47 @@ enum __libcpp_atomic_order {
 };
 
 template <class _ValueType, class _FromType>
-inline _LIBCPP_INLINE_VISIBILITY
-void __libcpp_atomic_store(_ValueType* __dest, _FromType __val,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+void __LIBCUDACXX_atomic_store(_ValueType* __dest, _FromType __val,
                            int __order = _AO_Seq)
 {
     __atomic_store_n(__dest, __val, __order);
 }
 
 template <class _ValueType, class _FromType>
-inline _LIBCPP_INLINE_VISIBILITY
-void __libcpp_relaxed_store(_ValueType* __dest, _FromType __val)
+inline _LIBCUDACXX_INLINE_VISIBILITY
+void __LIBCUDACXX_relaxed_store(_ValueType* __dest, _FromType __val)
 {
     __atomic_store_n(__dest, __val, _AO_Relaxed);
 }
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
-_ValueType __libcpp_atomic_load(_ValueType const* __val,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_ValueType __LIBCUDACXX_atomic_load(_ValueType const* __val,
                                 int __order = _AO_Seq)
 {
     return __atomic_load_n(__val, __order);
 }
 
 template <class _ValueType, class _AddType>
-inline _LIBCPP_INLINE_VISIBILITY
-_ValueType __libcpp_atomic_add(_ValueType* __val, _AddType __a,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_ValueType __LIBCUDACXX_atomic_add(_ValueType* __val, _AddType __a,
                                int __order = _AO_Seq)
 {
     return __atomic_add_fetch(__val, __a, __order);
 }
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
-_ValueType __libcpp_atomic_exchange(_ValueType* __target,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_ValueType __LIBCUDACXX_atomic_exchange(_ValueType* __target,
                                     _ValueType __value, int __order = _AO_Seq)
 {
     return __atomic_exchange_n(__target, __value, __order);
 }
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
-bool __libcpp_atomic_compare_exchange(_ValueType* __val,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+bool __LIBCUDACXX_atomic_compare_exchange(_ValueType* __val,
     _ValueType* __expected, _ValueType __after,
     int __success_order = _AO_Seq,
     int __fail_order = _AO_Seq)
@@ -101,9 +101,9 @@ bool __libcpp_atomic_compare_exchange(_ValueType* __val,
                                        __success_order, __fail_order);
 }
 
-#else // _LIBCPP_HAS_NO_THREADS
+#else // _LIBCUDACXX_HAS_NO_THREADS
 
-enum __libcpp_atomic_order {
+enum __LIBCUDACXX_atomic_order {
     _AO_Relaxed,
     _AO_Consume,
     _AO_Acquire,
@@ -113,39 +113,39 @@ enum __libcpp_atomic_order {
 };
 
 template <class _ValueType, class _FromType>
-inline _LIBCPP_INLINE_VISIBILITY
-void __libcpp_atomic_store(_ValueType* __dest, _FromType __val,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+void __LIBCUDACXX_atomic_store(_ValueType* __dest, _FromType __val,
                            int = 0)
 {
     *__dest = __val;
 }
 
 template <class _ValueType, class _FromType>
-inline _LIBCPP_INLINE_VISIBILITY
-void __libcpp_relaxed_store(_ValueType* __dest, _FromType __val)
+inline _LIBCUDACXX_INLINE_VISIBILITY
+void __LIBCUDACXX_relaxed_store(_ValueType* __dest, _FromType __val)
 {
     *__dest = __val;
 }
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
-_ValueType __libcpp_atomic_load(_ValueType const* __val,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_ValueType __LIBCUDACXX_atomic_load(_ValueType const* __val,
                                 int = 0)
 {
     return *__val;
 }
 
 template <class _ValueType, class _AddType>
-inline _LIBCPP_INLINE_VISIBILITY
-_ValueType __libcpp_atomic_add(_ValueType* __val, _AddType __a,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_ValueType __LIBCUDACXX_atomic_add(_ValueType* __val, _AddType __a,
                                int = 0)
 {
     return *__val += __a;
 }
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
-_ValueType __libcpp_atomic_exchange(_ValueType* __target,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+_ValueType __LIBCUDACXX_atomic_exchange(_ValueType* __target,
                                     _ValueType __value, int = _AO_Seq)
 {
     _ValueType old = *__target;
@@ -154,8 +154,8 @@ _ValueType __libcpp_atomic_exchange(_ValueType* __target,
 }
 
 template <class _ValueType>
-inline _LIBCPP_INLINE_VISIBILITY
-bool __libcpp_atomic_compare_exchange(_ValueType* __val,
+inline _LIBCUDACXX_INLINE_VISIBILITY
+bool __LIBCUDACXX_atomic_compare_exchange(_ValueType* __val,
     _ValueType* __expected, _ValueType __after,
     int = 0, int = 0)
 {
@@ -167,10 +167,10 @@ bool __libcpp_atomic_compare_exchange(_ValueType* __val,
     return false;
 }
 
-#endif // _LIBCPP_HAS_NO_THREADS
+#endif // _LIBCUDACXX_HAS_NO_THREADS
 
 } // end namespace
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 #endif // ATOMIC_SUPPORT_H

diff  --git a/libcxx/src/include/config_elast.h b/libcxx/src/include/config_elast.h
index bef26ec5019e..78aa32374d0d 100644
--- a/libcxx/src/include/config_elast.h
+++ b/libcxx/src/include/config_elast.h
@@ -6,46 +6,46 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_CONFIG_ELAST
-#define _LIBCPP_CONFIG_ELAST
+#ifndef _LIBCUDACXX_CONFIG_ELAST
+#define _LIBCUDACXX_CONFIG_ELAST
 
 #include <__config>
 
-#if defined(_LIBCPP_MSVCRT_LIKE)
+#if defined(_LIBCUDACXX_MSVCRT_LIKE)
 #include <stdlib.h>
 #else
 #include <errno.h>
 #endif
 
-// Note: _LIBCPP_ELAST needs to be defined only on platforms
+// Note: _LIBCUDACXX_ELAST needs to be defined only on platforms
 // where strerror/strerror_r can't handle out-of-range errno values.
 #if defined(ELAST)
-#define _LIBCPP_ELAST ELAST
+#define _LIBCUDACXX_ELAST ELAST
 #elif defined(_NEWLIB_VERSION)
-#define _LIBCPP_ELAST __ELASTERROR
+#define _LIBCUDACXX_ELAST __ELASTERROR
 #elif defined(__NuttX__)
-// No _LIBCPP_ELAST needed on NuttX
+// No _LIBCUDACXX_ELAST needed on NuttX
 #elif defined(__Fuchsia__)
-// No _LIBCPP_ELAST needed on Fuchsia
+// No _LIBCUDACXX_ELAST needed on Fuchsia
 #elif defined(__wasi__)
-// No _LIBCPP_ELAST needed on WASI
+// No _LIBCUDACXX_ELAST needed on WASI
 #elif defined(__EMSCRIPTEN__)
-// No _LIBCPP_ELAST needed on Emscripten
-#elif defined(__linux__) || defined(_LIBCPP_HAS_MUSL_LIBC)
-#define _LIBCPP_ELAST 4095
+// No _LIBCUDACXX_ELAST needed on Emscripten
+#elif defined(__linux__) || defined(_LIBCUDACXX_HAS_MUSL_LIBC)
+#define _LIBCUDACXX_ELAST 4095
 #elif defined(__APPLE__)
-// No _LIBCPP_ELAST needed on Apple
+// No _LIBCUDACXX_ELAST needed on Apple
 #elif defined(__sun__)
-#define _LIBCPP_ELAST ESTALE
+#define _LIBCUDACXX_ELAST ESTALE
 #elif defined(__MVS__)
-#define _LIBCPP_ELAST 1160
-#elif defined(_LIBCPP_MSVCRT_LIKE)
-#define _LIBCPP_ELAST (_sys_nerr - 1)
+#define _LIBCUDACXX_ELAST 1160
+#elif defined(_LIBCUDACXX_MSVCRT_LIKE)
+#define _LIBCUDACXX_ELAST (_sys_nerr - 1)
 #elif defined(_AIX)
-#define _LIBCPP_ELAST 127
+#define _LIBCUDACXX_ELAST 127
 #else
 // Warn here so that the person doing the libcxx port has an easier time:
 #warning ELAST for this platform not yet implemented
 #endif
 
-#endif // _LIBCPP_CONFIG_ELAST
+#endif // _LIBCUDACXX_CONFIG_ELAST

diff  --git a/libcxx/src/include/refstring.h b/libcxx/src/include/refstring.h
index 0675b393beb4..98abecadaa36 100644
--- a/libcxx/src/include/refstring.h
+++ b/libcxx/src/include/refstring.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_REFSTRING_H
-#define _LIBCPP_REFSTRING_H
+#ifndef _LIBCUDACXX_REFSTRING_H
+#define _LIBCUDACXX_REFSTRING_H
 
 #include <__config>
 #include <stdexcept>
@@ -27,12 +27,12 @@
 // won't try to delete the memory.
 #if defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) || \
     defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
-#   define _LIBCPP_CHECK_FOR_GCC_EMPTY_STRING_STORAGE
+#   define _LIBCUDACXX_CHECK_FOR_GCC_EMPTY_STRING_STORAGE
 #   include <dlfcn.h>
 #   include <mach-o/dyld.h>
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace __refstring_imp { namespace {
 typedef int count_t;
@@ -53,7 +53,7 @@ inline char * data_from_rep(_Rep_base *rep) noexcept {
     return data + sizeof(*rep);
 }
 
-#if defined(_LIBCPP_CHECK_FOR_GCC_EMPTY_STRING_STORAGE)
+#if defined(_LIBCUDACXX_CHECK_FOR_GCC_EMPTY_STRING_STORAGE)
 inline
 const char* compute_gcc_empty_string_storage() noexcept
 {
@@ -80,7 +80,7 @@ get_gcc_empty_string_storage() noexcept
 using namespace __refstring_imp;
 
 inline
-__libcpp_refstring::__libcpp_refstring(const char* msg) {
+__LIBCUDACXX_refstring::__LIBCUDACXX_refstring(const char* msg) {
     std::size_t len = strlen(msg);
     _Rep_base* rep = static_cast<_Rep_base *>(::operator new(sizeof(*rep) + len + 1));
     rep->len = len;
@@ -92,23 +92,23 @@ __libcpp_refstring::__libcpp_refstring(const char* msg) {
 }
 
 inline
-__libcpp_refstring::__libcpp_refstring(const __libcpp_refstring &s) noexcept
+__LIBCUDACXX_refstring::__LIBCUDACXX_refstring(const __LIBCUDACXX_refstring &s) noexcept
     : __imp_(s.__imp_)
 {
     if (__uses_refcount())
-        __libcpp_atomic_add(&rep_from_data(__imp_)->count, 1);
+        __LIBCUDACXX_atomic_add(&rep_from_data(__imp_)->count, 1);
 }
 
 inline
-__libcpp_refstring& __libcpp_refstring::operator=(__libcpp_refstring const& s) noexcept {
+__LIBCUDACXX_refstring& __LIBCUDACXX_refstring::operator=(__LIBCUDACXX_refstring const& s) noexcept {
     bool adjust_old_count = __uses_refcount();
     struct _Rep_base *old_rep = rep_from_data(__imp_);
     __imp_ = s.__imp_;
     if (__uses_refcount())
-        __libcpp_atomic_add(&rep_from_data(__imp_)->count, 1);
+        __LIBCUDACXX_atomic_add(&rep_from_data(__imp_)->count, 1);
     if (adjust_old_count)
     {
-        if (__libcpp_atomic_add(&old_rep->count, count_t(-1)) < 0)
+        if (__LIBCUDACXX_atomic_add(&old_rep->count, count_t(-1)) < 0)
         {
             ::operator delete(old_rep);
         }
@@ -117,24 +117,24 @@ __libcpp_refstring& __libcpp_refstring::operator=(__libcpp_refstring const& s) n
 }
 
 inline
-__libcpp_refstring::~__libcpp_refstring() {
+__LIBCUDACXX_refstring::~__LIBCUDACXX_refstring() {
     if (__uses_refcount()) {
         _Rep_base* rep = rep_from_data(__imp_);
-        if (__libcpp_atomic_add(&rep->count, count_t(-1)) < 0) {
+        if (__LIBCUDACXX_atomic_add(&rep->count, count_t(-1)) < 0) {
             ::operator delete(rep);
         }
     }
 }
 
 inline
-bool __libcpp_refstring::__uses_refcount() const {
-#if defined(_LIBCPP_CHECK_FOR_GCC_EMPTY_STRING_STORAGE)
+bool __LIBCUDACXX_refstring::__uses_refcount() const {
+#if defined(_LIBCUDACXX_CHECK_FOR_GCC_EMPTY_STRING_STORAGE)
     return __imp_ != get_gcc_empty_string_storage();
 #else
     return true;
 #endif
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif //_LIBCPP_REFSTRING_H
+#endif //_LIBCUDACXX_REFSTRING_H

diff  --git a/libcxx/src/include/ryu/common.h b/libcxx/src/include/ryu/common.h
index c24115c23364..589091d435df 100644
--- a/libcxx/src/include/ryu/common.h
+++ b/libcxx/src/include/ryu/common.h
@@ -36,8 +36,8 @@
 // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-#ifndef _LIBCPP_SRC_INCLUDE_RYU_COMMON_H
-#define _LIBCPP_SRC_INCLUDE_RYU_COMMON_H
+#ifndef _LIBCUDACXX_SRC_INCLUDE_RYU_COMMON_H
+#define _LIBCUDACXX_SRC_INCLUDE_RYU_COMMON_H
 
 // Avoid formatting to keep the changes with the original code minimal.
 // clang-format off
@@ -45,13 +45,13 @@
 #include <__assert>
 #include "__config"
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __decimalLength9(const uint32_t __v) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __decimalLength9(const uint32_t __v) {
   // Function precondition: __v is not a 10-digit number.
   // (f2s: 9 digits are sufficient for round-tripping.)
   // (d2fixed: We print 9-digit blocks.)
-  _LIBCPP_ASSERT(__v < 1000000000, "");
+  _LIBCUDACXX_ASSERT(__v < 1000000000, "");
   if (__v >= 100000000) { return 9; }
   if (__v >= 10000000) { return 8; }
   if (__v >= 1000000) { return 7; }
@@ -64,45 +64,45 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 }
 
 // Returns __e == 0 ? 1 : ceil(log_2(5^__e)).
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI  inline int32_t __pow5bits(const int32_t __e) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI  inline int32_t __pow5bits(const int32_t __e) {
   // This approximation works up to the point that the multiplication overflows at __e = 3529.
   // If the multiplication were done in 64 bits, it would fail at 5^4004 which is just greater
   // than 2^9297.
-  _LIBCPP_ASSERT(__e >= 0, "");
-  _LIBCPP_ASSERT(__e <= 3528, "");
+  _LIBCUDACXX_ASSERT(__e >= 0, "");
+  _LIBCUDACXX_ASSERT(__e <= 3528, "");
   return static_cast<int32_t>(((static_cast<uint32_t>(__e) * 1217359) >> 19) + 1);
 }
 
 // Returns floor(log_10(2^__e)).
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI  inline uint32_t __log10Pow2(const int32_t __e) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI  inline uint32_t __log10Pow2(const int32_t __e) {
   // The first value this approximation fails for is 2^1651 which is just greater than 10^297.
-  _LIBCPP_ASSERT(__e >= 0, "");
-  _LIBCPP_ASSERT(__e <= 1650, "");
+  _LIBCUDACXX_ASSERT(__e >= 0, "");
+  _LIBCUDACXX_ASSERT(__e <= 1650, "");
   return (static_cast<uint32_t>(__e) * 78913) >> 18;
 }
 
 // Returns floor(log_10(5^__e)).
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __log10Pow5(const int32_t __e) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __log10Pow5(const int32_t __e) {
   // The first value this approximation fails for is 5^2621 which is just greater than 10^1832.
-  _LIBCPP_ASSERT(__e >= 0, "");
-  _LIBCPP_ASSERT(__e <= 2620, "");
+  _LIBCUDACXX_ASSERT(__e >= 0, "");
+  _LIBCUDACXX_ASSERT(__e <= 2620, "");
   return (static_cast<uint32_t>(__e) * 732923) >> 20;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __float_to_bits(const float __f) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __float_to_bits(const float __f) {
   uint32_t __bits = 0;
-  _VSTD::memcpy(&__bits, &__f, sizeof(float));
+  _CUDA_VSTD::memcpy(&__bits, &__f, sizeof(float));
   return __bits;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __double_to_bits(const double __d) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __double_to_bits(const double __d) {
   uint64_t __bits = 0;
-  _VSTD::memcpy(&__bits, &__d, sizeof(double));
+  _CUDA_VSTD::memcpy(&__bits, &__d, sizeof(double));
   return __bits;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 // clang-format on
 
-#endif // _LIBCPP_SRC_INCLUDE_RYU_COMMON_H
+#endif // _LIBCUDACXX_SRC_INCLUDE_RYU_COMMON_H

diff  --git a/libcxx/src/include/ryu/d2fixed.h b/libcxx/src/include/ryu/d2fixed.h
index b8862de251ce..024721afd0b3 100644
--- a/libcxx/src/include/ryu/d2fixed.h
+++ b/libcxx/src/include/ryu/d2fixed.h
@@ -36,8 +36,8 @@
 // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-#ifndef _LIBCPP_SRC_INCLUDE_RYU_D2FIXED_H
-#define _LIBCPP_SRC_INCLUDE_RYU_D2FIXED_H
+#ifndef _LIBCUDACXX_SRC_INCLUDE_RYU_D2FIXED_H
+#define _LIBCUDACXX_SRC_INCLUDE_RYU_D2FIXED_H
 
 // Avoid formatting to keep the changes with the original code minimal.
 // clang-format off
@@ -45,7 +45,7 @@
 #include <__config>
 #include <cstdint>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 void __append_n_digits(const uint32_t __olength, uint32_t __digits, char* const __result);
 void __append_nine_digits(uint32_t __digits, char* const __result);
@@ -53,8 +53,8 @@ void __append_nine_digits(uint32_t __digits, char* const __result);
 [[nodiscard]] to_chars_result __d2fixed_buffered_n(char* _First, char* const _Last, const double __d, const uint32_t __precision);
 [[nodiscard]] to_chars_result __d2exp_buffered_n(char* _First, char* const _Last, const double __d, uint32_t __precision);
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 // clang-format on
 
-#endif // _LIBCPP_SRC_INCLUDE_RYU_D2FIXED_H
+#endif // _LIBCUDACXX_SRC_INCLUDE_RYU_D2FIXED_H

diff  --git a/libcxx/src/include/ryu/d2fixed_full_table.h b/libcxx/src/include/ryu/d2fixed_full_table.h
index a63d6f2d1619..7cc91313ba1a 100644
--- a/libcxx/src/include/ryu/d2fixed_full_table.h
+++ b/libcxx/src/include/ryu/d2fixed_full_table.h
@@ -36,15 +36,15 @@
 // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-#ifndef _LIBCPP_SRC_INCLUDE_RYU_D2FIXED_FULL_TABLE_H
-#define _LIBCPP_SRC_INCLUDE_RYU_D2FIXED_FULL_TABLE_H
+#ifndef _LIBCUDACXX_SRC_INCLUDE_RYU_D2FIXED_FULL_TABLE_H
+#define _LIBCUDACXX_SRC_INCLUDE_RYU_D2FIXED_FULL_TABLE_H
 
 // Avoid formatting to keep the changes with the original code minimal.
 // clang-format off
 
 #include <__config>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 inline constexpr int __TABLE_SIZE = 64;
 
@@ -4444,8 +4444,8 @@ inline constexpr uint64_t __POW10_SPLIT_2[3133][3] = {
   {                    0u,                    0u,          33000000000u },
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 // clang-format on
 
-#endif // _LIBCPP_SRC_INCLUDE_RYU_D2FIXED_FULL_TABLE_H
+#endif // _LIBCUDACXX_SRC_INCLUDE_RYU_D2FIXED_FULL_TABLE_H

diff  --git a/libcxx/src/include/ryu/d2s.h b/libcxx/src/include/ryu/d2s.h
index 3d9f10c0f15a..056e164efa6a 100644
--- a/libcxx/src/include/ryu/d2s.h
+++ b/libcxx/src/include/ryu/d2s.h
@@ -36,15 +36,15 @@
 // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-#ifndef _LIBCPP_SRC_INCLUDE_RYU_DS2_H
-#define _LIBCPP_SRC_INCLUDE_RYU_DS2_H
+#ifndef _LIBCUDACXX_SRC_INCLUDE_RYU_DS2_H
+#define _LIBCUDACXX_SRC_INCLUDE_RYU_DS2_H
 
 // Avoid formatting to keep the changes with the original code minimal.
 // clang-format off
 
 #include <__config>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 inline constexpr int __DOUBLE_MANTISSA_BITS = 52;
 inline constexpr int __DOUBLE_EXPONENT_BITS = 11;
@@ -55,8 +55,8 @@ inline constexpr int __DOUBLE_POW5_BITCOUNT = 121;
 
 [[nodiscard]] to_chars_result __d2s_buffered_n(char* const _First, char* const _Last, const double __f, const chars_format _Fmt);
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 // clang-format on
 
-#endif // _LIBCPP_SRC_INCLUDE_RYU_DS2_H
+#endif // _LIBCUDACXX_SRC_INCLUDE_RYU_DS2_H

diff  --git a/libcxx/src/include/ryu/d2s_full_table.h b/libcxx/src/include/ryu/d2s_full_table.h
index 96307f698627..d92d31c81234 100644
--- a/libcxx/src/include/ryu/d2s_full_table.h
+++ b/libcxx/src/include/ryu/d2s_full_table.h
@@ -36,15 +36,15 @@
 // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-#ifndef _LIBCPP_SRC_INCLUDE_RYU_D2S_FULL_TABLE_H
-#define _LIBCPP_SRC_INCLUDE_RYU_D2S_FULL_TABLE_H
+#ifndef _LIBCUDACXX_SRC_INCLUDE_RYU_D2S_FULL_TABLE_H
+#define _LIBCUDACXX_SRC_INCLUDE_RYU_D2S_FULL_TABLE_H
 
 // Avoid formatting to keep the changes with the original code minimal.
 // clang-format off
 
 #include <__config>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 inline constexpr uint64_t __DOUBLE_POW5_INV_SPLIT[292][2] = {
   {                    1u, 288230376151711744u }, {  3689348814741910324u, 230584300921369395u },
@@ -361,8 +361,8 @@ inline constexpr uint64_t __DOUBLE_POW5_SPLIT[326][2] = {
   {  5969538097335305869u,  89002954340288055u }, {  2850236603241744433u, 111253692925360069u }
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 // clang-format on
 
-#endif // _LIBCPP_SRC_INCLUDE_RYU_D2S_FULL_TABLE_H
+#endif // _LIBCUDACXX_SRC_INCLUDE_RYU_D2S_FULL_TABLE_H

diff  --git a/libcxx/src/include/ryu/d2s_intrinsics.h b/libcxx/src/include/ryu/d2s_intrinsics.h
index 762763f9b92c..ce54a3824cd0 100644
--- a/libcxx/src/include/ryu/d2s_intrinsics.h
+++ b/libcxx/src/include/ryu/d2s_intrinsics.h
@@ -36,8 +36,8 @@
 // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-#ifndef _LIBCPP_SRC_INCLUDE_RYU_DS2_INTRINSICS_H
-#define _LIBCPP_SRC_INCLUDE_RYU_DS2_INTRINSICS_H
+#ifndef _LIBCUDACXX_SRC_INCLUDE_RYU_DS2_INTRINSICS_H
+#define _LIBCUDACXX_SRC_INCLUDE_RYU_DS2_INTRINSICS_H
 
 // Avoid formatting to keep the changes with the original code minimal.
 // clang-format off
@@ -47,15 +47,15 @@
 
 #include "include/ryu/ryu.h"
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #if defined(_M_X64) && defined(_MSC_VER)
-#define _LIBCPP_INTRINSIC128 1
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __ryu_umul128(const uint64_t __a, const uint64_t __b, uint64_t* const __productHi) {
+#define _LIBCUDACXX_INTRINSIC128 1
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __ryu_umul128(const uint64_t __a, const uint64_t __b, uint64_t* const __productHi) {
   return _umul128(__a, __b, __productHi);
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __ryu_shiftright128(const uint64_t __lo, const uint64_t __hi, const uint32_t __dist) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __ryu_shiftright128(const uint64_t __lo, const uint64_t __hi, const uint32_t __dist) {
   // For the __shiftright128 intrinsic, the shift value is always
   // modulo 64.
   // In the current implementation of the double-precision version
@@ -63,7 +63,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
   // (The shift value is in the range [49, 58].)
   // Check this here in case a future change requires larger shift
   // values. In this case this function needs to be adjusted.
-  _LIBCPP_ASSERT(__dist < 64, "");
+  _LIBCUDACXX_ASSERT(__dist < 64, "");
   return __shiftright128(__lo, __hi, static_cast<unsigned char>(__dist));
 }
 
@@ -71,21 +71,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 #elif defined(__SIZEOF_INT128__) && ( \
     (defined(__clang__) && !defined(_MSC_VER)) || \
     (defined(__GNUC__) && !defined(__clang__) && !defined(__CUDACC__)))
-#define _LIBCPP_INTRINSIC128 1
+#define _LIBCUDACXX_INTRINSIC128 1
   // We have __uint128 support in clang or gcc
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __ryu_umul128(const uint64_t __a, const uint64_t __b, uint64_t* const __productHi) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __ryu_umul128(const uint64_t __a, const uint64_t __b, uint64_t* const __productHi) {
   auto __temp = __a * (unsigned __int128)__b;
   *__productHi = __temp >> 64;
   return static_cast<uint64_t>(__temp);
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __ryu_shiftright128(const uint64_t __lo, const uint64_t __hi, const uint32_t __dist) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __ryu_shiftright128(const uint64_t __lo, const uint64_t __hi, const uint32_t __dist) {
   // In the current implementation of the double-precision version
   // of Ryu, the shift value is always < 64.
   // (The shift value is in the range [49, 58].)
   // Check this here in case a future change requires larger shift
   // values. In this case this function needs to be adjusted.
-  _LIBCPP_ASSERT(__dist < 64, "");
+  _LIBCUDACXX_ASSERT(__dist < 64, "");
   auto __temp = __lo | ((unsigned __int128)__hi << 64);
   // For x64 128-bit shfits using the `shrd` instruction and two 64-bit
   // registers, the shift value is modulo 64.  Thus the `& 63` is free.
@@ -93,7 +93,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 }
 #else // ^^^ __int128 available ^^^ / vvv intrinsics unavailable vvv
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline _LIBCPP_ALWAYS_INLINE uint64_t __ryu_umul128(const uint64_t __a, const uint64_t __b, uint64_t* const __productHi) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline _LIBCUDACXX_ALWAYS_INLINE uint64_t __ryu_umul128(const uint64_t __a, const uint64_t __b, uint64_t* const __productHi) {
   // TRANSITION, VSO-634761
   // The casts here help MSVC to avoid calls to the __allmul library function.
   const uint32_t __aLo = static_cast<uint32_t>(__a);
@@ -124,25 +124,25 @@ _LIBCPP_BEGIN_NAMESPACE_STD
   return __pLo;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __ryu_shiftright128(const uint64_t __lo, const uint64_t __hi, const uint32_t __dist) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __ryu_shiftright128(const uint64_t __lo, const uint64_t __hi, const uint32_t __dist) {
   // We don't need to handle the case __dist >= 64 here (see above).
-  _LIBCPP_ASSERT(__dist < 64, "");
-#ifdef _LIBCPP_64_BIT
-  _LIBCPP_ASSERT(__dist > 0, "");
+  _LIBCUDACXX_ASSERT(__dist < 64, "");
+#ifdef _LIBCUDACXX_64_BIT
+  _LIBCUDACXX_ASSERT(__dist > 0, "");
   return (__hi << (64 - __dist)) | (__lo >> __dist);
 #else // ^^^ 64-bit ^^^ / vvv 32-bit vvv
   // Avoid a 64-bit shift by taking advantage of the range of shift values.
-  _LIBCPP_ASSERT(__dist >= 32, "");
+  _LIBCUDACXX_ASSERT(__dist >= 32, "");
   return (__hi << (64 - __dist)) | (static_cast<uint32_t>(__lo >> 32) >> (__dist - 32));
 #endif // ^^^ 32-bit ^^^
 }
 
 #endif // ^^^ intrinsics unavailable ^^^
 
-#ifndef _LIBCPP_64_BIT
+#ifndef _LIBCUDACXX_64_BIT
 
 // Returns the high 64 bits of the 128-bit product of __a and __b.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __umulh(const uint64_t __a, const uint64_t __b) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __umulh(const uint64_t __a, const uint64_t __b) {
   // Reuse the __ryu_umul128 implementation.
   // Optimizers will likely eliminate the instructions used to compute the
   // low part of the product.
@@ -163,27 +163,27 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 // The multipliers and shift values are the ones generated by clang x64
 // for expressions like x/5, x/10, etc.
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __div5(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __div5(const uint64_t __x) {
   return __umulh(__x, 0xCCCCCCCCCCCCCCCDu) >> 2;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __div10(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __div10(const uint64_t __x) {
   return __umulh(__x, 0xCCCCCCCCCCCCCCCDu) >> 3;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __div100(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __div100(const uint64_t __x) {
   return __umulh(__x >> 2, 0x28F5C28F5C28F5C3u) >> 2;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __div1e8(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __div1e8(const uint64_t __x) {
   return __umulh(__x, 0xABCC77118461CEFDu) >> 26;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __div1e9(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __div1e9(const uint64_t __x) {
   return __umulh(__x >> 9, 0x44B82FA09B5A53u) >> 11;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __mod1e9(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __mod1e9(const uint64_t __x) {
   // Avoid 64-bit math as much as possible.
   // Returning static_cast<uint32_t>(__x - 1000000000 * __div1e9(__x)) would
   // perform 32x64-bit multiplication and 64-bit subtraction.
@@ -198,36 +198,36 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #else // ^^^ 32-bit ^^^ / vvv 64-bit vvv
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __div5(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __div5(const uint64_t __x) {
   return __x / 5;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __div10(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __div10(const uint64_t __x) {
   return __x / 10;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __div100(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __div100(const uint64_t __x) {
   return __x / 100;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __div1e8(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __div1e8(const uint64_t __x) {
   return __x / 100000000;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __div1e9(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __div1e9(const uint64_t __x) {
   return __x / 1000000000;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __mod1e9(const uint64_t __x) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __mod1e9(const uint64_t __x) {
   return static_cast<uint32_t>(__x - 1000000000 * __div1e9(__x));
 }
 
 #endif // ^^^ 64-bit ^^^
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __pow5Factor(uint64_t __value) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __pow5Factor(uint64_t __value) {
   uint32_t __count = 0;
   for (;;) {
-    _LIBCPP_ASSERT(__value != 0, "");
+    _LIBCUDACXX_ASSERT(__value != 0, "");
     const uint64_t __q = __div5(__value);
     const uint32_t __r = static_cast<uint32_t>(__value) - 5 * static_cast<uint32_t>(__q);
     if (__r != 0) {
@@ -240,21 +240,21 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 }
 
 // Returns true if __value is divisible by 5^__p.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline bool __multipleOfPowerOf5(const uint64_t __value, const uint32_t __p) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline bool __multipleOfPowerOf5(const uint64_t __value, const uint32_t __p) {
   // I tried a case distinction on __p, but there was no performance 
diff erence.
   return __pow5Factor(__value) >= __p;
 }
 
 // Returns true if __value is divisible by 2^__p.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline bool __multipleOfPowerOf2(const uint64_t __value, const uint32_t __p) {
-  _LIBCPP_ASSERT(__value != 0, "");
-  _LIBCPP_ASSERT(__p < 64, "");
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline bool __multipleOfPowerOf2(const uint64_t __value, const uint32_t __p) {
+  _LIBCUDACXX_ASSERT(__value != 0, "");
+  _LIBCUDACXX_ASSERT(__p < 64, "");
   // __builtin_ctzll doesn't appear to be faster here.
   return (__value & ((1ull << __p) - 1)) == 0;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 // clang-format on
 
-#endif // _LIBCPP_SRC_INCLUDE_RYU_DS2_INTRINSICS_H
+#endif // _LIBCUDACXX_SRC_INCLUDE_RYU_DS2_INTRINSICS_H

diff  --git a/libcxx/src/include/ryu/digit_table.h b/libcxx/src/include/ryu/digit_table.h
index c57a0966ef2c..12e81c9fca39 100644
--- a/libcxx/src/include/ryu/digit_table.h
+++ b/libcxx/src/include/ryu/digit_table.h
@@ -36,13 +36,13 @@
 // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-#ifndef _LIBCPP_SRC_INCLUDE_RYU_DIGIT_TABLE_H
-#define _LIBCPP_SRC_INCLUDE_RYU_DIGIT_TABLE_H
+#ifndef _LIBCUDACXX_SRC_INCLUDE_RYU_DIGIT_TABLE_H
+#define _LIBCUDACXX_SRC_INCLUDE_RYU_DIGIT_TABLE_H
 
 #include <__charconv/tables.h>
 #include <__config>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // A table of all two-digit numbers. This is used to speed up decimal digit
 // generation by copying pairs of digits into the final output.
@@ -52,6 +52,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 // reuses the table already available in libc++.
 inline constexpr auto& __DIGIT_TABLE = __itoa::__table<>::__digits_base_10;
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_SRC_INCLUDE_RYU_DIGIT_TABLE_H
+#endif // _LIBCUDACXX_SRC_INCLUDE_RYU_DIGIT_TABLE_H

diff  --git a/libcxx/src/include/ryu/f2s.h b/libcxx/src/include/ryu/f2s.h
index be304c2f9c63..dcd7b1a34109 100644
--- a/libcxx/src/include/ryu/f2s.h
+++ b/libcxx/src/include/ryu/f2s.h
@@ -36,20 +36,20 @@
 // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-#ifndef _LIBCPP_SRC_INCLUDE_RYU_FS2_H
-#define _LIBCPP_SRC_INCLUDE_RYU_FS2_H
+#ifndef _LIBCUDACXX_SRC_INCLUDE_RYU_FS2_H
+#define _LIBCUDACXX_SRC_INCLUDE_RYU_FS2_H
 
 // Avoid formatting to keep the changes with the original code minimal.
 // clang-format off
 
 #include <__config>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 [[nodiscard]] to_chars_result __f2s_buffered_n(char* const _First, char* const _Last, const float __f, const chars_format _Fmt);
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 // clang-format on
 
-#endif // _LIBCPP_SRC_INCLUDE_RYU_FS2_H
+#endif // _LIBCUDACXX_SRC_INCLUDE_RYU_FS2_H

diff  --git a/libcxx/src/include/ryu/ryu.h b/libcxx/src/include/ryu/ryu.h
index cb44bd3fef05..df7b6b40a0f6 100644
--- a/libcxx/src/include/ryu/ryu.h
+++ b/libcxx/src/include/ryu/ryu.h
@@ -38,8 +38,8 @@
 // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 // DEALINGS IN THE SOFTWARE.
 
-#ifndef _LIBCPP_SRC_INCLUDE_RYU_RYU_H
-#define _LIBCPP_SRC_INCLUDE_RYU_RYU_H
+#ifndef _LIBCUDACXX_SRC_INCLUDE_RYU_RYU_H
+#define _LIBCUDACXX_SRC_INCLUDE_RYU_RYU_H
 
 // Avoid formatting to keep the changes with the original code minimal.
 // clang-format off
@@ -62,15 +62,15 @@
 #endif // defined(_MSC_VER)
 
 #if defined(_WIN64) || defined(_M_AMD64) || defined(__x86_64__) ||  defined(__aarch64__)
-#define _LIBCPP_64_BIT
+#define _LIBCUDACXX_64_BIT
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // https://github.com/ulfjack/ryu/tree/59661c3/ryu
 
 #if !defined(_MSC_VER)
-_LIBCPP_HIDE_FROM_ABI inline unsigned char _BitScanForward64(unsigned long* __index, unsigned long long __mask) {
+_LIBCUDACXX_HIDE_FROM_ABI inline unsigned char _BitScanForward64(unsigned long* __index, unsigned long long __mask) {
   if (__mask == 0) {
     return false;
   }
@@ -78,7 +78,7 @@ _LIBCPP_HIDE_FROM_ABI inline unsigned char _BitScanForward64(unsigned long* __in
   return true;
 }
 
-_LIBCPP_HIDE_FROM_ABI inline unsigned char _BitScanForward(unsigned long* __index, unsigned int __mask) {
+_LIBCUDACXX_HIDE_FROM_ABI inline unsigned char _BitScanForward(unsigned long* __index, unsigned int __mask) {
   if (__mask == 0) {
     return false;
   }
@@ -98,7 +98,7 @@ template <class _Floating>
 }
 
 template <class _Floating>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI to_chars_result _Floating_to_chars_scientific_precision(
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI to_chars_result _Floating_to_chars_scientific_precision(
     char* const _First, char* const _Last, const _Floating _Value, int _Precision) noexcept {
 
     // C11 7.21.6.1 "The fprintf function"/5:
@@ -119,7 +119,7 @@ template <class _Floating>
 }
 
 template <class _Floating>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI to_chars_result _Floating_to_chars_fixed_precision(
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI to_chars_result _Floating_to_chars_fixed_precision(
     char* const _First, char* const _Last, const _Floating _Value, int _Precision) noexcept {
 
     // C11 7.21.6.1 "The fprintf function"/5:
@@ -139,11 +139,11 @@ template <class _Floating>
     return __d2fixed_buffered_n(_First, _Last, _Value, static_cast<uint32_t>(_Precision));
 }
 
-#undef _LIBCPP_64_BIT
-#undef _LIBCPP_INTRINSIC128
+#undef _LIBCUDACXX_64_BIT
+#undef _LIBCUDACXX_INTRINSIC128
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 // clang-format on
 
-#endif // _LIBCPP_SRC_INCLUDE_RYU_RYU_H
+#endif // _LIBCUDACXX_SRC_INCLUDE_RYU_RYU_H

diff  --git a/libcxx/src/include/sso_allocator.h b/libcxx/src/include/sso_allocator.h
index 6a682fc43f86..0b253e2ddd69 100644
--- a/libcxx/src/include/sso_allocator.h
+++ b/libcxx/src/include/sso_allocator.h
@@ -7,24 +7,24 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_SSO_ALLOCATOR_H
-#define _LIBCPP_SSO_ALLOCATOR_H
+#ifndef _LIBCUDACXX_SSO_ALLOCATOR_H
+#define _LIBCUDACXX_SSO_ALLOCATOR_H
 
 #include <__config>
 #include <memory>
 #include <new>
 #include <type_traits>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-template <class _Tp, size_t _Np> class _LIBCPP_HIDDEN __sso_allocator;
+template <class _Tp, size_t _Np> class _LIBCUDACXX_HIDDEN __sso_allocator;
 
 template <size_t _Np>
-class _LIBCPP_HIDDEN __sso_allocator<void, _Np>
+class _LIBCUDACXX_HIDDEN __sso_allocator<void, _Np>
 {
 public:
     typedef const void*       const_pointer;
@@ -32,7 +32,7 @@ class _LIBCPP_HIDDEN __sso_allocator<void, _Np>
 };
 
 template <class _Tp, size_t _Np>
-class _LIBCPP_HIDDEN __sso_allocator
+class _LIBCUDACXX_HIDDEN __sso_allocator
 {
     typename aligned_storage<sizeof(_Tp) * _Np>::type buf_;
     bool __allocated_;
@@ -46,14 +46,14 @@ class _LIBCPP_HIDDEN __sso_allocator
         using other = __sso_allocator<U, _Np>;
     };
 
-    _LIBCPP_INLINE_VISIBILITY __sso_allocator() throw() : __allocated_(false) {}
-    _LIBCPP_INLINE_VISIBILITY __sso_allocator(const __sso_allocator&) throw() : __allocated_(false) {}
-    template <class _Up> _LIBCPP_INLINE_VISIBILITY __sso_allocator(const __sso_allocator<_Up, _Np>&) throw()
+    _LIBCUDACXX_INLINE_VISIBILITY __sso_allocator() throw() : __allocated_(false) {}
+    _LIBCUDACXX_INLINE_VISIBILITY __sso_allocator(const __sso_allocator&) throw() : __allocated_(false) {}
+    template <class _Up> _LIBCUDACXX_INLINE_VISIBILITY __sso_allocator(const __sso_allocator<_Up, _Np>&) throw()
          : __allocated_(false) {}
 private:
     __sso_allocator& operator=(const __sso_allocator&);
 public:
-    _LIBCPP_INLINE_VISIBILITY pointer allocate(size_type __n, typename __sso_allocator<void, _Np>::const_pointer = nullptr)
+    _LIBCUDACXX_INLINE_VISIBILITY pointer allocate(size_type __n, typename __sso_allocator<void, _Np>::const_pointer = nullptr)
     {
         if (!__allocated_ && __n <= _Np)
         {
@@ -62,21 +62,21 @@ class _LIBCPP_HIDDEN __sso_allocator
         }
         return allocator<_Tp>().allocate(__n);
     }
-    _LIBCPP_INLINE_VISIBILITY void deallocate(pointer __p, size_type __n)
+    _LIBCUDACXX_INLINE_VISIBILITY void deallocate(pointer __p, size_type __n)
     {
         if (__p == (pointer)&buf_)
             __allocated_ = false;
         else
             allocator<_Tp>().deallocate(__p, __n);
     }
-    _LIBCPP_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);}
+    _LIBCUDACXX_INLINE_VISIBILITY size_type max_size() const throw() {return size_type(~0) / sizeof(_Tp);}
 
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator==(const __sso_allocator& __a) const {return &buf_ == &__a.buf_;}
-    _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_INLINE_VISIBILITY
     bool operator!=(const __sso_allocator& __a) const {return &buf_ != &__a.buf_;}
 };
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_SSO_ALLOCATOR_H
+#endif // _LIBCUDACXX_SSO_ALLOCATOR_H

diff  --git a/libcxx/src/include/to_chars_floating_point.h b/libcxx/src/include/to_chars_floating_point.h
index b99d790f65c7..9fc14cee8236 100644
--- a/libcxx/src/include/to_chars_floating_point.h
+++ b/libcxx/src/include/to_chars_floating_point.h
@@ -11,8 +11,8 @@
 
 // This implementation is dedicated to the memory of Mary and Thavatchai.
 
-#ifndef _LIBCPP_SRC_INCLUDE_TO_CHARS_FLOATING_POINT_H
-#define _LIBCPP_SRC_INCLUDE_TO_CHARS_FLOATING_POINT_H
+#ifndef _LIBCUDACXX_SRC_INCLUDE_TO_CHARS_FLOATING_POINT_H
+#define _LIBCUDACXX_SRC_INCLUDE_TO_CHARS_FLOATING_POINT_H
 
 // Avoid formatting to keep the changes with the original code minimal.
 // clang-format off
@@ -32,12 +32,12 @@
 
 #include "include/ryu/ryu.h"
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 namespace __itoa {
 inline constexpr char _Charconv_digits[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e',
     'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'};
-static_assert(_VSTD::size(_Charconv_digits) == 36);
+static_assert(_CUDA_VSTD::size(_Charconv_digits) == 36);
 } // __itoa
 
 // vvvvvvvvvv DERIVED FROM corecrt_internal_fltintrn.h vvvvvvvvvv
@@ -95,7 +95,7 @@ struct _Floating_type_traits<double> {
 
 // FUNCTION to_chars (FLOATING-POINT TO STRING)
 template <class _Floating>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
 to_chars_result _Floating_to_chars_hex_precision(
     char* _First, char* const _Last, const _Floating _Value, int _Precision) noexcept {
 
@@ -119,7 +119,7 @@ to_chars_result _Floating_to_chars_hex_precision(
     using _Traits    = _Floating_type_traits<_Floating>;
     using _Uint_type = typename _Traits::_Uint_type;
 
-    const _Uint_type _Uint_value    = _VSTD::bit_cast<_Uint_type>(_Value);
+    const _Uint_type _Uint_value    = _CUDA_VSTD::bit_cast<_Uint_type>(_Value);
     const _Uint_type _Ieee_mantissa = _Uint_value & _Traits::_Denormal_mantissa_mask;
     const int32_t _Ieee_exponent    = static_cast<int32_t>(_Uint_value >> _Traits::_Exponent_shift);
 
@@ -269,7 +269,7 @@ to_chars_result _Floating_to_chars_hex_precision(
     // * Print the leading hexit, then mask it away.
     {
         const uint32_t _Nibble = static_cast<uint32_t>(_Adjusted_mantissa >> _Adjusted_explicit_bits);
-        _LIBCPP_ASSERT(_Nibble < 3, "");
+        _LIBCUDACXX_ASSERT(_Nibble < 3, "");
         const char _Leading_hexit = static_cast<char>('0' + _Nibble);
 
         *_First++ = _Leading_hexit;
@@ -288,12 +288,12 @@ to_chars_result _Floating_to_chars_hex_precision(
         int32_t _Number_of_bits_remaining = _Adjusted_explicit_bits; // 24 for float, 52 for double
 
         for (;;) {
-            _LIBCPP_ASSERT(_Number_of_bits_remaining >= 4, "");
-            _LIBCPP_ASSERT(_Number_of_bits_remaining % 4 == 0, "");
+            _LIBCUDACXX_ASSERT(_Number_of_bits_remaining >= 4, "");
+            _LIBCUDACXX_ASSERT(_Number_of_bits_remaining % 4 == 0, "");
             _Number_of_bits_remaining -= 4;
 
             const uint32_t _Nibble = static_cast<uint32_t>(_Adjusted_mantissa >> _Number_of_bits_remaining);
-            _LIBCPP_ASSERT(_Nibble < 16, "");
+            _LIBCUDACXX_ASSERT(_Nibble < 16, "");
             const char _Hexit = __itoa::_Charconv_digits[_Nibble];
 
             *_First++ = _Hexit;
@@ -307,7 +307,7 @@ to_chars_result _Floating_to_chars_hex_precision(
 
             if (_Number_of_bits_remaining == 0) {
                 // We've finished printing _Adjusted_mantissa, so all remaining hexits are '0'.
-                _VSTD::memset(_First, '0', static_cast<size_t>(_Precision));
+                _CUDA_VSTD::memset(_First, '0', static_cast<size_t>(_Precision));
                 _First += _Precision;
                 break;
             }
@@ -330,11 +330,11 @@ to_chars_result _Floating_to_chars_hex_precision(
     *_First++ = _Sign_character;
 
     // We've already printed '-' if necessary, so uint32_t _Absolute_exponent avoids testing that again.
-    return _VSTD::to_chars(_First, _Last, _Absolute_exponent);
+    return _CUDA_VSTD::to_chars(_First, _Last, _Absolute_exponent);
 }
 
 template <class _Floating>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
 to_chars_result _Floating_to_chars_hex_shortest(
     char* _First, char* const _Last, const _Floating _Value) noexcept {
 
@@ -347,7 +347,7 @@ to_chars_result _Floating_to_chars_hex_shortest(
     using _Traits    = _Floating_type_traits<_Floating>;
     using _Uint_type = typename _Traits::_Uint_type;
 
-    const _Uint_type _Uint_value = _VSTD::bit_cast<_Uint_type>(_Value);
+    const _Uint_type _Uint_value = _CUDA_VSTD::bit_cast<_Uint_type>(_Value);
 
     if (_Uint_value == 0) { // zero detected; write "0p+0" and return
         // C11 7.21.6.1 "The fprintf function"/8: "If the value is zero, the exponent is zero."
@@ -359,7 +359,7 @@ to_chars_result _Floating_to_chars_hex_shortest(
             return {_Last, errc::value_too_large};
         }
 
-        _VSTD::memcpy(_First, _Str, _Len);
+        _CUDA_VSTD::memcpy(_First, _Str, _Len);
 
         return {_First + _Len, errc{}};
     }
@@ -415,12 +415,12 @@ to_chars_result _Floating_to_chars_hex_shortest(
         // '0' hexits, the same condition works (as we print the final hexit and mask it away); we don't need to test
         // _Number_of_bits_remaining.
         do {
-            _LIBCPP_ASSERT(_Number_of_bits_remaining >= 4, "");
-            _LIBCPP_ASSERT(_Number_of_bits_remaining % 4 == 0, "");
+            _LIBCUDACXX_ASSERT(_Number_of_bits_remaining >= 4, "");
+            _LIBCUDACXX_ASSERT(_Number_of_bits_remaining % 4 == 0, "");
             _Number_of_bits_remaining -= 4;
 
             const uint32_t _Nibble = static_cast<uint32_t>(_Adjusted_mantissa >> _Number_of_bits_remaining);
-            _LIBCPP_ASSERT(_Nibble < 16, "");
+            _LIBCUDACXX_ASSERT(_Nibble < 16, "");
             const char _Hexit = __itoa::_Charconv_digits[_Nibble];
 
             if (_First == _Last) {
@@ -457,7 +457,7 @@ to_chars_result _Floating_to_chars_hex_shortest(
     }
 
     // We've already printed '-' if necessary, so static_cast<uint32_t> avoids testing that again.
-    return _VSTD::to_chars(_First, _Last, static_cast<uint32_t>(_Unbiased_exponent));
+    return _CUDA_VSTD::to_chars(_First, _Last, static_cast<uint32_t>(_Unbiased_exponent));
 }
 
 // For general precision, we can use lookup tables to avoid performing trial formatting.
@@ -832,14 +832,14 @@ struct _General_precision_tables<double> {
 };
 
 template <class _Floating>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
 to_chars_result _Floating_to_chars_general_precision(
     char* _First, char* const _Last, const _Floating _Value, int _Precision) noexcept {
 
     using _Traits    = _Floating_type_traits<_Floating>;
     using _Uint_type = typename _Traits::_Uint_type;
 
-    const _Uint_type _Uint_value = _VSTD::bit_cast<_Uint_type>(_Value);
+    const _Uint_type _Uint_value = _CUDA_VSTD::bit_cast<_Uint_type>(_Value);
 
     if (_Uint_value == 0) { // zero detected; write "0" and return; _Precision is irrelevant due to zero-trimming
         if (_First == _Last) {
@@ -890,7 +890,7 @@ to_chars_result _Floating_to_chars_general_precision(
         _Table_end   = _Table_begin + _Precision + 5;
     } else {
         _Table_begin = _Tables::_Ordinary_X_table;
-        _Table_end   = _Table_begin + _VSTD::min(_Precision, _Tables::_Max_P) + 5;
+        _Table_end   = _Table_begin + _CUDA_VSTD::min(_Precision, _Tables::_Max_P) + 5;
     }
 
     // Profiling indicates that linear search is faster than binary search for small tables.
@@ -898,11 +898,11 @@ to_chars_result _Floating_to_chars_general_precision(
     const _Uint_type* const _Table_lower_bound = [=] {
         if constexpr (!_IsSame<_Floating, float>::value) {
             if (_Precision > 155) { // threshold determined via profiling
-                return _VSTD::lower_bound(_Table_begin, _Table_end, _Uint_value, less{});
+                return _CUDA_VSTD::lower_bound(_Table_begin, _Table_end, _Uint_value, less{});
             }
         }
 
-        return _VSTD::find_if(_Table_begin, _Table_end, [=](const _Uint_type _Elem) { return _Uint_value <= _Elem; });
+        return _CUDA_VSTD::find_if(_Table_begin, _Table_end, [=](const _Uint_type _Elem) { return _Uint_value <= _Elem; });
     }();
 
     const ptr
diff _t _Table_index     = _Table_lower_bound - _Table_begin;
@@ -937,17 +937,17 @@ to_chars_result _Floating_to_chars_general_precision(
     // Write into the local buffer.
     // Clamping _Effective_precision allows _Buffer to be as small as possible, and increases efficiency.
     if (_Use_fixed_notation) {
-        _Effective_precision = _VSTD::min(_Precision - (_Scientific_exponent_X + 1), _Max_fixed_precision);
+        _Effective_precision = _CUDA_VSTD::min(_Precision - (_Scientific_exponent_X + 1), _Max_fixed_precision);
         const to_chars_result _Buf_result =
-            _Floating_to_chars_fixed_precision(_Buffer, _VSTD::end(_Buffer), _Value, _Effective_precision);
-        _LIBCPP_ASSERT(_Buf_result.ec == errc{}, "");
+            _Floating_to_chars_fixed_precision(_Buffer, _CUDA_VSTD::end(_Buffer), _Value, _Effective_precision);
+        _LIBCUDACXX_ASSERT(_Buf_result.ec == errc{}, "");
         _Significand_last = _Buf_result.ptr;
     } else {
-        _Effective_precision = _VSTD::min(_Precision - 1, _Max_scientific_precision);
+        _Effective_precision = _CUDA_VSTD::min(_Precision - 1, _Max_scientific_precision);
         const to_chars_result _Buf_result =
-            _Floating_to_chars_scientific_precision(_Buffer, _VSTD::end(_Buffer), _Value, _Effective_precision);
-        _LIBCPP_ASSERT(_Buf_result.ec == errc{}, "");
-        _Significand_last = _VSTD::find(_Buffer, _Buf_result.ptr, 'e');
+            _Floating_to_chars_scientific_precision(_Buffer, _CUDA_VSTD::end(_Buffer), _Value, _Effective_precision);
+        _LIBCUDACXX_ASSERT(_Buf_result.ec == errc{}, "");
+        _Significand_last = _CUDA_VSTD::find(_Buffer, _Buf_result.ptr, 'e');
         _Exponent_first   = _Significand_last;
         _Exponent_last    = _Buf_result.ptr;
     }
@@ -968,7 +968,7 @@ to_chars_result _Floating_to_chars_general_precision(
     if (_Last - _First < _Significand_distance) {
         return {_Last, errc::value_too_large};
     }
-    _VSTD::memcpy(_First, _Significand_first, static_cast<size_t>(_Significand_distance));
+    _CUDA_VSTD::memcpy(_First, _Significand_first, static_cast<size_t>(_Significand_distance));
     _First += _Significand_distance;
 
     // Copy the exponent to the output range.
@@ -977,7 +977,7 @@ to_chars_result _Floating_to_chars_general_precision(
         if (_Last - _First < _Exponent_distance) {
             return {_Last, errc::value_too_large};
         }
-        _VSTD::memcpy(_First, _Exponent_first, static_cast<size_t>(_Exponent_distance));
+        _CUDA_VSTD::memcpy(_First, _Exponent_first, static_cast<size_t>(_Exponent_distance));
         _First += _Exponent_distance;
     }
 
@@ -987,14 +987,14 @@ to_chars_result _Floating_to_chars_general_precision(
 enum class _Floating_to_chars_overload { _Plain, _Format_only, _Format_precision };
 
 template <_Floating_to_chars_overload _Overload, class _Floating>
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI
 to_chars_result _Floating_to_chars(
     char* _First, char* const _Last, _Floating _Value, const chars_format _Fmt, const int _Precision) noexcept {
 
     if constexpr (_Overload == _Floating_to_chars_overload::_Plain) {
-        _LIBCPP_ASSERT(_Fmt == chars_format{}, ""); // plain overload must pass chars_format{} internally
+        _LIBCUDACXX_ASSERT(_Fmt == chars_format{}, ""); // plain overload must pass chars_format{} internally
     } else {
-        _LIBCPP_ASSERT(_Fmt == chars_format::general || _Fmt == chars_format::scientific || _Fmt == chars_format::fixed
+        _LIBCUDACXX_ASSERT(_Fmt == chars_format::general || _Fmt == chars_format::scientific || _Fmt == chars_format::fixed
                          || _Fmt == chars_format::hex,
             "invalid format in to_chars()");
     }
@@ -1002,7 +1002,7 @@ to_chars_result _Floating_to_chars(
     using _Traits    = _Floating_type_traits<_Floating>;
     using _Uint_type = typename _Traits::_Uint_type;
 
-    _Uint_type _Uint_value = _VSTD::bit_cast<_Uint_type>(_Value);
+    _Uint_type _Uint_value = _CUDA_VSTD::bit_cast<_Uint_type>(_Value);
 
     const bool _Was_negative = (_Uint_value & _Traits::_Shifted_sign_mask) != 0;
 
@@ -1014,7 +1014,7 @@ to_chars_result _Floating_to_chars(
         *_First++ = '-';
 
         _Uint_value &= ~_Traits::_Shifted_sign_mask;
-        _Value = _VSTD::bit_cast<_Floating>(_Uint_value);
+        _Value = _CUDA_VSTD::bit_cast<_Floating>(_Uint_value);
     }
 
     if ((_Uint_value & _Traits::_Shifted_exponent_mask) == _Traits::_Shifted_exponent_mask) {
@@ -1044,7 +1044,7 @@ to_chars_result _Floating_to_chars(
             return {_Last, errc::value_too_large};
         }
 
-        _VSTD::memcpy(_First, _Str, _Len);
+        _CUDA_VSTD::memcpy(_First, _Str, _Len);
 
         return {_First + _Len, errc{}};
     }
@@ -1074,6 +1074,6 @@ to_chars_result _Floating_to_chars(
 
 // clang-format on
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP_SRC_INCLUDE_TO_CHARS_FLOATING_POINT_H
+#endif // _LIBCUDACXX_SRC_INCLUDE_TO_CHARS_FLOATING_POINT_H

diff  --git a/libcxx/src/ios.cpp b/libcxx/src/ios.cpp
index 218b27f1a6b5..b90cc367b102 100644
--- a/libcxx/src/ios.cpp
+++ b/libcxx/src/ios.cpp
@@ -18,12 +18,12 @@
 
 #include "include/config_elast.h"
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-class _LIBCPP_HIDDEN __iostream_category
+class _LIBCUDACXX_HIDDEN __iostream_category
     : public __do_message
 {
 public:
@@ -41,9 +41,9 @@ string
 __iostream_category::message(int ev) const
 {
     if (ev != static_cast<int>(io_errc::stream)
-#ifdef _LIBCPP_ELAST
-        && ev <= _LIBCPP_ELAST
-#endif // _LIBCPP_ELAST
+#ifdef _LIBCUDACXX_ELAST
+        && ev <= _LIBCUDACXX_ELAST
+#endif // _LIBCUDACXX_ELAST
         )
         return __do_message::message(ev);
     return string("unspecified iostream_category error");
@@ -136,7 +136,7 @@ ios_base::getloc() const
 }
 
 // xalloc
-#if defined(_LIBCPP_HAS_C_ATOMIC_IMP) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(_LIBCUDACXX_HAS_C_ATOMIC_IMP) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 atomic<int> ios_base::__xindex_{0};
 #else
 int ios_base::__xindex_ = 0;
@@ -147,7 +147,7 @@ static size_t __ios_new_cap(size_t __req_size, size_t __current_cap)
 { // Precondition: __req_size > __current_cap
 	const size_t mx = std::numeric_limits<size_t>::max() / sizeof(_Tp);
 	if (__req_size < mx/2)
-		return _VSTD::max(2 * __current_cap, __req_size);
+		return _CUDA_VSTD::max(2 * __current_cap, __req_size);
 	else
 		return mx;
 }
@@ -389,44 +389,44 @@ ios_base::move(ios_base& rhs)
 void
 ios_base::swap(ios_base& rhs) noexcept
 {
-    _VSTD::swap(__fmtflags_, rhs.__fmtflags_);
-    _VSTD::swap(__precision_, rhs.__precision_);
-    _VSTD::swap(__width_, rhs.__width_);
-    _VSTD::swap(__rdstate_, rhs.__rdstate_);
-    _VSTD::swap(__exceptions_, rhs.__exceptions_);
+    _CUDA_VSTD::swap(__fmtflags_, rhs.__fmtflags_);
+    _CUDA_VSTD::swap(__precision_, rhs.__precision_);
+    _CUDA_VSTD::swap(__width_, rhs.__width_);
+    _CUDA_VSTD::swap(__rdstate_, rhs.__rdstate_);
+    _CUDA_VSTD::swap(__exceptions_, rhs.__exceptions_);
     locale& lhs_loc = *reinterpret_cast<locale*>(&__loc_);
     locale& rhs_loc = *reinterpret_cast<locale*>(&rhs.__loc_);
-    _VSTD::swap(lhs_loc, rhs_loc);
-    _VSTD::swap(__fn_, rhs.__fn_);
-    _VSTD::swap(__index_, rhs.__index_);
-    _VSTD::swap(__event_size_, rhs.__event_size_);
-    _VSTD::swap(__event_cap_, rhs.__event_cap_);
-    _VSTD::swap(__iarray_, rhs.__iarray_);
-    _VSTD::swap(__iarray_size_, rhs.__iarray_size_);
-    _VSTD::swap(__iarray_cap_, rhs.__iarray_cap_);
-    _VSTD::swap(__parray_, rhs.__parray_);
-    _VSTD::swap(__parray_size_, rhs.__parray_size_);
-    _VSTD::swap(__parray_cap_, rhs.__parray_cap_);
+    _CUDA_VSTD::swap(lhs_loc, rhs_loc);
+    _CUDA_VSTD::swap(__fn_, rhs.__fn_);
+    _CUDA_VSTD::swap(__index_, rhs.__index_);
+    _CUDA_VSTD::swap(__event_size_, rhs.__event_size_);
+    _CUDA_VSTD::swap(__event_cap_, rhs.__event_cap_);
+    _CUDA_VSTD::swap(__iarray_, rhs.__iarray_);
+    _CUDA_VSTD::swap(__iarray_size_, rhs.__iarray_size_);
+    _CUDA_VSTD::swap(__iarray_cap_, rhs.__iarray_cap_);
+    _CUDA_VSTD::swap(__parray_, rhs.__parray_);
+    _CUDA_VSTD::swap(__parray_size_, rhs.__parray_size_);
+    _CUDA_VSTD::swap(__parray_cap_, rhs.__parray_cap_);
 }
 
 void
 ios_base::__set_badbit_and_consider_rethrow()
 {
     __rdstate_ |= badbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     if (__exceptions_ & badbit)
         throw;
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 void
 ios_base::__set_failbit_and_consider_rethrow()
 {
     __rdstate_ |= failbit;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     if (__exceptions_ & failbit)
         throw;
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 bool
@@ -438,6 +438,6 @@ ios_base::sync_with_stdio(bool sync)
     return r;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS

diff  --git a/libcxx/src/ios.instantiations.cpp b/libcxx/src/ios.instantiations.cpp
index 2ff7057fa66a..746fe14e6e4d 100644
--- a/libcxx/src/ios.instantiations.cpp
+++ b/libcxx/src/ios.instantiations.cpp
@@ -14,32 +14,32 @@
 #include <sstream>
 #include <streambuf>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Original explicit instantiations provided in the library
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<char>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<char>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<char>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<char>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_iostream<char>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<char>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<char>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<char>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<char>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_iostream<char>;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<wchar_t>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<wchar_t>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<wchar_t>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<wchar_t>;
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ios<wchar_t>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_streambuf<wchar_t>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istream<wchar_t>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostream<wchar_t>;
 #endif
 
 // Additional instantiations added later. Whether programs rely on these being
-// available is protected by _LIBCPP_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1.
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_stringbuf<char>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_stringstream<char>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostringstream<char>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istringstream<char>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ifstream<char>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ofstream<char>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS basic_filebuf<char>;
+// available is protected by _LIBCUDACXX_ABI_ENABLE_ADDITIONAL_IOSTREAM_EXPLICIT_INSTANTIATIONS_1.
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_stringbuf<char>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_stringstream<char>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ostringstream<char>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_istringstream<char>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ifstream<char>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_ofstream<char>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS basic_filebuf<char>;
 
 // Add more here if needed...
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/iostream.cpp b/libcxx/src/iostream.cpp
index 6164fd7a525e..5d465c6fc33a 100644
--- a/libcxx/src/iostream.cpp
+++ b/libcxx/src/iostream.cpp
@@ -13,77 +13,77 @@
 
 #define _str(s) #s
 #define str(s) _str(s)
-#define _LIBCPP_ABI_NAMESPACE_STR str(_LIBCPP_ABI_NAMESPACE)
+#define _LIBCUDACXX_ABI_NAMESPACE_STR str(_LIBCUDACXX_ABI_NAMESPACE)
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_ALIGNAS_TYPE (istream) _LIBCPP_FUNC_VIS char cin[sizeof(istream)]
-#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
-__asm__("?cin@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_istream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
+_ALIGNAS_TYPE (istream) _LIBCUDACXX_FUNC_VIS char cin[sizeof(istream)]
+#if defined(_LIBCUDACXX_ABI_MICROSOFT) && defined(__clang__)
+__asm__("?cin@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@3V?$basic_istream at DU?$char_traits at D@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
 ;
 _ALIGNAS_TYPE (__stdinbuf<char> ) static char __cin[sizeof(__stdinbuf <char>)];
 static mbstate_t mb_cin;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE (wistream) _LIBCPP_FUNC_VIS char wcin[sizeof(wistream)]
-#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
-__asm__("?wcin@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_istream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+_ALIGNAS_TYPE (wistream) _LIBCUDACXX_FUNC_VIS char wcin[sizeof(wistream)]
+#if defined(_LIBCUDACXX_ABI_MICROSOFT) && defined(__clang__)
+__asm__("?wcin@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@3V?$basic_istream at _WU?$char_traits at _W@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
 ;
 _ALIGNAS_TYPE (__stdinbuf<wchar_t> ) static char __wcin[sizeof(__stdinbuf <wchar_t>)];
 static mbstate_t mb_wcin;
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-_ALIGNAS_TYPE (ostream) _LIBCPP_FUNC_VIS char cout[sizeof(ostream)]
-#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
-__asm__("?cout@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
+_ALIGNAS_TYPE (ostream) _LIBCUDACXX_FUNC_VIS char cout[sizeof(ostream)]
+#if defined(_LIBCUDACXX_ABI_MICROSOFT) && defined(__clang__)
+__asm__("?cout@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
 ;
 _ALIGNAS_TYPE (__stdoutbuf<char>) static char __cout[sizeof(__stdoutbuf<char>)];
 static mbstate_t mb_cout;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE (wostream) _LIBCPP_FUNC_VIS char wcout[sizeof(wostream)]
-#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
-__asm__("?wcout@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+_ALIGNAS_TYPE (wostream) _LIBCUDACXX_FUNC_VIS char wcout[sizeof(wostream)]
+#if defined(_LIBCUDACXX_ABI_MICROSOFT) && defined(__clang__)
+__asm__("?wcout@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
 ;
 _ALIGNAS_TYPE (__stdoutbuf<wchar_t>) static char __wcout[sizeof(__stdoutbuf<wchar_t>)];
 static mbstate_t mb_wcout;
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-_ALIGNAS_TYPE (ostream) _LIBCPP_FUNC_VIS char cerr[sizeof(ostream)]
-#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
-__asm__("?cerr@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
+_ALIGNAS_TYPE (ostream) _LIBCUDACXX_FUNC_VIS char cerr[sizeof(ostream)]
+#if defined(_LIBCUDACXX_ABI_MICROSOFT) && defined(__clang__)
+__asm__("?cerr@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
 ;
 _ALIGNAS_TYPE (__stdoutbuf<char>) static char __cerr[sizeof(__stdoutbuf<char>)];
 static mbstate_t mb_cerr;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE (wostream) _LIBCPP_FUNC_VIS char wcerr[sizeof(wostream)]
-#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
-__asm__("?wcerr@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+_ALIGNAS_TYPE (wostream) _LIBCUDACXX_FUNC_VIS char wcerr[sizeof(wostream)]
+#if defined(_LIBCUDACXX_ABI_MICROSOFT) && defined(__clang__)
+__asm__("?wcerr@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
 ;
 _ALIGNAS_TYPE (__stdoutbuf<wchar_t>) static char __wcerr[sizeof(__stdoutbuf<wchar_t>)];
 static mbstate_t mb_wcerr;
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-_ALIGNAS_TYPE (ostream) _LIBCPP_FUNC_VIS char clog[sizeof(ostream)]
-#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
-__asm__("?clog@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
+_ALIGNAS_TYPE (ostream) _LIBCUDACXX_FUNC_VIS char clog[sizeof(ostream)]
+#if defined(_LIBCUDACXX_ABI_MICROSOFT) && defined(__clang__)
+__asm__("?clog@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at DU?$char_traits at D@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
 ;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-_ALIGNAS_TYPE (wostream) _LIBCPP_FUNC_VIS char wclog[sizeof(wostream)]
-#if defined(_LIBCPP_ABI_MICROSOFT) && defined(__clang__)
-__asm__("?wclog@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCPP_ABI_NAMESPACE_STR "@std@@@12 at A")
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+_ALIGNAS_TYPE (wostream) _LIBCUDACXX_FUNC_VIS char wclog[sizeof(wostream)]
+#if defined(_LIBCUDACXX_ABI_MICROSOFT) && defined(__clang__)
+__asm__("?wclog@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_traits at _W@" _LIBCUDACXX_ABI_NAMESPACE_STR "@std@@@12 at A")
 #endif
 ;
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // Pretend we're inside a system header so the compiler doesn't flag the use of the init_priority
 // attribute with a value that's reserved for the implementation (we're the implementation).
@@ -93,11 +93,11 @@ __asm__("?wclog@" _LIBCPP_ABI_NAMESPACE_STR "@std@@3V?$basic_ostream at _WU?$char_t
 // the standard streams, otherwise it may not be alive during program termination
 // when we flush the streams.
 static void force_locale_initialization() {
-#if defined(_LIBCPP_MSVCRT_LIKE)
+#if defined(_LIBCUDACXX_MSVCRT_LIKE)
   static bool once = []() {
     auto loc = newlocale(LC_ALL_MASK, "C", 0);
     {
-        __libcpp_locale_guard g(loc); // forces initialization of locale TLS
+        __LIBCUDACXX_locale_guard g(loc); // forces initialization of locale TLS
         ((void)g);
     }
     freelocale(loc);
@@ -122,17 +122,17 @@ DoIOSInit::DoIOSInit()
     ostream* cerr_ptr = ::new(cerr) ostream(::new(__cerr) __stdoutbuf<char>(stderr, &mb_cerr));
                         ::new(clog) ostream(cerr_ptr->rdbuf());
     cin_ptr->tie(cout_ptr);
-    _VSTD::unitbuf(*cerr_ptr);
+    _CUDA_VSTD::unitbuf(*cerr_ptr);
     cerr_ptr->tie(cout_ptr);
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     wistream* wcin_ptr  = ::new(wcin)  wistream(::new(__wcin)  __stdinbuf <wchar_t>(stdin, &mb_wcin));
     wostream* wcout_ptr = ::new(wcout) wostream(::new(__wcout) __stdoutbuf<wchar_t>(stdout, &mb_wcout));
     wostream* wcerr_ptr = ::new(wcerr) wostream(::new(__wcerr) __stdoutbuf<wchar_t>(stderr, &mb_wcerr));
                           ::new(wclog) wostream(wcerr_ptr->rdbuf());
 
     wcin_ptr->tie(wcout_ptr);
-    _VSTD::unitbuf(*wcerr_ptr);
+    _CUDA_VSTD::unitbuf(*wcerr_ptr);
     wcerr_ptr->tie(wcout_ptr);
 #endif
 }
@@ -144,7 +144,7 @@ DoIOSInit::~DoIOSInit()
     ostream* clog_ptr = reinterpret_cast<ostream*>(clog);
     clog_ptr->flush();
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     wostream* wcout_ptr = reinterpret_cast<wostream*>(wcout);
     wcout_ptr->flush();
     wostream* wclog_ptr = reinterpret_cast<wostream*>(wclog);
@@ -161,4 +161,4 @@ ios_base::Init::~Init()
 {
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/iostream_init.h b/libcxx/src/iostream_init.h
index 7d1bb5c2d7d8..46f1e5f1aac2 100644
--- a/libcxx/src/iostream_init.h
+++ b/libcxx/src/iostream_init.h
@@ -1,2 +1,2 @@
 #pragma GCC system_header
-_LIBCPP_HIDDEN ios_base::Init __start_std_streams _LIBCPP_INIT_PRIORITY_MAX;
+_LIBCUDACXX_HIDDEN ios_base::Init __start_std_streams _LIBCUDACXX_INIT_PRIORITY_MAX;

diff  --git a/libcxx/src/legacy_debug_handler.cpp b/libcxx/src/legacy_debug_handler.cpp
index cb2025bfc9b6..2cd71e2b92f4 100644
--- a/libcxx/src/legacy_debug_handler.cpp
+++ b/libcxx/src/legacy_debug_handler.cpp
@@ -15,10 +15,10 @@
 // to set it. This is for backwards ABI compatibility with code that has been
 // using this debug handler previously.
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info {
-  _LIBCPP_EXPORTED_FROM_ABI string what() const;
+struct _LIBCUDACXX_TEMPLATE_VIS __LIBCUDACXX_debug_info {
+  _LIBCUDACXX_EXPORTED_FROM_ABI string what() const;
 
   const char* __file_;
   int __line_;
@@ -26,29 +26,29 @@ struct _LIBCPP_TEMPLATE_VIS __libcpp_debug_info {
   const char* __msg_;
 };
 
-std::string __libcpp_debug_info::what() const {
+std::string __LIBCUDACXX_debug_info::what() const {
   string msg = __file_;
-  msg += ":" + std::to_string(__line_) + ": _LIBCPP_ASSERT '";
+  msg += ":" + std::to_string(__line_) + ": _LIBCUDACXX_ASSERT '";
   msg += __pred_;
   msg += "' failed. ";
   msg += __msg_;
   return msg;
 }
 
-_LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __libcpp_abort_debug_function(__libcpp_debug_info const& info) {
+_LIBCUDACXX_NORETURN _LIBCUDACXX_EXPORTED_FROM_ABI void __LIBCUDACXX_abort_debug_function(__LIBCUDACXX_debug_info const& info) {
   std::fprintf(stderr, "%s\n", info.what().c_str());
   std::abort();
 }
 
-typedef void (*__libcpp_debug_function_type)(__libcpp_debug_info const&);
+typedef void (*__LIBCUDACXX_debug_function_type)(__LIBCUDACXX_debug_info const&);
 
-_LIBCPP_EXPORTED_FROM_ABI
-constinit __libcpp_debug_function_type __libcpp_debug_function = __libcpp_abort_debug_function;
+_LIBCUDACXX_EXPORTED_FROM_ABI
+constinit __LIBCUDACXX_debug_function_type __LIBCUDACXX_debug_function = __LIBCUDACXX_abort_debug_function;
 
-_LIBCPP_EXPORTED_FROM_ABI
-bool __libcpp_set_debug_function(__libcpp_debug_function_type __func) {
-  __libcpp_debug_function = __func;
+_LIBCUDACXX_EXPORTED_FROM_ABI
+bool __LIBCUDACXX_set_debug_function(__LIBCUDACXX_debug_function_type __func) {
+  __LIBCUDACXX_debug_function = __func;
   return true;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/legacy_pointer_safety.cpp b/libcxx/src/legacy_pointer_safety.cpp
index 5d2b04c121ae..e25430862ce3 100644
--- a/libcxx/src/legacy_pointer_safety.cpp
+++ b/libcxx/src/legacy_pointer_safety.cpp
@@ -13,11 +13,11 @@
 // that removal as an extension in all Standard versions. However, we still define the functions that
 // were once part of the library's ABI for backwards compatibility.
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_FUNC_VIS void declare_reachable(void*) {}
-_LIBCPP_FUNC_VIS void declare_no_pointers(char*, size_t) {}
-_LIBCPP_FUNC_VIS void undeclare_no_pointers(char*, size_t) {}
-_LIBCPP_FUNC_VIS void* __undeclare_reachable(void* p) { return p; }
+_LIBCUDACXX_FUNC_VIS void declare_reachable(void*) {}
+_LIBCUDACXX_FUNC_VIS void declare_no_pointers(char*, size_t) {}
+_LIBCUDACXX_FUNC_VIS void undeclare_no_pointers(char*, size_t) {}
+_LIBCUDACXX_FUNC_VIS void* __undeclare_reachable(void* p) { return p; }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/locale.cpp b/libcxx/src/locale.cpp
index 6b454274e130..27566b9fbfe1 100644
--- a/libcxx/src/locale.cpp
+++ b/libcxx/src/locale.cpp
@@ -25,7 +25,7 @@
 #include <typeinfo>
 #include <vector>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 #   include <cwctype>
 #endif
 
@@ -33,11 +33,11 @@
 #   include <sys/localedef.h> // for __lc_ctype_ptr
 #endif
 
-#if defined(_LIBCPP_MSVCRT)
+#if defined(_LIBCUDACXX_MSVCRT)
 #   define _CTYPE_DISABLE_MACROS
 #endif
 
-#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
+#if defined(_LIBCUDACXX_MSVCRT) || defined(__MINGW32__)
 #   include "__support/win32/locale_win32.h"
 #elif !defined(__BIONIC__) && !defined(__NuttX__)
 #   include <langinfo.h>
@@ -48,17 +48,17 @@
 
 // On Linux, wint_t and wchar_t have 
diff erent signed-ness, and this causes
 // lots of noise in the build log, but no bugs that I know of.
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wsign-conversion")
+_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wsign-conversion")
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-struct __libcpp_unique_locale {
-  __libcpp_unique_locale(const char* nm) : __loc_(newlocale(LC_ALL_MASK, nm, 0)) {}
+struct __LIBCUDACXX_unique_locale {
+  __LIBCUDACXX_unique_locale(const char* nm) : __loc_(newlocale(LC_ALL_MASK, nm, 0)) {}
 
-  ~__libcpp_unique_locale() {
+  ~__LIBCUDACXX_unique_locale() {
     if (__loc_)
       freelocale(__loc_);
   }
@@ -69,8 +69,8 @@ struct __libcpp_unique_locale {
 
   locale_t __loc_;
 private:
-  __libcpp_unique_locale(__libcpp_unique_locale const&);
-  __libcpp_unique_locale& operator=(__libcpp_unique_locale const&);
+  __LIBCUDACXX_unique_locale(__LIBCUDACXX_unique_locale const&);
+  __LIBCUDACXX_unique_locale& operator=(__LIBCUDACXX_unique_locale const&);
 };
 
 #ifdef __cloc_defined
@@ -100,7 +100,7 @@ T& make(Args ...args)
 
 template <typename T, size_t N>
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 size_t
 countof(const T (&)[N])
 {
@@ -109,20 +109,20 @@ countof(const T (&)[N])
 
 template <typename T>
 inline
-_LIBCPP_CONSTEXPR
+_LIBCUDACXX_CONSTEXPR
 size_t
 countof(const T * const begin, const T * const end)
 {
     return static_cast<size_t>(end - begin);
 }
 
-_LIBCPP_NORETURN static void __throw_runtime_error(const string &msg)
+_LIBCUDACXX_NORETURN static void __throw_runtime_error(const string &msg)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw runtime_error(msg);
 #else
     (void)msg;
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
@@ -137,11 +137,11 @@ const locale::category locale::time;
 const locale::category locale::messages;
 const locale::category locale::all;
 
-class _LIBCPP_HIDDEN locale::__imp
+class _LIBCUDACXX_HIDDEN locale::__imp
     : public facet
 {
     enum {N = 30};
-#if defined(_LIBCPP_COMPILER_MSVC)
+#if defined(_LIBCUDACXX_COMPILER_MSVC)
 // FIXME: MSVC doesn't support aligned parameters by value.
 // I can't get the __sso_allocator to work here
 // for MSVC I think for this reason.
@@ -178,63 +178,63 @@ locale::__imp::__imp(size_t refs)
       name_("C")
 {
     facets_.clear();
-    install(&make<_VSTD::collate<char> >(1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-    install(&make<_VSTD::collate<wchar_t> >(1u));
+    install(&make<_CUDA_VSTD::collate<char> >(1u));
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+    install(&make<_CUDA_VSTD::collate<wchar_t> >(1u));
 #endif
-    install(&make<_VSTD::ctype<char> >(nullptr, false, 1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-    install(&make<_VSTD::ctype<wchar_t> >(1u));
+    install(&make<_CUDA_VSTD::ctype<char> >(nullptr, false, 1u));
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+    install(&make<_CUDA_VSTD::ctype<wchar_t> >(1u));
 #endif
     install(&make<codecvt<char, char, mbstate_t> >(1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     install(&make<codecvt<wchar_t, char, mbstate_t> >(1u));
 #endif
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
     install(&make<codecvt<char16_t, char, mbstate_t> >(1u));
     install(&make<codecvt<char32_t, char, mbstate_t> >(1u));
-_LIBCPP_SUPPRESS_DEPRECATED_POP
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
     install(&make<codecvt<char16_t, char8_t, mbstate_t> >(1u));
     install(&make<codecvt<char32_t, char8_t, mbstate_t> >(1u));
 #endif
     install(&make<numpunct<char> >(1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     install(&make<numpunct<wchar_t> >(1u));
 #endif
     install(&make<num_get<char> >(1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     install(&make<num_get<wchar_t> >(1u));
 #endif
     install(&make<num_put<char> >(1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     install(&make<num_put<wchar_t> >(1u));
 #endif
     install(&make<moneypunct<char, false> >(1u));
     install(&make<moneypunct<char, true> >(1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     install(&make<moneypunct<wchar_t, false> >(1u));
     install(&make<moneypunct<wchar_t, true> >(1u));
 #endif
     install(&make<money_get<char> >(1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     install(&make<money_get<wchar_t> >(1u));
 #endif
     install(&make<money_put<char> >(1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     install(&make<money_put<wchar_t> >(1u));
 #endif
     install(&make<time_get<char> >(1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     install(&make<time_get<wchar_t> >(1u));
 #endif
     install(&make<time_put<char> >(1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
     install(&make<time_put<wchar_t> >(1u));
 #endif
-    install(&make<_VSTD::messages<char> >(1u));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-    install(&make<_VSTD::messages<wchar_t> >(1u));
+    install(&make<_CUDA_VSTD::messages<char> >(1u));
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+    install(&make<_CUDA_VSTD::messages<wchar_t> >(1u));
 #endif
 }
 
@@ -243,57 +243,57 @@ locale::__imp::__imp(const string& name, size_t refs)
       facets_(N),
       name_(name)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         facets_ = locale::classic().__locale_->facets_;
         for (unsigned i = 0; i < facets_.size(); ++i)
             if (facets_[i])
                 facets_[i]->__add_shared();
         install(new collate_byname<char>(name_));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
         install(new collate_byname<wchar_t>(name_));
 #endif
         install(new ctype_byname<char>(name_));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
         install(new ctype_byname<wchar_t>(name_));
 #endif
         install(new codecvt_byname<char, char, mbstate_t>(name_));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
         install(new codecvt_byname<wchar_t, char, mbstate_t>(name_));
 #endif
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
         install(new codecvt_byname<char16_t, char, mbstate_t>(name_));
         install(new codecvt_byname<char32_t, char, mbstate_t>(name_));
-_LIBCPP_SUPPRESS_DEPRECATED_POP
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
         install(new codecvt_byname<char16_t, char8_t, mbstate_t>(name_));
         install(new codecvt_byname<char32_t, char8_t, mbstate_t>(name_));
 #endif
         install(new numpunct_byname<char>(name_));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
         install(new numpunct_byname<wchar_t>(name_));
 #endif
         install(new moneypunct_byname<char, false>(name_));
         install(new moneypunct_byname<char, true>(name_));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
         install(new moneypunct_byname<wchar_t, false>(name_));
         install(new moneypunct_byname<wchar_t, true>(name_));
 #endif
         install(new time_get_byname<char>(name_));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
         install(new time_get_byname<wchar_t>(name_));
 #endif
         install(new time_put_byname<char>(name_));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
         install(new time_put_byname<wchar_t>(name_));
 #endif
         install(new messages_byname<char>(name_));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
         install(new messages_byname<wchar_t>(name_));
 #endif
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -302,7 +302,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
                 facets_[i]->__release_shared();
         throw;
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 locale::__imp::__imp(const __imp& other)
@@ -323,32 +323,32 @@ locale::__imp::__imp(const __imp& other, const string& name, locale::category c)
     for (unsigned i = 0; i < facets_.size(); ++i)
         if (facets_[i])
             facets_[i]->__add_shared();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         if (c & locale::collate)
         {
             install(new collate_byname<char>(name));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install(new collate_byname<wchar_t>(name));
 #endif
         }
         if (c & locale::ctype)
         {
             install(new ctype_byname<char>(name));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install(new ctype_byname<wchar_t>(name));
 #endif
             install(new codecvt_byname<char, char, mbstate_t>(name));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install(new codecvt_byname<wchar_t, char, mbstate_t>(name));
 #endif
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
             install(new codecvt_byname<char16_t, char, mbstate_t>(name));
             install(new codecvt_byname<char32_t, char, mbstate_t>(name));
-_LIBCPP_SUPPRESS_DEPRECATED_POP
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
             install(new codecvt_byname<char16_t, char8_t, mbstate_t>(name));
             install(new codecvt_byname<char32_t, char8_t, mbstate_t>(name));
 #endif
@@ -357,7 +357,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
         {
             install(new moneypunct_byname<char, false>(name));
             install(new moneypunct_byname<char, true>(name));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install(new moneypunct_byname<wchar_t, false>(name));
             install(new moneypunct_byname<wchar_t, true>(name));
 #endif
@@ -365,29 +365,29 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
         if (c & locale::numeric)
         {
             install(new numpunct_byname<char>(name));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install(new numpunct_byname<wchar_t>(name));
 #endif
         }
         if (c & locale::time)
         {
             install(new time_get_byname<char>(name));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install(new time_get_byname<wchar_t>(name));
 #endif
             install(new time_put_byname<char>(name));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install(new time_put_byname<wchar_t>(name));
 #endif
         }
         if (c & locale::messages)
         {
             install(new messages_byname<char>(name));
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install(new messages_byname<wchar_t>(name));
 #endif
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -396,7 +396,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
                 facets_[i]->__release_shared();
         throw;
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 template<class F>
@@ -416,87 +416,87 @@ locale::__imp::__imp(const __imp& other, const __imp& one, locale::category c)
     for (unsigned i = 0; i < facets_.size(); ++i)
         if (facets_[i])
             facets_[i]->__add_shared();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         if (c & locale::collate)
         {
-            install_from<_VSTD::collate<char> >(one);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-            install_from<_VSTD::collate<wchar_t> >(one);
+            install_from<_CUDA_VSTD::collate<char> >(one);
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+            install_from<_CUDA_VSTD::collate<wchar_t> >(one);
 #endif
         }
         if (c & locale::ctype)
         {
-            install_from<_VSTD::ctype<char> >(one);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-            install_from<_VSTD::ctype<wchar_t> >(one);
+            install_from<_CUDA_VSTD::ctype<char> >(one);
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+            install_from<_CUDA_VSTD::ctype<wchar_t> >(one);
 #endif
-            install_from<_VSTD::codecvt<char, char, mbstate_t> >(one);
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
-            install_from<_VSTD::codecvt<char16_t, char, mbstate_t> >(one);
-            install_from<_VSTD::codecvt<char32_t, char, mbstate_t> >(one);
-_LIBCPP_SUPPRESS_DEPRECATED_POP
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-            install_from<_VSTD::codecvt<char16_t, char8_t, mbstate_t> >(one);
-            install_from<_VSTD::codecvt<char32_t, char8_t, mbstate_t> >(one);
+            install_from<_CUDA_VSTD::codecvt<char, char, mbstate_t> >(one);
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
+            install_from<_CUDA_VSTD::codecvt<char16_t, char, mbstate_t> >(one);
+            install_from<_CUDA_VSTD::codecvt<char32_t, char, mbstate_t> >(one);
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
+            install_from<_CUDA_VSTD::codecvt<char16_t, char8_t, mbstate_t> >(one);
+            install_from<_CUDA_VSTD::codecvt<char32_t, char8_t, mbstate_t> >(one);
 #endif
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-            install_from<_VSTD::codecvt<wchar_t, char, mbstate_t> >(one);
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+            install_from<_CUDA_VSTD::codecvt<wchar_t, char, mbstate_t> >(one);
 #endif
         }
         if (c & locale::monetary)
         {
             install_from<moneypunct<char, false> >(one);
             install_from<moneypunct<char, true> >(one);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install_from<moneypunct<wchar_t, false> >(one);
             install_from<moneypunct<wchar_t, true> >(one);
 #endif
             install_from<money_get<char> >(one);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install_from<money_get<wchar_t> >(one);
 #endif
             install_from<money_put<char> >(one);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install_from<money_put<wchar_t> >(one);
 #endif
         }
         if (c & locale::numeric)
         {
             install_from<numpunct<char> >(one);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install_from<numpunct<wchar_t> >(one);
 #endif
             install_from<num_get<char> >(one);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install_from<num_get<wchar_t> >(one);
 #endif
             install_from<num_put<char> >(one);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install_from<num_put<wchar_t> >(one);
 #endif
         }
         if (c & locale::time)
         {
             install_from<time_get<char> >(one);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install_from<time_get<wchar_t> >(one);
 #endif
             install_from<time_put<char> >(one);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
             install_from<time_put<wchar_t> >(one);
 #endif
         }
         if (c & locale::messages)
         {
-            install_from<_VSTD::messages<char> >(one);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-            install_from<_VSTD::messages<wchar_t> >(one);
+            install_from<_CUDA_VSTD::messages<char> >(one);
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+            install_from<_CUDA_VSTD::messages<wchar_t> >(one);
 #endif
         }
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -505,7 +505,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
                 facets_[i]->__release_shared();
         throw;
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 locale::__imp::__imp(const __imp& other, facet* f, long id)
@@ -732,7 +732,7 @@ locale::id::__get()
 void
 locale::id::__init()
 {
-    __id_ = __libcpp_atomic_add(&__next_id, 1);
+    __id_ = __LIBCUDACXX_atomic_add(&__next_id, 1);
 }
 
 // template <> class collate_byname<char>
@@ -785,7 +785,7 @@ collate_byname<char>::do_transform(const char_type* lo, const char_type* hi) con
 
 // template <> class collate_byname<wchar_t>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 collate_byname<wchar_t>::collate_byname(const char* n, size_t refs)
     : collate<wchar_t>(refs),
       __l(newlocale(LC_ALL_MASK, n, 0))
@@ -831,7 +831,7 @@ collate_byname<wchar_t>::do_transform(const char_type* lo, const char_type* hi)
     wcsxfrm_l(const_cast<wchar_t*>(out.c_str()), in.c_str(), out.size()+1, __l);
     return out;
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 const ctype_base::mask ctype_base::space;
 const ctype_base::mask ctype_base::print;
@@ -848,7 +848,7 @@ const ctype_base::mask ctype_base::graph;
 
 // template <> class ctype<wchar_t>;
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 locale::id ctype<wchar_t>::id;
 
 ctype<wchar_t>::~ctype()
@@ -891,13 +891,13 @@ ctype<wchar_t>::do_scan_not(mask m, const char_type* low, const char_type* high)
 wchar_t
 ctype<wchar_t>::do_toupper(char_type c) const
 {
-#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
+#ifdef _LIBCUDACXX_HAS_DEFAULTRUNELOCALE
     return isascii(c) ? _DefaultRuneLocale.__mapupper[c] : c;
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || \
       defined(__NetBSD__) || defined(__MVS__)
     return isascii(c) ? ctype<char>::__classic_upper_table()[c] : c;
 #else
-    return (isascii(c) && iswlower_l(c, _LIBCPP_GET_C_LOCALE)) ? c-L'a'+L'A' : c;
+    return (isascii(c) && iswlower_l(c, _LIBCUDACXX_GET_C_LOCALE)) ? c-L'a'+L'A' : c;
 #endif
 }
 
@@ -905,14 +905,14 @@ const wchar_t*
 ctype<wchar_t>::do_toupper(char_type* low, const char_type* high) const
 {
     for (; low != high; ++low)
-#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
+#ifdef _LIBCUDACXX_HAS_DEFAULTRUNELOCALE
         *low = isascii(*low) ? _DefaultRuneLocale.__mapupper[*low] : *low;
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || \
       defined(__NetBSD__) || defined(__MVS__)
         *low = isascii(*low) ? ctype<char>::__classic_upper_table()[*low]
                              : *low;
 #else
-        *low = (isascii(*low) && islower_l(*low, _LIBCPP_GET_C_LOCALE)) ? (*low-L'a'+L'A') : *low;
+        *low = (isascii(*low) && islower_l(*low, _LIBCUDACXX_GET_C_LOCALE)) ? (*low-L'a'+L'A') : *low;
 #endif
     return low;
 }
@@ -920,13 +920,13 @@ ctype<wchar_t>::do_toupper(char_type* low, const char_type* high) const
 wchar_t
 ctype<wchar_t>::do_tolower(char_type c) const
 {
-#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
+#ifdef _LIBCUDACXX_HAS_DEFAULTRUNELOCALE
     return isascii(c) ? _DefaultRuneLocale.__maplower[c] : c;
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || \
       defined(__NetBSD__) || defined(__MVS__)
     return isascii(c) ? ctype<char>::__classic_lower_table()[c] : c;
 #else
-    return (isascii(c) && isupper_l(c, _LIBCPP_GET_C_LOCALE)) ? c-L'A'+'a' : c;
+    return (isascii(c) && isupper_l(c, _LIBCUDACXX_GET_C_LOCALE)) ? c-L'A'+'a' : c;
 #endif
 }
 
@@ -934,14 +934,14 @@ const wchar_t*
 ctype<wchar_t>::do_tolower(char_type* low, const char_type* high) const
 {
     for (; low != high; ++low)
-#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
+#ifdef _LIBCUDACXX_HAS_DEFAULTRUNELOCALE
         *low = isascii(*low) ? _DefaultRuneLocale.__maplower[*low] : *low;
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || \
       defined(__NetBSD__) || defined(__MVS__)
         *low = isascii(*low) ? ctype<char>::__classic_lower_table()[*low]
                              : *low;
 #else
-        *low = (isascii(*low) && isupper_l(*low, _LIBCPP_GET_C_LOCALE)) ? *low-L'A'+L'a' : *low;
+        *low = (isascii(*low) && isupper_l(*low, _LIBCUDACXX_GET_C_LOCALE)) ? *low-L'A'+L'a' : *low;
 #endif
     return low;
 }
@@ -978,7 +978,7 @@ ctype<wchar_t>::do_narrow(const char_type* low, const char_type* high, char dfau
             *dest = dfault;
     return low;
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // template <> class ctype<char>;
 
@@ -1004,7 +1004,7 @@ ctype<char>::~ctype()
 char
 ctype<char>::do_toupper(char_type c) const
 {
-#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
+#ifdef _LIBCUDACXX_HAS_DEFAULTRUNELOCALE
     return isascii(c) ?
       static_cast<char>(_DefaultRuneLocale.__mapupper[static_cast<ptr
diff _t>(c)]) : c;
 #elif defined(__NetBSD__)
@@ -1013,7 +1013,7 @@ ctype<char>::do_toupper(char_type c) const
     return isascii(c) ?
       static_cast<char>(__classic_upper_table()[static_cast<unsigned char>(c)]) : c;
 #else
-    return (isascii(c) && islower_l(c, _LIBCPP_GET_C_LOCALE)) ? c-'a'+'A' : c;
+    return (isascii(c) && islower_l(c, _LIBCUDACXX_GET_C_LOCALE)) ? c-'a'+'A' : c;
 #endif
 }
 
@@ -1021,7 +1021,7 @@ const char*
 ctype<char>::do_toupper(char_type* low, const char_type* high) const
 {
     for (; low != high; ++low)
-#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
+#ifdef _LIBCUDACXX_HAS_DEFAULTRUNELOCALE
         *low = isascii(*low) ?
           static_cast<char>(_DefaultRuneLocale.__mapupper[static_cast<ptr
diff _t>(*low)]) : *low;
 #elif defined(__NetBSD__)
@@ -1030,7 +1030,7 @@ ctype<char>::do_toupper(char_type* low, const char_type* high) const
         *low = isascii(*low) ?
           static_cast<char>(__classic_upper_table()[static_cast<size_t>(*low)]) : *low;
 #else
-        *low = (isascii(*low) && islower_l(*low, _LIBCPP_GET_C_LOCALE)) ? *low-'a'+'A' : *low;
+        *low = (isascii(*low) && islower_l(*low, _LIBCUDACXX_GET_C_LOCALE)) ? *low-'a'+'A' : *low;
 #endif
     return low;
 }
@@ -1038,7 +1038,7 @@ ctype<char>::do_toupper(char_type* low, const char_type* high) const
 char
 ctype<char>::do_tolower(char_type c) const
 {
-#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
+#ifdef _LIBCUDACXX_HAS_DEFAULTRUNELOCALE
     return isascii(c) ?
       static_cast<char>(_DefaultRuneLocale.__maplower[static_cast<ptr
diff _t>(c)]) : c;
 #elif defined(__NetBSD__)
@@ -1047,7 +1047,7 @@ ctype<char>::do_tolower(char_type c) const
     return isascii(c) ?
       static_cast<char>(__classic_lower_table()[static_cast<size_t>(c)]) : c;
 #else
-    return (isascii(c) && isupper_l(c, _LIBCPP_GET_C_LOCALE)) ? c-'A'+'a' : c;
+    return (isascii(c) && isupper_l(c, _LIBCUDACXX_GET_C_LOCALE)) ? c-'A'+'a' : c;
 #endif
 }
 
@@ -1055,14 +1055,14 @@ const char*
 ctype<char>::do_tolower(char_type* low, const char_type* high) const
 {
     for (; low != high; ++low)
-#ifdef _LIBCPP_HAS_DEFAULTRUNELOCALE
+#ifdef _LIBCUDACXX_HAS_DEFAULTRUNELOCALE
         *low = isascii(*low) ? static_cast<char>(_DefaultRuneLocale.__maplower[static_cast<ptr
diff _t>(*low)]) : *low;
 #elif defined(__NetBSD__)
         *low = static_cast<char>(__classic_lower_table()[static_cast<unsigned char>(*low)]);
 #elif defined(__GLIBC__) || defined(__EMSCRIPTEN__) || defined(__MVS__)
         *low = isascii(*low) ? static_cast<char>(__classic_lower_table()[static_cast<size_t>(*low)]) : *low;
 #else
-        *low = (isascii(*low) && isupper_l(*low, _LIBCPP_GET_C_LOCALE)) ? *low-'A'+'a' : *low;
+        *low = (isascii(*low) && isupper_l(*low, _LIBCUDACXX_GET_C_LOCALE)) ? *low-'A'+'a' : *low;
 #endif
     return low;
 }
@@ -1106,11 +1106,11 @@ extern "C" const int ** __ctype_tolower_loc();
 extern "C" const int ** __ctype_toupper_loc();
 #endif
 
-#ifdef _LIBCPP_PROVIDES_DEFAULT_RUNE_TABLE
+#ifdef _LIBCUDACXX_PROVIDES_DEFAULT_RUNE_TABLE
 const ctype<char>::mask*
 ctype<char>::classic_table() noexcept
 {
-    static _LIBCPP_CONSTEXPR const ctype<char>::mask builtin_table[table_size] = {
+    static _LIBCUDACXX_CONSTEXPR const ctype<char>::mask builtin_table[table_size] = {
         cntrl,                          cntrl,
         cntrl,                          cntrl,
         cntrl,                          cntrl,
@@ -1195,10 +1195,10 @@ ctype<char>::classic_table() noexcept
 #elif defined(__NetBSD__)
     return _C_ctype_tab_ + 1;
 #elif defined(__GLIBC__)
-    return _LIBCPP_GET_C_LOCALE->__ctype_b;
+    return _LIBCUDACXX_GET_C_LOCALE->__ctype_b;
 #elif defined(__sun__)
     return __ctype_mask;
-#elif defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
+#elif defined(_LIBCUDACXX_MSVCRT) || defined(__MINGW32__)
     return __pctype_func();
 #elif defined(__EMSCRIPTEN__)
     return *__ctype_b_loc();
@@ -1228,13 +1228,13 @@ ctype<char>::classic_table() noexcept
 const int*
 ctype<char>::__classic_lower_table() noexcept
 {
-    return _LIBCPP_GET_C_LOCALE->__ctype_tolower;
+    return _LIBCUDACXX_GET_C_LOCALE->__ctype_tolower;
 }
 
 const int*
 ctype<char>::__classic_upper_table() noexcept
 {
-    return _LIBCPP_GET_C_LOCALE->__ctype_toupper;
+    return _LIBCUDACXX_GET_C_LOCALE->__ctype_toupper;
 }
 #elif defined(__NetBSD__)
 const short*
@@ -1337,7 +1337,7 @@ ctype_byname<char>::do_tolower(char_type* low, const char_type* high) const
 
 // template <> class ctype_byname<wchar_t>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 ctype_byname<wchar_t>::ctype_byname(const char* name, size_t refs)
     : ctype<wchar_t>(refs),
       __l(newlocale(LC_ALL_MASK, name, 0))
@@ -1364,7 +1364,7 @@ ctype_byname<wchar_t>::~ctype_byname()
 bool
 ctype_byname<wchar_t>::do_is(mask m, char_type c) const
 {
-#ifdef _LIBCPP_WCTYPE_IS_MASK
+#ifdef _LIBCUDACXX_WCTYPE_IS_MASK
     return static_cast<bool>(iswctype_l(c, m, __l));
 #else
     bool result = false;
@@ -1396,7 +1396,7 @@ ctype_byname<wchar_t>::do_is(const char_type* low, const char_type* high, mask*
             wint_t ch = static_cast<wint_t>(*low);
             if (iswspace_l(ch, __l))
                 *vec |= space;
-#ifndef _LIBCPP_CTYPE_MASK_IS_COMPOSITE_PRINT
+#ifndef _LIBCUDACXX_CTYPE_MASK_IS_COMPOSITE_PRINT
             if (iswprint_l(ch, __l))
                 *vec |= print;
 #endif
@@ -1406,7 +1406,7 @@ ctype_byname<wchar_t>::do_is(const char_type* low, const char_type* high, mask*
                 *vec |= upper;
             if (iswlower_l(ch, __l))
                 *vec |= lower;
-#ifndef _LIBCPP_CTYPE_MASK_IS_COMPOSITE_ALPHA
+#ifndef _LIBCUDACXX_CTYPE_MASK_IS_COMPOSITE_ALPHA
             if (iswalpha_l(ch, __l))
                 *vec |= alpha;
 #endif
@@ -1414,7 +1414,7 @@ ctype_byname<wchar_t>::do_is(const char_type* low, const char_type* high, mask*
                 *vec |= digit;
             if (iswpunct_l(ch, __l))
                 *vec |= punct;
-#ifndef _LIBCPP_CTYPE_MASK_IS_COMPOSITE_XDIGIT
+#ifndef _LIBCUDACXX_CTYPE_MASK_IS_COMPOSITE_XDIGIT
             if (iswxdigit_l(ch, __l))
                 *vec |= xdigit;
 #endif
@@ -1432,7 +1432,7 @@ ctype_byname<wchar_t>::do_scan_is(mask m, const char_type* low, const char_type*
 {
     for (; low != high; ++low)
     {
-#ifdef _LIBCPP_WCTYPE_IS_MASK
+#ifdef _LIBCUDACXX_WCTYPE_IS_MASK
         if (iswctype_l(*low, m, __l))
             break;
 #else
@@ -1457,7 +1457,7 @@ ctype_byname<wchar_t>::do_scan_not(mask m, const char_type* low, const char_type
 {
     for (; low != high; ++low)
     {
-#ifdef _LIBCPP_WCTYPE_IS_MASK
+#ifdef _LIBCUDACXX_WCTYPE_IS_MASK
         if (!iswctype_l(*low, m, __l))
             break;
 #else
@@ -1509,21 +1509,21 @@ ctype_byname<wchar_t>::do_tolower(char_type* low, const char_type* high) const
 wchar_t
 ctype_byname<wchar_t>::do_widen(char c) const
 {
-    return __libcpp_btowc_l(c, __l);
+    return __LIBCUDACXX_btowc_l(c, __l);
 }
 
 const char*
 ctype_byname<wchar_t>::do_widen(const char* low, const char* high, char_type* dest) const
 {
     for (; low != high; ++low, ++dest)
-        *dest = __libcpp_btowc_l(*low, __l);
+        *dest = __LIBCUDACXX_btowc_l(*low, __l);
     return low;
 }
 
 char
 ctype_byname<wchar_t>::do_narrow(char_type c, char dfault) const
 {
-    int r = __libcpp_wctob_l(c, __l);
+    int r = __LIBCUDACXX_wctob_l(c, __l);
     return (r != EOF) ? static_cast<char>(r) : dfault;
 }
 
@@ -1532,12 +1532,12 @@ ctype_byname<wchar_t>::do_narrow(const char_type* low, const char_type* high, ch
 {
     for (; low != high; ++low, ++dest)
     {
-        int r = __libcpp_wctob_l(*low, __l);
+        int r = __LIBCUDACXX_wctob_l(*low, __l);
         *dest = (r != EOF) ? static_cast<char>(r) : dfault;
     }
     return low;
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // template <> class codecvt<char, char, mbstate_t>
 
@@ -1602,12 +1602,12 @@ codecvt<char, char, mbstate_t>::do_max_length() const noexcept
 
 // template <> class codecvt<wchar_t, char, mbstate_t>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 locale::id codecvt<wchar_t, char, mbstate_t>::id;
 
 codecvt<wchar_t, char, mbstate_t>::codecvt(size_t refs)
     : locale::facet(refs),
-      __l(_LIBCPP_GET_C_LOCALE)
+      __l(_LIBCUDACXX_GET_C_LOCALE)
 {
 }
 
@@ -1622,7 +1622,7 @@ codecvt<wchar_t, char, mbstate_t>::codecvt(const char* nm, size_t refs)
 
 codecvt<wchar_t, char, mbstate_t>::~codecvt()
 {
-    if (__l != _LIBCPP_GET_C_LOCALE)
+    if (__l != _LIBCUDACXX_GET_C_LOCALE)
         freelocale(__l);
 }
 
@@ -1642,14 +1642,14 @@ codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
     {
         // save state in case it is needed to recover to_nxt on error
         mbstate_t save_state = st;
-        size_t n = __libcpp_wcsnrtombs_l(to, &frm_nxt, static_cast<size_t>(fend-frm),
+        size_t n = __LIBCUDACXX_wcsnrtombs_l(to, &frm_nxt, static_cast<size_t>(fend-frm),
                                      static_cast<size_t>(to_end-to), &st, __l);
         if (n == size_t(-1))
         {
             // need to recover to_nxt
             for (to_nxt = to; frm != frm_nxt; ++frm)
             {
-                n = __libcpp_wcrtomb_l(to_nxt, *frm, &save_state, __l);
+                n = __LIBCUDACXX_wcrtomb_l(to_nxt, *frm, &save_state, __l);
                 if (n == size_t(-1))
                     break;
                 to_nxt += n;
@@ -1666,7 +1666,7 @@ codecvt<wchar_t, char, mbstate_t>::do_out(state_type& st,
         {
             // Try to write the terminating null
             extern_type tmp[MB_LEN_MAX];
-            n = __libcpp_wcrtomb_l(tmp, intern_type(), &st, __l);
+            n = __LIBCUDACXX_wcrtomb_l(tmp, intern_type(), &st, __l);
             if (n == size_t(-1))  // on error
                 return error;
             if (n > static_cast<size_t>(to_end-to_nxt))  // is there room?
@@ -1699,14 +1699,14 @@ codecvt<wchar_t, char, mbstate_t>::do_in(state_type& st,
     {
         // save state in case it is needed to recover to_nxt on error
         mbstate_t save_state = st;
-        size_t n = __libcpp_mbsnrtowcs_l(to, &frm_nxt, static_cast<size_t>(fend-frm),
+        size_t n = __LIBCUDACXX_mbsnrtowcs_l(to, &frm_nxt, static_cast<size_t>(fend-frm),
                                      static_cast<size_t>(to_end-to), &st, __l);
         if (n == size_t(-1))
         {
             // need to recover to_nxt
             for (to_nxt = to; frm != frm_nxt; ++to_nxt)
             {
-                n = __libcpp_mbrtowc_l(to_nxt, frm, static_cast<size_t>(fend-frm),
+                n = __LIBCUDACXX_mbrtowc_l(to_nxt, frm, static_cast<size_t>(fend-frm),
                                    &save_state, __l);
                 switch (n)
                 {
@@ -1735,7 +1735,7 @@ codecvt<wchar_t, char, mbstate_t>::do_in(state_type& st,
         if (fend != frm_end)  // set up next null terminated sequence
         {
             // Try to write the terminating null
-            n = __libcpp_mbrtowc_l(to_nxt, frm_nxt, 1, &st, __l);
+            n = __LIBCUDACXX_mbrtowc_l(to_nxt, frm_nxt, 1, &st, __l);
             if (n != 0)  // on error
                 return error;
             ++to_nxt;
@@ -1755,7 +1755,7 @@ codecvt<wchar_t, char, mbstate_t>::do_unshift(state_type& st,
 {
     to_nxt = to;
     extern_type tmp[MB_LEN_MAX];
-    size_t n = __libcpp_wcrtomb_l(tmp, intern_type(), &st, __l);
+    size_t n = __LIBCUDACXX_wcrtomb_l(tmp, intern_type(), &st, __l);
     if (n == size_t(-1) || n == 0)  // on error
         return error;
     --n;
@@ -1769,11 +1769,11 @@ codecvt<wchar_t, char, mbstate_t>::do_unshift(state_type& st,
 int
 codecvt<wchar_t, char, mbstate_t>::do_encoding() const noexcept
 {
-    if (__libcpp_mbtowc_l(nullptr, nullptr, MB_LEN_MAX, __l) != 0)
+    if (__LIBCUDACXX_mbtowc_l(nullptr, nullptr, MB_LEN_MAX, __l) != 0)
         return -1;
 
     // stateless encoding
-    if (__l == 0 || __libcpp_mb_cur_max_l(__l) == 1)  // there are no known constant length encodings
+    if (__l == 0 || __LIBCUDACXX_mb_cur_max_l(__l) == 1)  // there are no known constant length encodings
         return 1;                // which take more than 1 char to form a wchar_t
     return 0;
 }
@@ -1791,7 +1791,7 @@ codecvt<wchar_t, char, mbstate_t>::do_length(state_type& st,
     int nbytes = 0;
     for (size_t nwchar_t = 0; nwchar_t < mx && frm != frm_end; ++nwchar_t)
     {
-        size_t n = __libcpp_mbrlen_l(frm, static_cast<size_t>(frm_end-frm), &st, __l);
+        size_t n = __LIBCUDACXX_mbrlen_l(frm, static_cast<size_t>(frm_end-frm), &st, __l);
         switch (n)
         {
         case 0:
@@ -1813,9 +1813,9 @@ codecvt<wchar_t, char, mbstate_t>::do_length(state_type& st,
 int
 codecvt<wchar_t, char, mbstate_t>::do_max_length() const noexcept
 {
-    return __l == 0 ? 1 : static_cast<int>(__libcpp_mb_cur_max_l(__l));
+    return __l == 0 ? 1 : static_cast<int>(__LIBCUDACXX_mb_cur_max_l(__l));
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 //                                     Valid UTF ranges
 //     UTF-32               UTF-16                          UTF-8               # of code points
@@ -1831,7 +1831,7 @@ codecvt<wchar_t, char, mbstate_t>::do_max_length() const noexcept
 // 040000 - 0FFFFF  D8C0 - DBBF, DC00 - DFFF  F1 - F3, 80 - BF, 80 - BF, 80 - BF   786432
 // 100000 - 10FFFF  DBC0 - DBFF, DC00 - DFFF  F4 - F4, 80 - 8F, 80 - BF, 80 - BF    65536
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 static
 codecvt_base::result
 utf16_to_utf8(const uint16_t* frm, const uint16_t* frm_end, const uint16_t*& frm_nxt,
@@ -3205,7 +3205,7 @@ utf16le_to_ucs2_length(const uint8_t* frm, const uint8_t* frm_end,
     return static_cast<int>(frm_nxt - frm);
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 // template <> class codecvt<char16_t, char, mbstate_t>
 
@@ -3284,7 +3284,7 @@ codecvt<char16_t, char, mbstate_t>::do_max_length() const noexcept
     return 4;
 }
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 
 // template <> class codecvt<char16_t, char8_t, mbstate_t>
 
@@ -3442,7 +3442,7 @@ codecvt<char32_t, char, mbstate_t>::do_max_length() const noexcept
     return 4;
 }
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
 
 // template <> class codecvt<char32_t, char8_t, mbstate_t>
 
@@ -3525,13 +3525,13 @@ codecvt<char32_t, char8_t, mbstate_t>::do_max_length() const noexcept
 
 // __codecvt_utf8<wchar_t>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 __codecvt_utf8<wchar_t>::result
 __codecvt_utf8<wchar_t>::do_out(state_type&,
     const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
     extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
 {
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     const uint16_t* _frm = reinterpret_cast<const uint16_t*>(frm);
     const uint16_t* _frm_end = reinterpret_cast<const uint16_t*>(frm_end);
     const uint16_t* _frm_nxt = _frm;
@@ -3543,7 +3543,7 @@ __codecvt_utf8<wchar_t>::do_out(state_type&,
     uint8_t* _to = reinterpret_cast<uint8_t*>(to);
     uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end);
     uint8_t* _to_nxt = _to;
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     result r = ucs2_to_utf8(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
                             _Maxcode_, _Mode_);
 #else
@@ -3563,7 +3563,7 @@ __codecvt_utf8<wchar_t>::do_in(state_type&,
     const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
     const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
     const uint8_t* _frm_nxt = _frm;
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     uint16_t* _to = reinterpret_cast<uint16_t*>(to);
     uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end);
     uint16_t* _to_nxt = _to;
@@ -3607,18 +3607,18 @@ __codecvt_utf8<wchar_t>::do_length(state_type&,
 {
     const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
     const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     return utf8_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 #else
     return utf8_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 #endif
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 int
 __codecvt_utf8<wchar_t>::do_max_length() const noexcept
 {
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     if (_Mode_ & consume_header)
         return 6;
     return 3;
@@ -3628,7 +3628,7 @@ __codecvt_utf8<wchar_t>::do_max_length() const noexcept
     return 4;
 #endif
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // __codecvt_utf8<char16_t>
 
@@ -3697,7 +3697,7 @@ __codecvt_utf8<char16_t>::do_length(state_type&,
     return utf8_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 int
 __codecvt_utf8<char16_t>::do_max_length() const noexcept
 {
@@ -3705,7 +3705,7 @@ __codecvt_utf8<char16_t>::do_max_length() const noexcept
         return 6;
     return 3;
 }
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 // __codecvt_utf8<char32_t>
 
@@ -3774,7 +3774,7 @@ __codecvt_utf8<char32_t>::do_length(state_type&,
     return utf8_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 int
 __codecvt_utf8<char32_t>::do_max_length() const noexcept
 {
@@ -3782,17 +3782,17 @@ __codecvt_utf8<char32_t>::do_max_length() const noexcept
         return 7;
     return 4;
 }
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 // __codecvt_utf16<wchar_t, false>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 __codecvt_utf16<wchar_t, false>::result
 __codecvt_utf16<wchar_t, false>::do_out(state_type&,
     const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
     extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
 {
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     const uint16_t* _frm = reinterpret_cast<const uint16_t*>(frm);
     const uint16_t* _frm_end = reinterpret_cast<const uint16_t*>(frm_end);
     const uint16_t* _frm_nxt = _frm;
@@ -3804,7 +3804,7 @@ __codecvt_utf16<wchar_t, false>::do_out(state_type&,
     uint8_t* _to = reinterpret_cast<uint8_t*>(to);
     uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end);
     uint8_t* _to_nxt = _to;
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     result r = ucs2_to_utf16be(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
                                _Maxcode_, _Mode_);
 #else
@@ -3824,7 +3824,7 @@ __codecvt_utf16<wchar_t, false>::do_in(state_type&,
     const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
     const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
     const uint8_t* _frm_nxt = _frm;
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     uint16_t* _to = reinterpret_cast<uint16_t*>(to);
     uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end);
     uint16_t* _to_nxt = _to;
@@ -3868,7 +3868,7 @@ __codecvt_utf16<wchar_t, false>::do_length(state_type&,
 {
     const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
     const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     return utf16be_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 #else
     return utf16be_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
@@ -3878,7 +3878,7 @@ __codecvt_utf16<wchar_t, false>::do_length(state_type&,
 int
 __codecvt_utf16<wchar_t, false>::do_max_length() const noexcept
 {
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     if (_Mode_ & consume_header)
         return 4;
     return 2;
@@ -3896,7 +3896,7 @@ __codecvt_utf16<wchar_t, true>::do_out(state_type&,
     const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
     extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
 {
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     const uint16_t* _frm = reinterpret_cast<const uint16_t*>(frm);
     const uint16_t* _frm_end = reinterpret_cast<const uint16_t*>(frm_end);
     const uint16_t* _frm_nxt = _frm;
@@ -3908,7 +3908,7 @@ __codecvt_utf16<wchar_t, true>::do_out(state_type&,
     uint8_t* _to = reinterpret_cast<uint8_t*>(to);
     uint8_t* _to_end = reinterpret_cast<uint8_t*>(to_end);
     uint8_t* _to_nxt = _to;
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     result r = ucs2_to_utf16le(_frm, _frm_end, _frm_nxt, _to, _to_end, _to_nxt,
                                _Maxcode_, _Mode_);
 #else
@@ -3928,7 +3928,7 @@ __codecvt_utf16<wchar_t, true>::do_in(state_type&,
     const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
     const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
     const uint8_t* _frm_nxt = _frm;
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     uint16_t* _to = reinterpret_cast<uint16_t*>(to);
     uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end);
     uint16_t* _to_nxt = _to;
@@ -3972,7 +3972,7 @@ __codecvt_utf16<wchar_t, true>::do_length(state_type&,
 {
     const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
     const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     return utf16le_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 #else
     return utf16le_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
@@ -3982,7 +3982,7 @@ __codecvt_utf16<wchar_t, true>::do_length(state_type&,
 int
 __codecvt_utf16<wchar_t, true>::do_max_length() const noexcept
 {
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     if (_Mode_ & consume_header)
         return 4;
     return 2;
@@ -3992,7 +3992,7 @@ __codecvt_utf16<wchar_t, true>::do_max_length() const noexcept
     return 4;
 #endif
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // __codecvt_utf16<char16_t, false>
 
@@ -4061,7 +4061,7 @@ __codecvt_utf16<char16_t, false>::do_length(state_type&,
     return utf16be_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 int
 __codecvt_utf16<char16_t, false>::do_max_length() const noexcept
 {
@@ -4069,7 +4069,7 @@ __codecvt_utf16<char16_t, false>::do_max_length() const noexcept
         return 4;
     return 2;
 }
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 // __codecvt_utf16<char16_t, true>
 
@@ -4138,7 +4138,7 @@ __codecvt_utf16<char16_t, true>::do_length(state_type&,
     return utf16le_to_ucs2_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 int
 __codecvt_utf16<char16_t, true>::do_max_length() const noexcept
 {
@@ -4146,7 +4146,7 @@ __codecvt_utf16<char16_t, true>::do_max_length() const noexcept
         return 4;
     return 2;
 }
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 // __codecvt_utf16<char32_t, false>
 
@@ -4215,7 +4215,7 @@ __codecvt_utf16<char32_t, false>::do_length(state_type&,
     return utf16be_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 int
 __codecvt_utf16<char32_t, false>::do_max_length() const noexcept
 {
@@ -4223,7 +4223,7 @@ __codecvt_utf16<char32_t, false>::do_max_length() const noexcept
         return 6;
     return 4;
 }
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 // __codecvt_utf16<char32_t, true>
 
@@ -4292,7 +4292,7 @@ __codecvt_utf16<char32_t, true>::do_length(state_type&,
     return utf16le_to_ucs4_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 int
 __codecvt_utf16<char32_t, true>::do_max_length() const noexcept
 {
@@ -4300,17 +4300,17 @@ __codecvt_utf16<char32_t, true>::do_max_length() const noexcept
         return 6;
     return 4;
 }
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 // __codecvt_utf8_utf16<wchar_t>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 __codecvt_utf8_utf16<wchar_t>::result
 __codecvt_utf8_utf16<wchar_t>::do_out(state_type&,
     const intern_type* frm, const intern_type* frm_end, const intern_type*& frm_nxt,
     extern_type* to, extern_type* to_end, extern_type*& to_nxt) const
 {
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     const uint16_t* _frm = reinterpret_cast<const uint16_t*>(frm);
     const uint16_t* _frm_end = reinterpret_cast<const uint16_t*>(frm_end);
     const uint16_t* _frm_nxt = _frm;
@@ -4337,7 +4337,7 @@ __codecvt_utf8_utf16<wchar_t>::do_in(state_type&,
     const uint8_t* _frm = reinterpret_cast<const uint8_t*>(frm);
     const uint8_t* _frm_end = reinterpret_cast<const uint8_t*>(frm_end);
     const uint8_t* _frm_nxt = _frm;
-#if defined(_LIBCPP_SHORT_WCHAR)
+#if defined(_LIBCUDACXX_SHORT_WCHAR)
     uint16_t* _to = reinterpret_cast<uint16_t*>(to);
     uint16_t* _to_end = reinterpret_cast<uint16_t*>(to_end);
     uint16_t* _to_nxt = _to;
@@ -4389,7 +4389,7 @@ __codecvt_utf8_utf16<wchar_t>::do_max_length() const noexcept
         return 7;
     return 4;
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // __codecvt_utf8_utf16<char16_t>
 
@@ -4458,7 +4458,7 @@ __codecvt_utf8_utf16<char16_t>::do_length(state_type&,
     return utf8_to_utf16_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 int
 __codecvt_utf8_utf16<char16_t>::do_max_length() const noexcept
 {
@@ -4466,7 +4466,7 @@ __codecvt_utf8_utf16<char16_t>::do_max_length() const noexcept
         return 7;
     return 4;
 }
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 // __codecvt_utf8_utf16<char32_t>
 
@@ -4535,7 +4535,7 @@ __codecvt_utf8_utf16<char32_t>::do_length(state_type&,
     return utf8_to_utf16_length(_frm, _frm_end, mx, _Maxcode_, _Mode_);
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 int
 __codecvt_utf8_utf16<char32_t>::do_max_length() const noexcept
 {
@@ -4543,7 +4543,7 @@ __codecvt_utf8_utf16<char32_t>::do_max_length() const noexcept
         return 7;
     return 4;
 }
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 // __narrow_to_utf8<16>
 
@@ -4569,7 +4569,7 @@ __widen_from_utf8<32>::~__widen_from_utf8()
 {
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 static bool checked_string_to_wchar_convert(wchar_t& dest,
                                             const char* ptr,
                                             locale_t loc) {
@@ -4577,16 +4577,16 @@ static bool checked_string_to_wchar_convert(wchar_t& dest,
     return false;
   mbstate_t mb = {};
   wchar_t out;
-  size_t ret = __libcpp_mbrtowc_l(&out, ptr, strlen(ptr), &mb, loc);
+  size_t ret = __LIBCUDACXX_mbrtowc_l(&out, ptr, strlen(ptr), &mb, loc);
   if (ret == static_cast<size_t>(-1) || ret == static_cast<size_t>(-2)) {
     return false;
   }
   dest = out;
   return true;
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
-#ifdef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifdef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 static bool is_narrow_non_breaking_space(const char* ptr) {
   // https://www.fileformat.info/info/unicode/char/202f/index.htm
   return ptr[0] == '\xe2' && ptr[1] == '\x80' && ptr[2] == '\xaf';
@@ -4596,7 +4596,7 @@ static bool is_non_breaking_space(const char* ptr) {
   // https://www.fileformat.info/info/unicode/char/0a/index.htm
   return ptr[0] == '\xc2' && ptr[1] == '\xa0';
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 static bool checked_string_to_char_convert(char& dest,
                                            const char* ptr,
@@ -4608,14 +4608,14 @@ static bool checked_string_to_char_convert(char& dest,
     return true;
   }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
   // First convert the MBS into a wide char then attempt to narrow it using
   // wctob_l.
   wchar_t wout;
   if (!checked_string_to_wchar_convert(wout, ptr, __loc))
     return false;
   int res;
-  if ((res = __libcpp_wctob_l(wout, __loc)) != char_traits<char>::eof()) {
+  if ((res = __LIBCUDACXX_wctob_l(wout, __loc)) != char_traits<char>::eof()) {
     dest = res;
     return true;
   }
@@ -4629,7 +4629,7 @@ static bool checked_string_to_char_convert(char& dest,
   default:
     return false;
   }
-#else // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#else // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
   // FIXME: Work around specific multibyte sequences that we can reasonably
   // translate into a 
diff erent single byte.
   if (is_narrow_non_breaking_space(ptr) || is_non_breaking_space(ptr)) {
@@ -4638,15 +4638,15 @@ static bool checked_string_to_char_convert(char& dest,
   }
 
   return false;
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
-  __libcpp_unreachable();
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+  __LIBCUDACXX_unreachable();
 }
 
 
 // numpunct<char> && numpunct<wchar_t>
 
 locale::id numpunct< char  >::id;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 locale::id numpunct<wchar_t>::id;
 #endif
 
@@ -4657,7 +4657,7 @@ numpunct<char>::numpunct(size_t refs)
 {
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 numpunct<wchar_t>::numpunct(size_t refs)
     : locale::facet(refs),
       __decimal_point_(L'.'),
@@ -4670,34 +4670,34 @@ numpunct<char>::~numpunct()
 {
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 numpunct<wchar_t>::~numpunct()
 {
 }
 #endif
 
  char   numpunct< char  >::do_decimal_point() const {return __decimal_point_;}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 wchar_t numpunct<wchar_t>::do_decimal_point() const {return __decimal_point_;}
 #endif
 
  char   numpunct< char  >::do_thousands_sep() const {return __thousands_sep_;}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 wchar_t numpunct<wchar_t>::do_thousands_sep() const {return __thousands_sep_;}
 #endif
 
 string numpunct< char  >::do_grouping() const {return __grouping_;}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 string numpunct<wchar_t>::do_grouping() const {return __grouping_;}
 #endif
 
  string numpunct< char  >::do_truename() const {return "true";}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 wstring numpunct<wchar_t>::do_truename() const {return L"true";}
 #endif
 
  string numpunct< char  >::do_falsename() const {return "false";}
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 wstring numpunct<wchar_t>::do_falsename() const {return L"false";}
 #endif
 
@@ -4725,12 +4725,12 @@ numpunct_byname<char>::__init(const char* nm)
     typedef numpunct<char> base;
     if (strcmp(nm, "C") != 0)
     {
-        __libcpp_unique_locale loc(nm);
+        __LIBCUDACXX_unique_locale loc(nm);
         if (!loc)
             __throw_runtime_error("numpunct_byname<char>::numpunct_byname"
                                 " failed to construct for " + string(nm));
 
-        lconv* lc = __libcpp_localeconv_l(loc.get());
+        lconv* lc = __LIBCUDACXX_localeconv_l(loc.get());
         if (!checked_string_to_char_convert(__decimal_point_, lc->decimal_point,
                                             loc.get()))
             __decimal_point_ = base::do_decimal_point();
@@ -4744,7 +4744,7 @@ numpunct_byname<char>::__init(const char* nm)
 
 // numpunct_byname<wchar_t>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 numpunct_byname<wchar_t>::numpunct_byname(const char* nm, size_t refs)
     : numpunct<wchar_t>(refs)
 {
@@ -4766,12 +4766,12 @@ numpunct_byname<wchar_t>::__init(const char* nm)
 {
     if (strcmp(nm, "C") != 0)
     {
-        __libcpp_unique_locale loc(nm);
+        __LIBCUDACXX_unique_locale loc(nm);
         if (!loc)
             __throw_runtime_error("numpunct_byname<wchar_t>::numpunct_byname"
                                 " failed to construct for " + string(nm));
 
-        lconv* lc = __libcpp_localeconv_l(loc.get());
+        lconv* lc = __LIBCUDACXX_localeconv_l(loc.get());
         checked_string_to_wchar_convert(__decimal_point_, lc->decimal_point,
                                         loc.get());
         checked_string_to_wchar_convert(__thousands_sep_, lc->thousands_sep,
@@ -4780,7 +4780,7 @@ numpunct_byname<wchar_t>::__init(const char* nm)
         // localization for truename and falsename is not available
     }
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // num_get helpers
 
@@ -4956,7 +4956,7 @@ init_weeks()
     return weeks;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 static
 wstring*
 init_wweeks()
@@ -4988,7 +4988,7 @@ __time_get_c_storage<char>::__weeks() const
     return weeks;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 const wstring*
 __time_get_c_storage<wchar_t>::__weeks() const
@@ -5030,7 +5030,7 @@ init_months()
     return months;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 static
 wstring*
 init_wmonths()
@@ -5072,7 +5072,7 @@ __time_get_c_storage<char>::__months() const
     return months;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 const wstring*
 __time_get_c_storage<wchar_t>::__months() const
@@ -5092,7 +5092,7 @@ init_am_pm()
     return am_pm;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 static
 wstring*
 init_wam_pm()
@@ -5112,7 +5112,7 @@ __time_get_c_storage<char>::__am_pm() const
     return am_pm;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 const wstring*
 __time_get_c_storage<wchar_t>::__am_pm() const
@@ -5130,7 +5130,7 @@ __time_get_c_storage<char>::__x() const
     return s;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 const wstring&
 __time_get_c_storage<wchar_t>::__x() const
@@ -5148,7 +5148,7 @@ __time_get_c_storage<char>::__X() const
     return s;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 const wstring&
 __time_get_c_storage<wchar_t>::__X() const
@@ -5166,7 +5166,7 @@ __time_get_c_storage<char>::__c() const
     return s;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 const wstring&
 __time_get_c_storage<wchar_t>::__c() const
@@ -5184,7 +5184,7 @@ __time_get_c_storage<char>::__r() const
     return s;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 const wstring&
 __time_get_c_storage<wchar_t>::__r() const
@@ -5217,7 +5217,7 @@ __time_get::~__time_get()
     freelocale(__loc_);
 }
 
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wmissing-field-initializers")
+_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wmissing-field-initializers")
 
 template <>
 string
@@ -5363,9 +5363,9 @@ __time_get_storage<char>::__analyze(char fmt, const ctype<char>& ct)
     return result;
 }
 
-_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wmissing-braces")
+_LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wmissing-braces")
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 wstring
 __time_get_storage<wchar_t>::__analyze(char fmt, const ctype<wchar_t>& ct)
@@ -5389,7 +5389,7 @@ __time_get_storage<wchar_t>::__analyze(char fmt, const ctype<wchar_t>& ct)
     wchar_t* wbb = wbuf;
     mbstate_t mb = {0};
     const char* bb = buf;
-    size_t j = __libcpp_mbsrtowcs_l( wbb, &bb, countof(wbuf), &mb, __loc_);
+    size_t j = __LIBCUDACXX_mbsrtowcs_l( wbb, &bb, countof(wbuf), &mb, __loc_);
     if (j == size_t(-1))
         __throw_runtime_error("locale not supported");
     wchar_t* wbe = wbb + j;
@@ -5515,7 +5515,7 @@ __time_get_storage<wchar_t>::__analyze(char fmt, const ctype<wchar_t>& ct)
     }
     return result;
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 template <>
 void
@@ -5554,7 +5554,7 @@ __time_get_storage<char>::init(const ctype<char>& ct)
     __X_ = __analyze('X', ct);
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 void
 __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
@@ -5571,7 +5571,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
         strftime_l(buf, countof(buf), "%A", &t, __loc_);
         mb = mbstate_t();
         const char* bb = buf;
-        size_t j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
+        size_t j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
         if (j == size_t(-1) || j == 0)
             __throw_runtime_error("locale not supported");
         wbe = wbuf + j;
@@ -5579,7 +5579,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
         strftime_l(buf, countof(buf), "%a", &t, __loc_);
         mb = mbstate_t();
         bb = buf;
-        j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
+        j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
         if (j == size_t(-1) || j == 0)
             __throw_runtime_error("locale not supported");
         wbe = wbuf + j;
@@ -5592,7 +5592,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
         strftime_l(buf, countof(buf), "%B", &t, __loc_);
         mb = mbstate_t();
         const char* bb = buf;
-        size_t j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
+        size_t j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
         if (j == size_t(-1) || j == 0)
             __throw_runtime_error("locale not supported");
         wbe = wbuf + j;
@@ -5600,7 +5600,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
         strftime_l(buf, countof(buf), "%b", &t, __loc_);
         mb = mbstate_t();
         bb = buf;
-        j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
+        j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
         if (j == size_t(-1) || j == 0)
             __throw_runtime_error("locale not supported");
         wbe = wbuf + j;
@@ -5611,7 +5611,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
     strftime_l(buf, countof(buf), "%p", &t, __loc_);
     mb = mbstate_t();
     const char* bb = buf;
-    size_t j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
+    size_t j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
     if (j == size_t(-1))
         __throw_runtime_error("locale not supported");
     wbe = wbuf + j;
@@ -5620,7 +5620,7 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
     strftime_l(buf, countof(buf), "%p", &t, __loc_);
     mb = mbstate_t();
     bb = buf;
-    j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
+    j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, __loc_);
     if (j == size_t(-1))
         __throw_runtime_error("locale not supported");
     wbe = wbuf + j;
@@ -5630,10 +5630,10 @@ __time_get_storage<wchar_t>::init(const ctype<wchar_t>& ct)
     __x_ = __analyze('x', ct);
     __X_ = __analyze('X', ct);
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 template <class CharT>
-struct _LIBCPP_HIDDEN __time_get_temp
+struct _LIBCUDACXX_HIDDEN __time_get_temp
     : public ctype_byname<CharT>
 {
     explicit __time_get_temp(const char* nm)
@@ -5658,7 +5658,7 @@ __time_get_storage<char>::__time_get_storage(const string& __nm)
     init(ct);
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 __time_get_storage<wchar_t>::__time_get_storage(const char* __nm)
     : __time_get(__nm)
@@ -5674,7 +5674,7 @@ __time_get_storage<wchar_t>::__time_get_storage(const string& __nm)
     const __time_get_temp<wchar_t> ct(__nm);
     init(ct);
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 template <>
 time_base::dateorder
@@ -5763,7 +5763,7 @@ __time_get_storage<char>::__do_date_order() const
     return time_base::no_order;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 time_base::dateorder
 __time_get_storage<wchar_t>::__do_date_order() const
@@ -5850,7 +5850,7 @@ __time_get_storage<wchar_t>::__do_date_order() const
     }
     return time_base::no_order;
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // time_put
 
@@ -5872,7 +5872,7 @@ __time_put::__time_put(const string& nm)
 
 __time_put::~__time_put()
 {
-    if (__loc_ != _LIBCPP_GET_C_LOCALE)
+    if (__loc_ != _LIBCUDACXX_GET_C_LOCALE)
         freelocale(__loc_);
 }
 
@@ -5887,7 +5887,7 @@ __time_put::__do_put(char* __nb, char*& __ne, const tm* __tm,
     __ne = __nb + n;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 void
 __time_put::__do_put(wchar_t* __wb, wchar_t*& __we, const tm* __tm,
                      char __fmt, char __mod) const
@@ -5897,12 +5897,12 @@ __time_put::__do_put(wchar_t* __wb, wchar_t*& __we, const tm* __tm,
     __do_put(__nar, __ne, __tm, __fmt, __mod);
     mbstate_t mb = {0};
     const char* __nb = __nar;
-    size_t j = __libcpp_mbsrtowcs_l(__wb, &__nb, countof(__wb, __we), &mb, __loc_);
+    size_t j = __LIBCUDACXX_mbsrtowcs_l(__wb, &__nb, countof(__wb, __we), &mb, __loc_);
     if (j == size_t(-1))
         __throw_runtime_error("locale not supported");
     __we = __wb + j;
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // moneypunct_byname
 
@@ -6283,12 +6283,12 @@ void
 moneypunct_byname<char, false>::init(const char* nm)
 {
     typedef moneypunct<char, false> base;
-    __libcpp_unique_locale loc(nm);
+    __LIBCUDACXX_unique_locale loc(nm);
     if (!loc)
         __throw_runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
 
-    lconv* lc = __libcpp_localeconv_l(loc.get());
+    lconv* lc = __LIBCUDACXX_localeconv_l(loc.get());
     if (!checked_string_to_char_convert(__decimal_point_,
                                         lc->mon_decimal_point,
                                         loc.get()))
@@ -6327,12 +6327,12 @@ void
 moneypunct_byname<char, true>::init(const char* nm)
 {
     typedef moneypunct<char, true> base;
-    __libcpp_unique_locale loc(nm);
+    __LIBCUDACXX_unique_locale loc(nm);
     if (!loc)
         __throw_runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
 
-    lconv* lc = __libcpp_localeconv_l(loc.get());
+    lconv* lc = __LIBCUDACXX_localeconv_l(loc.get());
     if (!checked_string_to_char_convert(__decimal_point_,
                                         lc->mon_decimal_point,
                                         loc.get()))
@@ -6347,19 +6347,19 @@ moneypunct_byname<char, true>::init(const char* nm)
         __frac_digits_ = lc->int_frac_digits;
     else
         __frac_digits_ = base::do_frac_digits();
-#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
+#if defined(_LIBCUDACXX_MSVCRT) || defined(__MINGW32__)
     if (lc->p_sign_posn == 0)
-#else // _LIBCPP_MSVCRT
+#else // _LIBCUDACXX_MSVCRT
     if (lc->int_p_sign_posn == 0)
-#endif // !_LIBCPP_MSVCRT
+#endif // !_LIBCUDACXX_MSVCRT
         __positive_sign_ = "()";
     else
         __positive_sign_ = lc->positive_sign;
-#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
+#if defined(_LIBCUDACXX_MSVCRT) || defined(__MINGW32__)
     if(lc->n_sign_posn == 0)
-#else // _LIBCPP_MSVCRT
+#else // _LIBCUDACXX_MSVCRT
     if (lc->int_n_sign_posn == 0)
-#endif // !_LIBCPP_MSVCRT
+#endif // !_LIBCUDACXX_MSVCRT
         __negative_sign_ = "()";
     else
         __negative_sign_ = lc->negative_sign;
@@ -6367,32 +6367,32 @@ moneypunct_byname<char, true>::init(const char* nm)
     // the same places in curr_symbol since there's no way to
     // represent anything else.
     string_type __dummy_curr_symbol = __curr_symbol_;
-#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
+#if defined(_LIBCUDACXX_MSVCRT) || defined(__MINGW32__)
     __init_pat(__pos_format_, __dummy_curr_symbol, true,
                lc->p_cs_precedes, lc->p_sep_by_space, lc->p_sign_posn, ' ');
     __init_pat(__neg_format_, __curr_symbol_, true,
                lc->n_cs_precedes, lc->n_sep_by_space, lc->n_sign_posn, ' ');
-#else // _LIBCPP_MSVCRT
+#else // _LIBCUDACXX_MSVCRT
     __init_pat(__pos_format_, __dummy_curr_symbol, true,
                lc->int_p_cs_precedes, lc->int_p_sep_by_space,
                lc->int_p_sign_posn, ' ');
     __init_pat(__neg_format_, __curr_symbol_, true,
                lc->int_n_cs_precedes, lc->int_n_sep_by_space,
                lc->int_n_sign_posn, ' ');
-#endif // !_LIBCPP_MSVCRT
+#endif // !_LIBCUDACXX_MSVCRT
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template<>
 void
 moneypunct_byname<wchar_t, false>::init(const char* nm)
 {
     typedef moneypunct<wchar_t, false> base;
-    __libcpp_unique_locale loc(nm);
+    __LIBCUDACXX_unique_locale loc(nm);
     if (!loc)
         __throw_runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
-    lconv* lc = __libcpp_localeconv_l(loc.get());
+    lconv* lc = __LIBCUDACXX_localeconv_l(loc.get());
     if (!checked_string_to_wchar_convert(__decimal_point_,
                                          lc->mon_decimal_point,
                                          loc.get()))
@@ -6405,7 +6405,7 @@ moneypunct_byname<wchar_t, false>::init(const char* nm)
     wchar_t wbuf[100];
     mbstate_t mb = {0};
     const char* bb = lc->currency_symbol;
-    size_t j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
+    size_t j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
     if (j == size_t(-1))
         __throw_runtime_error("locale not supported");
     wchar_t* wbe = wbuf + j;
@@ -6420,7 +6420,7 @@ moneypunct_byname<wchar_t, false>::init(const char* nm)
     {
         mb = mbstate_t();
         bb = lc->positive_sign;
-        j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
+        j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
         if (j == size_t(-1))
             __throw_runtime_error("locale not supported");
         wbe = wbuf + j;
@@ -6432,7 +6432,7 @@ moneypunct_byname<wchar_t, false>::init(const char* nm)
     {
         mb = mbstate_t();
         bb = lc->negative_sign;
-        j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
+        j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
         if (j == size_t(-1))
             __throw_runtime_error("locale not supported");
         wbe = wbuf + j;
@@ -6453,12 +6453,12 @@ void
 moneypunct_byname<wchar_t, true>::init(const char* nm)
 {
     typedef moneypunct<wchar_t, true> base;
-    __libcpp_unique_locale loc(nm);
+    __LIBCUDACXX_unique_locale loc(nm);
     if (!loc)
         __throw_runtime_error("moneypunct_byname"
                             " failed to construct for " + string(nm));
 
-    lconv* lc = __libcpp_localeconv_l(loc.get());
+    lconv* lc = __LIBCUDACXX_localeconv_l(loc.get());
     if (!checked_string_to_wchar_convert(__decimal_point_,
                                          lc->mon_decimal_point,
                                          loc.get()))
@@ -6471,7 +6471,7 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
     wchar_t wbuf[100];
     mbstate_t mb = {0};
     const char* bb = lc->int_curr_symbol;
-    size_t j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
+    size_t j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
     if (j == size_t(-1))
         __throw_runtime_error("locale not supported");
     wchar_t* wbe = wbuf + j;
@@ -6480,33 +6480,33 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
         __frac_digits_ = lc->int_frac_digits;
     else
         __frac_digits_ = base::do_frac_digits();
-#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
+#if defined(_LIBCUDACXX_MSVCRT) || defined(__MINGW32__)
     if (lc->p_sign_posn == 0)
-#else // _LIBCPP_MSVCRT
+#else // _LIBCUDACXX_MSVCRT
     if (lc->int_p_sign_posn == 0)
-#endif // !_LIBCPP_MSVCRT
+#endif // !_LIBCUDACXX_MSVCRT
         __positive_sign_ = L"()";
     else
     {
         mb = mbstate_t();
         bb = lc->positive_sign;
-        j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
+        j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
         if (j == size_t(-1))
             __throw_runtime_error("locale not supported");
         wbe = wbuf + j;
         __positive_sign_.assign(wbuf, wbe);
     }
-#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
+#if defined(_LIBCUDACXX_MSVCRT) || defined(__MINGW32__)
     if (lc->n_sign_posn == 0)
-#else // _LIBCPP_MSVCRT
+#else // _LIBCUDACXX_MSVCRT
     if (lc->int_n_sign_posn == 0)
-#endif // !_LIBCPP_MSVCRT
+#endif // !_LIBCUDACXX_MSVCRT
         __negative_sign_ = L"()";
     else
     {
         mb = mbstate_t();
         bb = lc->negative_sign;
-        j = __libcpp_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
+        j = __LIBCUDACXX_mbsrtowcs_l(wbuf, &bb, countof(wbuf), &mb, loc.get());
         if (j == size_t(-1))
             __throw_runtime_error("locale not supported");
         wbe = wbuf + j;
@@ -6516,98 +6516,98 @@ moneypunct_byname<wchar_t, true>::init(const char* nm)
     // the same places in curr_symbol since there's no way to
     // represent anything else.
     string_type __dummy_curr_symbol = __curr_symbol_;
-#if defined(_LIBCPP_MSVCRT) || defined(__MINGW32__)
+#if defined(_LIBCUDACXX_MSVCRT) || defined(__MINGW32__)
     __init_pat(__pos_format_, __dummy_curr_symbol, true,
                lc->p_cs_precedes, lc->p_sep_by_space, lc->p_sign_posn, L' ');
     __init_pat(__neg_format_, __curr_symbol_, true,
                lc->n_cs_precedes, lc->n_sep_by_space, lc->n_sign_posn, L' ');
-#else // _LIBCPP_MSVCRT
+#else // _LIBCUDACXX_MSVCRT
     __init_pat(__pos_format_, __dummy_curr_symbol, true,
                lc->int_p_cs_precedes, lc->int_p_sep_by_space,
                lc->int_p_sign_posn, L' ');
     __init_pat(__neg_format_, __curr_symbol_, true,
                lc->int_n_cs_precedes, lc->int_n_sep_by_space,
                lc->int_n_sign_posn, L' ');
-#endif // !_LIBCPP_MSVCRT
+#endif // !_LIBCUDACXX_MSVCRT
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 void __do_nothing(void*) {}
 
 void __throw_runtime_error(const char* msg)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw runtime_error(msg);
 #else
     (void)msg;
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS collate<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS collate<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS collate<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS collate<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS num_get<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS num_get<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS num_get<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS num_get<wchar_t>;)
 
-                           template struct _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __num_get<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template struct _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __num_get<wchar_t>;)
+                           template struct _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS __num_get<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template struct _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS __num_get<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS num_put<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS num_put<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS num_put<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS num_put<wchar_t>;)
 
-                           template struct _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __num_put<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template struct _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __num_put<wchar_t>;)
+                           template struct _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS __num_put<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template struct _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS __num_put<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_get<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_get<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS time_get<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS time_get<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_get_byname<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_get_byname<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS time_get_byname<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS time_get_byname<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_put<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_put<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS time_put<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS time_put<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_put_byname<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS time_put_byname<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS time_put_byname<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS time_put_byname<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<char, false>;
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<char, true>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<wchar_t, false>;)
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<wchar_t, true>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<char, false>;
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<char, true>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<wchar_t, false>;)
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct<wchar_t, true>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<char, false>;
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<char, true>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<wchar_t, false>;)
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<wchar_t, true>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<char, false>;
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<char, true>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<wchar_t, false>;)
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS moneypunct_byname<wchar_t, true>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS money_get<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS money_get<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS money_get<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS money_get<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __money_get<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __money_get<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS __money_get<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS __money_get<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS money_put<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS money_put<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS money_put<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS money_put<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __money_put<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS __money_put<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS __money_put<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS __money_put<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS messages<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS messages<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS messages<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS messages<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS messages_byname<char>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS messages_byname<wchar_t>;)
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS messages_byname<char>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS messages_byname<wchar_t>;)
 
-                           template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char, char, mbstate_t>;
-_LIBCPP_IF_WIDE_CHARACTERS(template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<wchar_t, char, mbstate_t>;)
-template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t, char, mbstate_t>;
-template class _LIBCPP_DEPRECATED_IN_CXX20 _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char32_t, char, mbstate_t>;
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t, char8_t, mbstate_t>;
-template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char32_t, char8_t, mbstate_t>;
+                           template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char, char, mbstate_t>;
+_LIBCUDACXX_IF_WIDE_CHARACTERS(template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<wchar_t, char, mbstate_t>;)
+template class _LIBCUDACXX_DEPRECATED_IN_CXX20 _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t, char, mbstate_t>;
+template class _LIBCUDACXX_DEPRECATED_IN_CXX20 _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char32_t, char, mbstate_t>;
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t, char8_t, mbstate_t>;
+template class _LIBCUDACXX_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char32_t, char8_t, mbstate_t>;
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS

diff  --git a/libcxx/src/memory.cpp b/libcxx/src/memory.cpp
index bf96efa9ce6d..02e6d9f6c96d 100644
--- a/libcxx/src/memory.cpp
+++ b/libcxx/src/memory.cpp
@@ -7,23 +7,23 @@
 //===----------------------------------------------------------------------===//
 
 #include <__config>
-#ifdef _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
-#   define _LIBCPP_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS
+#ifdef _LIBCUDACXX_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
+#   define _LIBCUDACXX_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS
 #endif
 
 #include <memory>
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 #  include <mutex>
 #  include <thread>
-#  if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
+#  if defined(__ELF__) && defined(_LIBCUDACXX_LINK_PTHREAD_LIB)
 #    pragma comment(lib, "pthread")
 #  endif
 #endif
 
 #include "include/atomic_support.h"
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 const allocator_arg_t allocator_arg = allocator_arg_t();
 
@@ -43,17 +43,17 @@ __shared_weak_count::~__shared_weak_count()
 {
 }
 
-#if defined(_LIBCPP_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS)
+#if defined(_LIBCUDACXX_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS)
 void
 __shared_count::__add_shared() noexcept
 {
-    __libcpp_atomic_refcount_increment(__shared_owners_);
+    __LIBCUDACXX_atomic_refcount_increment(__shared_owners_);
 }
 
 bool
 __shared_count::__release_shared() noexcept
 {
-    if (__libcpp_atomic_refcount_decrement(__shared_owners_) == -1)
+    if (__LIBCUDACXX_atomic_refcount_decrement(__shared_owners_) == -1)
     {
         __on_zero_shared();
         return true;
@@ -70,7 +70,7 @@ __shared_weak_count::__add_shared() noexcept
 void
 __shared_weak_count::__add_weak() noexcept
 {
-    __libcpp_atomic_refcount_increment(__shared_weak_owners_);
+    __LIBCUDACXX_atomic_refcount_increment(__shared_weak_owners_);
 }
 
 void
@@ -79,7 +79,7 @@ __shared_weak_count::__release_shared() noexcept
     if (__shared_count::__release_shared())
         __release_weak();
 }
-#endif // _LIBCPP_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS
+#endif // _LIBCUDACXX_SHARED_PTR_DEFINE_LEGACY_INLINE_FUNCTIONS
 
 void
 __shared_weak_count::__release_weak() noexcept
@@ -105,24 +105,24 @@ __shared_weak_count::__release_weak() noexcept
     // threads, and have them all get copied at once.  The argument
     // also doesn't apply for __release_shared, because an outstanding
     // weak_ptr::lock() could read / modify the shared count.
-    if (__libcpp_atomic_load(&__shared_weak_owners_, _AO_Acquire) == 0)
+    if (__LIBCUDACXX_atomic_load(&__shared_weak_owners_, _AO_Acquire) == 0)
     {
         // no need to do this store, because we are about
         // to destroy everything.
-        //__libcpp_atomic_store(&__shared_weak_owners_, -1, _AO_Release);
+        //__LIBCUDACXX_atomic_store(&__shared_weak_owners_, -1, _AO_Release);
         __on_zero_shared_weak();
     }
-    else if (__libcpp_atomic_refcount_decrement(__shared_weak_owners_) == -1)
+    else if (__LIBCUDACXX_atomic_refcount_decrement(__shared_weak_owners_) == -1)
         __on_zero_shared_weak();
 }
 
 __shared_weak_count*
 __shared_weak_count::lock() noexcept
 {
-    long object_owners = __libcpp_atomic_load(&__shared_owners_);
+    long object_owners = __LIBCUDACXX_atomic_load(&__shared_owners_);
     while (object_owners != -1)
     {
-        if (__libcpp_atomic_compare_exchange(&__shared_owners_,
+        if (__LIBCUDACXX_atomic_compare_exchange(&__shared_owners_,
                                              &object_owners,
                                              object_owners+1))
             return this;
@@ -136,22 +136,22 @@ __shared_weak_count::__get_deleter(const type_info&) const noexcept
     return nullptr;
 }
 
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 
 static constexpr std::size_t __sp_mut_count = 32;
-static constinit __libcpp_mutex_t mut_back[__sp_mut_count] =
-{
-    _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER,
-    _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER,
-    _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER,
-    _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER,
-    _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER,
-    _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER,
-    _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER,
-    _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER, _LIBCPP_MUTEX_INITIALIZER
+static constinit __LIBCUDACXX_mutex_t mut_back[__sp_mut_count] =
+{
+    _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER,
+    _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER,
+    _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER,
+    _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER,
+    _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER,
+    _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER,
+    _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER,
+    _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER, _LIBCUDACXX_MUTEX_INITIALIZER
 };
 
-_LIBCPP_CONSTEXPR __sp_mut::__sp_mut(void* p) noexcept
+_LIBCUDACXX_CONSTEXPR __sp_mut::__sp_mut(void* p) noexcept
    : __lx(p)
 {
 }
@@ -159,14 +159,14 @@ _LIBCPP_CONSTEXPR __sp_mut::__sp_mut(void* p) noexcept
 void
 __sp_mut::lock() noexcept
 {
-    auto m = static_cast<__libcpp_mutex_t*>(__lx);
-    __libcpp_mutex_lock(m);
+    auto m = static_cast<__LIBCUDACXX_mutex_t*>(__lx);
+    __LIBCUDACXX_mutex_lock(m);
 }
 
 void
 __sp_mut::unlock() noexcept
 {
-    __libcpp_mutex_unlock(static_cast<__libcpp_mutex_t*>(__lx));
+    __LIBCUDACXX_mutex_unlock(static_cast<__LIBCUDACXX_mutex_t*>(__lx));
 }
 
 __sp_mut&
@@ -185,7 +185,7 @@ __get_sp_mut(const void* p)
     return muts[hash<const void*>()(p) & (__sp_mut_count-1)];
 }
 
-#endif // !defined(_LIBCPP_HAS_NO_THREADS)
+#endif // !defined(_LIBCUDACXX_HAS_NO_THREADS)
 
 void*
 align(size_t alignment, size_t size, void*& ptr, size_t& space)
@@ -206,4 +206,4 @@ align(size_t alignment, size_t size, void*& ptr, size_t& space)
     return r;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/mutex.cpp b/libcxx/src/mutex.cpp
index 01b7420fa3b8..bf667b72b8bf 100644
--- a/libcxx/src/mutex.cpp
+++ b/libcxx/src/mutex.cpp
@@ -13,18 +13,18 @@
 
 #include "include/atomic_support.h"
 
-#ifndef _LIBCPP_HAS_NO_THREADS
-#  if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
+#  if defined(__ELF__) && defined(_LIBCUDACXX_LINK_PTHREAD_LIB)
 #    pragma comment(lib, "pthread")
 #  endif
 #endif
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 
 const defer_lock_t  defer_lock{};
 const try_to_lock_t try_to_lock{};
@@ -35,7 +35,7 @@ const adopt_lock_t  adopt_lock{};
 void
 mutex::lock()
 {
-    int ec = __libcpp_mutex_lock(&__m_);
+    int ec = __LIBCUDACXX_mutex_lock(&__m_);
     if (ec)
         __throw_system_error(ec, "mutex lock failed");
 }
@@ -43,37 +43,37 @@ mutex::lock()
 bool
 mutex::try_lock() noexcept
 {
-    return __libcpp_mutex_trylock(&__m_);
+    return __LIBCUDACXX_mutex_trylock(&__m_);
 }
 
 void
 mutex::unlock() noexcept
 {
-    int ec = __libcpp_mutex_unlock(&__m_);
+    int ec = __LIBCUDACXX_mutex_unlock(&__m_);
     (void)ec;
-    _LIBCPP_ASSERT(ec == 0, "call to mutex::unlock failed");
+    _LIBCUDACXX_ASSERT(ec == 0, "call to mutex::unlock failed");
 }
 
 // recursive_mutex
 
 recursive_mutex::recursive_mutex()
 {
-    int ec = __libcpp_recursive_mutex_init(&__m_);
+    int ec = __LIBCUDACXX_recursive_mutex_init(&__m_);
     if (ec)
         __throw_system_error(ec, "recursive_mutex constructor failed");
 }
 
 recursive_mutex::~recursive_mutex()
 {
-    int e = __libcpp_recursive_mutex_destroy(&__m_);
+    int e = __LIBCUDACXX_recursive_mutex_destroy(&__m_);
     (void)e;
-    _LIBCPP_ASSERT(e == 0, "call to ~recursive_mutex() failed");
+    _LIBCUDACXX_ASSERT(e == 0, "call to ~recursive_mutex() failed");
 }
 
 void
 recursive_mutex::lock()
 {
-    int ec = __libcpp_recursive_mutex_lock(&__m_);
+    int ec = __LIBCUDACXX_recursive_mutex_lock(&__m_);
     if (ec)
         __throw_system_error(ec, "recursive_mutex lock failed");
 }
@@ -81,15 +81,15 @@ recursive_mutex::lock()
 void
 recursive_mutex::unlock() noexcept
 {
-    int e = __libcpp_recursive_mutex_unlock(&__m_);
+    int e = __LIBCUDACXX_recursive_mutex_unlock(&__m_);
     (void)e;
-    _LIBCPP_ASSERT(e == 0, "call to recursive_mutex::unlock() failed");
+    _LIBCUDACXX_ASSERT(e == 0, "call to recursive_mutex::unlock() failed");
 }
 
 bool
 recursive_mutex::try_lock() noexcept
 {
-    return __libcpp_recursive_mutex_trylock(&__m_);
+    return __LIBCUDACXX_recursive_mutex_trylock(&__m_);
 }
 
 // timed_mutex
@@ -192,7 +192,7 @@ recursive_timed_mutex::unlock() noexcept
     }
 }
 
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // !_LIBCUDACXX_HAS_NO_THREADS
 
 // If dispatch_once_f ever handles C++ exceptions, and if one can get to it
 // without illegal macros (unexpected macros not beginning with _UpperCase or
@@ -200,68 +200,68 @@ recursive_timed_mutex::unlock() noexcept
 // call into dispatch_once_f instead of here. Relevant radar this code needs to
 // keep in sync with:  7741191.
 
-#ifndef _LIBCPP_HAS_NO_THREADS
-static constinit __libcpp_mutex_t mut = _LIBCPP_MUTEX_INITIALIZER;
-static constinit __libcpp_condvar_t cv = _LIBCPP_CONDVAR_INITIALIZER;
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
+static constinit __LIBCUDACXX_mutex_t mut = _LIBCUDACXX_MUTEX_INITIALIZER;
+static constinit __LIBCUDACXX_condvar_t cv = _LIBCUDACXX_CONDVAR_INITIALIZER;
 #endif
 
 void __call_once(volatile once_flag::_State_type& flag, void* arg,
                  void (*func)(void*))
 {
-#if defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(_LIBCUDACXX_HAS_NO_THREADS)
     if (flag == 0)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
             flag = 1;
             func(arg);
             flag = ~once_flag::_State_type(0);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
             flag = 0;
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
-#else // !_LIBCPP_HAS_NO_THREADS
-    __libcpp_mutex_lock(&mut);
+#else // !_LIBCUDACXX_HAS_NO_THREADS
+    __LIBCUDACXX_mutex_lock(&mut);
     while (flag == 1)
-        __libcpp_condvar_wait(&cv, &mut);
+        __LIBCUDACXX_condvar_wait(&cv, &mut);
     if (flag == 0)
     {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         try
         {
-#endif // _LIBCPP_NO_EXCEPTIONS
-            __libcpp_relaxed_store(&flag, once_flag::_State_type(1));
-            __libcpp_mutex_unlock(&mut);
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
+            __LIBCUDACXX_relaxed_store(&flag, once_flag::_State_type(1));
+            __LIBCUDACXX_mutex_unlock(&mut);
             func(arg);
-            __libcpp_mutex_lock(&mut);
-            __libcpp_atomic_store(&flag, ~once_flag::_State_type(0),
+            __LIBCUDACXX_mutex_lock(&mut);
+            __LIBCUDACXX_atomic_store(&flag, ~once_flag::_State_type(0),
                                   _AO_Release);
-            __libcpp_mutex_unlock(&mut);
-            __libcpp_condvar_broadcast(&cv);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+            __LIBCUDACXX_mutex_unlock(&mut);
+            __LIBCUDACXX_condvar_broadcast(&cv);
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
         }
         catch (...)
         {
-            __libcpp_mutex_lock(&mut);
-            __libcpp_relaxed_store(&flag, once_flag::_State_type(0));
-            __libcpp_mutex_unlock(&mut);
-            __libcpp_condvar_broadcast(&cv);
+            __LIBCUDACXX_mutex_lock(&mut);
+            __LIBCUDACXX_relaxed_store(&flag, once_flag::_State_type(0));
+            __LIBCUDACXX_mutex_unlock(&mut);
+            __LIBCUDACXX_condvar_broadcast(&cv);
             throw;
         }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     }
     else
-        __libcpp_mutex_unlock(&mut);
-#endif // !_LIBCPP_HAS_NO_THREADS
+        __LIBCUDACXX_mutex_unlock(&mut);
+#endif // !_LIBCUDACXX_HAS_NO_THREADS
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS

diff  --git a/libcxx/src/mutex_destructor.cpp b/libcxx/src/mutex_destructor.cpp
index 6850b6e6f495..2022bd46a382 100644
--- a/libcxx/src/mutex_destructor.cpp
+++ b/libcxx/src/mutex_destructor.cpp
@@ -14,26 +14,26 @@
 // In order to avoid ODR violations within libc++ itself, we need to ensure
 // that *nothing* sees the non-trivial mutex declaration. For this reason
 // we re-declare the entire class in this file instead of using
-// _LIBCPP_BUILDING_LIBRARY to change the definition in the headers.
+// _LIBCUDACXX_BUILDING_LIBRARY to change the definition in the headers.
 
 #include <__config>
 #include <__threading_support>
 
-#if !defined(_LIBCPP_HAS_NO_THREADS)
-#  if _LIBCPP_ABI_VERSION == 1 || !defined(_LIBCPP_HAS_TRIVIAL_MUTEX_DESTRUCTION)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
+#  if _LIBCUDACXX_ABI_VERSION == 1 || !defined(_LIBCUDACXX_HAS_TRIVIAL_MUTEX_DESTRUCTION)
 #    define NEEDS_MUTEX_DESTRUCTOR
 #  endif
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 #ifdef NEEDS_MUTEX_DESTRUCTOR
-class _LIBCPP_TYPE_VIS mutex
+class _LIBCUDACXX_TYPE_VIS mutex
 {
-    __libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER;
+    __LIBCUDACXX_mutex_t __m_ = _LIBCUDACXX_MUTEX_INITIALIZER;
 
 public:
-    _LIBCPP_ALWAYS_INLINE _LIBCPP_INLINE_VISIBILITY
+    _LIBCUDACXX_ALWAYS_INLINE _LIBCUDACXX_INLINE_VISIBILITY
     constexpr mutex() = default;
     mutex(const mutex&) = delete;
     mutex& operator=(const mutex&) = delete;
@@ -43,8 +43,8 @@ class _LIBCPP_TYPE_VIS mutex
 
 mutex::~mutex() noexcept
 {
-    __libcpp_mutex_destroy(&__m_);
+    __LIBCUDACXX_mutex_destroy(&__m_);
 }
 
-#endif // !_LIBCPP_HAS_NO_THREADS
-_LIBCPP_END_NAMESPACE_STD
+#endif // !_LIBCUDACXX_HAS_NO_THREADS
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/new.cpp b/libcxx/src/new.cpp
index 48d6f997fdda..2b5df81aaf0c 100644
--- a/libcxx/src/new.cpp
+++ b/libcxx/src/new.cpp
@@ -11,8 +11,8 @@
 
 #include "include/atomic_support.h"
 
-#if defined(_LIBCPP_ABI_MICROSOFT)
-#   if !defined(_LIBCPP_ABI_VCRUNTIME)
+#if defined(_LIBCUDACXX_ABI_MICROSOFT)
+#   if !defined(_LIBCUDACXX_ABI_VCRUNTIME)
 #       include "support/runtime/new_handler_fallback.ipp"
 #   endif
 #elif defined(LIBCXX_BUILDING_LIBCXXABI)
@@ -38,10 +38,10 @@ const nothrow_t nothrow{};
 void
 __throw_bad_alloc()
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw bad_alloc();
 #else
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
@@ -50,14 +50,14 @@ __throw_bad_alloc()
 }  // std
 
 #if !defined(__GLIBCXX__) &&                                                   \
-    !defined(_LIBCPP_ABI_VCRUNTIME) &&      \
-    !defined(_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS)
+    !defined(_LIBCUDACXX_ABI_VCRUNTIME) &&      \
+    !defined(_LIBCUDACXX_DISABLE_NEW_DELETE_DEFINITIONS)
 
 // Implement all new and delete operators as weak definitions
 // in this shared library, so that they can be overridden by programs
 // that define non-weak copies of the functions.
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void *
 operator new(std::size_t size) _THROW_BAD_ALLOC
 {
@@ -72,7 +72,7 @@ operator new(std::size_t size) _THROW_BAD_ALLOC
         if (nh)
             nh();
         else
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
             throw std::bad_alloc();
 #else
             break;
@@ -81,96 +81,96 @@ operator new(std::size_t size) _THROW_BAD_ALLOC
     return p;
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void*
 operator new(size_t size, const std::nothrow_t&) noexcept
 {
     void* p = nullptr;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         p = ::operator new(size);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return p;
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void*
 operator new[](size_t size) _THROW_BAD_ALLOC
 {
     return ::operator new(size);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void*
 operator new[](size_t size, const std::nothrow_t&) noexcept
 {
     void* p = nullptr;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         p = ::operator new[](size);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return p;
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete(void* ptr) noexcept
 {
     ::free(ptr);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete(void* ptr, const std::nothrow_t&) noexcept
 {
     ::operator delete(ptr);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete(void* ptr, size_t) noexcept
 {
     ::operator delete(ptr);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete[] (void* ptr) noexcept
 {
     ::operator delete(ptr);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete[] (void* ptr, const std::nothrow_t&) noexcept
 {
     ::operator delete[](ptr);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete[] (void* ptr, size_t) noexcept
 {
     ::operator delete[](ptr);
 }
 
-#if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void *
 operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC
 {
@@ -186,13 +186,13 @@ operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC
     // If allocation fails and there is no new_handler, we throw bad_alloc
     // (or return nullptr if exceptions are disabled).
     void* p;
-    while ((p = std::__libcpp_aligned_alloc(static_cast<std::size_t>(alignment), size)) == nullptr)
+    while ((p = std::__LIBCUDACXX_aligned_alloc(static_cast<std::size_t>(alignment), size)) == nullptr)
     {
         std::new_handler nh = std::get_new_handler();
         if (nh)
             nh();
         else {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
             throw std::bad_alloc();
 #else
             break;
@@ -202,92 +202,92 @@ operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC
     return p;
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void*
 operator new(size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept
 {
     void* p = nullptr;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         p = ::operator new(size, alignment);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return p;
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void*
 operator new[](size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC
 {
     return ::operator new(size, alignment);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void*
 operator new[](size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept
 {
     void* p = nullptr;
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         p = ::operator new[](size, alignment);
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
     return p;
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete(void* ptr, std::align_val_t) noexcept
 {
-    std::__libcpp_aligned_free(ptr);
+    std::__LIBCUDACXX_aligned_free(ptr);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete(void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept
 {
     ::operator delete(ptr, alignment);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete(void* ptr, size_t, std::align_val_t alignment) noexcept
 {
     ::operator delete(ptr, alignment);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete[] (void* ptr, std::align_val_t alignment) noexcept
 {
     ::operator delete(ptr, alignment);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete[] (void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept
 {
     ::operator delete[](ptr, alignment);
 }
 
-_LIBCPP_WEAK
+_LIBCUDACXX_WEAK
 void
 operator delete[] (void* ptr, size_t, std::align_val_t alignment) noexcept
 {
     ::operator delete[](ptr, alignment);
 }
 
-#endif // !_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
-#endif // !__GLIBCXX__ && !_LIBCPP_ABI_VCRUNTIME && !_LIBCPP_DISABLE_NEW_DELETE_DEFINITIONS
+#endif // !_LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
+#endif // !__GLIBCXX__ && !_LIBCUDACXX_ABI_VCRUNTIME && !_LIBCUDACXX_DISABLE_NEW_DELETE_DEFINITIONS

diff  --git a/libcxx/src/optional.cpp b/libcxx/src/optional.cpp
index ac1a0a5b5e88..4bfad5e77540 100644
--- a/libcxx/src/optional.cpp
+++ b/libcxx/src/optional.cpp
@@ -25,9 +25,9 @@ const char* bad_optional_access::what() const noexcept {
 
 //  Preserve std::experimental::bad_optional_access for ABI compatibility
 //  Even though it no longer exists in a header file
-_LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL
+_LIBCUDACXX_BEGIN_NAMESPACE_EXPERIMENTAL
 
-class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
+class _LIBCUDACXX_EXCEPTION_ABI _LIBCUDACXX_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optional_access
     : public std::logic_error
 {
 public:
@@ -39,4 +39,4 @@ class _LIBCPP_EXCEPTION_ABI _LIBCPP_AVAILABILITY_BAD_OPTIONAL_ACCESS bad_optiona
 
 bad_optional_access::~bad_optional_access() noexcept = default;
 
-_LIBCPP_END_NAMESPACE_EXPERIMENTAL
+_LIBCUDACXX_END_NAMESPACE_EXPERIMENTAL

diff  --git a/libcxx/src/random.cpp b/libcxx/src/random.cpp
index 38732462cf5d..601799f3f5b6 100644
--- a/libcxx/src/random.cpp
+++ b/libcxx/src/random.cpp
@@ -8,10 +8,10 @@
 
 #include <__config>
 
-#if defined(_LIBCPP_USING_WIN32_RANDOM)
+#if defined(_LIBCUDACXX_USING_WIN32_RANDOM)
     // Must be defined before including stdlib.h to enable rand_s().
 #   define _CRT_RAND_S
-#endif // defined(_LIBCPP_USING_WIN32_RANDOM)
+#endif // defined(_LIBCUDACXX_USING_WIN32_RANDOM)
 
 #include <limits>
 #include <random>
@@ -25,25 +25,25 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-#if defined(_LIBCPP_USING_GETENTROPY)
+#if defined(_LIBCUDACXX_USING_GETENTROPY)
 #   include <sys/random.h>
-#elif defined(_LIBCPP_USING_DEV_RANDOM)
+#elif defined(_LIBCUDACXX_USING_DEV_RANDOM)
 #   include <fcntl.h>
 #   include <unistd.h>
 #   if __has_include(<sys/ioctl.h>) && __has_include(<linux/random.h>)
 #       include <sys/ioctl.h>
 #       include <linux/random.h>
 #   endif
-#elif defined(_LIBCPP_USING_NACL_RANDOM)
+#elif defined(_LIBCUDACXX_USING_NACL_RANDOM)
 #   include <nacl/nacl_random.h>
-#elif defined(_LIBCPP_USING_FUCHSIA_CPRNG)
+#elif defined(_LIBCUDACXX_USING_FUCHSIA_CPRNG)
 #  include <zircon/syscalls.h>
 #endif
 
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if defined(_LIBCPP_USING_GETENTROPY)
+#if defined(_LIBCUDACXX_USING_GETENTROPY)
 
 random_device::random_device(const string& __token)
 {
@@ -66,7 +66,7 @@ random_device::operator()()
     return r;
 }
 
-#elif defined(_LIBCPP_USING_ARC4_RANDOM)
+#elif defined(_LIBCUDACXX_USING_ARC4_RANDOM)
 
 random_device::random_device(const string&)
 {
@@ -82,7 +82,7 @@ random_device::operator()()
     return arc4random();
 }
 
-#elif defined(_LIBCPP_USING_DEV_RANDOM)
+#elif defined(_LIBCUDACXX_USING_DEV_RANDOM)
 
 random_device::random_device(const string& __token)
     : __f_(open(__token.c_str(), O_RDONLY))
@@ -119,7 +119,7 @@ random_device::operator()()
     return r;
 }
 
-#elif defined(_LIBCPP_USING_NACL_RANDOM)
+#elif defined(_LIBCUDACXX_USING_NACL_RANDOM)
 
 random_device::random_device(const string& __token)
 {
@@ -148,7 +148,7 @@ random_device::operator()()
     return r;
 }
 
-#elif defined(_LIBCPP_USING_WIN32_RANDOM)
+#elif defined(_LIBCUDACXX_USING_WIN32_RANDOM)
 
 random_device::random_device(const string& __token)
 {
@@ -170,7 +170,7 @@ random_device::operator()()
     return r;
 }
 
-#elif defined(_LIBCPP_USING_FUCHSIA_CPRNG)
+#elif defined(_LIBCUDACXX_USING_FUCHSIA_CPRNG)
 
 random_device::random_device(const string& __token) {
   if (__token != "/dev/urandom")
@@ -198,7 +198,7 @@ unsigned random_device::operator()() {
 double
 random_device::entropy() const noexcept
 {
-#if defined(_LIBCPP_USING_DEV_RANDOM) && defined(RNDGETENTCNT)
+#if defined(_LIBCUDACXX_USING_DEV_RANDOM) && defined(RNDGETENTCNT)
   int ent;
   if (::ioctl(__f_, RNDGETENTCNT, &ent) < 0)
     return 0;
@@ -210,11 +210,11 @@ random_device::entropy() const noexcept
     return std::numeric_limits<result_type>::digits;
 
   return ent;
-#elif defined(_LIBCPP_USING_ARC4_RANDOM) || defined(_LIBCPP_USING_FUCHSIA_CPRNG)
+#elif defined(_LIBCUDACXX_USING_ARC4_RANDOM) || defined(_LIBCUDACXX_USING_FUCHSIA_CPRNG)
   return std::numeric_limits<result_type>::digits;
 #else
   return 0;
 #endif
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/random_shuffle.cpp b/libcxx/src/random_shuffle.cpp
index e9087a97014f..2cf94f474af2 100644
--- a/libcxx/src/random_shuffle.cpp
+++ b/libcxx/src/random_shuffle.cpp
@@ -9,24 +9,24 @@
 #include <algorithm>
 #include <random>
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 #  include <mutex>
-#  if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
+#  if defined(__ELF__) && defined(_LIBCUDACXX_LINK_PTHREAD_LIB)
 #    pragma comment(lib, "pthread")
 #  endif
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_HAS_NO_THREADS
-static constinit __libcpp_mutex_t __rs_mut = _LIBCPP_MUTEX_INITIALIZER;
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
+static constinit __LIBCUDACXX_mutex_t __rs_mut = _LIBCUDACXX_MUTEX_INITIALIZER;
 #endif
 unsigned __rs_default::__c_ = 0;
 
 __rs_default::__rs_default()
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
-    __libcpp_mutex_lock(&__rs_mut);
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
+    __LIBCUDACXX_mutex_lock(&__rs_mut);
 #endif
     __c_ = 1;
 }
@@ -38,9 +38,9 @@ __rs_default::__rs_default(const __rs_default&)
 
 __rs_default::~__rs_default()
 {
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
     if (--__c_ == 0)
-       __libcpp_mutex_unlock(&__rs_mut);
+       __LIBCUDACXX_mutex_unlock(&__rs_mut);
 #else
     --__c_;
 #endif
@@ -59,4 +59,4 @@ __rs_get()
     return __rs_default();
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/regex.cpp b/libcxx/src/regex.cpp
index e53d32418690..2865167f448f 100644
--- a/libcxx/src/regex.cpp
+++ b/libcxx/src/regex.cpp
@@ -10,7 +10,7 @@
 #include <iterator>
 #include <regex>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 static
 const char*
@@ -350,7 +350,7 @@ string
 __get_collation_name(const char* s)
 {
     const collationnames* i =
-            _VSTD::lower_bound(begin(collatenames), end(collatenames), s, use_strcmp());
+            _CUDA_VSTD::lower_bound(begin(collatenames), end(collatenames), s, use_strcmp());
     string r;
     if (i != end(collatenames) && strcmp(s, i->elem_) == 0)
         r = char(i->char_);
@@ -361,7 +361,7 @@ regex_traits<char>::char_class_type
 __get_classname(const char* s, bool __icase)
 {
     const classnames* i =
-            _VSTD::lower_bound(begin(ClassNames), end(ClassNames), s, use_strcmp());
+            _CUDA_VSTD::lower_bound(begin(ClassNames), end(ClassNames), s, use_strcmp());
     regex_traits<char>::char_class_type r = 0;
     if (i != end(ClassNames) && strcmp(s, i->elem_) == 0)
     {
@@ -433,4 +433,4 @@ __match_any_but_newline<wchar_t>::__exec(__state& __s) const
     }
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/ryu/d2fixed.cpp b/libcxx/src/ryu/d2fixed.cpp
index c1a1f6cf9e05..aa323187fe58 100644
--- a/libcxx/src/ryu/d2fixed.cpp
+++ b/libcxx/src/ryu/d2fixed.cpp
@@ -52,13 +52,13 @@
 #include "include/ryu/d2s_intrinsics.h"
 #include "include/ryu/digit_table.h"
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 inline constexpr int __POW10_ADDITIONAL_BITS = 120;
 
-#ifdef _LIBCPP_INTRINSIC128
+#ifdef _LIBCUDACXX_INTRINSIC128
 // Returns the low 64 bits of the high 128 bits of the 256-bit product of a and b.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __umul256_hi128_lo64(
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __umul256_hi128_lo64(
   const uint64_t __aHi, const uint64_t __aLo, const uint64_t __bHi, const uint64_t __bLo) {
   uint64_t __b00Hi;
   const uint64_t __b00Lo = __ryu_umul128(__aLo, __bLo, &__b00Hi);
@@ -77,7 +77,7 @@ inline constexpr int __POW10_ADDITIONAL_BITS = 120;
   return __b11Lo + __temp1Hi + __temp2Hi;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __uint128_mod1e9(const uint64_t __vHi, const uint64_t __vLo) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __uint128_mod1e9(const uint64_t __vHi, const uint64_t __vLo) {
   // After multiplying, we're going to shift right by 29, then truncate to uint32_t.
   // This means that we need only 29 + 32 = 61 bits, so we can truncate to uint64_t before shifting.
   const uint64_t __multiplied = __umul256_hi128_lo64(__vHi, __vLo, 0x89705F4136B4A597u, 0x31680A88F8953031u);
@@ -89,7 +89,7 @@ inline constexpr int __POW10_ADDITIONAL_BITS = 120;
 }
 #endif // ^^^ intrinsics available ^^^
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __mulShift_mod1e9(const uint64_t __m, const uint64_t* const __mul, const int32_t __j) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __mulShift_mod1e9(const uint64_t __m, const uint64_t* const __mul, const int32_t __j) {
   uint64_t __high0;                                               // 64
   const uint64_t __low0 = __ryu_umul128(__m, __mul[0], &__high0); // 0
   uint64_t __high1;                                               // 128
@@ -103,9 +103,9 @@ inline constexpr int __POW10_ADDITIONAL_BITS = 120;
   const uint64_t __s1low = __low2 + __high1 + __c1; // 128
   const uint32_t __c2 = __s1low < __low2; // __high1 + __c1 can't overflow, so compare against __low2
   const uint64_t __s1high = __high2 + __c2;         // 192
-  _LIBCPP_ASSERT(__j >= 128, "");
-  _LIBCPP_ASSERT(__j <= 180, "");
-#ifdef _LIBCPP_INTRINSIC128
+  _LIBCUDACXX_ASSERT(__j >= 128, "");
+  _LIBCUDACXX_ASSERT(__j <= 180, "");
+#ifdef _LIBCUDACXX_INTRINSIC128
   const uint32_t __dist = static_cast<uint32_t>(__j - 128); // __dist: [0, 52]
   const uint64_t __shiftedhigh = __s1high >> __dist;
   const uint64_t __shiftedlow = __ryu_shiftright128(__s1low, __s1high, __dist);
@@ -135,25 +135,25 @@ void __append_n_digits(const uint32_t __olength, uint32_t __digits, char* const
     __digits /= 10000;
     const uint32_t __c0 = (__c % 100) << 1;
     const uint32_t __c1 = (__c / 100) << 1;
-    _VSTD::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c0, 2);
-    _VSTD::memcpy(__result + __olength - __i - 4, __DIGIT_TABLE + __c1, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c0, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 4, __DIGIT_TABLE + __c1, 2);
     __i += 4;
   }
   if (__digits >= 100) {
     const uint32_t __c = (__digits % 100) << 1;
     __digits /= 100;
-    _VSTD::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c, 2);
     __i += 2;
   }
   if (__digits >= 10) {
     const uint32_t __c = __digits << 1;
-    _VSTD::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 2, __DIGIT_TABLE + __c, 2);
   } else {
     __result[0] = static_cast<char>('0' + __digits);
   }
 }
 
-_LIBCPP_HIDE_FROM_ABI inline void __append_d_digits(const uint32_t __olength, uint32_t __digits, char* const __result) {
+_LIBCUDACXX_HIDE_FROM_ABI inline void __append_d_digits(const uint32_t __olength, uint32_t __digits, char* const __result) {
   uint32_t __i = 0;
   while (__digits >= 10000) {
 #ifdef __clang__ // TRANSITION, LLVM-38217
@@ -164,14 +164,14 @@ _LIBCPP_HIDE_FROM_ABI inline void __append_d_digits(const uint32_t __olength, ui
     __digits /= 10000;
     const uint32_t __c0 = (__c % 100) << 1;
     const uint32_t __c1 = (__c / 100) << 1;
-    _VSTD::memcpy(__result + __olength + 1 - __i - 2, __DIGIT_TABLE + __c0, 2);
-    _VSTD::memcpy(__result + __olength + 1 - __i - 4, __DIGIT_TABLE + __c1, 2);
+    _CUDA_VSTD::memcpy(__result + __olength + 1 - __i - 2, __DIGIT_TABLE + __c0, 2);
+    _CUDA_VSTD::memcpy(__result + __olength + 1 - __i - 4, __DIGIT_TABLE + __c1, 2);
     __i += 4;
   }
   if (__digits >= 100) {
     const uint32_t __c = (__digits % 100) << 1;
     __digits /= 100;
-    _VSTD::memcpy(__result + __olength + 1 - __i - 2, __DIGIT_TABLE + __c, 2);
+    _CUDA_VSTD::memcpy(__result + __olength + 1 - __i - 2, __DIGIT_TABLE + __c, 2);
     __i += 2;
   }
   if (__digits >= 10) {
@@ -185,12 +185,12 @@ _LIBCPP_HIDE_FROM_ABI inline void __append_d_digits(const uint32_t __olength, ui
   }
 }
 
-_LIBCPP_HIDE_FROM_ABI inline void __append_c_digits(const uint32_t __count, uint32_t __digits, char* const __result) {
+_LIBCUDACXX_HIDE_FROM_ABI inline void __append_c_digits(const uint32_t __count, uint32_t __digits, char* const __result) {
   uint32_t __i = 0;
   for (; __i < __count - 1; __i += 2) {
     const uint32_t __c = (__digits % 100) << 1;
     __digits /= 100;
-    _VSTD::memcpy(__result + __count - __i - 2, __DIGIT_TABLE + __c, 2);
+    _CUDA_VSTD::memcpy(__result + __count - __i - 2, __DIGIT_TABLE + __c, 2);
   }
   if (__i < __count) {
     const char __c = static_cast<char>('0' + (__digits % 10));
@@ -200,7 +200,7 @@ _LIBCPP_HIDE_FROM_ABI inline void __append_c_digits(const uint32_t __count, uint
 
 void __append_nine_digits(uint32_t __digits, char* const __result) {
   if (__digits == 0) {
-    _VSTD::memset(__result, '0', 9);
+    _CUDA_VSTD::memset(__result, '0', 9);
     return;
   }
 
@@ -213,21 +213,21 @@ void __append_nine_digits(uint32_t __digits, char* const __result) {
     __digits /= 10000;
     const uint32_t __c0 = (__c % 100) << 1;
     const uint32_t __c1 = (__c / 100) << 1;
-    _VSTD::memcpy(__result + 7 - __i, __DIGIT_TABLE + __c0, 2);
-    _VSTD::memcpy(__result + 5 - __i, __DIGIT_TABLE + __c1, 2);
+    _CUDA_VSTD::memcpy(__result + 7 - __i, __DIGIT_TABLE + __c0, 2);
+    _CUDA_VSTD::memcpy(__result + 5 - __i, __DIGIT_TABLE + __c1, 2);
   }
   __result[0] = static_cast<char>('0' + __digits);
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __indexForExponent(const uint32_t __e) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __indexForExponent(const uint32_t __e) {
   return (__e + 15) / 16;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __pow10BitsForIndex(const uint32_t __idx) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __pow10BitsForIndex(const uint32_t __idx) {
   return 16 * __idx + __POW10_ADDITIONAL_BITS;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __lengthForIndex(const uint32_t __idx) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __lengthForIndex(const uint32_t __idx) {
   // +1 for ceil, +16 for mantissa, +8 to round up when dividing by 9
   return (__log10Pow2(16 * static_cast<int32_t>(__idx)) + 1 + 16 + 8) / 9;
 }
@@ -251,7 +251,7 @@ void __append_nine_digits(uint32_t __digits, char* const __result) {
     *_First++ = '0';
     if (__precision > 0) {
       *_First++ = '.';
-      _VSTD::memset(_First, '0', __precision);
+      _CUDA_VSTD::memset(_First, '0', __precision);
       _First += __precision;
     }
     return { _First, errc{} };
@@ -322,14 +322,14 @@ void __append_nine_digits(uint32_t __digits, char* const __result) {
       if (_Last - _First < static_cast<ptr
diff _t>(__precision)) {
         return { _Last, errc::value_too_large };
       }
-      _VSTD::memset(_First, '0', __precision);
+      _CUDA_VSTD::memset(_First, '0', __precision);
       _First += __precision;
     } else if (__i < __MIN_BLOCK_2[__idx]) {
       __i = __MIN_BLOCK_2[__idx];
       if (_Last - _First < static_cast<ptr
diff _t>(9 * __i)) {
         return { _Last, errc::value_too_large };
       }
-      _VSTD::memset(_First, '0', 9 * __i);
+      _CUDA_VSTD::memset(_First, '0', 9 * __i);
       _First += 9 * __i;
     }
     for (; __i < __blocks; ++__i) {
@@ -342,7 +342,7 @@ void __append_nine_digits(uint32_t __digits, char* const __result) {
         if (_Last - _First < static_cast<ptr
diff _t>(__fill)) {
           return { _Last, errc::value_too_large };
         }
-        _VSTD::memset(_First, '0', __fill);
+        _CUDA_VSTD::memset(_First, '0', __fill);
         _First += __fill;
         break;
       }
@@ -416,7 +416,7 @@ void __append_nine_digits(uint32_t __digits, char* const __result) {
     if (_Last - _First < static_cast<ptr
diff _t>(__precision)) {
       return { _Last, errc::value_too_large };
     }
-    _VSTD::memset(_First, '0', __precision);
+    _CUDA_VSTD::memset(_First, '0', __precision);
     _First += __precision;
   }
   return { _First, errc{} };
@@ -440,10 +440,10 @@ void __append_nine_digits(uint32_t __digits, char* const __result) {
     *_First++ = '0';
     if (__precision > 0) {
       *_First++ = '.';
-      _VSTD::memset(_First, '0', __precision);
+      _CUDA_VSTD::memset(_First, '0', __precision);
       _First += __precision;
     }
-    _VSTD::memcpy(_First, "e+00", 4);
+    _CUDA_VSTD::memcpy(_First, "e+00", 4);
     _First += 4;
     return { _First, errc{} };
   }
@@ -589,7 +589,7 @@ void __append_nine_digits(uint32_t __digits, char* const __result) {
       return { _Last, errc::value_too_large };
     }
     if (__digits == 0) {
-      _VSTD::memset(_First, '0', __maximum);
+      _CUDA_VSTD::memset(_First, '0', __maximum);
     } else {
       __append_c_digits(__maximum, __digits, _First);
     }
@@ -654,17 +654,17 @@ void __append_nine_digits(uint32_t __digits, char* const __result) {
 
   if (__exp >= 100) {
     const int32_t __c = __exp % 10;
-    _VSTD::memcpy(_First, __DIGIT_TABLE + 2 * (__exp / 10), 2);
+    _CUDA_VSTD::memcpy(_First, __DIGIT_TABLE + 2 * (__exp / 10), 2);
     _First[2] = static_cast<char>('0' + __c);
     _First += 3;
   } else {
-    _VSTD::memcpy(_First, __DIGIT_TABLE + 2 * __exp, 2);
+    _CUDA_VSTD::memcpy(_First, __DIGIT_TABLE + 2 * __exp, 2);
     _First += 2;
   }
 
   return { _First, errc{} };
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 // clang-format on

diff  --git a/libcxx/src/ryu/d2s.cpp b/libcxx/src/ryu/d2s.cpp
index 245c2eb5908d..bc882f639451 100644
--- a/libcxx/src/ryu/d2s.cpp
+++ b/libcxx/src/ryu/d2s.cpp
@@ -51,7 +51,7 @@
 #include "include/ryu/digit_table.h"
 #include "include/ryu/ryu.h"
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // We need a 64x128-bit multiplication and a subsequent 128-bit shift.
 // Multiplication:
@@ -90,9 +90,9 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 //    c. Split only the first factor into 31-bit pieces, which also guarantees
 //       no internal overflow, but requires extra work since the intermediate
 //       results are not perfectly aligned.
-#ifdef _LIBCPP_INTRINSIC128
+#ifdef _LIBCUDACXX_INTRINSIC128
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __mulShift(const uint64_t __m, const uint64_t* const __mul, const int32_t __j) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __mulShift(const uint64_t __m, const uint64_t* const __mul, const int32_t __j) {
   // __m is maximum 55 bits
   uint64_t __high1;                                               // 128
   const uint64_t __low1 = __ryu_umul128(__m, __mul[1], &__high1); // 64
@@ -105,7 +105,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
   return __ryu_shiftright128(__sum, __high1, static_cast<uint32_t>(__j - 64));
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint64_t __mulShiftAll(const uint64_t __m, const uint64_t* const __mul, const int32_t __j,
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint64_t __mulShiftAll(const uint64_t __m, const uint64_t* const __mul, const int32_t __j,
   uint64_t* const __vp, uint64_t* const __vm, const uint32_t __mmShift) {
   *__vp = __mulShift(4 * __m + 2, __mul, __j);
   *__vm = __mulShift(4 * __m - 1 - __mmShift, __mul, __j);
@@ -114,7 +114,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #else // ^^^ intrinsics available ^^^ / vvv intrinsics unavailable vvv
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline _LIBCPP_ALWAYS_INLINE uint64_t __mulShiftAll(uint64_t __m, const uint64_t* const __mul, const int32_t __j,
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline _LIBCUDACXX_ALWAYS_INLINE uint64_t __mulShiftAll(uint64_t __m, const uint64_t* const __mul, const int32_t __j,
   uint64_t* const __vp, uint64_t* const __vm, const uint32_t __mmShift) { // TRANSITION, VSO-634761
   __m <<= 1;
   // __m is maximum 55 bits
@@ -149,12 +149,12 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #endif // ^^^ intrinsics unavailable ^^^
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __decimalLength17(const uint64_t __v) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __decimalLength17(const uint64_t __v) {
   // This is slightly faster than a loop.
   // The average output length is 16.38 digits, so we check high-to-low.
   // Function precondition: __v is not an 18, 19, or 20-digit number.
   // (17 digits are sufficient for round-tripping.)
-  _LIBCPP_ASSERT(__v < 100000000000000000u, "");
+  _LIBCUDACXX_ASSERT(__v < 100000000000000000u, "");
   if (__v >= 10000000000000000u) { return 17; }
   if (__v >= 1000000000000000u) { return 16; }
   if (__v >= 100000000000000u) { return 15; }
@@ -180,7 +180,7 @@ struct __floating_decimal_64 {
   int32_t __exponent;
 };
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline __floating_decimal_64 __d2d(const uint64_t __ieeeMantissa, const uint32_t __ieeeExponent) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline __floating_decimal_64 __d2d(const uint64_t __ieeeMantissa, const uint32_t __ieeeExponent) {
   int32_t __e2;
   uint64_t __m2;
   if (__ieeeExponent == 0) {
@@ -352,7 +352,7 @@ struct __floating_decimal_64 {
   return __fd;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline to_chars_result __to_chars(char* const _First, char* const _Last, const __floating_decimal_64 __v,
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline to_chars_result __to_chars(char* const _First, char* const _Last, const __floating_decimal_64 __v,
   chars_format _Fmt, const double __f) {
   // Step 5: Print the decimal representation.
   uint64_t _Output = __v.__mantissa;
@@ -478,7 +478,7 @@ struct __floating_decimal_64 {
           36893488u, 7378697u, 1475739u, 295147u, 59029u, 11805u, 2361u, 472u, 94u, 18u, 3u };
 
         unsigned long _Trailing_zero_bits;
-#ifdef _LIBCPP_HAS_BITSCAN64
+#ifdef _LIBCUDACXX_HAS_BITSCAN64
         (void) _BitScanForward64(&_Trailing_zero_bits, __v.__mantissa); // __v.__mantissa is guaranteed nonzero
 #else // ^^^ 64-bit ^^^ / vvv 32-bit vvv
         const uint32_t _Low_mantissa = static_cast<uint32_t>(__v.__mantissa);
@@ -527,10 +527,10 @@ struct __floating_decimal_64 {
       const uint32_t __d0 = (__d % 100) << 1;
       const uint32_t __d1 = (__d / 100) << 1;
 
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2);
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2);
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __d0, 2);
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __d1, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __d0, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __d1, 2);
     }
     uint32_t __output2 = static_cast<uint32_t>(_Output);
     while (__output2 >= 10000) {
@@ -542,35 +542,35 @@ struct __floating_decimal_64 {
       __output2 /= 10000;
       const uint32_t __c0 = (__c % 100) << 1;
       const uint32_t __c1 = (__c / 100) << 1;
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2);
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2);
     }
     if (__output2 >= 100) {
       const uint32_t __c = (__output2 % 100) << 1;
       __output2 /= 100;
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2);
     }
     if (__output2 >= 10) {
       const uint32_t __c = __output2 << 1;
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2);
     } else {
       *--_Mid = static_cast<char>('0' + __output2);
     }
 
     if (_Ryu_exponent > 0) { // case "172900" with _Can_use_ryu
       // Performance note: it might be more efficient to do this immediately after setting _Mid.
-      _VSTD::memset(_First + __olength, '0', static_cast<size_t>(_Ryu_exponent));
+      _CUDA_VSTD::memset(_First + __olength, '0', static_cast<size_t>(_Ryu_exponent));
     } else if (_Ryu_exponent == 0) { // case "1729"
       // Done!
     } else if (_Whole_digits > 0) { // case "17.29"
       // Performance note: moving digits might not be optimal.
-      _VSTD::memmove(_First, _First + 1, static_cast<size_t>(_Whole_digits));
+      _CUDA_VSTD::memmove(_First, _First + 1, static_cast<size_t>(_Whole_digits));
       _First[_Whole_digits] = '.';
     } else { // case "0.001729"
       // Performance note: a larger memset() followed by overwriting '.' might be more efficient.
       _First[0] = '0';
       _First[1] = '.';
-      _VSTD::memset(_First + 2, '0', static_cast<size_t>(-_Whole_digits));
+      _CUDA_VSTD::memset(_First + 2, '0', static_cast<size_t>(-_Whole_digits));
     }
 
     return { _First + _Total_fixed_length, errc{} };
@@ -602,10 +602,10 @@ struct __floating_decimal_64 {
     const uint32_t __c1 = (__c / 100) << 1;
     const uint32_t __d0 = (__d % 100) << 1;
     const uint32_t __d1 = (__d / 100) << 1;
-    _VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2);
-    _VSTD::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2);
-    _VSTD::memcpy(__result + __olength - __i - 5, __DIGIT_TABLE + __d0, 2);
-    _VSTD::memcpy(__result + __olength - __i - 7, __DIGIT_TABLE + __d1, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 5, __DIGIT_TABLE + __d0, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 7, __DIGIT_TABLE + __d1, 2);
     __i += 8;
   }
   uint32_t __output2 = static_cast<uint32_t>(_Output);
@@ -618,14 +618,14 @@ struct __floating_decimal_64 {
     __output2 /= 10000;
     const uint32_t __c0 = (__c % 100) << 1;
     const uint32_t __c1 = (__c / 100) << 1;
-    _VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2);
-    _VSTD::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2);
     __i += 4;
   }
   if (__output2 >= 100) {
     const uint32_t __c = (__output2 % 100) << 1;
     __output2 /= 100;
-    _VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c, 2);
     __i += 2;
   }
   if (__output2 >= 10) {
@@ -657,18 +657,18 @@ struct __floating_decimal_64 {
 
   if (_Scientific_exponent >= 100) {
     const int32_t __c = _Scientific_exponent % 10;
-    _VSTD::memcpy(__result + __index, __DIGIT_TABLE + 2 * (_Scientific_exponent / 10), 2);
+    _CUDA_VSTD::memcpy(__result + __index, __DIGIT_TABLE + 2 * (_Scientific_exponent / 10), 2);
     __result[__index + 2] = static_cast<char>('0' + __c);
     __index += 3;
   } else {
-    _VSTD::memcpy(__result + __index, __DIGIT_TABLE + 2 * _Scientific_exponent, 2);
+    _CUDA_VSTD::memcpy(__result + __index, __DIGIT_TABLE + 2 * _Scientific_exponent, 2);
     __index += 2;
   }
 
   return { _First + _Total_scientific_length, errc{} };
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline bool __d2d_small_int(const uint64_t __ieeeMantissa, const uint32_t __ieeeExponent,
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline bool __d2d_small_int(const uint64_t __ieeeMantissa, const uint32_t __ieeeExponent,
   __floating_decimal_64* const __v) {
   const uint64_t __m2 = (1ull << __DOUBLE_MANTISSA_BITS) | __ieeeMantissa;
   const int32_t __e2 = static_cast<int32_t>(__ieeeExponent) - __DOUBLE_BIAS - __DOUBLE_MANTISSA_BITS;
@@ -713,7 +713,7 @@ struct __floating_decimal_64 {
         return { _Last, errc::value_too_large };
       }
 
-      _VSTD::memcpy(_First, "0e+00", 5);
+      _CUDA_VSTD::memcpy(_First, "0e+00", 5);
 
       return { _First + 5, errc{} };
     }
@@ -778,6 +778,6 @@ struct __floating_decimal_64 {
   return __to_chars(_First, _Last, __v, _Fmt, __f);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 // clang-format on

diff  --git a/libcxx/src/ryu/f2s.cpp b/libcxx/src/ryu/f2s.cpp
index 3bcfe462c8f7..e1da988160da 100644
--- a/libcxx/src/ryu/f2s.cpp
+++ b/libcxx/src/ryu/f2s.cpp
@@ -50,7 +50,7 @@
 #include "include/ryu/f2s.h"
 #include "include/ryu/ryu.h"
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 inline constexpr int __FLOAT_MANTISSA_BITS = 23;
 inline constexpr int __FLOAT_EXPONENT_BITS = 8;
@@ -83,10 +83,10 @@ inline constexpr uint64_t __FLOAT_POW5_SPLIT[47] = {
   1292469707114105741u, 1615587133892632177u, 2019483917365790221u
 };
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __pow5Factor(uint32_t __value) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __pow5Factor(uint32_t __value) {
   uint32_t __count = 0;
   for (;;) {
-    _LIBCPP_ASSERT(__value != 0, "");
+    _LIBCUDACXX_ASSERT(__value != 0, "");
     const uint32_t __q = __value / 5;
     const uint32_t __r = __value % 5;
     if (__r != 0) {
@@ -99,20 +99,20 @@ inline constexpr uint64_t __FLOAT_POW5_SPLIT[47] = {
 }
 
 // Returns true if __value is divisible by 5^__p.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline bool __multipleOfPowerOf5(const uint32_t __value, const uint32_t __p) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline bool __multipleOfPowerOf5(const uint32_t __value, const uint32_t __p) {
   return __pow5Factor(__value) >= __p;
 }
 
 // Returns true if __value is divisible by 2^__p.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline bool __multipleOfPowerOf2(const uint32_t __value, const uint32_t __p) {
-  _LIBCPP_ASSERT(__value != 0, "");
-  _LIBCPP_ASSERT(__p < 32, "");
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline bool __multipleOfPowerOf2(const uint32_t __value, const uint32_t __p) {
+  _LIBCUDACXX_ASSERT(__value != 0, "");
+  _LIBCUDACXX_ASSERT(__p < 32, "");
   // __builtin_ctz doesn't appear to be faster here.
   return (__value & ((1u << __p) - 1)) == 0;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __mulShift(const uint32_t __m, const uint64_t __factor, const int32_t __shift) {
-  _LIBCPP_ASSERT(__shift > 32, "");
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __mulShift(const uint32_t __m, const uint64_t __factor, const int32_t __shift) {
+  _LIBCUDACXX_ASSERT(__shift > 32, "");
 
   // The casts here help MSVC to avoid calls to the __allmul library
   // function.
@@ -121,7 +121,7 @@ inline constexpr uint64_t __FLOAT_POW5_SPLIT[47] = {
   const uint64_t __bits0 = static_cast<uint64_t>(__m) * __factorLo;
   const uint64_t __bits1 = static_cast<uint64_t>(__m) * __factorHi;
 
-#ifndef _LIBCPP_64_BIT
+#ifndef _LIBCUDACXX_64_BIT
   // On 32-bit platforms we can avoid a 64-bit shift-right since we only
   // need the upper 32 bits of the result and the shift value is > 32.
   const uint32_t __bits0Hi = static_cast<uint32_t>(__bits0 >> 32);
@@ -134,16 +134,16 @@ inline constexpr uint64_t __FLOAT_POW5_SPLIT[47] = {
 #else // ^^^ 32-bit ^^^ / vvv 64-bit vvv
   const uint64_t __sum = (__bits0 >> 32) + __bits1;
   const uint64_t __shiftedSum = __sum >> (__shift - 32);
-  _LIBCPP_ASSERT(__shiftedSum <= UINT32_MAX, "");
+  _LIBCUDACXX_ASSERT(__shiftedSum <= UINT32_MAX, "");
   return static_cast<uint32_t>(__shiftedSum);
 #endif // ^^^ 64-bit ^^^
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __mulPow5InvDivPow2(const uint32_t __m, const uint32_t __q, const int32_t __j) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __mulPow5InvDivPow2(const uint32_t __m, const uint32_t __q, const int32_t __j) {
   return __mulShift(__m, __FLOAT_POW5_INV_SPLIT[__q], __j);
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline uint32_t __mulPow5divPow2(const uint32_t __m, const uint32_t __i, const int32_t __j) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline uint32_t __mulPow5divPow2(const uint32_t __m, const uint32_t __i, const int32_t __j) {
   return __mulShift(__m, __FLOAT_POW5_SPLIT[__i], __j);
 }
 
@@ -153,7 +153,7 @@ struct __floating_decimal_32 {
   int32_t __exponent;
 };
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline __floating_decimal_32 __f2d(const uint32_t __ieeeMantissa, const uint32_t __ieeeExponent) {
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline __floating_decimal_32 __f2d(const uint32_t __ieeeMantissa, const uint32_t __ieeeExponent) {
   int32_t __e2;
   uint32_t __m2;
   if (__ieeeExponent == 0) {
@@ -292,7 +292,7 @@ struct __floating_decimal_32 {
   return __fd;
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline to_chars_result _Large_integer_to_chars(char* const _First, char* const _Last,
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline to_chars_result _Large_integer_to_chars(char* const _First, char* const _Last,
   const uint32_t _Mantissa2, const int32_t _Exponent2) {
 
   // Print the integer _Mantissa2 * 2^_Exponent2 exactly.
@@ -309,8 +309,8 @@ struct __floating_decimal_32 {
   // Performance note: Long division appears to be faster than losslessly widening float to double and calling
   // __d2fixed_buffered_n(). If __f2fixed_buffered_n() is implemented, it might be faster than long division.
 
-  _LIBCPP_ASSERT(_Exponent2 > 0, "");
-  _LIBCPP_ASSERT(_Exponent2 <= 104, ""); // because __ieeeExponent <= 254
+  _LIBCUDACXX_ASSERT(_Exponent2 > 0, "");
+  _LIBCUDACXX_ASSERT(_Exponent2 <= 104, ""); // because __ieeeExponent <= 254
 
   // Manually represent _Mantissa2 * 2^_Exponent2 as a large integer. _Mantissa2 is always 24 bits
   // (due to the implicit bit), while _Exponent2 indicates a shift of at most 104 bits.
@@ -328,7 +328,7 @@ struct __floating_decimal_32 {
 
   // _Maxidx is the index of the most significant nonzero element.
   uint32_t _Maxidx = ((24 + static_cast<uint32_t>(_Exponent2) + 31) / 32) - 1;
-  _LIBCPP_ASSERT(_Maxidx < _Data_size, "");
+  _LIBCUDACXX_ASSERT(_Maxidx < _Data_size, "");
 
   const uint32_t _Bit_shift = static_cast<uint32_t>(_Exponent2) % 32;
   if (_Bit_shift <= 8) { // _Mantissa2's 24 bits don't cross an element boundary
@@ -388,9 +388,9 @@ struct __floating_decimal_32 {
     }
   }
 
-  _LIBCPP_ASSERT(_Data[0] != 0, "");
+  _LIBCUDACXX_ASSERT(_Data[0] != 0, "");
   for (uint32_t _Idx = 1; _Idx < _Data_size; ++_Idx) {
-    _LIBCPP_ASSERT(_Data[_Idx] == 0, "");
+    _LIBCUDACXX_ASSERT(_Data[_Idx] == 0, "");
   }
 
   const uint32_t _Data_olength = _Data[0] >= 1000000000 ? 10 : __decimalLength9(_Data[0]);
@@ -416,7 +416,7 @@ struct __floating_decimal_32 {
   return { _Result, errc{} };
 }
 
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI inline to_chars_result __to_chars(char* const _First, char* const _Last, const __floating_decimal_32 __v,
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI inline to_chars_result __to_chars(char* const _First, char* const _Last, const __floating_decimal_32 __v,
   chars_format _Fmt, const uint32_t __ieeeMantissa, const uint32_t __ieeeExponent) {
   // Step 5: Print the decimal representation.
   uint32_t _Output = __v.__mantissa;
@@ -565,35 +565,35 @@ struct __floating_decimal_32 {
       _Output /= 10000;
       const uint32_t __c0 = (__c % 100) << 1;
       const uint32_t __c1 = (__c / 100) << 1;
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2);
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c0, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c1, 2);
     }
     if (_Output >= 100) {
       const uint32_t __c = (_Output % 100) << 1;
       _Output /= 100;
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2);
     }
     if (_Output >= 10) {
       const uint32_t __c = _Output << 1;
-      _VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2);
+      _CUDA_VSTD::memcpy(_Mid -= 2, __DIGIT_TABLE + __c, 2);
     } else {
       *--_Mid = static_cast<char>('0' + _Output);
     }
 
     if (_Ryu_exponent > 0) { // case "172900" with _Can_use_ryu
       // Performance note: it might be more efficient to do this immediately after setting _Mid.
-      _VSTD::memset(_First + __olength, '0', static_cast<size_t>(_Ryu_exponent));
+      _CUDA_VSTD::memset(_First + __olength, '0', static_cast<size_t>(_Ryu_exponent));
     } else if (_Ryu_exponent == 0) { // case "1729"
       // Done!
     } else if (_Whole_digits > 0) { // case "17.29"
       // Performance note: moving digits might not be optimal.
-      _VSTD::memmove(_First, _First + 1, static_cast<size_t>(_Whole_digits));
+      _CUDA_VSTD::memmove(_First, _First + 1, static_cast<size_t>(_Whole_digits));
       _First[_Whole_digits] = '.';
     } else { // case "0.001729"
       // Performance note: a larger memset() followed by overwriting '.' might be more efficient.
       _First[0] = '0';
       _First[1] = '.';
-      _VSTD::memset(_First + 2, '0', static_cast<size_t>(-_Whole_digits));
+      _CUDA_VSTD::memset(_First + 2, '0', static_cast<size_t>(-_Whole_digits));
     }
 
     return { _First + _Total_fixed_length, errc{} };
@@ -617,14 +617,14 @@ struct __floating_decimal_32 {
     _Output /= 10000;
     const uint32_t __c0 = (__c % 100) << 1;
     const uint32_t __c1 = (__c / 100) << 1;
-    _VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2);
-    _VSTD::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c0, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 3, __DIGIT_TABLE + __c1, 2);
     __i += 4;
   }
   if (_Output >= 100) {
     const uint32_t __c = (_Output % 100) << 1;
     _Output /= 100;
-    _VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c, 2);
+    _CUDA_VSTD::memcpy(__result + __olength - __i - 1, __DIGIT_TABLE + __c, 2);
     __i += 2;
   }
   if (_Output >= 10) {
@@ -654,7 +654,7 @@ struct __floating_decimal_32 {
     __result[__index++] = '+';
   }
 
-  _VSTD::memcpy(__result + __index, __DIGIT_TABLE + 2 * _Scientific_exponent, 2);
+  _CUDA_VSTD::memcpy(__result + __index, __DIGIT_TABLE + 2 * _Scientific_exponent, 2);
   __index += 2;
 
   return { _First + _Total_scientific_length, errc{} };
@@ -673,7 +673,7 @@ struct __floating_decimal_32 {
         return { _Last, errc::value_too_large };
       }
 
-      _VSTD::memcpy(_First, "0e+00", 5);
+      _CUDA_VSTD::memcpy(_First, "0e+00", 5);
 
       return { _First + 5, errc{} };
     }
@@ -711,6 +711,6 @@ struct __floating_decimal_32 {
   return __to_chars(_First, _Last, __v, _Fmt, __ieeeMantissa, __ieeeExponent);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
 // clang-format on

diff  --git a/libcxx/src/shared_mutex.cpp b/libcxx/src/shared_mutex.cpp
index deb3ced014ca..825c78e01b44 100644
--- a/libcxx/src/shared_mutex.cpp
+++ b/libcxx/src/shared_mutex.cpp
@@ -8,14 +8,14 @@
 
 #include <__config>
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 
 #include <shared_mutex>
-#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
+#if defined(__ELF__) && defined(_LIBCUDACXX_LINK_PTHREAD_LIB)
 #  pragma comment(lib, "pthread")
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // Shared Mutex Base
 __shared_mutex_base::__shared_mutex_base()
@@ -114,6 +114,6 @@ void shared_timed_mutex::lock_shared() { return __base.lock_shared(); }
 bool shared_timed_mutex::try_lock_shared() { return __base.try_lock_shared(); }
 void shared_timed_mutex::unlock_shared() { return __base.unlock_shared(); }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // !_LIBCUDACXX_HAS_NO_THREADS

diff  --git a/libcxx/src/stdexcept.cpp b/libcxx/src/stdexcept.cpp
index d08b6740db1c..9cb57884e81b 100644
--- a/libcxx/src/stdexcept.cpp
+++ b/libcxx/src/stdexcept.cpp
@@ -11,7 +11,7 @@
 #include <string>
 #include <system_error>
 
-#ifdef _LIBCPP_ABI_VCRUNTIME
+#ifdef _LIBCUDACXX_ABI_VCRUNTIME
 #include "support/runtime/stdexcept_vcruntime.ipp"
 #else
 #include "support/runtime/stdexcept_default.ipp"

diff  --git a/libcxx/src/string.cpp b/libcxx/src/string.cpp
index 8db129520ee5..55586d546c23 100644
--- a/libcxx/src/string.cpp
+++ b/libcxx/src/string.cpp
@@ -15,13 +15,13 @@
 #include <stdio.h>
 #include <string>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 #  include <cwchar>
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_ABI_DO_NOT_EXPORT_BASIC_STRING_COMMON
+#ifndef _LIBCUDACXX_ABI_DO_NOT_EXPORT_BASIC_STRING_COMMON
 
 template <bool>
 struct __basic_string_common;
@@ -29,8 +29,8 @@ struct __basic_string_common;
 // The struct isn't declared anymore in the headers. It's only here for ABI compatibility.
 template <>
 struct __basic_string_common<true> {
-    _LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_length_error() const;
-    _LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_out_of_range() const;
+    _LIBCUDACXX_NORETURN _LIBCUDACXX_EXPORTED_FROM_ABI void __throw_length_error() const;
+    _LIBCUDACXX_NORETURN _LIBCUDACXX_EXPORTED_FROM_ABI void __throw_out_of_range() const;
 };
 
 void __basic_string_common<true>::__throw_length_error() const {
@@ -40,21 +40,21 @@ void __basic_string_common<true>::__throw_out_of_range() const {
     std::__throw_out_of_range("basic_string");
 }
 
-#endif // _LIBCPP_ABI_DO_NOT_EXPORT_BASIC_STRING_COMMON
+#endif // _LIBCUDACXX_ABI_DO_NOT_EXPORT_BASIC_STRING_COMMON
 
-#define _LIBCPP_EXTERN_TEMPLATE_DEFINE(...) template __VA_ARGS__;
-#ifdef _LIBCPP_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION
-    _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCPP_EXTERN_TEMPLATE_DEFINE, char)
-#   ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-        _LIBCPP_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCPP_EXTERN_TEMPLATE_DEFINE, wchar_t)
+#define _LIBCUDACXX_EXTERN_TEMPLATE_DEFINE(...) template __VA_ARGS__;
+#ifdef _LIBCUDACXX_ABI_STRING_OPTIMIZED_EXTERNAL_INSTANTIATION
+    _LIBCUDACXX_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCUDACXX_EXTERN_TEMPLATE_DEFINE, char)
+#   ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+        _LIBCUDACXX_STRING_UNSTABLE_EXTERN_TEMPLATE_LIST(_LIBCUDACXX_EXTERN_TEMPLATE_DEFINE, wchar_t)
 #   endif
 #else
-    _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_EXTERN_TEMPLATE_DEFINE, char)
-#   ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
-        _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_EXTERN_TEMPLATE_DEFINE, wchar_t)
+    _LIBCUDACXX_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCUDACXX_EXTERN_TEMPLATE_DEFINE, char)
+#   ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
+        _LIBCUDACXX_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCUDACXX_EXTERN_TEMPLATE_DEFINE, wchar_t)
 #   endif
 #endif
-#undef _LIBCPP_EXTERN_TEMPLATE_DEFINE
+#undef _LIBCUDACXX_EXTERN_TEMPLATE_DEFINE
 
 template string operator+<char, char_traits<char>, allocator<char>>(char const*, string const&);
 
@@ -63,11 +63,11 @@ namespace
 
 template<typename T>
 inline void throw_helper(const string& msg) {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw T(msg);
 #else
     fprintf(stderr, "%s\n", msg.c_str());
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
@@ -131,7 +131,7 @@ inline unsigned long long as_integer(const string& func, const string& s, size_t
     return as_integer_helper<unsigned long long>(func, s, idx, base, strtoull);
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 // wstring
 template<>
 inline int as_integer(const string& func, const wstring& s, size_t* idx, int base) {
@@ -164,7 +164,7 @@ template<>
 inline unsigned long long as_integer(const string& func, const wstring& s, size_t* idx, int base) {
     return as_integer_helper<unsigned long long>(func, s, idx, base, wcstoull);
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // as_float
 
@@ -203,7 +203,7 @@ inline long double as_float(const string& func, const string& s, size_t* idx) {
     return as_float_helper<long double>(func, s, idx, strtold);
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template<>
 inline float as_float(const string& func, const wstring& s, size_t* idx) {
     return as_float_helper<float>(func, s, idx, wcstof);
@@ -218,7 +218,7 @@ template<>
 inline long double as_float(const string& func, const wstring& s, size_t* idx) {
     return as_float_helper<long double>(func, s, idx, wcstold);
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 }  // unnamed namespace
 
@@ -254,7 +254,7 @@ long double stold(const string& str, size_t* idx) {
     return as_float<long double>("stold", str, idx);
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 int stoi(const wstring& str, size_t* idx, int base) {
     return as_integer<int>("stoi", str, idx, base);
 }
@@ -286,7 +286,7 @@ double stod(const wstring& str, size_t* idx) {
 long double stold(const wstring& str, size_t* idx) {
     return as_float<long double>("stold", str, idx);
 }
-#endif // !_LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // !_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 // to_string
 
@@ -328,7 +328,7 @@ struct initial_string<string> {
     }
 };
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 template <>
 struct initial_string<wstring> {
     wstring operator()() const {
@@ -341,13 +341,13 @@ struct initial_string<wstring> {
 typedef int (*wide_printf)(wchar_t* __restrict, size_t, const wchar_t*__restrict, ...);
 
 inline wide_printf get_swprintf() {
-#ifndef _LIBCPP_MSVCRT
+#ifndef _LIBCUDACXX_MSVCRT
     return swprintf;
 #else
     return static_cast<int (__cdecl*)(wchar_t* __restrict, size_t, const wchar_t*__restrict, ...)>(_snwprintf);
 #endif
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 
 template <typename S, typename V>
 S i_to_string(V v) {
@@ -357,7 +357,7 @@ S i_to_string(V v) {
     constexpr size_t bufsize = numeric_limits<V>::digits10 + 2;  // +1 for minus, +1 for digits10
     char buf[bufsize];
     const auto res = to_chars(buf, buf + bufsize, v);
-    _LIBCPP_ASSERT(res.ec == errc(), "bufsize must be large enough to accomodate the value");
+    _LIBCUDACXX_ASSERT(res.ec == errc(), "bufsize must be large enough to accomodate the value");
     return S(buf, res.ptr);
 }
 
@@ -370,7 +370,7 @@ string  to_string (unsigned val)           { return i_to_string< string>(val); }
 string  to_string (unsigned long val)      { return i_to_string< string>(val); }
 string  to_string (unsigned long long val) { return i_to_string< string>(val); }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 wstring to_wstring(int val)                { return i_to_string<wstring>(val); }
 wstring to_wstring(long val)               { return i_to_string<wstring>(val); }
 wstring to_wstring(long long val)          { return i_to_string<wstring>(val); }
@@ -383,10 +383,10 @@ string  to_string (float val)       { return as_string(snprintf,       initial_s
 string  to_string (double val)      { return as_string(snprintf,       initial_string< string>()(),   "%f", val); }
 string  to_string (long double val) { return as_string(snprintf,       initial_string< string>()(),  "%Lf", val); }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 wstring to_wstring(float val)       { return as_string(get_swprintf(), initial_string<wstring>()(),  L"%f", val); }
 wstring to_wstring(double val)      { return as_string(get_swprintf(), initial_string<wstring>()(),  L"%f", val); }
 wstring to_wstring(long double val) { return as_string(get_swprintf(), initial_string<wstring>()(), L"%Lf", val); }
 #endif
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/strstream.cpp b/libcxx/src/strstream.cpp
index 87c235a97a29..84110c027388 100644
--- a/libcxx/src/strstream.cpp
+++ b/libcxx/src/strstream.cpp
@@ -14,10 +14,10 @@
 #include <cstring>
 #include <strstream>
 
-_LIBCPP_PUSH_MACROS
+_LIBCUDACXX_PUSH_MACROS
 #include <__undef_macros>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 strstreambuf::strstreambuf(streamsize __alsize)
     : __strmode_(__dynamic),
@@ -120,10 +120,10 @@ void
 strstreambuf::swap(strstreambuf& __rhs)
 {
     streambuf::swap(__rhs);
-    _VSTD::swap(__strmode_, __rhs.__strmode_);
-    _VSTD::swap(__alsize_, __rhs.__alsize_);
-    _VSTD::swap(__palloc_, __rhs.__palloc_);
-    _VSTD::swap(__pfree_, __rhs.__pfree_);
+    _CUDA_VSTD::swap(__strmode_, __rhs.__strmode_);
+    _CUDA_VSTD::swap(__alsize_, __rhs.__alsize_);
+    _CUDA_VSTD::swap(__palloc_, __rhs.__palloc_);
+    _CUDA_VSTD::swap(__pfree_, __rhs.__pfree_);
 }
 
 void
@@ -173,7 +173,7 @@ strstreambuf::overflow(int_type __c)
         if (buf == nullptr)
             return int_type(EOF);
         if (old_size != 0) {
-            _LIBCPP_ASSERT(eback(), "overflow copying from NULL");
+            _LIBCUDACXX_ASSERT(eback(), "overflow copying from NULL");
             memcpy(buf, eback(), static_cast<size_t>(old_size));
         }
         ptr
diff _t ninp = gptr()  - eback();
@@ -271,14 +271,14 @@ strstreambuf::seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmod
             newoff = seekhigh - eback();
             break;
         default:
-            __libcpp_unreachable();
+            __LIBCUDACXX_unreachable();
         }
         newoff += __off;
         if (0 <= newoff && newoff <= seekhigh - eback())
         {
             char* newpos = eback() + newoff;
             if (pos_in)
-                setg(eback(), newpos, _VSTD::max(newpos, egptr()));
+                setg(eback(), newpos, _CUDA_VSTD::max(newpos, egptr()));
             if (pos_out)
             {
                 // min(pbase, newpos), newpos, epptr()
@@ -308,7 +308,7 @@ strstreambuf::seekpos(pos_type __sp, ios_base::openmode __which)
             {
                 char* newpos = eback() + newoff;
                 if (pos_in)
-                    setg(eback(), newpos, _VSTD::max(newpos, egptr()));
+                    setg(eback(), newpos, _CUDA_VSTD::max(newpos, egptr()));
                 if (pos_out)
                 {
                     // min(pbase, newpos), newpos, epptr()
@@ -335,6 +335,6 @@ strstream::~strstream()
 {
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-_LIBCPP_POP_MACROS
+_LIBCUDACXX_POP_MACROS

diff  --git a/libcxx/src/support/ibm/mbsnrtowcs.cpp b/libcxx/src/support/ibm/mbsnrtowcs.cpp
index d7220fb46d8a..07ec3ac7831c 100644
--- a/libcxx/src/support/ibm/mbsnrtowcs.cpp
+++ b/libcxx/src/support/ibm/mbsnrtowcs.cpp
@@ -18,7 +18,7 @@
 // Returns (size_t) -1 when an invalid sequence is encountered.
 // Leaves *`src` pointing to the next character to convert or NULL
 // if a null character was converted from *`src`.
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 size_t mbsnrtowcs(wchar_t *__restrict dst, const char **__restrict src,
                    size_t src_size_bytes, size_t max_dest_chars,
                    mbstate_t *__restrict ps) {

diff  --git a/libcxx/src/support/ibm/wcsnrtombs.cpp b/libcxx/src/support/ibm/wcsnrtombs.cpp
index f595e63283ae..24d25a960c5f 100644
--- a/libcxx/src/support/ibm/wcsnrtombs.cpp
+++ b/libcxx/src/support/ibm/wcsnrtombs.cpp
@@ -17,7 +17,7 @@
 // converted from *src, excluding the null terminator. 
 // Returns (size_t) -1 if an error occurs and sets errno.
 // If `dst` is NULL, `dst_size_bytes` is ignored and no bytes are copied to `dst`.
-_LIBCPP_FUNC_VIS
+_LIBCUDACXX_FUNC_VIS
 size_t wcsnrtombs(char *__restrict dst, const wchar_t **__restrict src,
                    size_t max_source_chars, size_t dst_size_bytes,
                    mbstate_t *__restrict ps) {

diff  --git a/libcxx/src/support/ibm/xlocale_zos.cpp b/libcxx/src/support/ibm/xlocale_zos.cpp
index a3f9558a0611..478cf756d43f 100644
--- a/libcxx/src/support/ibm/xlocale_zos.cpp
+++ b/libcxx/src/support/ibm/xlocale_zos.cpp
@@ -111,7 +111,7 @@ locale_t uselocale(locale_t newloc) {
         tokenized.push_back(s);
     }
 
-    _LIBCPP_ASSERT(tokenized.size() >= _NCAT, "locale-name list is too short");
+    _LIBCUDACXX_ASSERT(tokenized.size() >= _NCAT, "locale-name list is too short");
 
     previous_loc->lc_collate = tokenized[LC_COLLATE];
     previous_loc->lc_ctype = tokenized[LC_CTYPE];

diff  --git a/libcxx/src/support/runtime/exception_fallback.ipp b/libcxx/src/support/runtime/exception_fallback.ipp
index ade933567f23..1f5c549125eb 100644
--- a/libcxx/src/support/runtime/exception_fallback.ipp
+++ b/libcxx/src/support/runtime/exception_fallback.ipp
@@ -18,16 +18,16 @@ static constinit std::unexpected_handler __unexpected_handler = nullptr;
 unexpected_handler
 set_unexpected(unexpected_handler func) noexcept
 {
-  return __libcpp_atomic_exchange(&__unexpected_handler, func);
+  return __LIBCUDACXX_atomic_exchange(&__unexpected_handler, func);
 }
 
 unexpected_handler
 get_unexpected() noexcept
 {
-  return __libcpp_atomic_load(&__unexpected_handler);
+  return __LIBCUDACXX_atomic_load(&__unexpected_handler);
 }
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void unexpected()
 {
     (*get_unexpected())();
@@ -38,28 +38,28 @@ void unexpected()
 terminate_handler
 set_terminate(terminate_handler func) noexcept
 {
-  return __libcpp_atomic_exchange(&__terminate_handler, func);
+  return __LIBCUDACXX_atomic_exchange(&__terminate_handler, func);
 }
 
 terminate_handler
 get_terminate() noexcept
 {
-  return __libcpp_atomic_load(&__terminate_handler);
+  return __LIBCUDACXX_atomic_load(&__terminate_handler);
 }
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void
 terminate() noexcept
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         (*get_terminate())();
         // handler should not return
         fprintf(stderr, "terminate_handler unexpectedly returned\n");
         ::abort();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -67,7 +67,7 @@ terminate() noexcept
         fprintf(stderr, "terminate_handler unexpectedly threw an exception\n");
         ::abort();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 bool uncaught_exception() noexcept { return uncaught_exceptions() > 0; }

diff  --git a/libcxx/src/support/runtime/exception_libcxxabi.ipp b/libcxx/src/support/runtime/exception_libcxxabi.ipp
index ee15e437e602..7596cfa852c0 100644
--- a/libcxx/src/support/runtime/exception_libcxxabi.ipp
+++ b/libcxx/src/support/runtime/exception_libcxxabi.ipp
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPPABI_VERSION
+#ifndef _LIBCUDACXXABI_VERSION
 #error this header can only be used with libc++abi
 #endif
 
@@ -17,7 +17,7 @@ bool uncaught_exception() noexcept { return uncaught_exceptions() > 0; }
 
 int uncaught_exceptions() noexcept
 {
-# if _LIBCPPABI_VERSION > 1001
+# if _LIBCUDACXXABI_VERSION > 1001
     return __cxa_uncaught_exceptions();
 # else
     return __cxa_uncaught_exception() ? 1 : 0;

diff  --git a/libcxx/src/support/runtime/exception_msvc.ipp b/libcxx/src/support/runtime/exception_msvc.ipp
index 7e36c7068a28..eb9ac4dd1b3c 100644
--- a/libcxx/src/support/runtime/exception_msvc.ipp
+++ b/libcxx/src/support/runtime/exception_msvc.ipp
@@ -7,7 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_ABI_MICROSOFT
+#ifndef _LIBCUDACXX_ABI_MICROSOFT
 #error this header can only be used when targeting the MSVC ABI
 #endif
 
@@ -16,9 +16,9 @@
 
 extern "C" {
 typedef void (__cdecl* terminate_handler)();
-_LIBCPP_CRT_FUNC terminate_handler __cdecl set_terminate(
+_LIBCUDACXX_CRT_FUNC terminate_handler __cdecl set_terminate(
     terminate_handler _NewTerminateHandler) throw();
-_LIBCPP_CRT_FUNC terminate_handler __cdecl _get_terminate();
+_LIBCUDACXX_CRT_FUNC terminate_handler __cdecl _get_terminate();
 
 typedef void (__cdecl* unexpected_handler)();
 unexpected_handler __cdecl set_unexpected(
@@ -39,7 +39,7 @@ unexpected_handler get_unexpected() noexcept {
   return ::_get_unexpected();
 }
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void unexpected() {
     (*get_unexpected())();
     // unexpected handler should not return
@@ -54,18 +54,18 @@ terminate_handler get_terminate() noexcept {
   return ::_get_terminate();
 }
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void terminate() noexcept
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     try
     {
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
         (*get_terminate())();
         // handler should not return
         fprintf(stderr, "terminate_handler unexpectedly returned\n");
         ::abort();
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     }
     catch (...)
     {
@@ -73,7 +73,7 @@ void terminate() noexcept
         fprintf(stderr, "terminate_handler unexpectedly threw an exception\n");
         ::abort();
     }
-#endif // _LIBCPP_NO_EXCEPTIONS
+#endif // _LIBCUDACXX_NO_EXCEPTIONS
 }
 
 bool uncaught_exception() noexcept { return uncaught_exceptions() > 0; }
@@ -82,7 +82,7 @@ int uncaught_exceptions() noexcept {
     return __uncaught_exceptions();
 }
 
-#if !defined(_LIBCPP_ABI_VCRUNTIME)
+#if !defined(_LIBCUDACXX_ABI_VCRUNTIME)
 bad_cast::bad_cast() noexcept
 {
 }
@@ -158,6 +158,6 @@ bad_array_new_length::what() const noexcept
 {
     return "bad_array_new_length";
 }
-#endif // !_LIBCPP_ABI_VCRUNTIME
+#endif // !_LIBCUDACXX_ABI_VCRUNTIME
 
 } // namespace std

diff  --git a/libcxx/src/support/runtime/exception_pointer_cxxabi.ipp b/libcxx/src/support/runtime/exception_pointer_cxxabi.ipp
index 33aa94502b73..c865a2c1faaf 100644
--- a/libcxx/src/support/runtime/exception_pointer_cxxabi.ipp
+++ b/libcxx/src/support/runtime/exception_pointer_cxxabi.ipp
@@ -43,7 +43,7 @@ nested_exception::~nested_exception() noexcept
 {
 }
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void
 nested_exception::rethrow_nested() const
 {
@@ -62,7 +62,7 @@ exception_ptr current_exception() noexcept
     return ptr;
 }
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void rethrow_exception(exception_ptr p)
 {
     __cxa_rethrow_primary_exception(p.__ptr_);

diff  --git a/libcxx/src/support/runtime/exception_pointer_glibcxx.ipp b/libcxx/src/support/runtime/exception_pointer_glibcxx.ipp
index 983a08808dcc..8c3b8859b12f 100644
--- a/libcxx/src/support/runtime/exception_pointer_glibcxx.ipp
+++ b/libcxx/src/support/runtime/exception_pointer_glibcxx.ipp
@@ -32,7 +32,7 @@ struct exception_ptr
 
 }
 
-_LIBCPP_NORETURN void rethrow_exception(__exception_ptr::exception_ptr);
+_LIBCUDACXX_NORETURN void rethrow_exception(__exception_ptr::exception_ptr);
 
 exception_ptr::~exception_ptr() noexcept
 {
@@ -59,7 +59,7 @@ nested_exception::nested_exception() noexcept
 }
 
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void
 nested_exception::rethrow_nested() const
 {
@@ -68,7 +68,7 @@ nested_exception::rethrow_nested() const
     rethrow_exception(__ptr_);
 }
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void rethrow_exception(exception_ptr p)
 {
     rethrow_exception(reinterpret_cast<__exception_ptr::exception_ptr&>(p));

diff  --git a/libcxx/src/support/runtime/exception_pointer_msvc.ipp b/libcxx/src/support/runtime/exception_pointer_msvc.ipp
index 9e7f392e764d..c4fd890bdfb7 100644
--- a/libcxx/src/support/runtime/exception_pointer_msvc.ipp
+++ b/libcxx/src/support/runtime/exception_pointer_msvc.ipp
@@ -10,16 +10,16 @@
 #include <stdio.h>
 #include <stdlib.h>
 
-_LIBCPP_CRT_FUNC void __cdecl __ExceptionPtrCreate(void*);
-_LIBCPP_CRT_FUNC void __cdecl __ExceptionPtrDestroy(void*);
-_LIBCPP_CRT_FUNC void __cdecl __ExceptionPtrCopy(void*, const void*);
-_LIBCPP_CRT_FUNC void __cdecl __ExceptionPtrAssign(void*, const void*);
-_LIBCPP_CRT_FUNC bool __cdecl __ExceptionPtrCompare(const void*, const void*);
-_LIBCPP_CRT_FUNC bool __cdecl __ExceptionPtrToBool(const void*);
-_LIBCPP_CRT_FUNC void __cdecl __ExceptionPtrSwap(void*, void*);
-_LIBCPP_CRT_FUNC void __cdecl __ExceptionPtrCurrentException(void*);
-[[noreturn]] _LIBCPP_CRT_FUNC void __cdecl __ExceptionPtrRethrow(const void*);
-_LIBCPP_CRT_FUNC void __cdecl
+_LIBCUDACXX_CRT_FUNC void __cdecl __ExceptionPtrCreate(void*);
+_LIBCUDACXX_CRT_FUNC void __cdecl __ExceptionPtrDestroy(void*);
+_LIBCUDACXX_CRT_FUNC void __cdecl __ExceptionPtrCopy(void*, const void*);
+_LIBCUDACXX_CRT_FUNC void __cdecl __ExceptionPtrAssign(void*, const void*);
+_LIBCUDACXX_CRT_FUNC bool __cdecl __ExceptionPtrCompare(const void*, const void*);
+_LIBCUDACXX_CRT_FUNC bool __cdecl __ExceptionPtrToBool(const void*);
+_LIBCUDACXX_CRT_FUNC void __cdecl __ExceptionPtrSwap(void*, void*);
+_LIBCUDACXX_CRT_FUNC void __cdecl __ExceptionPtrCurrentException(void*);
+[[noreturn]] _LIBCUDACXX_CRT_FUNC void __cdecl __ExceptionPtrRethrow(const void*);
+_LIBCUDACXX_CRT_FUNC void __cdecl
 __ExceptionPtrCopyException(void*, const void*, const void*);
 
 namespace std {
@@ -69,14 +69,14 @@ exception_ptr current_exception() noexcept {
   return __ret;
 }
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void rethrow_exception(exception_ptr p) { __ExceptionPtrRethrow(&p); }
 
 nested_exception::nested_exception() noexcept : __ptr_(current_exception()) {}
 
 nested_exception::~nested_exception() noexcept {}
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void nested_exception::rethrow_nested() const {
   if (__ptr_ == nullptr)
     terminate();

diff  --git a/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp b/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp
index 9e8ec04e1196..b4ef0dfabf80 100644
--- a/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp
+++ b/libcxx/src/support/runtime/exception_pointer_unimplemented.ipp
@@ -47,7 +47,7 @@ nested_exception::~nested_exception() noexcept
 
 #endif
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void
 nested_exception::rethrow_nested() const
 {
@@ -68,7 +68,7 @@ exception_ptr current_exception() noexcept
   ::abort();
 }
 
-_LIBCPP_NORETURN
+_LIBCUDACXX_NORETURN
 void rethrow_exception(exception_ptr p)
 {
 #  warning exception_ptr not yet implemented

diff  --git a/libcxx/src/support/runtime/new_handler_fallback.ipp b/libcxx/src/support/runtime/new_handler_fallback.ipp
index 2ec408327d64..fe0af9ae6895 100644
--- a/libcxx/src/support/runtime/new_handler_fallback.ipp
+++ b/libcxx/src/support/runtime/new_handler_fallback.ipp
@@ -14,13 +14,13 @@ static constinit std::new_handler __new_handler = nullptr;
 new_handler
 set_new_handler(new_handler handler) noexcept
 {
-    return __libcpp_atomic_exchange(&__new_handler, handler);
+    return __LIBCUDACXX_atomic_exchange(&__new_handler, handler);
 }
 
 new_handler
 get_new_handler() noexcept
 {
-    return __libcpp_atomic_load(&__new_handler);
+    return __LIBCUDACXX_atomic_load(&__new_handler);
 }
 
 } // namespace std

diff  --git a/libcxx/src/support/runtime/stdexcept_default.ipp b/libcxx/src/support/runtime/stdexcept_default.ipp
index 99d30453562f..bb0bfec0f9d2 100644
--- a/libcxx/src/support/runtime/stdexcept_default.ipp
+++ b/libcxx/src/support/runtime/stdexcept_default.ipp
@@ -8,13 +8,13 @@
 
 #include "../../include/refstring.h"
 
-/* For _LIBCPPABI_VERSION */
-#if !defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY) &&                           \
+/* For _LIBCUDACXXABI_VERSION */
+#if !defined(_LIBCUDACXX_BUILDING_HAS_NO_ABI_LIBRARY) &&                           \
     (defined(LIBCXX_BUILDING_LIBCXXABI) || defined(LIBCXXRT))
 #include <cxxabi.h>
 #endif
 
-static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char*), "");
+static_assert(sizeof(std::__LIBCUDACXX_refstring) == sizeof(const char*), "");
 
 namespace std // purposefully not using versioning namespace
 {
@@ -42,7 +42,7 @@ runtime_error& runtime_error::operator=(const runtime_error& re) noexcept {
   return *this;
 }
 
-#if !defined(_LIBCPPABI_VERSION) && !defined(LIBSTDCXX)
+#if !defined(_LIBCUDACXXABI_VERSION) && !defined(LIBSTDCXX)
 
 const char* logic_error::what() const noexcept { return __imp_.c_str(); }
 

diff  --git a/libcxx/src/support/runtime/stdexcept_vcruntime.ipp b/libcxx/src/support/runtime/stdexcept_vcruntime.ipp
index 8a6d939cb09f..76bfd8627c9a 100644
--- a/libcxx/src/support/runtime/stdexcept_vcruntime.ipp
+++ b/libcxx/src/support/runtime/stdexcept_vcruntime.ipp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_ABI_VCRUNTIME
+#ifndef _LIBCUDACXX_ABI_VCRUNTIME
 #error This file may only be used when defering to vcruntime
 #endif
 

diff  --git a/libcxx/src/support/win32/locale_win32.cpp b/libcxx/src/support/win32/locale_win32.cpp
index 67f4d1341abd..ee8e2783bc5d 100644
--- a/libcxx/src/support/win32/locale_win32.cpp
+++ b/libcxx/src/support/win32/locale_win32.cpp
@@ -11,9 +11,9 @@
 #include <memory>
 #include <type_traits>
 
-int __libcpp_vasprintf(char **sptr, const char *__restrict fmt, va_list ap);
+int __LIBCUDACXX_vasprintf(char **sptr, const char *__restrict fmt, va_list ap);
 
-using std::__libcpp_locale_guard;
+using std::__LIBCUDACXX_locale_guard;
 
 // FIXME: base currently unused. Needs manual work to construct the new locale
 locale_t newlocale( int mask, const char * locale, locale_t /*base*/ )
@@ -23,17 +23,17 @@ locale_t newlocale( int mask, const char * locale, locale_t /*base*/ )
 
 decltype(MB_CUR_MAX) MB_CUR_MAX_L( locale_t __l )
 {
-#if defined(_LIBCPP_MSVCRT)
+#if defined(_LIBCUDACXX_MSVCRT)
   return ___mb_cur_max_l_func(__l);
 #else
-  __libcpp_locale_guard __current(__l);
+  __LIBCUDACXX_locale_guard __current(__l);
   return MB_CUR_MAX;
 #endif
 }
 
 lconv *localeconv_l( locale_t &loc )
 {
-    __libcpp_locale_guard __current(loc);
+    __LIBCUDACXX_locale_guard __current(loc);
     lconv *lc = localeconv();
     if (!lc)
         return lc;
@@ -42,47 +42,47 @@ lconv *localeconv_l( locale_t &loc )
 size_t mbrlen_l( const char *__restrict s, size_t n,
                  mbstate_t *__restrict ps, locale_t loc )
 {
-    __libcpp_locale_guard __current(loc);
+    __LIBCUDACXX_locale_guard __current(loc);
     return mbrlen( s, n, ps );
 }
 size_t mbsrtowcs_l( wchar_t *__restrict dst, const char **__restrict src,
                     size_t len, mbstate_t *__restrict ps, locale_t loc )
 {
-    __libcpp_locale_guard __current(loc);
+    __LIBCUDACXX_locale_guard __current(loc);
     return mbsrtowcs( dst, src, len, ps );
 }
 size_t wcrtomb_l( char *__restrict s, wchar_t wc, mbstate_t *__restrict ps,
                   locale_t loc )
 {
-    __libcpp_locale_guard __current(loc);
+    __LIBCUDACXX_locale_guard __current(loc);
     return wcrtomb( s, wc, ps );
 }
 size_t mbrtowc_l( wchar_t *__restrict pwc, const char *__restrict s,
                   size_t n, mbstate_t *__restrict ps, locale_t loc )
 {
-    __libcpp_locale_guard __current(loc);
+    __LIBCUDACXX_locale_guard __current(loc);
     return mbrtowc( pwc, s, n, ps );
 }
 size_t mbsnrtowcs_l( wchar_t *__restrict dst, const char **__restrict src,
                      size_t nms, size_t len, mbstate_t *__restrict ps, locale_t loc )
 {
-    __libcpp_locale_guard __current(loc);
+    __LIBCUDACXX_locale_guard __current(loc);
     return mbsnrtowcs( dst, src, nms, len, ps );
 }
 size_t wcsnrtombs_l( char *__restrict dst, const wchar_t **__restrict src,
                      size_t nwc, size_t len, mbstate_t *__restrict ps, locale_t loc )
 {
-    __libcpp_locale_guard __current(loc);
+    __LIBCUDACXX_locale_guard __current(loc);
     return wcsnrtombs( dst, src, nwc, len, ps );
 }
 wint_t btowc_l( int c, locale_t loc )
 {
-    __libcpp_locale_guard __current(loc);
+    __LIBCUDACXX_locale_guard __current(loc);
     return btowc( c );
 }
 int wctob_l( wint_t c, locale_t loc )
 {
-    __libcpp_locale_guard __current(loc);
+    __LIBCUDACXX_locale_guard __current(loc);
     return wctob( c );
 }
 
@@ -90,17 +90,17 @@ int snprintf_l(char *ret, size_t n, locale_t loc, const char *format, ...)
 {
     va_list ap;
     va_start( ap, format );
-#if defined(_LIBCPP_MSVCRT)
+#if defined(_LIBCUDACXX_MSVCRT)
     // FIXME: Remove usage of internal CRT function and globals.
     int result = __stdio_common_vsprintf(
         _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS | _CRT_INTERNAL_PRINTF_STANDARD_SNPRINTF_BEHAVIOR,
         ret, n, format, loc, ap);
 #else
-    __libcpp_locale_guard __current(loc);
-    _LIBCPP_DIAGNOSTIC_PUSH
-    _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
+    __LIBCUDACXX_locale_guard __current(loc);
+    _LIBCUDACXX_DIAGNOSTIC_PUSH
+    _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
     int result = vsnprintf( ret, n, format, ap );
-    _LIBCPP_DIAGNOSTIC_POP
+    _LIBCUDACXX_DIAGNOSTIC_POP
 #endif
     va_end(ap);
     return result;
@@ -116,18 +116,18 @@ int asprintf_l( char **ret, locale_t loc, const char *format, ... )
 }
 int vasprintf_l( char **ret, locale_t loc, const char *format, va_list ap )
 {
-    __libcpp_locale_guard __current(loc);
-    return __libcpp_vasprintf( ret, format, ap );
+    __LIBCUDACXX_locale_guard __current(loc);
+    return __LIBCUDACXX_vasprintf( ret, format, ap );
 }
 
-#if !defined(_LIBCPP_MSVCRT)
+#if !defined(_LIBCUDACXX_MSVCRT)
 float strtof_l(const char* nptr, char** endptr, locale_t loc) {
-  __libcpp_locale_guard __current(loc);
+  __LIBCUDACXX_locale_guard __current(loc);
   return strtof(nptr, endptr);
 }
 
 long double strtold_l(const char* nptr, char** endptr, locale_t loc) {
-  __libcpp_locale_guard __current(loc);
+  __LIBCUDACXX_locale_guard __current(loc);
   return strtold(nptr, endptr);
 }
 #endif
@@ -135,7 +135,7 @@ long double strtold_l(const char* nptr, char** endptr, locale_t loc) {
 #if defined(__MINGW32__) && __MSVCRT_VERSION__ < 0x0800
 size_t strftime_l(char *ret, size_t n, const char *format, const struct tm *tm,
                   locale_t loc) {
-  __libcpp_locale_guard __current(loc);
+  __LIBCUDACXX_locale_guard __current(loc);
   return strftime(ret, n, format, tm);
 }
 #endif

diff  --git a/libcxx/src/support/win32/support.cpp b/libcxx/src/support/win32/support.cpp
index dbec4083cba2..8636b0a11cc4 100644
--- a/libcxx/src/support/win32/support.cpp
+++ b/libcxx/src/support/win32/support.cpp
@@ -17,16 +17,16 @@
 // Like sprintf, but when return value >= 0 it returns
 // a pointer to a malloc'd string in *sptr.
 // If return >= 0, use free to delete *sptr.
-int __libcpp_vasprintf( char **sptr, const char *__restrict format, va_list ap )
+int __LIBCUDACXX_vasprintf( char **sptr, const char *__restrict format, va_list ap )
 {
     *sptr = NULL;
     // Query the count required.
     va_list ap_copy;
     va_copy(ap_copy, ap);
-    _LIBCPP_DIAGNOSTIC_PUSH
-    _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
+    _LIBCUDACXX_DIAGNOSTIC_PUSH
+    _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
     int count = vsnprintf( NULL, 0, format, ap_copy );
-    _LIBCPP_DIAGNOSTIC_POP
+    _LIBCUDACXX_DIAGNOSTIC_POP
     va_end(ap_copy);
     if (count < 0)
         return count;
@@ -36,10 +36,10 @@ int __libcpp_vasprintf( char **sptr, const char *__restrict format, va_list ap )
         return -1;
     // If we haven't used exactly what was required, something is wrong.
     // Maybe bug in vsnprintf. Report the error and return.
-    _LIBCPP_DIAGNOSTIC_PUSH
-    _LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
+    _LIBCUDACXX_DIAGNOSTIC_PUSH
+    _LIBCUDACXX_CLANG_DIAGNOSTIC_IGNORED("-Wformat-nonliteral")
     if (vsnprintf(p, buffer_size, format, ap) != count) {
-    _LIBCPP_DIAGNOSTIC_POP
+    _LIBCUDACXX_DIAGNOSTIC_POP
         free(p);
         return -1;
     }

diff  --git a/libcxx/src/support/win32/thread_win32.cpp b/libcxx/src/support/win32/thread_win32.cpp
index f2072b143568..8ae2a72014c7 100644
--- a/libcxx/src/support/win32/thread_win32.cpp
+++ b/libcxx/src/support/win32/thread_win32.cpp
@@ -13,107 +13,107 @@
 #include <process.h>
 #include <fibersapi.h>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-static_assert(sizeof(__libcpp_mutex_t) == sizeof(SRWLOCK), "");
-static_assert(alignof(__libcpp_mutex_t) == alignof(SRWLOCK), "");
+static_assert(sizeof(__LIBCUDACXX_mutex_t) == sizeof(SRWLOCK), "");
+static_assert(alignof(__LIBCUDACXX_mutex_t) == alignof(SRWLOCK), "");
 
-static_assert(sizeof(__libcpp_recursive_mutex_t) == sizeof(CRITICAL_SECTION),
+static_assert(sizeof(__LIBCUDACXX_recursive_mutex_t) == sizeof(CRITICAL_SECTION),
               "");
-static_assert(alignof(__libcpp_recursive_mutex_t) == alignof(CRITICAL_SECTION),
+static_assert(alignof(__LIBCUDACXX_recursive_mutex_t) == alignof(CRITICAL_SECTION),
               "");
 
-static_assert(sizeof(__libcpp_condvar_t) == sizeof(CONDITION_VARIABLE), "");
-static_assert(alignof(__libcpp_condvar_t) == alignof(CONDITION_VARIABLE), "");
+static_assert(sizeof(__LIBCUDACXX_condvar_t) == sizeof(CONDITION_VARIABLE), "");
+static_assert(alignof(__LIBCUDACXX_condvar_t) == alignof(CONDITION_VARIABLE), "");
 
-static_assert(sizeof(__libcpp_exec_once_flag) == sizeof(INIT_ONCE), "");
-static_assert(alignof(__libcpp_exec_once_flag) == alignof(INIT_ONCE), "");
+static_assert(sizeof(__LIBCUDACXX_exec_once_flag) == sizeof(INIT_ONCE), "");
+static_assert(alignof(__LIBCUDACXX_exec_once_flag) == alignof(INIT_ONCE), "");
 
-static_assert(sizeof(__libcpp_thread_id) == sizeof(DWORD), "");
-static_assert(alignof(__libcpp_thread_id) == alignof(DWORD), "");
+static_assert(sizeof(__LIBCUDACXX_thread_id) == sizeof(DWORD), "");
+static_assert(alignof(__LIBCUDACXX_thread_id) == alignof(DWORD), "");
 
-static_assert(sizeof(__libcpp_thread_t) == sizeof(HANDLE), "");
-static_assert(alignof(__libcpp_thread_t) == alignof(HANDLE), "");
+static_assert(sizeof(__LIBCUDACXX_thread_t) == sizeof(HANDLE), "");
+static_assert(alignof(__LIBCUDACXX_thread_t) == alignof(HANDLE), "");
 
-static_assert(sizeof(__libcpp_tls_key) == sizeof(DWORD), "");
-static_assert(alignof(__libcpp_tls_key) == alignof(DWORD), "");
+static_assert(sizeof(__LIBCUDACXX_tls_key) == sizeof(DWORD), "");
+static_assert(alignof(__LIBCUDACXX_tls_key) == alignof(DWORD), "");
 
 // Mutex
-int __libcpp_recursive_mutex_init(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_init(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   InitializeCriticalSection((LPCRITICAL_SECTION)__m);
   return 0;
 }
 
-int __libcpp_recursive_mutex_lock(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_lock(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   EnterCriticalSection((LPCRITICAL_SECTION)__m);
   return 0;
 }
 
-bool __libcpp_recursive_mutex_trylock(__libcpp_recursive_mutex_t *__m)
+bool __LIBCUDACXX_recursive_mutex_trylock(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   return TryEnterCriticalSection((LPCRITICAL_SECTION)__m) != 0;
 }
 
-int __libcpp_recursive_mutex_unlock(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_unlock(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   LeaveCriticalSection((LPCRITICAL_SECTION)__m);
   return 0;
 }
 
-int __libcpp_recursive_mutex_destroy(__libcpp_recursive_mutex_t *__m)
+int __LIBCUDACXX_recursive_mutex_destroy(__LIBCUDACXX_recursive_mutex_t *__m)
 {
   DeleteCriticalSection((LPCRITICAL_SECTION)__m);
   return 0;
 }
 
-int __libcpp_mutex_lock(__libcpp_mutex_t *__m)
+int __LIBCUDACXX_mutex_lock(__LIBCUDACXX_mutex_t *__m)
 {
   AcquireSRWLockExclusive((PSRWLOCK)__m);
   return 0;
 }
 
-bool __libcpp_mutex_trylock(__libcpp_mutex_t *__m)
+bool __LIBCUDACXX_mutex_trylock(__LIBCUDACXX_mutex_t *__m)
 {
   return TryAcquireSRWLockExclusive((PSRWLOCK)__m) != 0;
 }
 
-int __libcpp_mutex_unlock(__libcpp_mutex_t *__m)
+int __LIBCUDACXX_mutex_unlock(__LIBCUDACXX_mutex_t *__m)
 {
   ReleaseSRWLockExclusive((PSRWLOCK)__m);
   return 0;
 }
 
-int __libcpp_mutex_destroy(__libcpp_mutex_t *__m)
+int __LIBCUDACXX_mutex_destroy(__LIBCUDACXX_mutex_t *__m)
 {
   static_cast<void>(__m);
   return 0;
 }
 
 // Condition Variable
-int __libcpp_condvar_signal(__libcpp_condvar_t *__cv)
+int __LIBCUDACXX_condvar_signal(__LIBCUDACXX_condvar_t *__cv)
 {
   WakeConditionVariable((PCONDITION_VARIABLE)__cv);
   return 0;
 }
 
-int __libcpp_condvar_broadcast(__libcpp_condvar_t *__cv)
+int __LIBCUDACXX_condvar_broadcast(__LIBCUDACXX_condvar_t *__cv)
 {
   WakeAllConditionVariable((PCONDITION_VARIABLE)__cv);
   return 0;
 }
 
-int __libcpp_condvar_wait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m)
+int __LIBCUDACXX_condvar_wait(__LIBCUDACXX_condvar_t *__cv, __LIBCUDACXX_mutex_t *__m)
 {
   SleepConditionVariableSRW((PCONDITION_VARIABLE)__cv, (PSRWLOCK)__m, INFINITE, 0);
   return 0;
 }
 
-int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
-                               __libcpp_timespec_t *__ts)
+int __LIBCUDACXX_condvar_timedwait(__LIBCUDACXX_condvar_t *__cv, __LIBCUDACXX_mutex_t *__m,
+                               __LIBCUDACXX_timespec_t *__ts)
 {
-  using namespace _VSTD::chrono;
+  using namespace _CUDA_VSTD::chrono;
 
   auto duration = seconds(__ts->tv_sec) + nanoseconds(__ts->tv_nsec);
   auto abstime =
@@ -131,15 +131,15 @@ int __libcpp_condvar_timedwait(__libcpp_condvar_t *__cv, __libcpp_mutex_t *__m,
   return 0;
 }
 
-int __libcpp_condvar_destroy(__libcpp_condvar_t *__cv)
+int __LIBCUDACXX_condvar_destroy(__LIBCUDACXX_condvar_t *__cv)
 {
   static_cast<void>(__cv);
   return 0;
 }
 
 // Execute Once
-static inline _LIBCPP_INLINE_VISIBILITY BOOL CALLBACK
-__libcpp_init_once_execute_once_thunk(PINIT_ONCE __init_once, PVOID __parameter,
+static inline _LIBCUDACXX_INLINE_VISIBILITY BOOL CALLBACK
+__LIBCUDACXX_init_once_execute_once_thunk(PINIT_ONCE __init_once, PVOID __parameter,
                                       PVOID *__context)
 {
   static_cast<void>(__init_once);
@@ -150,58 +150,58 @@ __libcpp_init_once_execute_once_thunk(PINIT_ONCE __init_once, PVOID __parameter,
   return TRUE;
 }
 
-int __libcpp_execute_once(__libcpp_exec_once_flag *__flag,
+int __LIBCUDACXX_execute_once(__LIBCUDACXX_exec_once_flag *__flag,
                           void (*__init_routine)(void))
 {
-  if (!InitOnceExecuteOnce((PINIT_ONCE)__flag, __libcpp_init_once_execute_once_thunk,
+  if (!InitOnceExecuteOnce((PINIT_ONCE)__flag, __LIBCUDACXX_init_once_execute_once_thunk,
                            reinterpret_cast<void *>(__init_routine), NULL))
     return GetLastError();
   return 0;
 }
 
 // Thread ID
-bool __libcpp_thread_id_equal(__libcpp_thread_id __lhs,
-                              __libcpp_thread_id __rhs)
+bool __LIBCUDACXX_thread_id_equal(__LIBCUDACXX_thread_id __lhs,
+                              __LIBCUDACXX_thread_id __rhs)
 {
   return __lhs == __rhs;
 }
 
-bool __libcpp_thread_id_less(__libcpp_thread_id __lhs, __libcpp_thread_id __rhs)
+bool __LIBCUDACXX_thread_id_less(__LIBCUDACXX_thread_id __lhs, __LIBCUDACXX_thread_id __rhs)
 {
   return __lhs < __rhs;
 }
 
 // Thread
-struct __libcpp_beginthreadex_thunk_data
+struct __LIBCUDACXX_beginthreadex_thunk_data
 {
   void *(*__func)(void *);
   void *__arg;
 };
 
-static inline _LIBCPP_INLINE_VISIBILITY unsigned WINAPI
-__libcpp_beginthreadex_thunk(void *__raw_data)
+static inline _LIBCUDACXX_INLINE_VISIBILITY unsigned WINAPI
+__LIBCUDACXX_beginthreadex_thunk(void *__raw_data)
 {
   auto *__data =
-      static_cast<__libcpp_beginthreadex_thunk_data *>(__raw_data);
+      static_cast<__LIBCUDACXX_beginthreadex_thunk_data *>(__raw_data);
   auto *__func = __data->__func;
   void *__arg = __data->__arg;
   delete __data;
   return static_cast<unsigned>(reinterpret_cast<uintptr_t>(__func(__arg)));
 }
 
-bool __libcpp_thread_isnull(const __libcpp_thread_t *__t) {
+bool __LIBCUDACXX_thread_isnull(const __LIBCUDACXX_thread_t *__t) {
   return *__t == 0;
 }
 
-int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
+int __LIBCUDACXX_thread_create(__LIBCUDACXX_thread_t *__t, void *(*__func)(void *),
                            void *__arg)
 {
-  auto *__data = new __libcpp_beginthreadex_thunk_data;
+  auto *__data = new __LIBCUDACXX_beginthreadex_thunk_data;
   __data->__func = __func;
   __data->__arg = __arg;
 
   *__t = reinterpret_cast<HANDLE>(_beginthreadex(nullptr, 0,
-                                                 __libcpp_beginthreadex_thunk,
+                                                 __LIBCUDACXX_beginthreadex_thunk,
                                                  __data, 0, nullptr));
 
   if (*__t)
@@ -209,17 +209,17 @@ int __libcpp_thread_create(__libcpp_thread_t *__t, void *(*__func)(void *),
   return GetLastError();
 }
 
-__libcpp_thread_id __libcpp_thread_get_current_id()
+__LIBCUDACXX_thread_id __LIBCUDACXX_thread_get_current_id()
 {
   return GetCurrentThreadId();
 }
 
-__libcpp_thread_id __libcpp_thread_get_id(const __libcpp_thread_t *__t)
+__LIBCUDACXX_thread_id __LIBCUDACXX_thread_get_id(const __LIBCUDACXX_thread_t *__t)
 {
   return GetThreadId(*__t);
 }
 
-int __libcpp_thread_join(__libcpp_thread_t *__t)
+int __LIBCUDACXX_thread_join(__LIBCUDACXX_thread_t *__t)
 {
   if (WaitForSingleObjectEx(*__t, INFINITE, FALSE) == WAIT_FAILED)
     return GetLastError();
@@ -228,19 +228,19 @@ int __libcpp_thread_join(__libcpp_thread_t *__t)
   return 0;
 }
 
-int __libcpp_thread_detach(__libcpp_thread_t *__t)
+int __LIBCUDACXX_thread_detach(__LIBCUDACXX_thread_t *__t)
 {
   if (!CloseHandle(*__t))
     return GetLastError();
   return 0;
 }
 
-void __libcpp_thread_yield()
+void __LIBCUDACXX_thread_yield()
 {
   SwitchToThread();
 }
 
-void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
+void __LIBCUDACXX_thread_sleep_for(const chrono::nanoseconds& __ns)
 {
   // round-up to the nearest millisecond
   chrono::milliseconds __ms = chrono::ceil<chrono::milliseconds>(__ns);
@@ -249,8 +249,8 @@ void __libcpp_thread_sleep_for(const chrono::nanoseconds& __ns)
 }
 
 // Thread Local Storage
-int __libcpp_tls_create(__libcpp_tls_key* __key,
-                        void(_LIBCPP_TLS_DESTRUCTOR_CC* __at_exit)(void*))
+int __LIBCUDACXX_tls_create(__LIBCUDACXX_tls_key* __key,
+                        void(_LIBCUDACXX_TLS_DESTRUCTOR_CC* __at_exit)(void*))
 {
   DWORD index = FlsAlloc(__at_exit);
   if (index == FLS_OUT_OF_INDEXES)
@@ -259,16 +259,16 @@ int __libcpp_tls_create(__libcpp_tls_key* __key,
   return 0;
 }
 
-void *__libcpp_tls_get(__libcpp_tls_key __key)
+void *__LIBCUDACXX_tls_get(__LIBCUDACXX_tls_key __key)
 {
   return FlsGetValue(__key);
 }
 
-int __libcpp_tls_set(__libcpp_tls_key __key, void *__p)
+int __LIBCUDACXX_tls_set(__LIBCUDACXX_tls_key __key, void *__p)
 {
   if (!FlsSetValue(__key, __p))
     return GetLastError();
   return 0;
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/system_error.cpp b/libcxx/src/system_error.cpp
index ba5fa8f30b28..ab2ad345a7df 100644
--- a/libcxx/src/system_error.cpp
+++ b/libcxx/src/system_error.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 #include <__config>
-#ifdef _LIBCPP_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
-#   define _LIBCPP_ERROR_CATEGORY_DEFINE_LEGACY_INLINE_FUNCTIONS
+#ifdef _LIBCUDACXX_DEPRECATED_ABI_LEGACY_LIBRARY_DEFINITIONS_FOR_INLINE_FUNCTIONS
+#   define _LIBCUDACXX_ERROR_CATEGORY_DEFINE_LEGACY_INLINE_FUNCTIONS
 #endif
 
 #include <__assert>
@@ -26,11 +26,11 @@
 #include <android/api-level.h>
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // class error_category
 
-#if defined(_LIBCPP_ERROR_CATEGORY_DEFINE_LEGACY_INLINE_FUNCTIONS)
+#if defined(_LIBCUDACXX_ERROR_CATEGORY_DEFINE_LEGACY_INLINE_FUNCTIONS)
 error_category::error_category() noexcept
 {
 }
@@ -58,7 +58,7 @@ error_category::equivalent(const error_code& code, int condition) const noexcept
     return *this == code.category() && code.value() == condition;
 }
 
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 namespace {
 
 //  GLIBC also uses 1024 as the maximum buffer size internally.
@@ -66,7 +66,7 @@ constexpr size_t strerror_buff_size = 1024;
 
 string do_strerror_r(int ev);
 
-#if defined(_LIBCPP_MSVCRT_LIKE)
+#if defined(_LIBCUDACXX_MSVCRT_LIKE)
 string do_strerror_r(int ev) {
   char buffer[strerror_buff_size];
   if (::strerror_s(buffer, strerror_buff_size, ev) == 0)
@@ -103,7 +103,7 @@ handle_strerror_r_return(int strerror_return, char *buffer) {
   if (new_errno == EINVAL)
     return "";
 
-  _LIBCPP_ASSERT(new_errno == ERANGE, "unexpected error from ::strerror_r");
+  _LIBCUDACXX_ASSERT(new_errno == ERANGE, "unexpected error from ::strerror_r");
   // FIXME maybe? 'strerror_buff_size' is likely to exceed the
   // maximum error size so ERANGE shouldn't be returned.
   std::abort();
@@ -133,14 +133,14 @@ string do_strerror_r(int ev) {
 string
 __do_message::message(int ev) const
 {
-#if defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(_LIBCUDACXX_HAS_NO_THREADS)
     return string(::strerror(ev));
 #else
     return do_strerror_r(ev);
 #endif
 }
 
-class _LIBCPP_HIDDEN __generic_error_category
+class _LIBCUDACXX_HIDDEN __generic_error_category
     : public __do_message
 {
 public:
@@ -157,10 +157,10 @@ __generic_error_category::name() const noexcept
 string
 __generic_error_category::message(int ev) const
 {
-#ifdef _LIBCPP_ELAST
-    if (ev > _LIBCPP_ELAST)
+#ifdef _LIBCUDACXX_ELAST
+    if (ev > _LIBCUDACXX_ELAST)
       return string("unspecified generic_category error");
-#endif // _LIBCPP_ELAST
+#endif // _LIBCUDACXX_ELAST
     return __do_message::message(ev);
 }
 
@@ -171,7 +171,7 @@ generic_category() noexcept
     return s;
 }
 
-class _LIBCPP_HIDDEN __system_error_category
+class _LIBCUDACXX_HIDDEN __system_error_category
     : public __do_message
 {
 public:
@@ -189,20 +189,20 @@ __system_error_category::name() const noexcept
 string
 __system_error_category::message(int ev) const
 {
-#ifdef _LIBCPP_ELAST
-    if (ev > _LIBCPP_ELAST)
+#ifdef _LIBCUDACXX_ELAST
+    if (ev > _LIBCUDACXX_ELAST)
       return string("unspecified system_category error");
-#endif // _LIBCPP_ELAST
+#endif // _LIBCUDACXX_ELAST
     return __do_message::message(ev);
 }
 
 error_condition
 __system_error_category::default_error_condition(int ev) const noexcept
 {
-#ifdef _LIBCPP_ELAST
-    if (ev > _LIBCPP_ELAST)
+#ifdef _LIBCUDACXX_ELAST
+    if (ev > _LIBCUDACXX_ELAST)
       return error_condition(ev, system_category());
-#endif // _LIBCPP_ELAST
+#endif // _LIBCUDACXX_ELAST
     return error_condition(ev, generic_category());
 }
 
@@ -286,13 +286,13 @@ system_error::~system_error() noexcept
 void
 __throw_system_error(int ev, const char* what_arg)
 {
-#ifndef _LIBCPP_NO_EXCEPTIONS
+#ifndef _LIBCUDACXX_NO_EXCEPTIONS
     throw system_error(error_code(ev, system_category()), what_arg);
 #else
     (void)ev;
     (void)what_arg;
-    _VSTD::abort();
+    _CUDA_VSTD::abort();
 #endif
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/thread.cpp b/libcxx/src/thread.cpp
index ce2822dbac85..29219f9d7c6e 100644
--- a/libcxx/src/thread.cpp
+++ b/libcxx/src/thread.cpp
@@ -8,7 +8,7 @@
 
 #include <__config>
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#ifndef _LIBCUDACXX_HAS_NO_THREADS
 
 #include <exception>
 #include <future>
@@ -24,19 +24,19 @@
 #pragma weak pthread_create // Do not create libpthread dependency
 #endif
 
-#if defined(_LIBCPP_WIN32API)
+#if defined(_LIBCUDACXX_WIN32API)
 #include <windows.h>
 #endif
 
-#if defined(__ELF__) && defined(_LIBCPP_LINK_PTHREAD_LIB)
+#if defined(__ELF__) && defined(_LIBCUDACXX_LINK_PTHREAD_LIB)
 #pragma comment(lib, "pthread")
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 thread::~thread()
 {
-    if (!__libcpp_thread_isnull(&__t_))
+    if (!__LIBCUDACXX_thread_isnull(&__t_))
         terminate();
 }
 
@@ -44,11 +44,11 @@ void
 thread::join()
 {
     int ec = EINVAL;
-    if (!__libcpp_thread_isnull(&__t_))
+    if (!__LIBCUDACXX_thread_isnull(&__t_))
     {
-        ec = __libcpp_thread_join(&__t_);
+        ec = __LIBCUDACXX_thread_join(&__t_);
         if (ec == 0)
-            __t_ = _LIBCPP_NULL_THREAD;
+            __t_ = _LIBCUDACXX_NULL_THREAD;
     }
 
     if (ec)
@@ -59,11 +59,11 @@ void
 thread::detach()
 {
     int ec = EINVAL;
-    if (!__libcpp_thread_isnull(&__t_))
+    if (!__LIBCUDACXX_thread_isnull(&__t_))
     {
-        ec = __libcpp_thread_detach(&__t_);
+        ec = __LIBCUDACXX_thread_detach(&__t_);
         if (ec == 0)
-            __t_ = _LIBCPP_NULL_THREAD;
+            __t_ = _LIBCUDACXX_NULL_THREAD;
     }
 
     if (ec)
@@ -82,15 +82,15 @@ thread::hardware_concurrency() noexcept
     if (result < 0)
         return 0;
     return static_cast<unsigned>(result);
-#elif defined(_LIBCPP_WIN32API)
+#elif defined(_LIBCUDACXX_WIN32API)
     SYSTEM_INFO info;
     GetSystemInfo(&info);
     return info.dwNumberOfProcessors;
 #else  // defined(CTL_HW) && defined(HW_NCPU)
     // TODO: grovel through /proc or check cpuid on x86 and similar
     // instructions on other architectures.
-#   if defined(_LIBCPP_WARNING)
-        _LIBCPP_WARNING("hardware_concurrency not yet implemented")
+#   if defined(_LIBCUDACXX_WARNING)
+        _LIBCUDACXX_WARNING("hardware_concurrency not yet implemented")
 #   else
 #       warning hardware_concurrency not yet implemented
 #   endif
@@ -106,7 +106,7 @@ sleep_for(const chrono::nanoseconds& ns)
 {
     if (ns > chrono::nanoseconds::zero())
     {
-        __libcpp_thread_sleep_for(ns);
+        __LIBCUDACXX_thread_sleep_for(ns);
     }
 }
 
@@ -127,7 +127,7 @@ __thread_local_data()
 // __thread_struct_imp
 
 template <class T>
-class _LIBCPP_HIDDEN __hidden_allocator
+class _LIBCUDACXX_HIDDEN __hidden_allocator
 {
 public:
     typedef T  value_type;
@@ -139,7 +139,7 @@ class _LIBCPP_HIDDEN __hidden_allocator
     size_t max_size() const {return size_t(~0) / sizeof(T);}
 };
 
-class _LIBCPP_HIDDEN __thread_struct_imp
+class _LIBCUDACXX_HIDDEN __thread_struct_imp
 {
     typedef vector<__assoc_sub_state*,
                           __hidden_allocator<__assoc_sub_state*> > _AsyncStates;
@@ -212,6 +212,6 @@ __thread_struct::__make_ready_at_thread_exit(__assoc_sub_state* __s)
     __p_->__make_ready_at_thread_exit(__s);
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // !_LIBCPP_HAS_NO_THREADS
+#endif // !_LIBCUDACXX_HAS_NO_THREADS

diff  --git a/libcxx/src/typeinfo.cpp b/libcxx/src/typeinfo.cpp
index c7f0a70f85c5..0346b5117275 100644
--- a/libcxx/src/typeinfo.cpp
+++ b/libcxx/src/typeinfo.cpp
@@ -8,7 +8,7 @@
 
 #include <typeinfo>
 
-#if defined(_LIBCPP_ABI_MICROSOFT) && !defined(_LIBCPP_ABI_VCRUNTIME)
+#if defined(_LIBCUDACXX_ABI_MICROSOFT) && !defined(_LIBCUDACXX_ABI_VCRUNTIME)
 
 #include <string.h>
 
@@ -44,14 +44,14 @@ size_t std::type_info::hash_code() const noexcept {
 
   return value;
 }
-#endif // _LIBCPP_ABI_MICROSOFT
+#endif // _LIBCUDACXX_ABI_MICROSOFT
 
-// FIXME: Remove the _LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY configuration.
+// FIXME: Remove the _LIBCUDACXX_BUILDING_HAS_NO_ABI_LIBRARY configuration.
 #if (!defined(LIBCXX_BUILDING_LIBCXXABI) &&               \
      !defined(LIBCXXRT) &&                                \
      !defined(__GLIBCXX__) &&                             \
-     !defined(_LIBCPP_ABI_VCRUNTIME)) ||                  \
-    defined(_LIBCPP_BUILDING_HAS_NO_ABI_LIBRARY)
+     !defined(_LIBCUDACXX_ABI_VCRUNTIME)) ||                  \
+    defined(_LIBCUDACXX_BUILDING_HAS_NO_ABI_LIBRARY)
 std::type_info::~type_info()
 {
 }

diff  --git a/libcxx/src/utility.cpp b/libcxx/src/utility.cpp
index 44433d11d7aa..32475877620c 100644
--- a/libcxx/src/utility.cpp
+++ b/libcxx/src/utility.cpp
@@ -8,8 +8,8 @@
 
 #include <utility>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 const piecewise_construct_t piecewise_construct{};
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/valarray.cpp b/libcxx/src/valarray.cpp
index 5d63bc11846d..b5adb2279b80 100644
--- a/libcxx/src/valarray.cpp
+++ b/libcxx/src/valarray.cpp
@@ -8,12 +8,12 @@
 
 #include <valarray>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
 // These two symbols are part of the v1 ABI but not part of the >=v2 ABI.
-#if _LIBCPP_ABI_VERSION == 1
-template _LIBCPP_FUNC_VIS valarray<size_t>::valarray(size_t);
-template _LIBCPP_FUNC_VIS valarray<size_t>::~valarray();
+#if _LIBCUDACXX_ABI_VERSION == 1
+template _LIBCUDACXX_FUNC_VIS valarray<size_t>::valarray(size_t);
+template _LIBCUDACXX_FUNC_VIS valarray<size_t>::~valarray();
 #endif
 
 template void valarray<size_t>::resize(size_t, size_t);
@@ -54,4 +54,4 @@ gslice::__init(size_t __start)
     }
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/vector.cpp b/libcxx/src/vector.cpp
index fa63d5c5e31c..9d7950261872 100644
--- a/libcxx/src/vector.cpp
+++ b/libcxx/src/vector.cpp
@@ -8,27 +8,27 @@
 
 #include <vector>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#ifndef _LIBCPP_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
+#ifndef _LIBCUDACXX_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
 
 template <bool>
 struct __vector_base_common;
 
 template <>
 struct __vector_base_common<true> {
-  _LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_length_error() const;
-  _LIBCPP_NORETURN _LIBCPP_EXPORTED_FROM_ABI void __throw_out_of_range() const;
+  _LIBCUDACXX_NORETURN _LIBCUDACXX_EXPORTED_FROM_ABI void __throw_length_error() const;
+  _LIBCUDACXX_NORETURN _LIBCUDACXX_EXPORTED_FROM_ABI void __throw_out_of_range() const;
 };
 
 void __vector_base_common<true>::__throw_length_error() const {
-  _VSTD::__throw_length_error("vector");
+  _CUDA_VSTD::__throw_length_error("vector");
 }
 
 void __vector_base_common<true>::__throw_out_of_range() const {
-  _VSTD::__throw_out_of_range("vector");
+  _CUDA_VSTD::__throw_out_of_range("vector");
 }
 
-#endif // _LIBCPP_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
+#endif // _LIBCUDACXX_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/src/verbose_abort.cpp b/libcxx/src/verbose_abort.cpp
index a9fba5e3c007..41b494ea84e9 100644
--- a/libcxx/src/verbose_abort.cpp
+++ b/libcxx/src/verbose_abort.cpp
@@ -26,10 +26,10 @@ extern "C" void android_set_abort_message(const char* msg);
 #  include <CrashReporterClient.h>
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-_LIBCPP_WEAK
-void __libcpp_verbose_abort(char const* format, ...) {
+_LIBCUDACXX_WEAK
+void __LIBCUDACXX_verbose_abort(char const* format, ...) {
   // Write message to stderr. We do this before formatting into a
   // buffer so that we still get some information out if that fails.
   {
@@ -74,4 +74,4 @@ void __libcpp_verbose_abort(char const* format, ...) {
   std::abort();
 }
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp
index c1acc100a660..0f6bdadee092 100644
--- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.cxx1z.pass.cpp
@@ -19,11 +19,11 @@
 
 //
 //  In C++17, random_shuffle has been removed.
-//  However, for backwards compatibility, if _LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
+//  However, for backwards compatibility, if _LIBCUDACXX_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
 //  is defined before including <algorithm>, then random_shuffle will be restored.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <algorithm>
 #include <vector>

diff  --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.verify.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.verify.cpp
index fc58955c1c2c..a83de26b6639 100644
--- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.verify.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.depr_in_cxx14.verify.cpp
@@ -19,7 +19,7 @@
 
 // UNSUPPORTED: c++03, c++11
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE
 
 #include <algorithm>
 #include <cstddef>

diff  --git a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy.pass.cpp b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy.pass.cpp
index 0eac9545da35..a42a6cbcbf9a 100644
--- a/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.modifying.operations/copy.pass.cpp
@@ -7,11 +7,11 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // When the debug mode is enabled, we don't unwrap iterators in std::copy
 // so we don't get this optimization.
-// UNSUPPORTED: libcpp-has-debug-mode
+// UNSUPPORTED: LIBCUDACXX-has-debug-mode
 
 // <algorithm>
 

diff  --git a/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/make.heap/complexity.pass.cpp b/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/make.heap/complexity.pass.cpp
index a878508f63d3..cca8329b214a 100644
--- a/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/make.heap/complexity.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/make.heap/complexity.pass.cpp
@@ -64,7 +64,7 @@ int main(int, char**)
   std::make_heap(v.begin(), v.end());
   assert(stats.copied == 0);
   assert(stats.moved == 153'486);
-#ifndef _LIBCPP_ENABLE_DEBUG_MODE
+#ifndef _LIBCUDACXX_ENABLE_DEBUG_MODE
   assert(stats.compared == 188'285);
 #endif
 

diff  --git a/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp b/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp
index 0ed37a2b920e..0482ed8587df 100644
--- a/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.sorting/alg.heap.operations/sort.heap/complexity.pass.cpp
@@ -65,7 +65,7 @@ int main(int, char**)
   std::sort_heap(v.begin(), v.end());
   assert(stats.copied == 0);
   assert(stats.moved == 1'764'997);
-#ifndef _LIBCPP_ENABLE_DEBUG_MODE
+#ifndef _LIBCUDACXX_ENABLE_DEBUG_MODE
   assert(stats.compared == 1'534'701);
 #endif
 

diff  --git a/libcxx/test/libcxx/algorithms/alg.sorting/assert.min.max.pass.cpp b/libcxx/test/libcxx/algorithms/alg.sorting/assert.min.max.pass.cpp
index 5cd15d56af82..e035d429e583 100644
--- a/libcxx/test/libcxx/algorithms/alg.sorting/assert.min.max.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/alg.sorting/assert.min.max.pass.cpp
@@ -9,9 +9,9 @@
 // <algorithm>
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, c++11, c++14, c++17, libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: c++03, c++11, c++14, c++17, LIBCUDACXX-has-no-incomplete-ranges
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <algorithm>
 #include <array>
@@ -20,10 +20,10 @@
 
 int main(int, char**) {
   std::initializer_list<int> init_list{};
-  TEST_LIBCPP_ASSERT_FAILURE(std::ranges::minmax(init_list),
+  TEST_LIBCUDACXX_ASSERT_FAILURE(std::ranges::minmax(init_list),
                              "initializer_list has to contain at least one element");
 
-  TEST_LIBCPP_ASSERT_FAILURE(std::ranges::minmax(std::array<int, 0>{}),
+  TEST_LIBCUDACXX_ASSERT_FAILURE(std::ranges::minmax(std::array<int, 0>{}),
                              "range has to contain at least one element");
 
   return 0;

diff  --git a/libcxx/test/libcxx/algorithms/debug_less.inconsistent.pass.cpp b/libcxx/test/libcxx/algorithms/debug_less.inconsistent.pass.cpp
index 4f7d4793949d..2c10582b1646 100644
--- a/libcxx/test/libcxx/algorithms/debug_less.inconsistent.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/debug_less.inconsistent.pass.cpp
@@ -13,7 +13,7 @@
 // Make sure __debug_less asserts when the comparator is not consistent.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <algorithm>
 #include <iterator>
@@ -46,7 +46,7 @@ int main(int, char**) {
     BadComparator<MT0> c;
     std::__debug_less<BadComparator<MT0>> d(c);
 
-    TEST_LIBCPP_ASSERT_FAILURE(d(one, two), "Comparator does not induce a strict weak ordering");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(d(one, two), "Comparator does not induce a strict weak ordering");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp
index 89f12e5aa0cd..f931e2f2a1a2 100644
--- a/libcxx/test/libcxx/algorithms/debug_less.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/debug_less.pass.cpp
@@ -13,7 +13,7 @@
 // __debug_less checks that a comparator actually provides a strict-weak ordering.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <algorithm>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/algorithms/nth_element_stability.pass.cpp b/libcxx/test/libcxx/algorithms/nth_element_stability.pass.cpp
index 7124e54c2285..d4585d71ac8b 100644
--- a/libcxx/test/libcxx/algorithms/nth_element_stability.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/nth_element_stability.pass.cpp
@@ -11,7 +11,7 @@
 // Test std::nth_element stability randomization
 
 // UNSUPPORTED: c++03
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
 
 #include <algorithm>
 #include <array>

diff  --git a/libcxx/test/libcxx/algorithms/partial_sort_stability.pass.cpp b/libcxx/test/libcxx/algorithms/partial_sort_stability.pass.cpp
index 3f9a5a0bd770..6b086b448a90 100644
--- a/libcxx/test/libcxx/algorithms/partial_sort_stability.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/partial_sort_stability.pass.cpp
@@ -11,7 +11,7 @@
 // Test std::partial_sort stability randomization
 
 // UNSUPPORTED: c++03
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
 
 #include <algorithm>
 #include <array>

diff  --git a/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_comparators.pass.cpp b/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_comparators.pass.cpp
index 343ef41c4b92..fc2624fc0086 100644
--- a/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_comparators.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_comparators.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp b/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp
index c0295b81f879..f9ec4fb72984 100644
--- a/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/ranges_robust_against_copying_projections.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/libcxx/algorithms/sort_stability.pass.cpp b/libcxx/test/libcxx/algorithms/sort_stability.pass.cpp
index 664ea708a6ec..ca9ca0cb2802 100644
--- a/libcxx/test/libcxx/algorithms/sort_stability.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/sort_stability.pass.cpp
@@ -11,7 +11,7 @@
 // Test std::sort stability randomization
 
 // UNSUPPORTED: c++03
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DEBUG_RANDOMIZE_UNSPECIFIED_STABILITY
 
 #include <algorithm>
 #include <array>

diff  --git a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_iterator.compile.pass.cpp b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_iterator.compile.pass.cpp
index ff2378561191..394d4a4d30ac 100644
--- a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_iterator.compile.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_iterator.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class I>
 // concept __nothrow_forward_iterator;

diff  --git a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp
index bd41a46cfd37..341c0e48feb6 100644
--- a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_forward_range.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 // concept __nothrow_forward_range;

diff  --git a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_iterator.compile.pass.cpp b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_iterator.compile.pass.cpp
index b8801909c69d..7d68172a1628 100644
--- a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_iterator.compile.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_iterator.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class I>
 // concept __nothrow_input_iterator;

diff  --git a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_range.compile.pass.cpp b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_range.compile.pass.cpp
index ea957e6c8ff3..f87476c4e3b0 100644
--- a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_range.compile.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_input_range.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 // concept __nothrow_input_range;

diff  --git a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_sentinel_for.compile.pass.cpp b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_sentinel_for.compile.pass.cpp
index 1ae42dad42df..9572094a27f9 100644
--- a/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_sentinel_for.compile.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/specialized.algorithms/special.mem.concepts/nothrow_sentinel_for.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class S, class I>
 // concept __nothrow_sentinel_for;

diff  --git a/libcxx/test/libcxx/algorithms/version.pass.cpp b/libcxx/test/libcxx/algorithms/version.pass.cpp
index 57d84b3ffce8..6f98d0c196bb 100644
--- a/libcxx/test/libcxx/algorithms/version.pass.cpp
+++ b/libcxx/test/libcxx/algorithms/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/assertions/assertions_disabled.pass.cpp b/libcxx/test/libcxx/assertions/assertions_disabled.pass.cpp
index 5ec5f12fc285..d1d43d6f8ee3 100644
--- a/libcxx/test/libcxx/assertions/assertions_disabled.pass.cpp
+++ b/libcxx/test/libcxx/assertions/assertions_disabled.pass.cpp
@@ -6,11 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Test that _LIBCPP_ASSERT doesn't do anything when assertions are disabled.
+// Test that _LIBCUDACXX_ASSERT doesn't do anything when assertions are disabled.
 // We need to use -Wno-macro-redefined because the test suite defines
-// _LIBCPP_ENABLE_ASSERTIONS=1 under some configurations.
+// _LIBCUDACXX_ENABLE_ASSERTIONS=1 under some configurations.
 
-// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ENABLE_ASSERTIONS=0
+// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCUDACXX_ENABLE_ASSERTIONS=0
 
 #include <cassert>
 
@@ -18,7 +18,7 @@ bool executed_condition = false;
 bool f() { executed_condition = true; return false; }
 
 int main(int, char**) {
-  _LIBCPP_ASSERT(f(), "message"); // should not execute anything
+  _LIBCUDACXX_ASSERT(f(), "message"); // should not execute anything
   assert(!executed_condition); // really make sure we did not execute anything at all
   return 0;
 }

diff  --git a/libcxx/test/libcxx/assertions/customize_verbose_abort.backdeployment.pass.cpp b/libcxx/test/libcxx/assertions/customize_verbose_abort.backdeployment.pass.cpp
index 15962671a469..d4439def83d7 100644
--- a/libcxx/test/libcxx/assertions/customize_verbose_abort.backdeployment.pass.cpp
+++ b/libcxx/test/libcxx/assertions/customize_verbose_abort.backdeployment.pass.cpp
@@ -7,20 +7,20 @@
 //===----------------------------------------------------------------------===//
 
 // Make sure that we can enable assertions when we back-deploy to older platforms
-// if we define _LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED.
+// if we define _LIBCUDACXX_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED.
 //
 // Note that this test isn't really 
diff erent from customize_verbose_abort.pass.cpp when
 // run outside of back-deployment scenarios, but we always want to run this test.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1 -D_LIBCPP_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1 -D_LIBCUDACXX_AVAILABILITY_CUSTOM_VERBOSE_ABORT_PROVIDED
 
 #include <cstdlib>
 
-void std::__libcpp_verbose_abort(char const*, ...) {
+void std::__LIBCUDACXX_verbose_abort(char const*, ...) {
   std::exit(EXIT_SUCCESS);
 }
 
 int main(int, char**) {
-  _LIBCPP_ASSERT(false, "message");
+  _LIBCUDACXX_ASSERT(false, "message");
   return EXIT_FAILURE;
 }

diff  --git a/libcxx/test/libcxx/assertions/customize_verbose_abort.pass.cpp b/libcxx/test/libcxx/assertions/customize_verbose_abort.pass.cpp
index 3ee9b7803b70..c9ac27179254 100644
--- a/libcxx/test/libcxx/assertions/customize_verbose_abort.pass.cpp
+++ b/libcxx/test/libcxx/assertions/customize_verbose_abort.pass.cpp
@@ -8,7 +8,7 @@
 
 // Test that we can set a custom verbose termination function.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // We flag uses of the verbose termination function in older dylibs at compile-time to avoid runtime
 // failures when back-deploying.
@@ -16,11 +16,11 @@
 
 #include <cstdlib>
 
-void std::__libcpp_verbose_abort(char const*, ...) {
+void std::__LIBCUDACXX_verbose_abort(char const*, ...) {
   std::exit(EXIT_SUCCESS);
 }
 
 int main(int, char**) {
-  _LIBCPP_ASSERT(false, "message");
+  _LIBCUDACXX_ASSERT(false, "message");
   return EXIT_FAILURE;
 }

diff  --git a/libcxx/test/libcxx/assertions/debug_mode_compatibility.pass.cpp b/libcxx/test/libcxx/assertions/debug_mode_compatibility.pass.cpp
index fe7f0389de91..24a96e2e7589 100644
--- a/libcxx/test/libcxx/assertions/debug_mode_compatibility.pass.cpp
+++ b/libcxx/test/libcxx/assertions/debug_mode_compatibility.pass.cpp
@@ -6,11 +6,11 @@
 //
 //===----------------------------------------------------------------------===//
 
-// This test ensures that assertions are still enabled when _LIBCPP_DEBUG=0 is
+// This test ensures that assertions are still enabled when _LIBCUDACXX_DEBUG=0 is
 // defined, for backwards compatibility with code that might have been using
 // it to enable assertions previously.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG=0
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DEBUG=0
 
 // We flag uses of the assertion handler in older dylibs at compile-time to avoid runtime
 // failures when back-deploying.
@@ -18,11 +18,11 @@
 
 #include <cstdlib>
 
-void std::__libcpp_verbose_abort(char const*, ...) {
+void std::__LIBCUDACXX_verbose_abort(char const*, ...) {
   std::exit(EXIT_SUCCESS);
 }
 
 int main(int, char**) {
-  _LIBCPP_ASSERT(false, "message");
+  _LIBCUDACXX_ASSERT(false, "message");
   return EXIT_FAILURE;
 }

diff  --git a/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp b/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp
index 79d26c8c4847..10a36f3e4448 100644
--- a/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp
+++ b/libcxx/test/libcxx/assertions/default_verbose_abort.pass.cpp
@@ -8,7 +8,7 @@
 
 // Test that the default verbose termination function aborts the program.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <csignal>
 #include <cstdlib>
@@ -21,6 +21,6 @@ void signal_handler(int signal) {
 
 int main(int, char**) {
   if (std::signal(SIGABRT, signal_handler) != SIG_ERR)
-    _LIBCPP_ASSERT(false, "foo");
+    _LIBCUDACXX_ASSERT(false, "foo");
   return EXIT_FAILURE;
 }

diff  --git a/libcxx/test/libcxx/assertions/headers_declare_verbose_abort.sh.cpp b/libcxx/test/libcxx/assertions/headers_declare_verbose_abort.sh.cpp
index 53ad13b4d59b..6a00c6615576 100644
--- a/libcxx/test/libcxx/assertions/headers_declare_verbose_abort.sh.cpp
+++ b/libcxx/test/libcxx/assertions/headers_declare_verbose_abort.sh.cpp
@@ -30,7 +30,7 @@ for i, header in enumerate(public_headers):
 // {run}: %{{build}} -DTEST_{i}
 #if defined(TEST_{i}){restrictions}
 #   include <{header}>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 """.format(**vars))
 
@@ -51,715 +51,715 @@ int main(int, char**) { return 0; }
 // RUN: %{build} -DTEST_0
 #if defined(TEST_0)
 #   include <algorithm>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_1
 #if defined(TEST_1)
 #   include <any>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_2
 #if defined(TEST_2)
 #   include <array>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_3
 #if defined(TEST_3)
 #   include <atomic>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_4
-#if defined(TEST_4) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_4) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <barrier>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_5
 #if defined(TEST_5)
 #   include <bit>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_6
 #if defined(TEST_6)
 #   include <bitset>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_7
 #if defined(TEST_7)
 #   include <cassert>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_8
 #if defined(TEST_8)
 #   include <ccomplex>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_9
 #if defined(TEST_9)
 #   include <cctype>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_10
 #if defined(TEST_10)
 #   include <cerrno>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_11
 #if defined(TEST_11)
 #   include <cfenv>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_12
 #if defined(TEST_12)
 #   include <cfloat>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_13
 #if defined(TEST_13)
 #   include <charconv>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_14
 #if defined(TEST_14)
 #   include <chrono>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_15
 #if defined(TEST_15)
 #   include <cinttypes>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_16
 #if defined(TEST_16)
 #   include <ciso646>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_17
 #if defined(TEST_17)
 #   include <climits>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_18
-#if defined(TEST_18) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_18) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <clocale>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_19
 #if defined(TEST_19)
 #   include <cmath>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_20
-#if defined(TEST_20) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_20) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <codecvt>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_21
 #if defined(TEST_21)
 #   include <compare>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_22
 #if defined(TEST_22)
 #   include <complex>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_24
 #if defined(TEST_24)
 #   include <concepts>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_25
 #if defined(TEST_25)
 #   include <condition_variable>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_26
 #if defined(TEST_26)
 #   include <coroutine>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_27
 #if defined(TEST_27)
 #   include <csetjmp>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_28
 #if defined(TEST_28)
 #   include <csignal>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_29
 #if defined(TEST_29)
 #   include <cstdarg>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_30
 #if defined(TEST_30)
 #   include <cstdbool>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_31
 #if defined(TEST_31)
 #   include <cstddef>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_32
 #if defined(TEST_32)
 #   include <cstdint>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_33
 #if defined(TEST_33)
 #   include <cstdio>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_34
 #if defined(TEST_34)
 #   include <cstdlib>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_35
 #if defined(TEST_35)
 #   include <cstring>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_36
 #if defined(TEST_36)
 #   include <ctgmath>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_37
 #if defined(TEST_37)
 #   include <ctime>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_39
 #if defined(TEST_39)
 #   include <cuchar>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_40
-#if defined(TEST_40) && !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if defined(TEST_40) && !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwchar>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_41
-#if defined(TEST_41) && !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if defined(TEST_41) && !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwctype>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_42
 #if defined(TEST_42)
 #   include <deque>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_44
 #if defined(TEST_44)
 #   include <exception>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_45
 #if defined(TEST_45)
 #   include <execution>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_47
-#if defined(TEST_47) && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
+#if defined(TEST_47) && !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
 #   include <filesystem>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_49
 #if defined(TEST_49)
 #   include <format>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_50
 #if defined(TEST_50)
 #   include <forward_list>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_51
-#if defined(TEST_51) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_51) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <fstream>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_52
 #if defined(TEST_52)
 #   include <functional>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_53
-#if defined(TEST_53) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_53) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <future>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_54
 #if defined(TEST_54)
 #   include <initializer_list>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_56
-#if defined(TEST_56) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_56) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iomanip>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_57
-#if defined(TEST_57) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_57) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ios>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_58
 #if defined(TEST_58)
 #   include <iosfwd>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_59
-#if defined(TEST_59) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_59) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iostream>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_60
-#if defined(TEST_60) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_60) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <istream>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_61
 #if defined(TEST_61)
 #   include <iterator>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_62
-#if defined(TEST_62) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_62) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <latch>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_63
 #if defined(TEST_63)
 #   include <limits>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_65
 #if defined(TEST_65)
 #   include <list>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_66
-#if defined(TEST_66) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_66) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <locale>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_68
 #if defined(TEST_68)
 #   include <map>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_70
 #if defined(TEST_70)
 #   include <memory>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_71
-#if defined(TEST_71) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_71) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <mutex>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_72
 #if defined(TEST_72)
 #   include <new>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_73
 #if defined(TEST_73)
 #   include <numbers>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_74
 #if defined(TEST_74)
 #   include <numeric>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_75
 #if defined(TEST_75)
 #   include <optional>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_76
-#if defined(TEST_76) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_76) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ostream>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_77
 #if defined(TEST_77)
 #   include <queue>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_78
 #if defined(TEST_78)
 #   include <random>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_79
 #if defined(TEST_79)
 #   include <ranges>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_80
 #if defined(TEST_80)
 #   include <ratio>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_81
-#if defined(TEST_81) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_81) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <regex>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_82
 #if defined(TEST_82)
 #   include <scoped_allocator>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_83
-#if defined(TEST_83) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_83) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <semaphore>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_84
 #if defined(TEST_84)
 #   include <set>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_86
-#if defined(TEST_86) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_86) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <shared_mutex>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_87
 #if defined(TEST_87)
 #   include <span>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_88
-#if defined(TEST_88) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_88) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <sstream>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_89
 #if defined(TEST_89)
 #   include <stack>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_93
 #if defined(TEST_93)
 #   include <stdexcept>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_97
-#if defined(TEST_97) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_97) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <streambuf>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_98
 #if defined(TEST_98)
 #   include <string>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_100
 #if defined(TEST_100)
 #   include <string_view>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_101
-#if defined(TEST_101) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_101) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <strstream>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_102
 #if defined(TEST_102)
 #   include <system_error>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_104
-#if defined(TEST_104) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_104) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <thread>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_105
 #if defined(TEST_105)
 #   include <tuple>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_106
 #if defined(TEST_106)
 #   include <type_traits>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_107
 #if defined(TEST_107)
 #   include <typeindex>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_108
 #if defined(TEST_108)
 #   include <typeinfo>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_110
 #if defined(TEST_110)
 #   include <unordered_map>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_111
 #if defined(TEST_111)
 #   include <unordered_set>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_112
 #if defined(TEST_112)
 #   include <utility>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_113
 #if defined(TEST_113)
 #   include <valarray>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_114
 #if defined(TEST_114)
 #   include <variant>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_115
 #if defined(TEST_115)
 #   include <vector>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_116
 #if defined(TEST_116)
 #   include <version>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_119
 #if defined(TEST_119) && __cplusplus >= 201103L
 #   include <experimental/algorithm>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_120
-#if defined(TEST_120) && __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
+#if defined(TEST_120) && __cplusplus >= 201103L && !defined(_LIBCUDACXX_HAS_NO_EXPERIMENTAL_COROUTINES)
 #   include <experimental/coroutine>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_121
 #if defined(TEST_121) && __cplusplus >= 201103L
 #   include <experimental/deque>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_122
 #if defined(TEST_122) && __cplusplus >= 201103L
 #   include <experimental/forward_list>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_123
 #if defined(TEST_123) && __cplusplus >= 201103L
 #   include <experimental/functional>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_124
 #if defined(TEST_124) && __cplusplus >= 201103L
 #   include <experimental/iterator>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_125
 #if defined(TEST_125) && __cplusplus >= 201103L
 #   include <experimental/list>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_126
 #if defined(TEST_126) && __cplusplus >= 201103L
 #   include <experimental/map>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_127
 #if defined(TEST_127) && __cplusplus >= 201103L
 #   include <experimental/memory_resource>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_128
 #if defined(TEST_128) && __cplusplus >= 201103L
 #   include <experimental/propagate_const>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_129
-#if defined(TEST_129) && !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
+#if defined(TEST_129) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
 #   include <experimental/regex>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_130
 #if defined(TEST_130) && __cplusplus >= 201103L
 #   include <experimental/set>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_131
 #if defined(TEST_131) && __cplusplus >= 201103L
 #   include <experimental/simd>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_132
 #if defined(TEST_132) && __cplusplus >= 201103L
 #   include <experimental/string>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_133
 #if defined(TEST_133) && __cplusplus >= 201103L
 #   include <experimental/type_traits>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_134
 #if defined(TEST_134) && __cplusplus >= 201103L
 #   include <experimental/unordered_map>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_135
 #if defined(TEST_135) && __cplusplus >= 201103L
 #   include <experimental/unordered_set>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_136
 #if defined(TEST_136) && __cplusplus >= 201103L
 #   include <experimental/utility>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_137
 #if defined(TEST_137) && __cplusplus >= 201103L
 #   include <experimental/vector>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_138
 #if defined(TEST_138)
 #   include <ext/hash_map>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // RUN: %{build} -DTEST_139
 #if defined(TEST_139)
 #   include <ext/hash_set>
-    using HandlerType = decltype(std::__libcpp_verbose_abort);
+    using HandlerType = decltype(std::__LIBCUDACXX_verbose_abort);
 #endif
 
 // GENERATED-MARKER

diff  --git a/libcxx/test/libcxx/assertions/single_expression.sh.cpp b/libcxx/test/libcxx/assertions/single_expression.sh.cpp
index 60847f3eef74..9a5e778ff340 100644
--- a/libcxx/test/libcxx/assertions/single_expression.sh.cpp
+++ b/libcxx/test/libcxx/assertions/single_expression.sh.cpp
@@ -6,25 +6,25 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Make sure that _LIBCPP_ASSERT is a single expression. This is useful so we can use
+// Make sure that _LIBCUDACXX_ASSERT is a single expression. This is useful so we can use
 // it in places that require an expression, such as in a constructor initializer list.
 
-// RUN: %{build} -Wno-macro-redefined -D_LIBCPP_ENABLE_ASSERTIONS=1
+// RUN: %{build} -Wno-macro-redefined -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 // RUN: %{run}
 
-// RUN: %{build} -Wno-macro-redefined -D_LIBCPP_ENABLE_ASSERTIONS=0
+// RUN: %{build} -Wno-macro-redefined -D_LIBCUDACXX_ENABLE_ASSERTIONS=0
 // RUN: %{run}
 
-// RUN: %{build} -Wno-macro-redefined -D_LIBCPP_ENABLE_ASSERTIONS=0 -D_LIBCPP_ASSERTIONS_DISABLE_ASSUME
+// RUN: %{build} -Wno-macro-redefined -D_LIBCUDACXX_ENABLE_ASSERTIONS=0 -D_LIBCUDACXX_ASSERTIONS_DISABLE_ASSUME
 // RUN: %{run}
 
 #include <__assert>
 #include <cassert>
 
 void f() {
-  int i = (_LIBCPP_ASSERT(true, "message"), 3);
+  int i = (_LIBCUDACXX_ASSERT(true, "message"), 3);
   assert(i == 3);
-  return _LIBCPP_ASSERT(true, "message");
+  return _LIBCUDACXX_ASSERT(true, "message");
 }
 
 int main(int, char**) {

diff  --git a/libcxx/test/libcxx/atomics/version.pass.cpp b/libcxx/test/libcxx/atomics/version.pass.cpp
index bb8af8ded1bc..0b858dd75e6a 100644
--- a/libcxx/test/libcxx/atomics/version.pass.cpp
+++ b/libcxx/test/libcxx/atomics/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/clang_tidy.sh.cpp b/libcxx/test/libcxx/clang_tidy.sh.cpp
index 93d596921751..410af6990661 100644
--- a/libcxx/test/libcxx/clang_tidy.sh.cpp
+++ b/libcxx/test/libcxx/clang_tidy.sh.cpp
@@ -38,7 +38,7 @@ END-SCRIPT
 #include <any>
 #include <array>
 #include <atomic>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <barrier>
 #endif
 #include <bit>
@@ -54,11 +54,11 @@ END-SCRIPT
 #include <cinttypes>
 #include <ciso646>
 #include <climits>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <clocale>
 #endif
 #include <cmath>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <codecvt>
 #endif
 #include <compare>
@@ -80,10 +80,10 @@ END-SCRIPT
 #include <ctime>
 #include <ctype.h>
 #include <cuchar>
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwchar>
 #endif
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwctype>
 #endif
 #include <deque>
@@ -91,82 +91,82 @@ END-SCRIPT
 #include <exception>
 #include <execution>
 #include <fenv.h>
-#if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
+#if !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
 #   include <filesystem>
 #endif
 #include <float.h>
 #include <format>
 #include <forward_list>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <fstream>
 #endif
 #include <functional>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <future>
 #endif
 #include <initializer_list>
 #include <inttypes.h>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iomanip>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ios>
 #endif
 #include <iosfwd>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iostream>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <istream>
 #endif
 #include <iterator>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <latch>
 #endif
 #include <limits>
 #include <limits.h>
 #include <list>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <locale>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <locale.h>
 #endif
 #include <map>
 #include <math.h>
 #include <memory>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <mutex>
 #endif
 #include <new>
 #include <numbers>
 #include <numeric>
 #include <optional>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ostream>
 #endif
 #include <queue>
 #include <random>
 #include <ranges>
 #include <ratio>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <regex>
 #endif
 #include <scoped_allocator>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <semaphore>
 #endif
 #include <set>
 #include <setjmp.h>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <shared_mutex>
 #endif
 #include <span>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <sstream>
 #endif
 #include <stack>
-#if __cplusplus > 202002L && !defined(_LIBCPP_HAS_NO_THREADS)
+#if __cplusplus > 202002L && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <stdatomic.h>
 #endif
 #include <stdbool.h>
@@ -175,18 +175,18 @@ END-SCRIPT
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <streambuf>
 #endif
 #include <string>
 #include <string.h>
 #include <string_view>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <strstream>
 #endif
 #include <system_error>
 #include <tgmath.h>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <thread>
 #endif
 #include <tuple>
@@ -201,16 +201,16 @@ END-SCRIPT
 #include <variant>
 #include <vector>
 #include <version>
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <wchar.h>
 #endif
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <wctype.h>
 #endif
 #if __cplusplus >= 201103L
 #   include <experimental/algorithm>
 #endif
-#if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
+#if __cplusplus >= 201103L && !defined(_LIBCUDACXX_HAS_NO_EXPERIMENTAL_COROUTINES)
 #   include <experimental/coroutine>
 #endif
 #if __cplusplus >= 201103L
@@ -237,7 +237,7 @@ END-SCRIPT
 #if __cplusplus >= 201103L
 #   include <experimental/propagate_const>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
 #   include <experimental/regex>
 #endif
 #if __cplusplus >= 201103L

diff  --git a/libcxx/test/libcxx/containers/associative/map/version.pass.cpp b/libcxx/test/libcxx/containers/associative/map/version.pass.cpp
index ebc45e4d4867..69bc895ee43f 100644
--- a/libcxx/test/libcxx/containers/associative/map/version.pass.cpp
+++ b/libcxx/test/libcxx/containers/associative/map/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/containers/associative/set/version.pass.cpp b/libcxx/test/libcxx/containers/associative/set/version.pass.cpp
index f5a76c774331..27758c55bd96 100644
--- a/libcxx/test/libcxx/containers/associative/set/version.pass.cpp
+++ b/libcxx/test/libcxx/containers/associative/set/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/containers/container.adaptors/queue/version.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/queue/version.pass.cpp
index 685626291fb7..441ef77f2887 100644
--- a/libcxx/test/libcxx/containers/container.adaptors/queue/version.pass.cpp
+++ b/libcxx/test/libcxx/containers/container.adaptors/queue/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/containers/container.adaptors/stack/version.pass.cpp b/libcxx/test/libcxx/containers/container.adaptors/stack/version.pass.cpp
index 9ee45bcc9cc3..09fd950efd82 100644
--- a/libcxx/test/libcxx/containers/container.adaptors/stack/version.pass.cpp
+++ b/libcxx/test/libcxx/containers/container.adaptors/stack/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.back.pass.cpp b/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.back.pass.cpp
index 5fd6204887a5..31d7e4c4c0a9 100644
--- a/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.back.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.back.pass.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // test that array<T, 0>::back() triggers an assertion
 
@@ -22,15 +22,15 @@ int main(int, char**) {
     typedef std::array<int, 0> C;
     C c = {};
     C const& cc = c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.back(), "cannot call array<T, 0>::back() on a zero-sized array");
-    TEST_LIBCPP_ASSERT_FAILURE(cc.back(), "cannot call array<T, 0>::back() on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.back(), "cannot call array<T, 0>::back() on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(cc.back(), "cannot call array<T, 0>::back() on a zero-sized array");
   }
   {
     typedef std::array<const int, 0> C;
     C c = {{}};
     C const& cc = c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.back(), "cannot call array<T, 0>::back() on a zero-sized array");
-    TEST_LIBCPP_ASSERT_FAILURE(cc.back(), "cannot call array<T, 0>::back() on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.back(), "cannot call array<T, 0>::back() on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(cc.back(), "cannot call array<T, 0>::back() on a zero-sized array");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.front.pass.cpp b/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.front.pass.cpp
index 495271345503..53029e700093 100644
--- a/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.front.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.front.pass.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // test that array<T, 0>::back() triggers an assertion
 
@@ -22,15 +22,15 @@ int main(int, char**) {
     typedef std::array<int, 0> C;
     C c = {};
     C const& cc = c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.front(), "cannot call array<T, 0>::front() on a zero-sized array");
-    TEST_LIBCPP_ASSERT_FAILURE(cc.front(), "cannot call array<T, 0>::front() on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.front(), "cannot call array<T, 0>::front() on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(cc.front(), "cannot call array<T, 0>::front() on a zero-sized array");
   }
   {
     typedef std::array<const int, 0> C;
     C c = {{}};
     C const& cc = c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.front(), "cannot call array<T, 0>::front() on a zero-sized array");
-    TEST_LIBCPP_ASSERT_FAILURE(cc.front(), "cannot call array<T, 0>::front() on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.front(), "cannot call array<T, 0>::front() on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(cc.front(), "cannot call array<T, 0>::front() on a zero-sized array");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.subscript.pass.cpp b/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.subscript.pass.cpp
index 1bd75825bcb8..b8fbc5162e0b 100644
--- a/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.subscript.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/array/array.zero/assert.subscript.pass.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // test that array<T, 0>::operator[] triggers an assertion
 
@@ -22,19 +22,19 @@ int main(int, char**) {
     typedef std::array<int, 0> C;
     C c = {};
     C const& cc = c;
-    TEST_LIBCPP_ASSERT_FAILURE(c[0], "cannot call array<T, 0>::operator[] on a zero-sized array");
-    TEST_LIBCPP_ASSERT_FAILURE(c[1], "cannot call array<T, 0>::operator[] on a zero-sized array");
-    TEST_LIBCPP_ASSERT_FAILURE(cc[0], "cannot call array<T, 0>::operator[] on a zero-sized array");
-    TEST_LIBCPP_ASSERT_FAILURE(cc[1], "cannot call array<T, 0>::operator[] on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c[0], "cannot call array<T, 0>::operator[] on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c[1], "cannot call array<T, 0>::operator[] on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(cc[0], "cannot call array<T, 0>::operator[] on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(cc[1], "cannot call array<T, 0>::operator[] on a zero-sized array");
   }
   {
     typedef std::array<const int, 0> C;
     C c = {{}};
     C const& cc = c;
-    TEST_LIBCPP_ASSERT_FAILURE(c[0], "cannot call array<T, 0>::operator[] on a zero-sized array");
-    TEST_LIBCPP_ASSERT_FAILURE(c[1], "cannot call array<T, 0>::operator[] on a zero-sized array");
-    TEST_LIBCPP_ASSERT_FAILURE(cc[0], "cannot call array<T, 0>::operator[] on a zero-sized array");
-    TEST_LIBCPP_ASSERT_FAILURE(cc[1], "cannot call array<T, 0>::operator[] on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c[0], "cannot call array<T, 0>::operator[] on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c[1], "cannot call array<T, 0>::operator[] on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(cc[0], "cannot call array<T, 0>::operator[] on a zero-sized array");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(cc[1], "cannot call array<T, 0>::operator[] on a zero-sized array");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/array/version.pass.cpp b/libcxx/test/libcxx/containers/sequences/array/version.pass.cpp
index 8cd0a6eaacea..99a582910a62 100644
--- a/libcxx/test/libcxx/containers/sequences/array/version.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/array/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/containers/sequences/deque/assert.pop_back.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/assert.pop_back.empty.pass.cpp
index 9cbe7c5663e0..36d088e38561 100644
--- a/libcxx/test/libcxx/containers/sequences/deque/assert.pop_back.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/deque/assert.pop_back.empty.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <deque>
 
@@ -23,7 +23,7 @@ int main(int, char**) {
     std::deque<int> q;
     q.push_back(0);
     q.pop_back();
-    TEST_LIBCPP_ASSERT_FAILURE(q.pop_back(), "deque::pop_back called on an empty deque");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(q.pop_back(), "deque::pop_back called on an empty deque");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/sequences/deque/incomplete.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/incomplete.pass.cpp
index 004a7c8b1600..3fb797991608 100644
--- a/libcxx/test/libcxx/containers/sequences/deque/incomplete.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/deque/incomplete.pass.cpp
@@ -11,7 +11,7 @@
 // deque()
 // deque::iterator()
 
-// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ABI_INCOMPLETE_TYPES_IN_DEQUE
+// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCUDACXX_ABI_INCOMPLETE_TYPES_IN_DEQUE
 
 #include <deque>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/containers/sequences/deque/version.pass.cpp b/libcxx/test/libcxx/containers/sequences/deque/version.pass.cpp
index c55d5b4eb6b5..3d937a7181c6 100644
--- a/libcxx/test/libcxx/containers/sequences/deque/version.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/deque/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/containers/sequences/forwardlist/version.pass.cpp b/libcxx/test/libcxx/containers/sequences/forwardlist/version.pass.cpp
index 94023ecff4e5..5f7ecdad36d1 100644
--- a/libcxx/test/libcxx/containers/sequences/forwardlist/version.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/forwardlist/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.cons/debug.copy.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.cons/debug.copy.pass.cpp
index d4442048312d..cb46683b57d3 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.cons/debug.copy.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.cons/debug.copy.pass.cpp
@@ -11,7 +11,7 @@
 // list(list&& c);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <list>
 
@@ -22,7 +22,7 @@ int main(int, char**) {
     l1.push_back(1); l1.push_back(2); l1.push_back(3);
     std::list<int>::iterator i = l1.begin();
     std::list<int> l2 = l1;
-    TEST_LIBCPP_ASSERT_FAILURE(l2.erase(i), "list::erase(iterator) called with an iterator not referring to this list");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(l2.erase(i), "list::erase(iterator) called with an iterator not referring to this list");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.erase_iter.end.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.erase_iter.end.pass.cpp
index 4d02547cc3a4..6a99120256e6 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.erase_iter.end.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.erase_iter.end.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <list>
 
@@ -23,7 +23,7 @@ int main(int, char**) {
     int a1[] = {1, 2, 3};
     std::list<int> l1(a1, a1+3);
     std::list<int>::const_iterator i = l1.end();
-    TEST_LIBCPP_ASSERT_FAILURE(l1.erase(i), "list::erase(iterator) called with a non-dereferenceable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(i), "list::erase(iterator) called with a non-dereferenceable iterator");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.pop_back.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.pop_back.empty.pass.cpp
index 1a823b25d66c..c7b65de5177e 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.pop_back.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/assert.pop_back.empty.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <list>
 #include <cassert>
@@ -29,7 +29,7 @@ int main(int, char**) {
     assert(c == std::list<int>(a, a+1));
     c.pop_back();
     assert(c.empty());
-    TEST_LIBCPP_ASSERT_FAILURE(c.pop_back(), "list::pop_back() called on an empty list");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.pop_back(), "list::pop_back() called on an empty list");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.emplace.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.emplace.pass.cpp
index ce1eb674f97f..2b2c244675aa 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.emplace.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.emplace.pass.cpp
@@ -11,7 +11,7 @@
 // template <class... Args> void emplace(const_iterator p, Args&&... args);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <list>
 
@@ -27,7 +27,7 @@ struct A {
 int main(int, char**) {
     std::list<A> c1;
     std::list<A> c2;
-    TEST_LIBCPP_ASSERT_FAILURE(c1.emplace(c2.cbegin(), 2, 3.5),
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c1.emplace(c2.cbegin(), 2, 3.5),
                                "list::emplace(iterator, args...) called with an iterator not referring to this list");
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.erase.iter.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.erase.iter.pass.cpp
index f389ef4fab2d..13bb6e3b0e61 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.erase.iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.erase.iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator position) with iterator from another container
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <list>
 
@@ -22,7 +22,7 @@ int main(int, char**) {
     std::list<int> l1(a1, a1+3);
     std::list<int> l2(a1, a1+3);
     std::list<int>::const_iterator i = l2.begin();
-    TEST_LIBCPP_ASSERT_FAILURE(l1.erase(i), "list::erase(iterator) called with an iterator not referring to this list");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(i), "list::erase(iterator) called with an iterator not referring to this list");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.erase.iter_iter.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.erase.iter_iter.pass.cpp
index 78b8b09453f7..69e0bc7e68a2 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.erase.iter_iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.erase.iter_iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator first, const_iterator last); with various invalid iterators
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <list>
 
@@ -23,7 +23,7 @@ int main(int, char**) {
         int a1[] = {1, 2, 3};
         std::list<int> l1(a1, a1+3);
         std::list<int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(l2.cbegin(), std::next(l1.cbegin())),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(l2.cbegin(), std::next(l1.cbegin())),
                                 "list::erase(iterator, iterator) called with an iterator not referring to this list");
     }
 
@@ -32,7 +32,7 @@ int main(int, char**) {
         int a1[] = {1, 2, 3};
         std::list<int> l1(a1, a1+3);
         std::list<int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(l1.cbegin(), std::next(l2.cbegin())),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(l1.cbegin(), std::next(l2.cbegin())),
                                 "list::erase(iterator, iterator) called with an iterator not referring to this list");
     }
 
@@ -41,7 +41,7 @@ int main(int, char**) {
         int a1[] = {1, 2, 3};
         std::list<int> l1(a1, a1+3);
         std::list<int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(l2.cbegin(), std::next(l2.cbegin())),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(l2.cbegin(), std::next(l2.cbegin())),
                                 "list::erase(iterator, iterator) called with an iterator not referring to this list");
     }
 
@@ -49,7 +49,7 @@ int main(int, char**) {
     {
         int a1[] = {1, 2, 3};
         std::list<int> l1(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(std::next(l1.cbegin()), l1.cbegin()),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(std::next(l1.cbegin()), l1.cbegin()),
                                 "Attempted to increment a non-incrementable list::const_iterator");
     }
 

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_iter_iter.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_iter_iter.pass.cpp
index 7cf1c5d71cff..7fe07e02f3c2 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_iter_iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_iter_iter.pass.cpp
@@ -12,7 +12,7 @@
 //   iterator insert(const_iterator position, Iter first, Iter last);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <list>
 
@@ -22,7 +22,7 @@ int main(int, char**) {
     std::list<int> v(100);
     std::list<int> v2(100);
     int a[] = {1, 2, 3, 4, 5};
-    TEST_LIBCPP_ASSERT_FAILURE(v.insert(v2.cbegin(), a, a + 5),
+    TEST_LIBCUDACXX_ASSERT_FAILURE(v.insert(v2.cbegin(), a, a + 5),
                                 "list::insert(iterator, range) called with an iterator not referring to this list");
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_rvalue.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_rvalue.pass.cpp
index 71ba4e5b265c..a47093a310fe 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_rvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_rvalue.pass.cpp
@@ -11,7 +11,7 @@
 // iterator insert(const_iterator position, value_type&& x);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <list>
 
@@ -20,7 +20,7 @@
 int main(int, char**) {
     std::list<int> v1(3);
     std::list<int> v2(3);
-    TEST_LIBCPP_ASSERT_FAILURE(v1.insert(v2.begin(), 4),
+    TEST_LIBCUDACXX_ASSERT_FAILURE(v1.insert(v2.begin(), 4),
                                "list::insert(iterator, x) called with an iterator not referring to this list");
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_size_value.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_size_value.pass.cpp
index e3907fa2e6b1..84460b9ee197 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_size_value.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_size_value.pass.cpp
@@ -11,7 +11,7 @@
 // iterator insert(const_iterator position, size_type n, const value_type& x);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <list>
 
@@ -20,7 +20,7 @@
 int main(int, char**) {
     std::list<int> c1(100);
     std::list<int> c2;
-    TEST_LIBCPP_ASSERT_FAILURE(c1.insert(c2.cbegin(), 5, 1),
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c1.insert(c2.cbegin(), 5, 1),
                                "list::insert(iterator, n, x) called with an iterator not referring to this list");
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_value.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_value.pass.cpp
index ce260c640a45..833af8c507f9 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_value.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.modifiers/debug.insert.iter_value.pass.cpp
@@ -11,7 +11,7 @@
 // iterator insert(const_iterator position, const value_type& x);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <list>
 
@@ -21,7 +21,7 @@ int main(int, char**) {
     std::list<int> v1(3);
     std::list<int> v2(3);
     int i = 4;
-    TEST_LIBCPP_ASSERT_FAILURE(v1.insert(v2.begin(), i),
+    TEST_LIBCUDACXX_ASSERT_FAILURE(v1.insert(v2.begin(), i),
                                "list::insert(iterator, x) called with an iterator not referring to this list");
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list.pass.cpp
index 6d3fb65d9245..a69ae67cf904 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list.pass.cpp
@@ -11,7 +11,7 @@
 // void splice(const_iterator position, list& x);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <list>
 
@@ -20,7 +20,7 @@
 int main(int, char**) {
   std::list<int> v1(3);
   std::list<int> v2(3);
-  TEST_LIBCPP_ASSERT_FAILURE(v1.splice(v2.begin(), v2),
+  TEST_LIBCUDACXX_ASSERT_FAILURE(v1.splice(v2.begin(), v2),
                               "list::splice(iterator, list) called with an iterator not referring to this list");
   return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list_iter.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list_iter.pass.cpp
index 6ac7a6950aa7..b3df2c232205 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list_iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list_iter.pass.cpp
@@ -11,7 +11,7 @@
 // void splice(const_iterator position, list<T,Allocator>& x, iterator i);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <list>
 
@@ -20,7 +20,7 @@
 int main(int, char**) {
     std::list<int> v1(3);
     std::list<int> v2(3);
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         v1.splice(v1.begin(), v2, v1.begin()),
         "list::splice(iterator, list, iterator) called with the second iterator not referring to the list argument");
 

diff  --git a/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list_iter_iter.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list_iter_iter.pass.cpp
index ec318f457c39..9c3617df4e90 100644
--- a/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list_iter_iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/list.ops/debug.splice.pos_list_iter_iter.pass.cpp
@@ -11,7 +11,7 @@
 // void splice(const_iterator position, list& x, iterator first, iterator last);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <list>
 
@@ -20,7 +20,7 @@
 int main(int, char**) {
   std::list<int> v1(3);
   std::list<int> v2(3);
-  TEST_LIBCPP_ASSERT_FAILURE(
+  TEST_LIBCUDACXX_ASSERT_FAILURE(
       v1.splice(v1.begin(), v2, v2.begin(), v1.end()),
       "list::splice(iterator, list, iterator, iterator) called with third iterator not referring to the list argument");
 

diff  --git a/libcxx/test/libcxx/containers/sequences/list/version.pass.cpp b/libcxx/test/libcxx/containers/sequences/list/version.pass.cpp
index 8137ca740013..78d932d467b9 100644
--- a/libcxx/test/libcxx/containers/sequences/list/version.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/list/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/assert.back.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.back.empty.pass.cpp
index b2956a68d529..41557f754a7c 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.back.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.back.empty.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <vector>
 #include <cassert>
@@ -28,7 +28,7 @@ int main(int, char**) {
     C c(1);
     assert(c.back() == 0);
     c.clear();
-    TEST_LIBCPP_ASSERT_FAILURE(c.back(), "back() called on an empty vector");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.back(), "back() called on an empty vector");
   }
   {
     typedef int T;
@@ -36,7 +36,7 @@ int main(int, char**) {
     C c(1);
     assert(c.back() == 0);
     c.clear();
-    TEST_LIBCPP_ASSERT_FAILURE(c.back(), "back() called on an empty vector");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.back(), "back() called on an empty vector");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/assert.cback.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.cback.empty.pass.cpp
index 14c3800ecc98..febfc17749b6 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.cback.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.cback.empty.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <vector>
 
@@ -25,14 +25,14 @@ int main(int, char**) {
     typedef int T;
     typedef std::vector<T, min_allocator<T> > C;
     const C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.back(), "back() called on an empty vector");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.back(), "back() called on an empty vector");
   }
 
   {
     typedef int T;
     typedef std::vector<T> C;
     const C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.back(), "back() called on an empty vector");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.back(), "back() called on an empty vector");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/assert.cfront.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.cfront.empty.pass.cpp
index ee7e36e1bccc..c50f12054438 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.cfront.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.cfront.empty.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <vector>
 
@@ -25,14 +25,14 @@ int main(int, char**) {
     typedef int T;
     typedef std::vector<T, min_allocator<T> > C;
     const C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.front(), "front() called on an empty vector");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.front(), "front() called on an empty vector");
   }
 
   {
     typedef int T;
     typedef std::vector<T> C;
     const C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.front(), "front() called on an empty vector");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.front(), "front() called on an empty vector");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/assert.cindex.oob.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.cindex.oob.pass.cpp
index cba6479604a2..d200e7dc8466 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.cindex.oob.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.cindex.oob.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <vector>
 #include <cassert>
@@ -27,7 +27,7 @@ int main(int, char**) {
     typedef std::vector<T, min_allocator<T> > C;
     const C c(1);
     assert(c[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(c[1], "vector[] index out of bounds");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c[1], "vector[] index out of bounds");
   }
 
   {
@@ -35,7 +35,7 @@ int main(int, char**) {
     typedef std::vector<T> C;
     const C c(1);
     assert(c[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(c[1], "vector[] index out of bounds");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c[1], "vector[] index out of bounds");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/assert.front.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.front.empty.pass.cpp
index 95a81603849a..fff29ec51ca6 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.front.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.front.empty.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <vector>
 #include <cassert>
@@ -28,7 +28,7 @@ int main(int, char**) {
     C c(1);
     assert(c.front() == 0);
     c.clear();
-    TEST_LIBCPP_ASSERT_FAILURE(c.front(), "front() called on an empty vector");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.front(), "front() called on an empty vector");
   }
 
   {
@@ -37,7 +37,7 @@ int main(int, char**) {
     C c(1);
     assert(c.front() == 0);
     c.clear();
-    TEST_LIBCPP_ASSERT_FAILURE(c.front(), "front() called on an empty vector");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.front(), "front() called on an empty vector");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/assert.index.oob.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.index.oob.pass.cpp
index 319276826741..660fa8f6c6e2 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.index.oob.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.index.oob.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <vector>
 #include <cassert>
@@ -27,7 +27,7 @@ int main(int, char**) {
     typedef std::vector<T, min_allocator<T> > C;
     C c(1);
     assert(c[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(c[1], "vector[] index out of bounds");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c[1], "vector[] index out of bounds");
   }
 
   {
@@ -35,7 +35,7 @@ int main(int, char**) {
     typedef std::vector<T> C;
     C c(1);
     assert(c[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(c[1], "vector[] index out of bounds");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c[1], "vector[] index out of bounds");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/assert.pop_back.empty.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/assert.pop_back.empty.pass.cpp
index 8d4099f73806..3f12f79b9e80 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/assert.pop_back.empty.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/assert.pop_back.empty.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <vector>
 
@@ -23,7 +23,7 @@ int main(int, char**) {
     std::vector<int> v;
     v.push_back(0);
     v.pop_back();
-    TEST_LIBCPP_ASSERT_FAILURE(v.pop_back(), "vector::pop_back called on an empty vector");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(v.pop_back(), "vector::pop_back called on an empty vector");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.add.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.add.pass.cpp
index 9e80a7ee0ee7..fb6aa500b0fc 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.add.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.add.pass.cpp
@@ -11,7 +11,7 @@
 // Add to iterator out of bounds.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <vector>
 #include <cassert>
@@ -28,7 +28,7 @@ int main(int, char**) {
     i += 1;
     assert(i == c.end());
     i = c.begin();
-    TEST_LIBCPP_ASSERT_FAILURE(i + 2, "Attempted to add/subtract an iterator outside its valid range");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i + 2, "Attempted to add/subtract an iterator outside its valid range");
   }
 
   {
@@ -39,7 +39,7 @@ int main(int, char**) {
     i += 1;
     assert(i == c.end());
     i = c.begin();
-    TEST_LIBCPP_ASSERT_FAILURE(i + 2, "Attempted to add/subtract an iterator outside its valid range");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i + 2, "Attempted to add/subtract an iterator outside its valid range");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.compare.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.compare.pass.cpp
index 669c34989a4a..914819dbfa7d 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.compare.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.compare.pass.cpp
@@ -11,7 +11,7 @@
 // Compare iterators from 
diff erent containers with <.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <vector>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
     typedef std::vector<T> C;
     C c1;
     C c2;
-    TEST_LIBCPP_ASSERT_FAILURE(c1.begin() < c2.begin(), "Attempted to compare incomparable iterators");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c1.begin() < c2.begin(), "Attempted to compare incomparable iterators");
   }
 
   {
@@ -32,7 +32,7 @@ int main(int, char**) {
     typedef std::vector<T, min_allocator<T> > C;
     C c1;
     C c2;
-    TEST_LIBCPP_ASSERT_FAILURE(c1.begin() < c2.begin(), "Attempted to compare incomparable iterators");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c1.begin() < c2.begin(), "Attempted to compare incomparable iterators");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.decrement.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.decrement.pass.cpp
index c7f65d1efa5a..b45b3f82e04c 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.decrement.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.decrement.pass.cpp
@@ -11,7 +11,7 @@
 // Decrement iterator prior to begin.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <vector>
 #include <cassert>
@@ -27,7 +27,7 @@ int main(int, char**) {
     C::iterator i = c.end();
     --i;
     assert(i == c.begin());
-    TEST_LIBCPP_ASSERT_FAILURE(--i, "Attempted to decrement a non-decrementable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(--i, "Attempted to decrement a non-decrementable iterator");
   }
 
   {
@@ -37,7 +37,7 @@ int main(int, char**) {
     C::iterator i = c.end();
     --i;
     assert(i == c.begin());
-    TEST_LIBCPP_ASSERT_FAILURE(--i, "Attempted to decrement a non-decrementable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(--i, "Attempted to decrement a non-decrementable iterator");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.dereference.pass.cpp
index e421e554b878..543063e6989f 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.dereference.pass.cpp
@@ -11,7 +11,7 @@
 // Dereference non-dereferenceable iterator.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <vector>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
     typedef std::vector<T> C;
     C c(1);
     C::iterator i = c.end();
-    TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable iterator");
   }
 
   {
@@ -32,7 +32,7 @@ int main(int, char**) {
     typedef std::vector<T, min_allocator<T> > C;
     C c(1);
     C::iterator i = c.end();
-    TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable iterator");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.increment.pass.cpp
index 83dcce12625b..5409339db9c8 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.increment.pass.cpp
@@ -11,7 +11,7 @@
 // Increment iterator past end.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <vector>
 #include <cassert>
@@ -27,7 +27,7 @@ int main(int, char**) {
     C::iterator i = c.begin();
     ++i;
     assert(i == c.end());
-    TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable iterator");
   }
 
   {
@@ -37,7 +37,7 @@ int main(int, char**) {
     C::iterator i = c.begin();
     ++i;
     assert(i == c.end());
-    TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable iterator");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.index.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.index.pass.cpp
index ff43d0816526..8418d8bc11cf 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.index.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.index.pass.cpp
@@ -11,7 +11,7 @@
 // Index iterator out of bounds.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <vector>
 #include <cassert>
@@ -26,7 +26,7 @@ int main(int, char**) {
     C c(1);
     C::iterator i = c.begin();
     assert(i[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(i[1], "Attempted to subscript an iterator outside its valid range");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i[1], "Attempted to subscript an iterator outside its valid range");
   }
 
   {
@@ -35,7 +35,7 @@ int main(int, char**) {
     C c(1);
     C::iterator i = c.begin();
     assert(i[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(i[1], "Attempted to subscript an iterator outside its valid range");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i[1], "Attempted to subscript an iterator outside its valid range");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.subtract.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.subtract.pass.cpp
index a5b35cef4fbc..a326c43f444a 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.subtract.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/debug.iterator.subtract.pass.cpp
@@ -11,7 +11,7 @@
 // Subtract iterators from 
diff erent containers.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <vector>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
     typedef std::vector<T> C;
     C c1;
     C c2;
-    TEST_LIBCPP_ASSERT_FAILURE(c1.begin() - c2.begin(), "Attempted to subtract incompatible iterators");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c1.begin() - c2.begin(), "Attempted to subtract incompatible iterators");
   }
 
   {
@@ -32,7 +32,7 @@ int main(int, char**) {
     typedef std::vector<T, min_allocator<T> > C;
     C c1;
     C c2;
-    TEST_LIBCPP_ASSERT_FAILURE(c1.begin() - c2.begin(), "Attempted to subtract incompatible iterators");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c1.begin() - c2.begin(), "Attempted to subtract incompatible iterators");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/containers/sequences/vector/version.pass.cpp b/libcxx/test/libcxx/containers/sequences/vector/version.pass.cpp
index ef20070cdb76..a9eb0db12356 100644
--- a/libcxx/test/libcxx/containers/sequences/vector/version.pass.cpp
+++ b/libcxx/test/libcxx/containers/sequences/vector/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket.pass.cpp
index 4406fa88c12a..de6fe6728655 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_map>
 #include <string>
@@ -23,7 +23,7 @@
 int main(int, char**) {
     typedef std::unordered_map<int, std::string> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.bucket(3), "unordered container::bucket(key) called when bucket_count() == 0");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.bucket(3), "unordered container::bucket(key) called when bucket_count() == 0");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket_size.pass.cpp
index 858ed1c8b3c5..94e1f6ae44cb 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket_size.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/assert.bucket_size.pass.cpp
@@ -17,7 +17,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_map>
 #include <string>
@@ -27,7 +27,7 @@
 int main(int, char**) {
     typedef std::unordered_map<int, std::string> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.bucket_size(3), "unordered container::bucket_size(n) called with n >= bucket_count()");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.bucket_size(3), "unordered container::bucket_size(n) called with n >= bucket_count()");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/assert.max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/assert.max_load_factor.pass.cpp
index b4505f93cd57..6b27688cd1ac 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/assert.max_load_factor.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/assert.max_load_factor.pass.cpp
@@ -18,7 +18,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_map>
 #include <string>
@@ -28,7 +28,7 @@
 int main(int, char**) {
     typedef std::unordered_map<int, std::string> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.max_load_factor(0), "unordered container::max_load_factor(lf) called with lf <= 0");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.max_load_factor(0), "unordered container::max_load_factor(lf) called with lf <= 0");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/debug.insert.hint_const_lvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/debug.insert.hint_const_lvalue.pass.cpp
index a3fe4110dd1c..aef2e890d61b 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/debug.insert.hint_const_lvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/debug.insert.hint_const_lvalue.pass.cpp
@@ -11,7 +11,7 @@
 // iterator insert(const_iterator p, const value_type& x);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 
@@ -26,11 +26,11 @@ int main(int, char**) {
     C::const_iterator e = c2.end();
     P v(3.5, 3);
 #if TEST_STD_VER < 11
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         c.insert(e, v),
         "unordered_map::insert(const_iterator, const value_type&) called with an iterator not referring to this unordered_map");
 #else
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         c.insert(e, v),
         "unordered_map::insert(const_iterator, value_type&&) called with an iterator not referring to this unordered_map");
 #endif

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/debug.insert.hint_rvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/debug.insert.hint_rvalue.pass.cpp
index 4646ff59784b..66dcf199d37c 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/debug.insert.hint_rvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/debug.insert.hint_rvalue.pass.cpp
@@ -13,7 +13,7 @@
 //     iterator insert(const_iterator p, P&& x);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 
@@ -26,7 +26,7 @@ int main(int, char**) {
     C c;
     C c2;
     C::const_iterator e = c2.end();
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         c.insert(e, P(3.5, 3)),
         "unordered_map::insert(const_iterator, const value_type&) called with an iterator not referring to this unordered_map");
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.dereference.pass.cpp
index f08f5b13dc6e..2d3df7acb786 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.dereference.pass.cpp
@@ -11,7 +11,7 @@
 // Dereference non-dereferenceable iterator.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 #include <string>
@@ -25,7 +25,7 @@ int main(int, char**) {
         C c;
         c.insert(std::make_pair(1, "one"));
         C::iterator i = c.end();
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container iterator");
     }
 
     {
@@ -34,7 +34,7 @@ int main(int, char**) {
         C c;
         c.insert(std::make_pair(1, "one"));
         C::iterator i = c.end();
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.increment.pass.cpp
index bb2055f5656d..a7f1c87cf64b 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/debug.iterator.increment.pass.cpp
@@ -11,7 +11,7 @@
 // Increment iterator past end.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 #include <cassert>
@@ -28,7 +28,7 @@ int main(int, char**) {
         C::iterator i = c.begin();
         ++i;
         assert(i == c.end());
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container iterator");
     }
 
     {
@@ -39,7 +39,7 @@ int main(int, char**) {
         C::iterator i = c.begin();
         ++i;
         assert(i == c.end());
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.dereference.pass.cpp
index 1a5a93c2239e..3503c26fd89c 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.dereference.pass.cpp
@@ -11,7 +11,7 @@
 // Dereference non-dereferenceable iterator.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 #include <string>
@@ -24,7 +24,7 @@ int main(int, char**) {
         typedef std::unordered_map<int, std::string> C;
         C c(1);
         C::local_iterator i = c.end(0);
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container local_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container local_iterator");
     }
 
     {
@@ -32,7 +32,7 @@ int main(int, char**) {
                                    min_allocator<std::pair<const int, std::string>>> C;
         C c(1);
         C::local_iterator i = c.end(0);
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container local_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container local_iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.increment.pass.cpp
index 6b33131e8a00..740ba46f9291 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/debug.local_iterator.increment.pass.cpp
@@ -11,7 +11,7 @@
 // Increment local_iterator past end.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 #include <string>
@@ -30,7 +30,7 @@ int main(int, char**) {
         assert(i != c.end(b));
         ++i;
         assert(i == c.end(b));
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container local_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container local_iterator");
     }
 
     {
@@ -42,7 +42,7 @@ int main(int, char**) {
         assert(i != c.end(b));
         ++i;
         assert(i == c.end(b));
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container local_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container local_iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/debug.swap.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/debug.swap.pass.cpp
index c639b92358f6..241f979d5164 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/debug.swap.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/debug.swap.pass.cpp
@@ -15,7 +15,7 @@
 // void swap(unordered_map& x, unordered_map& y);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 
@@ -31,7 +31,7 @@ int main(int, char**) {
     std::unordered_map<int, int>::iterator i2 = c2.begin();
     swap(c1, c2);
     c1.erase(i2);
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         c1.erase(i1), "unordered container erase(iterator) called with an iterator not referring to this container");
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/debug.erase.iter.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/debug.erase.iter.pass.cpp
index d106dea764ae..4a573f3a5cbb 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/debug.erase.iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/debug.erase.iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator position) with invalid iterators
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
         P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
         std::unordered_map<int, int> l1(a1, a1+3);
         std::unordered_map<int, int>::const_iterator i = l1.end();
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(i),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(i),
                                 "unordered container erase(iterator) called with a non-dereferenceable iterator");
     }
 
@@ -35,7 +35,7 @@ int main(int, char**) {
         std::unordered_map<int, int> l1(a1, a1+3);
         std::unordered_map<int, int> l2(a1, a1+3);
         std::unordered_map<int, int>::const_iterator i = l2.begin();
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(i), "unordered container erase(iterator) called with an iterator not referring to this container");
     }
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/debug.erase.iter_iter.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/debug.erase.iter_iter.pass.cpp
index 5035aabf9fed..fdd2a08a876c 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/debug.erase.iter_iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/unord.map.modifiers/debug.erase.iter_iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator first, const_iterator last); with invalid iterators
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
         P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
         std::unordered_map<int, int> l1(a1, a1+3);
         std::unordered_map<int, int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l2.cbegin(), std::next(l1.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -35,7 +35,7 @@ int main(int, char**) {
         P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
         std::unordered_map<int, int> l1(a1, a1+3);
         std::unordered_map<int, int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l1.cbegin(), std::next(l2.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -46,7 +46,7 @@ int main(int, char**) {
         P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
         std::unordered_map<int, int> l1(a1, a1+3);
         std::unordered_map<int, int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l2.cbegin(), std::next(l2.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -56,7 +56,7 @@ int main(int, char**) {
         typedef std::pair<int, int> P;
         P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
         std::unordered_map<int, int> l1(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(std::next(l1.cbegin()), l1.cbegin()),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(std::next(l1.cbegin()), l1.cbegin()),
                                 "Attempted to increment a non-incrementable unordered container const_iterator");
     }
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.map/version.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.map/version.pass.cpp
index 09196a89f984..765af041f4ef 100644
--- a/libcxx/test/libcxx/containers/unord/unord.map/version.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.map/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket.pass.cpp
index 0c2f12a6994f..da4454a71444 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket.pass.cpp
@@ -17,7 +17,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_map>
 #include <string>
@@ -27,7 +27,7 @@
 int main(int, char**) {
     typedef std::unordered_multimap<int, std::string> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.bucket(3), "unordered container::bucket(key) called when bucket_count() == 0");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.bucket(3), "unordered container::bucket(key) called when bucket_count() == 0");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket_size.pass.cpp
index 9c27d583d1dd..bfa8deabd02c 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket_size.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.bucket_size.pass.cpp
@@ -17,7 +17,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_map>
 #include <string>
@@ -27,7 +27,7 @@
 int main(int, char**) {
     typedef std::unordered_multimap<int, std::string> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.bucket_size(3), "unordered container::bucket_size(n) called with n >= bucket_count()");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.bucket_size(3), "unordered container::bucket_size(n) called with n >= bucket_count()");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.max_load_factor.pass.cpp
index 42bd462b932f..358f2d6ae3a5 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/assert.max_load_factor.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/assert.max_load_factor.pass.cpp
@@ -18,7 +18,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_map>
 #include <string>
@@ -28,7 +28,7 @@
 int main(int, char**) {
     typedef std::unordered_multimap<int, std::string> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.max_load_factor(0), "unordered container::max_load_factor(lf) called with lf <= 0");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.max_load_factor(0), "unordered container::max_load_factor(lf) called with lf <= 0");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.insert.hint_const_lvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.insert.hint_const_lvalue.pass.cpp
index ce3b3dde2e32..40a18322e0d1 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.insert.hint_const_lvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.insert.hint_const_lvalue.pass.cpp
@@ -11,7 +11,7 @@
 // iterator insert(const_iterator p, const value_type& x);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
     C c2;
     C::const_iterator e = c2.end();
     P v(3.5, 3);
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         c.insert(e, v),
         "unordered container::emplace_hint(const_iterator, args...) called with an iterator not referring to this unordered container");
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.insert.hint_rvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.insert.hint_rvalue.pass.cpp
index 5a242424f7df..8733215291e9 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.insert.hint_rvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.insert.hint_rvalue.pass.cpp
@@ -13,7 +13,7 @@
 //     iterator insert(const_iterator p, P&& x);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 
@@ -25,7 +25,7 @@ int main(int, char**) {
     C c;
     C c2;
     C::const_iterator e = c2.end();
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         c.insert(e, P(3.5, 3)),
         "unordered container::emplace_hint(const_iterator, args...) called with an iterator not referring to this unordered container");
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.dereference.pass.cpp
index 05990a03843b..10f0b7f32f28 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.dereference.pass.cpp
@@ -11,7 +11,7 @@
 // Dereference non-dereferenceable iterator.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 #include <unordered_map>
@@ -25,7 +25,7 @@ int main(int, char**) {
         C c;
         c.insert(std::make_pair(1, "one"));
         C::iterator i = c.end();
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container iterator");
     }
 
     {
@@ -34,7 +34,7 @@ int main(int, char**) {
         C c;
         c.insert(std::make_pair(1, "one"));
         C::iterator i = c.end();
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.increment.pass.cpp
index f84726ecfc51..f8a4a686ab9f 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.iterator.increment.pass.cpp
@@ -11,7 +11,7 @@
 // Increment iterator past end.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 #include <cassert>
@@ -28,7 +28,7 @@ int main(int, char**) {
         C::iterator i = c.begin();
         ++i;
         assert(i == c.end());
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container iterator");
     }
 
     {
@@ -39,7 +39,7 @@ int main(int, char**) {
         C::iterator i = c.begin();
         ++i;
         assert(i == c.end());
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.dereference.pass.cpp
index d1d6e379bfed..e709f64f96bf 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.dereference.pass.cpp
@@ -11,7 +11,7 @@
 // Dereference non-dereferenceable iterator.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 #include <string>
@@ -24,7 +24,7 @@ int main(int, char**) {
         typedef std::unordered_multimap<int, std::string> C;
         C c(1);
         C::local_iterator i = c.end(0);
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container local_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container local_iterator");
     }
 
     {
@@ -32,7 +32,7 @@ int main(int, char**) {
                                         min_allocator<std::pair<const int, std::string>>> C;
         C c(1);
         C::local_iterator i = c.end(0);
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container local_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container local_iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.increment.pass.cpp
index 2a9732826c36..8af3ca3ac4ea 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.local_iterator.increment.pass.cpp
@@ -11,7 +11,7 @@
 // Increment local_iterator past end.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 #include <cassert>
@@ -30,7 +30,7 @@ int main(int, char**) {
         assert(i != c.end(b));
         ++i;
         assert(i == c.end(b));
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container local_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container local_iterator");
     }
 
     {
@@ -43,7 +43,7 @@ int main(int, char**) {
         assert(i != c.end(b));
         ++i;
         assert(i == c.end(b));
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container local_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container local_iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.swap.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.swap.pass.cpp
index 29efbe225135..5d33e8dae88d 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/debug.swap.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/debug.swap.pass.cpp
@@ -15,7 +15,7 @@
 // void swap(unordered_multimap& x, unordered_multimap& y);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 
@@ -31,7 +31,7 @@ int main(int, char**) {
     std::unordered_multimap<int, int>::iterator i2 = c2.begin();
     swap(c1, c2);
     c1.erase(i2);
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         c1.erase(i1), "unordered container erase(iterator) called with an iterator not referring to this container");
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/debug.erase.iter.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/debug.erase.iter.pass.cpp
index 1b29719ed362..605099c4df28 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/debug.erase.iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/debug.erase.iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator position) with invalid iterators
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
         P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
         std::unordered_multimap<int, int> l1(a1, a1+3);
         std::unordered_multimap<int, int>::const_iterator i = l1.end();
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(i),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(i),
                                 "unordered container erase(iterator) called with a non-dereferenceable iterator");
     }
 
@@ -35,7 +35,7 @@ int main(int, char**) {
         std::unordered_multimap<int, int> l1(a1, a1+3);
         std::unordered_multimap<int, int> l2(a1, a1+3);
         std::unordered_multimap<int, int>::const_iterator i = l2.begin();
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(i), "unordered container erase(iterator) called with an iterator not referring to this container");
     }
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/debug.erase.iter_iter.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/debug.erase.iter_iter.pass.cpp
index 85879e074d77..15b19de3c34b 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/debug.erase.iter_iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multimap/unord.multimap.modifiers/debug.erase.iter_iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator first, const_iterator last); with invalid iterators
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_map>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
         P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
         std::unordered_multimap<int, int> l1(a1, a1+3);
         std::unordered_multimap<int, int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l2.cbegin(), std::next(l1.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -35,7 +35,7 @@ int main(int, char**) {
         P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
         std::unordered_multimap<int, int> l1(a1, a1+3);
         std::unordered_multimap<int, int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l1.cbegin(), std::next(l2.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -46,7 +46,7 @@ int main(int, char**) {
         P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
         std::unordered_multimap<int, int> l1(a1, a1+3);
         std::unordered_multimap<int, int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l2.cbegin(), std::next(l2.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -56,7 +56,7 @@ int main(int, char**) {
         typedef std::pair<int, int> P;
         P a1[] = {P(1, 1), P(2, 2), P(3, 3)};
         std::unordered_multimap<int, int> l1(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(std::next(l1.cbegin()), l1.cbegin()),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(std::next(l1.cbegin()), l1.cbegin()),
                                 "Attempted to increment a non-incrementable unordered container const_iterator");
     }
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket.pass.cpp
index 37d43fb69d3b..1ac280b81889 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket.pass.cpp
@@ -17,7 +17,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_set>
 
@@ -26,7 +26,7 @@
 int main(int, char**) {
     typedef std::unordered_multiset<int> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.bucket(3), "unordered container::bucket(key) called when bucket_count() == 0");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.bucket(3), "unordered container::bucket(key) called when bucket_count() == 0");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket_size.pass.cpp
index c8e752357948..54f5eca16cbc 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket_size.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.bucket_size.pass.cpp
@@ -17,7 +17,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_set>
 
@@ -26,7 +26,7 @@
 int main(int, char**) {
     typedef std::unordered_multiset<int> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.bucket_size(3), "unordered container::bucket_size(n) called with n >= bucket_count()");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.bucket_size(3), "unordered container::bucket_size(n) called with n >= bucket_count()");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.max_load_factor.pass.cpp
index 1b5aaa47eca8..4f377d3db366 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/assert.max_load_factor.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/assert.max_load_factor.pass.cpp
@@ -18,7 +18,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_set>
 
@@ -27,7 +27,7 @@
 int main(int, char**) {
     typedef std::unordered_multiset<int> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.max_load_factor(0), "unordered container::max_load_factor(lf) called with lf <= 0");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.max_load_factor(0), "unordered container::max_load_factor(lf) called with lf <= 0");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.erase.iter.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.erase.iter.pass.cpp
index 7d477e3d6cdd..b627b4e76215 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.erase.iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.erase.iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator position) with invalid iterators
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -23,7 +23,7 @@ int main(int, char**) {
         int a1[] = {1, 2, 3};
         std::unordered_multiset<int> l1(a1, a1+3);
         std::unordered_multiset<int>::const_iterator i = l1.end();
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(i),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(i),
                                 "unordered container erase(iterator) called with a non-dereferenceable iterator");
     }
 
@@ -33,7 +33,7 @@ int main(int, char**) {
         std::unordered_multiset<int> l1(a1, a1+3);
         std::unordered_multiset<int> l2(a1, a1+3);
         std::unordered_multiset<int>::const_iterator i = l2.begin();
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(i), "unordered container erase(iterator) called with an iterator not referring to this container");
     }
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.erase.iter_iter.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.erase.iter_iter.pass.cpp
index f229b9925362..786ba48986ec 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.erase.iter_iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.erase.iter_iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator first, const_iterator last); with invalid iterators
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -23,7 +23,7 @@ int main(int, char**) {
         int a1[] = {1, 2, 3};
         std::unordered_multiset<int> l1(a1, a1+3);
         std::unordered_multiset<int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l2.cbegin(), std::next(l1.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -33,7 +33,7 @@ int main(int, char**) {
         int a1[] = {1, 2, 3};
         std::unordered_multiset<int> l1(a1, a1+3);
         std::unordered_multiset<int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l1.cbegin(), std::next(l2.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -43,7 +43,7 @@ int main(int, char**) {
         int a1[] = {1, 2, 3};
         std::unordered_multiset<int> l1(a1, a1+3);
         std::unordered_multiset<int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l2.cbegin(), std::next(l2.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -52,7 +52,7 @@ int main(int, char**) {
     {
         int a1[] = {1, 2, 3};
         std::unordered_multiset<int> l1(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(std::next(l1.cbegin()), l1.cbegin()),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(std::next(l1.cbegin()), l1.cbegin()),
                                 "Attempted to increment a non-incrementable unordered container const_iterator");
     }
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.insert.hint_const_lvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.insert.hint_const_lvalue.pass.cpp
index 50e0d8a1d628..4f4ffc0e8c66 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.insert.hint_const_lvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.insert.hint_const_lvalue.pass.cpp
@@ -11,7 +11,7 @@
 // iterator insert(const_iterator p, const value_type& x);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
     C c2;
     C::const_iterator e = c2.end();
     P v(3.5);
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         c.insert(e, v),
         "unordered container::emplace_hint(const_iterator, args...) called with an iterator not referring to this unordered container");
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.dereference.pass.cpp
index a7fdff7c4792..e44215b416df 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.dereference.pass.cpp
@@ -11,7 +11,7 @@
 // Dereference non-dereferenceable iterator.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
         typedef std::unordered_multiset<T> C;
         C c(1);
         C::iterator i = c.end();
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container const_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container const_iterator");
     }
 
     {
@@ -32,7 +32,7 @@ int main(int, char**) {
         typedef std::unordered_multiset<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
         C c(1);
         C::iterator i = c.end();
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container const_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container const_iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.increment.pass.cpp
index 9ca0d4a5157f..2e5b388d3ba4 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.iterator.increment.pass.cpp
@@ -11,7 +11,7 @@
 // Increment iterator past end.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 #include <cassert>
@@ -29,7 +29,7 @@ int main(int, char**) {
         assert(i != c.end());
         ++i;
         assert(i == c.end());
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_iterator");
     }
 
     {
@@ -40,7 +40,7 @@ int main(int, char**) {
         assert(i != c.end());
         ++i;
         assert(i == c.end());
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.dereference.pass.cpp
index 0b4bc9e4b6a7..a5dc18622bb7 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.dereference.pass.cpp
@@ -11,7 +11,7 @@
 // Dereference non-dereferenceable iterator.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
         typedef std::unordered_multiset<T> C;
         C c(1);
         C::local_iterator i = c.end(0);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             *i, "Attempted to dereference a non-dereferenceable unordered container const_local_iterator");
     }
 
@@ -33,7 +33,7 @@ int main(int, char**) {
         typedef std::unordered_multiset<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
         C c(1);
         C::local_iterator i = c.end(0);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             *i, "Attempted to dereference a non-dereferenceable unordered container const_local_iterator");
     }
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.increment.pass.cpp
index 8f82dfbba2d8..5fc13b77b611 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.local_iterator.increment.pass.cpp
@@ -11,7 +11,7 @@
 // Increment local_iterator past end.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 #include <cassert>
@@ -30,7 +30,7 @@ int main(int, char**) {
         assert(i != c.end(b));
         ++i;
         assert(i == c.end(b));
-        TEST_LIBCPP_ASSERT_FAILURE(++i,
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i,
                                 "Attempted to increment a non-incrementable unordered container const_local_iterator");
     }
 
@@ -43,7 +43,7 @@ int main(int, char**) {
         assert(i != c.end(b));
         ++i;
         assert(i == c.end(b));
-        TEST_LIBCPP_ASSERT_FAILURE(++i,
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i,
                                 "Attempted to increment a non-incrementable unordered container const_local_iterator");
     }
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.swap.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.swap.pass.cpp
index 476eb594ccf0..54252912be97 100644
--- a/libcxx/test/libcxx/containers/unord/unord.multiset/debug.swap.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.multiset/debug.swap.pass.cpp
@@ -15,7 +15,7 @@
 // void swap(unordered_multiset& x, unordered_multiset& y);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -30,7 +30,7 @@ int main(int, char**) {
     std::unordered_multiset<int>::iterator i2 = c2.begin();
     swap(c1, c2);
     c1.erase(i2);
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         c1.erase(i1), "unordered container erase(iterator) called with an iterator not referring to this container");
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket.pass.cpp
index 5634ffdc65da..d84123cdbe22 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket.pass.cpp
@@ -17,7 +17,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_set>
 
@@ -26,7 +26,7 @@
 int main(int, char**) {
     typedef std::unordered_set<int> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.bucket(3), "unordered container::bucket(key) called when bucket_count() == 0");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.bucket(3), "unordered container::bucket(key) called when bucket_count() == 0");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket_size.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket_size.pass.cpp
index dd3ad2219e8a..6cf56ebf45f8 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket_size.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/assert.bucket_size.pass.cpp
@@ -17,7 +17,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_set>
 
@@ -26,7 +26,7 @@
 int main(int, char**) {
     typedef std::unordered_set<int> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.bucket_size(3), "unordered container::bucket_size(n) called with n >= bucket_count()");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.bucket_size(3), "unordered container::bucket_size(n) called with n >= bucket_count()");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/assert.max_load_factor.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/assert.max_load_factor.pass.cpp
index 385e6272602b..6759d4db132b 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/assert.max_load_factor.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/assert.max_load_factor.pass.cpp
@@ -18,7 +18,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <unordered_set>
 
@@ -27,7 +27,7 @@
 int main(int, char**) {
     typedef std::unordered_set<int> C;
     C c;
-    TEST_LIBCPP_ASSERT_FAILURE(c.max_load_factor(-0.5f),
+    TEST_LIBCUDACXX_ASSERT_FAILURE(c.max_load_factor(-0.5f),
                                "unordered container::max_load_factor(lf) called with lf <= 0");
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/debug.erase.iter.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/debug.erase.iter.pass.cpp
index 1f3f5ad19cc0..6ffc04a4c60b 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/debug.erase.iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/debug.erase.iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator position) with invalid iterators
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -23,7 +23,7 @@ int main(int, char**) {
         int a1[] = {1, 2, 3};
         std::unordered_set<int> l1(a1, a1+3);
         std::unordered_set<int>::const_iterator i = l1.end();
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(i),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(i),
                                 "unordered container erase(iterator) called with a non-dereferenceable iterator");
     }
 
@@ -33,7 +33,7 @@ int main(int, char**) {
         std::unordered_set<int> l1(a1, a1+3);
         std::unordered_set<int> l2(a1, a1+3);
         std::unordered_set<int>::const_iterator i = l2.begin();
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(i), "unordered container erase(iterator) called with an iterator not referring to this container");
     }
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/debug.erase.iter_iter.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/debug.erase.iter_iter.pass.cpp
index 542d38298a87..6ffe70b500f3 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/debug.erase.iter_iter.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/debug.erase.iter_iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator first, const_iterator last); with first iterator from another container
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -23,7 +23,7 @@ int main(int, char**) {
         int a1[] = {1, 2, 3};
         std::unordered_set<int> l1(a1, a1+3);
         std::unordered_set<int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l2.cbegin(), std::next(l1.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -33,7 +33,7 @@ int main(int, char**) {
         int a1[] = {1, 2, 3};
         std::unordered_set<int> l1(a1, a1+3);
         std::unordered_set<int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l1.cbegin(), std::next(l2.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -43,7 +43,7 @@ int main(int, char**) {
         int a1[] = {1, 2, 3};
         std::unordered_set<int> l1(a1, a1+3);
         std::unordered_set<int> l2(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             l1.erase(l2.cbegin(), std::next(l2.cbegin())),
             "unordered container::erase(iterator, iterator) called with an iterator not referring to this container");
     }
@@ -52,7 +52,7 @@ int main(int, char**) {
     {
         int a1[] = {1, 2, 3};
         std::unordered_set<int> l1(a1, a1+3);
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(std::next(l1.cbegin()), l1.cbegin()),
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(std::next(l1.cbegin()), l1.cbegin()),
                                 "Attempted to increment a non-incrementable unordered container const_iterator");
     }
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/debug.insert.hint_const_lvalue.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/debug.insert.hint_const_lvalue.pass.cpp
index b452a8d23cb8..1bcacfca947c 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/debug.insert.hint_const_lvalue.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/debug.insert.hint_const_lvalue.pass.cpp
@@ -11,7 +11,7 @@
 // iterator insert(const_iterator p, const value_type& x);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
     C c2;
     C::const_iterator e = c2.end();
     P v(3.5);
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         c.insert(e, v),
         "unordered_set::insert(const_iterator, const value_type&) called with an iterator not referring to this unordered_set");
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.dereference.pass.cpp
index 2e8c0c27801b..8fce0760b188 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.dereference.pass.cpp
@@ -11,7 +11,7 @@
 // Dereference non-dereferenceable iterator.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
         typedef std::unordered_set<T> C;
         C c(1);
         C::iterator i = c.end();
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container const_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container const_iterator");
     }
 
     {
@@ -32,7 +32,7 @@ int main(int, char**) {
         typedef std::unordered_set<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
         C c(1);
         C::iterator i = c.end();
-        TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container const_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable unordered container const_iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.increment.pass.cpp
index a858aa8b35de..74fe143e5d8f 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/debug.iterator.increment.pass.cpp
@@ -11,7 +11,7 @@
 // Increment iterator past end.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 #include <cassert>
@@ -29,7 +29,7 @@ int main(int, char**) {
         assert(i != c.end());
         ++i;
         assert(i == c.end());
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_iterator");
     }
 
     {
@@ -40,7 +40,7 @@ int main(int, char**) {
         assert(i != c.end());
         ++i;
         assert(i == c.end());
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.dereference.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.dereference.pass.cpp
index 30582d92598c..7b0a52edef5a 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.dereference.pass.cpp
@@ -11,7 +11,7 @@
 // Dereference non-dereferenceable iterator.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -24,7 +24,7 @@ int main(int, char**) {
         typedef std::unordered_set<T> C;
         C c(1);
         C::local_iterator i = c.end(0);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             *i, "Attempted to dereference a non-dereferenceable unordered container const_local_iterator");
     }
 
@@ -33,7 +33,7 @@ int main(int, char**) {
         typedef std::unordered_set<T, std::hash<T>, std::equal_to<T>, min_allocator<T>> C;
         C c(1);
         C::local_iterator i = c.end(0);
-        TEST_LIBCPP_ASSERT_FAILURE(
+        TEST_LIBCUDACXX_ASSERT_FAILURE(
             *i, "Attempted to dereference a non-dereferenceable unordered container const_local_iterator");
     }
 

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.increment.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.increment.pass.cpp
index 022b66eeb621..f768f4dc1a98 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/debug.local_iterator.increment.pass.cpp
@@ -11,7 +11,7 @@
 // Increment local_iterator past end.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 #include <cassert>
@@ -30,7 +30,7 @@ int main(int, char**) {
         assert(i != c.end(b));
         ++i;
         assert(i == c.end(b));
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_local_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_local_iterator");
     }
 
     {
@@ -42,7 +42,7 @@ int main(int, char**) {
         assert(i != c.end(b));
         ++i;
         assert(i == c.end(b));
-        TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_local_iterator");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable unordered container const_local_iterator");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/debug.swap.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/debug.swap.pass.cpp
index afcaded19073..fca9fc169932 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/debug.swap.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/debug.swap.pass.cpp
@@ -15,7 +15,7 @@
 // void swap(unordered_set& x, unordered_set& y);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <unordered_set>
 
@@ -30,7 +30,7 @@ int main(int, char**) {
     std::unordered_set<int>::iterator i2 = c2.begin();
     swap(c1, c2);
     c1.erase(i2);
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         c1.erase(i1), "unordered container erase(iterator) called with an iterator not referring to this container");
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/unord/unord.set/version.pass.cpp b/libcxx/test/libcxx/containers/unord/unord.set/version.pass.cpp
index 7463275f2c27..95ac5ab539ae 100644
--- a/libcxx/test/libcxx/containers/unord/unord.set/version.pass.cpp
+++ b/libcxx/test/libcxx/containers/unord/unord.set/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/containers/views/views.span/debug.iterator-indexing.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/debug.iterator-indexing.pass.cpp
index 8ed68741493d..c2cada303a14 100644
--- a/libcxx/test/libcxx/containers/views/views.span/debug.iterator-indexing.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/debug.iterator-indexing.pass.cpp
@@ -10,7 +10,7 @@
 // Make sure that std::span's iterators check for OOB accesses when the debug mode is enabled.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode
 
 #include <span>
 
@@ -27,15 +27,15 @@ int main(int, char**) {
         std::span<Foo> const span(array, 3);
         {
             auto it = span.end();
-            TEST_LIBCPP_ASSERT_FAILURE(*it, "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(*it, "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
         }
         {
             auto it = span.end();
-            TEST_LIBCPP_ASSERT_FAILURE(it->x, "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(it->x, "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
         }
         {
             auto it = span.begin();
-            TEST_LIBCPP_ASSERT_FAILURE(it[3], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(it[3], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
         }
     }
 
@@ -45,15 +45,15 @@ int main(int, char**) {
         std::span<Foo, 3> const span(array, 3);
         {
             auto it = span.end();
-            TEST_LIBCPP_ASSERT_FAILURE(*it, "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(*it, "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
         }
         {
             auto it = span.end();
-            TEST_LIBCPP_ASSERT_FAILURE(it->x, "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(it->x, "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
         }
         {
             auto it = span.begin();
-            TEST_LIBCPP_ASSERT_FAILURE(it[3], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(it[3], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
         }
     }
 
@@ -63,15 +63,15 @@ int main(int, char**) {
         std::span<Foo> const span(array, 3);
         {
             auto it = span.rend();
-            TEST_LIBCPP_ASSERT_FAILURE(*it, "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(*it, "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
         }
         {
             auto it = span.rend();
-            TEST_LIBCPP_ASSERT_FAILURE(it->x, "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(it->x, "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
         }
         {
             auto it = span.rbegin();
-            TEST_LIBCPP_ASSERT_FAILURE(it[3], "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(it[3], "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
         }
     }
 
@@ -81,15 +81,15 @@ int main(int, char**) {
         std::span<Foo, 3> const span(array, 3);
         {
             auto it = span.rend();
-            TEST_LIBCPP_ASSERT_FAILURE(*it, "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(*it, "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
         }
         {
             auto it = span.rend();
-            TEST_LIBCPP_ASSERT_FAILURE(it->x, "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(it->x, "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
         }
         {
             auto it = span.rbegin();
-            TEST_LIBCPP_ASSERT_FAILURE(it[3], "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(it[3], "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
         }
     }
 

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_sent.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_sent.pass.cpp
index cd373e71b4b4..f7fb781ed8d2 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_sent.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_sent.pass.cpp
@@ -20,7 +20,7 @@
 
 // REQUIRES: has-unix-headers
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <array>
 #include <span>
@@ -32,16 +32,16 @@ int main(int, char**) {
         std::array<int, 3> array{0, 1, 2};
 
         auto invalid_range = [&] { std::span<int> const s(array.end(), array.begin()); (void)s; };
-        TEST_LIBCPP_ASSERT_FAILURE(invalid_range(), "invalid range in span's constructor (iterator, sentinel)");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(invalid_range(), "invalid range in span's constructor (iterator, sentinel)");
     }
     {
         std::array<int, 3> array{0, 1, 2};
 
         auto invalid_range = [&] { std::span<int, 3> const s(array.end(), array.begin()); (void)s; };
-        TEST_LIBCPP_ASSERT_FAILURE(invalid_range(), "invalid range in span's constructor (iterator, sentinel)");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(invalid_range(), "invalid range in span's constructor (iterator, sentinel)");
 
         auto invalid_size = [&] { std::span<int, 3> const s(array.begin(), array.begin() + 2); (void)s; };
-        TEST_LIBCPP_ASSERT_FAILURE(invalid_size(), "invalid range in span's constructor (iterator, sentinel): last - first != extent");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(invalid_size(), "invalid range in span's constructor (iterator, sentinel): last - first != extent");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_size.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_size.pass.cpp
index 1888b4b5d0b2..e1883a4dcf11 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_size.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.iter_size.pass.cpp
@@ -17,7 +17,7 @@
 
 // REQUIRES: has-unix-headers
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <array>
 #include <span>
@@ -28,10 +28,10 @@ int main(int, char**) {
     std::array<int, 3> array{0, 1, 2};
 
     auto too_large = [&] { std::span<int, 3> const s(array.data(), 4); (void)s; };
-    TEST_LIBCPP_ASSERT_FAILURE(too_large(), "size mismatch in span's constructor (iterator, len)");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(too_large(), "size mismatch in span's constructor (iterator, len)");
 
     auto too_small = [&] { std::span<int, 3> const s(array.data(), 2); (void)s; };
-    TEST_LIBCPP_ASSERT_FAILURE(too_small(), "size mismatch in span's constructor (iterator, len)");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(too_small(), "size mismatch in span's constructor (iterator, len)");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.other_span.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.other_span.pass.cpp
index 9e92e837f795..da3c1c4c8ea6 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.other_span.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.other_span.pass.cpp
@@ -15,7 +15,7 @@
 
 // REQUIRES: has-unix-headers
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <array>
 #include <span>
@@ -27,7 +27,7 @@ int main(int, char**) {
     std::span<int> other(array.data(), 3);
 
     auto invalid_source = [&] { std::span<int, 2> const s(other); (void)s; };
-    TEST_LIBCPP_ASSERT_FAILURE(invalid_source(), "size mismatch in span's constructor (other span)");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(invalid_source(), "size mismatch in span's constructor (other span)");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.range.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.range.pass.cpp
index bf1233f207b3..e92387ca0d5f 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.range.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.cons/assert.range.pass.cpp
@@ -15,7 +15,7 @@
 
 // REQUIRES: has-unix-headers
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <span>
 #include <vector>
@@ -26,7 +26,7 @@ int main(int, char**) {
     std::vector<int> vec{0, 1, 2}; // must use std::vector instead of std::array, because std::span has a special constructor from std::array
 
     auto invalid_size = [&] { std::span<int, 2> const s(vec); (void)s; };
-    TEST_LIBCPP_ASSERT_FAILURE(invalid_size(), "size mismatch in span's constructor (range)");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(invalid_size(), "size mismatch in span's constructor (range)");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.cons/range.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/range.pass.cpp
index efa1001bdb5b..3dbc366ec639 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.cons/range.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.cons/range.pass.cpp
@@ -18,7 +18,7 @@
 // to support construction from containers that look like contiguous ranges.
 //
 // This extension is only supported when we don't ship <ranges>, and we can
-// remove it once we get rid of _LIBCPP_HAS_NO_INCOMPLETE_RANGES.
+// remove it once we get rid of _LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES.
 
 #include <span>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.cons/range.verify.cpp b/libcxx/test/libcxx/containers/views/views.span/span.cons/range.verify.cpp
index 5c379a4624bf..6f84e92841e7 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.cons/range.verify.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.cons/range.verify.cpp
@@ -18,7 +18,7 @@
 // to support construction from containers that look like contiguous ranges.
 //
 // This extension is only supported when we don't ship <ranges>, and we can
-// remove it once we get rid of _LIBCPP_HAS_NO_INCOMPLETE_RANGES.
+// remove it once we get rid of _LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES.
 
 #include <span>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.back.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.back.pass.cpp
index e6fb20dbeb53..48d21945f476 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.back.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.back.pass.cpp
@@ -15,7 +15,7 @@
 
 // REQUIRES: has-unix-headers
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <array>
 #include <span>
@@ -26,13 +26,13 @@ int main(int, char**) {
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int> const s(array.data(), 0);
-        TEST_LIBCPP_ASSERT_FAILURE(s.back(), "span<T>::back() on empty span");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.back(), "span<T>::back() on empty span");
     }
 
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int, 0> const s(array.data(), 0);
-        TEST_LIBCPP_ASSERT_FAILURE(s.back(), "span<T, N>::back() on empty span");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.back(), "span<T, N>::back() on empty span");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.front.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.front.pass.cpp
index 8234ef8e68fb..44d6fabe263b 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.front.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.front.pass.cpp
@@ -15,7 +15,7 @@
 
 // REQUIRES: has-unix-headers
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <array>
 #include <span>
@@ -26,13 +26,13 @@ int main(int, char**) {
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int> const s(array.data(), 0);
-        TEST_LIBCPP_ASSERT_FAILURE(s.front(), "span<T>::front() on empty span");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.front(), "span<T>::front() on empty span");
     }
 
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int, 0> const s(array.data(), 0);
-        TEST_LIBCPP_ASSERT_FAILURE(s.front(), "span<T, N>::front() on empty span");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.front(), "span<T, N>::front() on empty span");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.op_idx.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.op_idx.pass.cpp
index 2e643b337208..1c4b4f590d08 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.op_idx.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.elem/assert.op_idx.pass.cpp
@@ -15,7 +15,7 @@
 
 // REQUIRES: has-unix-headers
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <array>
 #include <span>
@@ -26,13 +26,13 @@ int main(int, char**) {
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int> const s(array.data(), array.size());
-        TEST_LIBCPP_ASSERT_FAILURE(s[3], "span<T>::operator[](index): index out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s[3], "span<T>::operator[](index): index out of range");
     }
 
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int, 3> const s(array.data(), array.size());
-        TEST_LIBCPP_ASSERT_FAILURE(s[3], "span<T, N>::operator[](index): index out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s[3], "span<T, N>::operator[](index): index out of range");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.first.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.first.pass.cpp
index d17948f390fc..4122a4f55203 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.first.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.first.pass.cpp
@@ -15,7 +15,7 @@
 
 // REQUIRES: has-unix-headers
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <array>
 #include <span>
@@ -26,13 +26,13 @@ int main(int, char**) {
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int> const s(array.data(), array.size());
-        TEST_LIBCPP_ASSERT_FAILURE(s.first(4), "span<T>::first(count): count out of range");
-        TEST_LIBCPP_ASSERT_FAILURE(s.first<4>(), "span<T>::first<Count>(): Count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.first(4), "span<T>::first(count): count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.first<4>(), "span<T>::first<Count>(): Count out of range");
     }
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int, 3> const s(array.data(), array.size());
-        TEST_LIBCPP_ASSERT_FAILURE(s.first(4), "span<T, N>::first(count): count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.first(4), "span<T, N>::first(count): count out of range");
         // s.first<4>() caught at compile-time (tested elsewhere)
     }
 

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.last.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.last.pass.cpp
index e49f37f34090..ef838b1fded7 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.last.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.last.pass.cpp
@@ -15,7 +15,7 @@
 
 // REQUIRES: has-unix-headers
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <array>
 #include <span>
@@ -26,13 +26,13 @@ int main(int, char**) {
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int> const s(array.data(), array.size());
-        TEST_LIBCPP_ASSERT_FAILURE(s.last(4), "span<T>::last(count): count out of range");
-        TEST_LIBCPP_ASSERT_FAILURE(s.last<4>(), "span<T>::last<Count>(): Count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.last(4), "span<T>::last(count): count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.last<4>(), "span<T>::last<Count>(): Count out of range");
     }
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int, 3> const s(array.data(), array.size());
-        TEST_LIBCPP_ASSERT_FAILURE(s.last(4), "span<T, N>::last(count): count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.last(4), "span<T, N>::last(count): count out of range");
         // s.last<4>() caught at compile-time (tested elsewhere)
     }
 

diff  --git a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.subspan.pass.cpp b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.subspan.pass.cpp
index 487140f9fbb0..08d3bd144267 100644
--- a/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.subspan.pass.cpp
+++ b/libcxx/test/libcxx/containers/views/views.span/span.sub/assert.subspan.pass.cpp
@@ -19,7 +19,7 @@
 
 // REQUIRES: has-unix-headers
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <array>
 #include <span>
@@ -31,25 +31,25 @@ int main(int, char**) {
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int> const s(array.data(), array.size());
-        TEST_LIBCPP_ASSERT_FAILURE(s.subspan(4), "span<T>::subspan(offset, count): offset out of range");
-        TEST_LIBCPP_ASSERT_FAILURE(s.subspan<4>(), "span<T>::subspan<Offset, Count>(): Offset out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.subspan(4), "span<T>::subspan(offset, count): offset out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.subspan<4>(), "span<T>::subspan<Offset, Count>(): Offset out of range");
 
-        TEST_LIBCPP_ASSERT_FAILURE(s.subspan(0, 4), "span<T>::subspan(offset, count): count out of range");
-        TEST_LIBCPP_ASSERT_FAILURE((s.subspan<0, 4>()), "span<T>::subspan<Offset, Count>(): Offset + Count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.subspan(0, 4), "span<T>::subspan(offset, count): count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE((s.subspan<0, 4>()), "span<T>::subspan<Offset, Count>(): Offset + Count out of range");
 
-        TEST_LIBCPP_ASSERT_FAILURE(s.subspan(1, 3), "span<T>::subspan(offset, count): offset + count out of range");
-        TEST_LIBCPP_ASSERT_FAILURE((s.subspan<1, 3>()), "span<T>::subspan<Offset, Count>(): Offset + Count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.subspan(1, 3), "span<T>::subspan(offset, count): offset + count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE((s.subspan<1, 3>()), "span<T>::subspan<Offset, Count>(): Offset + Count out of range");
     }
     {
         std::array<int, 3> array{0, 1, 2};
         std::span<int, 3> const s(array.data(), array.size());
-        TEST_LIBCPP_ASSERT_FAILURE(s.subspan(4), "span<T, N>::subspan(offset, count): offset out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.subspan(4), "span<T, N>::subspan(offset, count): offset out of range");
         // s.subspan<4>() caught at compile-time (tested elsewhere)
 
-        TEST_LIBCPP_ASSERT_FAILURE(s.subspan(0, 4), "span<T, N>::subspan(offset, count): count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.subspan(0, 4), "span<T, N>::subspan(offset, count): count out of range");
         // s.subspan<0, 4>() caught at compile-time (tested elsewhere)
 
-        TEST_LIBCPP_ASSERT_FAILURE(s.subspan(1, 3), "span<T, N>::subspan(offset, count): offset + count out of range");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.subspan(1, 3), "span<T, N>::subspan(offset, count): offset + count out of range");
         // s.subspan<1, 3>() caught at compile-time (tested elsewhere)
     }
 

diff  --git a/libcxx/test/libcxx/debug/containers.multithread.pass.cpp b/libcxx/test/libcxx/debug/containers.multithread.pass.cpp
index a389c31b2142..273c34c9f174 100644
--- a/libcxx/test/libcxx/debug/containers.multithread.pass.cpp
+++ b/libcxx/test/libcxx/debug/containers.multithread.pass.cpp
@@ -9,7 +9,7 @@
 // UNSUPPORTED: c++11, c++14
 // UNSUPPORTED: no-threads
 
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 // test multithreaded container debugging
 

diff  --git a/libcxx/test/libcxx/debug/containers/associative_containers.pass.cpp b/libcxx/test/libcxx/debug/containers/associative_containers.pass.cpp
index 00471ceb617a..211fc07d8afa 100644
--- a/libcxx/test/libcxx/debug/containers/associative_containers.pass.cpp
+++ b/libcxx/test/libcxx/debug/containers/associative_containers.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03, c++11, c++14
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03, c++11, c++14
 
 // test container debugging
 

diff  --git a/libcxx/test/libcxx/debug/containers/sequence_container_iterators.pass.cpp b/libcxx/test/libcxx/debug/containers/sequence_container_iterators.pass.cpp
index c9a9fbcb33b5..509129ea7b98 100644
--- a/libcxx/test/libcxx/debug/containers/sequence_container_iterators.pass.cpp
+++ b/libcxx/test/libcxx/debug/containers/sequence_container_iterators.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03, c++11, c++14
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03, c++11, c++14
 
 // test container debugging
 

diff  --git a/libcxx/test/libcxx/debug/containers/string.pass.cpp b/libcxx/test/libcxx/debug/containers/string.pass.cpp
index fc6cc42febee..37253c7245b2 100644
--- a/libcxx/test/libcxx/debug/containers/string.pass.cpp
+++ b/libcxx/test/libcxx/debug/containers/string.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03, c++11, c++14
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03, c++11, c++14
 
 // test container debugging
 
@@ -80,7 +80,7 @@ struct StringContainerChecks : BasicContainerChecks<Container, CT> {
     EXPECT_DEATH( C1.erase(it1) );
     C1.erase(C1.begin(), C1.end());
     assert(C1.size() == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(C1.pop_back(), "string::pop_back(): string is already empty");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(C1.pop_back(), "string::pop_back(): string is already empty");
   }
 };
 

diff  --git a/libcxx/test/libcxx/debug/containers/unord_containers.pass.cpp b/libcxx/test/libcxx/debug/containers/unord_containers.pass.cpp
index 19a21241a5c6..f0f78a5265bb 100644
--- a/libcxx/test/libcxx/debug/containers/unord_containers.pass.cpp
+++ b/libcxx/test/libcxx/debug/containers/unord_containers.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03, c++11, c++14
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03, c++11, c++14
 
 // test container debugging
 

diff  --git a/libcxx/test/libcxx/debug/debug.assertions-enabled.compile.pass.cpp b/libcxx/test/libcxx/debug/debug.assertions-enabled.compile.pass.cpp
index 037805b12611..bbdd3a92fe63 100644
--- a/libcxx/test/libcxx/debug/debug.assertions-enabled.compile.pass.cpp
+++ b/libcxx/test/libcxx/debug/debug.assertions-enabled.compile.pass.cpp
@@ -8,10 +8,10 @@
 
 // This test ensures that assertions are enabled by default when the debug mode is enabled.
 
-// REQUIRES: libcpp-has-debug-mode
+// REQUIRES: LIBCUDACXX-has-debug-mode
 
 #include <version>
 
-#if !defined(_LIBCPP_ENABLE_ASSERTIONS) || _LIBCPP_ENABLE_ASSERTIONS == 0
+#if !defined(_LIBCUDACXX_ENABLE_ASSERTIONS) || _LIBCUDACXX_ENABLE_ASSERTIONS == 0
 #   error "Assertions should be enabled automatically when the debug mode is enabled"
 #endif

diff  --git a/libcxx/test/libcxx/debug/debug.catch-legacy-macro.verify.cpp b/libcxx/test/libcxx/debug/debug.catch-legacy-macro.verify.cpp
index ac265c99ced6..de5b478c9741 100644
--- a/libcxx/test/libcxx/debug/debug.catch-legacy-macro.verify.cpp
+++ b/libcxx/test/libcxx/debug/debug.catch-legacy-macro.verify.cpp
@@ -9,8 +9,8 @@
 // This test ensures that we issue an error if we try to enable the debug mode with
 // a library that was not built with support for the debug mode.
 
-// REQUIRES: !libcpp-has-debug-mode
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEBUG=1
+// REQUIRES: !LIBCUDACXX-has-debug-mode
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DEBUG=1
 
 // This test fails when modules are enabled because we fail to build module 'std' instead of
 // issuing the preprocessor error.

diff  --git a/libcxx/test/libcxx/debug/extern-templates.sh.cpp b/libcxx/test/libcxx/debug/extern-templates.sh.cpp
index 612da5e0f0f1..63c3da8b7b50 100644
--- a/libcxx/test/libcxx/debug/extern-templates.sh.cpp
+++ b/libcxx/test/libcxx/debug/extern-templates.sh.cpp
@@ -10,7 +10,7 @@
 // for members of <locale> even when the debug mode is enabled, which is
 // necessary for correctness. See https://llvm.org/D94718 for details.
 
-// UNSUPPORTED: !libcpp-has-debug-mode
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode
 // UNSUPPORTED: no-localization
 // UNSUPPORTED: cant-build-shared-library
 

diff  --git a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp
index cad0bd8b304e..4a708dbf182e 100644
--- a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.cxx1z.pass.cpp
@@ -12,11 +12,11 @@
 // class auto_ptr;
 //
 //  In C++17, auto_ptr has been removed.
-//  However, for backwards compatibility, if _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
+//  However, for backwards compatibility, if _LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR
 //  is defined before including <memory>, then auto_ptr will be restored.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <type_traits>

diff  --git a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.verify.cpp b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.verify.cpp
index 9fc83062c69a..9fec771a8c64 100644
--- a/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.auto.ptr/auto.ptr/auto_ptr.depr_in_cxx11.verify.cpp
@@ -20,7 +20,7 @@
 
 // UNSUPPORTED: c++03
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR
 
 #include <memory>
 #include "test_macros.h"

diff  --git a/libcxx/test/libcxx/depr/depr.c.headers/ciso646.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/ciso646.pass.cpp
index 7a83994140d9..b67b2cef4be6 100644
--- a/libcxx/test/libcxx/depr/depr.c.headers/ciso646.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.c.headers/ciso646.pass.cpp
@@ -10,8 +10,8 @@
 
 #include <ciso646>
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/depr/depr.c.headers/complex.h.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/complex.h.pass.cpp
index 07529aef261d..05fe043413e4 100644
--- a/libcxx/test/libcxx/depr/depr.c.headers/complex.h.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.c.headers/complex.h.pass.cpp
@@ -10,8 +10,8 @@
 
 #include <complex.h>
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp
index a4a05e6a08ef..53a4cb56b87f 100644
--- a/libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp
@@ -22,7 +22,7 @@ extern "C" {
 #include <inttypes.h>
 #include <iso646.h>
 #include <limits.h>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 #   include <locale.h>
 #endif
 #include <math.h>
@@ -39,7 +39,7 @@ extern "C" {
 // tgmath.h is not supported in extern "C".
 #include <time.h>
 // FIXME: #include <uchar.h>
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 #   include <wchar.h>
 #   include <wctype.h>
 #endif

diff  --git a/libcxx/test/libcxx/depr/depr.c.headers/fenv.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/fenv.pass.cpp
index a7cdb1a0319b..b93fce4944d2 100644
--- a/libcxx/test/libcxx/depr/depr.c.headers/fenv.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.c.headers/fenv.pass.cpp
@@ -10,8 +10,8 @@
 
 #include <fenv.h>
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**) { return 0; }

diff  --git a/libcxx/test/libcxx/depr/depr.c.headers/locale_h.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/locale_h.pass.cpp
index 72468612933c..dd3f8b2fd2de 100644
--- a/libcxx/test/libcxx/depr/depr.c.headers/locale_h.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.c.headers/locale_h.pass.cpp
@@ -12,8 +12,8 @@
 
 #include <locale.h>
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/depr/depr.c.headers/no_fgetpos_fsetpos.verify.cpp b/libcxx/test/libcxx/depr/depr.c.headers/no_fgetpos_fsetpos.verify.cpp
index 1aaf953e4e7d..3fb382306f67 100644
--- a/libcxx/test/libcxx/depr/depr.c.headers/no_fgetpos_fsetpos.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.c.headers/no_fgetpos_fsetpos.verify.cpp
@@ -12,7 +12,7 @@
 
 using U = decltype(::fgetpos);
 using V = decltype(::fsetpos);
-#ifdef _LIBCPP_HAS_NO_FGETPOS_FSETPOS
+#ifdef _LIBCUDACXX_HAS_NO_FGETPOS_FSETPOS
 // expected-error at -3 {{no member named 'fgetpos' in the global namespace}}
 // expected-error at -3 {{no member named 'fsetpos' in the global namespace}}
 #else

diff  --git a/libcxx/test/libcxx/depr/depr.c.headers/tgmath_h.pass.cpp b/libcxx/test/libcxx/depr/depr.c.headers/tgmath_h.pass.cpp
index 835e2f21616a..8d46b792e450 100644
--- a/libcxx/test/libcxx/depr/depr.c.headers/tgmath_h.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.c.headers/tgmath_h.pass.cpp
@@ -10,8 +10,8 @@
 
 #include <tgmath.h>
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.cxx2a.pass.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.cxx2a.pass.cpp
index 59657ca46a14..546f321de973 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.cxx2a.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.cxx2a.pass.cpp
@@ -13,11 +13,11 @@
 // const_pointer address(const_reference x) const;
 
 //  In C++20, parts of std::allocator<T> have been removed.
-//  However, for backwards compatibility, if _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+//  However, for backwards compatibility, if _LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
 //  is defined before including <memory>, then removed members will be restored.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.verify.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.verify.cpp
index 4ccc3c099acd..37c46be0a69e 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/address.depr_in_cxx17.verify.cpp
@@ -16,7 +16,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
 
 #include <memory>
 #include "test_macros.h"

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.pass.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.pass.cpp
index cca85103bcb1..00aa22ee70b3 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.pass.cpp
@@ -11,8 +11,8 @@
 // allocator:
 // T* allocate(size_t n, const void* hint);
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.verify.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.verify.cpp
index c122be5996d0..4bd996451449 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.cxx2a.verify.cpp
@@ -14,11 +14,11 @@
 // T* allocate(size_t n, const void* hint);
 
 //  In C++20, parts of std::allocator<T> have been removed.
-//  However, for backwards compatibility, if _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+//  However, for backwards compatibility, if _LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
 //  is defined before including <memory>, then removed members will be restored.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.verify.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.verify.cpp
index efb57b6e496e..8a91a55bf066 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/allocate.depr_in_cxx17.verify.cpp
@@ -15,7 +15,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
 
 #include <memory>
 #include "test_macros.h"

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/construct.cxx2a.pass.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/construct.cxx2a.pass.cpp
index d3a7dadbbe11..a8edce1a5355 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/construct.cxx2a.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/construct.cxx2a.pass.cpp
@@ -12,11 +12,11 @@
 // template <class... Args> void construct(pointer p, Args&&... args);
 
 //  In C++20, parts of std::allocator<T> have been removed.
-//  However, for backwards compatibility, if _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+//  However, for backwards compatibility, if _LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
 //  is defined before including <memory>, then removed members will be restored.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/max_size.cxx2a.pass.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/max_size.cxx2a.pass.cpp
index b07568355fee..ea1cb2ff730c 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/max_size.cxx2a.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator.members/max_size.cxx2a.pass.cpp
@@ -12,11 +12,11 @@
 // size_type max_size() const throw();
 
 //  In C++20, parts of std::allocator<T> have been removed.
-//  However, for backwards compatibility, if _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+//  However, for backwards compatibility, if _LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
 //  is defined before including <memory>, then removed members will be restored.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <limits>

diff  --git a/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.cxx2a.pass.cpp b/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.cxx2a.pass.cpp
index a6134b04a8f5..9343d2e841e9 100644
--- a/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.cxx2a.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.default.allocator/allocator_types.cxx2a.pass.cpp
@@ -26,8 +26,8 @@
 // ...
 // };
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <type_traits>

diff  --git a/libcxx/test/libcxx/depr/depr.func.adaptor.typedefs/typedefs.depr_in_cxx17.verify.cpp b/libcxx/test/libcxx/depr/depr.func.adaptor.typedefs/typedefs.depr_in_cxx17.verify.cpp
index 422f40504220..58a1e6dfd5b9 100644
--- a/libcxx/test/libcxx/depr/depr.func.adaptor.typedefs/typedefs.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.func.adaptor.typedefs/typedefs.depr_in_cxx17.verify.cpp
@@ -10,7 +10,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
 
 #include <functional>
 #include <map>

diff  --git a/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.verify.cpp b/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.verify.cpp
index 2b3a05eaad74..a30f84a59e1b 100644
--- a/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/libcxx/depr/depr.function.objects/adaptors.depr_in_cxx11.verify.cpp
@@ -10,7 +10,7 @@
 
 // UNSUPPORTED: c++03
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp b/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
index 7583c36ba19d..62cef0851177 100644
--- a/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.function.objects/depr.adaptors.cxx1z.pass.cpp
@@ -10,11 +10,11 @@
 
 
 //  In C++17, the function adapters mem_fun/mem_fun_ref, etc have been removed.
-//  However, for backwards compatibility, if _LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
+//  However, for backwards compatibility, if _LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS
 //  is defined before including <functional>, then they will be restored.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/depr/depr.str.strstreams/version.pass.cpp b/libcxx/test/libcxx/depr/depr.str.strstreams/version.pass.cpp
index f57921f859a5..8dd7b605267d 100644
--- a/libcxx/test/libcxx/depr/depr.str.strstreams/version.pass.cpp
+++ b/libcxx/test/libcxx/depr/depr.str.strstreams/version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp b/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp
index 3ae848fcdfd0..6440a48f08d6 100644
--- a/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp
+++ b/libcxx/test/libcxx/depr/enable_removed_cpp17_features.pass.cpp
@@ -6,21 +6,21 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Test that defining _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES correctly defines
-// _LIBCPP_ENABLE_CXX17_REMOVED_FOO for each individual component macro.
+// Test that defining _LIBCUDACXX_ENABLE_CXX17_REMOVED_FEATURES correctly defines
+// _LIBCUDACXX_ENABLE_CXX17_REMOVED_FOO for each individual component macro.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_FEATURES
 
 #include <__config>
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
-#error _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS must be defined
+#ifndef _LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+#error _LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS must be defined
 #endif
 
-#ifndef _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR
-#error _LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR must be defined
+#ifndef _LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR
+#error _LIBCUDACXX_ENABLE_CXX17_REMOVED_AUTO_PTR must be defined
 #endif
 
 int main(int, char**) {

diff  --git a/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp b/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp
index e4533a01c5bf..be35b6f83ce0 100644
--- a/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp
+++ b/libcxx/test/libcxx/depr/exception.unexpected/get_unexpected.pass.cpp
@@ -8,7 +8,7 @@
 
 // test get_unexpected
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
 
 #include <exception>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp b/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp
index f428790f6cc9..ed20a409c531 100644
--- a/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp
+++ b/libcxx/test/libcxx/depr/exception.unexpected/set_unexpected.pass.cpp
@@ -8,7 +8,7 @@
 
 // test set_unexpected
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
 
 #include <exception>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp b/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp
index 6ab1147b912e..cdb10a04356e 100644
--- a/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp
+++ b/libcxx/test/libcxx/depr/exception.unexpected/unexpected.pass.cpp
@@ -8,7 +8,7 @@
 
 // test unexpected
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS
 
 #include <exception>
 #include <cstdlib>

diff  --git a/libcxx/test/libcxx/diagnostics/assertions/version_cassert.pass.cpp b/libcxx/test/libcxx/diagnostics/assertions/version_cassert.pass.cpp
index af076cc3a56d..2e14bdc2888b 100644
--- a/libcxx/test/libcxx/diagnostics/assertions/version_cassert.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/assertions/version_cassert.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/diagnostics/enable_nodiscard.verify.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard.verify.cpp
index b729619046ec..8c4d4ce8424c 100644
--- a/libcxx/test/libcxx/diagnostics/enable_nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard.verify.cpp
@@ -6,18 +6,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Test that _LIBCPP_NODISCARD_EXT and _LIBCPP_NODISCARD_AFTER_CXX17 are defined
-// to the appropriate warning-generating attribute when _LIBCPP_ENABLE_NODISCARD
+// Test that _LIBCUDACXX_NODISCARD_EXT and _LIBCUDACXX_NODISCARD_AFTER_CXX17 are defined
+// to the appropriate warning-generating attribute when _LIBCUDACXX_ENABLE_NODISCARD
 // is explicitly provided.
 
 // UNSUPPORTED: c++03
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_NODISCARD
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_NODISCARD
 
 #include <__config>
 
-_LIBCPP_NODISCARD_EXT int foo() { return 42; }
-_LIBCPP_NODISCARD_AFTER_CXX17 int bar() { return 42; }
+_LIBCUDACXX_NODISCARD_EXT int foo() { return 42; }
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 int bar() { return 42; }
 
 int main(int, char**) {
   foo(); // expected-warning-re {{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}}

diff  --git a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.verify.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.verify.cpp
index 4bbd18fa93bd..8c44630f6767 100644
--- a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_after_cxx17.verify.cpp
@@ -8,16 +8,16 @@
 
 // UNSUPPORTED: c++03
 
-// Test that _LIBCPP_DISABLE_NODISCARD_EXT only disables _LIBCPP_NODISCARD_EXT
-// and not _LIBCPP_NODISCARD_AFTER_CXX17.
+// Test that _LIBCUDACXX_DISABLE_NODISCARD_EXT only disables _LIBCUDACXX_NODISCARD_EXT
+// and not _LIBCUDACXX_NODISCARD_AFTER_CXX17.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_NODISCARD
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_NODISCARD
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_NODISCARD_AFTER_CXX17
 #include <__config>
 
 
-_LIBCPP_NODISCARD_EXT int foo() { return 42; }
-_LIBCPP_NODISCARD_AFTER_CXX17 int bar() { return 42; }
+_LIBCUDACXX_NODISCARD_EXT int foo() { return 42; }
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 int bar() { return 42; }
 
 int main(int, char**) {
   foo(); // expected-warning-re{{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}}

diff  --git a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.verify.cpp b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.verify.cpp
index 618bdc88eb95..6651cac30ba6 100644
--- a/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/enable_nodiscard_disable_nodiscard_ext.verify.cpp
@@ -8,13 +8,13 @@
 
 // UNSUPPORTED: c++03
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_NODISCARD
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_NODISCARD_EXT
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_NODISCARD
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_NODISCARD_EXT
 #include <__config>
 
 
-_LIBCPP_NODISCARD_EXT int foo() { return 42; }
-_LIBCPP_NODISCARD_AFTER_CXX17 int bar() { return 42; }
+_LIBCUDACXX_NODISCARD_EXT int foo() { return 42; }
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 int bar() { return 42; }
 
 int main(int, char**) {
   bar(); // expected-warning-re{{ignoring return value of function declared with {{'nodiscard'|warn_unused_result}} attribute}}

diff  --git a/libcxx/test/libcxx/diagnostics/errno/version_cerrno.pass.cpp b/libcxx/test/libcxx/diagnostics/errno/version_cerrno.pass.cpp
index ca708e4444e5..2432c7bb2abb 100644
--- a/libcxx/test/libcxx/diagnostics/errno/version_cerrno.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/errno/version_cerrno.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**) {

diff  --git a/libcxx/test/libcxx/diagnostics/nodiscard.pass.cpp b/libcxx/test/libcxx/diagnostics/nodiscard.pass.cpp
index b00e0e778c39..4ae8340e50dd 100644
--- a/libcxx/test/libcxx/diagnostics/nodiscard.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/nodiscard.pass.cpp
@@ -6,14 +6,14 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Test that _LIBCPP_NODISCARD_EXT is not defined to [[nodiscard]] unless
-// explicitly enabled by _LIBCPP_ENABLE_NODISCARD
+// Test that _LIBCUDACXX_NODISCARD_EXT is not defined to [[nodiscard]] unless
+// explicitly enabled by _LIBCUDACXX_ENABLE_NODISCARD
 
 #include <__config>
 
 #include "test_macros.h"
 
-_LIBCPP_NODISCARD_EXT int foo() { return 42; }
+_LIBCUDACXX_NODISCARD_EXT int foo() { return 42; }
 
 int main(int, char**) {
   foo(); // OK.

diff  --git a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp
index 0dff1c707587..b1f7d8dbc0c7 100644
--- a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.pass.cpp
@@ -6,16 +6,16 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Test that _LIBCPP_NODISCARD_AFTER_CXX17 is disabled whenever
-// _LIBCPP_DISABLE_NODISCARD_AFTER_CXX17 is defined by the user.
+// Test that _LIBCUDACXX_NODISCARD_AFTER_CXX17 is disabled whenever
+// _LIBCUDACXX_DISABLE_NODISCARD_AFTER_CXX17 is defined by the user.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_NODISCARD_AFTER_CXX17
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_NODISCARD_AFTER_CXX17
 
 #include <__config>
 
 #include "test_macros.h"
 
-_LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; }
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 int foo() { return 6; }
 
 int main(int, char**)
 {

diff  --git a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
index b281632a6fd6..6ca3412cfa44 100644
--- a/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/nodiscard_aftercxx17.verify.cpp
@@ -6,14 +6,14 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Test that _LIBCPP_NODISCARD_AFTER_CXX17 works
-//	#define _LIBCPP_NODISCARD_AFTER_CXX17 [[nodiscard]]
+// Test that _LIBCUDACXX_NODISCARD_AFTER_CXX17 works
+//	#define _LIBCUDACXX_NODISCARD_AFTER_CXX17 [[nodiscard]]
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 
 #include <__config>
 
-_LIBCPP_NODISCARD_AFTER_CXX17 int foo() { return 6; }
+_LIBCUDACXX_NODISCARD_AFTER_CXX17 int foo() { return 6; }
 
 int main(int, char**)
 {

diff  --git a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
index b602a88a137a..fc0d7d8a5003 100644
--- a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // Test that entities declared [[nodiscard]] as at extension by libc++, are
-// only actually declared such when _LIBCPP_ENABLE_NODISCARD is specified.
+// only actually declared such when _LIBCUDACXX_ENABLE_NODISCARD is specified.
 
 // This test intentionally leaks memory, so it is unsupported under ASAN.
 // UNSUPPORTED: asan
@@ -20,7 +20,7 @@
 // trigger -Wunused-value warnings.
 // ADDITIONAL_COMPILE_FLAGS: -fno-builtin
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <algorithm>
 #include <bit> // bit_cast

diff  --git a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp
index a3464e74b287..0163910694f5 100644
--- a/libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp
+++ b/libcxx/test/libcxx/diagnostics/nodiscard_extensions.verify.cpp
@@ -9,14 +9,14 @@
 // UNSUPPORTED: c++03
 
 // Test that entities declared [[nodiscard]] as an extension by libc++, are
-// only actually declared such when _LIBCPP_ENABLE_NODISCARD is specified.
+// only actually declared such when _LIBCUDACXX_ENABLE_NODISCARD is specified.
 
 // All entities to which libc++ applies [[nodiscard]] as an extension should
 // be tested here and in nodiscard_extensions.pass.cpp. They should also
 // be listed in `UsingLibcxx.rst` in the documentation for the extension.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_NODISCARD
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_NODISCARD
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <algorithm>
 #include <bit> // bit_cast

diff  --git a/libcxx/test/libcxx/diagnostics/std.exceptions/version.pass.cpp b/libcxx/test/libcxx/diagnostics/std.exceptions/version.pass.cpp
index 91d91b406e4d..022f8cd1c726 100644
--- a/libcxx/test/libcxx/diagnostics/std.exceptions/version.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/std.exceptions/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/diagnostics/syserr/version.pass.cpp b/libcxx/test/libcxx/diagnostics/syserr/version.pass.cpp
index 29e6095576c7..a104f79e987e 100644
--- a/libcxx/test/libcxx/diagnostics/syserr/version.pass.cpp
+++ b/libcxx/test/libcxx/diagnostics/syserr/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/double_include.sh.cpp b/libcxx/test/libcxx/double_include.sh.cpp
index 8d3cfc0be31c..c5839bcf2488 100644
--- a/libcxx/test/libcxx/double_include.sh.cpp
+++ b/libcxx/test/libcxx/double_include.sh.cpp
@@ -41,7 +41,7 @@ END-SCRIPT
 #include <any>
 #include <array>
 #include <atomic>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <barrier>
 #endif
 #include <bit>
@@ -57,11 +57,11 @@ END-SCRIPT
 #include <cinttypes>
 #include <ciso646>
 #include <climits>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <clocale>
 #endif
 #include <cmath>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <codecvt>
 #endif
 #include <compare>
@@ -83,10 +83,10 @@ END-SCRIPT
 #include <ctime>
 #include <ctype.h>
 #include <cuchar>
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwchar>
 #endif
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwctype>
 #endif
 #include <deque>
@@ -94,82 +94,82 @@ END-SCRIPT
 #include <exception>
 #include <execution>
 #include <fenv.h>
-#if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
+#if !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
 #   include <filesystem>
 #endif
 #include <float.h>
 #include <format>
 #include <forward_list>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <fstream>
 #endif
 #include <functional>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <future>
 #endif
 #include <initializer_list>
 #include <inttypes.h>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iomanip>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ios>
 #endif
 #include <iosfwd>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iostream>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <istream>
 #endif
 #include <iterator>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <latch>
 #endif
 #include <limits>
 #include <limits.h>
 #include <list>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <locale>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <locale.h>
 #endif
 #include <map>
 #include <math.h>
 #include <memory>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <mutex>
 #endif
 #include <new>
 #include <numbers>
 #include <numeric>
 #include <optional>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ostream>
 #endif
 #include <queue>
 #include <random>
 #include <ranges>
 #include <ratio>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <regex>
 #endif
 #include <scoped_allocator>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <semaphore>
 #endif
 #include <set>
 #include <setjmp.h>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <shared_mutex>
 #endif
 #include <span>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <sstream>
 #endif
 #include <stack>
-#if __cplusplus > 202002L && !defined(_LIBCPP_HAS_NO_THREADS)
+#if __cplusplus > 202002L && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <stdatomic.h>
 #endif
 #include <stdbool.h>
@@ -178,18 +178,18 @@ END-SCRIPT
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <streambuf>
 #endif
 #include <string>
 #include <string.h>
 #include <string_view>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <strstream>
 #endif
 #include <system_error>
 #include <tgmath.h>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <thread>
 #endif
 #include <tuple>
@@ -204,16 +204,16 @@ END-SCRIPT
 #include <variant>
 #include <vector>
 #include <version>
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <wchar.h>
 #endif
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <wctype.h>
 #endif
 #if __cplusplus >= 201103L
 #   include <experimental/algorithm>
 #endif
-#if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
+#if __cplusplus >= 201103L && !defined(_LIBCUDACXX_HAS_NO_EXPERIMENTAL_COROUTINES)
 #   include <experimental/coroutine>
 #endif
 #if __cplusplus >= 201103L
@@ -240,7 +240,7 @@ END-SCRIPT
 #if __cplusplus >= 201103L
 #   include <experimental/propagate_const>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
 #   include <experimental/regex>
 #endif
 #if __cplusplus >= 201103L

diff  --git a/libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp b/libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp
index ba207e9f583c..0127aa2d0815 100644
--- a/libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp
+++ b/libcxx/test/libcxx/experimental/algorithms/header.algorithm.synop/includes.pass.cpp
@@ -12,7 +12,7 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_ALGORITHM
+#ifndef _LIBCUDACXX_ALGORITHM
 #  error "<experimental/algorithm> must include <algorithm>"
 #endif
 

diff  --git a/libcxx/test/libcxx/experimental/algorithms/version.pass.cpp b/libcxx/test/libcxx/experimental/algorithms/version.pass.cpp
index 0a96474c83b1..6a8b67e8da20 100644
--- a/libcxx/test/libcxx/experimental/algorithms/version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/algorithms/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#  error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#  error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp b/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp
index c58de9c6d476..0b389e640bd3 100644
--- a/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp
+++ b/libcxx/test/libcxx/experimental/fexperimental-library.compile.pass.cpp
@@ -26,10 +26,10 @@
 
 #include <version>
 
-#ifdef _LIBCPP_HAS_NO_INCOMPLETE_FORMAT
+#ifdef _LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT
 #   error "-fexperimental-library should enable <format>"
 #endif
 
-#ifdef _LIBCPP_HAS_NO_INCOMPLETE_RANGES
+#ifdef _LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES
 #   error "-fexperimental-library should enable <ranges>"
 #endif

diff  --git a/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.pass.cpp b/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.pass.cpp
index 46cf3452b751..4726f0bb502f 100644
--- a/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/language.support/support.coroutines/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include <experimental/coroutine>
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION must be defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION must be defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/assert.deallocate.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/assert.deallocate.pass.cpp
index 396cab36eb43..f4dd91f10a86 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/assert.deallocate.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/assert.deallocate.pass.cpp
@@ -15,7 +15,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <experimental/memory_resource>
 #include <type_traits>
@@ -34,7 +34,7 @@ int main(int, char**) {
     const std::size_t maxSize = Traits::max_size(a);
 
     a.deallocate(nullptr, maxSize); // no assertion
-    TEST_LIBCPP_ASSERT_FAILURE(a.deallocate(nullptr, maxSize + 1), "deallocate called for size which exceeds max_size()");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(a.deallocate(nullptr, maxSize + 1), "deallocate called for size which exceeds max_size()");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/assert.deallocate.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/assert.deallocate.pass.cpp
index 7c8942840f08..b255c6a998cc 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/assert.deallocate.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.adaptor/memory.resource.adaptor.mem/assert.deallocate.pass.cpp
@@ -15,7 +15,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <experimental/memory_resource>
 #include <type_traits>
@@ -37,7 +37,7 @@ int main(int, char**) {
                             - alignof(std::max_align_t);
 
     m1.deallocate(nullptr, maxSize); // no assertion
-    TEST_LIBCPP_ASSERT_FAILURE(m1.deallocate(nullptr, maxSize + 1), "do_deallocate called for size which exceeds the maximum allocation size");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(m1.deallocate(nullptr, maxSize + 1), "do_deallocate called for size which exceeds the maximum allocation size");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_deque_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_deque_libcpp_version.pass.cpp
index e3eeb938788c..72df57dbdd3a 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_deque_libcpp_version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_deque_libcpp_version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error header must provide _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
+#error header must provide _LIBCUDACXX_VERSION
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_forward_list_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_forward_list_libcpp_version.pass.cpp
index 6144ff4d87d9..4a066c9d0ae1 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_forward_list_libcpp_version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_forward_list_libcpp_version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error header must provide _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
+#error header must provide _LIBCUDACXX_VERSION
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_list_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_list_libcpp_version.pass.cpp
index 67227e70d1c9..fe9d522ccef1 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_list_libcpp_version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_list_libcpp_version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error header must provide _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
+#error header must provide _LIBCUDACXX_VERSION
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_map_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_map_libcpp_version.pass.cpp
index 3c51b90fc15e..5cec830d2a7f 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_map_libcpp_version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_map_libcpp_version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error header must provide _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
+#error header must provide _LIBCUDACXX_VERSION
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_regex_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_regex_libcpp_version.pass.cpp
index 7072603b7db0..b84f18d82bd8 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_regex_libcpp_version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_regex_libcpp_version.pass.cpp
@@ -15,8 +15,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error header must provide _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
+#error header must provide _LIBCUDACXX_VERSION
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_set_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_set_libcpp_version.pass.cpp
index a439efe08647..945f0ac7d111 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_set_libcpp_version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_set_libcpp_version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error header must provide _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
+#error header must provide _LIBCUDACXX_VERSION
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_string_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_string_libcpp_version.pass.cpp
index 1f03276cb698..0899dce09275 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_string_libcpp_version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_string_libcpp_version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error header must provide _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
+#error header must provide _LIBCUDACXX_VERSION
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_map_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_map_libcpp_version.pass.cpp
index 1c0ef4826b9b..ccb6100f9de6 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_map_libcpp_version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_map_libcpp_version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error header must provide _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
+#error header must provide _LIBCUDACXX_VERSION
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_set_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_set_libcpp_version.pass.cpp
index 4cb2fcb2ba8d..390e277bce32 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_set_libcpp_version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_unordered_set_libcpp_version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error header must provide _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
+#error header must provide _LIBCUDACXX_VERSION
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_vector_libcpp_version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_vector_libcpp_version.pass.cpp
index 7c9c943217bf..4bfd86620d83 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_vector_libcpp_version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.aliases/header_vector_libcpp_version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error header must provide _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
+#error header must provide _LIBCUDACXX_VERSION
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/experimental/memory/memory.resource.synop/version.pass.cpp b/libcxx/test/libcxx/experimental/memory/memory.resource.synop/version.pass.cpp
index 2ceed434ec45..57f5297f3553 100644
--- a/libcxx/test/libcxx/experimental/memory/memory.resource.synop/version.pass.cpp
+++ b/libcxx/test/libcxx/experimental/memory/memory.resource.synop/version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/fuzzing/fuzz.h b/libcxx/test/libcxx/fuzzing/fuzz.h
index 5e70d0afdb46..ddabb1c1e4ed 100644
--- a/libcxx/test/libcxx/fuzzing/fuzz.h
+++ b/libcxx/test/libcxx/fuzzing/fuzz.h
@@ -114,7 +114,7 @@ bool fast_is_permutation(Iter1 first1, Iter1 last1, Iter2 first2) {
 //
 // Otherwise, when e.g. running the Lit tests, we define main() to run fuzzing
 // tests on a few inputs.
-#if !defined(LIBCPP_OSS_FUZZ)
+#if !defined(LIBCUDACXX_OSS_FUZZ)
 extern "C" int LLVMFuzzerTestOneInput(const std::uint8_t*, std::size_t);
 
 int main(int, char**) {
@@ -140,6 +140,6 @@ int main(int, char**) {
 
   return 0;
 }
-#endif // !LIBCPP_OSS_FUZZ
+#endif // !LIBCUDACXX_OSS_FUZZ
 
 #endif // TEST_LIBCXX_FUZZING_FUZZ_H

diff  --git a/libcxx/test/libcxx/include_as_c.sh.cpp b/libcxx/test/libcxx/include_as_c.sh.cpp
index a3e5d533040d..df85153cfe4f 100644
--- a/libcxx/test/libcxx/include_as_c.sh.cpp
+++ b/libcxx/test/libcxx/include_as_c.sh.cpp
@@ -29,7 +29,7 @@
 #include <float.h>
 #include <inttypes.h>
 #include <limits.h>
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 #   include <locale.h>
 #endif
 #include <math.h>
@@ -45,7 +45,7 @@
 #ifndef _MSC_VER
 #    include <tgmath.h>
 #endif
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#ifndef _LIBCUDACXX_HAS_NO_WIDE_CHARACTERS
 #   include <wchar.h>
 #   include <wctype.h>
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/algorithm.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/algorithm.inclusions.compile.pass.cpp
index d2fde39d3312..b77b848b693b 100644
--- a/libcxx/test/libcxx/inclusions/algorithm.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/algorithm.inclusions.compile.pass.cpp
@@ -18,9 +18,9 @@
 #include <algorithm>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_ALGORITHM)
- #   error "<algorithm> was expected to define _LIBCPP_ALGORITHM"
+#if !defined(_LIBCUDACXX_ALGORITHM)
+ #   error "<algorithm> was expected to define _LIBCUDACXX_ALGORITHM"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<algorithm> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/array.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/array.inclusions.compile.pass.cpp
index 7ec19fb0e23e..35b9a698b99a 100644
--- a/libcxx/test/libcxx/inclusions/array.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/array.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <array>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_ARRAY)
- #   error "<array> was expected to define _LIBCPP_ARRAY"
+#if !defined(_LIBCUDACXX_ARRAY)
+ #   error "<array> was expected to define _LIBCUDACXX_ARRAY"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<array> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<array> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/bitset.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/bitset.inclusions.compile.pass.cpp
index c8d413c1d57f..9e62fe514a7d 100644
--- a/libcxx/test/libcxx/inclusions/bitset.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/bitset.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <bitset>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_BITSET)
- #   error "<bitset> was expected to define _LIBCPP_BITSET"
+#if !defined(_LIBCUDACXX_BITSET)
+ #   error "<bitset> was expected to define _LIBCUDACXX_BITSET"
 #endif
-#if !defined(_LIBCPP_IOSFWD)
+#if !defined(_LIBCUDACXX_IOSFWD)
  #   error "<bitset> should include <iosfwd> in C++03 and later"
 #endif
-#if !defined(_LIBCPP_STRING)
+#if !defined(_LIBCUDACXX_STRING)
  #   error "<bitset> should include <string> in C++03 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/chrono.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/chrono.inclusions.compile.pass.cpp
index ffcaeed4e728..6bf2252c64fe 100644
--- a/libcxx/test/libcxx/inclusions/chrono.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/chrono.inclusions.compile.pass.cpp
@@ -20,9 +20,9 @@
 #include <chrono>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_CHRONO)
- #   error "<chrono> was expected to define _LIBCPP_CHRONO"
+#if !defined(_LIBCUDACXX_CHRONO)
+ #   error "<chrono> was expected to define _LIBCUDACXX_CHRONO"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<chrono> should include <compare> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/cinttypes.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/cinttypes.inclusions.compile.pass.cpp
index 61c0797a8074..3c28aca7d0ee 100644
--- a/libcxx/test/libcxx/inclusions/cinttypes.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/cinttypes.inclusions.compile.pass.cpp
@@ -18,9 +18,9 @@
 #include <cinttypes>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_CINTTYPES)
- #   error "<cinttypes> was expected to define _LIBCPP_CINTTYPES"
+#if !defined(_LIBCUDACXX_CINTTYPES)
+ #   error "<cinttypes> was expected to define _LIBCUDACXX_CINTTYPES"
 #endif
-#if !defined(_LIBCPP_CSTDINT)
+#if !defined(_LIBCUDACXX_CSTDINT)
  #   error "<cinttypes> should include <cstdint> in C++03 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/complex.h.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/complex.h.inclusions.compile.pass.cpp
index 5d2e943e6285..585fb84ff333 100644
--- a/libcxx/test/libcxx/inclusions/complex.h.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/complex.h.inclusions.compile.pass.cpp
@@ -18,9 +18,9 @@
 #include <complex.h>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_COMPLEX_H)
- #   error "<complex.h> was expected to define _LIBCPP_COMPLEX_H"
+#if !defined(_LIBCUDACXX_COMPLEX_H)
+ #   error "<complex.h> was expected to define _LIBCUDACXX_COMPLEX_H"
 #endif
-#if !defined(_LIBCPP_COMPLEX)
+#if !defined(_LIBCUDACXX_COMPLEX)
  #   error "<complex.h> should include <complex> in C++03 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/coroutine.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/coroutine.inclusions.compile.pass.cpp
index d1ac6f3933a5..19d0827e41a0 100644
--- a/libcxx/test/libcxx/inclusions/coroutine.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/coroutine.inclusions.compile.pass.cpp
@@ -20,9 +20,9 @@
 #include <coroutine>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_COROUTINE)
- #   error "<coroutine> was expected to define _LIBCPP_COROUTINE"
+#if !defined(_LIBCUDACXX_COROUTINE)
+ #   error "<coroutine> was expected to define _LIBCUDACXX_COROUTINE"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<coroutine> should include <compare> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/deque.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/deque.inclusions.compile.pass.cpp
index d1563de00e05..e0cdfaf811fe 100644
--- a/libcxx/test/libcxx/inclusions/deque.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/deque.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <deque>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_DEQUE)
- #   error "<deque> was expected to define _LIBCPP_DEQUE"
+#if !defined(_LIBCUDACXX_DEQUE)
+ #   error "<deque> was expected to define _LIBCUDACXX_DEQUE"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<deque> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<deque> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/filesystem.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/filesystem.inclusions.compile.pass.cpp
index a726f3a5d5f3..1fa5d448e40e 100644
--- a/libcxx/test/libcxx/inclusions/filesystem.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/filesystem.inclusions.compile.pass.cpp
@@ -21,9 +21,9 @@
 #include <filesystem>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_FILESYSTEM)
- #   error "<filesystem> was expected to define _LIBCPP_FILESYSTEM"
+#if !defined(_LIBCUDACXX_FILESYSTEM)
+ #   error "<filesystem> was expected to define _LIBCUDACXX_FILESYSTEM"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<filesystem> should include <compare> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/forward_list.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/forward_list.inclusions.compile.pass.cpp
index 62ea06ef7d4e..9518191521fb 100644
--- a/libcxx/test/libcxx/inclusions/forward_list.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/forward_list.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <forward_list>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_FORWARD_LIST)
- #   error "<forward_list> was expected to define _LIBCPP_FORWARD_LIST"
+#if !defined(_LIBCUDACXX_FORWARD_LIST)
+ #   error "<forward_list> was expected to define _LIBCUDACXX_FORWARD_LIST"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<forward_list> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<forward_list> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/ios.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/ios.inclusions.compile.pass.cpp
index 560c819b6726..8e8a1b2c4d2f 100644
--- a/libcxx/test/libcxx/inclusions/ios.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/ios.inclusions.compile.pass.cpp
@@ -20,9 +20,9 @@
 #include <ios>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_IOS)
- #   error "<ios> was expected to define _LIBCPP_IOS"
+#if !defined(_LIBCUDACXX_IOS)
+ #   error "<ios> was expected to define _LIBCUDACXX_IOS"
 #endif
-#if !defined(_LIBCPP_IOSFWD)
+#if !defined(_LIBCUDACXX_IOSFWD)
  #   error "<ios> should include <iosfwd> in C++03 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/iostream.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/iostream.inclusions.compile.pass.cpp
index a8f223a507e4..ff651f5df88f 100644
--- a/libcxx/test/libcxx/inclusions/iostream.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/iostream.inclusions.compile.pass.cpp
@@ -20,18 +20,18 @@
 #include <iostream>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_IOSTREAM)
- #   error "<iostream> was expected to define _LIBCPP_IOSTREAM"
+#if !defined(_LIBCUDACXX_IOSTREAM)
+ #   error "<iostream> was expected to define _LIBCUDACXX_IOSTREAM"
 #endif
-#if !defined(_LIBCPP_IOS)
+#if !defined(_LIBCUDACXX_IOS)
  #   error "<iostream> should include <ios> in C++03 and later"
 #endif
-#if !defined(_LIBCPP_ISTREAM)
+#if !defined(_LIBCUDACXX_ISTREAM)
  #   error "<iostream> should include <istream> in C++03 and later"
 #endif
-#if !defined(_LIBCPP_OSTREAM)
+#if !defined(_LIBCUDACXX_OSTREAM)
  #   error "<iostream> should include <ostream> in C++03 and later"
 #endif
-#if !defined(_LIBCPP_STREAMBUF)
+#if !defined(_LIBCUDACXX_STREAMBUF)
  #   error "<iostream> should include <streambuf> in C++03 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/iterator.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/iterator.inclusions.compile.pass.cpp
index 11dfb74e4598..4d8474937c6e 100644
--- a/libcxx/test/libcxx/inclusions/iterator.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/iterator.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <iterator>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_ITERATOR)
- #   error "<iterator> was expected to define _LIBCPP_ITERATOR"
+#if !defined(_LIBCUDACXX_ITERATOR)
+ #   error "<iterator> was expected to define _LIBCUDACXX_ITERATOR"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<iterator> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_CONCEPTS)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_CONCEPTS)
  #   error "<iterator> should include <concepts> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/list.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/list.inclusions.compile.pass.cpp
index 76cb06d78132..cc86cab44d45 100644
--- a/libcxx/test/libcxx/inclusions/list.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/list.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <list>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_LIST)
- #   error "<list> was expected to define _LIBCPP_LIST"
+#if !defined(_LIBCUDACXX_LIST)
+ #   error "<list> was expected to define _LIBCUDACXX_LIST"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<list> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<list> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/map.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/map.inclusions.compile.pass.cpp
index 319ee462a41b..b26b6c55371a 100644
--- a/libcxx/test/libcxx/inclusions/map.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/map.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <map>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_MAP)
- #   error "<map> was expected to define _LIBCPP_MAP"
+#if !defined(_LIBCUDACXX_MAP)
+ #   error "<map> was expected to define _LIBCUDACXX_MAP"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<map> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<map> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/memory.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/memory.inclusions.compile.pass.cpp
index 6b1cd84b19b2..93fe26696507 100644
--- a/libcxx/test/libcxx/inclusions/memory.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/memory.inclusions.compile.pass.cpp
@@ -18,9 +18,9 @@
 #include <memory>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_MEMORY)
- #   error "<memory> was expected to define _LIBCPP_MEMORY"
+#if !defined(_LIBCUDACXX_MEMORY)
+ #   error "<memory> was expected to define _LIBCUDACXX_MEMORY"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<memory> should include <compare> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/optional.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/optional.inclusions.compile.pass.cpp
index 7a6ff343e0b5..1be9bd8d6229 100644
--- a/libcxx/test/libcxx/inclusions/optional.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/optional.inclusions.compile.pass.cpp
@@ -20,9 +20,9 @@
 #include <optional>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_OPTIONAL)
- #   error "<optional> was expected to define _LIBCPP_OPTIONAL"
+#if !defined(_LIBCUDACXX_OPTIONAL)
+ #   error "<optional> was expected to define _LIBCUDACXX_OPTIONAL"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<optional> should include <compare> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/queue.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/queue.inclusions.compile.pass.cpp
index f0bf7fb64983..894d044af7a4 100644
--- a/libcxx/test/libcxx/inclusions/queue.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/queue.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <queue>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_QUEUE)
- #   error "<queue> was expected to define _LIBCPP_QUEUE"
+#if !defined(_LIBCUDACXX_QUEUE)
+ #   error "<queue> was expected to define _LIBCUDACXX_QUEUE"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<queue> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<queue> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/random.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/random.inclusions.compile.pass.cpp
index 68da450ca86b..c3e012dc8a06 100644
--- a/libcxx/test/libcxx/inclusions/random.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/random.inclusions.compile.pass.cpp
@@ -18,9 +18,9 @@
 #include <random>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_RANDOM)
- #   error "<random> was expected to define _LIBCPP_RANDOM"
+#if !defined(_LIBCUDACXX_RANDOM)
+ #   error "<random> was expected to define _LIBCUDACXX_RANDOM"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<random> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/ranges.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/ranges.inclusions.compile.pass.cpp
index b6be285a11de..afa8b5697a96 100644
--- a/libcxx/test/libcxx/inclusions/ranges.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/ranges.inclusions.compile.pass.cpp
@@ -12,7 +12,7 @@
 // clang-format off
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <ranges>
 
@@ -21,15 +21,15 @@
 #include <ranges>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_RANGES)
- #   error "<ranges> was expected to define _LIBCPP_RANGES"
+#if !defined(_LIBCUDACXX_RANGES)
+ #   error "<ranges> was expected to define _LIBCUDACXX_RANGES"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<ranges> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<ranges> should include <initializer_list> in C++20 and later"
 #endif
-#if !defined(_LIBCPP_ITERATOR)
+#if !defined(_LIBCUDACXX_ITERATOR)
  #   error "<ranges> should include <iterator> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/regex.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/regex.inclusions.compile.pass.cpp
index f7cf8b9a751b..2058c7d36299 100644
--- a/libcxx/test/libcxx/inclusions/regex.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/regex.inclusions.compile.pass.cpp
@@ -20,12 +20,12 @@
 #include <regex>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_REGEX)
- #   error "<regex> was expected to define _LIBCPP_REGEX"
+#if !defined(_LIBCUDACXX_REGEX)
+ #   error "<regex> was expected to define _LIBCUDACXX_REGEX"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<regex> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<regex> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/set.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/set.inclusions.compile.pass.cpp
index 68350f5369a9..676fa803bff4 100644
--- a/libcxx/test/libcxx/inclusions/set.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/set.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <set>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_SET)
- #   error "<set> was expected to define _LIBCPP_SET"
+#if !defined(_LIBCUDACXX_SET)
+ #   error "<set> was expected to define _LIBCUDACXX_SET"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<set> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<set> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/stack.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/stack.inclusions.compile.pass.cpp
index 323abc2f63a0..f9674b4a1664 100644
--- a/libcxx/test/libcxx/inclusions/stack.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/stack.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <stack>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_STACK)
- #   error "<stack> was expected to define _LIBCPP_STACK"
+#if !defined(_LIBCUDACXX_STACK)
+ #   error "<stack> was expected to define _LIBCUDACXX_STACK"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<stack> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<stack> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/string.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/string.inclusions.compile.pass.cpp
index d77ee0ecffa5..3bae69d4ed8c 100644
--- a/libcxx/test/libcxx/inclusions/string.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/string.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <string>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_STRING)
- #   error "<string> was expected to define _LIBCPP_STRING"
+#if !defined(_LIBCUDACXX_STRING)
+ #   error "<string> was expected to define _LIBCUDACXX_STRING"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<string> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<string> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/string_view.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/string_view.inclusions.compile.pass.cpp
index a4b999e2c680..8cae97f0c752 100644
--- a/libcxx/test/libcxx/inclusions/string_view.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/string_view.inclusions.compile.pass.cpp
@@ -20,9 +20,9 @@
 #include <string_view>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_STRING_VIEW)
- #   error "<string_view> was expected to define _LIBCPP_STRING_VIEW"
+#if !defined(_LIBCUDACXX_STRING_VIEW)
+ #   error "<string_view> was expected to define _LIBCUDACXX_STRING_VIEW"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<string_view> should include <compare> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/system_error.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/system_error.inclusions.compile.pass.cpp
index 5c7f48521997..16e1b1e0cc3f 100644
--- a/libcxx/test/libcxx/inclusions/system_error.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/system_error.inclusions.compile.pass.cpp
@@ -20,9 +20,9 @@
 #include <system_error>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_SYSTEM_ERROR)
- #   error "<system_error> was expected to define _LIBCPP_SYSTEM_ERROR"
+#if !defined(_LIBCUDACXX_SYSTEM_ERROR)
+ #   error "<system_error> was expected to define _LIBCUDACXX_SYSTEM_ERROR"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<system_error> should include <compare> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/tgmath.h.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/tgmath.h.inclusions.compile.pass.cpp
index 25bc00de3957..fb8a471851ba 100644
--- a/libcxx/test/libcxx/inclusions/tgmath.h.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/tgmath.h.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <tgmath.h>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_TGMATH_H)
- #   error "<tgmath.h> was expected to define _LIBCPP_TGMATH_H"
+#if !defined(_LIBCUDACXX_TGMATH_H)
+ #   error "<tgmath.h> was expected to define _LIBCUDACXX_TGMATH_H"
 #endif
-#if !defined(_LIBCPP_CMATH)
+#if !defined(_LIBCUDACXX_CMATH)
  #   error "<tgmath.h> should include <cmath> in C++03 and later"
 #endif
-#if !defined(_LIBCPP_COMPLEX)
+#if !defined(_LIBCUDACXX_COMPLEX)
  #   error "<tgmath.h> should include <complex> in C++03 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/thread.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/thread.inclusions.compile.pass.cpp
index 5e5ad7e605d7..101527670d3c 100644
--- a/libcxx/test/libcxx/inclusions/thread.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/thread.inclusions.compile.pass.cpp
@@ -21,9 +21,9 @@
 #include <thread>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_THREAD)
- #   error "<thread> was expected to define _LIBCPP_THREAD"
+#if !defined(_LIBCUDACXX_THREAD)
+ #   error "<thread> was expected to define _LIBCUDACXX_THREAD"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<thread> should include <compare> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/tuple.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/tuple.inclusions.compile.pass.cpp
index 58f05b1b9ece..d4f7a6655d53 100644
--- a/libcxx/test/libcxx/inclusions/tuple.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/tuple.inclusions.compile.pass.cpp
@@ -20,9 +20,9 @@
 #include <tuple>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_TUPLE)
- #   error "<tuple> was expected to define _LIBCPP_TUPLE"
+#if !defined(_LIBCUDACXX_TUPLE)
+ #   error "<tuple> was expected to define _LIBCUDACXX_TUPLE"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<tuple> should include <compare> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/typeindex.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/typeindex.inclusions.compile.pass.cpp
index 1cecb5410149..5986082e3105 100644
--- a/libcxx/test/libcxx/inclusions/typeindex.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/typeindex.inclusions.compile.pass.cpp
@@ -18,9 +18,9 @@
 #include <typeindex>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_TYPEINDEX)
- #   error "<typeindex> was expected to define _LIBCPP_TYPEINDEX"
+#if !defined(_LIBCUDACXX_TYPEINDEX)
+ #   error "<typeindex> was expected to define _LIBCUDACXX_TYPEINDEX"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<typeindex> should include <compare> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/unordered_map.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/unordered_map.inclusions.compile.pass.cpp
index 2abddcfcf13c..58f8c8ebde33 100644
--- a/libcxx/test/libcxx/inclusions/unordered_map.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/unordered_map.inclusions.compile.pass.cpp
@@ -20,12 +20,12 @@
 #include <unordered_map>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_UNORDERED_MAP)
- #   error "<unordered_map> was expected to define _LIBCPP_UNORDERED_MAP"
+#if !defined(_LIBCUDACXX_UNORDERED_MAP)
+ #   error "<unordered_map> was expected to define _LIBCUDACXX_UNORDERED_MAP"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<unordered_map> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<unordered_map> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/unordered_set.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/unordered_set.inclusions.compile.pass.cpp
index 58bf21507993..eed64f9cfed3 100644
--- a/libcxx/test/libcxx/inclusions/unordered_set.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/unordered_set.inclusions.compile.pass.cpp
@@ -20,12 +20,12 @@
 #include <unordered_set>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_UNORDERED_SET)
- #   error "<unordered_set> was expected to define _LIBCPP_UNORDERED_SET"
+#if !defined(_LIBCUDACXX_UNORDERED_SET)
+ #   error "<unordered_set> was expected to define _LIBCUDACXX_UNORDERED_SET"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<unordered_set> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<unordered_set> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/utility.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/utility.inclusions.compile.pass.cpp
index b0e2163bcf36..74938f62a584 100644
--- a/libcxx/test/libcxx/inclusions/utility.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/utility.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <utility>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_UTILITY)
- #   error "<utility> was expected to define _LIBCPP_UTILITY"
+#if !defined(_LIBCUDACXX_UTILITY)
+ #   error "<utility> was expected to define _LIBCUDACXX_UTILITY"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<utility> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<utility> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/valarray.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/valarray.inclusions.compile.pass.cpp
index 3d3bf9187db5..8d9e600ee6a5 100644
--- a/libcxx/test/libcxx/inclusions/valarray.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/valarray.inclusions.compile.pass.cpp
@@ -18,9 +18,9 @@
 #include <valarray>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_VALARRAY)
- #   error "<valarray> was expected to define _LIBCPP_VALARRAY"
+#if !defined(_LIBCUDACXX_VALARRAY)
+ #   error "<valarray> was expected to define _LIBCUDACXX_VALARRAY"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<valarray> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/variant.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/variant.inclusions.compile.pass.cpp
index 96adb1907746..437c9d9b02d1 100644
--- a/libcxx/test/libcxx/inclusions/variant.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/variant.inclusions.compile.pass.cpp
@@ -20,9 +20,9 @@
 #include <variant>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_VARIANT)
- #   error "<variant> was expected to define _LIBCPP_VARIANT"
+#if !defined(_LIBCUDACXX_VARIANT)
+ #   error "<variant> was expected to define _LIBCUDACXX_VARIANT"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<variant> should include <compare> in C++20 and later"
 #endif

diff  --git a/libcxx/test/libcxx/inclusions/vector.inclusions.compile.pass.cpp b/libcxx/test/libcxx/inclusions/vector.inclusions.compile.pass.cpp
index 2e6b36ea4f60..0385019916fc 100644
--- a/libcxx/test/libcxx/inclusions/vector.inclusions.compile.pass.cpp
+++ b/libcxx/test/libcxx/inclusions/vector.inclusions.compile.pass.cpp
@@ -18,12 +18,12 @@
 #include <vector>
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_VECTOR)
- #   error "<vector> was expected to define _LIBCPP_VECTOR"
+#if !defined(_LIBCUDACXX_VECTOR)
+ #   error "<vector> was expected to define _LIBCUDACXX_VECTOR"
 #endif
-#if TEST_STD_VER > 17 && !defined(_LIBCPP_COMPARE)
+#if TEST_STD_VER > 17 && !defined(_LIBCUDACXX_COMPARE)
  #   error "<vector> should include <compare> in C++20 and later"
 #endif
-#if TEST_STD_VER > 03 && !defined(_LIBCPP_INITIALIZER_LIST)
+#if TEST_STD_VER > 03 && !defined(_LIBCUDACXX_INITIALIZER_LIST)
  #   error "<vector> should include <initializer_list> in C++11 and later"
 #endif

diff  --git a/libcxx/test/libcxx/input.output/file.streams/c.files/version_ccstdio.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/c.files/version_ccstdio.pass.cpp
index 99a3a4aa8dac..2e514f0dd9ea 100644
--- a/libcxx/test/libcxx/input.output/file.streams/c.files/version_ccstdio.pass.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/c.files/version_ccstdio.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/input.output/file.streams/c.files/version_cinttypes.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/c.files/version_cinttypes.pass.cpp
index 0b7150d3eb10..99e1c350fb03 100644
--- a/libcxx/test/libcxx/input.output/file.streams/c.files/version_cinttypes.pass.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/c.files/version_cinttypes.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp
index 1557a7c89abb..2e485d273898 100644
--- a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.cons/wchar_pointer.pass.cpp
@@ -20,7 +20,7 @@
 
 int main(int, char**)
 {
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
     std::wstring temp = get_wide_temp_file_name();
     {
         std::fstream fs(temp.c_str(), std::ios_base::in | std::ios_base::out

diff  --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp
index c18ce9009835..012547465263 100644
--- a/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/fstream.members/open_wchar_pointer.pass.cpp
@@ -20,7 +20,7 @@
 
 int main(int, char**)
 {
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
     std::wstring temp = get_wide_temp_file_name();
     {
         std::fstream fs;

diff  --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp
index 1f6956e7a7e6..d1f76a07af89 100644
--- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.cons/wchar_pointer.pass.cpp
@@ -22,7 +22,7 @@
 
 int main(int, char**)
 {
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
     {
         std::ifstream fs(L"test.dat");
         double x = 0;

diff  --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp
index 7d91b6d6d095..63bed9defe87 100644
--- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ifstream.members/open_wchar_pointer.pass.cpp
@@ -22,7 +22,7 @@
 
 int main(int, char**)
 {
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
     {
         std::ifstream fs;
         assert(!fs.is_open());

diff  --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
index 15650b36686e..09ce139795e2 100644
--- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.cons/wchar_pointer.pass.cpp
@@ -20,7 +20,7 @@
 
 int main(int, char**)
 {
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
     std::wstring temp = get_wide_temp_file_name();
     {
         std::ofstream fs(temp.c_str());

diff  --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp
index d119ae624186..77fcf85d3c51 100644
--- a/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/ofstream.members/open_wchar_pointer.pass.cpp
@@ -20,7 +20,7 @@
 
 int main(int, char**)
 {
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
     std::wstring temp = get_wide_temp_file_name();
     {
         std::ofstream fs;

diff  --git a/libcxx/test/libcxx/input.output/file.streams/fstreams/version.pass.cpp b/libcxx/test/libcxx/input.output/file.streams/fstreams/version.pass.cpp
index d15a9bdebee9..aa29ddc1b201 100644
--- a/libcxx/test/libcxx/input.output/file.streams/fstreams/version.pass.cpp
+++ b/libcxx/test/libcxx/input.output/file.streams/fstreams/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp
index 9dc863d0d89f..9b4ca312e256 100644
--- a/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp
+++ b/libcxx/test/libcxx/input.output/filesystems/class.path/path.itr/assert.iterator.pass.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // <filesystem>
 
@@ -26,22 +26,22 @@ int main(int, char**) {
   // Test incrementing/decrementing a singular iterator
   {
     fs::path::iterator singular;
-    TEST_LIBCPP_ASSERT_FAILURE(++singular, "attempting to increment a singular iterator");
-    TEST_LIBCPP_ASSERT_FAILURE(--singular, "attempting to decrement a singular iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(++singular, "attempting to increment a singular iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(--singular, "attempting to decrement a singular iterator");
   }
 
   // Test incrementing the end iterator
   {
     fs::path p("foo/bar");
     auto it = p.begin();
-    TEST_LIBCPP_ASSERT_FAILURE(--it, "attempting to decrement the begin iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(--it, "attempting to decrement the begin iterator");
   }
 
   // Test incrementing the end iterator
   {
     fs::path p("foo/bar");
     auto it = p.end();
-    TEST_LIBCPP_ASSERT_FAILURE(++it, "attempting to increment the end iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(++it, "attempting to increment the end iterator");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/input.output/filesystems/version.pass.cpp b/libcxx/test/libcxx/input.output/filesystems/version.pass.cpp
index a9db5b0f02e6..26b3d8e2483b 100644
--- a/libcxx/test/libcxx/input.output/filesystems/version.pass.cpp
+++ b/libcxx/test/libcxx/input.output/filesystems/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/input.output/iostream.format/input.streams/version.pass.cpp b/libcxx/test/libcxx/input.output/iostream.format/input.streams/version.pass.cpp
index 74ef7b1385ce..f96292681b11 100644
--- a/libcxx/test/libcxx/input.output/iostream.format/input.streams/version.pass.cpp
+++ b/libcxx/test/libcxx/input.output/iostream.format/input.streams/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/input.output/iostream.format/output.streams/version.pass.cpp b/libcxx/test/libcxx/input.output/iostream.format/output.streams/version.pass.cpp
index 120cbe41bf55..fb30a556a434 100644
--- a/libcxx/test/libcxx/input.output/iostream.format/output.streams/version.pass.cpp
+++ b/libcxx/test/libcxx/input.output/iostream.format/output.streams/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/input.output/iostream.format/std.manip/version.pass.cpp b/libcxx/test/libcxx/input.output/iostream.format/std.manip/version.pass.cpp
index fa1df70f1627..75ff9ad31bb2 100644
--- a/libcxx/test/libcxx/input.output/iostream.format/std.manip/version.pass.cpp
+++ b/libcxx/test/libcxx/input.output/iostream.format/std.manip/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/input.output/iostream.forward/version.pass.cpp b/libcxx/test/libcxx/input.output/iostream.forward/version.pass.cpp
index b843a18f7dac..8d09c1bdcbc1 100644
--- a/libcxx/test/libcxx/input.output/iostream.forward/version.pass.cpp
+++ b/libcxx/test/libcxx/input.output/iostream.forward/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/input.output/iostream.objects/version.pass.cpp b/libcxx/test/libcxx/input.output/iostream.objects/version.pass.cpp
index 628970e5b7c8..816e1248f697 100644
--- a/libcxx/test/libcxx/input.output/iostream.objects/version.pass.cpp
+++ b/libcxx/test/libcxx/input.output/iostream.objects/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/input.output/iostreams.base/version.pass.cpp b/libcxx/test/libcxx/input.output/iostreams.base/version.pass.cpp
index f64419cffd38..d767e19cff34 100644
--- a/libcxx/test/libcxx/input.output/iostreams.base/version.pass.cpp
+++ b/libcxx/test/libcxx/input.output/iostreams.base/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/input.output/stream.buffers/version.pass.cpp b/libcxx/test/libcxx/input.output/stream.buffers/version.pass.cpp
index 94019e846456..7df0ced34781 100644
--- a/libcxx/test/libcxx/input.output/stream.buffers/version.pass.cpp
+++ b/libcxx/test/libcxx/input.output/stream.buffers/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/input.output/string.streams/version.pass.cpp b/libcxx/test/libcxx/input.output/string.streams/version.pass.cpp
index a0044b8dce5f..7dc80e958c9e 100644
--- a/libcxx/test/libcxx/input.output/string.streams/version.pass.cpp
+++ b/libcxx/test/libcxx/input.output/string.streams/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/iterators/assert.advance.pass.cpp b/libcxx/test/libcxx/iterators/assert.advance.pass.cpp
index 3fb2dcd410c8..b4daf55e042e 100644
--- a/libcxx/test/libcxx/iterators/assert.advance.pass.cpp
+++ b/libcxx/test/libcxx/iterators/assert.advance.pass.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // <list>
 
@@ -31,7 +31,7 @@ int main(int, char**) {
     forward_iterator<int *> it(a+1);
 	std::advance(it, 1);  // should work fine
 	std::advance(it, 0);  // should work fine
-    TEST_LIBCPP_ASSERT_FAILURE(std::advance(it, -1), "Attempt to advance(it, n) with negative n on a non-bidirectional iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(std::advance(it, -1), "Attempt to advance(it, n) with negative n on a non-bidirectional iterator");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/iterators/assert.next.pass.cpp b/libcxx/test/libcxx/iterators/assert.next.pass.cpp
index 6a5328e3dff9..9864e50400aa 100644
--- a/libcxx/test/libcxx/iterators/assert.next.pass.cpp
+++ b/libcxx/test/libcxx/iterators/assert.next.pass.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // <list>
 
@@ -25,7 +25,7 @@ int main(int, char**) {
     forward_iterator<int *> it(a+1);
     std::next(it, 1);  // should work fine
     std::next(it, 0);  // should work fine
-    TEST_LIBCPP_ASSERT_FAILURE(std::next(it, -1), "Attempt to next(it, n) with negative n on a non-bidirectional iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(std::next(it, -1), "Attempt to next(it, n) with negative n on a non-bidirectional iterator");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/iterators/assert.prev.pass.cpp b/libcxx/test/libcxx/iterators/assert.prev.pass.cpp
index 5e5723c3a5ff..63001579e7ae 100644
--- a/libcxx/test/libcxx/iterators/assert.prev.pass.cpp
+++ b/libcxx/test/libcxx/iterators/assert.prev.pass.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // <list>
 
@@ -31,7 +31,7 @@ int main(int, char**) {
     forward_iterator<int *> it(a+1);
     std::prev(it, -1); // should work fine
     std::prev(it,  0); // should work fine
-    TEST_LIBCPP_ASSERT_FAILURE(std::prev(it, 1), "Attempt to prev(it, n) with a positive n on a non-bidirectional iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(std::prev(it, 1), "Attempt to prev(it, n) with a positive n on a non-bidirectional iterator");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp b/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp
index d4261487044d..3ddddef64410 100644
--- a/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp
+++ b/libcxx/test/libcxx/iterators/bounded_iter/dereference.pass.cpp
@@ -14,7 +14,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <iterator>
 
@@ -58,15 +58,15 @@ void test_death() {
   std::__bounded_iter<Iter> const oob  = std::__make_bounded_iter(Iter(e), Iter(b), Iter(e));
 
   // operator*
-  TEST_LIBCPP_ASSERT_FAILURE(*oob, "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(*oob, "__bounded_iter::operator*: Attempt to dereference an out-of-range iterator");
   // operator->
-  TEST_LIBCPP_ASSERT_FAILURE(oob->x, "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(oob->x, "__bounded_iter::operator->: Attempt to dereference an out-of-range iterator");
   // operator[]
-  TEST_LIBCPP_ASSERT_FAILURE(iter[-1], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
-  TEST_LIBCPP_ASSERT_FAILURE(iter[5], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
-  TEST_LIBCPP_ASSERT_FAILURE(oob[0], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
-  TEST_LIBCPP_ASSERT_FAILURE(oob[1], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
-  TEST_LIBCPP_ASSERT_FAILURE(oob[-6], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(iter[-1], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(iter[5], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(oob[0], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(oob[1], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(oob[-6], "__bounded_iter::operator[]: Attempt to index an iterator out-of-range");
 }
 
 int main(int, char**) {

diff  --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_bidirectional_iterator.compile.pass.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_bidirectional_iterator.compile.pass.cpp
index 7ba8c7587ad1..3e6a80b9a77f 100644
--- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_bidirectional_iterator.compile.pass.cpp
+++ b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_bidirectional_iterator.compile.pass.cpp
@@ -18,7 +18,7 @@
 
 #include <array>
 #include <deque>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY
 #include <filesystem>
 #endif
 #include <forward_list>
@@ -59,7 +59,7 @@ static_assert(std::__iterator_traits_detail::__cpp17_bidirectional_iterator<std:
 static_assert(std::__iterator_traits_detail::__cpp17_bidirectional_iterator<std::deque<int>::const_reverse_iterator>);
 
 // <filesystem>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY
 static_assert(!std::__iterator_traits_detail::__cpp17_bidirectional_iterator<std::filesystem::directory_iterator>);
 static_assert(!std::__iterator_traits_detail::__cpp17_bidirectional_iterator<std::filesystem::recursive_directory_iterator>);
 #endif

diff  --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_forward_iterator.compile.pass.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_forward_iterator.compile.pass.cpp
index 7a2000a7634f..64e0587e8f13 100644
--- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_forward_iterator.compile.pass.cpp
+++ b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_forward_iterator.compile.pass.cpp
@@ -18,7 +18,7 @@
 
 #include <array>
 #include <deque>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY
 #include <filesystem>
 #endif
 #include <forward_list>
@@ -59,7 +59,7 @@ static_assert(std::__iterator_traits_detail::__cpp17_forward_iterator<std::deque
 static_assert(std::__iterator_traits_detail::__cpp17_forward_iterator<std::deque<int>::const_reverse_iterator>);
 
 // <filesystem>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY
 static_assert(!std::__iterator_traits_detail::__cpp17_forward_iterator<std::filesystem::directory_iterator>);
 static_assert(!std::__iterator_traits_detail::__cpp17_forward_iterator<std::filesystem::recursive_directory_iterator>);
 #endif

diff  --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_input_iterator.compile.pass.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_input_iterator.compile.pass.cpp
index 49f42dd0e6b4..1cefeb6f43b3 100644
--- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_input_iterator.compile.pass.cpp
+++ b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_input_iterator.compile.pass.cpp
@@ -18,7 +18,7 @@
 
 #include <array>
 #include <deque>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY
 #include <filesystem>
 #endif
 #include <forward_list>
@@ -59,7 +59,7 @@ static_assert(std::__iterator_traits_detail::__cpp17_input_iterator<std::deque<i
 static_assert(std::__iterator_traits_detail::__cpp17_input_iterator<std::deque<int>::const_reverse_iterator>);
 
 // <filesystem>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY
 static_assert(std::__iterator_traits_detail::__cpp17_input_iterator<std::filesystem::directory_iterator>);
 static_assert(std::__iterator_traits_detail::__cpp17_input_iterator<std::filesystem::recursive_directory_iterator>);
 #endif

diff  --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_iterator.compile.pass.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_iterator.compile.pass.cpp
index 3ce86df20fd6..e812f9567e69 100644
--- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_iterator.compile.pass.cpp
+++ b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_iterator.compile.pass.cpp
@@ -18,7 +18,7 @@
 
 #include <array>
 #include <deque>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY
 #include <filesystem>
 #endif
 #include <forward_list>
@@ -59,7 +59,7 @@ static_assert(std::__iterator_traits_detail::__cpp17_iterator<std::deque<int>::r
 static_assert(std::__iterator_traits_detail::__cpp17_iterator<std::deque<int>::const_reverse_iterator>);
 
 // <filesystem>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY
 static_assert(std::__iterator_traits_detail::__cpp17_iterator<std::filesystem::directory_iterator>);
 static_assert(std::__iterator_traits_detail::__cpp17_iterator<std::filesystem::recursive_directory_iterator>);
 #endif

diff  --git a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_random_access_iterator.compile.pass.cpp b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_random_access_iterator.compile.pass.cpp
index ddbf60f93049..efb003b3e1bb 100644
--- a/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_random_access_iterator.compile.pass.cpp
+++ b/libcxx/test/libcxx/iterators/iterator.requirements/iterator.assoc.types/iterator.traits/legacy_random_access_iterator.compile.pass.cpp
@@ -18,7 +18,7 @@
 
 #include <array>
 #include <deque>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY
 #include <filesystem>
 #endif
 #include <forward_list>
@@ -59,7 +59,7 @@ static_assert(std::__iterator_traits_detail::__cpp17_random_access_iterator<std:
 static_assert(std::__iterator_traits_detail::__cpp17_random_access_iterator<std::deque<int>::const_reverse_iterator>);
 
 // <filesystem>
-#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
+#ifndef _LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY
 static_assert(!std::__iterator_traits_detail::__cpp17_random_access_iterator<std::filesystem::directory_iterator>);
 static_assert(!std::__iterator_traits_detail::__cpp17_random_access_iterator<std::filesystem::recursive_directory_iterator>);
 #endif

diff  --git a/libcxx/test/libcxx/iterators/unwrap_iter.pass.cpp b/libcxx/test/libcxx/iterators/unwrap_iter.pass.cpp
index ff1a8d55cb13..06ec8be5dfe9 100644
--- a/libcxx/test/libcxx/iterators/unwrap_iter.pass.cpp
+++ b/libcxx/test/libcxx/iterators/unwrap_iter.pass.cpp
@@ -8,7 +8,7 @@
 
 // When the debug mode is enabled, we don't unwrap iterators in std::copy
 // so we don't get this optimization.
-// UNSUPPORTED: libcpp-has-debug-mode
+// UNSUPPORTED: LIBCUDACXX-has-debug-mode
 
 // check that std::__unwrap_iter() returns the correct type
 

diff  --git a/libcxx/test/libcxx/iterators/version.pass.cpp b/libcxx/test/libcxx/iterators/version.pass.cpp
index 31c99ca6fb00..c1052b7c4651 100644
--- a/libcxx/test/libcxx/iterators/version.pass.cpp
+++ b/libcxx/test/libcxx/iterators/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/cmp/version.pass.cpp b/libcxx/test/libcxx/language.support/cmp/version.pass.cpp
index 859c56706548..8a74e1e9e828 100644
--- a/libcxx/test/libcxx/language.support/cmp/version.pass.cpp
+++ b/libcxx/test/libcxx/language.support/cmp/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/cstdint/version.pass.cpp b/libcxx/test/libcxx/language.support/cstdint/version.pass.cpp
index da1d4a11c070..237ea345d086 100644
--- a/libcxx/test/libcxx/language.support/cstdint/version.pass.cpp
+++ b/libcxx/test/libcxx/language.support/cstdint/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
index a98186f39cf3..524bd065e1e1 100644
--- a/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
+++ b/libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp
@@ -109,21 +109,21 @@ void operator delete(void* p, size_t n)TEST_NOEXCEPT {
 
 #ifndef NO_ALIGN
 void operator delete(void* p, std::align_val_t a)TEST_NOEXCEPT {
-  std::__libcpp_aligned_free(p);
+  std::__LIBCUDACXX_aligned_free(p);
   stats.aligned_called++;
   stats.last_align = static_cast<int>(a);
   stats.last_size = -1;
 }
 
 void operator delete(void* p, size_t n, std::align_val_t a)TEST_NOEXCEPT {
-  std::__libcpp_aligned_free(p);
+  std::__LIBCUDACXX_aligned_free(p);
   stats.aligned_sized_called++;
   stats.last_align = static_cast<int>(a);
   stats.last_size = n;
 }
 #endif
 
-void test_libcpp_dealloc() {
+void test_LIBCUDACXX_dealloc() {
   void* p = nullptr;
 #ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__
   size_t over_align_val = __STDCPP_DEFAULT_NEW_ALIGNMENT__ * 2;
@@ -134,42 +134,42 @@ void test_libcpp_dealloc() {
   size_t with_size_val = 2;
 
   {
-    std::__libcpp_deallocate_unsized(p, under_align_val);
+    std::__LIBCUDACXX_deallocate_unsized(p, under_align_val);
     assert(stats.expect_plain());
   }
   stats.reset();
 
 #if defined(NO_SIZE) && defined(NO_ALIGN)
   {
-    std::__libcpp_deallocate(p, with_size_val, over_align_val);
+    std::__LIBCUDACXX_deallocate(p, with_size_val, over_align_val);
     assert(stats.expect_plain());
   }
   stats.reset();
 #elif defined(NO_SIZE)
   {
-    std::__libcpp_deallocate(p, with_size_val, over_align_val);
+    std::__LIBCUDACXX_deallocate(p, with_size_val, over_align_val);
     assert(stats.expect_align(over_align_val));
   }
   stats.reset();
 #elif defined(NO_ALIGN)
   {
-    std::__libcpp_deallocate(p, with_size_val, over_align_val);
+    std::__LIBCUDACXX_deallocate(p, with_size_val, over_align_val);
     assert(stats.expect_size(with_size_val));
   }
   stats.reset();
 #else
   {
-    std::__libcpp_deallocate(p, with_size_val, over_align_val);
+    std::__LIBCUDACXX_deallocate(p, with_size_val, over_align_val);
     assert(stats.expect_size_align(with_size_val, over_align_val));
   }
   stats.reset();
   {
-    std::__libcpp_deallocate_unsized(p, over_align_val);
+    std::__LIBCUDACXX_deallocate_unsized(p, over_align_val);
     assert(stats.expect_align(over_align_val));
   }
   stats.reset();
   {
-    std::__libcpp_deallocate(p, with_size_val, under_align_val);
+    std::__LIBCUDACXX_deallocate(p, with_size_val, under_align_val);
     assert(stats.expect_size(with_size_val));
   }
   stats.reset();
@@ -245,7 +245,7 @@ void test_allocator_and_new_match() {
 }
 
 int main(int, char**) {
-  test_libcpp_dealloc();
+  test_LIBCUDACXX_dealloc();
   test_allocator_and_new_match();
 
   return 0;

diff  --git a/libcxx/test/libcxx/language.support/support.dynamic/version.pass.cpp b/libcxx/test/libcxx/language.support/support.dynamic/version.pass.cpp
index 40a7f8c26a0d..8f6a8fc57aa9 100644
--- a/libcxx/test/libcxx/language.support/support.dynamic/version.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.dynamic/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.exception/version.pass.cpp b/libcxx/test/libcxx/language.support/support.exception/version.pass.cpp
index e46ab3c65fb4..776598eb7519 100644
--- a/libcxx/test/libcxx/language.support/support.exception/version.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.exception/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.initlist/version.pass.cpp b/libcxx/test/libcxx/language.support/support.initlist/version.pass.cpp
index 4691706fe0bb..0eaf820d4d02 100644
--- a/libcxx/test/libcxx/language.support/support.initlist/version.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.initlist/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp b/libcxx/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp
index 9b4a33bc7e9b..6715d4be42b8 100644
--- a/libcxx/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.limits/c.limits/version_cfloat.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp b/libcxx/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp
index 1aba72d820f2..7b5279ac36bb 100644
--- a/libcxx/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.limits/c.limits/version_climits.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.limits/limits/version.pass.cpp b/libcxx/test/libcxx/language.support/support.limits/limits/version.pass.cpp
index 76076bfe094b..578d4e57d4e2 100644
--- a/libcxx/test/libcxx/language.support/support.limits/limits/version.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.limits/limits/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.limits/version.pass.cpp b/libcxx/test/libcxx/language.support/support.limits/version.pass.cpp
index b4731204c667..33aeb3dba000 100644
--- a/libcxx/test/libcxx/language.support/support.limits/version.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.limits/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#if !defined(_LIBCPP_VERSION)
-#error "_LIBCPP_VERSION must be defined after including <version>"
+#if !defined(_LIBCUDACXX_VERSION)
+#error "_LIBCUDACXX_VERSION must be defined after including <version>"
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.apple.compile.pass.cpp b/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.apple.compile.pass.cpp
index 6c6b1d44cc8f..dfb52014ec74 100644
--- a/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.apple.compile.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.apple.compile.pass.cpp
@@ -13,17 +13,17 @@
 
 #include <typeinfo>
 
-#if !defined(_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION)
-#   error "_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION should be defined on Apple platforms"
+#if !defined(_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION)
+#   error "_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION should be defined on Apple platforms"
 #endif
 
 #if defined(__x86_64__) || defined(__ARM_ARCH_7M__)
-#   if _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION != 1
-#       error "_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION should be 1 (assume RTTI is merged) on Apple platforms"
+#   if _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION != 1
+#       error "_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION should be 1 (assume RTTI is merged) on Apple platforms"
 #   endif
 #elif defined(__aarch64__)
-#   if _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION != 3
-#       error "_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION should be 3 (use the special ARM RTTI) on Apple platforms"
+#   if _LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION != 3
+#       error "_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION should be 3 (use the special ARM RTTI) on Apple platforms"
 #   endif
 #else
 #   error "This test should be updated to pin down the RTTI behavior on this ABI."

diff  --git a/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp b/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
index da82ea1d2c38..72ad1649dd33 100644
--- a/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
+++ b/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.merged.sh.cpp
@@ -11,9 +11,9 @@
 // In MSVC mode, the two anonymous types have identical type index in both object files.
 // XFAIL: msvc
 
-// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
-// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
-// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=1
+// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION=1
+// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION=1
+// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION=1
 // RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{flags} %{link_flags} -o %t.exe
 // RUN: %{exec} %t.exe
 

diff  --git a/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp b/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp
index 9b94fcbc1c92..6a17ffea998e 100644
--- a/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp
+++ b/libcxx/test/libcxx/language.support/support.rtti/type.info/type_info.comparison.unmerged.sh.cpp
@@ -8,9 +8,9 @@
 
 // UNSUPPORTED: no-rtti
 
-// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2
-// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2
-// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION=2
+// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu1.o -DTU1 -D_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION=2
+// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.tu2.o -DTU2 -D_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION=2
+// RUN: %{cxx} %s %{flags} %{compile_flags} -c -o %t.main.o -DMAIN -D_LIBCUDACXX_TYPEINFO_COMPARISON_IMPLEMENTATION=2
 // RUN: %{cxx} %t.tu1.o %t.tu2.o %t.main.o %{flags} %{link_flags} -o %t.exe
 // RUN: %{exec} %t.exe
 

diff  --git a/libcxx/test/libcxx/language.support/support.rtti/version.pass.cpp b/libcxx/test/libcxx/language.support/support.rtti/version.pass.cpp
index 21388012cf1d..2212916ea302 100644
--- a/libcxx/test/libcxx/language.support/support.rtti/version.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.rtti/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp
index 2069667031f6..c11bfb7dd847 100644
--- a/libcxx/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.runtime/version_csetjmp.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp
index f688ffdb2370..7fa4548de8f3 100644
--- a/libcxx/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.runtime/version_csignal.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp
index bdb2c0e9c5dc..65570069bed5 100644
--- a/libcxx/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.runtime/version_cstdarg.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp
index 0c17570e27dd..5965e5683d09 100644
--- a/libcxx/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.runtime/version_cstdbool.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp
index 3932cf049c17..2d7b9cb9771a 100644
--- a/libcxx/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.runtime/version_cstdlib.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp b/libcxx/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp
index 9bf285a2f4b5..996befdcbd05 100644
--- a/libcxx/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.runtime/version_ctime.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/language.support/support.types/version.pass.cpp b/libcxx/test/libcxx/language.support/support.types/version.pass.cpp
index c263118beccf..428d2ad6c58c 100644
--- a/libcxx/test/libcxx/language.support/support.types/version.pass.cpp
+++ b/libcxx/test/libcxx/language.support/support.types/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/libcpp_alignof.pass.cpp b/libcxx/test/libcxx/libcpp_alignof.pass.cpp
index 3ae7f7499d79..ee785c0d6a8b 100644
--- a/libcxx/test/libcxx/libcpp_alignof.pass.cpp
+++ b/libcxx/test/libcxx/libcpp_alignof.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Test that _LIBCPP_ALIGNOF acts the same as the C++11 keyword `alignof`, and
+// Test that _LIBCUDACXX_ALIGNOF acts the same as the C++11 keyword `alignof`, and
 // not as the GNU extension `__alignof`. The former returns the minimal required
 // alignment for a type, whereas the latter returns the preferred alignment.
 //
@@ -17,13 +17,13 @@
 
 template <class T>
 void test() {
-  static_assert(_LIBCPP_ALIGNOF(T) == std::alignment_of<T>::value, "");
-  static_assert(_LIBCPP_ALIGNOF(T) == TEST_ALIGNOF(T), "");
+  static_assert(_LIBCUDACXX_ALIGNOF(T) == std::alignment_of<T>::value, "");
+  static_assert(_LIBCUDACXX_ALIGNOF(T) == TEST_ALIGNOF(T), "");
 #if TEST_STD_VER >= 11
-  static_assert(_LIBCPP_ALIGNOF(T) == alignof(T), "");
+  static_assert(_LIBCUDACXX_ALIGNOF(T) == alignof(T), "");
 #endif
 #ifdef TEST_COMPILER_CLANG
-  static_assert(_LIBCPP_ALIGNOF(T) == _Alignof(T), "");
+  static_assert(_LIBCUDACXX_ALIGNOF(T) == _Alignof(T), "");
 #endif
 }
 

diff  --git a/libcxx/test/libcxx/libcpp_freestanding.sh.cpp b/libcxx/test/libcxx/libcpp_freestanding.sh.cpp
index 8dd7a8ac8521..76a7872a0726 100644
--- a/libcxx/test/libcxx/libcpp_freestanding.sh.cpp
+++ b/libcxx/test/libcxx/libcpp_freestanding.sh.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Test that _LIBCPP_FREESTANDING is not defined when -ffreestanding is not passed
+// Test that _LIBCUDACXX_FREESTANDING is not defined when -ffreestanding is not passed
 // to the compiler but defined when -ffreestanding is passed to the compiler.
 
 // RUN: %{cxx} %{flags} %{compile_flags} -fsyntax-only %s
@@ -14,7 +14,7 @@
 
 #include <__config>
 
-#if defined(FREESTANDING) != defined(_LIBCPP_FREESTANDING)
-#error _LIBCPP_FREESTANDING should be defined in freestanding mode and not \
+#if defined(FREESTANDING) != defined(_LIBCUDACXX_FREESTANDING)
+#error _LIBCUDACXX_FREESTANDING should be defined in freestanding mode and not \
        defined in non-freestanding mode
 #endif

diff  --git a/libcxx/test/libcxx/localization/c.locales/version.pass.cpp b/libcxx/test/libcxx/localization/c.locales/version.pass.cpp
index e5b6e41700ee..008e120932ad 100644
--- a/libcxx/test/libcxx/localization/c.locales/version.pass.cpp
+++ b/libcxx/test/libcxx/localization/c.locales/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/localization/locale.stdcvt/version.pass.cpp b/libcxx/test/libcxx/localization/locale.stdcvt/version.pass.cpp
index e97819b37e4d..9d5a3650d342 100644
--- a/libcxx/test/libcxx/localization/locale.stdcvt/version.pass.cpp
+++ b/libcxx/test/libcxx/localization/locale.stdcvt/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp b/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
index 61e92089e465..01606b7f1a9e 100644
--- a/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
+++ b/libcxx/test/libcxx/localization/locales/locale.convenience/conversions/conversions.string/ctor_move.pass.cpp
@@ -10,7 +10,7 @@
 
 // UNSUPPORTED: c++03
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/libcxx/localization/version.pass.cpp b/libcxx/test/libcxx/localization/version.pass.cpp
index 7750f4c34ad0..59804cbc2911 100644
--- a/libcxx/test/libcxx/localization/version.pass.cpp
+++ b/libcxx/test/libcxx/localization/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/memory/aligned_allocation_macro.compile.pass.cpp b/libcxx/test/libcxx/memory/aligned_allocation_macro.compile.pass.cpp
index 5c28ff9c45f9..a0d63acc880e 100644
--- a/libcxx/test/libcxx/memory/aligned_allocation_macro.compile.pass.cpp
+++ b/libcxx/test/libcxx/memory/aligned_allocation_macro.compile.pass.cpp
@@ -15,6 +15,6 @@
 #include "test_macros.h"
 
 
-#ifdef _LIBCPP_HAS_NO_ALIGNED_ALLOCATION
+#ifdef _LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION
 #   error "libc++ should have aligned allocation in C++17 and up when targeting a platform that supports it"
 #endif

diff  --git a/libcxx/test/libcxx/memory/trivial_abi/shared_ptr_arg.pass.cpp b/libcxx/test/libcxx/memory/trivial_abi/shared_ptr_arg.pass.cpp
index 601c6c2d2cdc..57380979af58 100644
--- a/libcxx/test/libcxx/memory/trivial_abi/shared_ptr_arg.pass.cpp
+++ b/libcxx/test/libcxx/memory/trivial_abi/shared_ptr_arg.pass.cpp
@@ -10,7 +10,7 @@
 
 // Test shared_ptr<T> with trivial_abi as parameter type.
 
-// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI
+// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCUDACXX_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI
 
 // XFAIL: gcc
 // UNSUPPORTED: c++03

diff  --git a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_arg.pass.cpp b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_arg.pass.cpp
index 8a7367bf2974..30d058572120 100644
--- a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_arg.pass.cpp
+++ b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_arg.pass.cpp
@@ -10,7 +10,7 @@
 
 // Test unique_ptr<T> with trivial_abi as parameter type.
 
-// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI
+// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCUDACXX_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI
 
 // XFAIL: gcc
 

diff  --git a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_array.pass.cpp b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_array.pass.cpp
index ba436d046109..755e60910f7e 100644
--- a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_array.pass.cpp
+++ b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_array.pass.cpp
@@ -10,7 +10,7 @@
 
 // Test unique_ptr<T[]> with trivial_abi as parameter type.
 
-// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI
+// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCUDACXX_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI
 
 // XFAIL: gcc
 // UNSUPPORTED: c++03

diff  --git a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp
index 4e92a7bf98b6..b3009ce4845a 100644
--- a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp
+++ b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_destruction_order.pass.cpp
@@ -10,7 +10,7 @@
 
 // Test arguments destruction order involving unique_ptr<T> with trivial_abi.
 
-// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI
+// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCUDACXX_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI
 
 // XFAIL: gcc
 
@@ -53,7 +53,7 @@ int main(int, char**) {
   func(A(shared_buf, &cur_idx), std::unique_ptr<B>(new B(shared_buf, &cur_idx)),
        C(shared_buf, &cur_idx));
 
-#if defined(_LIBCPP_ABI_MICROSOFT)
+#if defined(_LIBCUDACXX_ABI_MICROSOFT)
   // On Microsoft ABI, the dtor order is always A,B,C (because callee-destroyed)
   assert(shared_buf[0] == 'A' && shared_buf[1] == 'B' && shared_buf[2] == 'C');
 #else

diff  --git a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp
index ef7325e60f67..350d1b2c5886 100644
--- a/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp
+++ b/libcxx/test/libcxx/memory/trivial_abi/unique_ptr_ret.pass.cpp
@@ -10,7 +10,7 @@
 
 // Test unique_ptr<T> with trivial_abi as return-type.
 
-// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI
+// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCUDACXX_ABI_ENABLE_UNIQUE_PTR_TRIVIAL_ABI
 
 // XFAIL: gcc
 

diff  --git a/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp b/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
index 0d41c91d4429..ec24b9e10a44 100644
--- a/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
+++ b/libcxx/test/libcxx/memory/trivial_abi/weak_ptr_ret.pass.cpp
@@ -10,7 +10,7 @@
 
 // Test weak_ptr<T> with trivial_abi as return-type.
 
-// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCPP_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI
+// ADDITIONAL_COMPILE_FLAGS: -Wno-macro-redefined -D_LIBCUDACXX_ABI_ENABLE_SHARED_PTR_TRIVIAL_ABI
 
 // XFAIL: gcc
 

diff  --git a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
index 2f5aef69139f..b3a256664941 100644
--- a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
+++ b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp
@@ -45,7 +45,7 @@ TEST_MACROS();
 TEST_MACROS();
 #include <atomic>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <barrier>
 TEST_MACROS();
 #endif
@@ -75,13 +75,13 @@ TEST_MACROS();
 TEST_MACROS();
 #include <climits>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <clocale>
 TEST_MACROS();
 #endif
 #include <cmath>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <codecvt>
 TEST_MACROS();
 #endif
@@ -123,11 +123,11 @@ TEST_MACROS();
 TEST_MACROS();
 #include <cuchar>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwchar>
 TEST_MACROS();
 #endif
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwctype>
 TEST_MACROS();
 #endif
@@ -141,7 +141,7 @@ TEST_MACROS();
 TEST_MACROS();
 #include <fenv.h>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
+#if !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
 #   include <filesystem>
 TEST_MACROS();
 #endif
@@ -151,13 +151,13 @@ TEST_MACROS();
 TEST_MACROS();
 #include <forward_list>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <fstream>
 TEST_MACROS();
 #endif
 #include <functional>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <future>
 TEST_MACROS();
 #endif
@@ -165,27 +165,27 @@ TEST_MACROS();
 TEST_MACROS();
 #include <inttypes.h>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iomanip>
 TEST_MACROS();
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ios>
 TEST_MACROS();
 #endif
 #include <iosfwd>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iostream>
 TEST_MACROS();
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <istream>
 TEST_MACROS();
 #endif
 #include <iterator>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <latch>
 TEST_MACROS();
 #endif
@@ -195,11 +195,11 @@ TEST_MACROS();
 TEST_MACROS();
 #include <list>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <locale>
 TEST_MACROS();
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <locale.h>
 TEST_MACROS();
 #endif
@@ -209,7 +209,7 @@ TEST_MACROS();
 TEST_MACROS();
 #include <memory>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <mutex>
 TEST_MACROS();
 #endif
@@ -221,7 +221,7 @@ TEST_MACROS();
 TEST_MACROS();
 #include <optional>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ostream>
 TEST_MACROS();
 #endif
@@ -233,13 +233,13 @@ TEST_MACROS();
 TEST_MACROS();
 #include <ratio>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <regex>
 TEST_MACROS();
 #endif
 #include <scoped_allocator>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <semaphore>
 TEST_MACROS();
 #endif
@@ -247,19 +247,19 @@ TEST_MACROS();
 TEST_MACROS();
 #include <setjmp.h>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <shared_mutex>
 TEST_MACROS();
 #endif
 #include <span>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <sstream>
 TEST_MACROS();
 #endif
 #include <stack>
 TEST_MACROS();
-#if __cplusplus > 202002L && !defined(_LIBCPP_HAS_NO_THREADS)
+#if __cplusplus > 202002L && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <stdatomic.h>
 TEST_MACROS();
 #endif
@@ -275,7 +275,7 @@ TEST_MACROS();
 TEST_MACROS();
 #include <stdlib.h>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <streambuf>
 TEST_MACROS();
 #endif
@@ -285,7 +285,7 @@ TEST_MACROS();
 TEST_MACROS();
 #include <string_view>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <strstream>
 TEST_MACROS();
 #endif
@@ -293,7 +293,7 @@ TEST_MACROS();
 TEST_MACROS();
 #include <tgmath.h>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <thread>
 TEST_MACROS();
 #endif
@@ -321,11 +321,11 @@ TEST_MACROS();
 TEST_MACROS();
 #include <version>
 TEST_MACROS();
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <wchar.h>
 TEST_MACROS();
 #endif
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <wctype.h>
 TEST_MACROS();
 #endif
@@ -333,7 +333,7 @@ TEST_MACROS();
 #   include <experimental/algorithm>
 TEST_MACROS();
 #endif
-#if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
+#if __cplusplus >= 201103L && !defined(_LIBCUDACXX_HAS_NO_EXPERIMENTAL_COROUTINES)
 #   include <experimental/coroutine>
 TEST_MACROS();
 #endif
@@ -369,7 +369,7 @@ TEST_MACROS();
 #   include <experimental/propagate_const>
 TEST_MACROS();
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
 #   include <experimental/regex>
 TEST_MACROS();
 #endif

diff  --git a/libcxx/test/libcxx/modules_include.sh.cpp b/libcxx/test/libcxx/modules_include.sh.cpp
index b6d73e8ed446..4d837162aaa1 100644
--- a/libcxx/test/libcxx/modules_include.sh.cpp
+++ b/libcxx/test/libcxx/modules_include.sh.cpp
@@ -63,7 +63,7 @@ END-SCRIPT
 #include <atomic>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_4
-#if defined(TEST_4) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_4) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #include <barrier>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_5
@@ -119,7 +119,7 @@ END-SCRIPT
 #include <climits>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_18
-#if defined(TEST_18) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_18) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <clocale>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_19
@@ -127,7 +127,7 @@ END-SCRIPT
 #include <cmath>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_20
-#if defined(TEST_20) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_20) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <codecvt>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_21
@@ -207,11 +207,11 @@ END-SCRIPT
 #include <cuchar>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_40
-#if defined(TEST_40) && !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if defined(TEST_40) && !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #include <cwchar>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_41
-#if defined(TEST_41) && !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if defined(TEST_41) && !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #include <cwctype>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_42
@@ -235,7 +235,7 @@ END-SCRIPT
 #include <fenv.h>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_47
-#if defined(TEST_47) && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
+#if defined(TEST_47) && !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
 #include <filesystem>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_48
@@ -251,7 +251,7 @@ END-SCRIPT
 #include <forward_list>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_51
-#if defined(TEST_51) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_51) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <fstream>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_52
@@ -259,7 +259,7 @@ END-SCRIPT
 #include <functional>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_53
-#if defined(TEST_53) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_53) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #include <future>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_54
@@ -271,11 +271,11 @@ END-SCRIPT
 #include <inttypes.h>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_56
-#if defined(TEST_56) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_56) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <iomanip>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_57
-#if defined(TEST_57) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_57) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <ios>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_58
@@ -283,11 +283,11 @@ END-SCRIPT
 #include <iosfwd>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_59
-#if defined(TEST_59) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_59) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <iostream>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_60
-#if defined(TEST_60) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_60) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <istream>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_61
@@ -295,7 +295,7 @@ END-SCRIPT
 #include <iterator>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_62
-#if defined(TEST_62) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_62) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #include <latch>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_63
@@ -311,11 +311,11 @@ END-SCRIPT
 #include <list>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_66
-#if defined(TEST_66) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_66) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <locale>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_67
-#if defined(TEST_67) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_67) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <locale.h>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_68
@@ -331,7 +331,7 @@ END-SCRIPT
 #include <memory>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_71
-#if defined(TEST_71) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_71) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #include <mutex>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_72
@@ -351,7 +351,7 @@ END-SCRIPT
 #include <optional>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_76
-#if defined(TEST_76) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_76) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <ostream>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_77
@@ -371,7 +371,7 @@ END-SCRIPT
 #include <ratio>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_81
-#if defined(TEST_81) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_81) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <regex>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_82
@@ -379,7 +379,7 @@ END-SCRIPT
 #include <scoped_allocator>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_83
-#if defined(TEST_83) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_83) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #include <semaphore>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_84
@@ -391,7 +391,7 @@ END-SCRIPT
 #include <setjmp.h>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_86
-#if defined(TEST_86) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_86) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #include <shared_mutex>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_87
@@ -399,7 +399,7 @@ END-SCRIPT
 #include <span>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_88
-#if defined(TEST_88) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_88) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <sstream>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_89
@@ -407,7 +407,7 @@ END-SCRIPT
 #include <stack>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_90
-#if defined(TEST_90) && __cplusplus > 202002L && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_90) && __cplusplus > 202002L && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #include <stdatomic.h>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_91
@@ -435,7 +435,7 @@ END-SCRIPT
 #include <stdlib.h>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_97
-#if defined(TEST_97) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_97) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <streambuf>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_98
@@ -451,7 +451,7 @@ END-SCRIPT
 #include <string_view>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_101
-#if defined(TEST_101) && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(TEST_101) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #include <strstream>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_102
@@ -463,7 +463,7 @@ END-SCRIPT
 #include <tgmath.h>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_104
-#if defined(TEST_104) && !defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(TEST_104) && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #include <thread>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_105
@@ -515,11 +515,11 @@ END-SCRIPT
 #include <version>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_117
-#if defined(TEST_117) && !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if defined(TEST_117) && !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #include <wchar.h>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_118
-#if defined(TEST_118) && !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if defined(TEST_118) && !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #include <wctype.h>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_119
@@ -527,7 +527,7 @@ END-SCRIPT
 #include <experimental/algorithm>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_120
-#if defined(TEST_120) && __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
+#if defined(TEST_120) && __cplusplus >= 201103L && !defined(_LIBCUDACXX_HAS_NO_EXPERIMENTAL_COROUTINES)
 #include <experimental/coroutine>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_121
@@ -563,7 +563,7 @@ END-SCRIPT
 #include <experimental/propagate_const>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_129
-#if defined(TEST_129) && !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
+#if defined(TEST_129) && !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
 #include <experimental/regex>
 #endif
 // RUN: %{cxx} %s %{flags} %{compile_flags} -fmodules -fcxx-modules -fmodules-cache-path=%t -fsyntax-only -DTEST_130

diff  --git a/libcxx/test/libcxx/nasty_macros.compile.pass.cpp b/libcxx/test/libcxx/nasty_macros.compile.pass.cpp
index 162d230b6783..492262a7309a 100644
--- a/libcxx/test/libcxx/nasty_macros.compile.pass.cpp
+++ b/libcxx/test/libcxx/nasty_macros.compile.pass.cpp
@@ -160,7 +160,7 @@ END-SCRIPT
 #include <any>
 #include <array>
 #include <atomic>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <barrier>
 #endif
 #include <bit>
@@ -176,11 +176,11 @@ END-SCRIPT
 #include <cinttypes>
 #include <ciso646>
 #include <climits>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <clocale>
 #endif
 #include <cmath>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <codecvt>
 #endif
 #include <compare>
@@ -202,10 +202,10 @@ END-SCRIPT
 #include <ctime>
 #include <ctype.h>
 #include <cuchar>
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwchar>
 #endif
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwctype>
 #endif
 #include <deque>
@@ -213,82 +213,82 @@ END-SCRIPT
 #include <exception>
 #include <execution>
 #include <fenv.h>
-#if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
+#if !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
 #   include <filesystem>
 #endif
 #include <float.h>
 #include <format>
 #include <forward_list>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <fstream>
 #endif
 #include <functional>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <future>
 #endif
 #include <initializer_list>
 #include <inttypes.h>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iomanip>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ios>
 #endif
 #include <iosfwd>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iostream>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <istream>
 #endif
 #include <iterator>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <latch>
 #endif
 #include <limits>
 #include <limits.h>
 #include <list>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <locale>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <locale.h>
 #endif
 #include <map>
 #include <math.h>
 #include <memory>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <mutex>
 #endif
 #include <new>
 #include <numbers>
 #include <numeric>
 #include <optional>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ostream>
 #endif
 #include <queue>
 #include <random>
 #include <ranges>
 #include <ratio>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <regex>
 #endif
 #include <scoped_allocator>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <semaphore>
 #endif
 #include <set>
 #include <setjmp.h>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <shared_mutex>
 #endif
 #include <span>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <sstream>
 #endif
 #include <stack>
-#if __cplusplus > 202002L && !defined(_LIBCPP_HAS_NO_THREADS)
+#if __cplusplus > 202002L && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <stdatomic.h>
 #endif
 #include <stdbool.h>
@@ -297,18 +297,18 @@ END-SCRIPT
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <streambuf>
 #endif
 #include <string>
 #include <string.h>
 #include <string_view>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <strstream>
 #endif
 #include <system_error>
 #include <tgmath.h>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <thread>
 #endif
 #include <tuple>
@@ -323,16 +323,16 @@ END-SCRIPT
 #include <variant>
 #include <vector>
 #include <version>
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <wchar.h>
 #endif
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <wctype.h>
 #endif
 #if __cplusplus >= 201103L
 #   include <experimental/algorithm>
 #endif
-#if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
+#if __cplusplus >= 201103L && !defined(_LIBCUDACXX_HAS_NO_EXPERIMENTAL_COROUTINES)
 #   include <experimental/coroutine>
 #endif
 #if __cplusplus >= 201103L
@@ -359,7 +359,7 @@ END-SCRIPT
 #if __cplusplus >= 201103L
 #   include <experimental/propagate_const>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
 #   include <experimental/regex>
 #endif
 #if __cplusplus >= 201103L

diff  --git a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
index c4604a7d5da6..4120b8e3e615 100644
--- a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
+++ b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp
@@ -39,7 +39,7 @@ END-SCRIPT
 #include <any>
 #include <array>
 #include <atomic>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <barrier>
 #endif
 #include <bit>
@@ -54,11 +54,11 @@ END-SCRIPT
 #include <cinttypes>
 #include <ciso646>
 #include <climits>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <clocale>
 #endif
 #include <cmath>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <codecvt>
 #endif
 #include <compare>
@@ -80,10 +80,10 @@ END-SCRIPT
 #include <ctime>
 #include <ctype.h>
 #include <cuchar>
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwchar>
 #endif
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <cwctype>
 #endif
 #include <deque>
@@ -91,82 +91,82 @@ END-SCRIPT
 #include <exception>
 #include <execution>
 #include <fenv.h>
-#if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
+#if !defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
 #   include <filesystem>
 #endif
 #include <float.h>
 #include <format>
 #include <forward_list>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <fstream>
 #endif
 #include <functional>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <future>
 #endif
 #include <initializer_list>
 #include <inttypes.h>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iomanip>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ios>
 #endif
 #include <iosfwd>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <iostream>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <istream>
 #endif
 #include <iterator>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <latch>
 #endif
 #include <limits>
 #include <limits.h>
 #include <list>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <locale>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <locale.h>
 #endif
 #include <map>
 #include <math.h>
 #include <memory>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <mutex>
 #endif
 #include <new>
 #include <numbers>
 #include <numeric>
 #include <optional>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <ostream>
 #endif
 #include <queue>
 #include <random>
 #include <ranges>
 #include <ratio>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <regex>
 #endif
 #include <scoped_allocator>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <semaphore>
 #endif
 #include <set>
 #include <setjmp.h>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <shared_mutex>
 #endif
 #include <span>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <sstream>
 #endif
 #include <stack>
-#if __cplusplus > 202002L && !defined(_LIBCPP_HAS_NO_THREADS)
+#if __cplusplus > 202002L && !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <stdatomic.h>
 #endif
 #include <stdbool.h>
@@ -175,18 +175,18 @@ END-SCRIPT
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <streambuf>
 #endif
 #include <string>
 #include <string.h>
 #include <string_view>
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #   include <strstream>
 #endif
 #include <system_error>
 #include <tgmath.h>
-#if !defined(_LIBCPP_HAS_NO_THREADS)
+#if !defined(_LIBCUDACXX_HAS_NO_THREADS)
 #   include <thread>
 #endif
 #include <tuple>
@@ -201,16 +201,16 @@ END-SCRIPT
 #include <variant>
 #include <vector>
 #include <version>
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <wchar.h>
 #endif
-#if !defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if !defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   include <wctype.h>
 #endif
 #if __cplusplus >= 201103L
 #   include <experimental/algorithm>
 #endif
-#if __cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)
+#if __cplusplus >= 201103L && !defined(_LIBCUDACXX_HAS_NO_EXPERIMENTAL_COROUTINES)
 #   include <experimental/coroutine>
 #endif
 #if __cplusplus >= 201103L
@@ -237,7 +237,7 @@ END-SCRIPT
 #if __cplusplus >= 201103L
 #   include <experimental/propagate_const>
 #endif
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
+#if !defined(_LIBCUDACXX_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L
 #   include <experimental/regex>
 #endif
 #if __cplusplus >= 201103L

diff  --git a/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp b/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp
index 1fb031ca29dd..4926b693f843 100644
--- a/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp
+++ b/libcxx/test/libcxx/numerics/c.math/constexpr-fns.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// Check that the overloads of std::__libcpp_{isnan,isinf,isfinite} that take
+// Check that the overloads of std::__LIBCUDACXX_{isnan,isinf,isfinite} that take
 // floating-point values are evaluatable from constexpr contexts.
 //
 // These functions need to be constexpr in order to be called from CUDA, see
@@ -20,9 +20,9 @@
 
 #include "test_macros.h"
 
-static_assert(std::__libcpp_isnan_or_builtin(0.) == false, "");
-static_assert(std::__libcpp_isinf_or_builtin(0.0) == false, "");
-static_assert(std::__libcpp_isfinite_or_builtin(0.0) == true, "");
+static_assert(std::__LIBCUDACXX_isnan_or_builtin(0.) == false, "");
+static_assert(std::__LIBCUDACXX_isinf_or_builtin(0.0) == false, "");
+static_assert(std::__LIBCUDACXX_isfinite_or_builtin(0.0) == true, "");
 
 int main(int, char**)
 {

diff  --git a/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp b/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp
index 39b79dba7542..71eb33e31e63 100644
--- a/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp
+++ b/libcxx/test/libcxx/numerics/c.math/ctgmath.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/numerics/c.math/tgmath_h.pass.cpp b/libcxx/test/libcxx/numerics/c.math/tgmath_h.pass.cpp
index d564d7327efb..6132a9f978c6 100644
--- a/libcxx/test/libcxx/numerics/c.math/tgmath_h.pass.cpp
+++ b/libcxx/test/libcxx/numerics/c.math/tgmath_h.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/numerics/c.math/version_cmath.pass.cpp b/libcxx/test/libcxx/numerics/c.math/version_cmath.pass.cpp
index 281068f02dc2..3820a727044e 100644
--- a/libcxx/test/libcxx/numerics/c.math/version_cmath.pass.cpp
+++ b/libcxx/test/libcxx/numerics/c.math/version_cmath.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/numerics/cfenv/version.pass.cpp b/libcxx/test/libcxx/numerics/cfenv/version.pass.cpp
index 35102beff073..721eacee4998 100644
--- a/libcxx/test/libcxx/numerics/cfenv/version.pass.cpp
+++ b/libcxx/test/libcxx/numerics/cfenv/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/numerics/complex.number/ccmplx/ccomplex.pass.cpp b/libcxx/test/libcxx/numerics/complex.number/ccmplx/ccomplex.pass.cpp
index da3a4974ea76..72d418e43329 100644
--- a/libcxx/test/libcxx/numerics/complex.number/ccmplx/ccomplex.pass.cpp
+++ b/libcxx/test/libcxx/numerics/complex.number/ccmplx/ccomplex.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/numerics/complex.number/version.pass.cpp b/libcxx/test/libcxx/numerics/complex.number/version.pass.cpp
index d8310a76f40e..d31f55679626 100644
--- a/libcxx/test/libcxx/numerics/complex.number/version.pass.cpp
+++ b/libcxx/test/libcxx/numerics/complex.number/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/numerics/numarray/version.pass.cpp b/libcxx/test/libcxx/numerics/numarray/version.pass.cpp
index 34f666e7e2c9..dbe45197b660 100644
--- a/libcxx/test/libcxx/numerics/numarray/version.pass.cpp
+++ b/libcxx/test/libcxx/numerics/numarray/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/numerics/numeric.ops/version.pass.cpp b/libcxx/test/libcxx/numerics/numeric.ops/version.pass.cpp
index ed051fcda8c6..0c43adc5455d 100644
--- a/libcxx/test/libcxx/numerics/numeric.ops/version.pass.cpp
+++ b/libcxx/test/libcxx/numerics/numeric.ops/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/numerics/rand/rand.synopsis/version.pass.cpp b/libcxx/test/libcxx/numerics/rand/rand.synopsis/version.pass.cpp
index 60497e704e53..e5c8cbbe203a 100644
--- a/libcxx/test/libcxx/numerics/rand/rand.synopsis/version.pass.cpp
+++ b/libcxx/test/libcxx/numerics/rand/rand.synopsis/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/ranges/has-no-incomplete-ranges.compile.pass.cpp b/libcxx/test/libcxx/ranges/has-no-incomplete-ranges.compile.pass.cpp
index a058275b47fb..4d2fa250df1b 100644
--- a/libcxx/test/libcxx/ranges/has-no-incomplete-ranges.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/has-no-incomplete-ranges.compile.pass.cpp
@@ -8,9 +8,9 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-filesystem
-// REQUIRES: libcpp-has-no-incomplete-ranges
+// REQUIRES: LIBCUDACXX-has-no-incomplete-ranges
 
-// Test that _LIBCPP_HAS_NO_INCOMPLETE_RANGES disables the std::ranges namespace.
+// Test that _LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES disables the std::ranges namespace.
 
 #include <algorithm>
 #include <concepts>
@@ -23,7 +23,7 @@
 #include <string_view>
 #include <utility>
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 namespace ranges {
   int data;
   int size;
@@ -37,4 +37,4 @@ namespace ranges {
   int join_view;
   int views; // this entire namespace should be absent
 } // namespace ranges
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.all/all.nodiscard.verify.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.all/all.nodiscard.verify.cpp
index 569f4be8429e..ff11e6f1e263 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.all/all.nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.all/all.nodiscard.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test the libc++ extension that std::views::all is marked as [[nodiscard]].
 

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.common.view/adaptor.nodiscard.verify.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.common.view/adaptor.nodiscard.verify.cpp
index e52213753205..90d752b06383 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.common.view/adaptor.nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.common.view/adaptor.nodiscard.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test the libc++ extension that std::views::common is marked as [[nodiscard]].
 

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/arrow.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/arrow.pass.cpp
index 1789a5f2ecfa..3abdfa467f6f 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/arrow.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/arrow.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // T* <copyable-box>::operator->()
 // const T* <copyable-box>::operator->() const

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.copy.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.copy.pass.cpp
index 2e9843b20091..1e41f80b6250 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.copy.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <copyable-box>& operator=(<copyable-box> const&)
 

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.move.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.move.pass.cpp
index fece71cd00b7..e3cba9e93f84 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.move.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/assign.move.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <copyable-box>& operator=(<copyable-box>&&)
 

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.default.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.default.pass.cpp
index 9592af32f3d2..e3168d88fa01 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.default.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <copyable-box>::<copyable-box>()
 

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.in_place.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.in_place.pass.cpp
index 5821f801026e..87b006ea78ea 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.in_place.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/ctor.in_place.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class ...Args>
 // explicit <copyable-box>::<copyable-box>(in_place_t, Args&& ...args);

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/deref.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/deref.pass.cpp
index b195b7ebf5a7..e6c0db95ef75 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/deref.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/deref.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // T& <copyable-box>::operator*()
 // T const& <copyable-box>::operator*() const

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/has_value.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/has_value.pass.cpp
index 501de91ecb83..9da68be0c992 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/has_value.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/has_value.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // bool <copyable-box>::__has_value() const
 

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/no_unique_address.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/no_unique_address.pass.cpp
index ddf3d3a12f0c..cddb3feca2b5 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/no_unique_address.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/no_unique_address.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // This test ensures that <copyable-box> behaves correctly when it holds an empty type.
 

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/properties.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/properties.compile.pass.cpp
index 382e7d1308d5..773993cee95d 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/properties.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.copy.wrap/properties.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test various properties of <copyable-box>
 

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.counted/adaptor.nodiscard.verify.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.counted/adaptor.nodiscard.verify.cpp
index 08cadef145a9..dd60711e1288 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.counted/adaptor.nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.counted/adaptor.nodiscard.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test the libc++ extension that std::views::counted is marked as [[nodiscard]].
 

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp
index 7ca73c08e3dd..fe20391f9730 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/no_unique_address.compile.pass.cpp
@@ -7,14 +7,14 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // clang-cl and cl currently don't support [[no_unique_address]]
 // XFAIL: msvc
 
 // class lazy_split_view {
-//   _LIBCPP_NO_UNIQUE_ADDRESS _View __base_ = _View();
-//   _LIBCPP_NO_UNIQUE_ADDRESS _Pattern __pattern_ = _Pattern();
+//   _LIBCUDACXX_NO_UNIQUE_ADDRESS _View __base_ = _View();
+//   _LIBCUDACXX_NO_UNIQUE_ADDRESS _Pattern __pattern_ = _Pattern();
 // };
 
 #include <ranges>

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/assert.equal.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/assert.equal.pass.cpp
index af767d087d0a..46162b43cd49 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/assert.equal.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/assert.equal.pass.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, c++11, c++14, c++17, !libcpp-has-debug-mode, libcpp-has-no-incomplete-ranges
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// UNSUPPORTED: c++03, c++11, c++14, c++17, !LIBCUDACXX-has-debug-mode, LIBCUDACXX-has-no-incomplete-ranges
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // <ranges>
 
@@ -24,12 +24,12 @@
 int main(int, char**) {
   {
     InnerIterForward i;
-    TEST_LIBCPP_ASSERT_FAILURE(i == std::default_sentinel, "Cannot call comparison on a default-constructed iterator.");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i == std::default_sentinel, "Cannot call comparison on a default-constructed iterator.");
   }
 
   {
     InnerIterInput i;
-    TEST_LIBCPP_ASSERT_FAILURE(i == std::default_sentinel, "Cannot call comparison on a default-constructed iterator.");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i == std::default_sentinel, "Cannot call comparison on a default-constructed iterator.");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/assert.equal.pass.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/assert.equal.pass.cpp
index 5ea72a84b6bb..e7effa3d1eef 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/assert.equal.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/assert.equal.pass.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, c++11, c++14, c++17, !libcpp-has-debug-mode, libcpp-has-no-incomplete-ranges
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// UNSUPPORTED: c++03, c++11, c++14, c++17, !LIBCUDACXX-has-debug-mode, LIBCUDACXX-has-no-incomplete-ranges
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // <ranges>
 
@@ -24,12 +24,12 @@
 int main(int, char**) {
   {
     OuterIterForward i;
-    TEST_LIBCPP_ASSERT_FAILURE(i == std::default_sentinel, "Cannot call comparison on a default-constructed iterator.");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i == std::default_sentinel, "Cannot call comparison on a default-constructed iterator.");
   }
 
   {
     OuterIterInput i;
-    TEST_LIBCPP_ASSERT_FAILURE(i == std::default_sentinel, "Cannot call comparison on a default-constructed iterator.");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i == std::default_sentinel, "Cannot call comparison on a default-constructed iterator.");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/types.h b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/types.h
index a66b37845154..5ea7f97f1040 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/types.h
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.lazy.split/types.h
@@ -57,7 +57,7 @@ struct ForwardTinyView : std::ranges::view_base {
 };
 static_assert(std::ranges::forward_range<ForwardTinyView>);
 static_assert(std::ranges::view<ForwardTinyView>);
-LIBCPP_STATIC_ASSERT(std::ranges::__tiny_range<ForwardTinyView>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__tiny_range<ForwardTinyView>);
 
 // Aliases
 

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.reverse/adaptor.nodiscard.verify.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.reverse/adaptor.nodiscard.verify.cpp
index d363553a4879..426d1b8a0257 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.reverse/adaptor.nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.reverse/adaptor.nodiscard.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test the libc++ extension that std::views::reverse is marked as [[nodiscard]].
 

diff  --git a/libcxx/test/libcxx/ranges/range.adaptors/range.transform/adaptor.nodiscard.verify.cpp b/libcxx/test/libcxx/ranges/range.adaptors/range.transform/adaptor.nodiscard.verify.cpp
index 4f067ef7a4fd..fa970ba44006 100644
--- a/libcxx/test/libcxx/ranges/range.adaptors/range.transform/adaptor.nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/ranges/range.adaptors/range.transform/adaptor.nodiscard.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test the libc++ extension that std::views::transform is marked as [[nodiscard]].
 

diff  --git a/libcxx/test/libcxx/ranges/range.nonprop.cache/assign.copy.pass.cpp b/libcxx/test/libcxx/ranges/range.nonprop.cache/assign.copy.pass.cpp
index 5bc869e1f0cc..0d60fe6a9a3a 100644
--- a/libcxx/test/libcxx/ranges/range.nonprop.cache/assign.copy.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.nonprop.cache/assign.copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // __non_propagating_cache& operator=(__non_propagating_cache const&);
 

diff  --git a/libcxx/test/libcxx/ranges/range.nonprop.cache/assign.move.pass.cpp b/libcxx/test/libcxx/ranges/range.nonprop.cache/assign.move.pass.cpp
index bfc76553e75f..f5d7bc6ef6db 100644
--- a/libcxx/test/libcxx/ranges/range.nonprop.cache/assign.move.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.nonprop.cache/assign.move.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // __non_propagating_cache& operator=(__non_propagating_cache&&);
 

diff  --git a/libcxx/test/libcxx/ranges/range.nonprop.cache/constraints.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.nonprop.cache/constraints.compile.pass.cpp
index 19d72e383a48..9061fe9fab02 100644
--- a/libcxx/test/libcxx/ranges/range.nonprop.cache/constraints.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.nonprop.cache/constraints.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 //  requires is_object_v<T>

diff  --git a/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.copy.pass.cpp b/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.copy.pass.cpp
index 779ff4be3b34..d65a65e6dbc9 100644
--- a/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.copy.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // __non_propagating_cache(__non_propagating_cache const&);
 

diff  --git a/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.default.pass.cpp b/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.default.pass.cpp
index e6e8d38aa32c..ba08f5334147 100644
--- a/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.default.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // __non_propagating_cache();
 

diff  --git a/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.move.pass.cpp b/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.move.pass.cpp
index a248b3cc478e..2c0d0148661f 100644
--- a/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.move.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.nonprop.cache/ctor.move.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // __non_propagating_cache(__non_propagating_cache&&);
 

diff  --git a/libcxx/test/libcxx/ranges/range.nonprop.cache/deref.pass.cpp b/libcxx/test/libcxx/ranges/range.nonprop.cache/deref.pass.cpp
index fa7d975bbc61..60a2ac850dad 100644
--- a/libcxx/test/libcxx/ranges/range.nonprop.cache/deref.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.nonprop.cache/deref.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr T const& operator*() const;
 // constexpr T& operator*();

diff  --git a/libcxx/test/libcxx/ranges/range.nonprop.cache/emplace.pass.cpp b/libcxx/test/libcxx/ranges/range.nonprop.cache/emplace.pass.cpp
index ebe328c81b69..eda9ea6a28a9 100644
--- a/libcxx/test/libcxx/ranges/range.nonprop.cache/emplace.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.nonprop.cache/emplace.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class ...Args>
 // constexpr T& __emplace(Args&& ...);

diff  --git a/libcxx/test/libcxx/ranges/range.nonprop.cache/emplace_from.pass.cpp b/libcxx/test/libcxx/ranges/range.nonprop.cache/emplace_from.pass.cpp
index 5d9b0ba76f76..679a8face9dd 100644
--- a/libcxx/test/libcxx/ranges/range.nonprop.cache/emplace_from.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.nonprop.cache/emplace_from.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class Fn>
 // constexpr T& __emplace_from(Fn const&);

diff  --git a/libcxx/test/libcxx/ranges/range.nonprop.cache/has_value.pass.cpp b/libcxx/test/libcxx/ranges/range.nonprop.cache/has_value.pass.cpp
index c6aa6d9fe795..1a98afee1402 100644
--- a/libcxx/test/libcxx/ranges/range.nonprop.cache/has_value.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.nonprop.cache/has_value.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr bool __has_value() const;
 

diff  --git a/libcxx/test/libcxx/ranges/range.utility.helpers/simple_view.compile.pass.cpp b/libcxx/test/libcxx/ranges/range.utility.helpers/simple_view.compile.pass.cpp
index 32a3e03a33a5..c0a369480b2f 100644
--- a/libcxx/test/libcxx/ranges/range.utility.helpers/simple_view.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/range.utility.helpers/simple_view.compile.pass.cpp
@@ -9,7 +9,7 @@
 // <ranges>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 #include <ranges>
 

diff  --git a/libcxx/test/libcxx/ranges/version.compile.pass.cpp b/libcxx/test/libcxx/ranges/version.compile.pass.cpp
index 16a2b587701c..d43da3cc8b4f 100644
--- a/libcxx/test/libcxx/ranges/version.compile.pass.cpp
+++ b/libcxx/test/libcxx/ranges/version.compile.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <ranges>
 
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 // Required for MSVC internal test runner compatibility.

diff  --git a/libcxx/test/libcxx/selftest/test_macros.pass.cpp b/libcxx/test/libcxx/selftest/test_macros.pass.cpp
index caa31ba333d3..34137f0bb7b1 100644
--- a/libcxx/test/libcxx/selftest/test_macros.pass.cpp
+++ b/libcxx/test/libcxx/selftest/test_macros.pass.cpp
@@ -18,12 +18,12 @@
 #error TEST_NOEXCEPT must be defined
 #endif
 
-#ifndef LIBCPP_ASSERT
-#error LIBCPP_ASSERT must be defined
+#ifndef LIBCUDACXX_ASSERT
+#error LIBCUDACXX_ASSERT must be defined
 #endif
 
-#ifndef LIBCPP_STATIC_ASSERT
-#error LIBCPP_STATIC_ASSERT must be defined
+#ifndef LIBCUDACXX_STATIC_ASSERT
+#error LIBCUDACXX_STATIC_ASSERT must be defined
 #endif
 
 void test_noexcept() TEST_NOEXCEPT

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.back.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.back.pass.cpp
index f2d961ef537f..45c2e9098c80 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.back.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.back.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <string>
 
@@ -23,13 +23,13 @@
 int main(int, char**) {
     {
         std::string s;
-        TEST_LIBCPP_ASSERT_FAILURE(s.back(), "string::back(): string is empty");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.back(), "string::back(): string is empty");
     }
 
     {
         typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
         S s;
-        TEST_LIBCPP_ASSERT_FAILURE(s.back(), "string::back(): string is empty");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.back(), "string::back(): string is empty");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cback.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cback.pass.cpp
index b2f0475893ad..169fb43b74c1 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cback.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cback.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <string>
 
@@ -23,13 +23,13 @@
 int main(int, char**) {
     {
         std::string const s;
-        TEST_LIBCPP_ASSERT_FAILURE(s.back(), "string::back(): string is empty");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.back(), "string::back(): string is empty");
     }
 
     {
         typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
         const S s;
-        TEST_LIBCPP_ASSERT_FAILURE(s.back(), "string::back(): string is empty");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(s.back(), "string::back(): string is empty");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cfront.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cfront.pass.cpp
index 3de1b8409411..01db5877539a 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cfront.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cfront.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <string>
 
@@ -24,13 +24,13 @@ int main(int, char**) {
   {
     typedef std::string S;
     const S s;
-    TEST_LIBCPP_ASSERT_FAILURE(s.front(), "string::front(): string is empty");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s.front(), "string::front(): string is empty");
   }
 
   {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
     const S s;
-    TEST_LIBCPP_ASSERT_FAILURE(s.front(), "string::front(): string is empty");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s.front(), "string::front(): string is empty");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cindex.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cindex.pass.cpp
index 74d0e4ff49e9..a28b58829dca 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.cindex.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.cindex.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <string>
 #include <cassert>
@@ -26,14 +26,14 @@ int main(int, char**) {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
     const S s;
     assert(s[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(s[1], "string index out of bounds");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s[1], "string index out of bounds");
   }
 
   {
     typedef std::string S;
     const S s;
     assert(s[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(s[1], "string index out of bounds");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s[1], "string index out of bounds");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.front.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.front.pass.cpp
index d2d91341c8f9..a9cbfdde5644 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.front.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.front.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <string>
 #include <cassert>
@@ -25,13 +25,13 @@ int main(int, char**) {
   {
     typedef std::string S;
     S s;
-    TEST_LIBCPP_ASSERT_FAILURE(s.front(), "string::front(): string is empty");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s.front(), "string::front(): string is empty");
   }
 
   {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
     S s;
-    TEST_LIBCPP_ASSERT_FAILURE(s.front(), "string::front(): string is empty");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s.front(), "string::front(): string is empty");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.access/assert.index.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.access/assert.index.pass.cpp
index 218ab0e42db9..c381facec833 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.access/assert.index.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.access/assert.index.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <string>
 #include <cassert>
@@ -26,14 +26,14 @@ int main(int, char**) {
     typedef std::string S;
     S s;
     assert(s[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(s[1], "string index out of bounds");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s[1], "string index out of bounds");
   }
 
   {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
     S s;
     assert(s[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(s[1], "string index out of bounds");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s[1], "string index out of bounds");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
index 71c8ed469d1f..d748e26ba6bb 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.capacity/PR53170.pass.cpp
@@ -11,7 +11,7 @@
 // void reserve(); // Deprecated in C++20.
 // void reserve(size_type);
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // This test ensures that libc++ implements https://wg21.link/P0966R1 (reserve never shrinks)
 // even before C++20. This is required in order to avoid ODR violations because basic_string::reserve(size)

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
index 3f3ed5baf1f4..4fdc5b1a3423 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.capacity/max_size.pass.cpp
@@ -62,7 +62,7 @@ void half_size() {
 
 bool test() {
 
-#if _LIBCPP_ABI_VERSION == 1
+#if _LIBCUDACXX_ABI_VERSION == 1
 
 # if defined(__x86_64__) || defined(__i386__)
   full_size();

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp
index ec2fe6c3fdb7..dc2d7ccbac09 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.cons/copy_shrunk_long.pass.cpp
@@ -26,7 +26,7 @@ test()
   S s1("1234567890123456789012345678901234567890123456789012345678901234567890");
   s1.resize(7);
   S s2(s1);
-  LIBCPP_ASSERT(s2.__invariants());
+  LIBCUDACXX_ASSERT(s2.__invariants());
   assert(s2 == s1);
   assert(s2.capacity() < sizeof(S));
 }

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.add.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.add.pass.cpp
index 6d97ea1a0d28..a0b6c2086933 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.add.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.add.pass.cpp
@@ -11,7 +11,7 @@
 // Add to iterator out of bounds.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 #include <cassert>
@@ -27,7 +27,7 @@ int main(int, char**) {
     i += 1;
     assert(i == c.end());
     i = c.begin();
-    TEST_LIBCPP_ASSERT_FAILURE(i += 2, "Attempted to add/subtract an iterator outside its valid range");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i += 2, "Attempted to add/subtract an iterator outside its valid range");
   }
 
   {
@@ -37,7 +37,7 @@ int main(int, char**) {
     i += 1;
     assert(i == c.end());
     i = c.begin();
-    TEST_LIBCPP_ASSERT_FAILURE(i += 2, "Attempted to add/subtract an iterator outside its valid range");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i += 2, "Attempted to add/subtract an iterator outside its valid range");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.compare.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.compare.pass.cpp
index 025cd18aabd5..3cd21ad96c44 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.compare.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.compare.pass.cpp
@@ -11,7 +11,7 @@
 // Compare iterators from 
diff erent containers with <.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 
@@ -23,14 +23,14 @@ int main(int, char**) {
     typedef std::string S;
     S s1;
     S s2;
-    TEST_LIBCPP_ASSERT_FAILURE(s1.begin() < s2.begin(), "Attempted to compare incomparable iterators");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s1.begin() < s2.begin(), "Attempted to compare incomparable iterators");
   }
 
   {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
     S s1;
     S s2;
-    TEST_LIBCPP_ASSERT_FAILURE(s1.begin() < s2.begin(), "Attempted to compare incomparable iterators");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s1.begin() < s2.begin(), "Attempted to compare incomparable iterators");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.decrement.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.decrement.pass.cpp
index 548a62b0fc23..0f5a4981ba3f 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.decrement.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.decrement.pass.cpp
@@ -11,7 +11,7 @@
 // Decrement iterator prior to begin.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 #include <cassert>
@@ -26,7 +26,7 @@ int main(int, char**) {
     C::iterator i = c.end();
     --i;
     assert(i == c.begin());
-    TEST_LIBCPP_ASSERT_FAILURE(--i, "Attempted to decrement a non-decrementable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(--i, "Attempted to decrement a non-decrementable iterator");
   }
 
   {
@@ -35,7 +35,7 @@ int main(int, char**) {
     C::iterator i = c.end();
     --i;
     assert(i == c.begin());
-    TEST_LIBCPP_ASSERT_FAILURE(--i, "Attempted to decrement a non-decrementable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(--i, "Attempted to decrement a non-decrementable iterator");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.dereference.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.dereference.pass.cpp
index fccf98c76384..6041241498f9 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.dereference.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.dereference.pass.cpp
@@ -11,7 +11,7 @@
 // Dereference non-dereferenceable iterator.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 
@@ -23,14 +23,14 @@ int main(int, char**) {
     typedef std::string C;
     C c(1, '\0');
     C::iterator i = c.end();
-    TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable iterator");
   }
 
   {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > C;
     C c(1, '\0');
     C::iterator i = c.end();
-    TEST_LIBCPP_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(*i, "Attempted to dereference a non-dereferenceable iterator");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.increment.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.increment.pass.cpp
index 73366f26e619..b8b384ad69d1 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.increment.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.increment.pass.cpp
@@ -11,7 +11,7 @@
 // Increment iterator past end.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 #include <cassert>
@@ -26,7 +26,7 @@ int main(int, char**) {
     C::iterator i = c.begin();
     ++i;
     assert(i == c.end());
-    TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable iterator");
   }
 
   {
@@ -35,7 +35,7 @@ int main(int, char**) {
     C::iterator i = c.begin();
     ++i;
     assert(i == c.end());
-    TEST_LIBCPP_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(++i, "Attempted to increment a non-incrementable iterator");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.index.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.index.pass.cpp
index f1b4e5666569..40e6df017c0d 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.index.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.index.pass.cpp
@@ -11,7 +11,7 @@
 // Index iterator out of bounds.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 #include <cassert>
@@ -25,7 +25,7 @@ int main(int, char**) {
     C c(1, '\0');
     C::iterator i = c.begin();
     assert(i[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(i[1], "Attempted to subscript an iterator outside its valid range");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i[1], "Attempted to subscript an iterator outside its valid range");
   }
 
   {
@@ -33,7 +33,7 @@ int main(int, char**) {
     C c(1, '\0');
     C::iterator i = c.begin();
     assert(i[0] == 0);
-    TEST_LIBCPP_ASSERT_FAILURE(i[1], "Attempted to subscript an iterator outside its valid range");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(i[1], "Attempted to subscript an iterator outside its valid range");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.subtract.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.subtract.pass.cpp
index 74b4048d9e2f..d86854df38bb 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.subtract.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.iterators/debug.iterator.subtract.pass.cpp
@@ -11,7 +11,7 @@
 // Subtract iterators from 
diff erent containers.
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 
@@ -23,14 +23,14 @@ int main(int, char**) {
     typedef std::string S;
     S s1;
     S s2;
-    TEST_LIBCPP_ASSERT_FAILURE(s1.begin() - s2.begin(), "Attempted to subtract incompatible iterators");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s1.begin() - s2.begin(), "Attempted to subtract incompatible iterators");
   }
 
   {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
     S s1;
     S s2;
-    TEST_LIBCPP_ASSERT_FAILURE(s1.begin() - s2.begin(), "Attempted to subtract incompatible iterators");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s1.begin() - s2.begin(), "Attempted to subtract incompatible iterators");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.erase_iter.null.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.erase_iter.null.pass.cpp
index f22caffb06b4..a742b28c458e 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.erase_iter.null.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.erase_iter.null.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <string>
 
@@ -25,13 +25,13 @@ int main(int, char**) {
     typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
     S l1("123");
     S::const_iterator i = l1.end();
-    TEST_LIBCPP_ASSERT_FAILURE(l1.erase(i), "string::erase(iterator) called with a non-dereferenceable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(i), "string::erase(iterator) called with a non-dereferenceable iterator");
   }
 
   {
     std::string l1("123");
     std::string::const_iterator i = l1.end();
-    TEST_LIBCPP_ASSERT_FAILURE(l1.erase(i), "string::erase(iterator) called with a non-dereferenceable iterator");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(i), "string::erase(iterator) called with a non-dereferenceable iterator");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.pop_back.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.pop_back.pass.cpp
index 286e34871a57..54f5acb3b820 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.pop_back.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/assert.pop_back.pass.cpp
@@ -13,7 +13,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <string>
 
@@ -21,7 +21,7 @@
 
 int main(int, char**) {
     std::string s;
-    TEST_LIBCPP_ASSERT_FAILURE(s.pop_back(), "string::pop_back(): string is already empty");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s.pop_back(), "string::pop_back(): string is already empty");
 
     return 0;
 }

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter.pass.cpp
index 1844dd314927..a33824add1a7 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator position) with an iterator from another container
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 
@@ -23,7 +23,7 @@ int main(int, char**) {
         std::string l1("123");
         std::string l2("123");
         std::string::const_iterator i = l2.begin();
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(i), "string::erase(iterator) called with an iterator not referring to this string");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(i), "string::erase(iterator) called with an iterator not referring to this string");
     }
 
     {
@@ -31,7 +31,7 @@ int main(int, char**) {
         S l1("123");
         S l2("123");
         S::const_iterator i = l2.begin();
-        TEST_LIBCPP_ASSERT_FAILURE(l1.erase(i), "string::erase(iterator) called with an iterator not referring to this string");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(i), "string::erase(iterator) called with an iterator not referring to this string");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter_iter.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter_iter.pass.cpp
index 8afe65b39d92..c20102062f0b 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter_iter.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.erase.iter_iter.pass.cpp
@@ -11,7 +11,7 @@
 // Call erase(const_iterator first, const_iterator last); with invalid iterators
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 
@@ -25,7 +25,7 @@ int main(int, char**) {
         {
             std::string l1("123");
             std::string l2("123");
-            TEST_LIBCPP_ASSERT_FAILURE(
+            TEST_LIBCUDACXX_ASSERT_FAILURE(
                 l1.erase(l2.cbegin(), l1.cbegin() + 1),
                 "string::erase(iterator,  iterator) called with an iterator not referring to this string");
         }
@@ -33,7 +33,7 @@ int main(int, char**) {
             typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
             S l1("123");
             S l2("123");
-            TEST_LIBCPP_ASSERT_FAILURE(l1.erase(l2.cbegin(), l1.cbegin() + 1),
+            TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(l2.cbegin(), l1.cbegin() + 1),
                                         "string::erase(iterator,  iterator) called with an iterator not referring to this string");
         }
     }
@@ -43,13 +43,13 @@ int main(int, char**) {
         {
             std::string l1("123");
             std::string l2("123");
-            TEST_LIBCPP_ASSERT_FAILURE(l1.erase(l1.cbegin(), l2.cbegin() + 1), "Attempted to compare incomparable iterators");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(l1.cbegin(), l2.cbegin() + 1), "Attempted to compare incomparable iterators");
         }
         {
             typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
             S l1("123");
             S l2("123");
-            TEST_LIBCPP_ASSERT_FAILURE(l1.erase(l1.cbegin(), l2.cbegin() + 1), "Attempted to compare incomparable iterators");
+            TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(l1.cbegin(), l2.cbegin() + 1), "Attempted to compare incomparable iterators");
         }
     }
 
@@ -58,7 +58,7 @@ int main(int, char**) {
         {
             std::string l1("123");
             std::string l2("123");
-            TEST_LIBCPP_ASSERT_FAILURE(
+            TEST_LIBCUDACXX_ASSERT_FAILURE(
                 l1.erase(l2.cbegin(), l2.cbegin() + 1),
                 "string::erase(iterator,  iterator) called with an iterator not referring to this string");
         }
@@ -66,7 +66,7 @@ int main(int, char**) {
             typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
             S l1("123");
             S l2("123");
-            TEST_LIBCPP_ASSERT_FAILURE(
+            TEST_LIBCUDACXX_ASSERT_FAILURE(
                 l1.erase(l2.cbegin(), l2.cbegin() + 1),
                 "string::erase(iterator,  iterator) called with an iterator not referring to this string");
         }
@@ -76,13 +76,13 @@ int main(int, char**) {
     {
         {
             std::string l1("123");
-            TEST_LIBCPP_ASSERT_FAILURE(l1.erase(l1.cbegin() + 1, l1.cbegin()),
+            TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(l1.cbegin() + 1, l1.cbegin()),
                                     "string::erase(first, last) called with invalid range");
         }
         {
             typedef std::basic_string<char, std::char_traits<char>, min_allocator<char> > S;
             S l1("123");
-            TEST_LIBCPP_ASSERT_FAILURE(l1.erase(l1.cbegin() + 1, l1.cbegin()),
+            TEST_LIBCUDACXX_ASSERT_FAILURE(l1.erase(l1.cbegin() + 1, l1.cbegin()),
                                     "string::erase(first, last) called with invalid range");
         }
     }

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_char.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_char.pass.cpp
index 7e0e236dfb79..cffa2859ed0d 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_char.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_char.pass.cpp
@@ -11,7 +11,7 @@
 // iterator insert(const_iterator p, charT c);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 // TODO: Since string::insert(iter, char) is intantiated in the dylib, this test doesn't
 //       actually work if the dylib hasn't been built with debug assertions enabled.
@@ -27,7 +27,7 @@ int main(int, char**) {
     typedef std::string S;
     S s;
     S s2;
-    TEST_LIBCPP_ASSERT_FAILURE(s.insert(s2.begin(), '1'),
+    TEST_LIBCUDACXX_ASSERT_FAILURE(s.insert(s2.begin(), '1'),
         "string::insert(iterator, character) called with an iterator not referring to this string");
 
     return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_iter_iter.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_iter_iter.pass.cpp
index 0bd4b43752d0..d392a73b2cf6 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_iter_iter.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_iter_iter.pass.cpp
@@ -12,7 +12,7 @@
 //   iterator insert(const_iterator p, InputIterator first, InputIterator last);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 
@@ -23,7 +23,7 @@ int main(int, char**) {
     std::string v2;
     char a[] = "123";
     const int N = sizeof(a)/sizeof(a[0]);
-    TEST_LIBCPP_ASSERT_FAILURE(v.insert(v2.cbegin() + 10, a, a + N),
+    TEST_LIBCUDACXX_ASSERT_FAILURE(v.insert(v2.cbegin() + 10, a, a + N),
                                "Attempted to add/subtract an iterator outside its valid range");
 
     return 0;

diff  --git a/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_size_char.pass.cpp b/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_size_char.pass.cpp
index 0f4d087781af..944e39198df1 100644
--- a/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_size_char.pass.cpp
+++ b/libcxx/test/libcxx/strings/basic.string/string.modifiers/debug.insert.iter_size_char.pass.cpp
@@ -11,7 +11,7 @@
 // iterator insert(const_iterator p, size_type n, charT c);
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: !libcpp-has-debug-mode, c++03
+// UNSUPPORTED: !LIBCUDACXX-has-debug-mode, c++03
 
 #include <string>
 
@@ -20,7 +20,7 @@
 int main(int, char**) {
     std::string s;
     std::string s2;
-    TEST_LIBCPP_ASSERT_FAILURE(
+    TEST_LIBCUDACXX_ASSERT_FAILURE(
         s.insert(s2.begin(), 1, 'a'),
         "string::insert(iterator, n, value) called with an iterator not referring to this string");
 

diff  --git a/libcxx/test/libcxx/strings/c.strings/version_cctype.pass.cpp b/libcxx/test/libcxx/strings/c.strings/version_cctype.pass.cpp
index 07e91c4e309b..81bde61fffc8 100644
--- a/libcxx/test/libcxx/strings/c.strings/version_cctype.pass.cpp
+++ b/libcxx/test/libcxx/strings/c.strings/version_cctype.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/strings/c.strings/version_cstring.pass.cpp b/libcxx/test/libcxx/strings/c.strings/version_cstring.pass.cpp
index 37721759c2a3..0029abe24067 100644
--- a/libcxx/test/libcxx/strings/c.strings/version_cstring.pass.cpp
+++ b/libcxx/test/libcxx/strings/c.strings/version_cstring.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/strings/c.strings/version_cuchar.pass.cpp b/libcxx/test/libcxx/strings/c.strings/version_cuchar.pass.cpp
index 2c62af8db279..de190e9c57b7 100644
--- a/libcxx/test/libcxx/strings/c.strings/version_cuchar.pass.cpp
+++ b/libcxx/test/libcxx/strings/c.strings/version_cuchar.pass.cpp
@@ -17,8 +17,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/strings/c.strings/version_cwchar.pass.cpp b/libcxx/test/libcxx/strings/c.strings/version_cwchar.pass.cpp
index 09afb0294e7d..10258afc4a25 100644
--- a/libcxx/test/libcxx/strings/c.strings/version_cwchar.pass.cpp
+++ b/libcxx/test/libcxx/strings/c.strings/version_cwchar.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/strings/c.strings/version_cwctype.pass.cpp b/libcxx/test/libcxx/strings/c.strings/version_cwctype.pass.cpp
index f40fb3a8a7ee..02de87238b59 100644
--- a/libcxx/test/libcxx/strings/c.strings/version_cwctype.pass.cpp
+++ b/libcxx/test/libcxx/strings/c.strings/version_cwctype.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp b/libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp
index f674cfa262f7..9aad673c0bc3 100644
--- a/libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp
+++ b/libcxx/test/libcxx/strings/string.view/assert.ctor.pointer.pass.cpp
@@ -11,7 +11,7 @@
 
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // Construct a string_view from a null pointer
 // constexpr basic_string_view( const CharT* s );
@@ -21,15 +21,15 @@
 #include "check_assertion.h"
 
 int main(int, char**) {
-  TEST_LIBCPP_ASSERT_FAILURE(std::string_view((char const*)NULL), "null pointer passed to non-null argument of char_traits<...>::length");
-  TEST_LIBCPP_ASSERT_FAILURE(std::string_view((char const*)nullptr), "null pointer passed to non-null argument of char_traits<...>::length");
-  TEST_LIBCPP_ASSERT_FAILURE(std::string_view((char const*)0), "null pointer passed to non-null argument of char_traits<...>::length");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(std::string_view((char const*)NULL), "null pointer passed to non-null argument of char_traits<...>::length");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(std::string_view((char const*)nullptr), "null pointer passed to non-null argument of char_traits<...>::length");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(std::string_view((char const*)0), "null pointer passed to non-null argument of char_traits<...>::length");
   {
     std::string_view v;
-    TEST_LIBCPP_ASSERT_FAILURE(v == (char const*)nullptr, "null pointer passed to non-null argument of char_traits<...>::length");
-    TEST_LIBCPP_ASSERT_FAILURE(v == (char const*)NULL, "null pointer passed to non-null argument of char_traits<...>::length");
-    TEST_LIBCPP_ASSERT_FAILURE((char const*)nullptr == v, "null pointer passed to non-null argument of char_traits<...>::length");
-    TEST_LIBCPP_ASSERT_FAILURE((char const*)NULL == v, "null pointer passed to non-null argument of char_traits<...>::length");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(v == (char const*)nullptr, "null pointer passed to non-null argument of char_traits<...>::length");
+    TEST_LIBCUDACXX_ASSERT_FAILURE(v == (char const*)NULL, "null pointer passed to non-null argument of char_traits<...>::length");
+    TEST_LIBCUDACXX_ASSERT_FAILURE((char const*)nullptr == v, "null pointer passed to non-null argument of char_traits<...>::length");
+    TEST_LIBCUDACXX_ASSERT_FAILURE((char const*)NULL == v, "null pointer passed to non-null argument of char_traits<...>::length");
   }
 
   return 0;

diff  --git a/libcxx/test/libcxx/strings/version.pass.cpp b/libcxx/test/libcxx/strings/version.pass.cpp
index 9b549a3afec4..bdd03d941eff 100644
--- a/libcxx/test/libcxx/strings/version.pass.cpp
+++ b/libcxx/test/libcxx/strings/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception.pass.cpp b/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception.pass.cpp
index c4090ed89c73..1e6019392e46 100644
--- a/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception.pass.cpp
+++ b/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception.pass.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03, no-threads
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // <future>
 
@@ -27,13 +27,13 @@ int main(int, char**) {
     {
         typedef int T;
         std::promise<T> p;
-        TEST_LIBCPP_ASSERT_FAILURE(p.set_exception(std::exception_ptr()), "promise::set_exception: received nullptr");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(p.set_exception(std::exception_ptr()), "promise::set_exception: received nullptr");
     }
 
     {
         typedef int& T;
         std::promise<T> p;
-        TEST_LIBCPP_ASSERT_FAILURE(p.set_exception(std::exception_ptr()), "promise::set_exception: received nullptr");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(p.set_exception(std::exception_ptr()), "promise::set_exception: received nullptr");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception_at_thread_exit.pass.cpp b/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception_at_thread_exit.pass.cpp
index a4c21ec20611..f9b5e119c8d7 100644
--- a/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception_at_thread_exit.pass.cpp
+++ b/libcxx/test/libcxx/thread/futures/futures.promise/assert.set_exception_at_thread_exit.pass.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03, no-threads
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // <future>
 
@@ -27,13 +27,13 @@ int main(int, char**) {
     {
         typedef int T;
         std::promise<T> p;
-        TEST_LIBCPP_ASSERT_FAILURE(p.set_exception_at_thread_exit(std::exception_ptr()), "promise::set_exception_at_thread_exit: received nullptr");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(p.set_exception_at_thread_exit(std::exception_ptr()), "promise::set_exception_at_thread_exit: received nullptr");
     }
 
     {
         typedef int& T;
         std::promise<T> p;
-        TEST_LIBCPP_ASSERT_FAILURE(p.set_exception_at_thread_exit(std::exception_ptr()), "promise::set_exception_at_thread_exit: received nullptr");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(p.set_exception_at_thread_exit(std::exception_ptr()), "promise::set_exception_at_thread_exit: received nullptr");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/thread/futures/version.pass.cpp b/libcxx/test/libcxx/thread/futures/version.pass.cpp
index b32f7579e9a6..d3745c9300eb 100644
--- a/libcxx/test/libcxx/thread/futures/version.pass.cpp
+++ b/libcxx/test/libcxx/thread/futures/version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/thread/thread.barrier/version.compile.pass.cpp b/libcxx/test/libcxx/thread/thread.barrier/version.compile.pass.cpp
index 7890787b6a2a..8b90b3f99e01 100644
--- a/libcxx/test/libcxx/thread/thread.barrier/version.compile.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.barrier/version.compile.pass.cpp
@@ -15,8 +15,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp b/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
index 0d682cdddc65..2959a1e66c72 100644
--- a/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.condition/PR30202_notify_from_pthread_created_thread.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 //
 // UNSUPPORTED: no-threads
-// REQUIRES: libcpp-has-thread-api-pthread
+// REQUIRES: LIBCUDACXX-has-thread-api-pthread
 
 // notify_all_at_thread_exit(...) requires move semantics to transfer the
 // unique_lock.

diff  --git a/libcxx/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp b/libcxx/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp
index 374aa2fd1535..18107dbed0be 100644
--- a/libcxx/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.condition/thread.condition.condvar/native_handle.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// UNSUPPORTED: no-threads, libcpp-has-thread-api-external
+// UNSUPPORTED: no-threads, LIBCUDACXX-has-thread-api-external
 
 // XFAIL: windows
 

diff  --git a/libcxx/test/libcxx/thread/thread.condition/version.pass.cpp b/libcxx/test/libcxx/thread/thread.condition/version.pass.cpp
index 114f0b8035f6..637e14eef5db 100644
--- a/libcxx/test/libcxx/thread/thread.condition/version.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.condition/version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/thread/thread.latch/version.compile.pass.cpp b/libcxx/test/libcxx/thread/thread.latch/version.compile.pass.cpp
index 365ee9276be1..feace2b2a24a 100644
--- a/libcxx/test/libcxx/thread/thread.latch/version.compile.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.latch/version.compile.pass.cpp
@@ -15,8 +15,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp b/libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp
index 09a8ba8f2a2c..32bd06dce0db 100644
--- a/libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp
+++ b/libcxx/test/libcxx/thread/thread.lock/thread.lock.guard/nodiscard.verify.cpp
@@ -21,7 +21,7 @@
 // Test that we properly apply [[nodiscard]] to lock_guard's constructors,
 // which is a libc++ extension.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_NODISCARD
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_NODISCARD
 
 #include <mutex>
 

diff  --git a/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp
index 3de6635f13be..2546edd29485 100644
--- a/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/native_handle.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// UNSUPPORTED: no-threads, libcpp-has-thread-api-external
+// UNSUPPORTED: no-threads, LIBCUDACXX-has-thread-api-external
 
 // XFAIL: windows
 

diff  --git a/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp
index d76b3d71d36e..e8313e778782 100644
--- a/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/native_handle.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// UNSUPPORTED: no-threads, libcpp-has-thread-api-external
+// UNSUPPORTED: no-threads, LIBCUDACXX-has-thread-api-external
 
 // XFAIL: windows
 

diff  --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
index 02072f5e6f8a..3601e451e44d 100644
--- a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_annotations_not_enabled.pass.cpp
@@ -10,7 +10,7 @@
 
 // <mutex>
 
-// This test does not define _LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS so it
+// This test does not define _LIBCUDACXX_ENABLE_THREAD_SAFETY_ANNOTATIONS so it
 // should compile without any warnings or errors even though this pattern is not
 // understood by the thread safety annotations.
 

diff  --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
index 1c1f36459c83..a01f0f0f1e4c 100644
--- a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_guard.pass.cpp
@@ -15,7 +15,7 @@
 
 // <mutex>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_THREAD_SAFETY_ANNOTATIONS
 
 #include <mutex>
 

diff  --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
index ddfe3269fdfa..f0fbd0dcb18d 100644
--- a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_lock_unlock.pass.cpp
@@ -15,7 +15,7 @@
 
 // <mutex>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_THREAD_SAFETY_ANNOTATIONS
 
 #include <mutex>
 

diff  --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
index 07a51b5db90c..a5947341a657 100644
--- a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
+++ b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_missing_unlock.fail.cpp
@@ -15,7 +15,7 @@
 
 // <mutex>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_THREAD_SAFETY_ANNOTATIONS
 
 #include <mutex>
 

diff  --git a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
index 81ce3b25a839..9fc4e8de78ea 100644
--- a/libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.mutex/thread_safety_requires_capability.pass.cpp
@@ -15,7 +15,7 @@
 
 // <mutex>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_THREAD_SAFETY_ANNOTATIONS
 
 #include <mutex>
 

diff  --git a/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp b/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp
index fca02ffef7dd..8d4884549501 100644
--- a/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.mutex/version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/thread/thread.semaphore/version.compile.pass.cpp b/libcxx/test/libcxx/thread/thread.semaphore/version.compile.pass.cpp
index 3f59448a8524..6bdb061e7fa1 100644
--- a/libcxx/test/libcxx/thread/thread.semaphore/version.compile.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.semaphore/version.compile.pass.cpp
@@ -15,8 +15,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp b/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp
index 96ec3332519b..28cedc83c6bc 100644
--- a/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/thread.thread.member/native_handle.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// UNSUPPORTED: no-threads, libcpp-has-thread-api-external
+// UNSUPPORTED: no-threads, LIBCUDACXX-has-thread-api-external
 
 // XFAIL: windows
 

diff  --git a/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp b/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp
index bb60647ef05d..cf3193487cd6 100644
--- a/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.threads/thread.thread.class/types.pass.cpp
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// UNSUPPORTED: no-threads, libcpp-has-thread-api-external
-// REQUIRES: libcpp-has-thread-api-pthread
+// UNSUPPORTED: no-threads, LIBCUDACXX-has-thread-api-external
+// REQUIRES: LIBCUDACXX-has-thread-api-pthread
 
 // <thread>
 

diff  --git a/libcxx/test/libcxx/thread/thread.threads/version.pass.cpp b/libcxx/test/libcxx/thread/thread.threads/version.pass.cpp
index 7c6b2f2c4bab..bd1deb1395f5 100644
--- a/libcxx/test/libcxx/thread/thread.threads/version.pass.cpp
+++ b/libcxx/test/libcxx/thread/thread.threads/version.pass.cpp
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/time/version.pass.cpp b/libcxx/test/libcxx/time/version.pass.cpp
index 5e183169134b..5aa0d0fb207f 100644
--- a/libcxx/test/libcxx/time/version.pass.cpp
+++ b/libcxx/test/libcxx/time/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/transitive_includes.sh.cpp b/libcxx/test/libcxx/transitive_includes.sh.cpp
index aaf26fbf40dc..d2a93ebf2218 100644
--- a/libcxx/test/libcxx/transitive_includes.sh.cpp
+++ b/libcxx/test/libcxx/transitive_includes.sh.cpp
@@ -18,7 +18,7 @@
 
 // This test doesn't support being run when some headers are not available, since we
 // would need to add significant complexity to make that work.
-// UNSUPPORTED: no-localization, no-threads, no-wide-characters, no-filesystem, libcpp-has-no-incomplete-format, libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: no-localization, no-threads, no-wide-characters, no-filesystem, LIBCUDACXX-has-no-incomplete-format, LIBCUDACXX-has-no-incomplete-ranges
 
 // This test only supports being run with the latest Standard, otherwise we'd
 // have to support various versions of the test.

diff  --git a/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp b/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp
index 55398f8ad64b..3e24bf9ccfea 100644
--- a/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp
+++ b/libcxx/test/libcxx/type_traits/is_constant_evaluated.pass.cpp
@@ -9,7 +9,7 @@
 
 // <type_traits>
 
-// __libcpp_is_constant_evaluated()
+// __LIBCUDACXX_is_constant_evaluated()
 
 // returns false when there's no constant evaluation support from the compiler.
 //  as well as when called not in a constexpr context
@@ -20,14 +20,14 @@
 #include "test_macros.h"
 
 int main (int, char**) {
-    ASSERT_SAME_TYPE(decltype(std::__libcpp_is_constant_evaluated()), bool);
-    ASSERT_NOEXCEPT(std::__libcpp_is_constant_evaluated());
+    ASSERT_SAME_TYPE(decltype(std::__LIBCUDACXX_is_constant_evaluated()), bool);
+    ASSERT_NOEXCEPT(std::__LIBCUDACXX_is_constant_evaluated());
 
-#if !defined(_LIBCPP_CXX03_LANG)
-    static_assert(std::__libcpp_is_constant_evaluated(), "");
+#if !defined(_LIBCUDACXX_CXX03_LANG)
+    static_assert(std::__LIBCUDACXX_is_constant_evaluated(), "");
 #endif
 
-    bool p = std::__libcpp_is_constant_evaluated();
+    bool p = std::__LIBCUDACXX_is_constant_evaluated();
     assert(!p);
 
     return 0;

diff  --git a/libcxx/test/libcxx/utilities/any/version.pass.cpp b/libcxx/test/libcxx/utilities/any/version.pass.cpp
index 6c5c43e8f9b3..5b7e640c6470 100644
--- a/libcxx/test/libcxx/utilities/any/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/any/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/utilities/format/enable_insertable.compile.pass.cpp b/libcxx/test/libcxx/utilities/format/enable_insertable.compile.pass.cpp
index 62564034d1c9..4a5f72d47565 100644
--- a/libcxx/test/libcxx/utilities/format/enable_insertable.compile.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/enable_insertable.compile.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/arg_t.compile.pass.cpp b/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/arg_t.compile.pass.cpp
index 7f21f13f702b..d6eeb9cc5275 100644
--- a/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/arg_t.compile.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/arg_t.compile.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp b/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp
index 0f460b69d167..01b5cb06868e 100644
--- a/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/format.arguments/format.arg/visit_format_arg.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // This test requires the dylib support introduced in D92214.
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}

diff  --git a/libcxx/test/libcxx/utilities/format/format.arguments/format.args/get.pass.cpp b/libcxx/test/libcxx/utilities/format/format.arguments/format.args/get.pass.cpp
index b18c1e3233ae..6109cdaa2fd7 100644
--- a/libcxx/test/libcxx/utilities/format/format.arguments/format.args/get.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/format.arguments/format.args/get.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // This test requires the dylib support introduced in D92214.
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}

diff  --git a/libcxx/test/libcxx/utilities/format/format.formatter/format.context/types.compile.pass.cpp b/libcxx/test/libcxx/utilities/format/format.formatter/format.context/types.compile.pass.cpp
index 159ad5b1ed24..031e72be3c11 100644
--- a/libcxx/test/libcxx/utilities/format/format.formatter/format.context/types.compile.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/format.formatter/format.context/types.compile.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 
@@ -118,7 +118,7 @@ static_assert(
 
 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
 static_assert(is_basic_format_context_specialization<std::wformat_context, wchar_t>);
-LIBCPP_STATIC_ASSERT(
+LIBCUDACXX_STATIC_ASSERT(
     std::is_same_v<
         std::wformat_context,
         std::basic_format_context<

diff  --git a/libcxx/test/libcxx/utilities/format/format.formatter/format.formatter.spec/formattable.compile.pass.cpp b/libcxx/test/libcxx/utilities/format/format.formatter/format.formatter.spec/formattable.compile.pass.cpp
index ab125ad03be7..f4ecab0ca839 100644
--- a/libcxx/test/libcxx/utilities/format/format.formatter/format.formatter.spec/formattable.compile.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/format.formatter/format.formatter.spec/formattable.compile.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // TODO FMT Move to std after P2286 has been accepted.
 

diff  --git a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.pass.cpp b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.pass.cpp
index 1d5c45741eb7..8f8f1631aee6 100644
--- a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/extended_grapheme_cluster.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Fix this test using GCC, it currently times out.
 // UNSUPPORTED: gcc-12
 

diff  --git a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/test_exception.h b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/test_exception.h
index 80e45c5024b2..70e320c1a07b 100644
--- a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/test_exception.h
+++ b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/test_exception.h
@@ -5,8 +5,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_TEST_STD_UTILITIES_FORMAT_FORMAT_STRING_FORMAT_STRING_STD_TEST_EXCEPTION_H
-#define _LIBCPP_TEST_STD_UTILITIES_FORMAT_FORMAT_STRING_FORMAT_STRING_STD_TEST_EXCEPTION_H
+#ifndef _LIBCUDACXX_TEST_STD_UTILITIES_FORMAT_FORMAT_STRING_FORMAT_STRING_STD_TEST_EXCEPTION_H
+#define _LIBCUDACXX_TEST_STD_UTILITIES_FORMAT_FORMAT_STRING_FORMAT_STRING_STD_TEST_EXCEPTION_H
 
 #include <format>
 #include <string_view>
@@ -20,7 +20,7 @@ void test_exception(std::string_view what, const CharT* fmt) {
     (void)Parser{}.parse(parse_ctx);
     assert(false);
   } catch (std::format_error& e) {
-    LIBCPP_ASSERT(e.what() == what);
+    LIBCUDACXX_ASSERT(e.what() == what);
     return;
   }
 
@@ -48,4 +48,4 @@ constexpr void test_exception(std::string_view what, const CharT* fmt) {
 #endif
 }
 
-#endif // _LIBCPP_TEST_STD_UTILITIES_FORMAT_FORMAT_STRING_FORMAT_STRING_STD_TEST_EXCEPTION_H
+#endif // _LIBCUDACXX_TEST_STD_UTILITIES_FORMAT_FORMAT_STRING_FORMAT_STRING_STD_TEST_EXCEPTION_H

diff  --git a/libcxx/test/libcxx/utilities/format/version.compile.pass.cpp b/libcxx/test/libcxx/utilities/format/version.compile.pass.cpp
index 4c1be774a9a6..33b7a9189d4b 100644
--- a/libcxx/test/libcxx/utilities/format/version.compile.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/version.compile.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 
@@ -14,8 +14,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#  error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#  error _LIBCUDACXX_VERSION not defined
 #endif
 
 // Required for MSVC internal test runner compatibility.

diff  --git a/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.verify.cpp b/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.verify.cpp
index 2d9a7e4d1603..80083ed7e636 100644
--- a/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.verify.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/func.wrap/depr_in_cxx03.verify.cpp
@@ -13,7 +13,7 @@
 
 // REQUIRES: c++03
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include "test_macros.h"

diff  --git a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp
index 0e8f2705195e..cb44ee53fe36 100644
--- a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/move_reentrant.pass.cpp
@@ -13,7 +13,7 @@
 // function& operator=(function &&);
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp
index ba0242ee5086..1d47edd61a33 100644
--- a/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign_reentrant.pass.cpp
@@ -13,7 +13,7 @@
 // function& operator=(nullptr_t);
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp
index f14359f54a4f..2e3a27c3d138 100644
--- a/libcxx/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/refwrap/binary.pass.cpp
@@ -8,7 +8,7 @@
 
 // REQUIRES: c++03 || c++11 || c++14
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp
index 4d7ab16ec366..ddbe47137307 100644
--- a/libcxx/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/refwrap/unary.pass.cpp
@@ -8,7 +8,7 @@
 
 // REQUIRES: c++03 || c++11 || c++14
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/libcxx/utilities/function.objects/version.pass.cpp b/libcxx/test/libcxx/utilities/function.objects/version.pass.cpp
index 6418733713df..59b5ff919a63 100644
--- a/libcxx/test/libcxx/utilities/function.objects/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/function.objects/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/utilities/memory/default.allocator/allocator_types.void.cxx20_allocator_void_no_members.verify.cpp b/libcxx/test/libcxx/utilities/memory/default.allocator/allocator_types.void.cxx20_allocator_void_no_members.verify.cpp
index 8888683a044f..a34c7fb60e8f 100644
--- a/libcxx/test/libcxx/utilities/memory/default.allocator/allocator_types.void.cxx20_allocator_void_no_members.verify.cpp
+++ b/libcxx/test/libcxx/utilities/memory/default.allocator/allocator_types.void.cxx20_allocator_void_no_members.verify.cpp
@@ -7,12 +7,12 @@
 //===----------------------------------------------------------------------===//
 
 // Check that members of std::allocator<void> are not provided in C++20
-// with _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION but without
-// _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS.
+// with _LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION but without
+// _LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS.
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION
 //
 // Ignore any extra errors arising from typo correction.
 // ADDITIONAL_COMPILE_FLAGS: -Xclang -verify-ignore-unexpected=error

diff  --git a/libcxx/test/libcxx/utilities/memory/default.allocator/allocator_types.void.cxx20_with_removed_members.compile.pass.cpp b/libcxx/test/libcxx/utilities/memory/default.allocator/allocator_types.void.cxx20_with_removed_members.compile.pass.cpp
index 3f151edefe1c..c5019b0ce78a 100644
--- a/libcxx/test/libcxx/utilities/memory/default.allocator/allocator_types.void.cxx20_with_removed_members.compile.pass.cpp
+++ b/libcxx/test/libcxx/utilities/memory/default.allocator/allocator_types.void.cxx20_with_removed_members.compile.pass.cpp
@@ -9,9 +9,9 @@
 // Check that the nested types of std::allocator<void> are provided in C++20
 // with a flag that keeps the removed members.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION
 
 #include <memory>
 #include <type_traits>

diff  --git a/libcxx/test/libcxx/utilities/memory/version.pass.cpp b/libcxx/test/libcxx/utilities/memory/version.pass.cpp
index cb885560c029..63f2595fe71a 100644
--- a/libcxx/test/libcxx/utilities/memory/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/memory/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/utilities/meta/version.pass.cpp b/libcxx/test/libcxx/utilities/meta/version.pass.cpp
index 18f7536f56b7..4178675ec6f1 100644
--- a/libcxx/test/libcxx/utilities/meta/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/meta/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.dereference.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.dereference.pass.cpp
index 068b2e73c66a..9a56f2520485 100644
--- a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.dereference.pass.cpp
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.dereference.pass.cpp
@@ -16,7 +16,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03, c++11, c++14
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <optional>
 
@@ -26,25 +26,25 @@ int main(int, char**) {
     // &
     {
         std::optional<int> opt;
-        TEST_LIBCPP_ASSERT_FAILURE(*opt, "optional operator* called on a disengaged value");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*opt, "optional operator* called on a disengaged value");
     }
 
     // &&
     {
         std::optional<int> opt;
-        TEST_LIBCPP_ASSERT_FAILURE(*std::move(opt), "optional operator* called on a disengaged value");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*std::move(opt), "optional operator* called on a disengaged value");
     }
 
     // const &
     {
         const std::optional<int> opt;
-        TEST_LIBCPP_ASSERT_FAILURE(*opt, "optional operator* called on a disengaged value");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*opt, "optional operator* called on a disengaged value");
     }
 
     // const &&
     {
         const std::optional<int> opt;
-        TEST_LIBCPP_ASSERT_FAILURE(*std::move(opt), "optional operator* called on a disengaged value");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(*std::move(opt), "optional operator* called on a disengaged value");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.op_arrow.pass.cpp b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.op_arrow.pass.cpp
index dc3eda8a9936..fdf0458e9700 100644
--- a/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.op_arrow.pass.cpp
+++ b/libcxx/test/libcxx/utilities/optional/optional.object/optional.object.observe/assert.op_arrow.pass.cpp
@@ -14,7 +14,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03, c++11, c++14
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <optional>
 
@@ -27,12 +27,12 @@ struct X {
 int main(int, char**) {
     {
         std::optional<X> opt;
-        TEST_LIBCPP_ASSERT_FAILURE(opt->test(), "optional operator-> called on a disengaged value");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(opt->test(), "optional operator-> called on a disengaged value");
     }
 
     {
         const std::optional<X> opt;
-        TEST_LIBCPP_ASSERT_FAILURE(opt->test(), "optional operator-> called on a disengaged value");
+        TEST_LIBCUDACXX_ASSERT_FAILURE(opt->test(), "optional operator-> called on a disengaged value");
     }
 
     return 0;

diff  --git a/libcxx/test/libcxx/utilities/optional/version.pass.cpp b/libcxx/test/libcxx/utilities/optional/version.pass.cpp
index 315e8849aef0..9aa7340b7b7c 100644
--- a/libcxx/test/libcxx/utilities/optional/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/optional/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/utilities/ratio/version.pass.cpp b/libcxx/test/libcxx/utilities/ratio/version.pass.cpp
index 26514b194bfe..87b649098be7 100644
--- a/libcxx/test/libcxx/utilities/ratio/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/ratio/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/utilities/template.bitset/includes.pass.cpp b/libcxx/test/libcxx/utilities/template.bitset/includes.pass.cpp
index 42deaaa4b2d3..56a23a23194a 100644
--- a/libcxx/test/libcxx/utilities/template.bitset/includes.pass.cpp
+++ b/libcxx/test/libcxx/utilities/template.bitset/includes.pass.cpp
@@ -12,19 +12,19 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_CSTDDEF
+#ifndef _LIBCUDACXX_CSTDDEF
 #error <cstddef> has not been included
 #endif
 
-#ifndef _LIBCPP_STRING
+#ifndef _LIBCUDACXX_STRING
 #error <string> has not been included
 #endif
 
-#ifndef _LIBCPP_STDEXCEPT
+#ifndef _LIBCUDACXX_STDEXCEPT
 #error <stdexcept> has not been included
 #endif
 
-#ifndef _LIBCPP_IOSFWD
+#ifndef _LIBCUDACXX_IOSFWD
 #error <iosfwd> has not been included
 #endif
 

diff  --git a/libcxx/test/libcxx/utilities/template.bitset/version.pass.cpp b/libcxx/test/libcxx/utilities/template.bitset/version.pass.cpp
index e055895a9931..3c9f5a8f34a9 100644
--- a/libcxx/test/libcxx/utilities/template.bitset/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/template.bitset/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/utilities/tuple/version.pass.cpp b/libcxx/test/libcxx/utilities/tuple/version.pass.cpp
index 1a13410eb305..f4860013c2ce 100644
--- a/libcxx/test/libcxx/utilities/tuple/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/tuple/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/utilities/type.index/version.pass.cpp b/libcxx/test/libcxx/utilities/type.index/version.pass.cpp
index aa549fea442c..ba1a0f72f14a 100644
--- a/libcxx/test/libcxx/utilities/type.index/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/type.index/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp
index ddd2c2b7231f..19f887c86ca8 100644
--- a/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp
+++ b/libcxx/test/libcxx/utilities/utility/pairs/pairs.pair/non_trivial_copy_move_ABI.pass.cpp
@@ -14,9 +14,9 @@
 
 // template <class T1, class T2> struct pair
 
-// Test that we provide the non-trivial copy operations when _LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
+// Test that we provide the non-trivial copy operations when _LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
 // is specified.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR
 
 #include <utility>
 #include <type_traits>

diff  --git a/libcxx/test/libcxx/utilities/utility/version.pass.cpp b/libcxx/test/libcxx/utilities/utility/version.pass.cpp
index 52d1c43ed0f0..a9c877fc004e 100644
--- a/libcxx/test/libcxx/utilities/utility/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/utility/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp b/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp
index 4e2d787117bc..c540279b3906 100644
--- a/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp
+++ b/libcxx/test/libcxx/utilities/variant/variant.variant/variant_size.pass.cpp
@@ -32,7 +32,7 @@ template <size_t N>
 using make_variant_t = typename make_variant_imp<std::make_index_sequence<N>>::type;
 
 constexpr bool ExpectEqual =
-#ifdef _LIBCPP_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
+#ifdef _LIBCUDACXX_ABI_VARIANT_INDEX_TYPE_OPTIMIZATION
   false;
 #else
   true;

diff  --git a/libcxx/test/libcxx/utilities/variant/version.pass.cpp b/libcxx/test/libcxx/utilities/variant/version.pass.cpp
index 1dcb75d180d8..108ed4a43595 100644
--- a/libcxx/test/libcxx/utilities/variant/version.pass.cpp
+++ b/libcxx/test/libcxx/utilities/variant/version.pass.cpp
@@ -12,8 +12,8 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_VERSION
-#error _LIBCPP_VERSION not defined
+#ifndef _LIBCUDACXX_VERSION
+#error _LIBCUDACXX_VERSION not defined
 #endif
 
 int main(int, char**)

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp
index cc58dd2732c4..5467b789e0ae 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, weakly_incrementable O>
 //   requires indirectly_copyable<I, O>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp
index d99fa4888430..8f2af74a0ed9 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_backward.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 
 // template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_if.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_if.pass.cpp
index 0fcfa7855551..330c6f774c8c 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_if.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_if.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, weakly_incrementable O, class Proj = identity,
 //          indirect_unary_predicate<projected<I, Proj>> Pred>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp
index 1af5f984aa29..a6beec5764c8 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.copy/ranges.copy_n.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, weakly_incrementable O>
 //   requires indirectly_copyable<I, O>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill.pass.cpp
index b82d753e7ef6..9361541d230e 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T, output_iterator<const T&> O, sentinel_for<O> S>
 //   constexpr O ranges::fill(O first, S last, const T& value);

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill_n.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill_n.pass.cpp
index 1e984a8367c2..490e7d394d7e 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill_n.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.fill/ranges.fill_n.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T, output_iterator<const T&> O>
 //   constexpr O ranges::fill_n(O first, iter_
diff erence_t<O> n, const T& value);

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate.pass.cpp
index 9b95892418f6..a963656a6c1c 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate_n.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate_n.pass.cpp
index 45377d452b7e..0ed02bf8d922 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate_n.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.generate/ranges_generate_n.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move.pass.cpp
index ba94e745ea27..00115c0f24e8 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, weakly_incrementable O>
 //   requires indirectly_movable<I, O>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move_backward.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move_backward.pass.cpp
index fc2706d1e07f..959a27468e14 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move_backward.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.move/ranges.move_backward.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<bidirectional_iterator I1, sentinel_for<I1> S1, bidirectional_iterator I2>
 //   requires indirectly_movable<I1, I2>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition.pass.cpp
index b7a532f7e0a6..1ea5f33bf8ca 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp
index d08caa7c0504..7ea2aac90922 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_point.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_point.pass.cpp
index 5dffcaf2e237..eca43a3d1c4a 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_point.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_partition_point.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_stable_partition.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_stable_partition.pass.cpp
index e9971e3e084b..5d6523218785 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_stable_partition.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.partitions/ranges_stable_partition.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp
index 1b15acd715ac..83850b32b219 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/ranges_sample.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 
@@ -50,9 +50,9 @@ class RandGen {
 };
 
 static_assert(std::uniform_random_bit_generator<RandGen>);
-// `std::uniform_random_bit_generator` is a subset of requirements of `__libcpp_random_is_valid_urng`. Make sure that
+// `std::uniform_random_bit_generator` is a subset of requirements of `__LIBCUDACXX_random_is_valid_urng`. Make sure that
 // a type satisfying the required minimum is still accepted by `ranges::shuffle`.
-LIBCPP_STATIC_ASSERT(!std::__libcpp_random_is_valid_urng<RandGen>::value);
+LIBCUDACXX_STATIC_ASSERT(!std::__LIBCUDACXX_random_is_valid_urng<RandGen>::value);
 
 struct BadGen {
   constexpr static size_t min() { return 255; }

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp
index ed89a5ad4711..a520ca1bbfab 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.sample/sample.pass.cpp
@@ -72,12 +72,12 @@ void test() {
   assert(static_cast<std::size_t>(base(end) - oa) == std::min(os, is));
   // sample() is deterministic but non-reproducible;
   // its results can vary between implementations.
-  LIBCPP_ASSERT(std::equal(oa, oa + os, oa1));
+  LIBCUDACXX_ASSERT(std::equal(oa, oa + os, oa1));
   end = std::sample(PopulationIterator(ia),
                                   PopulationIterator(ia + is),
                                   SampleIterator(oa), os, std::move(g));
   assert(static_cast<std::size_t>(base(end) - oa) == std::min(os, is));
-  LIBCPP_ASSERT(std::equal(oa, oa + os, oa2));
+  LIBCUDACXX_ASSERT(std::equal(oa, oa + os, oa2));
 }
 
 template <template<class...> class PopulationIteratorType, class PopulationItem,

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
index 087a49864288..89734884a0fa 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle.pass.cpp
@@ -14,7 +14,7 @@
 //   random_shuffle(Iter first, Iter last);
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <algorithm>
 #include <cassert>
@@ -49,11 +49,11 @@ int main(int, char**)
     const unsigned sa = sizeof(ia)/sizeof(ia[0]);
 
     std::random_shuffle(ia, ia+sa);
-    LIBCPP_ASSERT(std::equal(ia, ia+sa, ia1));
+    LIBCUDACXX_ASSERT(std::equal(ia, ia+sa, ia1));
     assert(std::is_permutation(ia, ia+sa, ia1));
 
     std::random_shuffle(ia, ia+sa);
-    LIBCPP_ASSERT(std::equal(ia, ia+sa, ia2));
+    LIBCUDACXX_ASSERT(std::equal(ia, ia+sa, ia2));
     assert(std::is_permutation(ia, ia+sa, ia2));
 
     test_with_iterator<random_access_iterator<int*> >();

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
index 5a2b58f4a535..e15515cfe0af 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_rand.pass.cpp
@@ -15,7 +15,7 @@
 //   random_shuffle(Iter first, Iter last, Rand&& rand);
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <algorithm>
 #include <cassert>
@@ -45,7 +45,7 @@ test_with_iterator()
     gen r;
 
     std::random_shuffle(ia, ia+sa, r);
-    LIBCPP_ASSERT(std::equal(ia, ia+sa, ia1));
+    LIBCUDACXX_ASSERT(std::equal(ia, ia+sa, ia1));
     assert(std::is_permutation(ia, ia+sa, ia1));
 
     std::random_shuffle(ia, ia+sa, r);

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp
index d5f162bced41..72d3a75cfbb1 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/random_shuffle_urng.pass.cpp
@@ -26,10 +26,10 @@ int main(int, char**)
     const unsigned sa = sizeof(ia)/sizeof(ia[0]);
     std::minstd_rand g;
     std::shuffle(ia, ia+sa, g);
-    LIBCPP_ASSERT(std::equal(ia, ia+sa, ia1));
+    LIBCUDACXX_ASSERT(std::equal(ia, ia+sa, ia1));
     assert(std::is_permutation(ia, ia+sa, ia1));
     std::shuffle(ia, ia+sa, std::move(g));
-    LIBCPP_ASSERT(std::equal(ia, ia+sa, ia2));
+    LIBCUDACXX_ASSERT(std::equal(ia, ia+sa, ia2));
     assert(std::is_permutation(ia, ia+sa, ia2));
 
   return 0;

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/ranges_shuffle.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/ranges_shuffle.pass.cpp
index b3abf61f7f7e..b8c583dfa3b7 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/ranges_shuffle.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.random.shuffle/ranges_shuffle.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 
@@ -48,9 +48,9 @@ class RandGen {
 };
 
 static_assert(std::uniform_random_bit_generator<RandGen>);
-// `std::uniform_random_bit_generator` is a subset of requirements of `__libcpp_random_is_valid_urng`. Make sure that
+// `std::uniform_random_bit_generator` is a subset of requirements of `__LIBCUDACXX_random_is_valid_urng`. Make sure that
 // a type satisfying the required minimum is still accepted by `ranges::shuffle`.
-LIBCPP_STATIC_ASSERT(!std::__libcpp_random_is_valid_urng<RandGen>::value);
+LIBCUDACXX_STATIC_ASSERT(!std::__LIBCUDACXX_random_is_valid_urng<RandGen>::value);
 
 struct BadGen {
   constexpr static size_t min() { return 255; }

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp
index 5faf741ac570..b61d5d0c4ec5 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<permutable I, sentinel_for<I> S, class T, class Proj = identity>
 //   requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove_if.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove_if.pass.cpp
index 95d4477fa859..251b76ebdf5b 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove_if.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges.remove_if.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<permutable I, sentinel_for<I> S, class Proj = identity,
 //          indirect_unary_predicate<projected<I, Proj>> Pred>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy.pass.cpp
index f31734417bfa..a60f779a6a4f 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy_if.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy_if.pass.cpp
index 3a0d1ea424fd..54bd9cf2377b 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy_if.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.remove/ranges_remove_copy_if.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges.replace.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges.replace.pass.cpp
index bb616b1a7ed1..6366dad9a52a 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges.replace.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges.replace.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class T1, class T2, class Proj = identity>
 //   requires indirectly_writable<I, const T2&> &&

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges.replace_if.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges.replace_if.pass.cpp
index aaebf1c00645..cc02dee53a64 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges.replace_if.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges.replace_if.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity,
 //          indirect_unary_predicate<projected<I, Proj>> Pred>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges_replace_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges_replace_copy.pass.cpp
index 511bc118ea03..fc0da30f4f07 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges_replace_copy.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges_replace_copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class T1, class T2,
 //          output_iterator<const T2&> O, class Proj = identity>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges_replace_copy_if.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges_replace_copy_if.pass.cpp
index 3cbe6da19437..f8a5300e47e2 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges_replace_copy_if.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.replace/ranges_replace_copy_if.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse.pass.cpp
index 843719d96e8e..51d9f5b432dd 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse_copy.pass.cpp
index 6361eb8f5ca9..7eef24bc677c 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse_copy.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.reverse/ranges.reverse_copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<bidirectional_iterator I, sentinel_for<I> S, weakly_incrementable O>
 //   requires indirectly_copyable<I, O>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges.rotate_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges.rotate_copy.pass.cpp
index 93daead2032e..2046a1ffc295 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges.rotate_copy.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges.rotate_copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<forward_iterator I, sentinel_for<I> S, weakly_incrementable O>
 //   requires indirectly_copyable<I, O>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges_rotate.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges_rotate.pass.cpp
index 4a8bfbe19d56..8677e81460a0 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges_rotate.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.rotate/ranges_rotate.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/ranges.swap_ranges.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/ranges.swap_ranges.pass.cpp
index d5ffd54c1869..5822769c4f23 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/ranges.swap_ranges.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.swap/ranges.swap_ranges.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2>
 //   requires indirectly_swappable<I1, I2>

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.pass.cpp
index c30ef250237b..0ea15c2361e6 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique.pass.cpp
index bb60109e7735..d488f6a3f887 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique_copy.pass.cpp b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique_copy.pass.cpp
index ac7965c8eb2c..2dde00d12779 100644
--- a/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique_copy.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.modifying.operations/alg.unique/ranges_unique_copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/ranges.adjacent_find.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/ranges.adjacent_find.pass.cpp
index cd76e8cdc89e..903ced8923a8 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/ranges.adjacent_find.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.adjacent.find/ranges.adjacent_find.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
 //          indirect_binary_predicate<projected<I, Proj>,

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.all_of/ranges.all_of.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.all_of/ranges.all_of.pass.cpp
index 343d60ae9ef6..1df64661f3b7 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.all_of/ranges.all_of.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.all_of/ranges.all_of.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class Proj = identity,
 //          indirect_unary_predicate<projected<I, Proj>> Pred>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/ranges.any_of.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/ranges.any_of.pass.cpp
index 28045e6b2860..f733288aaad9 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/ranges.any_of.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.any_of/ranges.any_of.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class Proj = identity,
 //          indirect_unary_predicate<projected<I, Proj>> Pred>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp
index ae03c289be71..93baadfb1d38 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity>
 //   requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count_if.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count_if.pass.cpp
index 5e762458dae6..2c7ceb59110b 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count_if.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.count/ranges.count_if.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class Proj = identity,
 //          indirect_unary_predicate<projected<I, Proj>> Pred>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp
index c7becd880a44..a77df2760664 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.equal/ranges.equal.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
 //          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/ranges.find_end.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/ranges.find_end.pass.cpp
index bfef8ad13a1b..af378606e850 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/ranges.find_end.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.end/ranges.find_end.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2,
 //          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/ranges.find_first_of.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/ranges.find_first_of.pass.cpp
index 85e7549a71c9..493c6c06070f 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/ranges.find_first_of.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find.first.of/ranges.find_first_of.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I1, sentinel_for<I1> S1, forward_iterator I2, sentinel_for<I2> S2,
 //          class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp
index ad11098df32a..21d3c8a37781 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class T, class Proj = identity>
 //   requires indirect_binary_predicate<ranges::equal_to, projected<I, Proj>, const T*>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find_if.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find_if.pass.cpp
index c7147693dbf0..d7875a54f01a 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find_if.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find_if.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class Proj = identity,
 //          indirect_unary_predicate<projected<I, Proj>> Pred>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find_if_not.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find_if_not.pass.cpp
index f4814ee71ae8..fb66a8f46ccb 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find_if_not.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.find/ranges.find_if_not.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class Proj = identity,
 //          indirect_unary_predicate<projected<I, Proj>> Pred>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each.pass.cpp
index 1a662fbcffaf..88db79a9edef 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each.pass.cpp
@@ -8,7 +8,7 @@
 
 // <algorithm>
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class Proj = identity,
 //          indirectly_unary_invocable<projected<I, Proj>> Fun>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each_n.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each_n.pass.cpp
index f3e37d140e34..3a52084e2153 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each_n.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.foreach/ranges.for_each_n.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, class Proj = identity,
 //          indirectly_unary_invocable<projected<I, Proj>> Fun>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/ranges.is_permutation.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/ranges.is_permutation.pass.cpp
index 14bc747d0cc7..8b1d538adb49 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/ranges.is_permutation.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.is_permutation/ranges.is_permutation.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.none_of/ranges.none_of.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.none_of/ranges.none_of.pass.cpp
index 1975dfff6b3b..3325b00b83fa 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.none_of/ranges.none_of.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.none_of/ranges.none_of.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I, sentinel_for<I> S, class Proj = identity,
 //          indirect_unary_predicate<projected<I, Proj>> Pred>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/ranges.search.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/ranges.search.pass.cpp
index c8c7eab66392..85aa90742c8d 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/ranges.search.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/ranges.search.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<forward_iterator I1, sentinel_for<I1> S1, forward_iterator I2,
 //          sentinel_for<I2> S2, class Pred = ranges::equal_to,

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/ranges.search_n.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/ranges.search_n.pass.cpp
index 2d456a07e36c..8532c390787a 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/ranges.search_n.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/alg.search/ranges.search_n.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<forward_iterator I, sentinel_for<I> S, class T,
 //          class Pred = ranges::equal_to, class Proj = identity>

diff  --git a/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/ranges_mismatch.pass.cpp b/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/ranges_mismatch.pass.cpp
index 64b1c0520346..2e366510c372 100644
--- a/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/ranges_mismatch.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.nonmodifying/mismatch/ranges_mismatch.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <input_iterator I1, sentinel_for<_I1> S1, input_iterator I2, sentinel_for<_I2> S2,
 //           class Pred = ranges::equal_to, class Proj1 = identity, class Proj2 = identity>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/ranges.binary_search.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/ranges.binary_search.pass.cpp
index f045632ae4f4..9749af24a946 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/ranges.binary_search.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/binary.search/ranges.binary_search.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
 //          indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/ranges_equal_range.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/ranges_equal_range.pass.cpp
index 87b9de477a4e..7aa9778e3864 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/ranges_equal_range.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/equal.range/ranges_equal_range.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/ranges.lower_bound.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/ranges.lower_bound.pass.cpp
index b56a0090f13b..746e67761942 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/ranges.lower_bound.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/lower.bound/ranges.lower_bound.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
 //          indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/ranges.upper_bound.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/ranges.upper_bound.pass.cpp
index 5830ad3ca6ac..1e298e8c1e12 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/ranges.upper_bound.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.binary.search/upper.bound/ranges.upper_bound.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<forward_iterator I, sentinel_for<I> S, class T, class Proj = identity,
 //          indirect_strict_weak_order<const T*, projected<I, Proj>> Comp = ranges::less>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/assert.ranges_clamp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/assert.ranges_clamp.pass.cpp
index 789ce1e34d78..b5d152e385ee 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/assert.ranges_clamp.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/assert.ranges_clamp.pass.cpp
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, c++11, c++14, c++17, libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: c++03, c++11, c++14, c++17, LIBCUDACXX-has-no-incomplete-ranges
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // <algorithm>
 
@@ -22,10 +22,10 @@
 
 int main(int, char**) {
   std::ranges::clamp(1, 2, 0, std::ranges::greater{});
-  TEST_LIBCPP_ASSERT_FAILURE(std::ranges::clamp(1, 2, 0), "Bad bounds passed to std::ranges::clamp");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(std::ranges::clamp(1, 2, 0), "Bad bounds passed to std::ranges::clamp");
 
   std::ranges::clamp(1, 0, 2);
-  TEST_LIBCPP_ASSERT_FAILURE(std::ranges::clamp(1, 0, 2, std::ranges::greater{}),
+  TEST_LIBCUDACXX_ASSERT_FAILURE(std::ranges::clamp(1, 0, 2, std::ranges::greater{}),
       "Bad bounds passed to std::ranges::clamp");
 
   std::ranges::clamp(1, 1, 1); // Equal bounds should be fine.

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/ranges.clamp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/ranges.clamp.pass.cpp
index fe5f54d1a07f..70975f531866 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.clamp/ranges.clamp.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.clamp/ranges.clamp.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Older Clangs don't properly deduce decltype(auto) with a concept constraint
 // XFAIL: apple-clang-13.0

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap.pass.cpp
index 8d58009a70fd..1ff67e6c67b1 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap_until.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap_until.pass.cpp
index 8ce43657af30..43bf23ea2a47 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap_until.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/is.heap/ranges_is_heap_until.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp
index dfed756711a8..cfe291de6484 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/make.heap/ranges_make_heap.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.pop_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.pop_heap.pass.cpp
index ba11faa124ca..cbf921e47abe 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.pop_heap.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.pop_heap.pass.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // <algorithm>
 
@@ -23,7 +23,7 @@
 int main(int, char**) {
   std::array<int, 0> a;
 
-  TEST_LIBCPP_ASSERT_FAILURE(std::pop_heap(a.begin(), a.end()), "The heap given to pop_heap must be non-empty");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(std::pop_heap(a.begin(), a.end()), "The heap given to pop_heap must be non-empty");
 
   return 0;
 }

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.ranges_pop_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.ranges_pop_heap.pass.cpp
index 008a9129d2a4..b90603ecc5d6 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.ranges_pop_heap.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/assert.ranges_pop_heap.pass.cpp
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 // REQUIRES: has-unix-headers
-// UNSUPPORTED: c++03, c++11, c++14, c++17, libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: c++03, c++11, c++14, c++17, LIBCUDACXX-has-no-incomplete-ranges
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 // <algorithm>
 
@@ -23,8 +23,8 @@
 int main(int, char**) {
   std::array<int, 0> a;
 
-  TEST_LIBCPP_ASSERT_FAILURE(std::ranges::pop_heap(a.begin(), a.end()), "The heap given to pop_heap must be non-empty");
-  TEST_LIBCPP_ASSERT_FAILURE(std::ranges::pop_heap(a), "The heap given to pop_heap must be non-empty");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(std::ranges::pop_heap(a.begin(), a.end()), "The heap given to pop_heap must be non-empty");
+  TEST_LIBCUDACXX_ASSERT_FAILURE(std::ranges::pop_heap(a), "The heap given to pop_heap must be non-empty");
 
   return 0;
 }

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp
index 7559a9b12521..9649add41ee4 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/pop.heap/ranges_pop_heap.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp
index 4574ac299c35..78636b64a903 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/push.heap/ranges_push_heap.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp
index 41b1c29fef61..1e80e7bbc4e5 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.heap.operations/sort.heap/ranges_sort_heap.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/ranges.lexicographical_compare.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/ranges.lexicographical_compare.pass.cpp
index d647dbf2d262..227d2a837a3a 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/ranges.lexicographical_compare.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.lex.comparison/ranges.lexicographical_compare.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
 //          class Proj1 = identity, class Proj2 = identity,

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
index 0d572fc57f9b..3c7c4dc37192 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/inplace_merge_comp.pass.cpp
@@ -79,7 +79,7 @@ test_one(unsigned N, unsigned M)
         assert(ia[0] == static_cast<int>(N)-1);
         assert(ia[N-1] == 0);
         assert(std::is_sorted(ia, ia+N, std::greater<value_type>()));
-#ifndef _LIBCPP_ENABLE_DEBUG_MODE
+#ifndef _LIBCUDACXX_ENABLE_DEBUG_MODE
         assert(pred.count() <= (N-1));
 #endif
     }

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_inplace_merge.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_inplace_merge.pass.cpp
index 12863b8b9e01..203030e92eca 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_inplace_merge.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_inplace_merge.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_merge.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_merge.pass.cpp
index e7ed5d4bf4bc..25379dc46d52 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_merge.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.merge/ranges_merge.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
 //          weakly_incrementable O, class Comp = ranges::less, class Proj1 = identity,

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max.pass.cpp
index a284fd61f094..3954e168e32e 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T, class Proj = identity,
 //          indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max_element.pass.cpp
index 95ef0e5e7e31..07b12f2d885e 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max_element.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.max_element.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 //  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
 //    indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.min.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.min.pass.cpp
index b68b9a70723b..02782386a720 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.min.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.min.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T, class Proj = identity,
 //          indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.min_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.min_element.pass.cpp
index 8acb571a5fd6..f016955f642b 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.min_element.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.min_element.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 //  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
 //    indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.minmax.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.minmax.pass.cpp
index 76a49bca0a22..3d539c37aff5 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.minmax.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.minmax.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T, class Proj = identity,
 //          indirect_strict_weak_order<projected<const T*, Proj>> Comp = ranges::less>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.minmax_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.minmax_element.pass.cpp
index 4c571abb9d4c..42ced6c4b191 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.minmax_element.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.min.max/ranges.minmax_element.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 //  template<forward_iterator I, sentinel_for<I> S, class Proj = identity,
 //    indirect_strict_weak_order<projected<I, Proj>> Comp = ranges::less>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp
index 9b4e0decdc09..3b739e0c94cb 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.nth.element/ranges_nth_element.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.partitions/ranges.is_partitioned.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.partitions/ranges.is_partitioned.pass.cpp
index 264a707dce61..0bc2290b89d9 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.partitions/ranges.is_partitioned.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.partitions/ranges.is_partitioned.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.next_permutation.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.next_permutation.pass.cpp
index 5f412eced4a3..68e42056db6f 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.next_permutation.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.next_permutation.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less,
 //          class Proj = identity>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.prev_permutation.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.prev_permutation.pass.cpp
index 17db20279a3b..c1493c86c473 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.prev_permutation.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.permutation.generators/ranges.prev_permutation.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<bidirectional_iterator I, sentinel_for<I> S, class Comp = ranges::less,
 //          class Proj = identity>

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/ranges_includes.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/ranges_includes.pass.cpp
index e7b23e2dc26c..e3ea01cab6ca 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/ranges_includes.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/includes/ranges_includes.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.
diff erence/ranges_set_
diff erence.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.
diff erence/ranges_set_
diff erence.pass.cpp
index 4aa67ca1d240..01bec1f51656 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.
diff erence/ranges_set_
diff erence.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.
diff erence/ranges_set_
diff erence.pass.cpp
@@ -10,7 +10,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
 //          weakly_incrementable O, class Comp = ranges::less,

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/ranges_set_intersection.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/ranges_set_intersection.pass.cpp
index 357c274cbb5b..88cf1c8375b3 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/ranges_set_intersection.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.intersection/ranges_set_intersection.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
 //          weakly_incrementable O, class Comp = ranges::less,

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.
diff erence/ranges_set_symmetric_
diff erence.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.
diff erence/ranges_set_symmetric_
diff erence.pass.cpp
index 4ad1bf8c97d7..f9e725557872 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.
diff erence/ranges_set_symmetric_
diff erence.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.symmetric.
diff erence/ranges_set_symmetric_
diff erence.pass.cpp
@@ -9,7 +9,7 @@
 // <algorithm>
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_iterator I1, sentinel_for<I1> S1, input_iterator I2, sentinel_for<I2> S2,
 //          weakly_incrementable O, class Comp = ranges::less,

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
index 154fb6052c81..945d3608ff28 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/ranges.is_sorted.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/ranges.is_sorted.pass.cpp
index 767b98c75488..844a57059bbb 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/ranges.is_sorted.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/ranges.is_sorted.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/ranges.is_sorted_until.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/ranges.is_sorted_until.pass.cpp
index 4174cb341d89..b1460d88e34a 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/ranges.is_sorted_until.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/is.sorted/ranges.is_sorted_until.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/ranges_partial_sort_copy.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/ranges_partial_sort_copy.pass.cpp
index 15c0b06c7e02..0da463d73e54 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/ranges_partial_sort_copy.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort.copy/ranges_partial_sort_copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/ranges_partial_sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/ranges_partial_sort.pass.cpp
index f07bf918cf7f..7c5d12aff493 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/ranges_partial_sort.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/partial.sort/ranges_partial_sort.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp
index 020a8de85898..609da49242bb 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/sort/ranges.sort.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/ranges.stable.sort.pass.cpp b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/ranges.stable.sort.pass.cpp
index 3f94a72396db..6c713abd7c19 100644
--- a/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/ranges.stable.sort.pass.cpp
+++ b/libcxx/test/std/algorithms/alg.sorting/alg.sort/stable.sort/ranges.stable.sort.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/algorithms.results/in_found_result.pass.cpp b/libcxx/test/std/algorithms/algorithms.results/in_found_result.pass.cpp
index f0f2a57a6ee3..8f4a85a85660 100644
--- a/libcxx/test/std/algorithms/algorithms.results/in_found_result.pass.cpp
+++ b/libcxx/test/std/algorithms/algorithms.results/in_found_result.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class I>
 // struct in_found_result;

diff  --git a/libcxx/test/std/algorithms/algorithms.results/in_fun_result.pass.cpp b/libcxx/test/std/algorithms/algorithms.results/in_fun_result.pass.cpp
index a5a32ec5de90..4e8722eedd64 100644
--- a/libcxx/test/std/algorithms/algorithms.results/in_fun_result.pass.cpp
+++ b/libcxx/test/std/algorithms/algorithms.results/in_fun_result.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class I1, class I2>
 // struct in_fun_result;

diff  --git a/libcxx/test/std/algorithms/algorithms.results/in_in_out_result.pass.cpp b/libcxx/test/std/algorithms/algorithms.results/in_in_out_result.pass.cpp
index 950cdf3549e2..45e75334d922 100644
--- a/libcxx/test/std/algorithms/algorithms.results/in_in_out_result.pass.cpp
+++ b/libcxx/test/std/algorithms/algorithms.results/in_in_out_result.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class I1, class I2, class O>
 // struct in_in_out_result;

diff  --git a/libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp b/libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
index 52369a07d253..97e3d58e7a32 100644
--- a/libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
+++ b/libcxx/test/std/algorithms/algorithms.results/in_in_result.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class I1, class I2>
 // struct in_in_result;

diff  --git a/libcxx/test/std/algorithms/algorithms.results/in_out_out_result.pass.cpp b/libcxx/test/std/algorithms/algorithms.results/in_out_out_result.pass.cpp
index 968254883d47..0459ce18107d 100644
--- a/libcxx/test/std/algorithms/algorithms.results/in_out_out_result.pass.cpp
+++ b/libcxx/test/std/algorithms/algorithms.results/in_out_out_result.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class I1, class O1, class O2>
 // struct in_out_out_result;

diff  --git a/libcxx/test/std/algorithms/algorithms.results/in_out_result.pass.cpp b/libcxx/test/std/algorithms/algorithms.results/in_out_result.pass.cpp
index 9b4e488f308f..4d8129afbb88 100644
--- a/libcxx/test/std/algorithms/algorithms.results/in_out_result.pass.cpp
+++ b/libcxx/test/std/algorithms/algorithms.results/in_out_result.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class I1, class O1>
 // struct in_out_result;

diff  --git a/libcxx/test/std/algorithms/algorithms.results/min_max_result.pass.cpp b/libcxx/test/std/algorithms/algorithms.results/min_max_result.pass.cpp
index 3f89199a0ac1..0d62ff5fc126 100644
--- a/libcxx/test/std/algorithms/algorithms.results/min_max_result.pass.cpp
+++ b/libcxx/test/std/algorithms/algorithms.results/min_max_result.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class I1, class I2>
 // struct min_max_result;

diff  --git a/libcxx/test/std/algorithms/algorithms.results/no_unique_address.compile.pass.cpp b/libcxx/test/std/algorithms/algorithms.results/no_unique_address.compile.pass.cpp
index fadb64bad976..a5cb96847836 100644
--- a/libcxx/test/std/algorithms/algorithms.results/no_unique_address.compile.pass.cpp
+++ b/libcxx/test/std/algorithms/algorithms.results/no_unique_address.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // clang-cl and cl currently don't support [[no_unique_address]]
 // XFAIL: msvc

diff  --git a/libcxx/test/std/algorithms/ranges_result_alias_declarations.compile.pass.cpp b/libcxx/test/std/algorithms/ranges_result_alias_declarations.compile.pass.cpp
index d50de6ec0967..e153d045a22e 100644
--- a/libcxx/test/std/algorithms/ranges_result_alias_declarations.compile.pass.cpp
+++ b/libcxx/test/std/algorithms/ranges_result_alias_declarations.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 

diff  --git a/libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp b/libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp
index 7da2ee5cbba6..a9be49119629 100644
--- a/libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp
+++ b/libcxx/test/std/algorithms/ranges_robust_against_dangling.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 //

diff  --git a/libcxx/test/std/algorithms/ranges_robust_against_
diff ering_projections.pass.cpp b/libcxx/test/std/algorithms/ranges_robust_against_
diff ering_projections.pass.cpp
index 00a0b635b21a..bf971eed98a1 100644
--- a/libcxx/test/std/algorithms/ranges_robust_against_
diff ering_projections.pass.cpp
+++ b/libcxx/test/std/algorithms/ranges_robust_against_
diff ering_projections.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 //

diff  --git a/libcxx/test/std/algorithms/ranges_robust_against_nonbool_predicates.pass.cpp b/libcxx/test/std/algorithms/ranges_robust_against_nonbool_predicates.pass.cpp
index 367059bb3556..24ed2cd604a7 100644
--- a/libcxx/test/std/algorithms/ranges_robust_against_nonbool_predicates.pass.cpp
+++ b/libcxx/test/std/algorithms/ranges_robust_against_nonbool_predicates.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 //

diff  --git a/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp b/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp
index 80416b0249e9..f40ea1e078d4 100644
--- a/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp
+++ b/libcxx/test/std/algorithms/ranges_robust_against_omitting_invoke.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 //

diff  --git a/libcxx/test/std/algorithms/ranges_robust_against_proxy_iterators.pass.cpp b/libcxx/test/std/algorithms/ranges_robust_against_proxy_iterators.pass.cpp
index 05599e258368..de795065e4ee 100644
--- a/libcxx/test/std/algorithms/ranges_robust_against_proxy_iterators.pass.cpp
+++ b/libcxx/test/std/algorithms/ranges_robust_against_proxy_iterators.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <algorithm>
 //

diff  --git a/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_explicit.pass.cpp b/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_explicit.pass.cpp
index f2a5632b77dd..5071132a88f0 100644
--- a/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_explicit.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.flag/atomic_flag_test_explicit.pass.cpp
@@ -41,7 +41,7 @@ int main(int, char**)
         assert(f.test_and_set() == 0);
         assert(std::atomic_flag_test_explicit(&f, std::memory_order_acquire) == 1);
     }
-#ifdef _LIBCPP_VERSION // Don't violate precondition [atomics.flag]/6
+#ifdef _LIBCUDACXX_VERSION // Don't violate precondition [atomics.flag]/6
     {
         std::atomic_flag f;
         f.clear();
@@ -56,7 +56,7 @@ int main(int, char**)
         assert(f.test_and_set() == 0);
         assert(std::atomic_flag_test_explicit(&f, std::memory_order_acq_rel) == 1);
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         std::atomic_flag f;
         f.clear();
@@ -85,7 +85,7 @@ int main(int, char**)
         assert(f.test_and_set() == 0);
         assert(std::atomic_flag_test_explicit(&f, std::memory_order_acquire) == 1);
     }
-#ifdef _LIBCPP_VERSION // Don't violate precondition [atomics.flag]/6
+#ifdef _LIBCUDACXX_VERSION // Don't violate precondition [atomics.flag]/6
     {
         volatile std::atomic_flag f;
         f.clear();
@@ -100,7 +100,7 @@ int main(int, char**)
         assert(f.test_and_set() == 0);
         assert(std::atomic_flag_test_explicit(&f, std::memory_order_acq_rel) == 1);
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         volatile std::atomic_flag f;
         f.clear();

diff  --git a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
index 5b9c0dc8a904..c8876da682b8 100644
--- a/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.lockfree/isalwayslockfree.pass.cpp
@@ -59,7 +59,7 @@ void run()
     CHECK_ALWAYS_LOCK_FREE(float);
     CHECK_ALWAYS_LOCK_FREE(double);
     CHECK_ALWAYS_LOCK_FREE(long double);
-#if __has_attribute(vector_size) && defined(_LIBCPP_VERSION)
+#if __has_attribute(vector_size) && defined(_LIBCUDACXX_VERSION)
     CHECK_ALWAYS_LOCK_FREE(int __attribute__((vector_size(1 * sizeof(int)))));
     CHECK_ALWAYS_LOCK_FREE(int __attribute__((vector_size(2 * sizeof(int)))));
     CHECK_ALWAYS_LOCK_FREE(int __attribute__((vector_size(4 * sizeof(int)))));
@@ -75,7 +75,7 @@ void run()
     CHECK_ALWAYS_LOCK_FREE(double __attribute__((vector_size(4 * sizeof(double)))));
     CHECK_ALWAYS_LOCK_FREE(double __attribute__((vector_size(16 * sizeof(double)))));
     CHECK_ALWAYS_LOCK_FREE(double __attribute__((vector_size(32 * sizeof(double)))));
-#endif // __has_attribute(vector_size) && defined(_LIBCPP_VERSION)
+#endif // __has_attribute(vector_size) && defined(_LIBCUDACXX_VERSION)
     CHECK_ALWAYS_LOCK_FREE(struct Empty {});
     CHECK_ALWAYS_LOCK_FREE(struct OneInt { int i; });
     CHECK_ALWAYS_LOCK_FREE(struct IntArr2 { int i[2]; });

diff  --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp
index 4dbf8fb928b8..d2cf18038892 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_init.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // XFAIL: !non-lockfree-atomics
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <atomic>
 

diff  --git a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp
index ea833c8a260d..86365cb4fc35 100644
--- a/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.req/atomic_var_init.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // XFAIL: c++03
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <atomic>
 

diff  --git a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
index 5d0a2859bfcd..3ef2f176d931 100644
--- a/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
+++ b/libcxx/test/std/atomics/stdatomic.h.syn/types.compile.pass.cpp
@@ -164,7 +164,7 @@ void f() {
   static_assert(std::is_same_v<std::atomic<long long>, ::atomic_llong>);
   static_assert(std::is_same_v<std::atomic<unsigned long long>, ::atomic_ullong>);
 
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
   static_assert(std::is_same_v<std::atomic<char8_t>,  ::atomic_char8_t>);
 #endif
   static_assert(std::is_same_v<std::atomic<char16_t>, ::atomic_char16_t>);

diff  --git a/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp b/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp
index 340c29fe1b9c..6c62e3f4f352 100644
--- a/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp
+++ b/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.compile.pass.cpp
@@ -205,9 +205,9 @@ void test()
     test_not_const<std::array<      volatile int, 1>>();
     test_false    <std::array<const volatile int, 1>>();
     test_true     <std::deque<               int>>();
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
     test_true     <std::deque<const          int>>();
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     test_true     <std::forward_list<int>>();
     test_true     <std::list<int>>();
     test_true     <std::vector<int>>();
@@ -226,9 +226,9 @@ void test()
 
     // Container adaptors
     test_true     <std::stack<               int>>();
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
     test_true     <std::stack<const          int>>();
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     test_true     <std::queue<int>>();
     test_true     <std::priority_queue<int>>();
 

diff  --git a/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp b/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp
index ec788eef1fe2..1aa3e6997718 100644
--- a/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp
+++ b/libcxx/test/std/concepts/concepts.lang/concept.default.init/default_initializable.verify.cpp
@@ -31,7 +31,7 @@ void test() {
     S0 y0{};
     static_assert(std::constructible_from<S0>);
     static_assert(brace_initializable<S0>);
-    LIBCPP_STATIC_ASSERT(std::__default_initializable<S0>);
+    LIBCUDACXX_STATIC_ASSERT(std::__default_initializable<S0>);
     static_assert(std::default_initializable<S0>);
 
     struct S1 { S0 x; }; // Note: aggregate
@@ -39,7 +39,7 @@ void test() {
     S1 y1{}; // expected-error {{chosen constructor is explicit in copy-initialization}}
     static_assert(std::constructible_from<S1>);
     static_assert(!brace_initializable<S1>);
-    LIBCPP_STATIC_ASSERT(std::__default_initializable<S1>);
+    LIBCUDACXX_STATIC_ASSERT(std::__default_initializable<S1>);
     static_assert(!std::default_initializable<S1>);
 
     const int x2; // expected-error {{default initialization of an object of const type 'const int'}}
@@ -47,14 +47,14 @@ void test() {
 
     static_assert(std::constructible_from<const int>);
     static_assert(brace_initializable<const int>);
-    LIBCPP_STATIC_ASSERT(!std::__default_initializable<const int>);
+    LIBCUDACXX_STATIC_ASSERT(!std::__default_initializable<const int>);
     static_assert(!std::default_initializable<const int>);
 
     const int x3[1]; // expected-error-re {{default initialization of an object of const type 'const int{{[ ]*}}[1]'}}
     const int y3[1]{};
     static_assert(std::constructible_from<const int[1]>);
     static_assert(brace_initializable<const int[1]>);
-    LIBCPP_STATIC_ASSERT(!std::__default_initializable<const int[1]>);
+    LIBCUDACXX_STATIC_ASSERT(!std::__default_initializable<const int[1]>);
     static_assert(!std::default_initializable<const int[1]>);
 
     // Zero-length array extension
@@ -62,7 +62,7 @@ void test() {
     const int y4[]{};
     static_assert(!std::constructible_from<const int[]>);
     static_assert(brace_initializable<const int[]>);
-    LIBCPP_STATIC_ASSERT(!std::__default_initializable<const int[]>);
+    LIBCUDACXX_STATIC_ASSERT(!std::__default_initializable<const int[]>);
     static_assert(!std::default_initializable<const int[]>);
 }
 

diff  --git a/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp b/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp
index b38cf1146389..0d12d59f2d94 100644
--- a/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.access/max_size.pass.cpp
@@ -28,7 +28,7 @@ int main(int, char**)
     typedef std::map<int, int, std::less<int>, A> C;
     C c;
     assert(c.max_size() <= 10);
-    LIBCPP_ASSERT(c.max_size() == 10);
+    LIBCUDACXX_ASSERT(c.max_size() == 10);
   }
   {
     typedef limited_allocator<KV, (size_t)-1> A;
@@ -37,7 +37,7 @@ int main(int, char**)
         static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
     C c;
     assert(c.max_size() <= max_dist);
-    LIBCPP_ASSERT(c.max_size() == max_dist);
+    LIBCUDACXX_ASSERT(c.max_size() == max_dist);
   }
   {
     typedef std::map<char, int> C;

diff  --git a/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
index 2a557aa488d1..3c96f0ac0728 100644
--- a/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.cons/assign_initializer_list.pass.cpp
@@ -77,15 +77,15 @@ void duplicate_keys_test() {
   test_allocator_statistics alloc_stats;
   typedef std::map<int, int, std::less<int>, test_allocator<std::pair<const int, int> > > Map;
   {
-    LIBCPP_ASSERT(alloc_stats.alloc_count == 0);
+    LIBCUDACXX_ASSERT(alloc_stats.alloc_count == 0);
     Map s({{1, 0}, {2, 0}, {3, 0}}, std::less<int>(), test_allocator<std::pair<const int, int> >(&alloc_stats));
-    LIBCPP_ASSERT(alloc_stats.alloc_count == 3);
+    LIBCUDACXX_ASSERT(alloc_stats.alloc_count == 3);
     s = {{4, 0}, {4, 0}, {4, 0}, {4, 0}};
-    LIBCPP_ASSERT(alloc_stats.alloc_count == 1);
+    LIBCUDACXX_ASSERT(alloc_stats.alloc_count == 1);
     assert(s.size() == 1);
     assert(s.begin()->first == 4);
   }
-  LIBCPP_ASSERT(alloc_stats.alloc_count == 0);
+  LIBCUDACXX_ASSERT(alloc_stats.alloc_count == 0);
 }
 
 int main(int, char**)

diff  --git a/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
index 3fd051f79061..bc738ee2bc02 100644
--- a/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.cons/copy_assign.pass.cpp
@@ -12,7 +12,7 @@
 
 // map& operator=(const map& m);
 
-// XFAIL: libcpp-has-debug-mode
+// XFAIL: LIBCUDACXX-has-debug-mode
 
 #include <map>
 #include <algorithm>

diff  --git a/libcxx/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
index 1139d9fc87ff..36fc680c780b 100644
--- a/libcxx/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.cons/default_noexcept.pass.cpp
@@ -36,7 +36,7 @@ struct some_comp
 int main(int, char**)
 {
     typedef std::pair<const MoveOnly, MoveOnly> V;
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::map<MoveOnly, MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -45,7 +45,7 @@ int main(int, char**)
         typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp
index 7d28e188f819..5d5aa9a81df2 100644
--- a/libcxx/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.cons/dtor_noexcept.pass.cpp
@@ -42,12 +42,12 @@ int main(int, char**)
         typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp
index bcfafe86449c..44ec36f76e0b 100644
--- a/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.cons/move_alloc.pass.cpp
@@ -64,7 +64,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(7));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef std::pair<MoveOnly, MoveOnly> V;
@@ -103,7 +103,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef std::pair<MoveOnly, MoveOnly> V;
@@ -142,7 +142,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef Counter<int> T;
@@ -178,7 +178,7 @@ int main(int, char**)
 
             M m3(std::move(m1), A());
             assert(m3 == m2);
-            LIBCPP_ASSERT(m1.empty());
+            LIBCUDACXX_ASSERT(m1.empty());
             assert(Counter_base::gConstructed >= (int)(num+6));
             assert(Counter_base::gConstructed <= (int)(num+6+m1.size()));
 
@@ -187,7 +187,7 @@ int main(int, char**)
             assert(Counter_base::gConstructed >= (int)(num+6));
             assert(Counter_base::gConstructed <= (int)(num+6+m1.size()+m2.size()));
             assert(m4 == m3);
-            LIBCPP_ASSERT(m2.empty());
+            LIBCUDACXX_ASSERT(m2.empty());
             }
             assert(Counter_base::gConstructed >= (int)(num+3));
             assert(Counter_base::gConstructed <= (int)(num+3+m1.size()+m2.size()));
@@ -231,7 +231,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A());
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef std::pair<MoveOnly, MoveOnly> V;
@@ -270,7 +270,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A{});
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
 
   return 0;

diff  --git a/libcxx/test/std/containers/associative/map/map.cons/move_assign.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/move_assign.pass.cpp
index c19fba5169b1..363e9847d484 100644
--- a/libcxx/test/std/containers/associative/map/map.cons/move_assign.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.cons/move_assign.pass.cpp
@@ -103,7 +103,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef std::pair<MoveOnly, MoveOnly> V;

diff  --git a/libcxx/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
index 82a5dbac1261..0f2afdb3a60f 100644
--- a/libcxx/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.cons/move_assign_noexcept.pass.cpp
@@ -44,12 +44,12 @@ int main(int, char**)
         typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
index 5454d1c750c7..fc6b01fbd927 100644
--- a/libcxx/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.cons/move_noexcept.pass.cpp
@@ -33,7 +33,7 @@ struct some_comp
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     typedef std::pair<const MoveOnly, MoveOnly> V;
     {
         typedef std::map<MoveOnly, MoveOnly> C;
@@ -47,7 +47,7 @@ int main(int, char**)
         typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp
index 96f96f548a35..d8090d6d4733 100644
--- a/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/map.special/swap_noexcept.pass.cpp
@@ -98,7 +98,7 @@ int main(int, char**)
         typedef std::map<MoveOnly, MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -107,7 +107,7 @@ int main(int, char**)
         typedef std::map<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::map<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -130,12 +130,12 @@ int main(int, char**)
     typedef std::map<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc2<V>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     { // NOT always equal allocator, nothrow swap for comp
     typedef std::map<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc3<V>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #endif
 
 

diff  --git a/libcxx/test/std/containers/associative/map/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/associative/map/range_concept_conformance.compile.pass.cpp
index c36d6c2dbb94..a7dbaf8039f0 100644
--- a/libcxx/test/std/containers/associative/map/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/associative/map/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // map
 

diff  --git a/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp b/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp
index a4537c3d1b29..38eb92a0d59b 100644
--- a/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp
+++ b/libcxx/test/std/containers/associative/multimap/max_size.pass.cpp
@@ -28,7 +28,7 @@ int main(int, char**)
     typedef std::multimap<int, int, std::less<int>, A> C;
     C c;
     assert(c.max_size() <= 10);
-    LIBCPP_ASSERT(c.max_size() == 10);
+    LIBCUDACXX_ASSERT(c.max_size() == 10);
   }
   {
     typedef limited_allocator<KV, (size_t)-1> A;
@@ -37,7 +37,7 @@ int main(int, char**)
         static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
     C c;
     assert(c.max_size() <= max_dist);
-    LIBCPP_ASSERT(c.max_size() == max_dist);
+    LIBCUDACXX_ASSERT(c.max_size() == max_dist);
   }
   {
     typedef std::multimap<char, int> C;

diff  --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp
index 6abc12570762..5f9256bd6286 100644
--- a/libcxx/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/default_noexcept.pass.cpp
@@ -36,7 +36,7 @@ struct some_comp
 int main(int, char**)
 {
     typedef std::pair<const MoveOnly, MoveOnly> V;
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::multimap<MoveOnly, MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -45,7 +45,7 @@ int main(int, char**)
         typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp
index 407f96694815..4a40ecc67531 100644
--- a/libcxx/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/dtor_noexcept.pass.cpp
@@ -42,12 +42,12 @@ int main(int, char**)
         typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp
index a4edd473c629..09066a104a07 100644
--- a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp
+++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_alloc.pass.cpp
@@ -63,7 +63,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(7));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef std::pair<MoveOnly, MoveOnly> V;
@@ -102,7 +102,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef std::pair<MoveOnly, MoveOnly> V;
@@ -141,7 +141,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef Counter<int> T;
@@ -177,7 +177,7 @@ int main(int, char**)
 
             M m3(std::move(m1), A());
             assert(m3 == m2);
-            LIBCPP_ASSERT(m1.empty());
+            LIBCUDACXX_ASSERT(m1.empty());
             assert(Counter_base::gConstructed >= (int)(3*num));
             assert(Counter_base::gConstructed <= (int)(4*num));
 
@@ -186,7 +186,7 @@ int main(int, char**)
             assert(Counter_base::gConstructed >= (int)(3*num));
             assert(Counter_base::gConstructed <= (int)(5*num));
             assert(m4 == m3);
-            LIBCPP_ASSERT(m2.empty());
+            LIBCUDACXX_ASSERT(m2.empty());
             }
             assert(Counter_base::gConstructed >= (int)(2*num));
             assert(Counter_base::gConstructed <= (int)(4*num));
@@ -230,7 +230,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A());
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef std::pair<MoveOnly, MoveOnly> V;
@@ -269,7 +269,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A{});
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
 
   return 0;

diff  --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp
index f0a54b0d7cc6..530e75498971 100644
--- a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp
+++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign.pass.cpp
@@ -103,7 +103,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef std::pair<MoveOnly, MoveOnly> V;

diff  --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp
index 4cd8c19fce5f..dda8b104d5bc 100644
--- a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_assign_noexcept.pass.cpp
@@ -44,12 +44,12 @@ int main(int, char**)
         typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp
index e31348e67ca2..8bbf60fbb00e 100644
--- a/libcxx/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/multimap/multimap.cons/move_noexcept.pass.cpp
@@ -33,7 +33,7 @@ struct some_comp
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     typedef std::pair<const MoveOnly, MoveOnly> V;
     {
         typedef std::multimap<MoveOnly, MoveOnly> C;
@@ -47,7 +47,7 @@ int main(int, char**)
         typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp
index 00ec83dfd621..1e1993b6ed37 100644
--- a/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/multimap/multimap.special/swap_noexcept.pass.cpp
@@ -98,7 +98,7 @@ int main(int, char**)
         typedef std::multimap<MoveOnly, MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, test_allocator<V>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -107,7 +107,7 @@ int main(int, char**)
         typedef std::multimap<MoveOnly, MoveOnly, std::less<MoveOnly>, other_allocator<V>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::multimap<MoveOnly, MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -130,12 +130,12 @@ int main(int, char**)
     typedef std::multimap<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc2<V>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     { // NOT always equal allocator, nothrow swap for comp
     typedef std::multimap<MoveOnly, MoveOnly, some_comp2<MoveOnly>, some_alloc3<V>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/containers/associative/multimap/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/associative/multimap/range_concept_conformance.compile.pass.cpp
index f35a4abc14b6..5a0288b3497a 100644
--- a/libcxx/test/std/containers/associative/multimap/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/associative/multimap/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // multimap
 

diff  --git a/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp b/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp
index 5986df295545..48da76929128 100644
--- a/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/max_size.pass.cpp
@@ -27,7 +27,7 @@ int main(int, char**)
       typedef std::multiset<int, std::less<int>, A> C;
       C c;
       assert(c.max_size() <= 10);
-      LIBCPP_ASSERT(c.max_size() == 10);
+      LIBCUDACXX_ASSERT(c.max_size() == 10);
     }
     {
       typedef limited_allocator<int, (size_t)-1> A;
@@ -36,7 +36,7 @@ int main(int, char**)
           static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
       C c;
       assert(c.max_size() <= max_dist);
-      LIBCPP_ASSERT(c.max_size() == max_dist);
+      LIBCUDACXX_ASSERT(c.max_size() == max_dist);
     }
     {
       typedef std::multiset<char> C;

diff  --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp
index b6d1cb267846..ff1ce278a036 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/default_noexcept.pass.cpp
@@ -35,7 +35,7 @@ struct some_comp
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::multiset<MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -44,7 +44,7 @@ int main(int, char**)
         typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp
index a9f7a648773e..761e807a7339 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/dtor_noexcept.pass.cpp
@@ -41,12 +41,12 @@ int main(int, char**)
         typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp
index d279dba40a19..b1ddabc682f1 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_alloc.pass.cpp
@@ -62,7 +62,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(7));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef MoveOnly V;
@@ -100,7 +100,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef MoveOnly V;
@@ -138,7 +138,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef Counter<int> V;
@@ -172,7 +172,7 @@ int main(int, char**)
 
             M m3(std::move(m1), A());
             assert(m3 == m2);
-            LIBCPP_ASSERT(m1.empty());
+            LIBCUDACXX_ASSERT(m1.empty());
             assert(Counter_base::gConstructed >= (int)(3*num));
             assert(Counter_base::gConstructed <= (int)(4*num));
 
@@ -181,7 +181,7 @@ int main(int, char**)
             assert(Counter_base::gConstructed >= (int)(3*num));
             assert(Counter_base::gConstructed <= (int)(5*num));
             assert(m4 == m3);
-            LIBCPP_ASSERT(m2.empty());
+            LIBCUDACXX_ASSERT(m2.empty());
             }
             assert(Counter_base::gConstructed >= (int)(2*num));
             assert(Counter_base::gConstructed <= (int)(4*num));

diff  --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp
index c57a56cd4488..0c362c724e29 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign.pass.cpp
@@ -101,7 +101,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef MoveOnly V;

diff  --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp
index a94b5b1abf1e..69d4e57c3eda 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_assign_noexcept.pass.cpp
@@ -43,12 +43,12 @@ int main(int, char**)
         typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp
index 4bf70682d711..e8acfcce9a2b 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.cons/move_noexcept.pass.cpp
@@ -33,7 +33,7 @@ struct some_comp
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::multiset<MoveOnly> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
@@ -46,7 +46,7 @@ int main(int, char**)
         typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp
index 467be8e7dafd..f2ee06f19cd3 100644
--- a/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/multiset.special/swap_noexcept.pass.cpp
@@ -97,7 +97,7 @@ int main(int, char**)
         typedef std::multiset<MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::multiset<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -106,7 +106,7 @@ int main(int, char**)
         typedef std::multiset<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::multiset<MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -129,12 +129,12 @@ int main(int, char**)
     typedef std::multiset<MoveOnly, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     { // NOT always equal allocator, nothrow swap for comp
     typedef std::multiset<MoveOnly, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/containers/associative/multiset/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/associative/multiset/range_concept_conformance.compile.pass.cpp
index 90d16c382d46..1474ec59286f 100644
--- a/libcxx/test/std/containers/associative/multiset/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/associative/multiset/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // multiset
 

diff  --git a/libcxx/test/std/containers/associative/set/max_size.pass.cpp b/libcxx/test/std/containers/associative/set/max_size.pass.cpp
index e37bfe7142b0..974cd2ac8215 100644
--- a/libcxx/test/std/containers/associative/set/max_size.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/max_size.pass.cpp
@@ -27,7 +27,7 @@ int main(int, char**)
       typedef std::set<int, std::less<int>, A> C;
       C c;
       assert(c.max_size() <= 10);
-      LIBCPP_ASSERT(c.max_size() == 10);
+      LIBCUDACXX_ASSERT(c.max_size() == 10);
     }
     {
       typedef limited_allocator<int, (size_t)-1> A;
@@ -36,7 +36,7 @@ int main(int, char**)
           static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
       C c;
       assert(c.max_size() <= max_dist);
-      LIBCPP_ASSERT(c.max_size() == max_dist);
+      LIBCUDACXX_ASSERT(c.max_size() == max_dist);
     }
     {
       typedef std::set<char> C;

diff  --git a/libcxx/test/std/containers/associative/set/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/associative/set/range_concept_conformance.compile.pass.cpp
index b2f30ccf2a5d..7482a8f3c315 100644
--- a/libcxx/test/std/containers/associative/set/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // set
 

diff  --git a/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp
index 8b391ad079ab..cc6070b23349 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/assign_initializer_list.pass.cpp
@@ -58,15 +58,15 @@ void duplicate_keys_test() {
   test_allocator_statistics alloc_stats;
   typedef std::set<int, std::less<int>, test_allocator<int> > Set;
   {
-    LIBCPP_ASSERT(alloc_stats.alloc_count == 0);
+    LIBCUDACXX_ASSERT(alloc_stats.alloc_count == 0);
     Set s({1, 2, 3}, std::less<int>(), test_allocator<int>(&alloc_stats));
-    LIBCPP_ASSERT(alloc_stats.alloc_count == 3);
+    LIBCUDACXX_ASSERT(alloc_stats.alloc_count == 3);
     s = {4, 4, 4, 4, 4};
-    LIBCPP_ASSERT(alloc_stats.alloc_count == 1);
+    LIBCUDACXX_ASSERT(alloc_stats.alloc_count == 1);
     assert(s.size() == 1);
     assert(*s.begin() == 4);
   }
-  LIBCPP_ASSERT(alloc_stats.alloc_count == 0);
+  LIBCUDACXX_ASSERT(alloc_stats.alloc_count == 0);
 }
 
 int main(int, char**) {

diff  --git a/libcxx/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp
index db97fea722bb..9f9e98b4053c 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/default_noexcept.pass.cpp
@@ -35,7 +35,7 @@ struct some_comp
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::set<MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -44,7 +44,7 @@ int main(int, char**)
         typedef std::set<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp
index c9b73731c307..6cf0075ecd2c 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/dtor_noexcept.pass.cpp
@@ -41,12 +41,12 @@ int main(int, char**)
         typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp
index 59d536ef5c7a..2f9ddf33f43b 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/move_alloc.pass.cpp
@@ -62,7 +62,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(7));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef MoveOnly V;
@@ -100,7 +100,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef MoveOnly V;
@@ -138,7 +138,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef Counter<int> V;
@@ -172,7 +172,7 @@ int main(int, char**)
 
             M m3(std::move(m1), A());
             assert(m3 == m2);
-            LIBCPP_ASSERT(m1.empty());
+            LIBCUDACXX_ASSERT(m1.empty());
             assert(Counter_base::gConstructed >= (int)(6+num));
             assert(Counter_base::gConstructed <= (int)(m1.size()+6+num));
 
@@ -181,7 +181,7 @@ int main(int, char**)
             assert(Counter_base::gConstructed >= (int)(6+num));
             assert(Counter_base::gConstructed <= (int)(m1.size()+m2.size()+6+num));
             assert(m4 == m3);
-            LIBCPP_ASSERT(m2.empty());
+            LIBCUDACXX_ASSERT(m2.empty());
             }
             assert(Counter_base::gConstructed >= (int)(3+num));
             assert(Counter_base::gConstructed <= (int)(m1.size()+m2.size()+3+num));

diff  --git a/libcxx/test/std/containers/associative/set/set.cons/move_assign.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/move_assign.pass.cpp
index ea85051aa4cc..128b9da5c31a 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/move_assign.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/move_assign.pass.cpp
@@ -101,7 +101,7 @@ int main(int, char**)
         assert(m3 == m2);
         assert(m3.get_allocator() == A(5));
         assert(m3.key_comp() == C(5));
-        LIBCPP_ASSERT(m1.empty());
+        LIBCUDACXX_ASSERT(m1.empty());
     }
     {
         typedef MoveOnly V;

diff  --git a/libcxx/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp
index 9c177f219dc7..5706dfb12093 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/move_assign_noexcept.pass.cpp
@@ -43,12 +43,12 @@ int main(int, char**)
         typedef std::set<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp
index d99b853a4011..b154bce508cb 100644
--- a/libcxx/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.cons/move_noexcept.pass.cpp
@@ -33,7 +33,7 @@ struct some_comp
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::set<MoveOnly> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
@@ -46,7 +46,7 @@ int main(int, char**)
         typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
index b04c77b8a864..143228ac65db 100644
--- a/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/associative/set/set.special/swap_noexcept.pass.cpp
@@ -97,7 +97,7 @@ int main(int, char**)
         typedef std::set<MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::set<MoveOnly, std::less<MoveOnly>, test_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -106,7 +106,7 @@ int main(int, char**)
         typedef std::set<MoveOnly, std::less<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::set<MoveOnly, some_comp<MoveOnly>> C;
         static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -129,12 +129,12 @@ int main(int, char**)
     typedef std::set<MoveOnly, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     { // NOT always equal allocator, nothrow swap for comp
     typedef std::set<MoveOnly, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #endif
 
 

diff  --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
index 7dbeeee735d1..f596d5e59e96 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/deduct.pass.cpp
@@ -256,7 +256,7 @@ int main(int, char**)
         // The only requirement in the Standard is that integral types cannot be
         // considered input iterators, beyond that it is unspecified.
         using BadIter = int;
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
         struct OutputIter {
           using iterator_category = std::output_iterator_tag;
           using value_type = void;
@@ -268,7 +268,7 @@ int main(int, char**)
           const OutputIter& operator++() { return *this; }
           OutputIter operator++(int) const { return *this; }
         };
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
         struct BadAlloc {};
         using AllocAsComp = Alloc;
@@ -287,14 +287,14 @@ int main(int, char**)
         //
         // Cannot deduce from (BAD_iter, BAD_iter, comp)
         static_assert(SFINAEs_away<std::priority_queue, BadIter, BadIter, Comp>);
-        LIBCPP_STATIC_ASSERT(SFINAEs_away<std::priority_queue, OutputIter, OutputIter, Comp>);
+        LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<std::priority_queue, OutputIter, OutputIter, Comp>);
         // Note: (iter, iter, ALLOC_as_comp) is allowed -- it just calls (iter, iter, alloc).
 
         // (iter, iter, comp, cont)
         //
         // Cannot deduce from (BAD_iter, BAD_iter, comp, cont)
         static_assert(SFINAEs_away<std::priority_queue, BadIter, BadIter, Comp, Cont>);
-        LIBCPP_STATIC_ASSERT(SFINAEs_away<std::priority_queue, OutputIter, OutputIter, Comp, Cont>);
+        LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<std::priority_queue, OutputIter, OutputIter, Comp, Cont>);
         // Cannot deduce from (iter, iter, ALLOC_as_comp, cont)
         static_assert(SFINAEs_away<std::priority_queue, Iter, Iter, AllocAsComp, Cont>);
         // Note: (iter, iter, comp, ALLOC_as_cont) is allowed -- it just calls (iter, iter, comp,
@@ -304,7 +304,7 @@ int main(int, char**)
         //
         // Cannot deduce from (BAD_iter, BAD_iter, alloc)
         static_assert(SFINAEs_away<std::priority_queue, BadIter, BadIter, Alloc>);
-        LIBCPP_STATIC_ASSERT(SFINAEs_away<std::priority_queue, OutputIter, OutputIter, Alloc>);
+        LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<std::priority_queue, OutputIter, OutputIter, Alloc>);
         // Note: (iter, iter, BAD_alloc) is interpreted as (iter, iter, comp) instead and fails upon
         // instantiation. There is no requirement to SFINAE away bad comparators.
 
@@ -319,7 +319,7 @@ int main(int, char**)
         //
         // Cannot deduce from (BAD_iter, BAD_iter, comp, cont, alloc)
         static_assert(SFINAEs_away<std::priority_queue, BadIter, BadIter, Comp, Cont, Alloc>);
-        LIBCPP_STATIC_ASSERT(
+        LIBCUDACXX_STATIC_ASSERT(
             SFINAEs_away<std::priority_queue, OutputIter, OutputIter, Comp, Cont, Alloc>);
         // Cannot deduce from (iter, iter, ALLOC_as_comp, cont, alloc)
         static_assert(SFINAEs_away<std::priority_queue, Iter, Iter, AllocAsComp, Cont, Alloc>);

diff  --git a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp
index 80af575a5209..cf16bad8ceaf 100644
--- a/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/priority.queue/priqueue.cons/default_noexcept.pass.cpp
@@ -25,7 +25,7 @@
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::priority_queue<MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp
index 416e4e38795d..bd7e5f8ad80c 100644
--- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/default_noexcept.pass.cpp
@@ -23,7 +23,7 @@
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::queue<MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp
index 5a2fd037a009..758aa9f751f3 100644
--- a/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/queue/queue.cons/move_noexcept.pass.cpp
@@ -24,7 +24,7 @@
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::queue<MoveOnly> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp
index 9cf79a81f948..96f8927e1229 100644
--- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/default_noexcept.pass.cpp
@@ -24,7 +24,7 @@
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::stack<MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp
index 24e66a7076e8..58826e406355 100644
--- a/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/container.adaptors/stack/stack.cons/move_noexcept.pass.cpp
@@ -23,7 +23,7 @@
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::stack<MoveOnly> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/container.requirements/container.requirements.general/allocator_move.pass.cpp b/libcxx/test/std/containers/container.requirements/container.requirements.general/allocator_move.pass.cpp
index cc8949e751dd..3a8d5514bc70 100644
--- a/libcxx/test/std/containers/container.requirements/container.requirements.general/allocator_move.pass.cpp
+++ b/libcxx/test/std/containers/container.requirements/container.requirements.general/allocator_move.pass.cpp
@@ -70,7 +70,7 @@ int main(int, char**) {
     test<std::forward_list<int, test_allocator<int> > >();
 
     // libc++ stores two allocators in deque
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
     int stored_allocators = 2;
 #else
     int stored_allocators = 1;
@@ -87,7 +87,7 @@ int main(int, char**) {
   }
   { // test unordered containers
     // libc++ stores two allocators in the unordered containers.
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
     int stored_allocators = 2;
 #else
     int stored_allocators = 1;

diff  --git a/libcxx/test/std/containers/sequences/array/front_back.pass.cpp b/libcxx/test/std/containers/sequences/array/front_back.pass.cpp
index c37acd0b7863..db8cf7fe33fa 100644
--- a/libcxx/test/std/containers/sequences/array/front_back.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/front_back.pass.cpp
@@ -38,9 +38,9 @@ TEST_CONSTEXPR_CXX17 bool tests()
         typedef std::array<T, 0> C;
         C c = {};
         ASSERT_SAME_TYPE(decltype(c.back()), C::reference);
-        LIBCPP_ASSERT_NOEXCEPT(c.back());
+        LIBCUDACXX_ASSERT_NOEXCEPT(c.back());
         ASSERT_SAME_TYPE(decltype(c.front()), C::reference);
-        LIBCPP_ASSERT_NOEXCEPT(c.front());
+        LIBCUDACXX_ASSERT_NOEXCEPT(c.front());
         if (c.size() > (0)) { // always false
             TEST_IGNORE_NODISCARD c.front();
             TEST_IGNORE_NODISCARD c.back();
@@ -51,9 +51,9 @@ TEST_CONSTEXPR_CXX17 bool tests()
         typedef std::array<const T, 0> C;
         C c = {};
         ASSERT_SAME_TYPE(decltype( c.back()), C::reference);
-        LIBCPP_ASSERT_NOEXCEPT(    c.back());
+        LIBCUDACXX_ASSERT_NOEXCEPT(    c.back());
         ASSERT_SAME_TYPE(decltype( c.front()), C::reference);
-        LIBCPP_ASSERT_NOEXCEPT(    c.front());
+        LIBCUDACXX_ASSERT_NOEXCEPT(    c.front());
         if (c.size() > (0)) {
             TEST_IGNORE_NODISCARD c.front();
             TEST_IGNORE_NODISCARD c.back();

diff  --git a/libcxx/test/std/containers/sequences/array/front_back_const.pass.cpp b/libcxx/test/std/containers/sequences/array/front_back_const.pass.cpp
index 9204663f0da3..96562a7acfa5 100644
--- a/libcxx/test/std/containers/sequences/array/front_back_const.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/front_back_const.pass.cpp
@@ -33,9 +33,9 @@ TEST_CONSTEXPR_CXX14 bool tests()
         typedef std::array<T, 0> C;
         C const c = {};
         ASSERT_SAME_TYPE(decltype(c.back()), C::const_reference);
-        LIBCPP_ASSERT_NOEXCEPT(c.back());
+        LIBCUDACXX_ASSERT_NOEXCEPT(c.back());
         ASSERT_SAME_TYPE(decltype(c.front()), C::const_reference);
-        LIBCPP_ASSERT_NOEXCEPT(c.front());
+        LIBCUDACXX_ASSERT_NOEXCEPT(c.front());
         if (c.size() > (0)) { // always false
             TEST_IGNORE_NODISCARD c.front();
             TEST_IGNORE_NODISCARD c.back();
@@ -46,9 +46,9 @@ TEST_CONSTEXPR_CXX14 bool tests()
         typedef std::array<const T, 0> C;
         C const c = {};
         ASSERT_SAME_TYPE(decltype(c.back()), C::const_reference);
-        LIBCPP_ASSERT_NOEXCEPT(c.back());
+        LIBCUDACXX_ASSERT_NOEXCEPT(c.back());
         ASSERT_SAME_TYPE(decltype(c.front()), C::const_reference);
-        LIBCPP_ASSERT_NOEXCEPT(c.front());
+        LIBCUDACXX_ASSERT_NOEXCEPT(c.front());
         if (c.size() > (0)) {
             TEST_IGNORE_NODISCARD c.front();
             TEST_IGNORE_NODISCARD c.back();

diff  --git a/libcxx/test/std/containers/sequences/array/indexing.pass.cpp b/libcxx/test/std/containers/sequences/array/indexing.pass.cpp
index 48a2be0bdcbd..5afc8b9eb0bc 100644
--- a/libcxx/test/std/containers/sequences/array/indexing.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/indexing.pass.cpp
@@ -22,7 +22,7 @@ TEST_CONSTEXPR_CXX17 bool tests()
         typedef double T;
         typedef std::array<T, 3> C;
         C c = {1, 2, 3.5};
-        LIBCPP_ASSERT_NOEXCEPT(c[0]);
+        LIBCUDACXX_ASSERT_NOEXCEPT(c[0]);
         ASSERT_SAME_TYPE(C::reference, decltype(c[0]));
         C::reference r1 = c[0];
         assert(r1 == 1);
@@ -41,7 +41,7 @@ TEST_CONSTEXPR_CXX17 bool tests()
             typedef double T;
             typedef std::array<T, 0> C;
             C c = {};
-            LIBCPP_ASSERT_NOEXCEPT(c[0]);
+            LIBCUDACXX_ASSERT_NOEXCEPT(c[0]);
             ASSERT_SAME_TYPE(C::reference, decltype(c[0]));
             if (c.size() > (0)) { // always false
               C::reference r = c[0];
@@ -52,7 +52,7 @@ TEST_CONSTEXPR_CXX17 bool tests()
             typedef double T;
             typedef std::array<const T, 0> C;
             C c = {};
-            LIBCPP_ASSERT_NOEXCEPT(c[0]);
+            LIBCUDACXX_ASSERT_NOEXCEPT(c[0]);
             ASSERT_SAME_TYPE(C::reference, decltype(c[0]));
             if (c.size() > (0)) { // always false
               C::reference r = c[0];

diff  --git a/libcxx/test/std/containers/sequences/array/indexing_const.pass.cpp b/libcxx/test/std/containers/sequences/array/indexing_const.pass.cpp
index ce6f8bb59aac..af94aa6fb959 100644
--- a/libcxx/test/std/containers/sequences/array/indexing_const.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/indexing_const.pass.cpp
@@ -22,7 +22,7 @@ TEST_CONSTEXPR_CXX14 bool tests()
         typedef double T;
         typedef std::array<T, 3> C;
         C const c = {1, 2, 3.5};
-        LIBCPP_ASSERT_NOEXCEPT(c[0]);
+        LIBCUDACXX_ASSERT_NOEXCEPT(c[0]);
         ASSERT_SAME_TYPE(C::const_reference, decltype(c[0]));
         C::const_reference r1 = c[0];
         assert(r1 == 1);
@@ -35,7 +35,7 @@ TEST_CONSTEXPR_CXX14 bool tests()
             typedef double T;
             typedef std::array<T, 0> C;
             C const c = {};
-            LIBCPP_ASSERT_NOEXCEPT(c[0]);
+            LIBCUDACXX_ASSERT_NOEXCEPT(c[0]);
             ASSERT_SAME_TYPE(C::const_reference, decltype(c[0]));
             if (c.size() > (0)) { // always false
                 C::const_reference r = c[0];
@@ -46,7 +46,7 @@ TEST_CONSTEXPR_CXX14 bool tests()
             typedef double T;
             typedef std::array<T const, 0> C;
             C const c = {};
-            LIBCPP_ASSERT_NOEXCEPT(c[0]);
+            LIBCUDACXX_ASSERT_NOEXCEPT(c[0]);
             ASSERT_SAME_TYPE(C::const_reference, decltype(c[0]));
             if (c.size() > (0)) { // always false
               C::const_reference r = c[0];

diff  --git a/libcxx/test/std/containers/sequences/array/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/sequences/array/range_concept_conformance.compile.pass.cpp
index 338ec935f116..144baa661906 100644
--- a/libcxx/test/std/containers/sequences/array/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // array
 

diff  --git a/libcxx/test/std/containers/sequences/array/types.pass.cpp b/libcxx/test/std/containers/sequences/array/types.pass.cpp
index f86e008d2e8d..de2a1935109a 100644
--- a/libcxx/test/std/containers/sequences/array/types.pass.cpp
+++ b/libcxx/test/std/containers/sequences/array/types.pass.cpp
@@ -54,8 +54,8 @@ int main(int, char**)
         typedef std::array<T, 10> C;
         static_assert((std::is_same<C::reference, T&>::value), "");
         static_assert((std::is_same<C::const_reference, const T&>::value), "");
-        LIBCPP_STATIC_ASSERT((std::is_same<C::iterator, T*>::value), "");
-        LIBCPP_STATIC_ASSERT((std::is_same<C::const_iterator, const T*>::value), "");
+        LIBCUDACXX_STATIC_ASSERT((std::is_same<C::iterator, T*>::value), "");
+        LIBCUDACXX_STATIC_ASSERT((std::is_same<C::const_iterator, const T*>::value), "");
         test_iterators<C>();
         static_assert((std::is_same<C::pointer, T*>::value), "");
         static_assert((std::is_same<C::const_pointer, const T*>::value), "");
@@ -76,8 +76,8 @@ int main(int, char**)
         typedef std::array<T, 0> C;
         static_assert((std::is_same<C::reference, T&>::value), "");
         static_assert((std::is_same<C::const_reference, const T&>::value), "");
-        LIBCPP_STATIC_ASSERT((std::is_same<C::iterator, T*>::value), "");
-        LIBCPP_STATIC_ASSERT((std::is_same<C::const_iterator, const T*>::value), "");
+        LIBCUDACXX_STATIC_ASSERT((std::is_same<C::iterator, T*>::value), "");
+        LIBCUDACXX_STATIC_ASSERT((std::is_same<C::const_iterator, const T*>::value), "");
         test_iterators<C>();
         static_assert((std::is_same<C::pointer, T*>::value), "");
         static_assert((std::is_same<C::const_pointer, const T*>::value), "");

diff  --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/access.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/access.pass.cpp
index 583dba28a241..24cad1e761f9 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.capacity/access.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/access.pass.cpp
@@ -55,10 +55,10 @@ int main(int, char**)
         typedef std::deque<int> C;
         C c = make<std::deque<int> >(10);
         ASSERT_SAME_TYPE(decltype(c[0]), C::reference);
-        LIBCPP_ASSERT_NOEXCEPT(   c[0]);
-        LIBCPP_ASSERT_NOEXCEPT(   c.front());
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c[0]);
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c.front());
         ASSERT_SAME_TYPE(decltype(c.front()), C::reference);
-        LIBCPP_ASSERT_NOEXCEPT(   c.back());
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c.back());
         ASSERT_SAME_TYPE(decltype(c.back()), C::reference);
         for (int i = 0; i < 10; ++i)
             assert(c[i] == i);
@@ -71,10 +71,10 @@ int main(int, char**)
         typedef std::deque<int> C;
         const C c = make<std::deque<int> >(10);
         ASSERT_SAME_TYPE(decltype(c[0]), C::const_reference);
-        LIBCPP_ASSERT_NOEXCEPT(   c[0]);
-        LIBCPP_ASSERT_NOEXCEPT(   c.front());
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c[0]);
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c.front());
         ASSERT_SAME_TYPE(decltype(c.front()), C::const_reference);
-        LIBCPP_ASSERT_NOEXCEPT(   c.back());
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c.back());
         ASSERT_SAME_TYPE(decltype(c.back()), C::const_reference);
         for (int i = 0; i < 10; ++i)
             assert(c[i] == i);
@@ -88,10 +88,10 @@ int main(int, char**)
         typedef std::deque<int, min_allocator<int>> C;
         C c = make<std::deque<int, min_allocator<int>> >(10);
         ASSERT_SAME_TYPE(decltype(c[0]), C::reference);
-        LIBCPP_ASSERT_NOEXCEPT(   c[0]);
-        LIBCPP_ASSERT_NOEXCEPT(   c.front());
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c[0]);
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c.front());
         ASSERT_SAME_TYPE(decltype(c.front()), C::reference);
-        LIBCPP_ASSERT_NOEXCEPT(   c.back());
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c.back());
         ASSERT_SAME_TYPE(decltype(c.back()), C::reference);
         for (int i = 0; i < 10; ++i)
             assert(c[i] == i);
@@ -104,10 +104,10 @@ int main(int, char**)
         typedef std::deque<int, min_allocator<int>> C;
         const C c = make<std::deque<int, min_allocator<int>> >(10);
         ASSERT_SAME_TYPE(decltype(c[0]), C::const_reference);
-        LIBCPP_ASSERT_NOEXCEPT(   c[0]);
-        LIBCPP_ASSERT_NOEXCEPT(   c.front());
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c[0]);
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c.front());
         ASSERT_SAME_TYPE(decltype(c.front()), C::const_reference);
-        LIBCPP_ASSERT_NOEXCEPT(   c.back());
+        LIBCUDACXX_ASSERT_NOEXCEPT(   c.back());
         ASSERT_SAME_TYPE(decltype(c.back()), C::const_reference);
         for (int i = 0; i < 10; ++i)
             assert(c[i] == i);

diff  --git a/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp
index 230a46519b10..a7fc2843fd40 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.capacity/max_size.pass.cpp
@@ -24,7 +24,7 @@ int main(int, char**) {
     typedef std::deque<int, A> C;
     C c;
     assert(c.max_size() <= 10);
-    LIBCPP_ASSERT(c.max_size() == 10);
+    LIBCUDACXX_ASSERT(c.max_size() == 10);
   }
   {
     typedef limited_allocator<int, (size_t)-1> A;
@@ -33,7 +33,7 @@ int main(int, char**) {
         static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
     C c;
     assert(c.max_size() <= max_dist);
-    LIBCPP_ASSERT(c.max_size() == max_dist);
+    LIBCUDACXX_ASSERT(c.max_size() == max_dist);
   }
   {
     typedef std::deque<char> C;

diff  --git a/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp
index 5bb3dc99d119..379141d4e992 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.cons/default_noexcept.pass.cpp
@@ -32,7 +32,7 @@ struct some_alloc
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::deque<MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -41,7 +41,7 @@ int main(int, char**)
         typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp
index 8dfcebd0e1d6..111681c6653c 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.cons/dtor_noexcept.pass.cpp
@@ -42,12 +42,12 @@ int main(int, char**)
         typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp
index 734508a3e369..b0822c1cfc75 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.cons/move_alloc.pass.cpp
@@ -35,7 +35,7 @@ int main(int, char**)
         std::deque<MoveOnly, A> c3(std::move(c1), A(3)); // unequal allocator
         assert(c2 == c3);
         assert(c3.get_allocator() == A(3));
-        LIBCPP_ASSERT(c1.size() != 0);
+        LIBCUDACXX_ASSERT(c1.size() != 0);
     }
     {
         int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
@@ -50,7 +50,7 @@ int main(int, char**)
         std::deque<MoveOnly, A> c3(std::move(c1), A(1)); // equal allocator
         assert(c2 == c3);
         assert(c3.get_allocator() == A(1));
-        LIBCPP_ASSERT(c1.size() == 0);
+        LIBCUDACXX_ASSERT(c1.size() == 0);
     }
     {
         int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
@@ -65,7 +65,7 @@ int main(int, char**)
         std::deque<MoveOnly, A> c3(std::move(c1), A(3)); // unequal allocator
         assert(c2 == c3);
         assert(c3.get_allocator() == A(3));
-        LIBCPP_ASSERT(c1.size() != 0);
+        LIBCUDACXX_ASSERT(c1.size() != 0);
     }
     {
         int ab[] = {3, 4, 2, 8, 0, 1, 44, 34, 45, 96, 80, 1, 13, 31, 45};
@@ -80,7 +80,7 @@ int main(int, char**)
         std::deque<MoveOnly, A> c3(std::move(c1), A());  // equal allocator
         assert(c2 == c3);
         assert(c3.get_allocator() == A());
-        LIBCPP_ASSERT(c1.size() == 0);
+        LIBCUDACXX_ASSERT(c1.size() == 0);
     }
 
   return 0;

diff  --git a/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp
index a87c8e00ab2f..faeb44c92f1e 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.cons/move_assign_noexcept.pass.cpp
@@ -42,7 +42,7 @@ int main(int, char**)
         typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
@@ -51,7 +51,7 @@ int main(int, char**)
         typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp
index d90dd810a499..70c38ef0d27d 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.cons/move_noexcept.pass.cpp
@@ -32,7 +32,7 @@ struct some_alloc
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::deque<MoveOnly> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
@@ -49,7 +49,7 @@ int main(int, char**)
         typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp
index 87b2f3f61505..0bfdbca8fe21 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.cons/size.pass.cpp
@@ -101,7 +101,7 @@ int main(int, char**)
     test<DefaultOnly, std::allocator<DefaultOnly> >(4096);
     test<DefaultOnly, std::allocator<DefaultOnly> >(4097);
 
-    LIBCPP_ONLY(test1<DefaultOnly, limited_allocator<DefaultOnly, 4096> >(4095));
+    LIBCUDACXX_ONLY(test1<DefaultOnly, limited_allocator<DefaultOnly, 4096> >(4095));
 
 #if TEST_STD_VER >= 11
     test<DefaultOnly, min_allocator<DefaultOnly> >(4095);

diff  --git a/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp
index 8216ed4c1a50..72e2edd764ec 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.cons/size_value.pass.cpp
@@ -45,7 +45,7 @@ int main(int, char**)
     test<int, std::allocator<int> >(4095, 78);
     test<int, std::allocator<int> >(4096, 1165);
     test<int, std::allocator<int> >(4097, 157);
-    LIBCPP_ONLY(test<int, limited_allocator<int, 4096> >(4095, 90));
+    LIBCUDACXX_ONLY(test<int, limited_allocator<int, 4096> >(4095, 90));
 #if TEST_STD_VER >= 11
     test<int, min_allocator<int> >(4095, 90);
 #endif

diff  --git a/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp
index 4ce47f0374ce..af38a1357445 100644
--- a/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/deque.special/swap_noexcept.pass.cpp
@@ -60,7 +60,7 @@ int main(int, char**)
         typedef std::deque<MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::deque<MoveOnly, test_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -69,7 +69,7 @@ int main(int, char**)
         typedef std::deque<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::deque<MoveOnly, some_alloc<MoveOnly>> C;
 #if TEST_STD_VER >= 14

diff  --git a/libcxx/test/std/containers/sequences/deque/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/sequences/deque/range_concept_conformance.compile.pass.cpp
index 987a59e156cb..7974cd423fde 100644
--- a/libcxx/test/std/containers/sequences/deque/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // deque
 

diff  --git a/libcxx/test/std/containers/sequences/deque/types.pass.cpp b/libcxx/test/std/containers/sequences/deque/types.pass.cpp
index bfe4808f863d..a7126351a658 100644
--- a/libcxx/test/std/containers/sequences/deque/types.pass.cpp
+++ b/libcxx/test/std/containers/sequences/deque/types.pass.cpp
@@ -28,8 +28,8 @@
 //     typedef std::reverse_iterator<const_iterator>    const_reverse_iterator;
 // };
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <deque>
 #include <iterator>

diff  --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp
index 772a985eeb55..efc2da6c3c4d 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/default_noexcept.pass.cpp
@@ -32,7 +32,7 @@ struct some_alloc
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::forward_list<MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -41,7 +41,7 @@ int main(int, char**)
         typedef std::forward_list<MoveOnly, test_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp
index ae6fd62b6019..8aed4379030b 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/dtor_noexcept.pass.cpp
@@ -42,12 +42,12 @@ int main(int, char**)
         typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp
index 63168c40ae6f..10f80a7b0191 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_assign_noexcept.pass.cpp
@@ -42,7 +42,7 @@ int main(int, char**)
         typedef std::forward_list<MoveOnly, test_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
@@ -51,7 +51,7 @@ int main(int, char**)
         typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp
index edd3449b0678..ac56775e4b5e 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.cons/move_noexcept.pass.cpp
@@ -32,7 +32,7 @@ struct some_alloc
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::forward_list<MoveOnly> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
@@ -49,7 +49,7 @@ int main(int, char**)
         typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
index e9450ecaa388..557178dafcdf 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/forwardlist.spec/swap_noexcept.pass.cpp
@@ -61,7 +61,7 @@ int main(int, char**)
         typedef std::forward_list<MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::forward_list<MoveOnly, test_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -70,7 +70,7 @@ int main(int, char**)
         typedef std::forward_list<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::forward_list<MoveOnly, some_alloc<MoveOnly>> C;
 #if TEST_STD_VER >= 14

diff  --git a/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp
index 08d21d641163..a705da927df1 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/max_size.pass.cpp
@@ -25,7 +25,7 @@ int main(int, char**)
       typedef std::forward_list<int, A> C;
       C c;
       assert(c.max_size() <= 10);
-      LIBCPP_ASSERT(c.max_size() == 10);
+      LIBCUDACXX_ASSERT(c.max_size() == 10);
     }
     {
       typedef limited_allocator<int, (size_t)-1> A;
@@ -34,7 +34,7 @@ int main(int, char**)
           static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
       C c;
       assert(c.max_size() <= max_dist);
-      LIBCPP_ASSERT(c.max_size() == max_dist);
+      LIBCUDACXX_ASSERT(c.max_size() == max_dist);
     }
     {
       typedef std::forward_list<char> C;

diff  --git a/libcxx/test/std/containers/sequences/forwardlist/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/sequences/forwardlist/range_concept_conformance.compile.pass.cpp
index efa52c642470..4731c3ed580b 100644
--- a/libcxx/test/std/containers/sequences/forwardlist/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/sequences/forwardlist/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // forward_list
 

diff  --git a/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp b/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp
index 8560a6a87f05..c8e8b971d857 100644
--- a/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.capacity/max_size.pass.cpp
@@ -24,7 +24,7 @@ int main(int, char**) {
     typedef std::list<int, A> C;
     C c;
     assert(c.max_size() <= 10);
-    LIBCPP_ASSERT(c.max_size() == 10);
+    LIBCUDACXX_ASSERT(c.max_size() == 10);
   }
   {
     typedef limited_allocator<int, (size_t)-1> A;
@@ -33,7 +33,7 @@ int main(int, char**) {
         static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
     C c;
     assert(c.max_size() <= max_dist);
-    LIBCPP_ASSERT(c.max_size() == max_dist);
+    LIBCUDACXX_ASSERT(c.max_size() == max_dist);
   }
   {
     typedef std::list<char> C;

diff  --git a/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp
index d34efac592bf..5f2d34a5fef2 100644
--- a/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.cons/default_noexcept.pass.cpp
@@ -32,7 +32,7 @@ struct some_alloc
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::list<MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -41,7 +41,7 @@ int main(int, char**)
         typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp
index a6c9a83f32f0..d0d8c0686a51 100644
--- a/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.cons/dtor_noexcept.pass.cpp
@@ -42,12 +42,12 @@ int main(int, char**)
         typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp
index daa2410d77df..7738bf361918 100644
--- a/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.cons/move_assign_noexcept.pass.cpp
@@ -42,7 +42,7 @@ int main(int, char**)
         typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
@@ -51,7 +51,7 @@ int main(int, char**)
         typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp
index 6c1c89c84a93..ad9ac3f2205f 100644
--- a/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.cons/move_noexcept.pass.cpp
@@ -32,7 +32,7 @@ struct some_alloc
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::list<MoveOnly> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
@@ -45,7 +45,7 @@ int main(int, char**)
         typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp
index 228d3ef15cb9..c753428d6e5d 100644
--- a/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/list.special/swap_noexcept.pass.cpp
@@ -60,7 +60,7 @@ int main(int, char**)
         typedef std::list<MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::list<MoveOnly, test_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -69,7 +69,7 @@ int main(int, char**)
         typedef std::list<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::list<MoveOnly, some_alloc<MoveOnly>> C;
 #if TEST_STD_VER >= 14

diff  --git a/libcxx/test/std/containers/sequences/list/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/sequences/list/range_concept_conformance.compile.pass.cpp
index 36797569111b..b3183f10b758 100644
--- a/libcxx/test/std/containers/sequences/list/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // list
 

diff  --git a/libcxx/test/std/containers/sequences/list/types.pass.cpp b/libcxx/test/std/containers/sequences/list/types.pass.cpp
index 0c1ca27745ce..65fb562f4118 100644
--- a/libcxx/test/std/containers/sequences/list/types.pass.cpp
+++ b/libcxx/test/std/containers/sequences/list/types.pass.cpp
@@ -21,8 +21,8 @@
 //     typedef typename allocator_type::pointer pointer;
 //     typedef typename allocator_type::const_pointer const_pointer;
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <list>
 #include <type_traits>

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/assign_move.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/assign_move.pass.cpp
index 10271efc3f40..e72f3f473e41 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/assign_move.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/assign_move.pass.cpp
@@ -31,7 +31,7 @@ TEST_CONSTEXPR_CXX20 bool tests()
         std::vector<bool, test_allocator<bool> > l2(test_allocator<bool>(5));
         l2 = std::move(l);
         assert(l2 == lo);
-        LIBCPP_ASSERT(l.empty());
+        LIBCUDACXX_ASSERT(l.empty());
         assert(l2.get_allocator() == lo.get_allocator());
     }
     {

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/const_reference.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/const_reference.pass.cpp
index c2cb7f0298dd..b8f7babbb9a7 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/const_reference.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/const_reference.pass.cpp
@@ -15,7 +15,7 @@
 
 TEST_CONSTEXPR_CXX20 bool test() {
   using CRefT = std::vector<bool>::const_reference;
-#if !defined(_LIBCPP_VERSION) || defined(_LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL)
+#if !defined(_LIBCUDACXX_VERSION) || defined(_LIBCUDACXX_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL)
   ASSERT_SAME_TYPE(CRefT, bool);
 #else
   ASSERT_SAME_TYPE(CRefT, std::__bit_const_reference<std::vector<bool> >);

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp
index 8f07524d070b..1908bc0e477e 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/construct_default.pass.cpp
@@ -27,17 +27,17 @@ template <class C>
 TEST_CONSTEXPR_CXX20 void test0()
 {
 #if TEST_STD_VER > 14
-    LIBCPP_STATIC_ASSERT((noexcept(C{})), "" );
+    LIBCUDACXX_STATIC_ASSERT((noexcept(C{})), "" );
 #elif TEST_STD_VER >= 11
-    LIBCPP_STATIC_ASSERT((noexcept(C()) == noexcept(typename C::allocator_type())), "" );
+    LIBCUDACXX_STATIC_ASSERT((noexcept(C()) == noexcept(typename C::allocator_type())), "" );
 #endif
     C c;
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == typename C::allocator_type());
 #if TEST_STD_VER >= 11
     C c1 = {};
-    LIBCPP_ASSERT(c1.__invariants());
+    LIBCUDACXX_ASSERT(c1.__invariants());
     assert(c1.empty());
     assert(c1.get_allocator() == typename C::allocator_type());
 #endif
@@ -47,12 +47,12 @@ template <class C>
 TEST_CONSTEXPR_CXX20 void test1(const typename C::allocator_type& a)
 {
 #if TEST_STD_VER > 14
-    LIBCPP_STATIC_ASSERT((noexcept(C{typename C::allocator_type{}})), "" );
+    LIBCUDACXX_STATIC_ASSERT((noexcept(C{typename C::allocator_type{}})), "" );
 #elif TEST_STD_VER >= 11
-    LIBCPP_STATIC_ASSERT((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" );
+    LIBCUDACXX_STATIC_ASSERT((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" );
 #endif
     C c(a);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == a);
 }

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp
index 2f520d5abbf3..0cf54efcfaa9 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter.pass.cpp
@@ -23,7 +23,7 @@ template <class C, class Iterator>
 TEST_CONSTEXPR_CXX20 void test(Iterator first, Iterator last)
 {
     C c(first, last);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.size() == static_cast<std::size_t>(std::distance(first, last)));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i, ++first)
         assert(*i == *first);

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp
index 57e1cb2e0b50..6b59134d0487 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/construct_iter_iter_alloc.pass.cpp
@@ -24,7 +24,7 @@ template <class C, class Iterator>
 TEST_CONSTEXPR_CXX20 void test(Iterator first, Iterator last, const typename C::allocator_type& a)
 {
     C c(first, last, a);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.size() == static_cast<std::size_t>(std::distance(first, last)));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i, ++first)
         assert(*i == *first);

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp
index bcc5a16859d3..4c35fbed6c22 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/construct_size.pass.cpp
@@ -24,7 +24,7 @@ TEST_CONSTEXPR_CXX20 void test2(typename C::size_type n,
 {
 #if TEST_STD_VER >= 14
     C c(n, a);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.size() == n);
     assert(c.get_allocator() == a);
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
@@ -39,7 +39,7 @@ template <class C>
 TEST_CONSTEXPR_CXX20 void test1(typename C::size_type n)
 {
     C c(n);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.size() == n);
     assert(c.get_allocator() == typename C::allocator_type());
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp
index 629e8ba57ca8..34d7a89200f7 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value.pass.cpp
@@ -21,7 +21,7 @@ template <class C>
 TEST_CONSTEXPR_CXX20 void test(typename C::size_type n, const typename C::value_type& x)
 {
     C c(n, x);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.size() == n);
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == x);

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp
index 94a44ad282b7..696ce4095635 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/construct_size_value_alloc.pass.cpp
@@ -23,7 +23,7 @@ TEST_CONSTEXPR_CXX20 void test(typename C::size_type n,
                                     const typename C::allocator_type& a)
 {
     C c(n, x, a);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(a == c.get_allocator());
     assert(c.size() == n);
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp
index bfd37e956dbd..feeeb2455628 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/copy.pass.cpp
@@ -23,7 +23,7 @@ TEST_CONSTEXPR_CXX20 void test(const C& x)
 {
     typename C::size_type s = x.size();
     C c(x);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
 }

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp
index 468bf5d86600..92596f89fd91 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/copy_alloc.pass.cpp
@@ -22,7 +22,7 @@ TEST_CONSTEXPR_CXX20 void test(const C& x, const typename C::allocator_type& a)
 {
     typename C::size_type s = x.size();
     C c(x, a);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
 }

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp
index a43b6483b053..e4e243b2d041 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/default_noexcept.pass.cpp
@@ -32,7 +32,7 @@ struct some_alloc
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::vector<bool> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -49,7 +49,7 @@ int main(int, char**)
         typedef std::vector<bool, some_alloc<bool>> C;
         static_assert(!std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp
index 569a95f8bc9f..94883734d80f 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/dtor_noexcept.pass.cpp
@@ -40,12 +40,12 @@ int main(int, char**)
         typedef std::vector<bool, other_allocator<bool>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::vector<bool, some_alloc<bool>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/iterators.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/iterators.pass.cpp
index 9aaaac7a5557..eb8b0fb3ceeb 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/iterators.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/iterators.pass.cpp
@@ -28,7 +28,7 @@ TEST_CONSTEXPR_CXX20 bool tests()
     ASSERT_SAME_TYPE(IterRefT, std::vector<bool>::reference);
 
     using ConstIterRefT = std::iterator_traits<std::vector<bool>::const_iterator>::reference;
-#if !defined(_LIBCPP_VERSION) || defined(_LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL)
+#if !defined(_LIBCUDACXX_VERSION) || defined(_LIBCUDACXX_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL)
     ASSERT_SAME_TYPE(ConstIterRefT, bool);
 #else
     ASSERT_SAME_TYPE(ConstIterRefT, std::__bit_const_reference<std::vector<bool> >);

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
index c40d1e557267..3b4503a8867e 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/move_assign_noexcept.pass.cpp
@@ -58,40 +58,40 @@ struct some_alloc3
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::vector<bool> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::vector<bool, test_allocator<bool>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::vector<bool, other_allocator<bool>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
 #if TEST_STD_VER > 14
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
         typedef std::vector<bool, some_alloc<bool>> C;
         static_assert( std::is_nothrow_move_assignable<C>::value, "");
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #else
         typedef std::vector<bool, some_alloc<bool>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
 #endif
     }
 #if TEST_STD_VER > 14
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {  // POCMA false, is_always_equal true
         typedef std::vector<bool, some_alloc2<bool>> C;
         static_assert( std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {  // POCMA false, is_always_equal false
         typedef std::vector<bool, some_alloc3<bool>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
index ccd8185d3f3d..206a86f645db 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/move_noexcept.pass.cpp
@@ -30,7 +30,7 @@ struct some_alloc
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::vector<bool> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
@@ -43,14 +43,14 @@ int main(int, char**)
         typedef std::vector<bool, other_allocator<bool>> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
     //  In C++17, move constructors for allocators are not allowed to throw
 #if TEST_STD_VER > 14
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
         typedef std::vector<bool, some_alloc<bool>> C;
         static_assert( std::is_nothrow_move_constructible<C>::value, "");
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #else
         typedef std::vector<bool, some_alloc<bool>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/range_concept_conformance.compile.pass.cpp
index 77d3f2a7ca75..0712fa1505d5 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // vector
 

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/reference/triviality.compile.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/reference/triviality.compile.pass.cpp
index 7e403ff81718..56f62d24d6a2 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/reference/triviality.compile.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/reference/triviality.compile.pass.cpp
@@ -13,9 +13,9 @@
 
 using Ref = std::vector<bool>::reference;
 
-LIBCPP_STATIC_ASSERT(!std::is_trivially_constructible<Ref>::value, "");
-LIBCPP_STATIC_ASSERT(std::is_trivially_copy_constructible<Ref>::value, "");
-LIBCPP_STATIC_ASSERT(std::is_trivially_move_constructible<Ref>::value, "");
-LIBCPP_STATIC_ASSERT(!std::is_trivially_copy_assignable<Ref>::value, "");
-LIBCPP_STATIC_ASSERT(!std::is_trivially_move_assignable<Ref>::value, "");
-LIBCPP_STATIC_ASSERT(std::is_trivially_destructible<Ref>::value, "");
+LIBCUDACXX_STATIC_ASSERT(!std::is_trivially_constructible<Ref>::value, "");
+LIBCUDACXX_STATIC_ASSERT(std::is_trivially_copy_constructible<Ref>::value, "");
+LIBCUDACXX_STATIC_ASSERT(std::is_trivially_move_constructible<Ref>::value, "");
+LIBCUDACXX_STATIC_ASSERT(!std::is_trivially_copy_assignable<Ref>::value, "");
+LIBCUDACXX_STATIC_ASSERT(!std::is_trivially_move_assignable<Ref>::value, "");
+LIBCUDACXX_STATIC_ASSERT(std::is_trivially_destructible<Ref>::value, "");

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
index 40f7ae05be9b..597e26bad629 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/swap_noexcept.pass.cpp
@@ -54,7 +54,7 @@ struct some_alloc2
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::vector<bool> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -67,27 +67,27 @@ int main(int, char**)
         typedef std::vector<bool, other_allocator<bool>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
 #if TEST_STD_VER >= 14
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     //  In C++14, if POCS is set, swapping the allocator is required not to throw
         typedef std::vector<bool, some_alloc<bool>> C;
         static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #else
         typedef std::vector<bool, some_alloc<bool>> C;
         static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
 #endif
     }
 #if TEST_STD_VER >= 14
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::vector<bool, some_alloc2<bool>> C;
     //  if the allocators are always equal, then the swap can be noexcept
         static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/containers/sequences/vector.bool/types.pass.cpp b/libcxx/test/std/containers/sequences/vector.bool/types.pass.cpp
index d75d71514735..69915105f489 100644
--- a/libcxx/test/std/containers/sequences/vector.bool/types.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector.bool/types.pass.cpp
@@ -67,7 +67,7 @@ test()
     static_assert((std::is_same<
         typename C::const_reverse_iterator,
         std::reverse_iterator<typename C::const_iterator> >::value), "");
-#if !defined(_LIBCPP_VERSION) || defined(_LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL)
+#if !defined(_LIBCUDACXX_VERSION) || defined(_LIBCUDACXX_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL)
     static_assert(std::is_same<typename C::const_reference, bool>::value, "");
 #endif
 }

diff  --git a/libcxx/test/std/containers/sequences/vector/constant_initialization.pass.cpp b/libcxx/test/std/containers/sequences/vector/constant_initialization.pass.cpp
index 7a23a2d478a2..b51dcce25d16 100644
--- a/libcxx/test/std/containers/sequences/vector/constant_initialization.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/constant_initialization.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03
-// XFAIL: libcpp-has-debug-mode
+// XFAIL: LIBCUDACXX-has-debug-mode
 
 #include <algorithm>
 #include <vector>

diff  --git a/libcxx/test/std/containers/sequences/vector/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/sequences/vector/range_concept_conformance.compile.pass.cpp
index af7630cb5e77..d3078da811e6 100644
--- a/libcxx/test/std/containers/sequences/vector/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // vector
 

diff  --git a/libcxx/test/std/containers/sequences/vector/types.pass.cpp b/libcxx/test/std/containers/sequences/vector/types.pass.cpp
index 4bcfbe7c3ea4..3375c7b9e362 100644
--- a/libcxx/test/std/containers/sequences/vector/types.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/types.pass.cpp
@@ -28,8 +28,8 @@
 //     typedef std::reverse_iterator<const_iterator>    const_reverse_iterator;
 // };
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <vector>
 #include <iterator>

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp
index 3f8d62e2f2d6..45c5440b5518 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/max_size.pass.cpp
@@ -25,7 +25,7 @@ TEST_CONSTEXPR_CXX20 bool test() {
     typedef std::vector<int, A> C;
     C c;
     assert(c.max_size() <= 10);
-    LIBCPP_ASSERT(c.max_size() == 10);
+    LIBCUDACXX_ASSERT(c.max_size() == 10);
   }
   {
     typedef limited_allocator<int, (size_t)-1> A;
@@ -34,7 +34,7 @@ TEST_CONSTEXPR_CXX20 bool test() {
         static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
     C c;
     assert(c.max_size() <= max_dist);
-    LIBCPP_ASSERT(c.max_size() == max_dist);
+    LIBCUDACXX_ASSERT(c.max_size() == max_dist);
   }
   {
     typedef std::vector<char> C;

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
index 3f2487948430..172ada6ba6fb 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.capacity/shrink_to_fit.pass.cpp
@@ -42,7 +42,7 @@ TEST_CONSTEXPR_CXX20 bool tests() {
         v.push_back(1);
         assert(is_contiguous_container_asan_correct(v));
         v.shrink_to_fit();
-        LIBCPP_ASSERT(v.capacity() == 200); // assumes libc++'s 2x growth factor
+        LIBCUDACXX_ASSERT(v.capacity() == 200); // assumes libc++'s 2x growth factor
         assert(v.size() == 101);
         assert(is_contiguous_container_asan_correct(v));
     }

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp
index 9a135b64a336..5a71c307272e 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_default.pass.cpp
@@ -30,16 +30,16 @@ TEST_CONSTEXPR_CXX20 void test0()
     static_assert((noexcept(C()) == noexcept(typename C::allocator_type())), "" );
 #endif
     C c;
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == typename C::allocator_type());
-    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+    LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
 #if TEST_STD_VER >= 11
     C c1 = {};
-    LIBCPP_ASSERT(c1.__invariants());
+    LIBCUDACXX_ASSERT(c1.__invariants());
     assert(c1.empty());
     assert(c1.get_allocator() == typename C::allocator_type());
-    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c1));
+    LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c1));
 #endif
 }
 
@@ -52,10 +52,10 @@ TEST_CONSTEXPR_CXX20 void test1(const typename C::allocator_type& a)
     static_assert((noexcept(C(typename C::allocator_type())) == std::is_nothrow_copy_constructible<typename C::allocator_type>::value), "" );
 #endif
     C c(a);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.empty());
     assert(c.get_allocator() == a);
-    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+    LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
 }
 
 TEST_CONSTEXPR_CXX20 bool tests() {

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
index 0f2fb36aaa67..ae63dfe72973 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter.pass.cpp
@@ -28,9 +28,9 @@ template <class C, class Iterator>
 TEST_CONSTEXPR_CXX20 void test(Iterator first, Iterator last) {
   {
     C c(first, last);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.size() == static_cast<std::size_t>(std::distance(first, last)));
-    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+    LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e;
       ++i, ++first)
     assert(*i == *first);
@@ -38,9 +38,9 @@ TEST_CONSTEXPR_CXX20 void test(Iterator first, Iterator last) {
   // Test with an empty range
   {
     C c(first, first);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.empty());
-    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+    LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
   }
 }
 

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
index 5d38543963e5..222428de263a 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_iter_iter_alloc.pass.cpp
@@ -28,9 +28,9 @@
 template <class C, class Iterator, class A>
 TEST_CONSTEXPR_CXX20 void test(Iterator first, Iterator last, const A& a) {
   C c(first, last, a);
-  LIBCPP_ASSERT(c.__invariants());
+  LIBCUDACXX_ASSERT(c.__invariants());
   assert(c.size() == static_cast<std::size_t>(std::distance(first, last)));
-  LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+  LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
   for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e;
        ++i, ++first)
     assert(*i == *first);

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp
index e4b1f431ae49..43e5a387e267 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size.pass.cpp
@@ -29,10 +29,10 @@ void test(typename C::size_type n,
     // Test without a custom allocator
     {
         C c(n);
-        LIBCPP_ASSERT(c.__invariants());
+        LIBCUDACXX_ASSERT(c.__invariants());
         assert(c.size() == n);
         assert(c.get_allocator() == typename C::allocator_type());
-        LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+        LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
 #if TEST_STD_VER >= 11
         for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
             assert(*i == typename C::value_type());
@@ -43,10 +43,10 @@ void test(typename C::size_type n,
 #if TEST_STD_VER >= 14
     {
         C c(n, a);
-        LIBCPP_ASSERT(c.__invariants());
+        LIBCUDACXX_ASSERT(c.__invariants());
         assert(c.size() == n);
         assert(c.get_allocator() == a);
-        LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+        LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
         for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
             assert(*i == typename C::value_type());
     }

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
index 7f7777c2c97d..2f6788802369 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value.pass.cpp
@@ -23,9 +23,9 @@ TEST_CONSTEXPR_CXX20 void
 test(typename C::size_type n, const typename C::value_type& x)
 {
     C c(n, x);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.size() == n);
-    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+    LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == x);
 }

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
index 17d3a5876bc5..74a02fb54398 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.cons/construct_size_value_alloc.pass.cpp
@@ -23,10 +23,10 @@ test(typename C::size_type n, const typename C::value_type& x,
      const typename C::allocator_type& a)
 {
     C c(n, x, a);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(a == c.get_allocator());
     assert(c.size() == n);
-    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+    LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
     for (typename C::const_iterator i = c.cbegin(), e = c.cend(); i != e; ++i)
         assert(*i == x);
 }

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp
index 88822e9c1835..8e2a80da28d5 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.cons/copy.pass.cpp
@@ -24,10 +24,10 @@ test(const C& x)
 {
     typename C::size_type s = x.size();
     C c(x);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
-    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+    LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
 }
 
 TEST_CONSTEXPR_CXX20 bool tests() {

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
index 70434bcfc578..84421c760579 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.cons/copy_alloc.pass.cpp
@@ -24,10 +24,10 @@ test(const C& x, const typename C::allocator_type& a)
 {
     typename C::size_type s = x.size();
     C c(x, a);
-    LIBCPP_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(c.__invariants());
     assert(c.size() == s);
     assert(c == x);
-    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+    LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
 }
 
 TEST_CONSTEXPR_CXX20 bool tests() {

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp
index 793475955506..4463769d2681 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.cons/dtor_noexcept.pass.cpp
@@ -42,12 +42,12 @@ TEST_CONSTEXPR_CXX20 bool tests()
         typedef std::vector<MoveOnly, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::vector<MoveOnly, some_alloc<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
     return true;
 }

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp
index 5a1e134f66fd..38cac591952e 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.modifiers/clear.pass.cpp
@@ -25,8 +25,8 @@ TEST_CONSTEXPR_CXX20 bool tests()
     ASSERT_NOEXCEPT(c.clear());
     c.clear();
     assert(c.empty());
-    LIBCPP_ASSERT(c.__invariants());
-    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+    LIBCUDACXX_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
     }
 #if TEST_STD_VER >= 11
     {
@@ -35,8 +35,8 @@ TEST_CONSTEXPR_CXX20 bool tests()
     ASSERT_NOEXCEPT(c.clear());
     c.clear();
     assert(c.empty());
-    LIBCPP_ASSERT(c.__invariants());
-    LIBCPP_ASSERT(is_contiguous_container_asan_correct(c));
+    LIBCUDACXX_ASSERT(c.__invariants());
+    LIBCUDACXX_ASSERT(is_contiguous_container_asan_correct(c));
     }
 #endif
 

diff  --git a/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.compile.pass.cpp b/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.compile.pass.cpp
index 830d05c7012d..18be67574e4c 100644
--- a/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.compile.pass.cpp
+++ b/libcxx/test/std/containers/sequences/vector/vector.special/swap_noexcept.compile.pass.cpp
@@ -61,7 +61,7 @@ void test()
         typedef std::vector<MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::vector<MoveOnly, test_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");

diff  --git a/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp
index 0f2e7216b61e..0b9f024c7f95 100644
--- a/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/bucket.pass.cpp
@@ -40,7 +40,7 @@ int main(int, char**)
         size_t bc = c.bucket_count();
         assert(bc >= 5);
         for (size_t i = 0; i < 13; ++i)
-            LIBCPP_ASSERT(c.bucket(i) == i % bc);
+            LIBCUDACXX_ASSERT(c.bucket(i) == i % bc);
     }
 #if TEST_STD_VER >= 11
     {
@@ -60,7 +60,7 @@ int main(int, char**)
         size_t bc = c.bucket_count();
         assert(bc >= 5);
         for (size_t i = 0; i < 13; ++i)
-            LIBCPP_ASSERT(c.bucket(i) == i % bc);
+            LIBCUDACXX_ASSERT(c.bucket(i) == i % bc);
     }
 #endif
 

diff  --git a/libcxx/test/std/containers/unord/unord.map/bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.map/bucket_count.pass.cpp
index 6283408cef6f..2de395cad63f 100644
--- a/libcxx/test/std/containers/unord/unord.map/bucket_count.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/bucket_count.pass.cpp
@@ -27,7 +27,7 @@ int main(int, char**)
     {
         typedef std::unordered_map<int, std::string> C;
         const C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
     }
     {
         typedef std::unordered_map<int, std::string> C;
@@ -51,7 +51,7 @@ int main(int, char**)
         typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,
                             min_allocator<std::pair<const int, std::string>>> C;
         const C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
     }
     {
         typedef std::unordered_map<int, std::string, std::hash<int>, std::equal_to<int>,

diff  --git a/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp
index 110ac5e45eec..9c35d3d42195 100644
--- a/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/bucket_size.pass.cpp
@@ -38,11 +38,11 @@ int main(int, char**)
         };
         const C c(std::begin(a), std::end(a));
         assert(c.bucket_count() >= 5);
-        LIBCPP_ASSERT(c.bucket_size(0) == 0);
-        LIBCPP_ASSERT(c.bucket_size(1) == 1);
-        LIBCPP_ASSERT(c.bucket_size(2) == 1);
-        LIBCPP_ASSERT(c.bucket_size(3) == 1);
-        LIBCPP_ASSERT(c.bucket_size(4) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(0) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(1) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(2) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(3) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(4) == 1);
     }
 #if TEST_STD_VER >= 11
     {
@@ -60,11 +60,11 @@ int main(int, char**)
         };
         const C c(std::begin(a), std::end(a));
         assert(c.bucket_count() >= 5);
-        LIBCPP_ASSERT(c.bucket_size(0) == 0);
-        LIBCPP_ASSERT(c.bucket_size(1) == 1);
-        LIBCPP_ASSERT(c.bucket_size(2) == 1);
-        LIBCPP_ASSERT(c.bucket_size(3) == 1);
-        LIBCPP_ASSERT(c.bucket_size(4) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(0) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(1) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(2) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(3) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(4) == 1);
     }
 #endif
 

diff  --git a/libcxx/test/std/containers/unord/unord.map/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.map/iterator_concept_conformance.compile.pass.cpp
index ff4b487e4aca..9b1ccac0c963 100644
--- a/libcxx/test/std/containers/unord/unord.map/iterator_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/iterator_concept_conformance.compile.pass.cpp
@@ -23,7 +23,7 @@ using const_local_iterator = std::unordered_map<int, int>::const_local_iterator;
 using value_type = std::pair<const int, int>;
 
 static_assert(std::forward_iterator<iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
 static_assert(!std::indirectly_writable<iterator, value_type>);
 static_assert(std::sentinel_for<iterator, iterator>);
 static_assert(std::sentinel_for<iterator, const_iterator>);
@@ -36,7 +36,7 @@ static_assert(!std::indirectly_copyable_storable<iterator, std::pair<int, int>*>
 static_assert(!std::indirectly_swappable<iterator, iterator>);
 
 static_assert(std::forward_iterator<const_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
 static_assert(!std::indirectly_writable<const_iterator, value_type>);
 static_assert(std::sentinel_for<const_iterator, iterator>);
 static_assert(std::sentinel_for<const_iterator, const_iterator>);
@@ -49,7 +49,7 @@ static_assert(!std::indirectly_copyable_storable<const_iterator, std::pair<int,
 static_assert(!std::indirectly_swappable<const_iterator, const_iterator>);
 
 static_assert(std::forward_iterator<local_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
 static_assert(!std::indirectly_writable<local_iterator, value_type>);
 static_assert(std::sentinel_for<local_iterator, local_iterator>);
 static_assert(std::sentinel_for<local_iterator, const_local_iterator>);
@@ -62,7 +62,7 @@ static_assert(!std::indirectly_copyable_storable<local_iterator, std::pair<int,
 static_assert(!std::indirectly_swappable<local_iterator, local_iterator>);
 
 static_assert(std::forward_iterator<const_local_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
 static_assert(!std::indirectly_writable<const_local_iterator, value_type>);
 static_assert(std::sentinel_for<const_local_iterator, local_iterator>);
 static_assert(std::sentinel_for<const_local_iterator, const_local_iterator>);

diff  --git a/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp
index 7c2ec58de57f..d5bac1b558d6 100644
--- a/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/max_size.pass.cpp
@@ -29,7 +29,7 @@ int main(int, char**)
         C;
     C c;
     assert(c.max_size() <= 10);
-    LIBCPP_ASSERT(c.max_size() == 10);
+    LIBCUDACXX_ASSERT(c.max_size() == 10);
   }
   {
     typedef limited_allocator<KV, (size_t)-1> A;
@@ -39,7 +39,7 @@ int main(int, char**)
         static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
     C c;
     assert(c.max_size() <= max_dist);
-    LIBCPP_ASSERT(c.max_size() == max_dist);
+    LIBCUDACXX_ASSERT(c.max_size() == max_dist);
     }
     {
       typedef std::unordered_map<char, int> C;

diff  --git a/libcxx/test/std/containers/unord/unord.map/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.map/range_concept_conformance.compile.pass.cpp
index 1d5c530a0d7f..8d98bb1198f4 100644
--- a/libcxx/test/std/containers/unord/unord.map/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // unordered_map
 
@@ -24,7 +24,7 @@ using range = std::unordered_map<int, int>;
 static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
 static_assert(std::ranges::common_range<range>);
 static_assert(std::ranges::forward_range<range>);
-LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
 static_assert(!std::ranges::view<range>);
 static_assert(std::ranges::sized_range<range>);
 static_assert(!std::ranges::borrowed_range<range>);
@@ -33,7 +33,7 @@ static_assert(std::ranges::viewable_range<range>);
 static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
 static_assert(std::ranges::common_range<range const>);
 static_assert(std::ranges::forward_range<range const>);
-LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
 static_assert(!std::ranges::view<range const>);
 static_assert(std::ranges::sized_range<range const>);
 static_assert(!std::ranges::borrowed_range<range const>);

diff  --git a/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp
index c8f079fb6178..23927d715139 100644
--- a/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/rehash.pass.cpp
@@ -56,16 +56,16 @@ int main(int, char**)
         assert(c.bucket_count() >= 5);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 5);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 5);
         test(c);
         c.max_load_factor(2);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.rehash(31);
         rehash_postcondition(c, 31);
-        LIBCPP_ASSERT(c.bucket_count() == 31);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 31);
         test(c);
     }
 #if TEST_STD_VER >= 11
@@ -87,16 +87,16 @@ int main(int, char**)
         assert(c.bucket_count() >= 5);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 5);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 5);
         test(c);
         c.max_load_factor(2);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.rehash(31);
         rehash_postcondition(c, 31);
-        LIBCPP_ASSERT(c.bucket_count() == 31);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 31);
         test(c);
     }
 #endif

diff  --git a/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp
index 622a9691e457..2d49abba08bd 100644
--- a/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/reserve.pass.cpp
@@ -64,7 +64,7 @@ int main(int, char**)
         test(c);
         assert(c.bucket_count() >= 5);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 5);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 5);
         test(c);
         c.max_load_factor(2);
         c.reserve(3);
@@ -92,7 +92,7 @@ int main(int, char**)
         test(c);
         assert(c.bucket_count() >= 5);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 5);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 5);
         test(c);
         c.max_load_factor(2);
         c.reserve(3);

diff  --git a/libcxx/test/std/containers/unord/unord.map/swap_member.pass.cpp b/libcxx/test/std/containers/unord/unord.map/swap_member.pass.cpp
index 955aa31a88ae..4f4476df2236 100644
--- a/libcxx/test/std/containers/unord/unord.map/swap_member.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/swap_member.pass.cpp
@@ -38,7 +38,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -47,7 +47,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -95,7 +95,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -124,7 +124,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -218,7 +218,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -227,7 +227,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -275,7 +275,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -304,7 +304,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -398,7 +398,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -407,7 +407,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -455,7 +455,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -484,7 +484,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/allocator.pass.cpp
index af97adf739eb..9e7d0aa81b5a 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/allocator.pass.cpp
@@ -34,7 +34,7 @@ int main(int, char**)
                                                                   NotConstructible> >
                                    > C;
         C c(test_allocator<std::pair<const NotConstructible, NotConstructible> >(10));
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -54,7 +54,7 @@ int main(int, char**)
                                                                  NotConstructible> >
                                    > C;
         C c(min_allocator<std::pair<const NotConstructible, NotConstructible> >{});
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -73,7 +73,7 @@ int main(int, char**)
                                    A
                                    > C;
         C c(A{});
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == A{});
@@ -93,7 +93,7 @@ int main(int, char**)
 
         A a(10);
         C c(2, a);
-        LIBCPP_ASSERT(c.bucket_count() == 2);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 2);
         assert(c.hash_function() == HF());
         assert(c.key_eq() == Comp());
         assert(c.get_allocator() == a);
@@ -113,7 +113,7 @@ int main(int, char**)
         A a(10);
         HF hf(12);
         C c(2, hf, a);
-        LIBCPP_ASSERT(c.bucket_count() == 2);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 2);
         assert(c.hash_function() == hf);
         assert(!(c.hash_function() == HF()));
         assert(c.key_eq() == Comp());

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_copy.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_copy.pass.cpp
index d0b290d54ca2..1b9add761cad 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_copy.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_copy.pass.cpp
@@ -60,7 +60,7 @@ int main(int, char**)
             A(4)
            );
         c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -169,7 +169,7 @@ int main(int, char**)
             A()
            );
         c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp
index dc859e8fd067..ba952f8b1d68 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/assign_move.pass.cpp
@@ -61,7 +61,7 @@ int main(int, char**)
             A(4)
            );
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -107,7 +107,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -155,7 +155,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -203,7 +203,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp
index 6dad15ef23de..79400862dbbe 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy.pass.cpp
@@ -52,7 +52,7 @@ int main(int, char**)
             test_allocator<std::pair<const int, std::string> >(10)
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -92,7 +92,7 @@ int main(int, char**)
             other_allocator<std::pair<const int, std::string> >(10)
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -131,7 +131,7 @@ int main(int, char**)
             min_allocator<std::pair<const int, std::string> >()
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy_alloc.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy_alloc.pass.cpp
index 1d9cf9f5932e..373eff115d6b 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy_alloc.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/copy_alloc.pass.cpp
@@ -52,7 +52,7 @@ int main(int, char**)
             test_allocator<std::pair<const int, std::string> >(10)
            );
         C c(c0, test_allocator<std::pair<const int, std::string> >(5));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -92,7 +92,7 @@ int main(int, char**)
             min_allocator<std::pair<const int, std::string> >()
            );
         C c(c0, min_allocator<std::pair<const int, std::string> >());
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -132,7 +132,7 @@ int main(int, char**)
             A{}
            );
         C c(c0, A{});
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/default.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/default.pass.cpp
index a4bdb52be307..011147284cca 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/default.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/default.pass.cpp
@@ -34,7 +34,7 @@ int main(int, char**)
                                                                   NotConstructible> >
                                    > C;
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -54,7 +54,7 @@ int main(int, char**)
                                                                   NotConstructible> >
                                    > C;
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -74,7 +74,7 @@ int main(int, char**)
                                    > C;
         {
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == A());
@@ -87,7 +87,7 @@ int main(int, char**)
         {
         A a;
         C c(a);
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == a);
@@ -100,7 +100,7 @@ int main(int, char**)
     }
     {
         std::unordered_map<int, int> c = {};
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.size() == 0);
         assert(c.empty());
         assert(std::distance(c.begin(), c.end()) == 0);

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/default_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/default_noexcept.pass.cpp
index 2fff7fdbac6e..611cf3ee968a 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/default_noexcept.pass.cpp
@@ -47,7 +47,7 @@ struct some_hash
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_map<MoveOnly, MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -57,7 +57,7 @@ int main(int, char**)
                            std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp
index 0775b2842a73..4b366582fc23 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/dtor_noexcept.pass.cpp
@@ -54,7 +54,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
@@ -64,7 +64,7 @@ int main(int, char**)
                                                          some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp
index dc26c81c369c..fbb2c0faa6cb 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size.pass.cpp
@@ -48,7 +48,7 @@ int main(int, char**)
             },
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -81,7 +81,7 @@ int main(int, char**)
             },
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_allocator.pass.cpp
index 7e25ba298d21..5a610954e8b5 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_allocator.pass.cpp
@@ -49,7 +49,7 @@ void test(const Allocator& alloc) {
          },
          7,
          alloc);
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 4);
     assert(c.at(1) == "one");
     assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp
index 319af0e0e39b..66a8447cdc4a 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash.pass.cpp
@@ -49,7 +49,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -83,7 +83,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_allocator.pass.cpp
index 70a631dbaef8..c28c3f6468c6 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_allocator.pass.cpp
@@ -51,7 +51,7 @@ void test(const Allocator& alloc) {
          7,
          test_hash<int>(5),
          alloc);
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 4);
     assert(c.at(1) == "one");
     assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp
index 20098ba04e0a..110a0b0dda3a 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal.pass.cpp
@@ -51,7 +51,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -86,7 +86,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp
index f235ae0cd55b..3637a69572fb 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/init_size_hash_equal_allocator.pass.cpp
@@ -52,7 +52,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             test_allocator<std::pair<const int, std::string> >(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -88,7 +88,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             min_allocator<std::pair<const int, std::string> >()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -125,7 +125,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             A{}
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size.pass.cpp
index f06feda28078..68da3207e8c4 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size.pass.cpp
@@ -51,7 +51,7 @@ int main(int, char**)
         C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
             10
            );
-        LIBCPP_ASSERT(c.bucket_count() == 11);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 11);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -87,7 +87,7 @@ int main(int, char**)
         C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
             10
            );
-        LIBCPP_ASSERT(c.bucket_count() == 11);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 11);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_allocator.pass.cpp
index 11ca33816e67..4e8e515c40d2 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_allocator.pass.cpp
@@ -55,7 +55,7 @@ void test(const Allocator& alloc)
         7,
         alloc);
 
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 4);
     assert(c.at(1) == "one");
     assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash.pass.cpp
index 75ae4cd12124..4751d362b5c0 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash.pass.cpp
@@ -53,7 +53,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -90,7 +90,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_allocator.pass.cpp
index 3a18bdf0dda7..47948b7ac80b 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_allocator.pass.cpp
@@ -57,7 +57,7 @@ void test(const Allocator& alloc)
         test_hash<int>(5),
         alloc);
 
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 4);
     assert(c.at(1) == "one");
     assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_equal.pass.cpp
index 25cfaae1a889..b80159b8e2e4 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_equal.pass.cpp
@@ -54,7 +54,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -92,7 +92,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
index 8abdd0dab566..15ed07e43711 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
@@ -56,7 +56,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             test_allocator<std::pair<const int, std::string> >(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -95,7 +95,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             min_allocator<std::pair<const int, std::string> >()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -134,7 +134,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             A{}
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp
index 336cdfb8d215..4bbaf2c68e8e 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move.pass.cpp
@@ -44,7 +44,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         C c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 0);
         assert(c.hash_function() == test_hash<int>(8));
         assert(c.key_eq() == test_equal_to<int>(9));
@@ -83,7 +83,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         C c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -115,7 +115,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         C c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 0);
         assert(c.hash_function() == test_hash<int>(8));
         assert(c.key_eq() == test_equal_to<int>(9));
@@ -154,7 +154,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         C c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp
index 89f2716f9cd2..2fdc9b2f52d5 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_alloc.pass.cpp
@@ -96,7 +96,7 @@ int main(int, char**)
             A(10)
            );
         C c(std::move(c0), A(10));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -137,7 +137,7 @@ int main(int, char**)
             A()
            );
         C c(std::move(c0), A());
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");
@@ -178,7 +178,7 @@ int main(int, char**)
             A{}
            );
         C c(std::move(c0), A{});
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.at(1) == "one");
         assert(c.at(2) == "two");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp
index 9d5053721671..f8d08dd7daa6 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_assign_noexcept.pass.cpp
@@ -55,13 +55,13 @@ int main(int, char**)
                            std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp
index 8458627e7548..c07ede72526e 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/move_noexcept.pass.cpp
@@ -43,7 +43,7 @@ struct some_hash
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_map<MoveOnly, MoveOnly> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
@@ -58,7 +58,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size.compile.fail.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size.compile.fail.cpp
index 371987d6e2d2..88114e639cbb 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size.compile.fail.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size.compile.fail.cpp
@@ -34,7 +34,7 @@ int main(int, char**)
                                                                   NotConstructible> >
                                    > C;
         C c = 7;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -54,7 +54,7 @@ int main(int, char**)
                                                                  NotConstructible> >
                                    > C;
         C c = 7;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size.pass.cpp
index 7328b954021a..cb68ac527f22 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size.pass.cpp
@@ -34,7 +34,7 @@ int main(int, char**)
                                                                   NotConstructible> >
                                    > C;
         C c(7);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -54,7 +54,7 @@ int main(int, char**)
                                                                  NotConstructible> >
                                    > C;
         C c(7);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_allocator.pass.cpp
index fcc896014fa5..b5750f1aabbc 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_allocator.pass.cpp
@@ -36,7 +36,7 @@ void test(const Allocator& alloc) {
                                > C;
 
     C c(7, alloc);
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.hash_function() == test_hash<NotConstructible>());
     assert(c.key_eq() == test_equal_to<NotConstructible>());
     assert(c.get_allocator() == alloc);

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash.pass.cpp
index ee0cf5dc4ebe..8d99b6874b65 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash.pass.cpp
@@ -36,7 +36,7 @@ int main(int, char**)
         C c(7,
             test_hash<NotConstructible>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -58,7 +58,7 @@ int main(int, char**)
         C c(7,
             test_hash<NotConstructible>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_allocator.pass.cpp
index 219d1466c55e..334099eb7376 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_allocator.pass.cpp
@@ -36,7 +36,7 @@ void test(const Allocator& alloc) {
                                > C;
 
     C c(7, test_hash<NotConstructible>(8), alloc);
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.hash_function() == test_hash<NotConstructible>(8));
     assert(c.key_eq() == test_equal_to<NotConstructible>());
     assert(c.get_allocator() == alloc);

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal.pass.cpp
index 1c81b0e4af2c..9279fdc896c9 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal.pass.cpp
@@ -37,7 +37,7 @@ int main(int, char**)
             test_hash<NotConstructible>(8),
             test_equal_to<NotConstructible>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() ==
@@ -60,7 +60,7 @@ int main(int, char**)
             test_hash<NotConstructible>(8),
             test_equal_to<NotConstructible>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() ==

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal_allocator.pass.cpp
index 3a329c9962ce..c791c88dc541 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.cnstr/size_hash_equal_allocator.pass.cpp
@@ -38,7 +38,7 @@ int main(int, char**)
             test_equal_to<NotConstructible>(9),
             test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() ==
@@ -62,7 +62,7 @@ int main(int, char**)
             test_equal_to<NotConstructible>(9),
             min_allocator<std::pair<const NotConstructible, NotConstructible> >()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() ==
@@ -85,7 +85,7 @@ int main(int, char**)
             test_equal_to<NotConstructible>(9),
             A{}
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() == A{});

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp
index 44f8cf57703a..dcdac346cc79 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_noexcept.pass.cpp
@@ -126,7 +126,7 @@ int main(int, char**)
         typedef std::unordered_map<MoveOnly, MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_map<MoveOnly, MoveOnly, std::hash<MoveOnly>,
                            std::equal_to<MoveOnly>, test_allocator<MapType>> C;
@@ -137,7 +137,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<MapType>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_map<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -181,12 +181,12 @@ int main(int, char**)
     typedef std::unordered_map<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<MapType>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     { // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
     typedef std::unordered_map<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<MapType>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
index 2b83a7462b75..21736e7b995e 100644
--- a/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.map/unord.map.swap/swap_non_member.pass.cpp
@@ -37,7 +37,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -46,7 +46,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -96,7 +96,7 @@ int main(int, char**)
         assert(c1.max_load_factor() == 2);
         assert(it2 == c1.begin()); // Iterators are not invalidated
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -126,7 +126,7 @@ int main(int, char**)
         C::iterator it1 = c1.begin();
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -225,7 +225,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -234,7 +234,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -282,7 +282,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -311,7 +311,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -405,7 +405,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -414,7 +414,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -462,7 +462,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -491,7 +491,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp
index 80c97ddc99ce..4bbc09bbd97a 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/bucket.pass.cpp
@@ -40,7 +40,7 @@ int main(int, char**)
         size_t bc = c.bucket_count();
         assert(bc >= 7);
         for (size_t i = 0; i < 13; ++i)
-            LIBCPP_ASSERT(c.bucket(i) == i % bc);
+            LIBCUDACXX_ASSERT(c.bucket(i) == i % bc);
     }
 #if TEST_STD_VER >= 11
     {
@@ -60,7 +60,7 @@ int main(int, char**)
         size_t bc = c.bucket_count();
         assert(bc >= 7);
         for (size_t i = 0; i < 13; ++i)
-            LIBCPP_ASSERT(c.bucket(i) == i % bc);
+            LIBCUDACXX_ASSERT(c.bucket(i) == i % bc);
     }
 #endif
 

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp
index 3515dbc93ca4..60c4db8b2543 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/bucket_count.pass.cpp
@@ -26,7 +26,7 @@ int main(int, char**)
     {
         typedef std::unordered_multimap<int, std::string> C;
         const C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
     }
     {
         typedef std::unordered_multimap<int, std::string> C;

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp
index 1659fef9d462..c52a3b7d68d9 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/bucket_size.pass.cpp
@@ -38,13 +38,13 @@ int main(int, char**)
         };
         const C c(std::begin(a), std::end(a));
         assert(c.bucket_count() >= 7);
-        LIBCPP_ASSERT(c.bucket_size(0) == 0);
-        LIBCPP_ASSERT(c.bucket_size(1) == 2);
-        LIBCPP_ASSERT(c.bucket_size(2) == 2);
-        LIBCPP_ASSERT(c.bucket_size(3) == 1);
-        LIBCPP_ASSERT(c.bucket_size(4) == 1);
-        LIBCPP_ASSERT(c.bucket_size(5) == 0);
-        LIBCPP_ASSERT(c.bucket_size(6) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(0) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(1) == 2);
+        LIBCUDACXX_ASSERT(c.bucket_size(2) == 2);
+        LIBCUDACXX_ASSERT(c.bucket_size(3) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(4) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(5) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(6) == 0);
     }
 #if TEST_STD_VER >= 11
     {
@@ -62,13 +62,13 @@ int main(int, char**)
         };
         const C c(std::begin(a), std::end(a));
         assert(c.bucket_count() >= 7);
-        LIBCPP_ASSERT(c.bucket_size(0) == 0);
-        LIBCPP_ASSERT(c.bucket_size(1) == 2);
-        LIBCPP_ASSERT(c.bucket_size(2) == 2);
-        LIBCPP_ASSERT(c.bucket_size(3) == 1);
-        LIBCPP_ASSERT(c.bucket_size(4) == 1);
-        LIBCPP_ASSERT(c.bucket_size(5) == 0);
-        LIBCPP_ASSERT(c.bucket_size(6) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(0) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(1) == 2);
+        LIBCUDACXX_ASSERT(c.bucket_size(2) == 2);
+        LIBCUDACXX_ASSERT(c.bucket_size(3) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(4) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(5) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(6) == 0);
     }
 #endif
 

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp
index 5b1b25a855ed..46d6dbab0d8a 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/iterator_concept_conformance.compile.pass.cpp
@@ -23,7 +23,7 @@ using const_local_iterator = std::unordered_multimap<int, int>::const_local_iter
 using value_type = std::pair<const int, int>;
 
 static_assert(std::forward_iterator<iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
 static_assert(!std::indirectly_writable<iterator, value_type>);
 static_assert(std::sentinel_for<iterator, iterator>);
 static_assert(std::sentinel_for<iterator, const_iterator>);
@@ -36,7 +36,7 @@ static_assert(!std::indirectly_copyable_storable<iterator, std::pair<int, int>*>
 static_assert(!std::indirectly_swappable<iterator, iterator>);
 
 static_assert(std::forward_iterator<const_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
 static_assert(!std::indirectly_writable<const_iterator, value_type>);
 static_assert(std::sentinel_for<const_iterator, iterator>);
 static_assert(std::sentinel_for<const_iterator, const_iterator>);
@@ -49,7 +49,7 @@ static_assert(!std::indirectly_copyable_storable<const_iterator, std::pair<int,
 static_assert(!std::indirectly_swappable<const_iterator, const_iterator>);
 
 static_assert(std::forward_iterator<local_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
 static_assert(!std::indirectly_writable<local_iterator, value_type>);
 static_assert(std::sentinel_for<local_iterator, local_iterator>);
 static_assert(std::sentinel_for<local_iterator, const_local_iterator>);
@@ -62,7 +62,7 @@ static_assert(!std::indirectly_copyable_storable<local_iterator, std::pair<int,
 static_assert(!std::indirectly_swappable<local_iterator, local_iterator>);
 
 static_assert(std::forward_iterator<const_local_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
 static_assert(!std::indirectly_writable<const_local_iterator, value_type>);
 static_assert(std::sentinel_for<const_local_iterator, local_iterator>);
 static_assert(std::sentinel_for<const_local_iterator, const_local_iterator>);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/iterators.compile.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/iterators.compile.fail.cpp
index 0c1b50fac059..b53490012aeb 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/iterators.compile.fail.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/iterators.compile.fail.cpp
@@ -40,7 +40,7 @@ int main(int, char**)
             P(2, "four"),
         };
         C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(std::distance(c.begin(), c.end()) == c.size());
         assert(std::distance(c.cbegin(), c.cend()) == c.size());
@@ -62,7 +62,7 @@ int main(int, char**)
             P(2, "four"),
         };
         const C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(std::distance(c.begin(), c.end()) == c.size());
         assert(std::distance(c.cbegin(), c.cend()) == c.size());

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/local_iterators.compile.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/local_iterators.compile.fail.cpp
index f5af791804bd..5837b33923ac 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/local_iterators.compile.fail.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/local_iterators.compile.fail.cpp
@@ -41,7 +41,7 @@ int main(int, char**)
             P(2, "four"),
         };
         C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         C::size_type b = c.bucket(0);
         I i = c.begin(b);
         I j = c.end(b);
@@ -106,7 +106,7 @@ int main(int, char**)
             P(2, "four"),
         };
         const C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         C::size_type b = c.bucket(0);
         I i = c.begin(b);
         I j = c.end(b);
@@ -170,7 +170,7 @@ int main(int, char**)
             P(2, "four"),
         };
         C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         C::size_type b = c.bucket(0);
         I i = c.cbegin(b);
         I j = c.cend(b);
@@ -234,7 +234,7 @@ int main(int, char**)
             P(2, "four"),
         };
         const C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         C::size_type b = c.bucket(0);
         I i = c.cbegin(b);
         I j = c.cend(b);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp
index d03cf67ae7c6..bf68d2ed3af7 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/max_size.pass.cpp
@@ -30,7 +30,7 @@ int main(int, char**)
         C;
     C c;
     assert(c.max_size() <= 10);
-    LIBCPP_ASSERT(c.max_size() == 10);
+    LIBCUDACXX_ASSERT(c.max_size() == 10);
   }
   {
     typedef limited_allocator<KV, (size_t)-1> A;
@@ -41,7 +41,7 @@ int main(int, char**)
         static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
     C c;
     assert(c.max_size() <= max_dist);
-    LIBCPP_ASSERT(c.max_size() == max_dist);
+    LIBCUDACXX_ASSERT(c.max_size() == max_dist);
     }
     {
       typedef std::unordered_multimap<char, int> C;

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/range_concept_conformance.compile.pass.cpp
index ab799f179031..d4c6f50f037c 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // unordered_multimap
 
@@ -24,7 +24,7 @@ using range = std::unordered_multimap<int, int>;
 static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
 static_assert(std::ranges::common_range<range>);
 static_assert(std::ranges::forward_range<range>);
-LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
 static_assert(!std::ranges::view<range>);
 static_assert(std::ranges::sized_range<range>);
 static_assert(!std::ranges::borrowed_range<range>);
@@ -33,7 +33,7 @@ static_assert(std::ranges::viewable_range<range>);
 static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
 static_assert(std::ranges::common_range<range const>);
 static_assert(std::ranges::forward_range<range const>);
-LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
 static_assert(!std::ranges::view<range const>);
 static_assert(std::ranges::sized_range<range const>);
 static_assert(!std::ranges::borrowed_range<range const>);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp
index 99538e32d827..1a5b67fbc227 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/rehash.pass.cpp
@@ -100,16 +100,16 @@ int main(int, char**)
         assert(c.bucket_count() >= 7);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         test(c);
         c.max_load_factor(2);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.rehash(31);
         rehash_postcondition(c, 31);
-        LIBCPP_ASSERT(c.bucket_count() == 31);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 31);
         test(c);
     }
 #if TEST_STD_VER >= 11
@@ -131,16 +131,16 @@ int main(int, char**)
         assert(c.bucket_count() >= 7);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         test(c);
         c.max_load_factor(2);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.rehash(31);
         rehash_postcondition(c, 31);
-        LIBCPP_ASSERT(c.bucket_count() == 31);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 31);
         test(c);
     }
 #endif

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp
index 2d3d8f298394..52ac15220247 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/reserve.pass.cpp
@@ -79,11 +79,11 @@ int main(int, char**)
         test(c);
         assert(c.bucket_count() >= 7);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         test(c);
         c.max_load_factor(2);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.reserve(31);
         assert(c.bucket_count() >= 16);
@@ -107,11 +107,11 @@ int main(int, char**)
         test(c);
         assert(c.bucket_count() >= 7);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         test(c);
         c.max_load_factor(2);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.reserve(31);
         assert(c.bucket_count() >= 16);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/swap_member.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/swap_member.pass.cpp
index 257938b0628f..0d40d4b01d62 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/swap_member.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/swap_member.pass.cpp
@@ -40,7 +40,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -49,7 +49,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -97,7 +97,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -126,7 +126,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -248,7 +248,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -257,7 +257,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -305,7 +305,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -334,7 +334,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -456,7 +456,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -465,7 +465,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -513,7 +513,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -542,7 +542,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp
index de69e6743067..d86f929cedf0 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/allocator.pass.cpp
@@ -34,7 +34,7 @@ int main(int, char**)
                                                                   NotConstructible> >
                                    > C;
         C c(test_allocator<std::pair<const NotConstructible, NotConstructible> >(10));
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -54,7 +54,7 @@ int main(int, char**)
                                                                   NotConstructible> >
                                    > C;
         C c(min_allocator<std::pair<const NotConstructible, NotConstructible> >{});
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -73,7 +73,7 @@ int main(int, char**)
                                    A
                                    > C;
         C c(A{});
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == A{});
@@ -93,7 +93,7 @@ int main(int, char**)
 
         A a(10);
         C c(2, a);
-        LIBCPP_ASSERT(c.bucket_count() == 2);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 2);
         assert(c.hash_function() == HF());
         assert(c.key_eq() == Comp());
         assert(c.get_allocator() == a);
@@ -113,7 +113,7 @@ int main(int, char**)
         A a(10);
         HF hf(12);
         C c(2, hf, a);
-        LIBCPP_ASSERT(c.bucket_count() == 2);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 2);
         assert(c.hash_function() == hf);
         assert(!(c.hash_function() == HF()));
         assert(c.key_eq() == Comp());

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp
index d35d00d4de1a..a988841109d9 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_copy.pass.cpp
@@ -62,7 +62,7 @@ int main(int, char**)
             A(4)
            );
         c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         std::multiset<std::string> s;
         s.insert("one");
@@ -185,7 +185,7 @@ int main(int, char**)
             A()
            );
         c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         std::multiset<std::string> s;
         s.insert("one");

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp
index c4ba56781e55..ba2bc6ff76f0 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/assign_move.pass.cpp
@@ -63,7 +63,7 @@ int main(int, char**)
             A(4)
            );
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -125,7 +125,7 @@ int main(int, char**)
         C::iterator it0 = c0.begin();
         c = std::move(c0);
         assert(it0 == c.begin()); // Iterators remain valid
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -187,7 +187,7 @@ int main(int, char**)
         C::iterator it0 = c0.begin();
         c = std::move(c0);
         assert(it0 == c.begin()); // Iterators remain valid
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -249,7 +249,7 @@ int main(int, char**)
         C::iterator it0 = c0.begin();
         c = std::move(c0);
         assert(it0 == c.begin()); // Iterators remain valid
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp
index 60c6341e0005..72d1ce51365e 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy.pass.cpp
@@ -54,7 +54,7 @@ int main(int, char**)
             test_allocator<std::pair<const int, std::string> >(10)
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         std::multiset<std::string> s;
         s.insert("one");
@@ -101,7 +101,7 @@ int main(int, char**)
             other_allocator<std::pair<const int, std::string> >(10)
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         std::multiset<std::string> s;
         s.insert("one");
@@ -147,7 +147,7 @@ int main(int, char**)
             min_allocator<std::pair<const int, std::string> >()
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         std::multiset<std::string> s;
         s.insert("one");

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy_alloc.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy_alloc.pass.cpp
index d9ec0ad901a3..08eabeadd7ad 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy_alloc.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/copy_alloc.pass.cpp
@@ -54,7 +54,7 @@ int main(int, char**)
             test_allocator<std::pair<const int, std::string> >(10)
            );
         C c(c0, test_allocator<std::pair<const int, std::string> >(5));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         std::multiset<std::string> s;
         s.insert("one");
@@ -101,7 +101,7 @@ int main(int, char**)
             min_allocator<std::pair<const int, std::string> >()
            );
         C c(c0, min_allocator<std::pair<const int, std::string> >());
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         std::multiset<std::string> s;
         s.insert("one");
@@ -148,7 +148,7 @@ int main(int, char**)
             A{}
            );
         C c(c0, A{});
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         std::multiset<std::string> s;
         s.insert("one");

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default.pass.cpp
index deea35454309..9b421b33a313 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default.pass.cpp
@@ -34,7 +34,7 @@ int main(int, char**)
                                                                   NotConstructible> >
                                    > C;
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -54,7 +54,7 @@ int main(int, char**)
                                                                  NotConstructible> >
                                    > C;
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -74,7 +74,7 @@ int main(int, char**)
                                    > C;
         {
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == A());
@@ -87,7 +87,7 @@ int main(int, char**)
         {
         A a;
         C c(a);
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == a);
@@ -100,7 +100,7 @@ int main(int, char**)
     }
     {
         std::unordered_multimap<int, int> c = {};
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.size() == 0);
         assert(c.empty());
         assert(std::distance(c.begin(), c.end()) == 0);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default_noexcept.pass.cpp
index 394600a43b38..d3ea014f20b0 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/default_noexcept.pass.cpp
@@ -46,7 +46,7 @@ struct some_hash
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -56,7 +56,7 @@ int main(int, char**)
                            std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp
index e8160e160549..428cc346c6c9 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/dtor_noexcept.pass.cpp
@@ -53,7 +53,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
@@ -63,7 +63,7 @@ int main(int, char**)
                                                          some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp
index c5cb706269e2..1b0ad2f3b22a 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size.pass.cpp
@@ -50,7 +50,7 @@ int main(int, char**)
             },
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -100,7 +100,7 @@ int main(int, char**)
             },
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_allocator.pass.cpp
index 523977190c21..474f9ab894b5 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_allocator.pass.cpp
@@ -52,7 +52,7 @@ void test(const Allocator& alloc)
         7,
         alloc);
 
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 6);
 
     typedef std::pair<typename C::const_iterator, typename C::const_iterator> Eq;

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp
index 785df175094d..a0dcbf433c0b 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash.pass.cpp
@@ -51,7 +51,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -102,7 +102,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_allocator.pass.cpp
index 6d0f4e5404af..b7c585049226 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_allocator.pass.cpp
@@ -53,7 +53,7 @@ void test(const Allocator& alloc)
         test_hash<int>(5),
         alloc);
 
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 6);
 
     typedef std::pair<typename C::const_iterator, typename C::const_iterator> Eq;

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp
index 42d3aa2ba659..992fad9c83dc 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal.pass.cpp
@@ -53,7 +53,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -105,7 +105,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp
index beeb5b355ec5..b3551bedbf90 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/init_size_hash_equal_allocator.pass.cpp
@@ -54,7 +54,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             test_allocator<std::pair<const int, std::string> >(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -107,7 +107,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             min_allocator<std::pair<const int, std::string> >()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -161,7 +161,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             A{}
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size.pass.cpp
index 374e95eaf842..f40ea4b6856e 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size.pass.cpp
@@ -53,7 +53,7 @@ int main(int, char**)
         C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
             10
            );
-        LIBCPP_ASSERT(c.bucket_count() == 11);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 11);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -106,7 +106,7 @@ int main(int, char**)
         C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
             10
            );
-        LIBCPP_ASSERT(c.bucket_count() == 11);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 11);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_allocator.pass.cpp
index 5c1f4b6e39f5..433452822ccf 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_allocator.pass.cpp
@@ -57,7 +57,7 @@ void test(const Allocator& alloc)
         7,
         alloc);
 
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 6);
 
     typedef std::pair<typename C::const_iterator, typename C::const_iterator> Eq;

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash.pass.cpp
index ce99c918acfe..ab8a4445f5d9 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash.pass.cpp
@@ -55,7 +55,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -109,7 +109,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_allocator.pass.cpp
index 82cb9fc443f2..81c58fe92b0e 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_allocator.pass.cpp
@@ -58,7 +58,7 @@ void test(const Allocator& alloc)
         test_hash<int>(5),
         alloc);
 
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 6);
 
     typedef std::pair<typename C::const_iterator, typename C::const_iterator> Eq;

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_equal.pass.cpp
index 0a27a4c37f62..b4872ccb3c4c 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_equal.pass.cpp
@@ -56,7 +56,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -111,7 +111,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
index 0dd157ae5b11..d225be3a9f91 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
@@ -58,7 +58,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             test_allocator<std::pair<const int, std::string> >(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -114,7 +114,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             min_allocator<std::pair<const int, std::string> >()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -170,7 +170,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             A{}
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp
index afe88a27c7c5..36d0e5de08f7 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move.pass.cpp
@@ -46,7 +46,7 @@ int main(int, char**)
             test_allocator<std::pair<const int, std::string> >(10)
            );
         C c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 0);
         assert(c.hash_function() == test_hash<int>(8));
         assert(c.key_eq() == test_equal_to<int>(9));
@@ -85,7 +85,7 @@ int main(int, char**)
         C::iterator it0 = c0.begin();
         C c = std::move(c0);
         assert(it0 == c.begin()); // Iterators remain valid
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -132,7 +132,7 @@ int main(int, char**)
             min_allocator<std::pair<const int, std::string> >()
            );
         C c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 0);
         assert(c.hash_function() == test_hash<int>(8));
         assert(c.key_eq() == test_equal_to<int>(9));
@@ -171,7 +171,7 @@ int main(int, char**)
         C::iterator it0 = c0.begin();
         C c = std::move(c0);
         assert(it0 == c.begin()); // Iterators remain valid
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp
index 01260c466270..d27627e7129d 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_alloc.pass.cpp
@@ -116,7 +116,7 @@ int main(int, char**)
             A(10)
            );
         C c(std::move(c0), A(10));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -175,7 +175,7 @@ int main(int, char**)
             A()
            );
         C c(std::move(c0), A());
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);
@@ -234,7 +234,7 @@ int main(int, char**)
             A{}
            );
         C c(std::move(c0), A());
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         typedef std::pair<C::const_iterator, C::const_iterator> Eq;
         Eq eq = c.equal_range(1);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp
index 2cd99546e5bd..4eb79b8b5147 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_assign_noexcept.pass.cpp
@@ -54,13 +54,13 @@ int main(int, char**)
                            std::equal_to<MoveOnly>, test_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp
index ae62e66d4071..62cf350ee64f 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/move_noexcept.pass.cpp
@@ -42,7 +42,7 @@ struct some_hash
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
@@ -57,7 +57,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<std::pair<const MoveOnly, MoveOnly>>> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.compile.fail.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.compile.fail.cpp
index 810f6a51c72c..06fc0b251f52 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.compile.fail.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.compile.fail.cpp
@@ -34,7 +34,7 @@ int main(int, char**)
                                                                   NotConstructible> >
                                    > C;
         C c = 7;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -54,7 +54,7 @@ int main(int, char**)
                                                                  NotConstructible> >
                                    > C;
         C c = 7;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.pass.cpp
index fa87144f1692..c4c8753c7ffe 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size.pass.cpp
@@ -34,7 +34,7 @@ int main(int, char**)
                                                                   NotConstructible> >
                                    > C;
         C c(7);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -54,7 +54,7 @@ int main(int, char**)
                                                                  NotConstructible> >
                                    > C;
         C c(7);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_allocator.pass.cpp
index b90f6db7913b..2b0891265bbe 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_allocator.pass.cpp
@@ -36,7 +36,7 @@ void test(const Allocator& alloc)
                                     Allocator> C;
     C c(7,
         alloc);
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.hash_function() == test_hash<NotConstructible>());
     assert(c.key_eq() == test_equal_to<NotConstructible>());
     assert(c.get_allocator() == alloc);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash.pass.cpp
index 70bab4197449..dbfcce3eab2c 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash.pass.cpp
@@ -36,7 +36,7 @@ int main(int, char**)
         C c(7,
             test_hash<NotConstructible>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==
@@ -58,7 +58,7 @@ int main(int, char**)
         C c(7,
             test_hash<NotConstructible>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() ==

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_allocator.pass.cpp
index ad98e99558d4..46304bece11a 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_allocator.pass.cpp
@@ -37,7 +37,7 @@ void test(const Allocator& alloc)
     C c(7,
         test_hash<NotConstructible>(8),
         alloc);
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.hash_function() == test_hash<NotConstructible>(8));
     assert(c.key_eq() == test_equal_to<NotConstructible>());
     assert(c.get_allocator() == alloc);

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal.pass.cpp
index 7709dfe9452f..3a0916d5eb6c 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal.pass.cpp
@@ -37,7 +37,7 @@ int main(int, char**)
             test_hash<NotConstructible>(8),
             test_equal_to<NotConstructible>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() ==
@@ -60,7 +60,7 @@ int main(int, char**)
             test_hash<NotConstructible>(8),
             test_equal_to<NotConstructible>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() ==

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal_allocator.pass.cpp
index 1fd4bb60a5db..6f99a61ccef2 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.cnstr/size_hash_equal_allocator.pass.cpp
@@ -38,7 +38,7 @@ int main(int, char**)
             test_equal_to<NotConstructible>(9),
             test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() ==
@@ -62,7 +62,7 @@ int main(int, char**)
             test_equal_to<NotConstructible>(9),
             min_allocator<std::pair<const NotConstructible, NotConstructible> >()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() ==
@@ -85,7 +85,7 @@ int main(int, char**)
             test_equal_to<NotConstructible>(9),
             A{}
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() == A{});

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp
index 2a6e3f60ca6b..a0e87223864d 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.modifiers/emplace_hint.pass.cpp
@@ -43,20 +43,20 @@ int main(int, char**)
         assert(c.size() == 2);
         assert(r->first == 3);
         assert(r->second == Emplaceable(5, 6));
-        LIBCPP_ASSERT(r == std::next(c.begin()));
+        LIBCUDACXX_ASSERT(r == std::next(c.begin()));
 
         r = c.emplace_hint(r, std::piecewise_construct, std::forward_as_tuple(3),
                                                         std::forward_as_tuple(6, 7));
         assert(c.size() == 3);
         assert(r->first == 3);
         assert(r->second == Emplaceable(6, 7));
-        LIBCPP_ASSERT(r == std::next(c.begin()));
+        LIBCUDACXX_ASSERT(r == std::next(c.begin()));
         r = c.begin();
         assert(r->first == 3);
-        LIBCPP_ASSERT(r->second == Emplaceable());
+        LIBCUDACXX_ASSERT(r->second == Emplaceable());
         r = std::next(r, 2);
         assert(r->first == 3);
-        LIBCPP_ASSERT(r->second == Emplaceable(5, 6));
+        LIBCUDACXX_ASSERT(r->second == Emplaceable(5, 6));
     }
     {
         typedef std::unordered_multimap<int, Emplaceable, std::hash<int>, std::equal_to<int>,
@@ -74,20 +74,20 @@ int main(int, char**)
         assert(c.size() == 2);
         assert(r->first == 3);
         assert(r->second == Emplaceable(5, 6));
-        LIBCPP_ASSERT(r == std::next(c.begin()));
+        LIBCUDACXX_ASSERT(r == std::next(c.begin()));
 
         r = c.emplace_hint(r, std::piecewise_construct, std::forward_as_tuple(3),
                                                         std::forward_as_tuple(6, 7));
         assert(c.size() == 3);
         assert(r->first == 3);
         assert(r->second == Emplaceable(6, 7));
-        LIBCPP_ASSERT(r == std::next(c.begin()));
+        LIBCUDACXX_ASSERT(r == std::next(c.begin()));
         r = c.begin();
         assert(r->first == 3);
-        LIBCPP_ASSERT(r->second == Emplaceable());
+        LIBCUDACXX_ASSERT(r->second == Emplaceable());
         r = std::next(r, 2);
         assert(r->first == 3);
-        LIBCPP_ASSERT(r->second == Emplaceable(5, 6));
+        LIBCUDACXX_ASSERT(r->second == Emplaceable(5, 6));
     }
 
   return 0;

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp
index 6220f55a3e86..b94e9ee17072 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_noexcept.pass.cpp
@@ -125,7 +125,7 @@ int main(int, char**)
         typedef std::unordered_multimap<MoveOnly, MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly, std::hash<MoveOnly>,
                            std::equal_to<MoveOnly>, test_allocator<V>> C;
@@ -136,7 +136,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<V>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -180,12 +180,12 @@ int main(int, char**)
     typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<V>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     { // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
     typedef std::unordered_multimap<MoveOnly, MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<V>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
index 8aafbdd46b12..7737af75331c 100644
--- a/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multimap/unord.multimap.swap/swap_non_member.pass.cpp
@@ -40,7 +40,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -49,7 +49,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -99,7 +99,7 @@ int main(int, char**)
         assert(c1.max_load_factor() == 2);
         assert(it2 == c1.begin()); // Iterators are not invalidated
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -129,7 +129,7 @@ int main(int, char**)
         C::iterator it1 = c1.begin();
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -238,7 +238,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -247,7 +247,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -295,7 +295,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -324,7 +324,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -428,7 +428,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -437,7 +437,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -485,7 +485,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -514,7 +514,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp
index 5436c1e94220..4a5aaee8e82a 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/bucket.pass.cpp
@@ -38,7 +38,7 @@ int main(int, char**)
         size_t bc = c.bucket_count();
         assert(bc >= 7);
         for (size_t i = 0; i < 13; ++i)
-            LIBCPP_ASSERT(c.bucket(i) == i % bc);
+            LIBCUDACXX_ASSERT(c.bucket(i) == i % bc);
     }
 #if TEST_STD_VER >= 11
     {
@@ -58,7 +58,7 @@ int main(int, char**)
         size_t bc = c.bucket_count();
         assert(bc >= 7);
         for (size_t i = 0; i < 13; ++i)
-            LIBCPP_ASSERT(c.bucket(i) == i % bc);
+            LIBCUDACXX_ASSERT(c.bucket(i) == i % bc);
     }
 #endif
 

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp
index 8f389ebc206b..7880a57fe11d 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/bucket_count.pass.cpp
@@ -25,7 +25,7 @@ int main(int, char**)
     {
         typedef std::unordered_multiset<int> C;
         const C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
     }
     {
         typedef std::unordered_multiset<int> C;
@@ -49,7 +49,7 @@ int main(int, char**)
         typedef std::unordered_multiset<int, std::hash<int>,
                                       std::equal_to<int>, min_allocator<int>> C;
         const C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
     }
     {
         typedef std::unordered_multiset<int, std::hash<int>,

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp
index be7a651416e2..b10a3ae85bdf 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/bucket_size.pass.cpp
@@ -36,13 +36,13 @@ int main(int, char**)
         };
         const C c(std::begin(a), std::end(a));
         assert(c.bucket_count() >= 7);
-        LIBCPP_ASSERT(c.bucket_size(0) == 0);
-        LIBCPP_ASSERT(c.bucket_size(1) == 2);
-        LIBCPP_ASSERT(c.bucket_size(2) == 2);
-        LIBCPP_ASSERT(c.bucket_size(3) == 1);
-        LIBCPP_ASSERT(c.bucket_size(4) == 1);
-        LIBCPP_ASSERT(c.bucket_size(5) == 0);
-        LIBCPP_ASSERT(c.bucket_size(6) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(0) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(1) == 2);
+        LIBCUDACXX_ASSERT(c.bucket_size(2) == 2);
+        LIBCUDACXX_ASSERT(c.bucket_size(3) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(4) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(5) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(6) == 0);
     }
 #if TEST_STD_VER >= 11
     {
@@ -60,13 +60,13 @@ int main(int, char**)
         };
         const C c(std::begin(a), std::end(a));
         assert(c.bucket_count() >= 7);
-        LIBCPP_ASSERT(c.bucket_size(0) == 0);
-        LIBCPP_ASSERT(c.bucket_size(1) == 2);
-        LIBCPP_ASSERT(c.bucket_size(2) == 2);
-        LIBCPP_ASSERT(c.bucket_size(3) == 1);
-        LIBCPP_ASSERT(c.bucket_size(4) == 1);
-        LIBCPP_ASSERT(c.bucket_size(5) == 0);
-        LIBCPP_ASSERT(c.bucket_size(6) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(0) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(1) == 2);
+        LIBCUDACXX_ASSERT(c.bucket_size(2) == 2);
+        LIBCUDACXX_ASSERT(c.bucket_size(3) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(4) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(5) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(6) == 0);
     }
 #endif
     return 0;

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/iterator_concept_conformance.compile.pass.cpp
index 816baa143f3d..31e16a6b06f9 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/iterator_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/iterator_concept_conformance.compile.pass.cpp
@@ -23,7 +23,7 @@ using const_local_iterator = std::unordered_multiset<int>::const_local_iterator;
 using value_type = int;
 
 static_assert(std::forward_iterator<iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
 static_assert(!std::indirectly_writable<iterator, value_type>);
 static_assert(std::sentinel_for<iterator, iterator>);
 static_assert(std::sentinel_for<iterator, const_iterator>);
@@ -36,7 +36,7 @@ static_assert(std::indirectly_copyable_storable<iterator, int*>);
 static_assert(!std::indirectly_swappable<iterator, iterator>);
 
 static_assert(std::forward_iterator<const_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
 static_assert(!std::indirectly_writable<const_iterator, value_type>);
 static_assert(std::sentinel_for<const_iterator, iterator>);
 static_assert(std::sentinel_for<const_iterator, const_iterator>);
@@ -49,7 +49,7 @@ static_assert(std::indirectly_copyable_storable<const_iterator, int*>);
 static_assert(!std::indirectly_swappable<const_iterator, const_iterator>);
 
 static_assert(std::forward_iterator<local_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
 static_assert(!std::indirectly_writable<local_iterator, value_type>);
 static_assert(std::sentinel_for<local_iterator, local_iterator>);
 static_assert(std::sentinel_for<local_iterator, const_local_iterator>);
@@ -62,7 +62,7 @@ static_assert(std::indirectly_copyable_storable<local_iterator, int*>);
 static_assert(!std::indirectly_swappable<local_iterator, local_iterator>);
 
 static_assert(std::forward_iterator<const_local_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
 static_assert(!std::indirectly_writable<const_local_iterator, value_type>);
 static_assert(std::sentinel_for<const_local_iterator, local_iterator>);
 static_assert(std::sentinel_for<const_local_iterator, const_local_iterator>);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/iterators.compile.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/iterators.compile.fail.cpp
index 2c282fdbaab4..d138997112c3 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/iterators.compile.fail.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/iterators.compile.fail.cpp
@@ -39,7 +39,7 @@ int main(int, char**)
             P(2)
         };
         C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(std::distance(c.begin(), c.end()) == c.size());
         assert(std::distance(c.cbegin(), c.cend()) == c.size());
@@ -60,7 +60,7 @@ int main(int, char**)
             P(2)
         };
         const C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(std::distance(c.begin(), c.end()) == c.size());
         assert(std::distance(c.cbegin(), c.cend()) == c.size());

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/local_iterators.compile.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/local_iterators.compile.fail.cpp
index d6f1a55fd49c..3d1c5eec7e58 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/local_iterators.compile.fail.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/local_iterators.compile.fail.cpp
@@ -40,7 +40,7 @@ int main(int, char**)
             P(2)
         };
         C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         C::size_type b = c.bucket(0);
         I i = c.begin(b);
         I j = c.end(b);
@@ -99,7 +99,7 @@ int main(int, char**)
             P(2)
         };
         const C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         C::size_type b = c.bucket(0);
         I i = c.begin(b);
         I j = c.end(b);
@@ -157,7 +157,7 @@ int main(int, char**)
             P(2)
         };
         C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         C::size_type b = c.bucket(0);
         I i = c.cbegin(b);
         I j = c.cend(b);
@@ -215,7 +215,7 @@ int main(int, char**)
             P(2)
         };
         const C c(a, a + sizeof(a)/sizeof(a[0]));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         C::size_type b = c.bucket(0);
         I i = c.cbegin(b);
         I j = c.cend(b);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp
index d08cdb6221fd..c9df810916df 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/max_size.pass.cpp
@@ -29,7 +29,7 @@ int main(int, char**)
           C;
       C c;
       assert(c.max_size() <= 10);
-      LIBCPP_ASSERT(c.max_size() == 10);
+      LIBCUDACXX_ASSERT(c.max_size() == 10);
     }
     {
       typedef limited_allocator<int, (size_t)-1> A;
@@ -40,7 +40,7 @@ int main(int, char**)
           static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
       C c;
       assert(c.max_size() <= max_dist);
-      LIBCPP_ASSERT(c.max_size() == max_dist);
+      LIBCUDACXX_ASSERT(c.max_size() == max_dist);
     }
     {
       typedef std::unordered_multiset<char> C;

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/range_concept_conformance.compile.pass.cpp
index e729cc19d1f8..a5164532e1b7 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // unordered_multiset
 
@@ -24,7 +24,7 @@ using range = std::unordered_multiset<int>;
 static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
 static_assert(std::ranges::common_range<range>);
 static_assert(std::ranges::forward_range<range>);
-LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
 static_assert(!std::ranges::view<range>);
 static_assert(std::ranges::sized_range<range>);
 static_assert(!std::ranges::borrowed_range<range>);
@@ -33,7 +33,7 @@ static_assert(std::ranges::viewable_range<range>);
 static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
 static_assert(std::ranges::common_range<range const>);
 static_assert(std::ranges::forward_range<range const>);
-LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
 static_assert(!std::ranges::view<range const>);
 static_assert(std::ranges::sized_range<range const>);
 static_assert(!std::ranges::borrowed_range<range const>);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp
index 8c6699b18e24..e8ab3c9ba6bb 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/rehash.pass.cpp
@@ -55,16 +55,16 @@ int main(int, char**)
         assert(c.bucket_count() >= 7);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         test(c);
         c.max_load_factor(2);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.rehash(31);
         rehash_postcondition(c, 31);
-        LIBCPP_ASSERT(c.bucket_count() == 31);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 31);
         test(c);
     }
 #if TEST_STD_VER >= 11
@@ -86,16 +86,16 @@ int main(int, char**)
         assert(c.bucket_count() >= 7);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         test(c);
         c.max_load_factor(2);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.rehash(31);
         rehash_postcondition(c, 31);
-        LIBCPP_ASSERT(c.bucket_count() == 31);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 31);
         test(c);
     }
 #endif

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp
index 54eada5a7698..6a9e0d79ba8b 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/reserve.pass.cpp
@@ -63,11 +63,11 @@ int main(int, char**)
         test(c);
         assert(c.bucket_count() >= 7);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         test(c);
         c.max_load_factor(2);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.reserve(31);
         assert(c.bucket_count() >= 16);
@@ -91,11 +91,11 @@ int main(int, char**)
         test(c);
         assert(c.bucket_count() >= 7);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         test(c);
         c.max_load_factor(2);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.reserve(31);
         assert(c.bucket_count() >= 16);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/swap_member.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/swap_member.pass.cpp
index 59acb07d7cf1..3a7b281a99d3 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/swap_member.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/swap_member.pass.cpp
@@ -36,7 +36,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -45,7 +45,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -93,7 +93,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -122,7 +122,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -216,7 +216,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -225,7 +225,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -273,7 +273,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -302,7 +302,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -396,7 +396,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -405,7 +405,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -453,7 +453,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -482,7 +482,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/allocator.pass.cpp
index bb2a9bf1a58e..0f0e56e71243 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/allocator.pass.cpp
@@ -33,7 +33,7 @@ int main(int, char**)
                                    test_allocator<NotConstructible>
                                    > C;
         C c(test_allocator<NotConstructible>(10));
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == test_allocator<NotConstructible>(10));
@@ -51,7 +51,7 @@ int main(int, char**)
                                    min_allocator<NotConstructible>
                                    > C;
         C c(min_allocator<NotConstructible>{});
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == min_allocator<NotConstructible>());
@@ -71,7 +71,7 @@ int main(int, char**)
 
         A a(43);
         C c(3, a);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         assert(c.hash_function() == HF());
         assert(c.key_eq() == Comp ());
         assert(c.get_allocator() == a);
@@ -92,7 +92,7 @@ int main(int, char**)
         HF hf(42);
         A a(43);
         C c(4, hf, a);
-        LIBCPP_ASSERT(c.bucket_count() == 4);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 4);
         assert(c.hash_function() == hf);
         assert(!(c.hash_function() == HF()));
         assert(c.key_eq() == Comp ());

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp
index 91aa0f4d390c..ca46ed076228 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_copy.pass.cpp
@@ -60,7 +60,7 @@ int main(int, char**)
             A(4)
            );
         c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         CheckConsecutiveValues<C::const_iterator>(c.find(1), c.end(), 1, 2);
         CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
@@ -170,7 +170,7 @@ int main(int, char**)
             A()
            );
         c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         CheckConsecutiveValues<C::const_iterator>(c.find(1), c.end(), 1, 2);
         CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
index 32575f4eec23..f636a068014f 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/assign_move.pass.cpp
@@ -61,7 +61,7 @@ int main(int, char**)
             A(4)
            );
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         CheckConsecutiveValues<C::const_iterator>(c.find(1), c.end(), 1, 2);
         CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
@@ -107,7 +107,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -154,7 +154,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -201,7 +201,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -248,7 +248,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp
index 8ae0be01eb5b..cc67da52ab38 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy.pass.cpp
@@ -52,7 +52,7 @@ int main(int, char**)
             test_allocator<int>(10)
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         CheckConsecutiveValues<C::const_iterator>(c.find(1), c.end(), 1, 2);
         CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
@@ -91,7 +91,7 @@ int main(int, char**)
             other_allocator<int>(10)
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         CheckConsecutiveValues<C::const_iterator>(c.find(1), c.end(), 1, 2);
         CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
@@ -129,7 +129,7 @@ int main(int, char**)
             min_allocator<int>()
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         CheckConsecutiveValues<C::const_iterator>(c.find(1), c.end(), 1, 2);
         CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp
index 5c920b91f747..7791892b178e 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/copy_alloc.pass.cpp
@@ -52,7 +52,7 @@ int main(int, char**)
             test_allocator<int>(10)
            );
         C c(c0, test_allocator<int>(5));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         CheckConsecutiveValues<C::const_iterator>(c.find(1), c.end(), 1, 2);
         CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);
@@ -91,7 +91,7 @@ int main(int, char**)
             min_allocator<int>()
            );
         C c(c0, min_allocator<int>());
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         CheckConsecutiveValues<C::const_iterator>(c.find(1), c.end(), 1, 2);
         CheckConsecutiveValues<C::const_iterator>(c.find(2), c.end(), 2, 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default.pass.cpp
index 00d8c6f59eeb..dada55b3180b 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default.pass.cpp
@@ -33,7 +33,7 @@ int main(int, char**)
                                    test_allocator<NotConstructible>
                                    > C;
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (test_allocator<NotConstructible>()));
@@ -51,7 +51,7 @@ int main(int, char**)
                                    min_allocator<NotConstructible>
                                    > C;
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (min_allocator<NotConstructible>()));
@@ -70,7 +70,7 @@ int main(int, char**)
                                    > C;
         {
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == A());
@@ -83,7 +83,7 @@ int main(int, char**)
         {
         A a;
         C c(a);
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == a);
@@ -96,7 +96,7 @@ int main(int, char**)
     }
     {
         std::unordered_multiset<int> c = {};
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.size() == 0);
         assert(c.empty());
         assert(std::distance(c.begin(), c.end()) == 0);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp
index 1c64692d8565..57296f17c1f1 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/default_noexcept.pass.cpp
@@ -46,7 +46,7 @@ struct some_hash
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_multiset<MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -56,7 +56,7 @@ int main(int, char**)
                            std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp
index 41f68c6c47b5..dc3477f84a79 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/dtor_noexcept.pass.cpp
@@ -53,7 +53,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
@@ -63,7 +63,7 @@ int main(int, char**)
                                                          some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp
index 80123b159b9a..354f267a8758 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size.pass.cpp
@@ -47,7 +47,7 @@ int main(int, char**)
             },
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -79,7 +79,7 @@ int main(int, char**)
             },
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_allocator.pass.cpp
index 4551de8a931f..803ab36bcdd1 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_allocator.pass.cpp
@@ -47,7 +47,7 @@ void test(const Allocator& alloc)
         7,
         alloc);
 
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 6);
     assert(c.count(1) == 2);
     assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp
index ae8ef8d813aa..a96a27f71bc6 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash.pass.cpp
@@ -49,7 +49,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -82,7 +82,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_allocator.pass.cpp
index 01e51b1951aa..968cad0e22b7 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_allocator.pass.cpp
@@ -49,7 +49,7 @@ void test(const Allocator& alloc)
         test_hash<int>(5),
         alloc);
 
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 6);
     assert(c.count(1) == 2);
     assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp
index ee10f31fd775..7d0bbdb2a3c4 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal.pass.cpp
@@ -50,7 +50,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -84,7 +84,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp
index 9ca37e318cfa..f6d183935414 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/init_size_hash_equal_allocator.pass.cpp
@@ -51,7 +51,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             test_allocator<int>(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -86,7 +86,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             min_allocator<int>()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size.pass.cpp
index 4ce70a4b475d..0a6b1945bed3 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size.pass.cpp
@@ -49,7 +49,7 @@ int main(int, char**)
         C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -84,7 +84,7 @@ int main(int, char**)
         C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_allocator.pass.cpp
index 3d9509e76417..4125e5fbd08e 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_allocator.pass.cpp
@@ -52,7 +52,7 @@ void test(const Allocator& alloc)
         7,
         alloc
         );
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 6);
     assert(c.count(1) == 2);
     assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash.pass.cpp
index 7db30cf91dc7..779d0e65007c 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash.pass.cpp
@@ -51,7 +51,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -87,7 +87,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_allocator.pass.cpp
index 34341b26a79a..e14a96d45c72 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_allocator.pass.cpp
@@ -53,7 +53,7 @@ void test(const Allocator& alloc)
         test_hash<int>(5),
         alloc
         );
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 6);
     assert(c.count(1) == 2);
     assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_equal.pass.cpp
index dd2c09a7fcf9..56ba57d2f69b 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_equal.pass.cpp
@@ -52,7 +52,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -89,7 +89,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
index 996ebb873ce2..228ff8078fa0 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
@@ -54,7 +54,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             test_allocator<int>(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -92,7 +92,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             min_allocator<int>()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp
index 4d4881b61f34..dd732e771725 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move.pass.cpp
@@ -42,7 +42,7 @@ int main(int, char**)
             test_allocator<int>(10)
            );
         C c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 0);
         assert(c.hash_function() == test_hash<int>(8));
         assert(c.key_eq() == test_equal_to<int>(9));
@@ -80,7 +80,7 @@ int main(int, char**)
         C::iterator it0 = c0.begin();
         C c = std::move(c0);
         assert(it0 == c.begin()); // Iterators remain valid
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -109,7 +109,7 @@ int main(int, char**)
             min_allocator<int>()
            );
         C c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 0);
         assert(c.hash_function() == test_hash<int>(8));
         assert(c.key_eq() == test_equal_to<int>(9));
@@ -147,7 +147,7 @@ int main(int, char**)
         C::iterator it0 = c0.begin();
         C c = std::move(c0);
         assert(it0 == c.begin()); // Iterators remain valid
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp
index a2b6c3f7bb1c..acc1539a4383 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_alloc.pass.cpp
@@ -96,7 +96,7 @@ int main(int, char**)
             A(10)
            );
         C c(std::move(c0), A(10));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);
@@ -178,7 +178,7 @@ int main(int, char**)
             A()
            );
         C c(std::move(c0), A());
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 6);
         assert(c.count(1) == 2);
         assert(c.count(2) == 2);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
index 9dbca6e3e867..9aced6057554 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_assign_noexcept.pass.cpp
@@ -54,13 +54,13 @@ int main(int, char**)
                            std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp
index 8e6e4643c88b..35ab84371567 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/move_noexcept.pass.cpp
@@ -42,7 +42,7 @@ struct some_hash
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_multiset<MoveOnly> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
@@ -57,7 +57,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.compile.fail.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.compile.fail.cpp
index bd41c6d97543..318e55ca02ef 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.compile.fail.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.compile.fail.cpp
@@ -33,7 +33,7 @@ int main(int, char**)
                                    test_allocator<NotConstructible>
                                    > C;
         C c = 7;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (test_allocator<NotConstructible>()));
@@ -51,7 +51,7 @@ int main(int, char**)
                                    min_allocator<NotConstructible>
                                    > C;
         C c = 7;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (min_allocator<NotConstructible>()));

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.pass.cpp
index 8d40f478cfea..b0d838108d9d 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size.pass.cpp
@@ -33,7 +33,7 @@ int main(int, char**)
                                    test_allocator<NotConstructible>
                                    > C;
         C c(7);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (test_allocator<NotConstructible>()));
@@ -51,7 +51,7 @@ int main(int, char**)
                                    min_allocator<NotConstructible>
                                    > C;
         C c(7);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (min_allocator<NotConstructible>()));

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_allocator.pass.cpp
index 2855487d3206..edd8f7175926 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_allocator.pass.cpp
@@ -35,7 +35,7 @@ void test(const Allocator& alloc)
                                     test_equal_to<NotConstructible>,
                                     Allocator> C;
     C c(7, alloc);
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.hash_function() == test_hash<NotConstructible>());
     assert(c.key_eq() == test_equal_to<NotConstructible>());
     assert(c.get_allocator() == alloc);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash.pass.cpp
index 58f84dfd02b6..a4471fc26bcd 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash.pass.cpp
@@ -35,7 +35,7 @@ int main(int, char**)
         C c(7,
             test_hash<NotConstructible>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (test_allocator<NotConstructible>()));
@@ -55,7 +55,7 @@ int main(int, char**)
         C c(7,
             test_hash<NotConstructible>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (min_allocator<NotConstructible>()));

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_allocator.pass.cpp
index 2c20093579b1..89f19d05644e 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_allocator.pass.cpp
@@ -35,7 +35,7 @@ void test(const Allocator& alloc)
                                     test_equal_to<NotConstructible>,
                                     Allocator> C;
     C c(7, test_hash<NotConstructible>(5), alloc);
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.hash_function() == test_hash<NotConstructible>(5));
     assert(c.key_eq() == test_equal_to<NotConstructible>());
     assert(c.get_allocator() == alloc);

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal.pass.cpp
index 3e6130aff2ce..59d9745e5940 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal.pass.cpp
@@ -36,7 +36,7 @@ int main(int, char**)
             test_hash<NotConstructible>(8),
             test_equal_to<NotConstructible>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() == (test_allocator<NotConstructible>()));
@@ -57,7 +57,7 @@ int main(int, char**)
             test_hash<NotConstructible>(8),
             test_equal_to<NotConstructible>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() == (min_allocator<NotConstructible>()));

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal_allocator.pass.cpp
index c64fb8d33a0b..ec2533e34d1d 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.cnstr/size_hash_equal_allocator.pass.cpp
@@ -37,7 +37,7 @@ int main(int, char**)
             test_equal_to<NotConstructible>(9),
             test_allocator<std::pair<const NotConstructible, NotConstructible> >(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() == (test_allocator<NotConstructible>(10)));
@@ -59,7 +59,7 @@ int main(int, char**)
             test_equal_to<NotConstructible>(9),
             min_allocator<std::pair<const NotConstructible, NotConstructible> >()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() == (min_allocator<NotConstructible>()));

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp
index 057e5bb32ace..65261ee24b41 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_noexcept.pass.cpp
@@ -124,7 +124,7 @@ int main(int, char**)
         typedef std::unordered_multiset<MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_multiset<MoveOnly, std::hash<MoveOnly>,
                            std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
@@ -135,7 +135,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_multiset<MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -179,12 +179,12 @@ int main(int, char**)
     typedef std::unordered_multiset<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     { // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
     typedef std::unordered_multiset<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
index 3b8aad272256..22d901a12d4a 100644
--- a/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/swap_non_member.pass.cpp
@@ -36,7 +36,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -45,7 +45,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -95,7 +95,7 @@ int main(int, char**)
         assert(c1.max_load_factor() == 2);
         assert(it2 == c1.begin()); // Iterators are not invalidated
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -125,7 +125,7 @@ int main(int, char**)
         C::iterator it1 = c1.begin();
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -224,7 +224,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -233,7 +233,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -281,7 +281,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -310,7 +310,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -404,7 +404,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -413,7 +413,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -461,7 +461,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -490,7 +490,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));

diff  --git a/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp b/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp
index bcaa77b4aa1f..c9764ec494ed 100644
--- a/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/bucket.pass.cpp
@@ -38,7 +38,7 @@ int main(int, char**)
         size_t bc = c.bucket_count();
         assert(bc >= 5);
         for (size_t i = 0; i < 13; ++i)
-            LIBCPP_ASSERT(c.bucket(i) == i % bc);
+            LIBCUDACXX_ASSERT(c.bucket(i) == i % bc);
     }
 #if TEST_STD_VER >= 11
     {
@@ -57,7 +57,7 @@ int main(int, char**)
         size_t bc = c.bucket_count();
         assert(bc >= 5);
         for (size_t i = 0; i < 13; ++i)
-            LIBCPP_ASSERT(c.bucket(i) == i % bc);
+            LIBCUDACXX_ASSERT(c.bucket(i) == i % bc);
     }
 #endif
 

diff  --git a/libcxx/test/std/containers/unord/unord.set/bucket_count.pass.cpp b/libcxx/test/std/containers/unord/unord.set/bucket_count.pass.cpp
index 3a1a78cb3d80..9f5ca0a6f905 100644
--- a/libcxx/test/std/containers/unord/unord.set/bucket_count.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/bucket_count.pass.cpp
@@ -25,7 +25,7 @@ int main(int, char**)
     {
         typedef std::unordered_set<int> C;
         const C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
     }
     {
         typedef std::unordered_set<int> C;
@@ -48,7 +48,7 @@ int main(int, char**)
     {
         typedef std::unordered_set<int, std::hash<int>, std::equal_to<int>, min_allocator<int>> C;
         const C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
     }
     {
         typedef std::unordered_set<int, std::hash<int>, std::equal_to<int>, min_allocator<int>> C;

diff  --git a/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp b/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp
index 1016c499d674..a885a1fe5c5c 100644
--- a/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/bucket_size.pass.cpp
@@ -36,11 +36,11 @@ int main(int, char**)
         };
         const C c(std::begin(a), std::end(a));
         assert(c.bucket_count() >= 5);
-        LIBCPP_ASSERT(c.bucket_size(0) == 0);
-        LIBCPP_ASSERT(c.bucket_size(1) == 1);
-        LIBCPP_ASSERT(c.bucket_size(2) == 1);
-        LIBCPP_ASSERT(c.bucket_size(3) == 1);
-        LIBCPP_ASSERT(c.bucket_size(4) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(0) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(1) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(2) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(3) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(4) == 1);
     }
 #if TEST_STD_VER >= 11
     {
@@ -57,11 +57,11 @@ int main(int, char**)
         };
         const C c(std::begin(a), std::end(a));
         assert(c.bucket_count() >= 5);
-        LIBCPP_ASSERT(c.bucket_size(0) == 0);
-        LIBCPP_ASSERT(c.bucket_size(1) == 1);
-        LIBCPP_ASSERT(c.bucket_size(2) == 1);
-        LIBCPP_ASSERT(c.bucket_size(3) == 1);
-        LIBCPP_ASSERT(c.bucket_size(4) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(0) == 0);
+        LIBCUDACXX_ASSERT(c.bucket_size(1) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(2) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(3) == 1);
+        LIBCUDACXX_ASSERT(c.bucket_size(4) == 1);
     }
 #endif
 

diff  --git a/libcxx/test/std/containers/unord/unord.set/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.set/iterator_concept_conformance.compile.pass.cpp
index 70490c828a11..459e72a65973 100644
--- a/libcxx/test/std/containers/unord/unord.set/iterator_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/iterator_concept_conformance.compile.pass.cpp
@@ -23,7 +23,7 @@ using const_local_iterator = std::unordered_set<int>::const_local_iterator;
 using value_type = int;
 
 static_assert(std::forward_iterator<iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<iterator>);
 static_assert(!std::indirectly_writable<iterator, value_type>);
 static_assert(std::sentinel_for<iterator, iterator>);
 static_assert(std::sentinel_for<iterator, const_iterator>);
@@ -36,7 +36,7 @@ static_assert(std::indirectly_copyable_storable<iterator, int*>);
 static_assert(!std::indirectly_swappable<iterator, iterator>);
 
 static_assert(std::forward_iterator<const_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<const_iterator>);
 static_assert(!std::indirectly_writable<const_iterator, value_type>);
 static_assert(std::sentinel_for<const_iterator, iterator>);
 static_assert(std::sentinel_for<const_iterator, const_iterator>);
@@ -49,7 +49,7 @@ static_assert(std::indirectly_copyable_storable<const_iterator, int*>);
 static_assert(!std::indirectly_swappable<const_iterator, const_iterator>);
 
 static_assert(std::forward_iterator<local_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<local_iterator>);
 static_assert(std::sentinel_for<local_iterator, local_iterator>);
 static_assert(std::sentinel_for<local_iterator, const_local_iterator>);
 static_assert(!std::sized_sentinel_for<local_iterator, local_iterator>);
@@ -61,7 +61,7 @@ static_assert(std::indirectly_copyable_storable<local_iterator, int*>);
 static_assert(!std::indirectly_swappable<local_iterator, local_iterator>);
 
 static_assert(std::forward_iterator<const_local_iterator>);
-LIBCPP_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
+LIBCUDACXX_STATIC_ASSERT(!std::bidirectional_iterator<const_local_iterator>);
 static_assert(!std::indirectly_writable<const_local_iterator, value_type>);
 static_assert(std::sentinel_for<const_local_iterator, local_iterator>);
 static_assert(std::sentinel_for<const_local_iterator, const_local_iterator>);

diff  --git a/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp b/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp
index aeb1354da562..f491c458fc44 100644
--- a/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/max_size.pass.cpp
@@ -27,7 +27,7 @@ int main(int, char**)
       typedef std::unordered_set<int, std::hash<int>, std::equal_to<int>, A> C;
       C c;
       assert(c.max_size() <= 10);
-      LIBCPP_ASSERT(c.max_size() == 10);
+      LIBCUDACXX_ASSERT(c.max_size() == 10);
     }
     {
       typedef limited_allocator<int, (size_t)-1> A;
@@ -36,7 +36,7 @@ int main(int, char**)
           static_cast<C::size_type>(std::numeric_limits<C::
diff erence_type>::max());
       C c;
       assert(c.max_size() <= max_dist);
-      LIBCPP_ASSERT(c.max_size() == max_dist);
+      LIBCUDACXX_ASSERT(c.max_size() == max_dist);
     }
     {
       typedef std::unordered_set<char> C;

diff  --git a/libcxx/test/std/containers/unord/unord.set/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/unord/unord.set/range_concept_conformance.compile.pass.cpp
index e53ea3210f5c..15d19c2ee5e8 100644
--- a/libcxx/test/std/containers/unord/unord.set/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // unordered_multiset
 
@@ -24,7 +24,7 @@ using range = std::unordered_set<int>;
 static_assert(std::same_as<std::ranges::iterator_t<range>, range::iterator>);
 static_assert(std::ranges::common_range<range>);
 static_assert(std::ranges::forward_range<range>);
-LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::bidirectional_range<range>);
 static_assert(!std::ranges::view<range>);
 static_assert(std::ranges::sized_range<range>);
 static_assert(!std::ranges::borrowed_range<range>);
@@ -33,7 +33,7 @@ static_assert(std::ranges::viewable_range<range>);
 static_assert(std::same_as<std::ranges::iterator_t<range const>, range::const_iterator>);
 static_assert(std::ranges::common_range<range const>);
 static_assert(std::ranges::forward_range<range const>);
-LIBCPP_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::bidirectional_range<range const>);
 static_assert(!std::ranges::view<range const>);
 static_assert(std::ranges::sized_range<range const>);
 static_assert(!std::ranges::borrowed_range<range const>);

diff  --git a/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp b/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp
index e45327ad7ec5..b906b679e2ad 100644
--- a/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/rehash.pass.cpp
@@ -55,16 +55,16 @@ int main(int, char**)
         assert(c.bucket_count() >= 5);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 5);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 5);
         test(c);
         c.max_load_factor(2);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.rehash(31);
         rehash_postcondition(c, 31);
-        LIBCPP_ASSERT(c.bucket_count() == 31);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 31);
         test(c);
     }
 #if TEST_STD_VER >= 11
@@ -86,16 +86,16 @@ int main(int, char**)
         assert(c.bucket_count() >= 5);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 5);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 5);
         test(c);
         c.max_load_factor(2);
         c.rehash(3);
         rehash_postcondition(c, 3);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         test(c);
         c.rehash(31);
         rehash_postcondition(c, 31);
-        LIBCPP_ASSERT(c.bucket_count() == 31);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 31);
         test(c);
     }
 #endif

diff  --git a/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp b/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp
index 7ea358e889d4..8e3267143000 100644
--- a/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/reserve.pass.cpp
@@ -63,7 +63,7 @@ int main(int, char**)
         test(c);
         assert(c.bucket_count() >= 5);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 5);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 5);
         test(c);
         c.max_load_factor(2);
         c.reserve(3);
@@ -91,7 +91,7 @@ int main(int, char**)
         test(c);
         assert(c.bucket_count() >= 5);
         c.reserve(3);
-        LIBCPP_ASSERT(c.bucket_count() == 5);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 5);
         test(c);
         c.max_load_factor(2);
         c.reserve(3);

diff  --git a/libcxx/test/std/containers/unord/unord.set/swap_member.pass.cpp b/libcxx/test/std/containers/unord/unord.set/swap_member.pass.cpp
index d5adfbb2462c..df961ce3059d 100644
--- a/libcxx/test/std/containers/unord/unord.set/swap_member.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/swap_member.pass.cpp
@@ -36,7 +36,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -45,7 +45,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -93,7 +93,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -122,7 +122,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -216,7 +216,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -225,7 +225,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -273,7 +273,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -302,7 +302,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -396,7 +396,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -405,7 +405,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -453,7 +453,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -482,7 +482,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         c1.swap(c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/allocator.pass.cpp
index 7c7ce3d077bb..1160e5e944ea 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/allocator.pass.cpp
@@ -33,7 +33,7 @@ int main(int, char**)
                                    test_allocator<NotConstructible>
                                    > C;
         C c(test_allocator<NotConstructible>(10));
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == test_allocator<NotConstructible>(10));
@@ -51,7 +51,7 @@ int main(int, char**)
                                    min_allocator<NotConstructible>
                                    > C;
         C c(min_allocator<NotConstructible>{});
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == min_allocator<NotConstructible>());
@@ -71,7 +71,7 @@ int main(int, char**)
 
         A a(43);
         C c(3, a);
-        LIBCPP_ASSERT(c.bucket_count() == 3);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 3);
         assert(c.hash_function() == HF());
         assert(c.key_eq() == Comp ());
         assert(c.get_allocator() == a);
@@ -92,7 +92,7 @@ int main(int, char**)
         HF hf(42);
         A a(43);
         C c(4, hf, a);
-        LIBCPP_ASSERT(c.bucket_count() == 4);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 4);
         assert(c.hash_function() == hf);
         assert(!(c.hash_function() == HF()));
         assert(c.key_eq() == Comp ());

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp
index 74b3b0744f98..ea2c5bf4d1a9 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_copy.pass.cpp
@@ -59,7 +59,7 @@ int main(int, char**)
             A(4)
            );
         c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -168,7 +168,7 @@ int main(int, char**)
             A()
            );
         c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp
index b1ec876e704f..4998e24ccd43 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/assign_move.pass.cpp
@@ -60,7 +60,7 @@ int main(int, char**)
             A(4)
            );
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -106,7 +106,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -153,7 +153,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -200,7 +200,7 @@ int main(int, char**)
            );
         C::iterator it0 = c0.begin();
         c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp
index 8a675950d9ba..fb3d94cb8479 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy.pass.cpp
@@ -51,7 +51,7 @@ int main(int, char**)
             test_allocator<int>(10)
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -90,7 +90,7 @@ int main(int, char**)
             other_allocator<int>(10)
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -128,7 +128,7 @@ int main(int, char**)
             min_allocator<int>()
            );
         C c = c0;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy_alloc.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy_alloc.pass.cpp
index 09d22de4ed0d..278a92816b52 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy_alloc.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/copy_alloc.pass.cpp
@@ -51,7 +51,7 @@ int main(int, char**)
             test_allocator<int>(10)
            );
         C c(c0, test_allocator<int>(5));
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -90,7 +90,7 @@ int main(int, char**)
             min_allocator<int>()
            );
         C c(c0, min_allocator<int>());
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp
index f61d46d5fc3b..49abf1b118b9 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default.pass.cpp
@@ -33,7 +33,7 @@ int main(int, char**)
                                    test_allocator<NotConstructible>
                                    > C;
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (test_allocator<NotConstructible>()));
@@ -51,7 +51,7 @@ int main(int, char**)
                                    min_allocator<NotConstructible>
                                    > C;
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (min_allocator<NotConstructible>()));
@@ -70,7 +70,7 @@ int main(int, char**)
                                    > C;
         {
         C c;
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == A());
@@ -83,7 +83,7 @@ int main(int, char**)
         {
         A a;
         C c(a);
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == a);
@@ -96,7 +96,7 @@ int main(int, char**)
     }
     {
         std::unordered_set<int> c = {};
-        LIBCPP_ASSERT(c.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 0);
         assert(c.size() == 0);
         assert(c.empty());
         assert(std::distance(c.begin(), c.end()) == 0);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default_noexcept.pass.cpp
index b867231fb70a..1919cc431f82 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/default_noexcept.pass.cpp
@@ -46,7 +46,7 @@ struct some_hash
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_set<MoveOnly> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
@@ -56,7 +56,7 @@ int main(int, char**)
                            std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_default_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp
index f0b7e28699f3..5a600e4f135e 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/dtor_noexcept.pass.cpp
@@ -53,7 +53,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_destructible<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
@@ -63,7 +63,7 @@ int main(int, char**)
                                                          some_comp<MoveOnly>> C;
         static_assert(!std::is_nothrow_destructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   return 0;
 }

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp
index ff516a757c1c..24535f58b486 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size.pass.cpp
@@ -47,7 +47,7 @@ int main(int, char**)
             },
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -79,7 +79,7 @@ int main(int, char**)
             },
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_allocator.pass.cpp
index 340dbba9b49a..3d2d80e7863b 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_allocator.pass.cpp
@@ -47,7 +47,7 @@ void test(const Allocator& alloc)
         7,
         alloc);
 
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 4);
     assert(c.count(1) == 1);
     assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp
index 628b3277764c..01bbf1a6fc1e 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash.pass.cpp
@@ -49,7 +49,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -82,7 +82,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_allocator.pass.cpp
index ab5f7d9f9b50..e1181ce6a339 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_allocator.pass.cpp
@@ -49,7 +49,7 @@ void test(const Allocator& alloc)
         test_hash<int>(5),
         alloc);
 
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 4);
     assert(c.count(1) == 1);
     assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp
index af5a371bd458..2182cf51c17b 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal.pass.cpp
@@ -50,7 +50,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -84,7 +84,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp
index bf8c9561e76e..ca69b7a5341a 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/init_size_hash_equal_allocator.pass.cpp
@@ -51,7 +51,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             test_allocator<int>(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -86,7 +86,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             min_allocator<int>()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size.pass.cpp
index 8b6149ac8f1f..63165a54edc0 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size.pass.cpp
@@ -49,7 +49,7 @@ int main(int, char**)
         C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -84,7 +84,7 @@ int main(int, char**)
         C c(cpp17_input_iterator<P*>(a), cpp17_input_iterator<P*>(a + sizeof(a)/sizeof(a[0])),
             7
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_allocator.pass.cpp
index cfed6dfbb36c..34da9efe23b7 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_allocator.pass.cpp
@@ -52,7 +52,7 @@ void test(const Allocator& alloc)
         7,
         alloc
         );
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 4);
     assert(c.count(1) == 1);
     assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash.pass.cpp
index 93ff746b3e03..c30c25c2e1ab 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash.pass.cpp
@@ -51,7 +51,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -87,7 +87,7 @@ int main(int, char**)
             7,
             test_hash<int>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_allocator.pass.cpp
index 2c44cba3b752..90b00290b425 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_allocator.pass.cpp
@@ -53,7 +53,7 @@ void test(const Allocator& alloc)
         test_hash<int>(5),
         alloc
         );
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.size() == 4);
     assert(c.count(1) == 1);
     assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_equal.pass.cpp
index 272c08058353..ec2f5b463f1a 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_equal.pass.cpp
@@ -52,7 +52,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -89,7 +89,7 @@ int main(int, char**)
             test_hash<int>(8),
             test_equal_to<int>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
index 024dc4a47721..7a803fdeff01 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/iter_iter_size_hash_equal_allocator.pass.cpp
@@ -54,7 +54,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             test_allocator<int>(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -92,7 +92,7 @@ int main(int, char**)
             test_equal_to<int>(9),
             min_allocator<int>()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp
index 80131be690d8..016621bba228 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move.pass.cpp
@@ -42,7 +42,7 @@ int main(int, char**)
             test_allocator<int>(10)
            );
         C c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 0);
         assert(c.hash_function() == test_hash<int>(8));
         assert(c.key_eq() == test_equal_to<int>(9));
@@ -80,7 +80,7 @@ int main(int, char**)
         C::iterator it0 = c0.begin();
         C c = std::move(c0);
         assert(it0 == c.begin()); // Iterators remain valid
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);
@@ -109,7 +109,7 @@ int main(int, char**)
             min_allocator<int>()
            );
         C c = std::move(c0);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 0);
         assert(c.hash_function() == test_hash<int>(8));
         assert(c.key_eq() == test_equal_to<int>(9));
@@ -147,7 +147,7 @@ int main(int, char**)
         C::iterator it0 = c0.begin();
         C c = std::move(c0);
         assert(it0 == c.begin()); // Iterators remain valid
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.size() == 4);
         assert(c.count(1) == 1);
         assert(c.count(2) == 1);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp
index 1ff2a7b471a1..c30ca8ff5900 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_assign_noexcept.pass.cpp
@@ -54,13 +54,13 @@ int main(int, char**)
                            std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_assignable<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_assignable<C>::value, "");

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp
index a31108ab936e..25389c59c7d3 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/move_noexcept.pass.cpp
@@ -42,7 +42,7 @@ struct some_hash
 
 int main(int, char**)
 {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_set<MoveOnly> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
@@ -57,7 +57,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(std::is_nothrow_move_constructible<C>::value, "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!std::is_nothrow_move_constructible<C>::value, "");

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size.compile.fail.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size.compile.fail.cpp
index f9bb88f37124..036c9b723574 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size.compile.fail.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size.compile.fail.cpp
@@ -32,7 +32,7 @@ int main(int, char**)
                                    test_allocator<NotConstructible>
                                    > C;
         C c = 7;
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (test_allocator<NotConstructible>()));

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size.pass.cpp
index 5c43179b0b1e..e849731b7824 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size.pass.cpp
@@ -33,7 +33,7 @@ int main(int, char**)
                                    test_allocator<NotConstructible>
                                    > C;
         C c(7);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (test_allocator<NotConstructible>()));
@@ -51,7 +51,7 @@ int main(int, char**)
                                    min_allocator<NotConstructible>
                                    > C;
         C c(7);
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>());
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (min_allocator<NotConstructible>()));

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_allocator.pass.cpp
index d547ea2b4bda..1f1b2bcc21aa 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_allocator.pass.cpp
@@ -35,7 +35,7 @@ void test(const Allocator& alloc)
                                test_equal_to<NotConstructible>,
                                Allocator> C;
     C c(7, alloc);
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.hash_function() == test_hash<NotConstructible>());
     assert(c.key_eq() == test_equal_to<NotConstructible>());
     assert(c.get_allocator() == alloc);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash.pass.cpp
index 6ee0f5c99f69..367ef92f70fe 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash.pass.cpp
@@ -35,7 +35,7 @@ int main(int, char**)
         C c(7,
             test_hash<NotConstructible>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (test_allocator<NotConstructible>()));
@@ -55,7 +55,7 @@ int main(int, char**)
         C c(7,
             test_hash<NotConstructible>(8)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>());
         assert(c.get_allocator() == (min_allocator<NotConstructible>()));

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_allocator.pass.cpp
index 972c0db3149d..2e3ace15ead1 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_allocator.pass.cpp
@@ -35,7 +35,7 @@ void test(const Allocator& alloc)
                                test_equal_to<NotConstructible>,
                                Allocator> C;
     C c(7, test_hash<NotConstructible>(5), alloc);
-    LIBCPP_ASSERT(c.bucket_count() == 7);
+    LIBCUDACXX_ASSERT(c.bucket_count() == 7);
     assert(c.hash_function() == test_hash<NotConstructible>(5));
     assert(c.key_eq() == test_equal_to<NotConstructible>());
     assert(c.get_allocator() == alloc);

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal.pass.cpp
index a54ddaf4627f..6837c65c79f2 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal.pass.cpp
@@ -36,7 +36,7 @@ int main(int, char**)
             test_hash<NotConstructible>(8),
             test_equal_to<NotConstructible>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() == (test_allocator<NotConstructible>()));
@@ -57,7 +57,7 @@ int main(int, char**)
             test_hash<NotConstructible>(8),
             test_equal_to<NotConstructible>(9)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() == (min_allocator<NotConstructible>()));

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal_allocator.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal_allocator.pass.cpp
index c3d97c579177..a8ac87868413 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal_allocator.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.cnstr/size_hash_equal_allocator.pass.cpp
@@ -37,7 +37,7 @@ int main(int, char**)
             test_equal_to<NotConstructible>(9),
             test_allocator<NotConstructible>(10)
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() == (test_allocator<NotConstructible>(10)));
@@ -59,7 +59,7 @@ int main(int, char**)
             test_equal_to<NotConstructible>(9),
             min_allocator<NotConstructible>()
            );
-        LIBCPP_ASSERT(c.bucket_count() == 7);
+        LIBCUDACXX_ASSERT(c.bucket_count() == 7);
         assert(c.hash_function() == test_hash<NotConstructible>(8));
         assert(c.key_eq() == test_equal_to<NotConstructible>(9));
         assert(c.get_allocator() == (min_allocator<NotConstructible>()));

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp
index e4d4861283f1..94eaab25c1cf 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_noexcept.pass.cpp
@@ -124,7 +124,7 @@ int main(int, char**)
         typedef std::unordered_set<MoveOnly> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::unordered_set<MoveOnly, std::hash<MoveOnly>,
                            std::equal_to<MoveOnly>, test_allocator<MoveOnly>> C;
@@ -135,7 +135,7 @@ int main(int, char**)
                           std::equal_to<MoveOnly>, other_allocator<MoveOnly>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::unordered_set<MoveOnly, some_hash<MoveOnly>> C;
         static_assert(!noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
@@ -179,12 +179,12 @@ int main(int, char**)
     typedef std::unordered_set<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc2<MoveOnly>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     { // NOT always equal allocator, nothrow swap for hash, nothrow swap for comp
     typedef std::unordered_set<MoveOnly, some_hash2<MoveOnly>, some_comp2<MoveOnly>, some_alloc3<MoveOnly>> C;
     static_assert( noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #endif
 
   return 0;

diff  --git a/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp b/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
index 49c45f2ecb25..5d25b1ccc180 100644
--- a/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
+++ b/libcxx/test/std/containers/unord/unord.set/unord.set.swap/swap_non_member.pass.cpp
@@ -36,7 +36,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -45,7 +45,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -95,7 +95,7 @@ int main(int, char**)
         assert(c1.max_load_factor() == 2);
         assert(it2 == c1.begin()); // Iterators are not invalidated
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -125,7 +125,7 @@ int main(int, char**)
         C::iterator it1 = c1.begin();
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -224,7 +224,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -233,7 +233,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -281,7 +281,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -310,7 +310,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -404,7 +404,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));
@@ -413,7 +413,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -461,7 +461,7 @@ int main(int, char**)
         assert(static_cast<std::size_t>(std::distance(c1.cbegin(), c1.cend())) == c1.size());
         assert(c1.max_load_factor() == 2);
 
-        LIBCPP_ASSERT(c2.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c2.bucket_count() == 0);
         assert(c2.size() == 0);
         assert(c2.hash_function() == Hash(1));
         assert(c2.key_eq() == Compare(1));
@@ -490,7 +490,7 @@ int main(int, char**)
         c2.max_load_factor(2);
         swap(c1, c2);
 
-        LIBCPP_ASSERT(c1.bucket_count() == 0);
+        LIBCUDACXX_ASSERT(c1.bucket_count() == 0);
         assert(c1.size() == 0);
         assert(c1.hash_function() == Hash(2));
         assert(c1.key_eq() == Compare(2));

diff  --git a/libcxx/test/std/containers/views/views.span/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/views/views.span/range_concept_conformance.compile.pass.cpp
index 0ccf63faea20..c9e8d5d29391 100644
--- a/libcxx/test/std/containers/views/views.span/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // span
 

diff  --git a/libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp b/libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp
index 14b03137a7ff..07125d83796b 100644
--- a/libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.cons/range.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===---------------------------------------------------------------------===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <span>
 

diff  --git a/libcxx/test/std/containers/views/views.span/span.elem/back.pass.cpp b/libcxx/test/std/containers/views/views.span/span.elem/back.pass.cpp
index dfc01d509210..667027839524 100644
--- a/libcxx/test/std/containers/views/views.span/span.elem/back.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.elem/back.pass.cpp
@@ -25,14 +25,14 @@
 template <typename Span>
 constexpr bool testConstexprSpan(Span sp)
 {
-    LIBCPP_ASSERT(noexcept(sp.back()));
+    LIBCUDACXX_ASSERT(noexcept(sp.back()));
     return std::addressof(sp.back()) == sp.data() + sp.size() - 1;
 }
 
 template <typename Span>
 void testRuntimeSpan(Span sp)
 {
-    LIBCPP_ASSERT(noexcept(sp.back()));
+    LIBCUDACXX_ASSERT(noexcept(sp.back()));
     assert(std::addressof(sp.back()) == sp.data() + sp.size() - 1);
 }
 

diff  --git a/libcxx/test/std/containers/views/views.span/span.elem/front.pass.cpp b/libcxx/test/std/containers/views/views.span/span.elem/front.pass.cpp
index e1c9a0c984a2..0e77bdc487b3 100644
--- a/libcxx/test/std/containers/views/views.span/span.elem/front.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.elem/front.pass.cpp
@@ -25,7 +25,7 @@
 template <typename Span>
 constexpr bool testConstexprSpan(Span sp)
 {
-    LIBCPP_ASSERT(noexcept(sp.front()));
+    LIBCUDACXX_ASSERT(noexcept(sp.front()));
     return std::addressof(sp.front()) == sp.data();
 }
 
@@ -33,7 +33,7 @@ constexpr bool testConstexprSpan(Span sp)
 template <typename Span>
 void testRuntimeSpan(Span sp)
 {
-    LIBCPP_ASSERT(noexcept(sp.front()));
+    LIBCUDACXX_ASSERT(noexcept(sp.front()));
     assert(std::addressof(sp.front()) == sp.data());
 }
 

diff  --git a/libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp b/libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp
index fdafbfc73e12..257681362532 100644
--- a/libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.elem/op_idx.pass.cpp
@@ -23,7 +23,7 @@
 template <typename Span>
 constexpr bool testConstexprSpan(Span sp, size_t idx)
 {
-    LIBCPP_ASSERT(noexcept(sp[idx]));
+    LIBCUDACXX_ASSERT(noexcept(sp[idx]));
 
     typename Span::reference r1 = sp[idx];
     typename Span::reference r2 = *(sp.data() + idx);
@@ -34,7 +34,7 @@ constexpr bool testConstexprSpan(Span sp, size_t idx)
 template <typename Span>
 void testRuntimeSpan(Span sp, size_t idx)
 {
-    LIBCPP_ASSERT(noexcept(sp[idx]));
+    LIBCUDACXX_ASSERT(noexcept(sp[idx]));
 
     typename Span::reference r1 = sp[idx];
     typename Span::reference r2 = *(sp.data() + idx);

diff  --git a/libcxx/test/std/containers/views/views.span/span.iterators/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/containers/views/views.span/span.iterators/iterator_concept_conformance.compile.pass.cpp
index 16215109da2e..6e04b0fcbb3f 100644
--- a/libcxx/test/std/containers/views/views.span/span.iterators/iterator_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.iterators/iterator_concept_conformance.compile.pass.cpp
@@ -20,7 +20,7 @@ using reverse_iterator = std::span<int>::reverse_iterator;
 using value_type = int;
 
 static_assert(std::contiguous_iterator<iterator>);
-LIBCPP_STATIC_ASSERT(std::__is_cpp17_random_access_iterator<iterator>::value);
+LIBCUDACXX_STATIC_ASSERT(std::__is_cpp17_random_access_iterator<iterator>::value);
 static_assert(std::indirectly_writable<iterator, value_type>);
 static_assert(std::sentinel_for<iterator, iterator>);
 static_assert(!std::sentinel_for<iterator, reverse_iterator>);

diff  --git a/libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp b/libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp
index 2b04cb0f7159..e2703acab13f 100644
--- a/libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.sub/first.pass.cpp
@@ -27,8 +27,8 @@
 template <typename Span, size_t Count>
 constexpr bool testConstexprSpan(Span sp)
 {
-    LIBCPP_ASSERT((noexcept(sp.template first<Count>())));
-    LIBCPP_ASSERT((noexcept(sp.first(Count))));
+    LIBCUDACXX_ASSERT((noexcept(sp.template first<Count>())));
+    LIBCUDACXX_ASSERT((noexcept(sp.first(Count))));
     auto s1 = sp.template first<Count>();
     auto s2 = sp.first(Count);
     using S1 = decltype(s1);
@@ -47,8 +47,8 @@ constexpr bool testConstexprSpan(Span sp)
 template <typename Span, size_t Count>
 void testRuntimeSpan(Span sp)
 {
-    LIBCPP_ASSERT((noexcept(sp.template first<Count>())));
-    LIBCPP_ASSERT((noexcept(sp.first(Count))));
+    LIBCUDACXX_ASSERT((noexcept(sp.template first<Count>())));
+    LIBCUDACXX_ASSERT((noexcept(sp.first(Count))));
     auto s1 = sp.template first<Count>();
     auto s2 = sp.first(Count);
     using S1 = decltype(s1);

diff  --git a/libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp b/libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp
index 6fa6edfc7e59..df70f71bb6be 100644
--- a/libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.sub/last.pass.cpp
@@ -27,8 +27,8 @@
 template <typename Span, size_t Count>
 constexpr bool testConstexprSpan(Span sp)
 {
-    LIBCPP_ASSERT((noexcept(sp.template last<Count>())));
-    LIBCPP_ASSERT((noexcept(sp.last(Count))));
+    LIBCUDACXX_ASSERT((noexcept(sp.template last<Count>())));
+    LIBCUDACXX_ASSERT((noexcept(sp.last(Count))));
     auto s1 = sp.template last<Count>();
     auto s2 = sp.last(Count);
     using S1 = decltype(s1);
@@ -47,8 +47,8 @@ constexpr bool testConstexprSpan(Span sp)
 template <typename Span, size_t Count>
 void testRuntimeSpan(Span sp)
 {
-    LIBCPP_ASSERT((noexcept(sp.template last<Count>())));
-    LIBCPP_ASSERT((noexcept(sp.last(Count))));
+    LIBCUDACXX_ASSERT((noexcept(sp.template last<Count>())));
+    LIBCUDACXX_ASSERT((noexcept(sp.last(Count))));
     auto s1 = sp.template last<Count>();
     auto s2 = sp.last(Count);
     using S1 = decltype(s1);

diff  --git a/libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp b/libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp
index f426ab633861..5c6bfb08445c 100644
--- a/libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp
+++ b/libcxx/test/std/containers/views/views.span/span.sub/subspan.pass.cpp
@@ -28,8 +28,8 @@
 template <typename Span, size_t Offset, size_t Count>
 constexpr bool testConstexprSpan(Span sp)
 {
-    LIBCPP_ASSERT((noexcept(sp.template subspan<Offset, Count>())));
-    LIBCPP_ASSERT((noexcept(sp.subspan(Offset, Count))));
+    LIBCUDACXX_ASSERT((noexcept(sp.template subspan<Offset, Count>())));
+    LIBCUDACXX_ASSERT((noexcept(sp.subspan(Offset, Count))));
     auto s1 = sp.template subspan<Offset, Count>();
     auto s2 = sp.subspan(Offset, Count);
     using S1 = decltype(s1);
@@ -47,8 +47,8 @@ constexpr bool testConstexprSpan(Span sp)
 template <typename Span, size_t Offset>
 constexpr bool testConstexprSpan(Span sp)
 {
-    LIBCPP_ASSERT((noexcept(sp.template subspan<Offset>())));
-    LIBCPP_ASSERT((noexcept(sp.subspan(Offset))));
+    LIBCUDACXX_ASSERT((noexcept(sp.template subspan<Offset>())));
+    LIBCUDACXX_ASSERT((noexcept(sp.subspan(Offset))));
     auto s1 = sp.template subspan<Offset>();
     auto s2 = sp.subspan(Offset);
     using S1 = decltype(s1);
@@ -67,8 +67,8 @@ constexpr bool testConstexprSpan(Span sp)
 template <typename Span, size_t Offset, size_t Count>
 void testRuntimeSpan(Span sp)
 {
-    LIBCPP_ASSERT((noexcept(sp.template subspan<Offset, Count>())));
-    LIBCPP_ASSERT((noexcept(sp.subspan(Offset, Count))));
+    LIBCUDACXX_ASSERT((noexcept(sp.template subspan<Offset, Count>())));
+    LIBCUDACXX_ASSERT((noexcept(sp.subspan(Offset, Count))));
     auto s1 = sp.template subspan<Offset, Count>();
     auto s2 = sp.subspan(Offset, Count);
     using S1 = decltype(s1);
@@ -86,8 +86,8 @@ void testRuntimeSpan(Span sp)
 template <typename Span, size_t Offset>
 void testRuntimeSpan(Span sp)
 {
-    LIBCPP_ASSERT((noexcept(sp.template subspan<Offset>())));
-    LIBCPP_ASSERT((noexcept(sp.subspan(Offset))));
+    LIBCUDACXX_ASSERT((noexcept(sp.template subspan<Offset>())));
+    LIBCUDACXX_ASSERT((noexcept(sp.subspan(Offset))));
     auto s1 = sp.template subspan<Offset>();
     auto s2 = sp.subspan(Offset);
     using S1 = decltype(s1);

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
index 07d27cb415bc..f94d29ceba56 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/assignment.pass.cpp
@@ -13,7 +13,7 @@
 // auto_ptr& operator=(auto_ptr& a) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
index df88e2c0427b..8458414052cc 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert.pass.cpp
@@ -13,7 +13,7 @@
 // auto_ptr(auto_ptr& a) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp
index e38742091e9e..0fdb6b15f9aa 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.compile.fail.cpp
@@ -12,7 +12,7 @@
 
 // template<class Y> auto_ptr& operator=(auto_ptr<Y>& a) throw();
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
index 85754ebc18ee..362d66a7ab6c 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/convert_assignment.pass.cpp
@@ -13,7 +13,7 @@
 // template<class Y> auto_ptr& operator=(auto_ptr<Y>& a) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp
index dd043e8d5416..fa4719252bc5 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.compile.fail.cpp
@@ -12,7 +12,7 @@
 
 // auto_ptr(auto_ptr& a) throw();
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
index 59919114abd3..0c4b9d1344e2 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/copy.pass.cpp
@@ -13,7 +13,7 @@
 // auto_ptr(auto_ptr& a) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp
index c830d82d5b29..e37cd14bb28a 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/explicit.compile.fail.cpp
@@ -12,7 +12,7 @@
 
 // explicit auto_ptr(X* p =0) throw();
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
index d337366a6b92..fd7077af7180 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.cons/pointer.pass.cpp
@@ -13,7 +13,7 @@
 // explicit auto_ptr(X* p =0) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
index 3b1bc9a884f4..30c6e878df5f 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/assign_from_auto_ptr_ref.pass.cpp
@@ -13,7 +13,7 @@
 // auto_ptr& operator=(auto_ptr_ref<X> r) throw()
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
index e19c1708d567..85963c10b4cb 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_from_auto_ptr_ref.pass.cpp
@@ -13,7 +13,7 @@
 // auto_ptr(auto_ptr_ref<X> r) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
index 115716c2a109..92ce687d65e2 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr.pass.cpp
@@ -13,7 +13,7 @@
 // template<class Y> operator auto_ptr<Y>() throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
index b3e8d95f1843..2b5374816820 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.conv/convert_to_auto_ptr_ref.pass.cpp
@@ -13,7 +13,7 @@
 // template<class Y> operator auto_ptr_ref<Y>() throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
index d06f44a0f832..368869ac2380 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/arrow.pass.cpp
@@ -13,7 +13,7 @@
 // X& operator*() const throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
index 290a5132b658..a05d081491b3 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/deref.pass.cpp
@@ -13,7 +13,7 @@
 // X& operator*() const throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
index 960ee0e738c8..ff3f4fe8832d 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/release.pass.cpp
@@ -13,7 +13,7 @@
 // X* release() throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
index 1b5a09525b75..9e4ae3ee3ea6 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/auto.ptr.members/reset.pass.cpp
@@ -13,7 +13,7 @@
 // void reset(X* p=0) throw();
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
index 4f1653944687..b06c95bd413d 100644
--- a/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
+++ b/libcxx/test/std/depr/depr.auto.ptr/auto.ptr/element_type.pass.cpp
@@ -17,7 +17,7 @@
 // };
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.compile.fail.cpp
index 298d0593e02b..f776664b8f0b 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.cxx1z.compile.fail.cpp
@@ -10,7 +10,7 @@
 // pointer_to_binary_function
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
index 2faf6f6d9062..23b6c6670c5e 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_binary_function.pass.cpp
@@ -11,7 +11,7 @@
 // pointer_to_binary_function
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.compile.fail.cpp
index dedc7f01bbef..a886432f5578 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.cxx1z.compile.fail.cpp
@@ -10,7 +10,7 @@
 // pointer_to_unary_function
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
index 0b6b32b55f82..7d889e1094aa 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/pointer_to_unary_function.pass.cpp
@@ -11,7 +11,7 @@
 // pointer_to_unary_function
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.compile.fail.cpp
index e6e82650d34b..6b72985b82cd 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.cxx1z.compile.fail.cpp
@@ -13,7 +13,7 @@
 // ptr_fun(Result (*f)(Arg));
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
index 78fe36515acc..9359ec3865f4 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun1.pass.cpp
@@ -13,7 +13,7 @@
 // ptr_fun(Result (*f)(Arg));
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.compile.fail.cpp
index 155f2ef839b8..99127ca77a8b 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.cxx1z.compile.fail.cpp
@@ -13,7 +13,7 @@
 // ptr_fun(Result (*f)(Arg1, Arg2));
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
index 80285fa2cdb2..05afe0dcaf5e 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.function.pointer.adaptors/ptr_fun2.pass.cpp
@@ -13,7 +13,7 @@
 // ptr_fun(Result (*f)(Arg1, Arg2));
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.compile.fail.cpp
index ef8dc40a1427..0b25cbff8b13 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.cxx1z.compile.fail.cpp
@@ -14,7 +14,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
index 8746f5980d59..069a1fcb89c0 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun.pass.cpp
@@ -13,7 +13,7 @@
 //   mem_fun(S (T::*f)() const);
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.compile.fail.cpp
index 58df539498ff..7ad2e7399246 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.cxx1z.compile.fail.cpp
@@ -14,7 +14,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
index d888fc2c071b..f6fe130b1197 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1.pass.cpp
@@ -13,7 +13,7 @@
 //   mem_fun(S (T::*f)(A) const);
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.compile.fail.cpp
index 114acbde9741..cf0ee081cd2c 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.cxx1z.compile.fail.cpp
@@ -12,7 +12,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
index ae311260830a..9b21b12ae3aa 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_ref_t.pass.cpp
@@ -11,7 +11,7 @@
 // const_mem_fun1_ref_t
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.compile.fail.cpp
index 7e875c151133..8e3a766a3024 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.cxx1z.compile.fail.cpp
@@ -12,7 +12,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
index 60c00ee8c531..da6f8bfd9d97 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun1_t.pass.cpp
@@ -11,7 +11,7 @@
 // const_mem_fun1_t
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.compile.fail.cpp
index 061b4842f912..2beca0e091c5 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.cxx1z.compile.fail.cpp
@@ -14,7 +14,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
index ece3eca71620..2d5d969dc012 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref.pass.cpp
@@ -13,7 +13,7 @@
 //   mem_fun_ref(S (T::*f)() const);
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.compile.fail.cpp
index 7257dcf766d2..612c0b7b6396 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.cxx1z.compile.fail.cpp
@@ -14,7 +14,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
index d27f38e2cdef..c0a6e336bba0 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref1.pass.cpp
@@ -13,7 +13,7 @@
 //   mem_fun_ref(S (T::*f)(A) const);
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.compile.fail.cpp
index 3838af909364..027cb3bf99fb 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.cxx1z.compile.fail.cpp
@@ -12,7 +12,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
index 6830a07352a1..226b2289b613 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_ref_t.pass.cpp
@@ -11,7 +11,7 @@
 // const_mem_fun_ref_t
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.compile.fail.cpp
index 107528fb8fe1..fe63b7386ec1 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.cxx1z.compile.fail.cpp
@@ -12,7 +12,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
index 7b5842e8c3e9..90f52f24f614 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/const_mem_fun_t.pass.cpp
@@ -11,7 +11,7 @@
 // const_mem_fun_t
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.compile.fail.cpp
index c72c29f6da47..95cb8e7d4305 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.cxx1z.compile.fail.cpp
@@ -14,7 +14,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
index 987cd36cef5d..040e8e613816 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun.pass.cpp
@@ -13,7 +13,7 @@
 //   mem_fun(S (T::*f)());
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.compile.fail.cpp
index 2d6fe13c8142..116ccdaac403 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.cxx1z.compile.fail.cpp
@@ -14,7 +14,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
index 5cdb2043f5c5..80eff801bdaf 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1.pass.cpp
@@ -13,7 +13,7 @@
 //   mem_fun(S (T::*f)(A));
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.compile.fail.cpp
index fe633f44610d..9e03ff4e7788 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.cxx1z.compile.fail.cpp
@@ -12,7 +12,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
index 915ce5b5ab1c..62962fef0072 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_ref_t.pass.cpp
@@ -11,7 +11,7 @@
 // mem_fun1_ref_t
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.compile.fail.cpp
index 61d38e0a4d00..fde6d77901f5 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.cxx1z.compile.fail.cpp
@@ -12,7 +12,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
index e36ecec59282..366351a79d7e 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun1_t.pass.cpp
@@ -11,7 +11,7 @@
 // mem_fun1_t
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.compile.fail.cpp
index fd6947076665..8f19b41a2beb 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.cxx1z.compile.fail.cpp
@@ -14,7 +14,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
index f989cd0ebecf..bc6ee89596e2 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref.pass.cpp
@@ -13,7 +13,7 @@
 //   mem_fun_ref(S (T::*f)());
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.compile.fail.cpp
index c4ac53c6f3f5..390fddaaa9c5 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.cxx1z.compile.fail.cpp
@@ -14,7 +14,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
index b2542398b2a8..3ae68eedea20 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref1.pass.cpp
@@ -13,7 +13,7 @@
 //   mem_fun_ref(S (T::*f)(A));
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.compile.fail.cpp
index b87821e8bd93..e97b2e263a56 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.cxx1z.compile.fail.cpp
@@ -12,7 +12,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
index 645ca9f4e1bd..9147bb047cf3 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_ref_t.pass.cpp
@@ -11,7 +11,7 @@
 // mem_fun_ref_t
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.compile.fail.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.compile.fail.cpp
index d7f2be2db624..c729ec05f69f 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.compile.fail.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.cxx1z.compile.fail.cpp
@@ -12,7 +12,7 @@
 // Removed in c++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
index 3497bcf4b338..0a3de190abda 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.adaptors/depr.member.pointer.adaptors/mem_fun_t.pass.cpp
@@ -11,7 +11,7 @@
 // mem_fun_t
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp
index 3185de2b011e..41e60f4e4b25 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.base/binary_function.pass.cpp
@@ -10,7 +10,7 @@
 // REQUIRES: c++03 || c++11 || c++14
 // binary_function was removed in C++17
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Arg1, class Arg2, class Result>
 // struct binary_function

diff  --git a/libcxx/test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp b/libcxx/test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp
index bcc4a04ea48b..cb4e0ebc7226 100644
--- a/libcxx/test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp
+++ b/libcxx/test/std/depr/depr.function.objects/depr.base/unary_function.pass.cpp
@@ -10,7 +10,7 @@
 // REQUIRES: c++03 || c++11 || c++14
 // unary_function was removed in C++17
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Arg, class Result>
 // struct unary_function

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.verify.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.verify.cpp
index 93cfbb60a7d7..da8ca9491a2e 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.depr_in_cxx11.verify.cpp
@@ -11,7 +11,7 @@
 // bind1st
 
 // UNSUPPORTED: c++03
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS
 
 #include <functional>
 

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
index 39a0b1715740..8fc11d126270 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.1st/bind1st.pass.cpp
@@ -13,7 +13,7 @@
 //   bind1st(const Fn& fn, const T& x);
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.verify.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.verify.cpp
index 3e55db60572d..2ad7a5a2ce22 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.depr_in_cxx11.verify.cpp
@@ -11,7 +11,7 @@
 // bind2nd
 
 // UNSUPPORTED: c++03
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS
 
 #include <functional>
 

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
index b7cfd603b6a0..fb32d536f924 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.bind.2nd/bind2nd.pass.cpp
@@ -13,7 +13,7 @@
 //   bind2nd(const Fn& op, const T& x);
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.verify.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.verify.cpp
index 5048d7b2ea1e..a56e5be88601 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.depr_in_cxx11.verify.cpp
@@ -11,7 +11,7 @@
 // binder1st
 
 // UNSUPPORTED: c++03
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS
 
 #include <functional>
 

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
index 2f4ce6ff67f9..eb317fd9f632 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.1st/binder1st.pass.cpp
@@ -23,7 +23,7 @@
 // };
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.verify.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.verify.cpp
index 5a883ab040f4..2bbe54a9dbcf 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.verify.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.depr_in_cxx11.verify.cpp
@@ -11,7 +11,7 @@
 // binder2nd
 
 // UNSUPPORTED: c++03
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_BINDERS
 
 #include <functional>
 

diff  --git a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
index c4c65eff481d..cd14ea20803d 100644
--- a/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
+++ b/libcxx/test/std/depr/depr.lib.binders/depr.lib.binder.2nd/binder2nd.pass.cpp
@@ -23,7 +23,7 @@
 // };
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp
index 844f31e4a454..53c2d1ba63f4 100644
--- a/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp
+++ b/libcxx/test/std/depr/depr.str.strstreams/depr.strstreambuf/depr.strstreambuf.cons/default.pass.cpp
@@ -31,7 +31,7 @@ int main(int, char**)
     }
     {
         std::strstreambuf s(1024);
-        LIBCPP_ASSERT(s.str() == nullptr);
+        LIBCUDACXX_ASSERT(s.str() == nullptr);
         assert(s.pcount() == 0);
     }
 

diff  --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
index 4570d57d5cb3..ed99e7431644 100644
--- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
+++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp
@@ -28,9 +28,9 @@ void test_message_for_bad_value() {
     const std::string msg = e_cat1.message(-1);
     // Exact message format varies by platform.
 #if defined(_AIX)
-    LIBCPP_ASSERT(msg.rfind("Error -1 occurred", 0) == 0);
+    LIBCUDACXX_ASSERT(msg.rfind("Error -1 occurred", 0) == 0);
 #else
-    LIBCPP_ASSERT(msg.rfind("Unknown error", 0) == 0);
+    LIBCUDACXX_ASSERT(msg.rfind("Unknown error", 0) == 0);
 #endif
     assert(errno == E2BIG);
 }

diff  --git a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
index 415a9008d05d..de463c4daa17 100644
--- a/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
+++ b/libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp
@@ -28,9 +28,9 @@ void test_message_for_bad_value() {
     const std::string msg = e_cat1.message(-1);
     // Exact message format varies by platform.
 #if defined(_AIX)
-    LIBCPP_ASSERT(msg.rfind("Error -1 occurred", 0) == 0);
+    LIBCUDACXX_ASSERT(msg.rfind("Error -1 occurred", 0) == 0);
 #else
-    LIBCPP_ASSERT(msg.rfind("Unknown error", 0) == 0);
+    LIBCUDACXX_ASSERT(msg.rfind("Unknown error", 0) == 0);
 #endif
     assert(errno == E2BIG);
 }

diff  --git a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
index 2e07d090d23b..7522930ec1a0 100644
--- a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
+++ b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_code.pass.cpp
@@ -33,7 +33,7 @@ test(int i)
     H h;
     T ec(i, std::system_category());
     const std::size_t result = h(ec);
-    LIBCPP_ASSERT(result == static_cast<std::size_t>(i));
+    LIBCUDACXX_ASSERT(result == static_cast<std::size_t>(i));
     ((void)result); // Prevent unused warning
 }
 

diff  --git a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
index bf016e1e5583..f57dd841695c 100644
--- a/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
+++ b/libcxx/test/std/diagnostics/syserr/syserr.hash/error_condition.pass.cpp
@@ -33,7 +33,7 @@ test(int i)
     H h;
     T ec(i, std::system_category());
     const std::size_t result = h(ec);
-    LIBCPP_ASSERT(result == static_cast<std::size_t>(i));
+    LIBCUDACXX_ASSERT(result == static_cast<std::size_t>(i));
     ((void)result); // Prevent unused warning
 }
 

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp
index d5acb8f74e74..07bf2f94dd6e 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // <functional>
 

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp
index 5933b61ed3a0..deddf35079e9 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // <functional>
 

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp
index ef3315f31a20..80d040e3a9d4 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/hash.pred.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // <functional>
 

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp
index 86aa18eebdc3..0fc6860e4b8a 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore/pred.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // <functional>
 

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp
index 440bc05d90e7..52597da97670 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // <functional>
 

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp
index 4677c3a0f9e2..19f2e71c6dfc 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // <functional>
 

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp
index 2191ad1e9166..244fac6be7cf 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/hash.pred.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // <functional>
 

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp
index b97f52b35d2b..fc94dc6ad80c 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.boyer_moore_horspool/pred.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // <functional>
 

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp
index 99cc8c3fd90c..98e0e8ea7996 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // <functional>
 

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp
index 5901dfb32a34..f557babe4b82 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/default.pred.pass.cpp
@@ -9,7 +9,7 @@
 // <functional>
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // default searcher
 // template<class _ForwardIterator, class _BinaryPredicate = equal_to<>>

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp
index f5ec9ff0711c..950fafb4d771 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // <functional>
 

diff  --git a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp
index 196d0281dac1..65da68323f85 100644
--- a/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp
+++ b/libcxx/test/std/experimental/func/func.searchers/func.searchers.default/func.searchers.default.creation/make_default_searcher.pred.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_NO_EXPERIMENTAL_DEPRECATION_WARNING_SEARCHERS
 
 // <functional>
 

diff  --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp
index ecb34ecf4fc4..7c9a9c713ccf 100644
--- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp
+++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp
@@ -31,7 +31,7 @@ void do_test(coro::coroutine_handle<Promise> const& H) {
   // FIXME Add a runtime test
   {
     ASSERT_SAME_TYPE(decltype(H.done()), bool);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.done());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(H.done());
   }
 }
 

diff  --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp
index d493e1c9536e..b954ae530b81 100644
--- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp
+++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp
@@ -65,12 +65,12 @@ void do_test(coro::coroutine_handle<Promise>&& H) {
   // FIXME Add a runtime test
   {
     ASSERT_SAME_TYPE(decltype(H.promise()), Promise&);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.promise());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(H.promise());
   }
   {
     auto const& CH = H;
     ASSERT_SAME_TYPE(decltype(CH.promise()), Promise&);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(CH.promise());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(CH.promise());
   }
 }
 

diff  --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp
index 3a27f2af2026..5a08b1b53ac1 100644
--- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp
+++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp
@@ -42,7 +42,7 @@ void do_test(coro::coroutine_handle<Promise>&& H) {
   // FIXME Add a runtime test
   {
     ASSERT_SAME_TYPE(decltype(H.destroy()), void);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.destroy());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(H.destroy());
     static_assert(has_destroy<HType&>(), "");
     static_assert(has_destroy<HType&&>(), "");
   }

diff  --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp
index 77d8d634eb17..d97335c1aa41 100644
--- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp
+++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp
@@ -56,8 +56,8 @@ void do_test(coro::coroutine_handle<Promise>&& H) {
   {
     ASSERT_SAME_TYPE(decltype(H.resume()), void);
     ASSERT_SAME_TYPE(decltype(H()), void);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.resume());
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(H.resume());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(H());
     static_assert(has_resume<HType&>(), "");
     static_assert(has_resume<HType&&>(), "");
     static_assert(has_call_operator<HType&>(), "");

diff  --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp
index 7e7eb610eea9..7aa7c104ad09 100644
--- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp
+++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp
@@ -35,19 +35,19 @@ int main(int, char**)
   S s{};
   S const& cs = s;
   {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_ready()), "");
+    LIBCUDACXX_STATIC_ASSERT(noexcept(s.await_ready()), "");
     static_assert(std::is_same<decltype(s.await_ready()), bool>::value, "");
     assert(s.await_ready() == false);
     assert(cs.await_ready() == false);
   }
   {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_suspend(h)), "");
+    LIBCUDACXX_STATIC_ASSERT(noexcept(s.await_suspend(h)), "");
     static_assert(std::is_same<decltype(s.await_suspend(h)), void>::value, "");
     s.await_suspend(h);
     cs.await_suspend(h);
   }
   {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_resume()), "");
+    LIBCUDACXX_STATIC_ASSERT(noexcept(s.await_resume()), "");
     static_assert(std::is_same<decltype(s.await_resume()), void>::value, "");
     s.await_resume();
     cs.await_resume();

diff  --git a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp
index 2acad5ed2523..7759f310b65f 100644
--- a/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp
+++ b/libcxx/test/std/experimental/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp
@@ -36,19 +36,19 @@ int main(int, char**)
   S s{};
   S const& cs = s;
   {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_ready()), "");
+    LIBCUDACXX_STATIC_ASSERT(noexcept(s.await_ready()), "");
     static_assert(std::is_same<decltype(s.await_ready()), bool>::value, "");
     assert(s.await_ready() == true);
     assert(cs.await_ready() == true);
   }
   {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_suspend(h)), "");
+    LIBCUDACXX_STATIC_ASSERT(noexcept(s.await_suspend(h)), "");
     static_assert(std::is_same<decltype(s.await_suspend(h)), void>::value, "");
     s.await_suspend(h);
     cs.await_suspend(h);
   }
   {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_resume()), "");
+    LIBCUDACXX_STATIC_ASSERT(noexcept(s.await_resume()), "");
     static_assert(std::is_same<decltype(s.await_resume()), void>::value, "");
     s.await_resume();
     cs.await_resume();

diff  --git a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp
index 105ca8a51033..9835181f3412 100644
--- a/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp
+++ b/libcxx/test/std/experimental/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp
@@ -8,7 +8,7 @@
 
 // UNSUPPORTED: c++03, c++11
 
-// XFAIL: libcpp-has-debug-mode
+// XFAIL: LIBCUDACXX-has-debug-mode
 
 #include <experimental/coroutine>
 #include <vector>

diff  --git a/libcxx/test/std/experimental/simd/simd.abi/vector_extension.pass.cpp b/libcxx/test/std/experimental/simd/simd.abi/vector_extension.pass.cpp
index 35a45381a015..a48d232a5367 100644
--- a/libcxx/test/std/experimental/simd/simd.abi/vector_extension.pass.cpp
+++ b/libcxx/test/std/experimental/simd/simd.abi/vector_extension.pass.cpp
@@ -27,7 +27,7 @@ constexpr inline int reg_width() {
 #endif
 }
 
-#ifndef _LIBCPP_HAS_NO_VECTOR_EXTENSION
+#ifndef _LIBCUDACXX_HAS_NO_VECTOR_EXTENSION
 
 static_assert(
     sizeof(ex::simd<char, ex::__simd_abi<ex::_StorageKind::_VecExt, 1>>) == 1,

diff  --git a/libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp b/libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp
index 7e27adfab197..ca229e52b60b 100644
--- a/libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp
+++ b/libcxx/test/std/experimental/utilities/utility/utility.synop/includes.pass.cpp
@@ -12,7 +12,7 @@
 
 #include "test_macros.h"
 
-#ifndef _LIBCPP_UTILITY
+#ifndef _LIBCUDACXX_UTILITY
 #   error "<experimental/utility> must include <utility>"
 #endif
 

diff  --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp
index 03aff1681227..c5dd943130a4 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/pbackfail.pass.cpp
@@ -43,7 +43,7 @@ int main(int, char**)
         assert(f.sbumpc() == '1');
         assert(f.sgetc() == '2');
         typename test_buf<char>::int_type pbackResult = f.pbackfail('a');
-        LIBCPP_ASSERT(pbackResult == -1);
+        LIBCUDACXX_ASSERT(pbackResult == -1);
         if (pbackResult != -1) {
             assert(f.sbumpc() == 'a');
             assert(f.sgetc() == '2');
@@ -56,7 +56,7 @@ int main(int, char**)
         assert(f.sbumpc() == '1');
         assert(f.sgetc() == '2');
         typename test_buf<char>::int_type pbackResult = f.pbackfail('a');
-        LIBCPP_ASSERT(pbackResult == 'a');
+        LIBCUDACXX_ASSERT(pbackResult == 'a');
         if (pbackResult != -1) {
             assert(f.sbumpc() == 'a');
             assert(f.sgetc() == '2');

diff  --git a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp
index 475974e3acd3..48c4d5a33b95 100644
--- a/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp
+++ b/libcxx/test/std/input.output/file.streams/fstreams/filebuf.virtuals/seekoff.pass.cpp
@@ -31,7 +31,7 @@ int main(int, char**)
                                                        | std::ios_base::trunc) != 0);
         assert(f.is_open());
         f.sputn("abcdefghijklmnopqrstuvwxyz", 26);
-        LIBCPP_ASSERT(buf[0] == 'v');
+        LIBCUDACXX_ASSERT(buf[0] == 'v');
         pos_type p = f.pubseekoff(-15, std::ios_base::cur);
         assert(p == 11);
         assert(f.sgetc() == 'l');
@@ -54,7 +54,7 @@ int main(int, char**)
                                                        | std::ios_base::trunc) != 0);
         assert(f.is_open());
         f.sputn(L"abcdefghijklmnopqrstuvwxyz", 26);
-        LIBCPP_ASSERT(buf[0] == L'v');
+        LIBCUDACXX_ASSERT(buf[0] == L'v');
         pos_type p = f.pubseekoff(-15, std::ios_base::cur);
         assert(p == 11);
         assert(f.sgetc() == L'l');

diff  --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/path.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/path.pass.cpp
index 19148e7c779d..fcc47f1b2c53 100644
--- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/path.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.cons/path.pass.cpp
@@ -87,7 +87,7 @@ TEST_CASE(path_ctor_calls_refresh) {
     directory_entry ent_ec(file, ec);
     TEST_CHECK(!ec);
 
-    LIBCPP_ONLY(remove(file));
+    LIBCUDACXX_ONLY(remove(file));
 
     TEST_CHECK(ent.exists());
     TEST_CHECK(ent_ec.exists());
@@ -104,8 +104,8 @@ TEST_CASE(path_ctor_calls_refresh) {
     directory_entry ent_ec(sym, ec);
     TEST_CHECK(!ec);
 
-    LIBCPP_ONLY(remove(file));
-    LIBCPP_ONLY(remove(sym));
+    LIBCUDACXX_ONLY(remove(file));
+    LIBCUDACXX_ONLY(remove(sym));
 
     TEST_CHECK(ent.is_symlink());
     TEST_CHECK(ent_ec.is_symlink());

diff  --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/assign.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/assign.pass.cpp
index 1ab9a919fc20..5985aa09cd7b 100644
--- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/assign.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/assign.pass.cpp
@@ -80,7 +80,7 @@ TEST_CASE(test_assign_calls_refresh) {
     ent.assign(file);
 
     // removing the file demonstrates that the values where cached previously.
-    LIBCPP_ONLY(remove(file));
+    LIBCUDACXX_ONLY(remove(file));
 
     TEST_CHECK(ent.is_regular_file());
   }
@@ -89,8 +89,8 @@ TEST_CASE(test_assign_calls_refresh) {
     directory_entry ent;
     ent.assign(sym);
 
-    LIBCPP_ONLY(remove(file));
-    LIBCPP_ONLY(remove(sym));
+    LIBCUDACXX_ONLY(remove(file));
+    LIBCUDACXX_ONLY(remove(sym));
 
     TEST_CHECK(ent.is_symlink());
     TEST_CHECK(ent.is_regular_file());

diff  --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp
index 56fda262bdd1..707c4f1d0241 100644
--- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/refresh.pass.cpp
@@ -120,7 +120,7 @@ TEST_CASE(refresh_on_bad_symlink) {
   // test file doesn't exist
   {
     directory_entry ent(sym);
-    LIBCPP_ONLY(remove(file));
+    LIBCUDACXX_ONLY(remove(file));
     TEST_CHECK(ent.is_symlink());
     TEST_CHECK(ent.is_regular_file());
     TEST_CHECK(ent.exists());
@@ -128,7 +128,7 @@ TEST_CASE(refresh_on_bad_symlink) {
     remove_if_exists(file);
     ent.refresh();
 
-    LIBCPP_ONLY(permissions(dir, perms::none));
+    LIBCUDACXX_ONLY(permissions(dir, perms::none));
     TEST_CHECK(ent.is_symlink());
 #ifndef TEST_WIN_NO_FILESYSTEM_PERMS_NONE
     TEST_CHECK(!ent.is_regular_file());
@@ -139,7 +139,7 @@ TEST_CASE(refresh_on_bad_symlink) {
   env.create_file("dir/file", 101);
   {
     directory_entry ent(sym);
-    LIBCPP_ONLY(remove(file));
+    LIBCUDACXX_ONLY(remove(file));
     TEST_CHECK(ent.is_symlink());
     TEST_CHECK(ent.is_regular_file());
     TEST_CHECK(ent.exists());
@@ -150,7 +150,7 @@ TEST_CASE(refresh_on_bad_symlink) {
     ent.refresh(ec);
     TEST_CHECK(!ec); // we don't report bad symlinks as an error.
 
-    LIBCPP_ONLY(permissions(dir, perms::none));
+    LIBCUDACXX_ONLY(permissions(dir, perms::none));
 #ifndef TEST_WIN_NO_FILESYSTEM_PERMS_NONE
     TEST_CHECK(!ent.exists());
 #endif

diff  --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/replace_filename.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/replace_filename.pass.cpp
index 564e0e21ad6c..94b90416731c 100644
--- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/replace_filename.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.mods/replace_filename.pass.cpp
@@ -104,7 +104,7 @@ TEST_CASE(test_replace_filename_calls_refresh) {
     TEST_REQUIRE(ent.path() == file_two);
 
     // removing the file demonstrates that the values where cached previously.
-    LIBCPP_ONLY(remove(file_two));
+    LIBCUDACXX_ONLY(remove(file_two));
 
     TEST_CHECK(ent.file_size() == 101);
   }
@@ -114,8 +114,8 @@ TEST_CASE(test_replace_filename_calls_refresh) {
     ent.replace_filename(sym_two.filename());
     TEST_REQUIRE(ent.path() == sym_two);
 
-    LIBCPP_ONLY(remove(file_two));
-    LIBCPP_ONLY(remove(sym_two));
+    LIBCUDACXX_ONLY(remove(file_two));
+    LIBCUDACXX_ONLY(remove(sym_two));
 
     TEST_CHECK(ent.is_symlink());
     TEST_CHECK(ent.is_regular_file());

diff  --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
index c1e9130a3136..d6a81a861ca9 100644
--- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/file_size.pass.cpp
@@ -57,7 +57,7 @@ TEST_CASE(basic) {
     TEST_CHECK(expect == 42);
 
     // Remove the file to show that the results were already in the cache.
-    LIBCPP_ONLY(remove(file));
+    LIBCUDACXX_ONLY(remove(file));
 
     std::error_code ec = GetTestEC();
     TEST_CHECK(ent.file_size(ec) == expect);
@@ -70,7 +70,7 @@ TEST_CASE(basic) {
     uintmax_t expect = file_size(ent);
     TEST_CHECK(expect == 99);
 
-    LIBCPP_ONLY(remove(ent));
+    LIBCUDACXX_ONLY(remove(ent));
 
     std::error_code ec = GetTestEC();
     TEST_CHECK(ent.file_size(ec) == 99);

diff  --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
index bd3166850495..a1d87206326a 100644
--- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/hard_link_count.pass.cpp
@@ -56,7 +56,7 @@ TEST_CASE(basic) {
     uintmax_t expect = hard_link_count(ent);
 
     // Remove the file to show that the results were already in the cache.
-    LIBCPP_ONLY(remove(file));
+    LIBCUDACXX_ONLY(remove(file));
 
     std::error_code ec = GetTestEC();
     TEST_CHECK(ent.hard_link_count(ec) == expect);
@@ -66,7 +66,7 @@ TEST_CASE(basic) {
     directory_entry ent(dir);
     uintmax_t expect = hard_link_count(ent);
 
-    LIBCPP_ONLY(remove(dir));
+    LIBCUDACXX_ONLY(remove(dir));
 
     std::error_code ec = GetTestEC();
     TEST_CHECK(ent.hard_link_count(ec) == expect);
@@ -98,7 +98,7 @@ TEST_CASE(not_regular_file) {
 
     uintmax_t expect = hard_link_count(p);
 
-    LIBCPP_ONLY(permissions(dir, perms::none));
+    LIBCUDACXX_ONLY(permissions(dir, perms::none));
 
     std::error_code ec = GetTestEC();
     TEST_CHECK(ent.hard_link_count(ec) == expect);

diff  --git a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
index dc0a1f7d89a4..ed65bd5120f5 100644
--- a/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.directory_entry/directory_entry.obs/last_write_time.pass.cpp
@@ -57,7 +57,7 @@ TEST_CASE(basic) {
     file_time_type expect = last_write_time(ent);
 
     // Remove the file to show that the results were already in the cache.
-    LIBCPP_ONLY(remove(file));
+    LIBCUDACXX_ONLY(remove(file));
 
     std::error_code ec = GetTestEC();
     TEST_CHECK(ent.last_write_time(ec) == expect);
@@ -67,7 +67,7 @@ TEST_CASE(basic) {
     directory_entry ent(dir);
     file_time_type expect = last_write_time(ent);
 
-    LIBCPP_ONLY(remove(dir));
+    LIBCUDACXX_ONLY(remove(dir));
 
     std::error_code ec = GetTestEC();
     TEST_CHECK(ent.last_write_time(ec) == expect);

diff  --git a/libcxx/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp
index b2329a49ee1a..d92af561e32f 100644
--- a/libcxx/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.directory_iterator/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // directory_iterator
 

diff  --git a/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp
index cff339a47971..b562f6a506d3 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.itr/iterator.pass.cpp
@@ -35,9 +35,9 @@ void checkIteratorConcepts() {
   static_assert(std::bidirectional_iterator<It>);
 #endif
   ASSERT_SAME_TYPE(Traits::value_type, path);
-  LIBCPP_STATIC_ASSERT(std::is_same<Traits::iterator_category, std::input_iterator_tag>::value, "");
-  LIBCPP_STATIC_ASSERT(std::is_same<Traits::pointer, path const*>::value, "");
-  LIBCPP_STATIC_ASSERT(std::is_same<Traits::reference, path>::value, "");
+  LIBCUDACXX_STATIC_ASSERT(std::is_same<Traits::iterator_category, std::input_iterator_tag>::value, "");
+  LIBCUDACXX_STATIC_ASSERT(std::is_same<Traits::pointer, path const*>::value, "");
+  LIBCUDACXX_STATIC_ASSERT(std::is_same<Traits::reference, path>::value, "");
   {
     It it;
     ASSERT_SAME_TYPE(It&, decltype(++it));

diff  --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
index afbad4c062df..03be5164bc40 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.append.pass.cpp
@@ -394,9 +394,9 @@ int main(int, char**)
   }
   for (auto const & TC : LongLHSCases) {
     (void)TC;
-    LIBCPP_ONLY(doAppendSourceAllocTest<char>(TC));
+    LIBCUDACXX_ONLY(doAppendSourceAllocTest<char>(TC));
 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
-    LIBCPP_ONLY(doAppendSourceAllocTest<wchar_t>(TC));
+    LIBCUDACXX_ONLY(doAppendSourceAllocTest<wchar_t>(TC));
 #endif
   }
   test_sfinae();

diff  --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp
index 68c24426b423..e22d47cd7deb 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.assign/source.pass.cpp
@@ -229,7 +229,7 @@ void RunStringMoveTest(const fs::path::value_type* Expect) {
   assert(p == Expect);
   {
     // Signature test
-    LIBCPP_ONLY(ASSERT_NOEXCEPT(p = std::move(ss)));
+    LIBCUDACXX_ONLY(ASSERT_NOEXCEPT(p = std::move(ss)));
   }
 }
 

diff  --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp
index cf27cd28a74a..cf7b150f1661 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.charconv.pass.cpp
@@ -8,7 +8,7 @@
 
 // UNSUPPORTED: no-localization
 // UNSUPPORTED: c++03
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <filesystem>
 

diff  --git a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
index 5c0fb2070b21..014d38e433ef 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.member/path.concat.pass.cpp
@@ -375,7 +375,7 @@ int main(int, char**)
       const char* E = TC.expect;
       PathReserve(LHS, StrLen(E) + 5);
       {
-        LIBCPP_ONLY(DisableAllocationGuard g);
+        LIBCUDACXX_ONLY(DisableAllocationGuard g);
         path& Ref = (LHS += RHS);
         assert(&Ref == &LHS);
       }
@@ -387,15 +387,15 @@ int main(int, char**)
       const char* E = TC.expect;
       PathReserve(LHS, StrLen(E) + 5);
       {
-        LIBCPP_ONLY(DisableAllocationGuard g);
+        LIBCUDACXX_ONLY(DisableAllocationGuard g);
         path& Ref = (LHS += RHS);
         assert(&Ref == &LHS);
       }
       assert(LHS == E);
     }
-    LIBCPP_ONLY(doConcatSourceAllocTest<char>(TC));
+    LIBCUDACXX_ONLY(doConcatSourceAllocTest<char>(TC));
 #ifndef TEST_HAS_NO_WIDE_CHARACTERS
-    LIBCPP_ONLY(doConcatSourceAllocTest<wchar_t>(TC));
+    LIBCUDACXX_ONLY(doConcatSourceAllocTest<wchar_t>(TC));
 #endif
   }
   for (auto const& TC : CharTestCases) {

diff  --git a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp
index be502a782a97..663195d99f33 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/path.nonmember/path.factory.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <filesystem>
 
@@ -49,7 +49,7 @@ int main(int, char**)
     path p = fs::u8path(In3, In3End);
     assert(p == In1);
   }
-#if TEST_STD_VER > 17 && defined(__cpp_char8_t) && defined(_LIBCPP_VERSION) && !defined(TEST_HAS_NO_LOCALIZATION)
+#if TEST_STD_VER > 17 && defined(__cpp_char8_t) && defined(_LIBCUDACXX_VERSION) && !defined(TEST_HAS_NO_LOCALIZATION)
   const char8_t* u8In1 = u8"abcd/efg";
   const std::u8string u8In2(u8In1);
   const auto u8In3 = u8In2.begin();

diff  --git a/libcxx/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp
index c4796abd4923..d00fe656142a 100644
--- a/libcxx/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.path/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // path
 

diff  --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp
index 89cb27e3ef98..f74ac674f542 100644
--- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // recursive_directory_iterator
 

diff  --git a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp
index 82c82c71b181..416041a2e3ae 100644
--- a/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/class.rec.dir.itr/rec.dir.itr.members/recursion_pending.pass.cpp
@@ -154,7 +154,7 @@ TEST_CASE(pop_does_not_reset_value)
     // to call recursion_pending().
     if (it == endIt) {
         TEST_CHECK(notSeenDepth0.empty());
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
         TEST_CHECK(it.recursion_pending() == false);
 #endif
     } else {

diff  --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.copy_options.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.copy_options.pass.cpp
index 52903efb0d5f..ae8bc4c5664a 100644
--- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.copy_options.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.copy_options.pass.cpp
@@ -30,32 +30,32 @@ int main(int, char**) {
   typedef std::underlying_type<E>::type UT;
   static_assert(!std::is_convertible<E, UT>::value, "");
 
-  LIBCPP_ONLY(static_assert(std::is_same<UT, unsigned short>::value, "")); // Implementation detail
+  LIBCUDACXX_ONLY(static_assert(std::is_same<UT, unsigned short>::value, "")); // Implementation detail
 
   typedef check_bitmask_type<E, E::skip_existing, E::update_existing> BitmaskTester;
   assert(BitmaskTester::check());
 
   // The standard doesn't specify the numeric values of the enum.
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
           E::none == ME(0),
         "Expected enumeration values do not match");
   // Option group for copy_file
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
           E::skip_existing      == ME(1) &&
           E::overwrite_existing == ME(2) &&
           E::update_existing    == ME(4),
         "Expected enumeration values do not match");
   // Option group for copy on directories
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
           E::recursive == ME(8),
         "Expected enumeration values do not match");
   // Option group for copy on symlinks
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
           E::copy_symlinks == ME(16) &&
           E::skip_symlinks == ME(32),
         "Expected enumeration values do not match");
   // Option group for changing form of copy
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
           E::directories_only    == ME(64) &&
           E::create_symlinks     == ME(128) &&
           E::create_hard_links   == ME(256),

diff  --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp
index a9eee7980ace..5ab41de646a6 100644
--- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.directory_options.pass.cpp
@@ -30,7 +30,7 @@ int main(int, char**) {
   // Check that E is a scoped enum by checking for conversions.
   typedef std::underlying_type<E>::type UT;
   static_assert(!std::is_convertible<E, UT>::value, "");
-  LIBCPP_ONLY(static_assert(std::is_same<UT, unsigned char>::value, ""));
+  LIBCUDACXX_ONLY(static_assert(std::is_same<UT, unsigned char>::value, ""));
 
   typedef check_bitmask_type<E, E::follow_directory_symlink, E::skip_permission_denied> BitmaskTester;
   assert(BitmaskTester::check());

diff  --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.file_type.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.file_type.pass.cpp
index 81e7227deaeb..5cb81d26294b 100644
--- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.file_type.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.file_type.pass.cpp
@@ -29,10 +29,10 @@ int main(int, char**) {
   typedef std::underlying_type<E>::type UT;
   static_assert(!std::is_convertible<E, UT>::value, "");
 
-  LIBCPP_ONLY(static_assert(std::is_same<UT, signed char>::value, "")); // Implementation detail
+  LIBCUDACXX_ONLY(static_assert(std::is_same<UT, signed char>::value, "")); // Implementation detail
 
   // The standard doesn't specify the numeric values of the enum.
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
           E::none == ME(0) &&
           E::not_found == ME(-1) &&
           E::regular == ME(1) &&

diff  --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
index 210d28af7bd4..72c726177588 100644
--- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.path.format.pass.cpp
@@ -25,7 +25,7 @@ int main(int, char**) {
 
   typedef std::underlying_type<E>::type UT;
 
-  LIBCPP_ONLY(static_assert(std::is_same<UT, unsigned char>::value, "")); // Implementation detail
+  LIBCUDACXX_ONLY(static_assert(std::is_same<UT, unsigned char>::value, "")); // Implementation detail
 
   static_assert(
           E::auto_format   != E::native_format &&

diff  --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp
index 99d695040bda..3302edaa154c 100644
--- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.perm_options.pass.cpp
@@ -33,7 +33,7 @@ int main(int, char**) {
   typedef std::underlying_type<E>::type UT;
   static_assert(!std::is_convertible<E, UT>::value, "");
 
-  LIBCPP_ONLY(static_assert(std::is_same<UT, unsigned char >::value, "")); // Implementation detail
+  LIBCUDACXX_ONLY(static_assert(std::is_same<UT, unsigned char >::value, "")); // Implementation detail
 
   typedef check_bitmask_type<E, E::replace, E::nofollow> BitmaskTester;
   assert(BitmaskTester::check());

diff  --git a/libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp
index ca990cb2d3bb..b56d946f00fb 100644
--- a/libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.enum/enum.perms.pass.cpp
@@ -31,7 +31,7 @@ int main(int, char**) {
   typedef std::underlying_type<E>::type UT;
   static_assert(!std::is_convertible<E, UT>::value, "");
 
-  LIBCPP_ONLY(static_assert(std::is_same<UT, unsigned >::value, "")); // Implementation detail
+  LIBCUDACXX_ONLY(static_assert(std::is_same<UT, unsigned >::value, "")); // Implementation detail
 
   typedef check_bitmask_type<E, E::group_all, E::owner_all> BitmaskTester;
   assert(BitmaskTester::check());

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
index 4b597fc2e982..aa3c4a7087fb 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.absolute/absolute.pass.cpp
@@ -51,7 +51,7 @@ TEST_CASE(basic_test)
         TEST_CHECK(!ec);
         TEST_CHECK(ret.is_absolute());
         TEST_CHECK(PathEqIgnoreSep(ret, TC.expect));
-        LIBCPP_ONLY(TEST_CHECK(PathEq(ret, TC.expect)));
+        LIBCUDACXX_ONLY(TEST_CHECK(PathEq(ret, TC.expect)));
     }
 }
 

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
index 707b646be179..0a196bef851a 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.canonical/canonical.pass.cpp
@@ -103,7 +103,7 @@ TEST_CASE(test_exception_contains_paths)
     } catch (filesystem_error const& err) {
         TEST_CHECK(err.path1() == p);
         // libc++ provides the current path as the second path in the exception
-        LIBCPP_ONLY(TEST_CHECK(err.path2() == current_path()));
+        LIBCUDACXX_ONLY(TEST_CHECK(err.path2() == current_path()));
     }
     fs::current_path(static_env.Dir);
     try {
@@ -111,7 +111,7 @@ TEST_CASE(test_exception_contains_paths)
         TEST_REQUIRE(false);
     } catch (filesystem_error const& err) {
         TEST_CHECK(err.path1() == p);
-        LIBCPP_ONLY(TEST_CHECK(err.path2() == static_env.Dir));
+        LIBCUDACXX_ONLY(TEST_CHECK(err.path2() == static_env.Dir));
     }
 #endif
 }

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
index 7cf1c7208a61..6cf8df898017 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.permissions/permissions.pass.cpp
@@ -38,7 +38,7 @@ TEST_CASE(test_signatures)
     ASSERT_NOT_NOEXCEPT(fs::permissions(p, pr));
     ASSERT_NOT_NOEXCEPT(fs::permissions(p, pr, opts));
     ASSERT_NOEXCEPT(fs::permissions(p, pr, ec));
-    LIBCPP_ONLY(ASSERT_NOT_NOEXCEPT(fs::permissions(p, pr, opts, ec)));
+    LIBCUDACXX_ONLY(ASSERT_NOT_NOEXCEPT(fs::permissions(p, pr, opts, ec)));
 }
 
 TEST_CASE(test_error_reporting)

diff  --git a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
index 0b5018dea164..3785482bf051 100644
--- a/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
+++ b/libcxx/test/std/input.output/filesystems/fs.op.funcs/fs.op.temp_dir_path/temp_directory_path.pass.cpp
@@ -57,7 +57,7 @@ TEST_CASE(basic_tests)
     const path inaccessible_dir = env.create_dir("bad_perms_dir/nested");
     permissions(dir_perms, perms::none);
 #endif
-    LIBCPP_ONLY(const std::errc expect_errc = std::errc::not_a_directory);
+    LIBCUDACXX_ONLY(const std::errc expect_errc = std::errc::not_a_directory);
     struct TestCase {
       std::string name;
       path p;
@@ -96,7 +96,7 @@ TEST_CASE(basic_tests)
         PutEnv(TC.name, dne);
         ec = GetTestEC();
         ret = temp_directory_path(ec);
-        LIBCPP_ONLY(TEST_CHECK(ErrorIs(ec, expect_errc)));
+        LIBCUDACXX_ONLY(TEST_CHECK(ErrorIs(ec, expect_errc)));
         TEST_CHECK(ec != GetTestEC());
         TEST_CHECK(ec);
         TEST_CHECK(ret == "");
@@ -105,7 +105,7 @@ TEST_CASE(basic_tests)
         PutEnv(TC.name, file);
         ec = GetTestEC();
         ret = temp_directory_path(ec);
-        LIBCPP_ONLY(TEST_CHECK(ErrorIs(ec, expect_errc)));
+        LIBCUDACXX_ONLY(TEST_CHECK(ErrorIs(ec, expect_errc)));
         TEST_CHECK(ec != GetTestEC());
         TEST_CHECK(ec);
         TEST_CHECK(ret == "");

diff  --git a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp
index e19d040ed1c2..53036a08db8b 100644
--- a/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp
+++ b/libcxx/test/std/input.output/iostream.format/output.streams/ostream.formatted/ostream.inserters/streambuf.pass.cpp
@@ -75,7 +75,7 @@ int main(int, char**)
         std::ostream os(&sb);
         os << nullptr;
         assert(sb.str().size() != 0);
-        LIBCPP_ASSERT(sb.str() == "nullptr");
+        LIBCUDACXX_ASSERT(sb.str() == "nullptr");
     }
 #endif
 

diff  --git a/libcxx/test/std/iterators/iterator.container/size.pass.cpp b/libcxx/test/std/iterators/iterator.container/size.pass.cpp
index 697119a3239f..44cfb8bff707 100644
--- a/libcxx/test/std/iterators/iterator.container/size.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.container/size.pass.cpp
@@ -43,14 +43,14 @@ void test_const_container( const C& c )
 template<typename T>
 void test_const_container( const std::initializer_list<T>& c)
 {
-    LIBCPP_ASSERT_NOEXCEPT(std::size(c)); // our std::size is conditionally noexcept
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::size(c)); // our std::size is conditionally noexcept
     assert ( std::size(c)   == c.size());
 }
 
 template<typename T>
 void test_container( std::initializer_list<T>& c )
 {
-    LIBCPP_ASSERT_NOEXCEPT(std::size(c)); // our std::size is conditionally noexcept
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::size(c)); // our std::size is conditionally noexcept
     assert ( std::size(c)   == c.size());
 }
 

diff  --git a/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp b/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
index 9f384c64ddf3..071ad4c43fcc 100644
--- a/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.container/ssize.pass.cpp
@@ -50,7 +50,7 @@ void test_const_container(const C& c)
 template<typename T>
 void test_const_container(const std::initializer_list<T>& c)
 {
-    LIBCPP_ASSERT_NOEXCEPT(std::ssize(c)); // our std::ssize is conditionally noexcept
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::ssize(c)); // our std::ssize is conditionally noexcept
     static_assert( std::is_signed_v<decltype(std::ssize(c))>, "");
     assert ( std::ssize(c)   == static_cast<decltype(std::ssize(c))>(c.size()));
 }
@@ -58,7 +58,7 @@ void test_const_container(const std::initializer_list<T>& c)
 template<typename T>
 void test_container(std::initializer_list<T>& c)
 {
-    LIBCPP_ASSERT_NOEXCEPT(std::ssize(c)); // our std::ssize is conditionally noexcept
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::ssize(c)); // our std::ssize is conditionally noexcept
     static_assert( std::is_signed_v<decltype(std::ssize(c))>, "");
     assert ( std::ssize(c)   == static_cast<decltype(std::ssize(c))>(c.size()));
 }
@@ -116,7 +116,7 @@ int main(int, char**)
     static_assert( std::numeric_limits<                   decltype(std::ssize(sc))>::max()  > 60000, "");
     static_assert( std::numeric_limits<std::make_signed_t<decltype(std:: size(sc))>>::max() < 60000, "");
     assert (std::ssize(sc) == 60000);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(std::ssize(sc));
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(std::ssize(sc));
 
   return 0;
 }

diff  --git a/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp
index c04f15e60b92..31acb0df4375 100644
--- a/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/iterator.basic/iterator.pass.cpp
@@ -19,7 +19,7 @@
 //   typedef Category  iterator_category;
 // };
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <iterator>
 #include <type_traits>

diff  --git a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp
index 9a0f6be05be2..0d3a1e9771b3 100644
--- a/libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/iterator.traits/cxx20_iterator_traits.compile.pass.cpp
@@ -148,7 +148,7 @@ static_assert(testConst<std::istream_iterator<int, char>, std::input_iterator_ta
 
 #if !defined(TEST_HAS_NO_LOCALIZATION)
 // libc++-specific since pointer type is unspecified:
-LIBCPP_STATIC_ASSERT(test<std::istreambuf_iterator<char>, std::input_iterator_tag, char, long long, char, char*>());
+LIBCUDACXX_STATIC_ASSERT(test<std::istreambuf_iterator<char>, std::input_iterator_tag, char, long long, char, char*>());
 static_assert(test<std::move_iterator<int*>, std::random_access_iterator_tag, int, std::ptr
diff _t, int&&, int*>());
 static_assert(testIOIterator<std::ostream_iterator<int, char>, std::output_iterator_tag>());
 static_assert(testIOIterator<std::ostreambuf_iterator<int, char>, std::output_iterator_tag>());

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/constraints.verify.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/constraints.verify.cpp
index 51477caa0b9b..067f6593583b 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/constraints.verify.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/constraints.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::advance
 // Make sure we're SFINAE-friendly when the template argument constraints are not met.

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count.pass.cpp
index 4f62bd291168..73fac18f6e24 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::advance(it, n)
 

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp
index c14fc6417b64..c55211820624 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_count_sentinel.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::advance(it, n, sent)
 

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_sentinel.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_sentinel.pass.cpp
index db2bccec1d0f..1c45c46d1871 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_sentinel.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.advance/iterator_sentinel.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::advance(it, sent)
 

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/iterator_sentinel.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/iterator_sentinel.pass.cpp
index 7e0b6aa185bc..d81127261295 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/iterator_sentinel.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/iterator_sentinel.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class I, sentinel_for<I> S>
 //   requires (!sized_sentinel_for<S, I>)

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/lwg3664.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/lwg3664.pass.cpp
index 41cef9e80ebd..caee8fba7cdc 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/lwg3664.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/lwg3664.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class I, sentinel_for<I> S>
 //   requires (!sized_sentinel_for<S, I>)

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/range.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/range.pass.cpp
index 1b95838e59dc..0e2fc9386bb9 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/range.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.distance/range.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<range R>
 //   constexpr range_
diff erence_t<R> ranges::distance(R&& r);

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/constraints.compile.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/constraints.compile.pass.cpp
index 308f60881670..fa8d1e31fc7f 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/constraints.compile.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/constraints.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::next
 // Make sure we're SFINAE-friendly when the template argument constraints are not met.

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator.pass.cpp
index 37c177983461..9cac00b8bec7 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::next(it)
 

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_count.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_count.pass.cpp
index 56c3e7da5c70..d1700c74a1de 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_count.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_count.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::next(it, n)
 

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_count_sentinel.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_count_sentinel.pass.cpp
index 9a07e341bc0b..3fa6b0fcb9cc 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_count_sentinel.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_count_sentinel.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::next(it, n, bound)
 

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_sentinel.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_sentinel.pass.cpp
index ef0f72c56525..5b890edecf25 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_sentinel.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.next/iterator_sentinel.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::next(it, bound)
 

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/constraints.compile.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/constraints.compile.pass.cpp
index ab85b0ebd0f7..ff87c167ae5d 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/constraints.compile.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/constraints.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::prev
 // Make sure we're SFINAE-friendly when the template argument constraints are not met.

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator.pass.cpp
index 40915f115a20..c241f7de5772 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::prev(it)
 

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator_count.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator_count.pass.cpp
index a2306492e1ad..2e0ea87f3325 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator_count.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator_count.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::prev(it, n)
 

diff  --git a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator_count_sentinel.pass.cpp b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator_count_sentinel.pass.cpp
index 584eb700f347..0805fce49b1c 100644
--- a/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator_count_sentinel.pass.cpp
+++ b/libcxx/test/std/iterators/iterator.primitives/range.iter.ops/range.iter.ops.prev/iterator_count_sentinel.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // ranges::prev(it, n, bound)
 

diff  --git a/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/incrementable.h b/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/incrementable.h
index 847e9595ec27..79a243969377 100644
--- a/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/incrementable.h
+++ b/libcxx/test/std/iterators/iterator.requirements/iterator.concepts/incrementable.h
@@ -5,8 +5,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef LIBCPP_TEST_STD_ITERATORS_ITERATOR_REQUIREMENTS_ITERATOR_CONCEPTS_INCREMENTABLE_H
-#define LIBCPP_TEST_STD_ITERATORS_ITERATOR_REQUIREMENTS_ITERATOR_CONCEPTS_INCREMENTABLE_H
+#ifndef LIBCUDACXX_TEST_STD_ITERATORS_ITERATOR_REQUIREMENTS_ITERATOR_CONCEPTS_INCREMENTABLE_H
+#define LIBCUDACXX_TEST_STD_ITERATORS_ITERATOR_REQUIREMENTS_ITERATOR_CONCEPTS_INCREMENTABLE_H
 
 struct postfix_increment_returns_void {
   using 
diff erence_type = int;
@@ -180,4 +180,4 @@ struct noncopyable_with_
diff erence_type_and_minus {
   bool operator==(noncopyable_with_
diff erence_type_and_minus const&) const;
 };
 
-#endif // #define LIBCPP_TEST_STD_ITERATORS_ITERATOR_REQUIREMENTS_ITERATOR_CONCEPTS_INCREMENTABLE_H
+#endif // #define LIBCUDACXX_TEST_STD_ITERATORS_ITERATOR_REQUIREMENTS_ITERATOR_CONCEPTS_INCREMENTABLE_H

diff  --git a/libcxx/test/std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_move.nodiscard.verify.cpp b/libcxx/test/std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_move.nodiscard.verify.cpp
index 7bc2b5fad68e..506175fed920 100644
--- a/libcxx/test/std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_move.nodiscard.verify.cpp
+++ b/libcxx/test/std/iterators/iterator.requirements/iterator.cust/iterator.cust.move/iter_move.nodiscard.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test the [[nodiscard]] extension in libc++.
 

diff  --git a/libcxx/test/std/iterators/iterator.requirements/iterator.cust/unqualified_lookup_wrapper.h b/libcxx/test/std/iterators/iterator.requirements/iterator.cust/unqualified_lookup_wrapper.h
index 7c3719aa519e..d65f7ce4006e 100644
--- a/libcxx/test/std/iterators/iterator.requirements/iterator.cust/unqualified_lookup_wrapper.h
+++ b/libcxx/test/std/iterators/iterator.requirements/iterator.cust/unqualified_lookup_wrapper.h
@@ -5,8 +5,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef LIBCPP_TEST_STD_ITERATOR_UNQUALIFIED_LOOKUP_WRAPPER
-#define LIBCPP_TEST_STD_ITERATOR_UNQUALIFIED_LOOKUP_WRAPPER
+#ifndef LIBCUDACXX_TEST_STD_ITERATOR_UNQUALIFIED_LOOKUP_WRAPPER
+#define LIBCUDACXX_TEST_STD_ITERATOR_UNQUALIFIED_LOOKUP_WRAPPER
 
 #include <iterator>
 #include <utility>
@@ -76,4 +76,4 @@ class move_tracker {
   int moves_ = 0;
 };
 
-#endif // LIBCPP_TEST_STD_ITERATOR_UNQUALIFIED_LOOKUP_WRAPPER
+#endif // LIBCUDACXX_TEST_STD_ITERATOR_UNQUALIFIED_LOOKUP_WRAPPER

diff  --git a/libcxx/test/std/iterators/predef.iterators/counted.iterator/compare.pass.cpp b/libcxx/test/std/iterators/predef.iterators/counted.iterator/compare.pass.cpp
index 1c24bcfcf2dd..a18eab6dc991 100644
--- a/libcxx/test/std/iterators/predef.iterators/counted.iterator/compare.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/counted.iterator/compare.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<common_with<I> I2>
 //   friend constexpr bool operator==(

diff  --git a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/cxx20_iter_member.pass.cpp b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/cxx20_iter_member.pass.cpp
index 6dd841ca82f9..ed0780fb0d61 100644
--- a/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/cxx20_iter_member.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/insert.iterators/insert.iterator/cxx20_iter_member.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // insert_iterator
 // C++20 and above use ranges::iterator_t<Container> instead of Container::iterator.

diff  --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_spaceship.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_spaceship.pass.cpp
index dc9238a529fb..c5ba782a8f89 100644
--- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_spaceship.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.comp/op_spaceship.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-concepts
+// UNSUPPORTED: LIBCUDACXX-has-no-concepts
 
 // <iterator>
 

diff  --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/default.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/default.pass.cpp
index d095182c560d..d316d5589aa1 100644
--- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/default.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.const/default.pass.cpp
@@ -27,8 +27,8 @@ struct NoDefaultCtr : forward_iterator<int*> {
   NoDefaultCtr() = delete;
 };
 
-LIBCPP_STATIC_ASSERT( std::is_default_constructible_v<std::move_iterator<forward_iterator<int*>>>);
-LIBCPP_STATIC_ASSERT(!std::is_default_constructible_v<std::move_iterator<NoDefaultCtr>>);
+LIBCUDACXX_STATIC_ASSERT( std::is_default_constructible_v<std::move_iterator<forward_iterator<int*>>>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_default_constructible_v<std::move_iterator<NoDefaultCtr>>);
 #endif
 
 template <class It>

diff  --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.ref/op_arrow.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.ref/op_arrow.pass.cpp
index cbb4a167c506..ad097a40cae3 100644
--- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.ref/op_arrow.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iter.ops/move.iter.op.ref/op_arrow.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <iterator>
 

diff  --git a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/iterator_concept_conformance.compile.pass.cpp
index 844da40b8efc..1e0de96fcd3e 100644
--- a/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/iterator_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/iterators/predef.iterators/move.iterators/move.iterator/iterator_concept_conformance.compile.pass.cpp
@@ -20,7 +20,7 @@ void test()
   {
     using iterator = std::move_iterator<cpp17_input_iterator<int*>>;
 
-    LIBCPP_STATIC_ASSERT(!std::default_initializable<iterator>);
+    LIBCUDACXX_STATIC_ASSERT(!std::default_initializable<iterator>);
     static_assert( std::copyable<iterator>);
     static_assert( std::input_iterator<iterator>);
     static_assert(!std::forward_iterator<iterator>);
@@ -37,7 +37,7 @@ void test()
   {
     using iterator = std::move_iterator<cpp20_input_iterator<int*>>;
 
-    LIBCPP_STATIC_ASSERT(!std::default_initializable<iterator>);
+    LIBCUDACXX_STATIC_ASSERT(!std::default_initializable<iterator>);
     static_assert(!std::copyable<iterator>);
     static_assert( std::input_iterator<iterator>);
     static_assert(!std::forward_iterator<iterator>);

diff  --git a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp
index 278470e7359a..b7a8e009059e 100644
--- a/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp
+++ b/libcxx/test/std/iterators/stream.iterators/istreambuf.iterator/types.pass.cpp
@@ -46,7 +46,7 @@ int main(int, char**)
     static_assert((std::is_same<I1::iterator_category, std::input_iterator_tag>::value), "");
     static_assert((std::is_same<I1::value_type, char>::value), "");
     static_assert((std::is_same<I1::
diff erence_type, std::char_traits<char>::off_type>::value), "");
-    LIBCPP_STATIC_ASSERT((std::is_same<I1::pointer, char*>::value), "");
+    LIBCUDACXX_STATIC_ASSERT((std::is_same<I1::pointer, char*>::value), "");
     static_assert((std::is_same<I1::reference, char>::value), "");
     static_assert((std::is_same<I1::char_type, char>::value), "");
     static_assert((std::is_same<I1::traits_type, std::char_traits<char> >::value), "");
@@ -68,7 +68,7 @@ int main(int, char**)
     static_assert((std::is_same<I2::iterator_category, std::input_iterator_tag>::value), "");
     static_assert((std::is_same<I2::value_type, wchar_t>::value), "");
     static_assert((std::is_same<I2::
diff erence_type, std::char_traits<wchar_t>::off_type>::value), "");
-    LIBCPP_STATIC_ASSERT((std::is_same<I2::pointer, wchar_t*>::value), "");
+    LIBCUDACXX_STATIC_ASSERT((std::is_same<I2::pointer, wchar_t*>::value), "");
     static_assert((std::is_same<I2::reference, wchar_t>::value), "");
     static_assert((std::is_same<I2::char_type, wchar_t>::value), "");
     static_assert((std::is_same<I2::traits_type, std::char_traits<wchar_t> >::value), "");

diff  --git a/libcxx/test/std/language.support/cmp/cmp.alg/compare_strong_order_fallback.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.alg/compare_strong_order_fallback.pass.cpp
index 5f3800603f7e..c17b9737810d 100644
--- a/libcxx/test/std/language.support/cmp/cmp.alg/compare_strong_order_fallback.pass.cpp
+++ b/libcxx/test/std/language.support/cmp/cmp.alg/compare_strong_order_fallback.pass.cpp
@@ -348,10 +348,10 @@ constexpr bool test_1_3()
     // at compile-time, so the NAN-related tests must be runtime-only.
 
     if (!std::is_constant_evaluated()) {
-        F nq = _VSTD::copysign(std::numeric_limits<F>::quiet_NaN(), F(-1));
-        F ns = _VSTD::copysign(std::numeric_limits<F>::signaling_NaN(), F(-1));
-        F ps = _VSTD::copysign(std::numeric_limits<F>::signaling_NaN(), F(+1));
-        F pq = _VSTD::copysign(std::numeric_limits<F>::quiet_NaN(), F(+1));
+        F nq = _CUDA_VSTD::copysign(std::numeric_limits<F>::quiet_NaN(), F(-1));
+        F ns = _CUDA_VSTD::copysign(std::numeric_limits<F>::signaling_NaN(), F(-1));
+        F ps = _CUDA_VSTD::copysign(std::numeric_limits<F>::signaling_NaN(), F(+1));
+        F pq = _CUDA_VSTD::copysign(std::numeric_limits<F>::quiet_NaN(), F(+1));
 
         assert(std::compare_strong_order_fallback(nq, nq) == std::strong_ordering::equal);
 #ifndef TEST_BUGGY_SIGNALING_NAN

diff  --git a/libcxx/test/std/language.support/cmp/cmp.alg/compare_weak_order_fallback.pass.cpp b/libcxx/test/std/language.support/cmp/cmp.alg/compare_weak_order_fallback.pass.cpp
index a6575b1d8177..1623c20827e4 100644
--- a/libcxx/test/std/language.support/cmp/cmp.alg/compare_weak_order_fallback.pass.cpp
+++ b/libcxx/test/std/language.support/cmp/cmp.alg/compare_weak_order_fallback.pass.cpp
@@ -347,10 +347,10 @@ constexpr bool test_1_3()
     // at compile-time, so the NAN-related tests must be runtime-only.
 
     if (!std::is_constant_evaluated()) {
-        F nq = _VSTD::copysign(std::numeric_limits<F>::quiet_NaN(), F(-1));
-        F ns = _VSTD::copysign(std::numeric_limits<F>::signaling_NaN(), F(-1));
-        F ps = _VSTD::copysign(std::numeric_limits<F>::signaling_NaN(), F(+1));
-        F pq = _VSTD::copysign(std::numeric_limits<F>::quiet_NaN(), F(+1));
+        F nq = _CUDA_VSTD::copysign(std::numeric_limits<F>::quiet_NaN(), F(-1));
+        F ns = _CUDA_VSTD::copysign(std::numeric_limits<F>::signaling_NaN(), F(-1));
+        F ps = _CUDA_VSTD::copysign(std::numeric_limits<F>::signaling_NaN(), F(+1));
+        F pq = _CUDA_VSTD::copysign(std::numeric_limits<F>::quiet_NaN(), F(+1));
 
         assert(std::compare_weak_order_fallback(nq, nq) == std::weak_ordering::equivalent);
         assert(std::compare_weak_order_fallback(nq, ns) == std::weak_ordering::equivalent);

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp
index f81b1dd61287..764c3ace8048 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.capacity/operator_bool.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp
index 104af4ef305d..7a4c730efce6 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/equal_comp.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp
index c011ab0e7b7b..c06ab62eda50 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.compare/less_comp.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp
index cd98e7814bea..5968619b6789 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.completion/done.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 
@@ -30,7 +30,7 @@ void do_test(std::coroutine_handle<Promise> const& H) {
   // FIXME Add a runtime test
   {
     ASSERT_SAME_TYPE(decltype(H.done()), bool);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.done());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(H.done());
   }
 }
 

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp
index 673cf422c955..db27bd18d80a 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/assign.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp
index 233f92258da5..2bf80c3fba76 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.con/construct.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp
index d41b6e1b1435..4daa6ec1c4bd 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/address.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp
index 91ab4cfd56e4..f750dec0878c 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.export/from_address.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp
index 6d5b9e98c4e4..9106428f676f 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.hash/hash.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 
@@ -36,8 +36,8 @@ void do_test(int *LHSVal, int *RHSVal) {
   const C RHS = C::from_address(RHSVal);
   const std::hash<C> h;
 
-  LIBCPP_ASSERT(h(LHS) == ExpectLHS);
-  LIBCPP_ASSERT(h(RHS) == ExpectRHS);
+  LIBCUDACXX_ASSERT(h(LHS) == ExpectLHS);
+  LIBCUDACXX_ASSERT(h(RHS) == ExpectRHS);
   assert((h(LHS) == h(RHS)) == (LHSVal == RHSVal));
   {
     ASSERT_SAME_TYPE(decltype(h(LHS)), size_t);

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp
index 92029bea133f..4ef323b92d67 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.noop/noop_coroutine.pass.cpp
@@ -8,7 +8,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: ubsan
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 // struct noop_coroutine_promise;

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp
index d240b64cc9fb..e80b06dfb345 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.prom/promise.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 
@@ -64,12 +64,12 @@ void do_test(std::coroutine_handle<Promise>&& H) {
   // FIXME Add a runtime test
   {
     ASSERT_SAME_TYPE(decltype(H.promise()), Promise&);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.promise());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(H.promise());
   }
   {
     auto const& CH = H;
     ASSERT_SAME_TYPE(decltype(CH.promise()), Promise&);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(CH.promise());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(CH.promise());
   }
 }
 

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp
index ff87a0391a0d..27798e57fafb 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/destroy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 
@@ -41,7 +41,7 @@ void do_test(std::coroutine_handle<Promise>&& H) {
   // FIXME Add a runtime test
   {
     ASSERT_SAME_TYPE(decltype(H.destroy()), void);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.destroy());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(H.destroy());
     static_assert(has_destroy<HType&>(), "");
     static_assert(has_destroy<HType&&>(), "");
   }

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp
index 91390d43359e..ea5700d0504a 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/coroutine.handle.resumption/resume.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // <coroutine>
 
@@ -54,8 +54,8 @@ void do_test(std::coroutine_handle<Promise>&& H) {
   {
     ASSERT_SAME_TYPE(decltype(H.resume()), void);
     ASSERT_SAME_TYPE(decltype(H()), void);
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H.resume());
-    LIBCPP_ASSERT_NOT_NOEXCEPT(H());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(H.resume());
+    LIBCUDACXX_ASSERT_NOT_NOEXCEPT(H());
     static_assert(has_resume<HType&>(), "");
     static_assert(has_resume<HType&&>(), "");
     static_assert(has_call_operator<HType&>(), "");

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp
index 2ad5224109e7..2bce4fb75636 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.handle/void_handle.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 #include <coroutine>
 #include <type_traits>

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp
index 2eb9a6c457d5..5c37f200d653 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.traits/promise_type.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 #include <coroutine>
 #include <type_traits>

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp
index a3a65c312323..6a746bcc76b9 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_always.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 #include <coroutine>
 #include <type_traits>

diff  --git a/libcxx/test/std/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp b/libcxx/test/std/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp
index 2b838b973672..4040299950d1 100644
--- a/libcxx/test/std/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/coroutine.trivial.awaitables/suspend_never.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 #include <coroutine>
 #include <type_traits>
@@ -42,19 +42,19 @@ int main(int, char**)
   S s{};
   S const& cs = s;
   {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_ready()), "");
+    LIBCUDACXX_STATIC_ASSERT(noexcept(s.await_ready()), "");
     static_assert(std::is_same<decltype(s.await_ready()), bool>::value, "");
     assert(s.await_ready() == true);
     assert(cs.await_ready() == true);
   }
   {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_suspend(h)), "");
+    LIBCUDACXX_STATIC_ASSERT(noexcept(s.await_suspend(h)), "");
     static_assert(std::is_same<decltype(s.await_suspend(h)), void>::value, "");
     s.await_suspend(h);
     cs.await_suspend(h);
   }
   {
-    LIBCPP_STATIC_ASSERT(noexcept(s.await_resume()), "");
+    LIBCUDACXX_STATIC_ASSERT(noexcept(s.await_resume()), "");
     static_assert(std::is_same<decltype(s.await_resume()), void>::value, "");
     s.await_resume();
     cs.await_resume();

diff  --git a/libcxx/test/std/language.support/support.coroutines/end.to.end/await_result.pass.cpp b/libcxx/test/std/language.support/support.coroutines/end.to.end/await_result.pass.cpp
index 67b9e49f3802..4e02320e8bb7 100644
--- a/libcxx/test/std/language.support/support.coroutines/end.to.end/await_result.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/end.to.end/await_result.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 #include <coroutine>
 #include <cassert>

diff  --git a/libcxx/test/std/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp b/libcxx/test/std/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp
index 893b52418176..49c823f2d5dd 100644
--- a/libcxx/test/std/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/end.to.end/bool_await_suspend.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // See https://llvm.org/PR33271
 // UNSUPPORTED: ubsan

diff  --git a/libcxx/test/std/language.support/support.coroutines/end.to.end/expected.pass.cpp b/libcxx/test/std/language.support/support.coroutines/end.to.end/expected.pass.cpp
index 7db7ebcea167..c504c2f60c25 100644
--- a/libcxx/test/std/language.support/support.coroutines/end.to.end/expected.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/end.to.end/expected.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 #include <coroutine>
 #include <cassert>

diff  --git a/libcxx/test/std/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp b/libcxx/test/std/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp
index d392e711dd9d..32d01f99bed1 100644
--- a/libcxx/test/std/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/end.to.end/fullexpr-dtor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 #include <coroutine>
 #include <cassert>

diff  --git a/libcxx/test/std/language.support/support.coroutines/end.to.end/generator.pass.cpp b/libcxx/test/std/language.support/support.coroutines/end.to.end/generator.pass.cpp
index 4b02f2a8b4c8..1e1acd6c0901 100644
--- a/libcxx/test/std/language.support/support.coroutines/end.to.end/generator.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/end.to.end/generator.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 // See https://llvm.org/PR33271
 // UNSUPPORTED: ubsan

diff  --git a/libcxx/test/std/language.support/support.coroutines/end.to.end/go.pass.cpp b/libcxx/test/std/language.support/support.coroutines/end.to.end/go.pass.cpp
index 22380af50e0d..10138b7d4d5b 100644
--- a/libcxx/test/std/language.support/support.coroutines/end.to.end/go.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/end.to.end/go.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 #include <cassert>
 #include <coroutine>

diff  --git a/libcxx/test/std/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp b/libcxx/test/std/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp
index fde3096885bc..c3b9d0e1d6fd 100644
--- a/libcxx/test/std/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/end.to.end/multishot_func.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 #include <coroutine>
 #include <cassert>

diff  --git a/libcxx/test/std/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp b/libcxx/test/std/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp
index 68c11d4f8554..79012089b576 100644
--- a/libcxx/test/std/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp
+++ b/libcxx/test/std/language.support/support.coroutines/end.to.end/oneshot_func.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-no-coroutines
+// UNSUPPORTED: LIBCUDACXX-no-coroutines
 
 #include <coroutine>
 #include <vector>

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp
index 267e1d554d06..7cc2d3d78edb 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_nothrow_replace.pass.cpp
@@ -9,7 +9,7 @@
 // test operator new [] nothrow by replacing only operator new
 
 // UNSUPPORTED: sanitizer-new-delete
-// XFAIL: libcpp-no-vcruntime
+// XFAIL: LIBCUDACXX-no-vcruntime
 // XFAIL: LIBCXX-AIX-FIXME
 
 #include <new>

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp
index 46874433ffe9..62ba0ea60ee6 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.array/new_array_replace.pass.cpp
@@ -9,7 +9,7 @@
 // test operator new[] replacement by replacing only operator new
 
 // UNSUPPORTED: sanitizer-new-delete
-// XFAIL: libcpp-no-vcruntime
+// XFAIL: LIBCUDACXX-no-vcruntime
 // XFAIL: LIBCXX-AIX-FIXME
 
 #include <new>

diff  --git a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp
index d21f8f86ac90..3136e2199ec2 100644
--- a/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp
+++ b/libcxx/test/std/language.support/support.dynamic/new.delete/new.delete.single/new_nothrow_replace.pass.cpp
@@ -9,7 +9,7 @@
 // test operator new nothrow by replacing only operator new
 
 // UNSUPPORTED: sanitizer-new-delete
-// XFAIL: libcpp-no-vcruntime
+// XFAIL: LIBCUDACXX-no-vcruntime
 // XFAIL: LIBCXX-AIX-FIXME
 
 #include <new>

diff  --git a/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp b/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
index e97b15adc50a..4c294c7d08fa 100644
--- a/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
+++ b/libcxx/test/std/language.support/support.exception/propagation/make_exception_ptr.pass.cpp
@@ -39,7 +39,7 @@ int main(int, char**)
         }
         catch (const A& a)
         {
-#ifndef _LIBCPP_ABI_MICROSOFT
+#ifndef _LIBCUDACXX_ABI_MICROSOFT
             assert(A::constructed == 1);
 #else
             // On Windows exception_ptr copies the exception

diff  --git a/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp b/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp
index d109f98fbc21..b43d549b071b 100644
--- a/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp
+++ b/libcxx/test/std/language.support/support.exception/propagation/rethrow_exception.pass.cpp
@@ -47,7 +47,7 @@ int main(int, char**)
         }
         catch (const A& a)
         {
-#ifndef _LIBCPP_ABI_MICROSOFT
+#ifndef _LIBCUDACXX_ABI_MICROSOFT
             assert(A::constructed == 1);
 #else
             // On Windows the exception_ptr copies the exception

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
index 4f9e8f52ffca..54fe129a0077 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/algorithm.version.compile.pass.cpp
@@ -113,14 +113,14 @@
 #   error "__cpp_lib_constexpr_algorithms should not be defined before c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should be defined in c++17"
 #   endif
 #   if __cpp_lib_parallel_algorithm != 201603L
 #     error "__cpp_lib_parallel_algorithm should have the value 201603L in c++17"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -168,20 +168,20 @@
 #   error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should be defined in c++20"
 #   endif
 #   if __cpp_lib_parallel_algorithm != 201603L
 #     error "__cpp_lib_parallel_algorithm should have the value 201603L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++20"
 #   endif
@@ -190,7 +190,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 
@@ -235,20 +235,20 @@
 #   error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should be defined in c++2b"
 #   endif
 #   if __cpp_lib_parallel_algorithm != 201603L
 #     error "__cpp_lib_parallel_algorithm should have the value 201603L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++2b"
 #   endif
@@ -257,18 +257,18 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_starts_ends_with
 #     error "__cpp_lib_ranges_starts_ends_with should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_starts_ends_with != 202106L
 #     error "__cpp_lib_ranges_starts_ends_with should have the value 202106L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_starts_ends_with
 #     error "__cpp_lib_ranges_starts_ends_with should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.compile.pass.cpp
index 6d9f38c458dd..4bac25358f31 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/atomic.version.compile.pass.cpp
@@ -156,14 +156,14 @@
 #   error "__cpp_lib_atomic_flag_test should have the value 201907L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_float
 #     error "__cpp_lib_atomic_float should be defined in c++20"
 #   endif
 #   if __cpp_lib_atomic_float != 201711L
 #     error "__cpp_lib_atomic_float should have the value 201711L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_float
 #     error "__cpp_lib_atomic_float should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -183,27 +183,27 @@
 #   error "__cpp_lib_atomic_lock_free_type_aliases should have the value 201907L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_ref
 #     error "__cpp_lib_atomic_ref should be defined in c++20"
 #   endif
 #   if __cpp_lib_atomic_ref != 201806L
 #     error "__cpp_lib_atomic_ref should have the value 201806L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_ref
 #     error "__cpp_lib_atomic_ref should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_shared_ptr
 #     error "__cpp_lib_atomic_shared_ptr should be defined in c++20"
 #   endif
 #   if __cpp_lib_atomic_shared_ptr != 201711L
 #     error "__cpp_lib_atomic_shared_ptr should have the value 201711L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_shared_ptr
 #     error "__cpp_lib_atomic_shared_ptr should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -216,7 +216,7 @@
 #   error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++20"
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)
 #   ifndef __cpp_lib_atomic_wait
 #     error "__cpp_lib_atomic_wait should be defined in c++20"
 #   endif
@@ -225,7 +225,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_atomic_wait
-#     error "__cpp_lib_atomic_wait should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait) is not defined!"
+#     error "__cpp_lib_atomic_wait should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait) is not defined!"
 #   endif
 # endif
 
@@ -251,14 +251,14 @@
 #   error "__cpp_lib_atomic_flag_test should have the value 201907L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_float
 #     error "__cpp_lib_atomic_float should be defined in c++2b"
 #   endif
 #   if __cpp_lib_atomic_float != 201711L
 #     error "__cpp_lib_atomic_float should have the value 201711L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_float
 #     error "__cpp_lib_atomic_float should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -278,27 +278,27 @@
 #   error "__cpp_lib_atomic_lock_free_type_aliases should have the value 201907L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_ref
 #     error "__cpp_lib_atomic_ref should be defined in c++2b"
 #   endif
 #   if __cpp_lib_atomic_ref != 201806L
 #     error "__cpp_lib_atomic_ref should have the value 201806L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_ref
 #     error "__cpp_lib_atomic_ref should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_shared_ptr
 #     error "__cpp_lib_atomic_shared_ptr should be defined in c++2b"
 #   endif
 #   if __cpp_lib_atomic_shared_ptr != 201711L
 #     error "__cpp_lib_atomic_shared_ptr should have the value 201711L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_shared_ptr
 #     error "__cpp_lib_atomic_shared_ptr should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -311,7 +311,7 @@
 #   error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)
 #   ifndef __cpp_lib_atomic_wait
 #     error "__cpp_lib_atomic_wait should be defined in c++2b"
 #   endif
@@ -320,7 +320,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_atomic_wait
-#     error "__cpp_lib_atomic_wait should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait) is not defined!"
+#     error "__cpp_lib_atomic_wait should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait) is not defined!"
 #   endif
 # endif
 

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/barrier.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/barrier.version.compile.pass.cpp
index a9f9a6ea020b..646239d5c3b2 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/barrier.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/barrier.version.compile.pass.cpp
@@ -44,7 +44,7 @@
 
 #elif TEST_STD_VER == 20
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)
 #   ifndef __cpp_lib_barrier
 #     error "__cpp_lib_barrier should be defined in c++20"
 #   endif
@@ -53,13 +53,13 @@
 #   endif
 # else
 #   ifdef __cpp_lib_barrier
-#     error "__cpp_lib_barrier should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier) is not defined!"
+#     error "__cpp_lib_barrier should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier) is not defined!"
 #   endif
 # endif
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)
 #   ifndef __cpp_lib_barrier
 #     error "__cpp_lib_barrier should be defined in c++2b"
 #   endif
@@ -68,7 +68,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_barrier
-#     error "__cpp_lib_barrier should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier) is not defined!"
+#     error "__cpp_lib_barrier should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier) is not defined!"
 #   endif
 # endif
 

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.compile.pass.cpp
index 6ab27499afe0..44f616b38b88 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/bit.version.compile.pass.cpp
@@ -101,14 +101,14 @@
 #   error "__cpp_lib_bit_cast should have the value 201806L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_bitops
 #     error "__cpp_lib_bitops should be defined in c++20"
 #   endif
 #   if __cpp_lib_bitops != 201907L
 #     error "__cpp_lib_bitops should have the value 201907L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_bitops
 #     error "__cpp_lib_bitops should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -141,14 +141,14 @@
 #   error "__cpp_lib_bit_cast should have the value 201806L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_bitops
 #     error "__cpp_lib_bitops should be defined in c++2b"
 #   endif
 #   if __cpp_lib_bitops != 201907L
 #     error "__cpp_lib_bitops should have the value 201907L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_bitops
 #     error "__cpp_lib_bitops should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/charconv.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/charconv.version.compile.pass.cpp
index 41d042ca53db..d140a18d9077 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/charconv.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/charconv.version.compile.pass.cpp
@@ -36,14 +36,14 @@
 
 #elif TEST_STD_VER == 17
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should be defined in c++17"
 #   endif
 #   if __cpp_lib_to_chars != 201611L
 #     error "__cpp_lib_to_chars should have the value 201611L in c++17"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -51,14 +51,14 @@
 
 #elif TEST_STD_VER == 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should be defined in c++20"
 #   endif
 #   if __cpp_lib_to_chars != 201611L
 #     error "__cpp_lib_to_chars should have the value 201611L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -66,14 +66,14 @@
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should be defined in c++2b"
 #   endif
 #   if __cpp_lib_to_chars != 201611L
 #     error "__cpp_lib_to_chars should have the value 201611L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.compile.pass.cpp
index 2a7025966af5..9f72e96895ac 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/cmath.version.compile.pass.cpp
@@ -78,14 +78,14 @@
 #   error "__cpp_lib_interpolate should not be defined before c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should be defined in c++17"
 #   endif
 #   if __cpp_lib_math_special_functions != 201603L
 #     error "__cpp_lib_math_special_functions should have the value 201603L in c++17"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -111,14 +111,14 @@
 #   error "__cpp_lib_interpolate should have the value 201902L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should be defined in c++20"
 #   endif
 #   if __cpp_lib_math_special_functions != 201603L
 #     error "__cpp_lib_math_special_functions should have the value 201603L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -126,14 +126,14 @@
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_cmath
 #     error "__cpp_lib_constexpr_cmath should be defined in c++2b"
 #   endif
 #   if __cpp_lib_constexpr_cmath != 202202L
 #     error "__cpp_lib_constexpr_cmath should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_cmath
 #     error "__cpp_lib_constexpr_cmath should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -153,14 +153,14 @@
 #   error "__cpp_lib_interpolate should have the value 201902L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should be defined in c++2b"
 #   endif
 #   if __cpp_lib_math_special_functions != 201603L
 #     error "__cpp_lib_math_special_functions should have the value 201603L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.compile.pass.cpp
index cb50477363de..7fa7323cc816 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/compare.version.compile.pass.cpp
@@ -42,14 +42,14 @@
 
 #elif TEST_STD_VER == 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_three_way_comparison
 #     error "__cpp_lib_three_way_comparison should be defined in c++20"
 #   endif
 #   if __cpp_lib_three_way_comparison != 201907L
 #     error "__cpp_lib_three_way_comparison should have the value 201907L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_three_way_comparison
 #     error "__cpp_lib_three_way_comparison should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -57,14 +57,14 @@
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_three_way_comparison
 #     error "__cpp_lib_three_way_comparison should be defined in c++2b"
 #   endif
 #   if __cpp_lib_three_way_comparison != 201907L
 #     error "__cpp_lib_three_way_comparison should have the value 201907L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_three_way_comparison
 #     error "__cpp_lib_three_way_comparison should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.compile.pass.cpp
index 527805f7c36b..17be8a7058e1 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.compile.pass.cpp
@@ -68,14 +68,14 @@
 #   error "__cpp_lib_complex_udls should have the value 201309L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_complex
 #     error "__cpp_lib_constexpr_complex should be defined in c++20"
 #   endif
 #   if __cpp_lib_constexpr_complex != 201711L
 #     error "__cpp_lib_constexpr_complex should have the value 201711L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_complex
 #     error "__cpp_lib_constexpr_complex should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -90,14 +90,14 @@
 #   error "__cpp_lib_complex_udls should have the value 201309L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_complex
 #     error "__cpp_lib_constexpr_complex should be defined in c++2b"
 #   endif
 #   if __cpp_lib_constexpr_complex != 201711L
 #     error "__cpp_lib_constexpr_complex should have the value 201711L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_complex
 #     error "__cpp_lib_constexpr_complex should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/cstdlib.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/cstdlib.version.compile.pass.cpp
index 99aa931ac2b0..fc426bded169 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/cstdlib.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/cstdlib.version.compile.pass.cpp
@@ -48,14 +48,14 @@
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_cmath
 #     error "__cpp_lib_constexpr_cmath should be defined in c++2b"
 #   endif
 #   if __cpp_lib_constexpr_cmath != 202202L
 #     error "__cpp_lib_constexpr_cmath should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_cmath
 #     error "__cpp_lib_constexpr_cmath should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.compile.pass.cpp
index b61fad789b20..35434f097923 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/deque.version.compile.pass.cpp
@@ -135,14 +135,14 @@
 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.compile.pass.cpp
index 0b1c7a0956d4..a873214b98ac 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/execution.version.compile.pass.cpp
@@ -37,14 +37,14 @@
 
 #elif TEST_STD_VER == 17
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_execution
 #     error "__cpp_lib_execution should be defined in c++17"
 #   endif
 #   if __cpp_lib_execution != 201603L
 #     error "__cpp_lib_execution should have the value 201603L in c++17"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_execution
 #     error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -52,14 +52,14 @@
 
 #elif TEST_STD_VER == 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_execution
 #     error "__cpp_lib_execution should be defined in c++20"
 #   endif
 #   if __cpp_lib_execution != 201902L
 #     error "__cpp_lib_execution should have the value 201902L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_execution
 #     error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -67,14 +67,14 @@
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_execution
 #     error "__cpp_lib_execution should be defined in c++2b"
 #   endif
 #   if __cpp_lib_execution != 201902L
 #     error "__cpp_lib_execution should have the value 201902L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_execution
 #     error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp
index 0f569366946a..6f28b6eaf201 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp
@@ -51,7 +51,7 @@
 #   error "__cpp_lib_char8_t should not be defined before c++20"
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
 #   ifndef __cpp_lib_filesystem
 #     error "__cpp_lib_filesystem should be defined in c++17"
 #   endif
@@ -60,7 +60,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_filesystem
-#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
+#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
 #   endif
 # endif
 
@@ -79,7 +79,7 @@
 #   endif
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
 #   ifndef __cpp_lib_filesystem
 #     error "__cpp_lib_filesystem should be defined in c++20"
 #   endif
@@ -88,7 +88,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_filesystem
-#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
+#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
 #   endif
 # endif
 
@@ -107,7 +107,7 @@
 #   endif
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
 #   ifndef __cpp_lib_filesystem
 #     error "__cpp_lib_filesystem should be defined in c++2b"
 #   endif
@@ -116,7 +116,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_filesystem
-#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
+#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
 #   endif
 # endif
 

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
index dd995cd87e83..2bf6db6af42c 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/format.version.compile.pass.cpp
@@ -11,7 +11,7 @@
 //
 // clang-format off
 
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 
@@ -44,7 +44,7 @@
 
 #elif TEST_STD_VER == 20
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT)
 #   ifndef __cpp_lib_format
 #     error "__cpp_lib_format should be defined in c++20"
 #   endif
@@ -53,13 +53,13 @@
 #   endif
 # else
 #   ifdef __cpp_lib_format
-#     error "__cpp_lib_format should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) is not defined!"
+#     error "__cpp_lib_format should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT) is not defined!"
 #   endif
 # endif
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT)
 #   ifndef __cpp_lib_format
 #     error "__cpp_lib_format should be defined in c++2b"
 #   endif
@@ -68,7 +68,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_format
-#     error "__cpp_lib_format should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) is not defined!"
+#     error "__cpp_lib_format should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT) is not defined!"
 #   endif
 # endif
 

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.compile.pass.cpp
index 4e9bb597d0f4..657172df86a2 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/forward_list.version.compile.pass.cpp
@@ -192,14 +192,14 @@
 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp
index 4061d99f9c48..cea1680e6efb 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/functional.version.compile.pass.cpp
@@ -254,7 +254,7 @@
 #   error "__cpp_lib_not_fn should have the value 201603L in c++20"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++20"
 #   endif
@@ -263,7 +263,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 
@@ -290,14 +290,14 @@
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_bind_back
 #     error "__cpp_lib_bind_back should be defined in c++2b"
 #   endif
 #   if __cpp_lib_bind_back != 202202L
 #     error "__cpp_lib_bind_back should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_bind_back
 #     error "__cpp_lib_bind_back should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -331,27 +331,27 @@
 #   error "__cpp_lib_invoke should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_invoke_r
 #     error "__cpp_lib_invoke_r should be defined in c++2b"
 #   endif
 #   if __cpp_lib_invoke_r != 202106L
 #     error "__cpp_lib_invoke_r should have the value 202106L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_invoke_r
 #     error "__cpp_lib_invoke_r should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_move_only_function
 #     error "__cpp_lib_move_only_function should be defined in c++2b"
 #   endif
 #   if __cpp_lib_move_only_function != 202110L
 #     error "__cpp_lib_move_only_function should have the value 202110L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_move_only_function
 #     error "__cpp_lib_move_only_function should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -364,7 +364,7 @@
 #   error "__cpp_lib_not_fn should have the value 201603L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++2b"
 #   endif
@@ -373,7 +373,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp
index ccad13440cc9..ccd1daad41fe 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/iterator.version.compile.pass.cpp
@@ -174,7 +174,7 @@
 #   error "__cpp_lib_null_iterators should have the value 201304L in c++20"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++20"
 #   endif
@@ -183,7 +183,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 
@@ -231,7 +231,7 @@
 #   error "__cpp_lib_null_iterators should have the value 201304L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++2b"
 #   endif
@@ -240,7 +240,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/latch.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/latch.version.compile.pass.cpp
index c0655b679882..7e635065c298 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/latch.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/latch.version.compile.pass.cpp
@@ -44,7 +44,7 @@
 
 #elif TEST_STD_VER == 20
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)
 #   ifndef __cpp_lib_latch
 #     error "__cpp_lib_latch should be defined in c++20"
 #   endif
@@ -53,13 +53,13 @@
 #   endif
 # else
 #   ifdef __cpp_lib_latch
-#     error "__cpp_lib_latch should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch) is not defined!"
+#     error "__cpp_lib_latch should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch) is not defined!"
 #   endif
 # endif
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)
 #   ifndef __cpp_lib_latch
 #     error "__cpp_lib_latch should be defined in c++2b"
 #   endif
@@ -68,7 +68,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_latch
-#     error "__cpp_lib_latch should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch) is not defined!"
+#     error "__cpp_lib_latch should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch) is not defined!"
 #   endif
 # endif
 

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.compile.pass.cpp
index 6c6aaac00864..c9d2a21a1c96 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/list.version.compile.pass.cpp
@@ -192,14 +192,14 @@
 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.compile.pass.cpp
index a127d514805a..2ad71087e0ba 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/map.version.compile.pass.cpp
@@ -210,14 +210,14 @@
 #   error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_associative_heterogeneous_erasure
 #     error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++2b"
 #   endif
 #   if __cpp_lib_associative_heterogeneous_erasure != 202110L
 #     error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_associative_heterogeneous_erasure
 #     error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -258,14 +258,14 @@
 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp
index 485f2b784283..0d4247383611 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/memory.version.compile.pass.cpp
@@ -346,7 +346,7 @@
 #   error "__cpp_lib_out_ptr should not be defined before c++2b"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++20"
 #   endif
@@ -355,7 +355,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 
@@ -380,14 +380,14 @@
 #   error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_smart_ptr_for_overwrite
 #     error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++20"
 #   endif
 #   if __cpp_lib_smart_ptr_for_overwrite != 202002L
 #     error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_smart_ptr_for_overwrite
 #     error "__cpp_lib_smart_ptr_for_overwrite should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -472,20 +472,20 @@
 #   error "__cpp_lib_make_unique should have the value 201304L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_out_ptr
 #     error "__cpp_lib_out_ptr should be defined in c++2b"
 #   endif
 #   if __cpp_lib_out_ptr != 202106L
 #     error "__cpp_lib_out_ptr should have the value 202106L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_out_ptr
 #     error "__cpp_lib_out_ptr should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++2b"
 #   endif
@@ -494,7 +494,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 
@@ -519,14 +519,14 @@
 #   error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_smart_ptr_for_overwrite
 #     error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++2b"
 #   endif
 #   if __cpp_lib_smart_ptr_for_overwrite != 202002L
 #     error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_smart_ptr_for_overwrite
 #     error "__cpp_lib_smart_ptr_for_overwrite should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.compile.pass.cpp
index 0a30e127d666..421c2562cb1c 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/numeric.version.compile.pass.cpp
@@ -87,14 +87,14 @@
 #   error "__cpp_lib_interpolate should not be defined before c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should be defined in c++17"
 #   endif
 #   if __cpp_lib_parallel_algorithm != 201603L
 #     error "__cpp_lib_parallel_algorithm should have the value 201603L in c++17"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -127,14 +127,14 @@
 #   error "__cpp_lib_interpolate should have the value 201902L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should be defined in c++20"
 #   endif
 #   if __cpp_lib_parallel_algorithm != 201603L
 #     error "__cpp_lib_parallel_algorithm should have the value 201603L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -167,27 +167,27 @@
 #   error "__cpp_lib_interpolate should have the value 201902L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should be defined in c++2b"
 #   endif
 #   if __cpp_lib_parallel_algorithm != 201603L
 #     error "__cpp_lib_parallel_algorithm should have the value 201603L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_iota
 #     error "__cpp_lib_ranges_iota should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_iota != 202202L
 #     error "__cpp_lib_ranges_iota should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_iota
 #     error "__cpp_lib_ranges_iota should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.compile.pass.cpp
index a76d99871ef7..9ea9d3557dfa 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/queue.version.compile.pass.cpp
@@ -72,14 +72,14 @@
 #   error "__cpp_lib_adaptor_iterator_pair_constructor should have the value 202106L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp
index 328b69cdccb5..eb2f1a897dea 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/ranges.version.compile.pass.cpp
@@ -11,7 +11,7 @@
 //
 // clang-format off
 
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <ranges>
 
@@ -109,7 +109,7 @@
 
 #elif TEST_STD_VER == 20
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++20"
 #   endif
@@ -118,7 +118,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 
@@ -144,7 +144,7 @@
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++2b"
 #   endif
@@ -153,70 +153,70 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_chunk
 #     error "__cpp_lib_ranges_chunk should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_chunk != 202202L
 #     error "__cpp_lib_ranges_chunk should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_chunk
 #     error "__cpp_lib_ranges_chunk should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_chunk_by
 #     error "__cpp_lib_ranges_chunk_by should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_chunk_by != 202202L
 #     error "__cpp_lib_ranges_chunk_by should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_chunk_by
 #     error "__cpp_lib_ranges_chunk_by should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_join_with
 #     error "__cpp_lib_ranges_join_with should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_join_with != 202202L
 #     error "__cpp_lib_ranges_join_with should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_join_with
 #     error "__cpp_lib_ranges_join_with should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_slide
 #     error "__cpp_lib_ranges_slide should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_slide != 202202L
 #     error "__cpp_lib_ranges_slide should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_slide
 #     error "__cpp_lib_ranges_slide should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_zip
 #     error "__cpp_lib_ranges_zip should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_zip != 202110L
 #     error "__cpp_lib_ranges_zip should have the value 202110L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_zip
 #     error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/semaphore.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/semaphore.version.compile.pass.cpp
index 7390b6df3362..17ce55a4b666 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/semaphore.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/semaphore.version.compile.pass.cpp
@@ -44,7 +44,7 @@
 
 #elif TEST_STD_VER == 20
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
 #   ifndef __cpp_lib_semaphore
 #     error "__cpp_lib_semaphore should be defined in c++20"
 #   endif
@@ -53,13 +53,13 @@
 #   endif
 # else
 #   ifdef __cpp_lib_semaphore
-#     error "__cpp_lib_semaphore should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) is not defined!"
+#     error "__cpp_lib_semaphore should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) is not defined!"
 #   endif
 # endif
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
 #   ifndef __cpp_lib_semaphore
 #     error "__cpp_lib_semaphore should be defined in c++2b"
 #   endif
@@ -68,7 +68,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_semaphore
-#     error "__cpp_lib_semaphore should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) is not defined!"
+#     error "__cpp_lib_semaphore should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) is not defined!"
 #   endif
 # endif
 

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.compile.pass.cpp
index 90684859698c..18cf15cb234c 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/set.version.compile.pass.cpp
@@ -187,14 +187,14 @@
 #   error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_associative_heterogeneous_erasure
 #     error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++2b"
 #   endif
 #   if __cpp_lib_associative_heterogeneous_erasure != 202110L
 #     error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_associative_heterogeneous_erasure
 #     error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -228,14 +228,14 @@
 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.compile.pass.cpp
index 9cd1ce0f06da..7caaf0c6c883 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.compile.pass.cpp
@@ -41,7 +41,7 @@
 #   error "__cpp_lib_shared_mutex should not be defined before c++17"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
 #   ifndef __cpp_lib_shared_timed_mutex
 #     error "__cpp_lib_shared_timed_mutex should be defined in c++14"
 #   endif
@@ -50,13 +50,13 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_timed_mutex
-#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
+#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
 #   endif
 # endif
 
 #elif TEST_STD_VER == 17
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
 #   ifndef __cpp_lib_shared_mutex
 #     error "__cpp_lib_shared_mutex should be defined in c++17"
 #   endif
@@ -65,11 +65,11 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_mutex
-#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
+#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
 #   ifndef __cpp_lib_shared_timed_mutex
 #     error "__cpp_lib_shared_timed_mutex should be defined in c++17"
 #   endif
@@ -78,13 +78,13 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_timed_mutex
-#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
+#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
 #   endif
 # endif
 
 #elif TEST_STD_VER == 20
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
 #   ifndef __cpp_lib_shared_mutex
 #     error "__cpp_lib_shared_mutex should be defined in c++20"
 #   endif
@@ -93,11 +93,11 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_mutex
-#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
+#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
 #   ifndef __cpp_lib_shared_timed_mutex
 #     error "__cpp_lib_shared_timed_mutex should be defined in c++20"
 #   endif
@@ -106,13 +106,13 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_timed_mutex
-#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
+#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
 #   endif
 # endif
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
 #   ifndef __cpp_lib_shared_mutex
 #     error "__cpp_lib_shared_mutex should be defined in c++2b"
 #   endif
@@ -121,11 +121,11 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_mutex
-#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
+#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
 #   ifndef __cpp_lib_shared_timed_mutex
 #     error "__cpp_lib_shared_timed_mutex should be defined in c++2b"
 #   endif
@@ -134,7 +134,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_timed_mutex
-#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
+#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
 #   endif
 # endif
 

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.compile.pass.cpp
index af17a9090fc6..93b59fd61409 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/stack.version.compile.pass.cpp
@@ -72,14 +72,14 @@
 #   error "__cpp_lib_adaptor_iterator_pair_constructor should have the value 202106L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.compile.pass.cpp
index bf22af0b103b..7cc0f6781a87 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/string.version.compile.pass.cpp
@@ -305,14 +305,14 @@
 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp
index 0f5c066fc0ff..f82d61db50de 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp
@@ -44,14 +44,14 @@
 
 #elif TEST_STD_VER == 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_jthread
 #     error "__cpp_lib_jthread should be defined in c++20"
 #   endif
 #   if __cpp_lib_jthread != 201911L
 #     error "__cpp_lib_jthread should have the value 201911L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_jthread
 #     error "__cpp_lib_jthread should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -59,14 +59,14 @@
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_jthread
 #     error "__cpp_lib_jthread should be defined in c++2b"
 #   endif
 #   if __cpp_lib_jthread != 201911L
 #     error "__cpp_lib_jthread should have the value 201911L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_jthread
 #     error "__cpp_lib_jthread should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.compile.pass.cpp
index d3ddc4b48dc6..beb7c40ead14 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/tuple.version.compile.pass.cpp
@@ -187,14 +187,14 @@
 #   error "__cpp_lib_make_from_tuple should have the value 201606L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_zip
 #     error "__cpp_lib_ranges_zip should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_zip != 202110L
 #     error "__cpp_lib_ranges_zip should have the value 202110L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_zip
 #     error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp
index 89a1dcf67f7e..947ce70a2f00 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/type_traits.version.compile.pass.cpp
@@ -425,14 +425,14 @@
 #   error "__cpp_lib_is_invocable should have the value 201703L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_is_layout_compatible
 #     error "__cpp_lib_is_layout_compatible should be defined in c++20"
 #   endif
 #   if __cpp_lib_is_layout_compatible != 201907L
 #     error "__cpp_lib_is_layout_compatible should have the value 201907L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_is_layout_compatible
 #     error "__cpp_lib_is_layout_compatible should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -452,14 +452,14 @@
 #   error "__cpp_lib_is_null_pointer should have the value 201309L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_is_pointer_interconvertible
 #     error "__cpp_lib_is_pointer_interconvertible should be defined in c++20"
 #   endif
 #   if __cpp_lib_is_pointer_interconvertible != 201907L
 #     error "__cpp_lib_is_pointer_interconvertible should have the value 201907L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_is_pointer_interconvertible
 #     error "__cpp_lib_is_pointer_interconvertible should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -587,14 +587,14 @@
 #   error "__cpp_lib_is_invocable should have the value 201703L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_is_layout_compatible
 #     error "__cpp_lib_is_layout_compatible should be defined in c++2b"
 #   endif
 #   if __cpp_lib_is_layout_compatible != 201907L
 #     error "__cpp_lib_is_layout_compatible should have the value 201907L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_is_layout_compatible
 #     error "__cpp_lib_is_layout_compatible should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -614,14 +614,14 @@
 #   error "__cpp_lib_is_null_pointer should have the value 201309L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_is_pointer_interconvertible
 #     error "__cpp_lib_is_pointer_interconvertible should be defined in c++2b"
 #   endif
 #   if __cpp_lib_is_pointer_interconvertible != 201907L
 #     error "__cpp_lib_is_pointer_interconvertible should have the value 201907L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_is_pointer_interconvertible
 #     error "__cpp_lib_is_pointer_interconvertible should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -648,14 +648,14 @@
 #   error "__cpp_lib_logical_traits should have the value 201510L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_reference_from_temporary
 #     error "__cpp_lib_reference_from_temporary should be defined in c++2b"
 #   endif
 #   if __cpp_lib_reference_from_temporary != 202202L
 #     error "__cpp_lib_reference_from_temporary should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_reference_from_temporary
 #     error "__cpp_lib_reference_from_temporary should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/typeinfo.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/typeinfo.version.compile.pass.cpp
index 75abf3e8fc9c..296ef6d6e21f 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/typeinfo.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/typeinfo.version.compile.pass.cpp
@@ -48,14 +48,14 @@
 
 #elif TEST_STD_VER > 20
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_typeinfo
 #     error "__cpp_lib_constexpr_typeinfo should be defined in c++2b"
 #   endif
 #   if __cpp_lib_constexpr_typeinfo != 202106L
 #     error "__cpp_lib_constexpr_typeinfo should have the value 202106L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_typeinfo
 #     error "__cpp_lib_constexpr_typeinfo should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.compile.pass.cpp
index 038420c4079d..b24b43f3d780 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_map.version.compile.pass.cpp
@@ -204,14 +204,14 @@
 #   error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_associative_heterogeneous_erasure
 #     error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++2b"
 #   endif
 #   if __cpp_lib_associative_heterogeneous_erasure != 202110L
 #     error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_associative_heterogeneous_erasure
 #     error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -245,14 +245,14 @@
 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.compile.pass.cpp
index 13092c1a0e46..3f915bbfdba3 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/unordered_set.version.compile.pass.cpp
@@ -181,14 +181,14 @@
 #   error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_associative_heterogeneous_erasure
 #     error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++2b"
 #   endif
 #   if __cpp_lib_associative_heterogeneous_erasure != 202110L
 #     error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_associative_heterogeneous_erasure
 #     error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -222,14 +222,14 @@
 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.compile.pass.cpp
index 96eb793d1d2e..9d6024fd4bff 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/utility.version.compile.pass.cpp
@@ -258,14 +258,14 @@
 #   error "__cpp_lib_integer_sequence should have the value 201304L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_zip
 #     error "__cpp_lib_ranges_zip should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_zip != 202110L
 #     error "__cpp_lib_ranges_zip should have the value 202110L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_zip
 #     error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.compile.pass.cpp
index c762e93b8112..08bb98b4835f 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/vector.version.compile.pass.cpp
@@ -123,14 +123,14 @@
 #   error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_vector
 #     error "__cpp_lib_constexpr_vector should be defined in c++20"
 #   endif
 #   if __cpp_lib_constexpr_vector != 201907L
 #     error "__cpp_lib_constexpr_vector should have the value 201907L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_vector
 #     error "__cpp_lib_constexpr_vector should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -170,14 +170,14 @@
 #   error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_vector
 #     error "__cpp_lib_constexpr_vector should be defined in c++2b"
 #   endif
 #   if __cpp_lib_constexpr_vector != 201907L
 #     error "__cpp_lib_constexpr_vector should have the value 201907L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_vector
 #     error "__cpp_lib_constexpr_vector should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -204,14 +204,14 @@
 #   error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
index d9a340e52ef9..357a26a66d07 100644
--- a/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
+++ b/libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp
@@ -1340,7 +1340,7 @@
 #   error "__cpp_lib_shared_ptr_weak_type should not be defined before c++17"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
 #   ifndef __cpp_lib_shared_timed_mutex
 #     error "__cpp_lib_shared_timed_mutex should be defined in c++14"
 #   endif
@@ -1349,7 +1349,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_timed_mutex
-#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
+#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
 #   endif
 # endif
 
@@ -1758,20 +1758,20 @@
 #   error "__cpp_lib_exchange_function should have the value 201304L in c++17"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_execution
 #     error "__cpp_lib_execution should be defined in c++17"
 #   endif
 #   if __cpp_lib_execution != 201603L
 #     error "__cpp_lib_execution should have the value 201603L in c++17"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_execution
 #     error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
 #   ifndef __cpp_lib_filesystem
 #     error "__cpp_lib_filesystem should be defined in c++17"
 #   endif
@@ -1780,7 +1780,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_filesystem
-#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
+#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
 #   endif
 # endif
 
@@ -1990,27 +1990,27 @@
 #   error "__cpp_lib_math_constants should not be defined before c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should be defined in c++17"
 #   endif
 #   if __cpp_lib_math_special_functions != 201603L
 #     error "__cpp_lib_math_special_functions should have the value 201603L in c++17"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_memory_resource
 #     error "__cpp_lib_memory_resource should be defined in c++17"
 #   endif
 #   if __cpp_lib_memory_resource != 201603L
 #     error "__cpp_lib_memory_resource should have the value 201603L in c++17"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_memory_resource
 #     error "__cpp_lib_memory_resource should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -2059,14 +2059,14 @@
 #   error "__cpp_lib_out_ptr should not be defined before c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should be defined in c++17"
 #   endif
 #   if __cpp_lib_parallel_algorithm != 201603L
 #     error "__cpp_lib_parallel_algorithm should have the value 201603L in c++17"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -2166,7 +2166,7 @@
 #   error "__cpp_lib_semaphore should not be defined before c++20"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
 #   ifndef __cpp_lib_shared_mutex
 #     error "__cpp_lib_shared_mutex should be defined in c++17"
 #   endif
@@ -2175,7 +2175,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_mutex
-#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
+#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
 #   endif
 # endif
 
@@ -2193,7 +2193,7 @@
 #   error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++17"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
 #   ifndef __cpp_lib_shared_timed_mutex
 #     error "__cpp_lib_shared_timed_mutex should be defined in c++17"
 #   endif
@@ -2202,7 +2202,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_timed_mutex
-#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
+#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
 #   endif
 # endif
 
@@ -2280,14 +2280,14 @@
 #   error "__cpp_lib_to_array should not be defined before c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should be defined in c++17"
 #   endif
 #   if __cpp_lib_to_chars != 201611L
 #     error "__cpp_lib_to_chars should have the value 201611L in c++17"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -2442,14 +2442,14 @@
 #   error "__cpp_lib_atomic_flag_test should have the value 201907L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_float
 #     error "__cpp_lib_atomic_float should be defined in c++20"
 #   endif
 #   if __cpp_lib_atomic_float != 201711L
 #     error "__cpp_lib_atomic_float should have the value 201711L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_float
 #     error "__cpp_lib_atomic_float should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -2469,27 +2469,27 @@
 #   error "__cpp_lib_atomic_lock_free_type_aliases should have the value 201907L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_ref
 #     error "__cpp_lib_atomic_ref should be defined in c++20"
 #   endif
 #   if __cpp_lib_atomic_ref != 201806L
 #     error "__cpp_lib_atomic_ref should have the value 201806L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_ref
 #     error "__cpp_lib_atomic_ref should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_shared_ptr
 #     error "__cpp_lib_atomic_shared_ptr should be defined in c++20"
 #   endif
 #   if __cpp_lib_atomic_shared_ptr != 201711L
 #     error "__cpp_lib_atomic_shared_ptr should have the value 201711L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_shared_ptr
 #     error "__cpp_lib_atomic_shared_ptr should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -2502,7 +2502,7 @@
 #   error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++20"
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)
 #   ifndef __cpp_lib_atomic_wait
 #     error "__cpp_lib_atomic_wait should be defined in c++20"
 #   endif
@@ -2511,11 +2511,11 @@
 #   endif
 # else
 #   ifdef __cpp_lib_atomic_wait
-#     error "__cpp_lib_atomic_wait should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait) is not defined!"
+#     error "__cpp_lib_atomic_wait should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)
 #   ifndef __cpp_lib_barrier
 #     error "__cpp_lib_barrier should be defined in c++20"
 #   endif
@@ -2524,7 +2524,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_barrier
-#     error "__cpp_lib_barrier should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier) is not defined!"
+#     error "__cpp_lib_barrier should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier) is not defined!"
 #   endif
 # endif
 
@@ -2546,14 +2546,14 @@
 #   error "__cpp_lib_bit_cast should have the value 201806L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_bitops
 #     error "__cpp_lib_bitops should be defined in c++20"
 #   endif
 #   if __cpp_lib_bitops != 201907L
 #     error "__cpp_lib_bitops should have the value 201907L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_bitops
 #     error "__cpp_lib_bitops should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -2650,14 +2650,14 @@
 #   error "__cpp_lib_constexpr_cmath should not be defined before c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_complex
 #     error "__cpp_lib_constexpr_complex should be defined in c++20"
 #   endif
 #   if __cpp_lib_constexpr_complex != 201711L
 #     error "__cpp_lib_constexpr_complex should have the value 201711L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_complex
 #     error "__cpp_lib_constexpr_complex should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -2730,14 +2730,14 @@
 #   error "__cpp_lib_constexpr_utility should have the value 201811L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_vector
 #     error "__cpp_lib_constexpr_vector should be defined in c++20"
 #   endif
 #   if __cpp_lib_constexpr_vector != 201907L
 #     error "__cpp_lib_constexpr_vector should have the value 201907L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_vector
 #     error "__cpp_lib_constexpr_vector should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -2791,20 +2791,20 @@
 #   error "__cpp_lib_exchange_function should have the value 201304L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_execution
 #     error "__cpp_lib_execution should be defined in c++20"
 #   endif
 #   if __cpp_lib_execution != 201902L
 #     error "__cpp_lib_execution should have the value 201902L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_execution
 #     error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
 #   ifndef __cpp_lib_filesystem
 #     error "__cpp_lib_filesystem should be defined in c++20"
 #   endif
@@ -2813,11 +2813,11 @@
 #   endif
 # else
 #   ifdef __cpp_lib_filesystem
-#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
+#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT)
 #   ifndef __cpp_lib_format
 #     error "__cpp_lib_format should be defined in c++20"
 #   endif
@@ -2826,7 +2826,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_format
-#     error "__cpp_lib_format should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) is not defined!"
+#     error "__cpp_lib_format should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT) is not defined!"
 #   endif
 # endif
 
@@ -2959,14 +2959,14 @@
 #   error "__cpp_lib_is_invocable should have the value 201703L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_is_layout_compatible
 #     error "__cpp_lib_is_layout_compatible should be defined in c++20"
 #   endif
 #   if __cpp_lib_is_layout_compatible != 201907L
 #     error "__cpp_lib_is_layout_compatible should have the value 201907L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_is_layout_compatible
 #     error "__cpp_lib_is_layout_compatible should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -2986,14 +2986,14 @@
 #   error "__cpp_lib_is_null_pointer should have the value 201309L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_is_pointer_interconvertible
 #     error "__cpp_lib_is_pointer_interconvertible should be defined in c++20"
 #   endif
 #   if __cpp_lib_is_pointer_interconvertible != 201907L
 #     error "__cpp_lib_is_pointer_interconvertible should have the value 201907L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_is_pointer_interconvertible
 #     error "__cpp_lib_is_pointer_interconvertible should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3010,20 +3010,20 @@
 #   error "__cpp_lib_is_swappable should have the value 201603L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_jthread
 #     error "__cpp_lib_jthread should be defined in c++20"
 #   endif
 #   if __cpp_lib_jthread != 201911L
 #     error "__cpp_lib_jthread should have the value 201911L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_jthread
 #     error "__cpp_lib_jthread should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)
 #   ifndef __cpp_lib_latch
 #     error "__cpp_lib_latch should be defined in c++20"
 #   endif
@@ -3032,7 +3032,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_latch
-#     error "__cpp_lib_latch should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch) is not defined!"
+#     error "__cpp_lib_latch should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch) is not defined!"
 #   endif
 # endif
 
@@ -3092,27 +3092,27 @@
 #   error "__cpp_lib_math_constants should have the value 201907L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should be defined in c++20"
 #   endif
 #   if __cpp_lib_math_special_functions != 201603L
 #     error "__cpp_lib_math_special_functions should have the value 201603L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_memory_resource
 #     error "__cpp_lib_memory_resource should be defined in c++20"
 #   endif
 #   if __cpp_lib_memory_resource != 201603L
 #     error "__cpp_lib_memory_resource should have the value 201603L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_memory_resource
 #     error "__cpp_lib_memory_resource should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3161,27 +3161,27 @@
 #   error "__cpp_lib_out_ptr should not be defined before c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should be defined in c++20"
 #   endif
 #   if __cpp_lib_parallel_algorithm != 201603L
 #     error "__cpp_lib_parallel_algorithm should have the value 201603L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_polymorphic_allocator
 #     error "__cpp_lib_polymorphic_allocator should be defined in c++20"
 #   endif
 #   if __cpp_lib_polymorphic_allocator != 201902L
 #     error "__cpp_lib_polymorphic_allocator should have the value 201902L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_polymorphic_allocator
 #     error "__cpp_lib_polymorphic_allocator should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3194,7 +3194,7 @@
 #   error "__cpp_lib_quoted_string_io should have the value 201304L in c++20"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++20"
 #   endif
@@ -3203,7 +3203,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 
@@ -3285,7 +3285,7 @@
 #   error "__cpp_lib_scoped_lock should have the value 201703L in c++20"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
 #   ifndef __cpp_lib_semaphore
 #     error "__cpp_lib_semaphore should be defined in c++20"
 #   endif
@@ -3294,11 +3294,11 @@
 #   endif
 # else
 #   ifdef __cpp_lib_semaphore
-#     error "__cpp_lib_semaphore should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) is not defined!"
+#     error "__cpp_lib_semaphore should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
 #   ifndef __cpp_lib_shared_mutex
 #     error "__cpp_lib_shared_mutex should be defined in c++20"
 #   endif
@@ -3307,7 +3307,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_mutex
-#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
+#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
 #   endif
 # endif
 
@@ -3325,7 +3325,7 @@
 #   error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++20"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
 #   ifndef __cpp_lib_shared_timed_mutex
 #     error "__cpp_lib_shared_timed_mutex should be defined in c++20"
 #   endif
@@ -3334,7 +3334,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_timed_mutex
-#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
+#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
 #   endif
 # endif
 
@@ -3345,27 +3345,27 @@
 #   error "__cpp_lib_shift should have the value 201806L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_smart_ptr_for_overwrite
 #     error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++20"
 #   endif
 #   if __cpp_lib_smart_ptr_for_overwrite != 202002L
 #     error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_smart_ptr_for_overwrite
 #     error "__cpp_lib_smart_ptr_for_overwrite should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_source_location
 #     error "__cpp_lib_source_location should be defined in c++20"
 #   endif
 #   if __cpp_lib_source_location != 201907L
 #     error "__cpp_lib_source_location should have the value 201907L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_source_location
 #     error "__cpp_lib_source_location should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3426,27 +3426,27 @@
 #   error "__cpp_lib_string_view should have the value 201803L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_syncbuf
 #     error "__cpp_lib_syncbuf should be defined in c++20"
 #   endif
 #   if __cpp_lib_syncbuf != 201803L
 #     error "__cpp_lib_syncbuf should have the value 201803L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_syncbuf
 #     error "__cpp_lib_syncbuf should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_three_way_comparison
 #     error "__cpp_lib_three_way_comparison should be defined in c++20"
 #   endif
 #   if __cpp_lib_three_way_comparison != 201907L
 #     error "__cpp_lib_three_way_comparison should have the value 201907L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_three_way_comparison
 #     error "__cpp_lib_three_way_comparison should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3466,14 +3466,14 @@
 #   error "__cpp_lib_to_array should have the value 201907L in c++20"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should be defined in c++20"
 #   endif
 #   if __cpp_lib_to_chars != 201611L
 #     error "__cpp_lib_to_chars should have the value 201611L in c++20"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3622,14 +3622,14 @@
 #   error "__cpp_lib_as_const should have the value 201510L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_associative_heterogeneous_erasure
 #     error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++2b"
 #   endif
 #   if __cpp_lib_associative_heterogeneous_erasure != 202110L
 #     error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_associative_heterogeneous_erasure
 #     error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3649,14 +3649,14 @@
 #   error "__cpp_lib_atomic_flag_test should have the value 201907L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_float
 #     error "__cpp_lib_atomic_float should be defined in c++2b"
 #   endif
 #   if __cpp_lib_atomic_float != 201711L
 #     error "__cpp_lib_atomic_float should have the value 201711L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_float
 #     error "__cpp_lib_atomic_float should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3676,27 +3676,27 @@
 #   error "__cpp_lib_atomic_lock_free_type_aliases should have the value 201907L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_ref
 #     error "__cpp_lib_atomic_ref should be defined in c++2b"
 #   endif
 #   if __cpp_lib_atomic_ref != 201806L
 #     error "__cpp_lib_atomic_ref should have the value 201806L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_ref
 #     error "__cpp_lib_atomic_ref should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_atomic_shared_ptr
 #     error "__cpp_lib_atomic_shared_ptr should be defined in c++2b"
 #   endif
 #   if __cpp_lib_atomic_shared_ptr != 201711L
 #     error "__cpp_lib_atomic_shared_ptr should have the value 201711L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_atomic_shared_ptr
 #     error "__cpp_lib_atomic_shared_ptr should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3709,7 +3709,7 @@
 #   error "__cpp_lib_atomic_value_initialization should have the value 201911L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)
 #   ifndef __cpp_lib_atomic_wait
 #     error "__cpp_lib_atomic_wait should be defined in c++2b"
 #   endif
@@ -3718,11 +3718,11 @@
 #   endif
 # else
 #   ifdef __cpp_lib_atomic_wait
-#     error "__cpp_lib_atomic_wait should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait) is not defined!"
+#     error "__cpp_lib_atomic_wait should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)
 #   ifndef __cpp_lib_barrier
 #     error "__cpp_lib_barrier should be defined in c++2b"
 #   endif
@@ -3731,18 +3731,18 @@
 #   endif
 # else
 #   ifdef __cpp_lib_barrier
-#     error "__cpp_lib_barrier should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier) is not defined!"
+#     error "__cpp_lib_barrier should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_bind_back
 #     error "__cpp_lib_bind_back should be defined in c++2b"
 #   endif
 #   if __cpp_lib_bind_back != 202202L
 #     error "__cpp_lib_bind_back should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_bind_back
 #     error "__cpp_lib_bind_back should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3762,14 +3762,14 @@
 #   error "__cpp_lib_bit_cast should have the value 201806L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_bitops
 #     error "__cpp_lib_bitops should be defined in c++2b"
 #   endif
 #   if __cpp_lib_bitops != 201907L
 #     error "__cpp_lib_bitops should have the value 201907L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_bitops
 #     error "__cpp_lib_bitops should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3865,27 +3865,27 @@
 #   error "__cpp_lib_constexpr_algorithms should have the value 201806L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_cmath
 #     error "__cpp_lib_constexpr_cmath should be defined in c++2b"
 #   endif
 #   if __cpp_lib_constexpr_cmath != 202202L
 #     error "__cpp_lib_constexpr_cmath should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_cmath
 #     error "__cpp_lib_constexpr_cmath should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_complex
 #     error "__cpp_lib_constexpr_complex should be defined in c++2b"
 #   endif
 #   if __cpp_lib_constexpr_complex != 201711L
 #     error "__cpp_lib_constexpr_complex should have the value 201711L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_complex
 #     error "__cpp_lib_constexpr_complex should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3947,14 +3947,14 @@
 #   error "__cpp_lib_constexpr_tuple should have the value 201811L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_typeinfo
 #     error "__cpp_lib_constexpr_typeinfo should be defined in c++2b"
 #   endif
 #   if __cpp_lib_constexpr_typeinfo != 202106L
 #     error "__cpp_lib_constexpr_typeinfo should have the value 202106L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_typeinfo
 #     error "__cpp_lib_constexpr_typeinfo should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -3967,14 +3967,14 @@
 #   error "__cpp_lib_constexpr_utility should have the value 201811L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_constexpr_vector
 #     error "__cpp_lib_constexpr_vector should be defined in c++2b"
 #   endif
 #   if __cpp_lib_constexpr_vector != 201907L
 #     error "__cpp_lib_constexpr_vector should have the value 201907L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_constexpr_vector
 #     error "__cpp_lib_constexpr_vector should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4028,20 +4028,20 @@
 #   error "__cpp_lib_exchange_function should have the value 201304L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_execution
 #     error "__cpp_lib_execution should be defined in c++2b"
 #   endif
 #   if __cpp_lib_execution != 201902L
 #     error "__cpp_lib_execution should have the value 201902L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_execution
 #     error "__cpp_lib_execution should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)
 #   ifndef __cpp_lib_filesystem
 #     error "__cpp_lib_filesystem should be defined in c++2b"
 #   endif
@@ -4050,11 +4050,11 @@
 #   endif
 # else
 #   ifdef __cpp_lib_filesystem
-#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
+#     error "__cpp_lib_filesystem should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)
+# if !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT)
 #   ifndef __cpp_lib_format
 #     error "__cpp_lib_format should be defined in c++2b"
 #   endif
@@ -4063,7 +4063,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_format
-#     error "__cpp_lib_format should not be defined when !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) is not defined!"
+#     error "__cpp_lib_format should not be defined when !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT) is not defined!"
 #   endif
 # endif
 
@@ -4164,14 +4164,14 @@
 #   error "__cpp_lib_invoke should have the value 201411L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_invoke_r
 #     error "__cpp_lib_invoke_r should be defined in c++2b"
 #   endif
 #   if __cpp_lib_invoke_r != 202106L
 #     error "__cpp_lib_invoke_r should have the value 202106L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_invoke_r
 #     error "__cpp_lib_invoke_r should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4205,14 +4205,14 @@
 #   error "__cpp_lib_is_invocable should have the value 201703L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_is_layout_compatible
 #     error "__cpp_lib_is_layout_compatible should be defined in c++2b"
 #   endif
 #   if __cpp_lib_is_layout_compatible != 201907L
 #     error "__cpp_lib_is_layout_compatible should have the value 201907L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_is_layout_compatible
 #     error "__cpp_lib_is_layout_compatible should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4232,14 +4232,14 @@
 #   error "__cpp_lib_is_null_pointer should have the value 201309L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_is_pointer_interconvertible
 #     error "__cpp_lib_is_pointer_interconvertible should be defined in c++2b"
 #   endif
 #   if __cpp_lib_is_pointer_interconvertible != 201907L
 #     error "__cpp_lib_is_pointer_interconvertible should have the value 201907L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_is_pointer_interconvertible
 #     error "__cpp_lib_is_pointer_interconvertible should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4259,20 +4259,20 @@
 #   error "__cpp_lib_is_swappable should have the value 201603L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_jthread
 #     error "__cpp_lib_jthread should be defined in c++2b"
 #   endif
 #   if __cpp_lib_jthread != 201911L
 #     error "__cpp_lib_jthread should have the value 201911L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_jthread
 #     error "__cpp_lib_jthread should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)
 #   ifndef __cpp_lib_latch
 #     error "__cpp_lib_latch should be defined in c++2b"
 #   endif
@@ -4281,7 +4281,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_latch
-#     error "__cpp_lib_latch should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch) is not defined!"
+#     error "__cpp_lib_latch should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch) is not defined!"
 #   endif
 # endif
 
@@ -4341,40 +4341,40 @@
 #   error "__cpp_lib_math_constants should have the value 201907L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should be defined in c++2b"
 #   endif
 #   if __cpp_lib_math_special_functions != 201603L
 #     error "__cpp_lib_math_special_functions should have the value 201603L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_math_special_functions
 #     error "__cpp_lib_math_special_functions should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_memory_resource
 #     error "__cpp_lib_memory_resource should be defined in c++2b"
 #   endif
 #   if __cpp_lib_memory_resource != 201603L
 #     error "__cpp_lib_memory_resource should have the value 201603L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_memory_resource
 #     error "__cpp_lib_memory_resource should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_move_only_function
 #     error "__cpp_lib_move_only_function should be defined in c++2b"
 #   endif
 #   if __cpp_lib_move_only_function != 202110L
 #     error "__cpp_lib_move_only_function should have the value 202110L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_move_only_function
 #     error "__cpp_lib_move_only_function should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4415,40 +4415,40 @@
 #   error "__cpp_lib_optional should have the value 202110L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_out_ptr
 #     error "__cpp_lib_out_ptr should be defined in c++2b"
 #   endif
 #   if __cpp_lib_out_ptr != 202106L
 #     error "__cpp_lib_out_ptr should have the value 202106L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_out_ptr
 #     error "__cpp_lib_out_ptr should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should be defined in c++2b"
 #   endif
 #   if __cpp_lib_parallel_algorithm != 201603L
 #     error "__cpp_lib_parallel_algorithm should have the value 201603L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_parallel_algorithm
 #     error "__cpp_lib_parallel_algorithm should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_polymorphic_allocator
 #     error "__cpp_lib_polymorphic_allocator should be defined in c++2b"
 #   endif
 #   if __cpp_lib_polymorphic_allocator != 201902L
 #     error "__cpp_lib_polymorphic_allocator should have the value 201902L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_polymorphic_allocator
 #     error "__cpp_lib_polymorphic_allocator should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4461,7 +4461,7 @@
 #   error "__cpp_lib_quoted_string_io should have the value 201304L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+# if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 #   ifndef __cpp_lib_ranges
 #     error "__cpp_lib_ranges should be defined in c++2b"
 #   endif
@@ -4470,109 +4470,109 @@
 #   endif
 # else
 #   ifdef __cpp_lib_ranges
-#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES) is not defined!"
+#     error "__cpp_lib_ranges should not be defined when !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_chunk
 #     error "__cpp_lib_ranges_chunk should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_chunk != 202202L
 #     error "__cpp_lib_ranges_chunk should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_chunk
 #     error "__cpp_lib_ranges_chunk should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_chunk_by
 #     error "__cpp_lib_ranges_chunk_by should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_chunk_by != 202202L
 #     error "__cpp_lib_ranges_chunk_by should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_chunk_by
 #     error "__cpp_lib_ranges_chunk_by should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_iota
 #     error "__cpp_lib_ranges_iota should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_iota != 202202L
 #     error "__cpp_lib_ranges_iota should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_iota
 #     error "__cpp_lib_ranges_iota should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_join_with
 #     error "__cpp_lib_ranges_join_with should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_join_with != 202202L
 #     error "__cpp_lib_ranges_join_with should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_join_with
 #     error "__cpp_lib_ranges_join_with should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_slide
 #     error "__cpp_lib_ranges_slide should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_slide != 202202L
 #     error "__cpp_lib_ranges_slide should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_slide
 #     error "__cpp_lib_ranges_slide should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_starts_ends_with
 #     error "__cpp_lib_ranges_starts_ends_with should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_starts_ends_with != 202106L
 #     error "__cpp_lib_ranges_starts_ends_with should have the value 202106L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_starts_ends_with
 #     error "__cpp_lib_ranges_starts_ends_with should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_to_container != 202202L
 #     error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_to_container
 #     error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_ranges_zip
 #     error "__cpp_lib_ranges_zip should be defined in c++2b"
 #   endif
 #   if __cpp_lib_ranges_zip != 202110L
 #     error "__cpp_lib_ranges_zip should have the value 202110L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_ranges_zip
 #     error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4585,14 +4585,14 @@
 #   error "__cpp_lib_raw_memory_algorithms should have the value 201606L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_reference_from_temporary
 #     error "__cpp_lib_reference_from_temporary should be defined in c++2b"
 #   endif
 #   if __cpp_lib_reference_from_temporary != 202202L
 #     error "__cpp_lib_reference_from_temporary should have the value 202202L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_reference_from_temporary
 #     error "__cpp_lib_reference_from_temporary should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4633,7 +4633,7 @@
 #   error "__cpp_lib_scoped_lock should have the value 201703L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)
 #   ifndef __cpp_lib_semaphore
 #     error "__cpp_lib_semaphore should be defined in c++2b"
 #   endif
@@ -4642,11 +4642,11 @@
 #   endif
 # else
 #   ifdef __cpp_lib_semaphore
-#     error "__cpp_lib_semaphore should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) is not defined!"
+#     error "__cpp_lib_semaphore should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore) is not defined!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)
 #   ifndef __cpp_lib_shared_mutex
 #     error "__cpp_lib_shared_mutex should be defined in c++2b"
 #   endif
@@ -4655,7 +4655,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_mutex
-#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
+#     error "__cpp_lib_shared_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex) is not defined!"
 #   endif
 # endif
 
@@ -4673,7 +4673,7 @@
 #   error "__cpp_lib_shared_ptr_weak_type should have the value 201606L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
+# if !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)
 #   ifndef __cpp_lib_shared_timed_mutex
 #     error "__cpp_lib_shared_timed_mutex should be defined in c++2b"
 #   endif
@@ -4682,7 +4682,7 @@
 #   endif
 # else
 #   ifdef __cpp_lib_shared_timed_mutex
-#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
+#     error "__cpp_lib_shared_timed_mutex should not be defined when !defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex) is not defined!"
 #   endif
 # endif
 
@@ -4693,27 +4693,27 @@
 #   error "__cpp_lib_shift should have the value 201806L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_smart_ptr_for_overwrite
 #     error "__cpp_lib_smart_ptr_for_overwrite should be defined in c++2b"
 #   endif
 #   if __cpp_lib_smart_ptr_for_overwrite != 202002L
 #     error "__cpp_lib_smart_ptr_for_overwrite should have the value 202002L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_smart_ptr_for_overwrite
 #     error "__cpp_lib_smart_ptr_for_overwrite should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_source_location
 #     error "__cpp_lib_source_location should be defined in c++2b"
 #   endif
 #   if __cpp_lib_source_location != 201907L
 #     error "__cpp_lib_source_location should have the value 201907L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_source_location
 #     error "__cpp_lib_source_location should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4726,14 +4726,14 @@
 #   error "__cpp_lib_span should have the value 202002L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_spanstream
 #     error "__cpp_lib_spanstream should be defined in c++2b"
 #   endif
 #   if __cpp_lib_spanstream != 202106L
 #     error "__cpp_lib_spanstream should have the value 202106L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_spanstream
 #     error "__cpp_lib_spanstream should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4746,14 +4746,14 @@
 #   error "__cpp_lib_ssize should have the value 201902L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_stacktrace
 #     error "__cpp_lib_stacktrace should be defined in c++2b"
 #   endif
 #   if __cpp_lib_stacktrace != 202011L
 #     error "__cpp_lib_stacktrace should have the value 202011L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_stacktrace
 #     error "__cpp_lib_stacktrace should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4801,27 +4801,27 @@
 #   error "__cpp_lib_string_view should have the value 201803L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_syncbuf
 #     error "__cpp_lib_syncbuf should be defined in c++2b"
 #   endif
 #   if __cpp_lib_syncbuf != 201803L
 #     error "__cpp_lib_syncbuf should have the value 201803L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_syncbuf
 #     error "__cpp_lib_syncbuf should not be defined because it is unimplemented in libc++!"
 #   endif
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_three_way_comparison
 #     error "__cpp_lib_three_way_comparison should be defined in c++2b"
 #   endif
 #   if __cpp_lib_three_way_comparison != 201907L
 #     error "__cpp_lib_three_way_comparison should have the value 201907L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_three_way_comparison
 #     error "__cpp_lib_three_way_comparison should not be defined because it is unimplemented in libc++!"
 #   endif
@@ -4841,14 +4841,14 @@
 #   error "__cpp_lib_to_array should have the value 201907L in c++2b"
 # endif
 
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should be defined in c++2b"
 #   endif
 #   if __cpp_lib_to_chars != 201611L
 #     error "__cpp_lib_to_chars should have the value 201611L in c++2b"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef __cpp_lib_to_chars
 #     error "__cpp_lib_to_chars should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/test/std/library/description/conventions/customization.point.object/cpo.compile.pass.cpp b/libcxx/test/std/library/description/conventions/customization.point.object/cpo.compile.pass.cpp
index 225412fda215..1d8b7acd99d7 100644
--- a/libcxx/test/std/library/description/conventions/customization.point.object/cpo.compile.pass.cpp
+++ b/libcxx/test/std/library/description/conventions/customization.point.object/cpo.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // [customization.point.object]
 // [range.adaptor.object] "A range adaptor object is a customization point object..."

diff  --git a/libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp b/libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp
index eba435123b2a..a9b38dbd33ec 100644
--- a/libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp
+++ b/libcxx/test/std/library/description/conventions/customization.point.object/niebloid.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 // REQUIRES: stdlib=libc++
 
 // [algorithms.requirements]/2

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp
index 7fef3baa25cd..4e14ed416113 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char16_t.pass.cpp
@@ -14,7 +14,7 @@
 // explicit codecvt_byname(const string& nm, size_t refs = 0);
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <cassert>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp
index 17fbb730e08b..7499778d8570 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt.byname/ctor_char32_t.pass.cpp
@@ -14,7 +14,7 @@
 // explicit codecvt_byname(const string& nm, size_t refs = 0);
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <cassert>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp
index e459954768a0..cf4855229d6d 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char16_t.pass.cpp
@@ -13,7 +13,7 @@
 // explicit codecvt(size_t refs = 0);
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <cassert>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp
index 854c54912235..c40910af688e 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/ctor_char32_t.pass.cpp
@@ -13,7 +13,7 @@
 // explicit codecvt(size_t refs = 0);
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <cassert>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp
index 998d970567fd..903f58e735ae 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_always_noconv.pass.cpp
@@ -13,7 +13,7 @@
 // bool always_noconv() const throw();
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <cassert>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp
index 1e2b4ba6a68d..3ac563942981 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_encoding.pass.cpp
@@ -13,7 +13,7 @@
 // int encoding() const throw();
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <cassert>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp
index 9204ea26b9c9..bba5bd8fa0c4 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_in.pass.cpp
@@ -15,7 +15,7 @@
 //           internT* to, internT* to_end, internT*& to_next) const;
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // Test is intended to convert between UTF8 and UTF16/32, it will fail on
 // z/OS since at default char type on z/OS is EBCDIC character which has

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp
index 98c5824a3d4a..f410553e1f97 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_length.pass.cpp
@@ -13,7 +13,7 @@
 // int length(stateT& state, const externT* from, const externT* from_end, size_t max) const;
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // Test is intended to convert between UTF8 and UTF16/32, it will fail on
 // z/OS since at default char type on z/OS is EBCDIC character which has

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp
index d8aa7491a0a8..4077b1f35315 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_max_length.pass.cpp
@@ -13,7 +13,7 @@
 // int max_length() const throw();
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <cassert>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp
index a8f16fcc29a1..b7d81272fb42 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_out.pass.cpp
@@ -15,7 +15,7 @@
 //            externT* to, externT* to_end, externT*& to_next) const;
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // Test is intended to convert between UTF8 and UTF16/32, it will fail on
 // z/OS since at default char type on z/OS is EBCDIC character which has

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp
index bec405508dda..1891c75c4935 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char16_t_unshift.pass.cpp
@@ -14,7 +14,7 @@
 //                externT* to, externT* to_end, externT*& to_next) const;
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <string>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp
index 7dc4c87bf988..96b028b926ca 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_always_noconv.pass.cpp
@@ -13,7 +13,7 @@
 // bool always_noconv() const throw();
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <cassert>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp
index 13eb91812163..9bb330d6ad1b 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_encoding.pass.cpp
@@ -13,7 +13,7 @@
 // int encoding() const throw();
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <cassert>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp
index 74cc4793aaf9..a00314b4a277 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_in.pass.cpp
@@ -15,7 +15,7 @@
 //           internT* to, internT* to_end, internT*& to_next) const;
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // Test is intended to convert between UTF8 and UTF16/32, it will fail on
 // z/OS since at default char type on z/OS is EBCDIC character which has

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp
index f51a9db212a2..0b33bb79d31f 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_length.pass.cpp
@@ -13,7 +13,7 @@
 // int length(stateT& state, const externT* from, const externT* from_end, size_t max) const;
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // Test is intended to convert between UTF8 and UTF16/32, it will fail on
 // z/OS since at default char type on z/OS is EBCDIC character which has

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp
index ef31dbd30633..a7eb5d35482a 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_max_length.pass.cpp
@@ -13,7 +13,7 @@
 // int max_length() const throw();
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <cassert>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp
index 379b607a80ee..e26658cf2655 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_out.pass.cpp
@@ -15,7 +15,7 @@
 //            externT* to, externT* to_end, externT*& to_next) const;
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // Test is intended to convert between UTF8 and UTF16/32, it will fail on
 // z/OS since at default char type on z/OS is EBCDIC character which has

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp
index b962af4732d5..dc938878e336 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/char32_t_unshift.pass.cpp
@@ -14,7 +14,7 @@
 //                externT* to, externT* to_end, externT*& to_next) const;
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <string>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp
index 03185d3b82bd..1df94ec5d5a3 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/locale.codecvt.members/utf_sanity_check.pass.cpp
@@ -11,7 +11,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp
index 4428d7750b8b..44713f2ad8bf 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char16_t.pass.cpp
@@ -21,7 +21,7 @@
 // };
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <type_traits>

diff  --git a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp
index e20762525211..8c4dc284180e 100644
--- a/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.ctype/locale.codecvt/types_char32_t.pass.cpp
@@ -21,7 +21,7 @@
 // };
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <locale>
 #include <type_traits>

diff  --git a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
index acb1e1f7d407..f27869f9dc5c 100644
--- a/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
+++ b/libcxx/test/std/localization/locale.categories/category.time/locale.time.get.byname/get_date.pass.cpp
@@ -110,7 +110,7 @@ int main(int, char**)
         err = std::ios_base::goodbit;
         t = std::tm();
         I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t);
-#if _LIBCPP_VERSION
+#if _LIBCUDACXX_VERSION
           // libc++ points to the '/' after the month.
           assert(base(i) == in+2);
 #else
@@ -129,7 +129,7 @@ int main(int, char**)
         err = std::ios_base::goodbit;
         t = std::tm();
         I i = f.get_date(I(in), I(in+sizeof(in)/sizeof(in[0])-1), ios, err, &t);
-#if _LIBCPP_VERSION
+#if _LIBCUDACXX_VERSION
           // libc++ points to the '/' after the month.
           assert(base(i) == in+2);
 #else

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp
index b7020ac0f161..7d38d499b2b8 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_mode.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // enum codecvt_mode
 // {

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp
index c38f11df5ac4..9b0023e24f0b 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp
index f91706c77d25..12fa4ca1c931 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_always_noconv.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp
index 12bfa096924b..eab78455490b 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_encoding.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp
index 8d4f48e8f54d..3ba7ff8f3db8 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_in.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp
index 53172e7d630b..d780e3549d99 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_length.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp
index ac3daf40987b..747b2bb17865 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_max_length.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp
index 2a6936aee10c..f35d29feabe9 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_out.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp
index 55cbf5a7d071..a7424ff9769f 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf16_unshift.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp
index 1f06de27d9ae..38c638a56e00 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp
index f25c8e454510..8f9abb1805a3 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_always_noconv.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp
index 55c1c5e52f76..ee6357e39a2b 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_encoding.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp
index 9abd0868f40a..0d4818a3210a 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_in.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp
index 37cc10aa90b7..1525a3bcb4d1 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_length.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp
index 6279dceeb2eb..1f55186904fe 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_max_length.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp
index 7d124c982e5e..39826ed217b9 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_out.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp
index 9ab962997822..2ae57e3a07ee 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_unshift.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp
index 97d7ef230170..589760f729e6 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_always_noconv.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp
index f0514b51cedb..85f2ef67704e 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_encoding.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp
index d7776b3a2d89..46c6f6d6bbbc 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_in.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp
index 03f813719acd..3f90f901ed44 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_length.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp
index c59e8e803501..337039af5beb 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_max_length.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp
index c208dc33b0f2..602a3c6bbf44 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_out.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp
index 6db92c5b6a07..8b589de83bbc 100644
--- a/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp
+++ b/libcxx/test/std/localization/locale.stdcvt/codecvt_utf8_utf16_unshift.pass.cpp
@@ -8,7 +8,7 @@
 
 // <codecvt>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class Elem, unsigned long Maxcode = 0x10ffff,
 //           codecvt_mode Mode = (codecvt_mode)0>

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp
index 5846e4e72a84..ffd331730463 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/ctor.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wbuffer_convert<Codecvt, Elem, Tr>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp
index a971f0f75271..60e64128ff5a 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/overflow.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wbuffer_convert<Codecvt, Elem, Tr>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp
index 94191a098246..bba3d40c7b21 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/pbackfail.pass.cpp
@@ -10,7 +10,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wbuffer_convert<Codecvt, Elem, Tr>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp
index c9c134592bf6..700a461af918 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/rdbuf.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wbuffer_convert<Codecvt, Elem, Tr>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp
index 2d800b57e7b7..065cdf5dd539 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/seekoff.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wbuffer_convert<Codecvt, Elem, Tr>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp
index 57058d148fee..37fdd27a6546 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/state.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wbuffer_convert<Codecvt, Elem, Tr>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp
index 244670d488aa..2fa6c0f9f293 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/test.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wbuffer_convert<Codecvt, Elem, Tr>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp
index 409a1b4639af..b29061ac5d28 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.buffer/underflow.pass.cpp
@@ -10,7 +10,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wbuffer_convert<Codecvt, Elem, Tr>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp
index e1b1f69e81de..3987eff26573 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/converted.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp
index 8c0321049663..447c35af1fa8 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp
index 5032a301506d..6f0226162f7b 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_codecvt_state.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp
index 4125869bfa3b..a1bceddb3cff 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_copy.pass.cpp
@@ -12,7 +12,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
index f9e5ee3cd68a..cbb04417f010 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/ctor_err_string.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp
index 157b7454153b..8e644311e5c2 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/from_bytes.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp
index 3bf3736a7bce..31bd517e317a 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/state.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp
index 52c5897634d0..cfc1840ff2d7 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/to_bytes.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // wstring_convert<Codecvt, Elem, Wide_alloc, Byte_alloc>
 

diff  --git a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp
index 0ea13e2ce383..c0af9f6bea45 100644
--- a/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale.convenience/conversions/conversions.string/types.pass.cpp
@@ -8,7 +8,7 @@
 
 // <locale>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template<class Codecvt, class Elem = wchar_t,
 //          class Wide_alloc = allocator<Elem>,

diff  --git a/libcxx/test/std/localization/locales/locale/locale.cons/assign.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/assign.pass.cpp
index 87c7ec2198b3..583c2a88c915 100644
--- a/libcxx/test/std/localization/locales/locale/locale.cons/assign.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.cons/assign.pass.cpp
@@ -13,7 +13,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp
index 7c29d9cb9441..63c14ad7db0e 100644
--- a/libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.cons/char_pointer.pass.cpp
@@ -17,7 +17,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locales/locale/locale.cons/copy.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/copy.pass.cpp
index 09e4e457b93d..68e1a0b291b8 100644
--- a/libcxx/test/std/localization/locales/locale/locale.cons/copy.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.cons/copy.pass.cpp
@@ -13,7 +13,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locales/locale/locale.cons/default.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/default.pass.cpp
index 2035f5d37baa..7204c7f6a323 100644
--- a/libcxx/test/std/localization/locales/locale/locale.cons/default.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.cons/default.pass.cpp
@@ -13,7 +13,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
index 3a4bc23233d2..1c9067fa3dfb 100644
--- a/libcxx/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.cons/locale_char_pointer_cat.pass.cpp
@@ -15,7 +15,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
index 8482f4991f4f..72ccc96416b7 100644
--- a/libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.cons/locale_facetptr.pass.cpp
@@ -13,7 +13,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
index 4337362bdd35..cda4698c6a11 100644
--- a/libcxx/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.cons/locale_locale_cat.pass.cpp
@@ -15,7 +15,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
index ee39910f6a2b..8ca644ed09f1 100644
--- a/libcxx/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.cons/locale_string_cat.pass.cpp
@@ -15,7 +15,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locales/locale/locale.cons/string.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.cons/string.pass.cpp
index 1296b74b596c..969d063395d5 100644
--- a/libcxx/test/std/localization/locales/locale/locale.cons/string.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.cons/string.pass.cpp
@@ -14,7 +14,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locales/locale/locale.members/combine.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.members/combine.pass.cpp
index 811c47c0c5b8..1734b8f64eec 100644
--- a/libcxx/test/std/localization/locales/locale/locale.members/combine.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.members/combine.pass.cpp
@@ -11,7 +11,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locales/locale/locale.statics/classic.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.statics/classic.pass.cpp
index 72801e3cef5e..bd0b98820d79 100644
--- a/libcxx/test/std/localization/locales/locale/locale.statics/classic.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.statics/classic.pass.cpp
@@ -11,7 +11,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/localization/locales/locale/locale.statics/global.pass.cpp b/libcxx/test/std/localization/locales/locale/locale.statics/global.pass.cpp
index b8bfa6927c44..c2647ed775ed 100644
--- a/libcxx/test/std/localization/locales/locale/locale.statics/global.pass.cpp
+++ b/libcxx/test/std/localization/locales/locale/locale.statics/global.pass.cpp
@@ -13,7 +13,7 @@
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0}}
 
 // This test runs in C++20, but we have deprecated codecvt<char(16|32), char, mbstate_t> in C++20.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <locale>
 

diff  --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp
index f18d52a0ed57..cd724272806c 100644
--- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_ceil.pass.cpp
@@ -30,7 +30,7 @@ template <class T>
 constexpr bool test()
 {
     ASSERT_SAME_TYPE(decltype(std::bit_ceil(T())), T);
-    LIBCPP_ASSERT_NOEXCEPT(std::bit_ceil(T()));
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::bit_ceil(T()));
 
     assert(std::bit_ceil(T(0)) == T(1));
     assert(std::bit_ceil(T(1)) == T(1));

diff  --git a/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp b/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp
index f89029017fa8..8b21b91144d8 100644
--- a/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp
+++ b/libcxx/test/std/numerics/bit/bit.pow.two/bit_floor.pass.cpp
@@ -29,7 +29,7 @@ template <class T>
 constexpr bool test()
 {
     ASSERT_SAME_TYPE(decltype(std::bit_floor(T())), T);
-    LIBCPP_ASSERT_NOEXCEPT(std::bit_floor(T()));
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::bit_floor(T()));
     T max = std::numeric_limits<T>::max();
 
     assert(std::bit_floor(T(0)) == T(0));

diff  --git a/libcxx/test/std/numerics/c.math/lerp.pass.cpp b/libcxx/test/std/numerics/c.math/lerp.pass.cpp
index 6b0b5aba8b84..286e56892c99 100644
--- a/libcxx/test/std/numerics/c.math/lerp.pass.cpp
+++ b/libcxx/test/std/numerics/c.math/lerp.pass.cpp
@@ -33,7 +33,7 @@ template <typename T>
 void test()
 {
     ASSERT_SAME_TYPE(T, decltype(std::lerp(T(), T(), T())));
-    LIBCPP_ASSERT_NOEXCEPT(      std::lerp(T(), T(), T()));
+    LIBCUDACXX_ASSERT_NOEXCEPT(      std::lerp(T(), T(), T()));
 
 //     constexpr T minV = std::numeric_limits<T>::min();
     constexpr T maxV = std::numeric_limits<T>::max();

diff  --git a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/valarray_helper.h b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/valarray_helper.h
index d68dac071c68..fbcb1c652375 100644
--- a/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/valarray_helper.h
+++ b/libcxx/test/std/numerics/numarray/valarray.nonmembers/valarray.transcend/valarray_helper.h
@@ -1,5 +1,5 @@
-#ifndef LIBCPP_TEST_VALARRAY_HELPER_H
-#define LIBCPP_TEST_VALARRAY_HELPER_H
+#ifndef LIBCUDACXX_TEST_VALARRAY_HELPER_H
+#define LIBCUDACXX_TEST_VALARRAY_HELPER_H
 
 #include <cmath>
 
@@ -15,4 +15,4 @@ inline bool is_about(double x, double y, int significant_digits) {
     return std::abs(x - y) < epsilon;
 }
 
-#endif /* LIBCPP_TEST_VALARRAY_HELPER */
+#endif /* LIBCUDACXX_TEST_VALARRAY_HELPER */

diff  --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp
index 9d60eaba39ae..0dba49e8bbf0 100644
--- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/eval.pass.cpp
@@ -31,7 +31,7 @@ class rand1
     static_assert(Min < Max, "rand1 invalid parameters");
 public:
 
-#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
+#if TEST_STD_VER < 11 && defined(_LIBCUDACXX_VERSION)
     // Workaround for lack of constexpr in C++03
     static const result_type _Min = Min;
     static const result_type _Max = Max;

diff  --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp
index 1b6fb87e347f..dd3dc8efd8af 100644
--- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.ibits/result_type.pass.cpp
@@ -33,7 +33,7 @@ class rand1
     static_assert(Min < Max, "rand1 invalid parameters");
 public:
 
-#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
+#if TEST_STD_VER < 11 && defined(_LIBCUDACXX_VERSION)
     // Workaround for lack of constexpr in C++03
     static const result_type _Min = Min;
     static const result_type _Max = Max;

diff  --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp
index 4eecfea81b76..68f7fd1d5091 100644
--- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/eval.pass.cpp
@@ -31,7 +31,7 @@ class rand1
     static_assert(Min < Max, "rand1 invalid parameters");
 public:
 
-#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
+#if TEST_STD_VER < 11 && defined(_LIBCUDACXX_VERSION)
     // Workaround for lack of constexpr in C++03
     static const result_type _Min = Min;
     static const result_type _Max = Max;

diff  --git a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp
index bcb08557c86a..3e486893d46c 100644
--- a/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.adapt/rand.adapt.shuf/result_type.pass.cpp
@@ -33,7 +33,7 @@ class rand1
     static_assert(Min < Max, "rand1 invalid parameters");
 public:
 
-#if TEST_STD_VER < 11 && defined(_LIBCPP_VERSION)
+#if TEST_STD_VER < 11 && defined(_LIBCUDACXX_VERSION)
     // Workaround for lack of constexpr in C++03
     static const result_type _Min = Min;
     static const result_type _Max = Max;

diff  --git a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
index b92a5838c32b..1484c9365473 100644
--- a/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.device/ctor.pass.cpp
@@ -50,7 +50,7 @@ void check_random_device_invalid(const std::string &token) {
 #ifndef TEST_HAS_NO_EXCEPTIONS
   try {
     std::random_device r(token);
-    LIBCPP_ASSERT(false);
+    LIBCUDACXX_ASSERT(false);
   } catch (const std::system_error&) {
   }
 #else
@@ -64,13 +64,13 @@ int main(int, char**) {
   }
   // Check the validity of various tokens
   {
-#if defined(_LIBCPP_USING_ARC4_RANDOM)
+#if defined(_LIBCUDACXX_USING_ARC4_RANDOM)
     check_random_device_valid("/dev/urandom");
     check_random_device_valid("/dev/random");
     check_random_device_valid("/dev/null");
     check_random_device_valid("/dev/nonexistent");
     check_random_device_valid("wrong file");
-#elif defined(_LIBCPP_USING_DEV_RANDOM)
+#elif defined(_LIBCUDACXX_USING_DEV_RANDOM)
     check_random_device_valid("/dev/urandom");
     check_random_device_valid("/dev/random");
     check_random_device_valid("/dev/null");

diff  --git a/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp
index 3339a54c7e53..c1c92aa477a2 100644
--- a/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.device/eval.pass.cpp
@@ -30,12 +30,12 @@ int main(int, char**)
 
     // When using the `/dev/urandom` implementation, make sure that we throw
     // an exception when we hit EOF while reading the custom-provided file.
-#if !defined(TEST_HAS_NO_EXCEPTIONS) && defined(_LIBCPP_USING_DEV_RANDOM)
+#if !defined(TEST_HAS_NO_EXCEPTIONS) && defined(_LIBCUDACXX_USING_DEV_RANDOM)
     {
         std::random_device r("/dev/null");
         try {
             (void)r();
-            LIBCPP_ASSERT(false);
+            LIBCUDACXX_ASSERT(false);
         } catch (const std::system_error&) {
         }
     }

diff  --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
index 2e8bfaebf367..58bab7dd1d67 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.bin/eval.pass.cpp
@@ -526,7 +526,7 @@ int main(int, char**) {
     tests<unsigned long>();
     tests<unsigned long long>();
 
-#if defined(_LIBCPP_VERSION) // extension
+#if defined(_LIBCUDACXX_VERSION) // extension
     tests<int8_t>();
     tests<uint8_t>();
 #if !defined(TEST_HAS_NO_INT128)

diff  --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp
index deccad1db6d5..78a21e94a35e 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.geo/eval.pass.cpp
@@ -312,7 +312,7 @@ int main(int, char**) {
     tests<unsigned long>();
     tests<unsigned long long>();
 
-#if defined(_LIBCPP_VERSION) // extension
+#if defined(_LIBCUDACXX_VERSION) // extension
     // TODO: std::geometric_distribution currently doesn't work reliably with small types.
     // tests<int8_t>();
     // tests<uint8_t>();

diff  --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
index d98a73d29666..23df8ecee967 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp
@@ -302,7 +302,7 @@ int main(int, char**) {
     tests<unsigned long>();
     tests<unsigned long long>();
 
-#if defined(_LIBCPP_VERSION) // extension
+#if defined(_LIBCUDACXX_VERSION) // extension
     // TODO: std::negative_binomial_distribution currently doesn't work reliably with small types.
     // tests<int8_t>();
     // tests<uint8_t>();

diff  --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval_param.PR52906.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval_param.PR52906.pass.cpp
index d360b11fdc58..8e336c8eb3fa 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval_param.PR52906.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.norm/rand.dist.norm.lognormal/eval_param.PR52906.pass.cpp
@@ -32,7 +32,7 @@ int main(int, char**)
     assert(p1 == p2);
     (void) d(g, p1); // This line must not modify p1.
     assert(p1 == p2);
-    LIBCPP_ASSERT(p1 == d.param());
+    LIBCUDACXX_ASSERT(p1 == d.param());
 
     return 0;
 }

diff  --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp
index e217d4d6e216..ac53bda06ad6 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.pois/rand.dist.pois.poisson/eval.pass.cpp
@@ -222,7 +222,7 @@ int main(int, char**) {
   tests<unsigned long>();
   tests<unsigned long long>();
 
-#if defined(_LIBCPP_VERSION) // extension
+#if defined(_LIBCUDACXX_VERSION) // extension
   // TODO: std::poisson_distribution currently doesn't work reliably with small types.
   // tests<int8_t>();
   // tests<uint8_t>();

diff  --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp
index d52e23e9dcd4..6ea2800ce75f 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.samp/rand.dist.samp.discrete/eval.pass.cpp
@@ -304,7 +304,7 @@ int main(int, char**) {
     tests<unsigned long>();
     tests<unsigned long long>();
 
-#if defined(_LIBCPP_VERSION) // extension
+#if defined(_LIBCUDACXX_VERSION) // extension
     tests<int8_t>();
     tests<uint8_t>();
 #if !defined(TEST_HAS_NO_INT128)

diff  --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
index d636c4c955c3..30806eb83b21 100644
--- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.uni/rand.dist.uni.int/eval.pass.cpp
@@ -122,7 +122,7 @@ int main(int, char**)
 
     test_statistics<short, std::minstd_rand0>(SHRT_MIN, SHRT_MAX);
 
-#if defined(_LIBCPP_VERSION) // extension
+#if defined(_LIBCUDACXX_VERSION) // extension
     test_statistics<int8_t, std::minstd_rand0>();
     test_statistics<uint8_t, std::minstd_rand0>();
 

diff  --git a/libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp b/libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp
index b06cd4656610..3dbb81c19521 100644
--- a/libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp
+++ b/libcxx/test/std/numerics/rand/rand.predef/default_random_engine.pass.cpp
@@ -19,7 +19,7 @@ int main(int, char**)
 {
     std::default_random_engine e;
     e.discard(9999);
-    LIBCPP_ASSERT(e() == 399268537u);
+    LIBCUDACXX_ASSERT(e() == 399268537u);
 
   return 0;
 }

diff  --git a/libcxx/test/std/ranges/range.access/begin.pass.cpp b/libcxx/test/std/ranges/range.access/begin.pass.cpp
index ca25fc297a01..d6c0b93122a8 100644
--- a/libcxx/test/std/ranges/range.access/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.access/begin.pass.cpp
@@ -44,16 +44,16 @@ static_assert(!std::is_invocable_v<RangeCBeginT, Incomplete(&&)[10]>);
 static_assert(!std::is_invocable_v<RangeCBeginT, const Incomplete(&&)[10]>);
 
 // This case is IFNDR; we handle it SFINAE-friendly.
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeBeginT, Incomplete(&)[]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeBeginT, const Incomplete(&)[]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeCBeginT, Incomplete(&)[]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeCBeginT, const Incomplete(&)[]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeBeginT, Incomplete(&)[]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeBeginT, const Incomplete(&)[]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeCBeginT, Incomplete(&)[]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeCBeginT, const Incomplete(&)[]>);
 
 // This case is IFNDR; we handle it SFINAE-friendly.
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeBeginT, Incomplete(&)[10]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeBeginT, const Incomplete(&)[10]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeCBeginT, Incomplete(&)[10]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeCBeginT, const Incomplete(&)[10]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeBeginT, Incomplete(&)[10]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeBeginT, const Incomplete(&)[10]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeCBeginT, Incomplete(&)[10]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeCBeginT, const Incomplete(&)[10]>);
 
 struct BeginMember {
   int x;

diff  --git a/libcxx/test/std/ranges/range.access/begin.verify.cpp b/libcxx/test/std/ranges/range.access/begin.verify.cpp
index 3a170353f41f..6e04468c6e15 100644
--- a/libcxx/test/std/ranges/range.access/begin.verify.cpp
+++ b/libcxx/test/std/ranges/range.access/begin.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::begin
 

diff  --git a/libcxx/test/std/ranges/range.access/data.verify.cpp b/libcxx/test/std/ranges/range.access/data.verify.cpp
index a70ffca467dc..69ba0f6c61b1 100644
--- a/libcxx/test/std/ranges/range.access/data.verify.cpp
+++ b/libcxx/test/std/ranges/range.access/data.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::data
 

diff  --git a/libcxx/test/std/ranges/range.access/empty.pass.cpp b/libcxx/test/std/ranges/range.access/empty.pass.cpp
index 9083e58c33b8..e6df3cbe860f 100644
--- a/libcxx/test/std/ranges/range.access/empty.pass.cpp
+++ b/libcxx/test/std/ranges/range.access/empty.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::empty
 

diff  --git a/libcxx/test/std/ranges/range.access/empty.verify.cpp b/libcxx/test/std/ranges/range.access/empty.verify.cpp
index 21bbcaa93d12..72c763b86c0a 100644
--- a/libcxx/test/std/ranges/range.access/empty.verify.cpp
+++ b/libcxx/test/std/ranges/range.access/empty.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::empty
 

diff  --git a/libcxx/test/std/ranges/range.access/end.verify.cpp b/libcxx/test/std/ranges/range.access/end.verify.cpp
index 800f2d61634e..d89e4125e021 100644
--- a/libcxx/test/std/ranges/range.access/end.verify.cpp
+++ b/libcxx/test/std/ranges/range.access/end.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::end
 

diff  --git a/libcxx/test/std/ranges/range.access/rbegin.pass.cpp b/libcxx/test/std/ranges/range.access/rbegin.pass.cpp
index 4ff74986c389..736fd892862e 100644
--- a/libcxx/test/std/ranges/range.access/rbegin.pass.cpp
+++ b/libcxx/test/std/ranges/range.access/rbegin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::rbegin
 // std::ranges::crbegin
@@ -46,16 +46,16 @@ static_assert(!std::is_invocable_v<RangeCRBeginT, Incomplete(&&)[10]>);
 static_assert(!std::is_invocable_v<RangeCRBeginT, const Incomplete(&&)[10]>);
 
 // This case is IFNDR; we handle it SFINAE-friendly.
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeRBeginT, Incomplete(&)[]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeRBeginT, const Incomplete(&)[]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeCRBeginT, Incomplete(&)[]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeCRBeginT, const Incomplete(&)[]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeRBeginT, Incomplete(&)[]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeRBeginT, const Incomplete(&)[]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeCRBeginT, Incomplete(&)[]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeCRBeginT, const Incomplete(&)[]>);
 
 // This case is IFNDR; we handle it SFINAE-friendly.
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeRBeginT, Incomplete(&)[10]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeRBeginT, const Incomplete(&)[10]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeCRBeginT, Incomplete(&)[10]>);
-LIBCPP_STATIC_ASSERT(!std::is_invocable_v<RangeCRBeginT, const Incomplete(&)[10]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeRBeginT, Incomplete(&)[10]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeRBeginT, const Incomplete(&)[10]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeCRBeginT, Incomplete(&)[10]>);
+LIBCUDACXX_STATIC_ASSERT(!std::is_invocable_v<RangeCRBeginT, const Incomplete(&)[10]>);
 
 struct RBeginMember {
   int x;

diff  --git a/libcxx/test/std/ranges/range.access/rbegin.verify.cpp b/libcxx/test/std/ranges/range.access/rbegin.verify.cpp
index 42ed5cef1e85..28bbe284dd45 100644
--- a/libcxx/test/std/ranges/range.access/rbegin.verify.cpp
+++ b/libcxx/test/std/ranges/range.access/rbegin.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::rbegin
 

diff  --git a/libcxx/test/std/ranges/range.access/rend.pass.cpp b/libcxx/test/std/ranges/range.access/rend.pass.cpp
index 10c03ad40027..1495966a7ed1 100644
--- a/libcxx/test/std/ranges/range.access/rend.pass.cpp
+++ b/libcxx/test/std/ranges/range.access/rend.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::rend
 // std::ranges::crend

diff  --git a/libcxx/test/std/ranges/range.access/rend.verify.cpp b/libcxx/test/std/ranges/range.access/rend.verify.cpp
index 5c5a33529ef9..c4bea4c0e9a5 100644
--- a/libcxx/test/std/ranges/range.access/rend.verify.cpp
+++ b/libcxx/test/std/ranges/range.access/rend.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::rend
 

diff  --git a/libcxx/test/std/ranges/range.access/size.verify.cpp b/libcxx/test/std/ranges/range.access/size.verify.cpp
index c14f87180106..d7aedd5f09f4 100644
--- a/libcxx/test/std/ranges/range.access/size.verify.cpp
+++ b/libcxx/test/std/ranges/range.access/size.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::size
 

diff  --git a/libcxx/test/std/ranges/range.access/ssize.pass.cpp b/libcxx/test/std/ranges/range.access/ssize.pass.cpp
index 1d8b866e9022..15364984338e 100644
--- a/libcxx/test/std/ranges/range.access/ssize.pass.cpp
+++ b/libcxx/test/std/ranges/range.access/ssize.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::ssize
 

diff  --git a/libcxx/test/std/ranges/range.access/ssize.verify.cpp b/libcxx/test/std/ranges/range.access/ssize.verify.cpp
index b0a4ff6d8d92..40561ad157a3 100644
--- a/libcxx/test/std/ranges/range.access/ssize.verify.cpp
+++ b/libcxx/test/std/ranges/range.access/ssize.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::size
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.all/all.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/all.pass.cpp
index 4d4d1ebc0b22..64d017061c0b 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.all/all.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.all/all.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::all;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.all/all_t.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/all_t.compile.pass.cpp
index 5a5f4e881c96..f4c26c9287e5 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.all/all_t.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.all/all_t.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<viewable_range R>
 // using all_t = decltype(views::all(declval<R>()));

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/base.pass.cpp
index 705ecb50ba14..32957a0cd535 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr R& base() & noexcept { return r_; }
 // constexpr const R& base() const& noexcept { return r_; }

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp
index 95a15e600593..1dc0874112f3 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/begin_end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 
 // constexpr iterator_t<R> begin();

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/borrowing.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/borrowing.compile.pass.cpp
index 8171b8c2c3d3..43d5818b17c8 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/borrowing.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/borrowing.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 //   inline constexpr bool enable_borrowed_range<owning_view<T>> = enable_borrowed_range<T>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/constructor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/constructor.pass.cpp
index 70eac7f97977..b206bc91fa5b 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/constructor.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/constructor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // owning_view() requires default_initializable<R> = default;
 // constexpr owning_view(R&& t);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/data.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/data.pass.cpp
index 31f5846f219c..cb70f6bc8eea 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/data.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/data.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto data() requires contiguous_range<R>
 // constexpr auto data() const requires contiguous_range<const R>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/empty.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/empty.pass.cpp
index f609a85e1e01..4eecc1983f42 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/empty.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/empty.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr bool empty() requires requires { ranges::empty(r_); }
 // constexpr bool empty() const requires requires { ranges::empty(r_); }

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/size.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/size.pass.cpp
index 32342e598878..3a9dbe679cbb 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/size.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.all/range.owning.view/size.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto size() requires sized_range<R>
 // constexpr auto size() const requires sized_range<const R>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.all/range.ref.view/borrowing.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/range.ref.view/borrowing.compile.pass.cpp
index 3e7bad62500b..70ca22ac14ea 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.all/range.ref.view/borrowing.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.all/range.ref.view/borrowing.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 //   inline constexpr bool enable_borrowed_range<ref_view<T>> = true;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.all/range.ref.view/range.ref.view.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.all/range.ref.view/range.ref.view.pass.cpp
index 29120b01358b..a191d63fca05 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.all/range.ref.view/range.ref.view.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.all/range.ref.view/range.ref.view.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<range R>
 //  requires is_object_v<R>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.common.view/adaptor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.common.view/adaptor.pass.cpp
index 204d19e390f9..9564beb3d6a1 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.common.view/adaptor.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.common.view/adaptor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::common
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.common.view/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.common.view/base.pass.cpp
index 4e5ef609b3f4..3f20f127665d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.common.view/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.common.view/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr V base() const& requires copy_constructible<V>;
 // constexpr V base() &&;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.common.view/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.common.view/begin.pass.cpp
index 7c2dacff2091..07e4f67016a1 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.common.view/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.common.view/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto begin();
 // constexpr auto begin() const requires range<const V>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.common.view/borrowing.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.common.view/borrowing.compile.pass.cpp
index cd25b0130df4..420cf36e8e24 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.common.view/borrowing.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.common.view/borrowing.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 //   inline constexpr bool enable_borrowed_range<common_view<T>> = enable_borrowed_range<T>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.common.view/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.common.view/ctad.compile.pass.cpp
index 96ea8bfd242e..951af9249e59 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.common.view/ctad.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.common.view/ctad.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 //   common_view(R&&) -> common_view<views::all_t<R>>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.default.pass.cpp
index 5a365f57b5c8..8a52d6ad2f63 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // common_view() requires default_initializable<V> = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.view.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.view.pass.cpp
index be9213e6011f..95c5d78a2bb8 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.view.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.common.view/ctor.view.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr explicit common_view(V r);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.common.view/end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.common.view/end.pass.cpp
index 76810c264ab0..a9f6c57194e0 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.common.view/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.common.view/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto end();
 // constexpr auto end() const requires range<const V>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.common.view/size.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.common.view/size.pass.cpp
index 06f3d8d6120f..6cae15f99e5c 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.common.view/size.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.common.view/size.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto size() requires sized_range<V>
 // constexpr auto size() const requires sized_range<const V>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp
index a57bb4270127..55fddd70f046 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.counted/counted.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::counted;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.drop/adaptor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/adaptor.pass.cpp
index 4d97aed21dc4..c15e0375c14d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.drop/adaptor.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.drop/adaptor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::drop
 
@@ -182,7 +182,7 @@ constexpr bool test() {
   // `views::drop(subrange, n)` returns a `subrange` when `subrange::StoreSize == false`.
   {
     auto subrange = std::ranges::subrange(buf, buf + N);
-    LIBCPP_STATIC_ASSERT(!decltype(subrange)::_StoreSize);
+    LIBCUDACXX_STATIC_ASSERT(!decltype(subrange)::_StoreSize);
 
     using Result = std::ranges::subrange<int*>;
     std::same_as<Result> decltype(auto) result = subrange | std::views::drop(3);
@@ -196,7 +196,7 @@ constexpr bool test() {
 
     using Subrange = std::ranges::subrange<View::iterator, View::sentinel, std::ranges::subrange_kind::sized>;
     auto subrange = Subrange(view.begin(), view.end(), std::ranges::distance(view.begin(), view.end()));
-    LIBCPP_STATIC_ASSERT(decltype(subrange)::_StoreSize);
+    LIBCUDACXX_STATIC_ASSERT(decltype(subrange)::_StoreSize);
 
     std::same_as<Subrange> decltype(auto) result = subrange | std::views::drop(3);
     assert(result.size() == 5);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.drop/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/base.pass.cpp
index 9a2b9cb274c4..7a80ec6123b3 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.drop/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.drop/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr V base() const& requires copy_constructible<V> { return base_; }
 // constexpr V base() && { return std::move(base_); }

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.drop/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/begin.pass.cpp
index 3e93fd6862e5..3416d49b6a9d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.drop/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.drop/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto begin()
 //   requires (!(simple-view<V> &&
@@ -85,7 +85,7 @@ constexpr bool test() {
   {
     static_assert(std::ranges::random_access_range<const SimpleView>);
     static_assert(std::ranges::sized_range<const SimpleView>);
-    LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<SimpleView>);
+    LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<SimpleView>);
     int non_const_calls = 0;
     int const_calls = 0;
     std::ranges::drop_view dropView(SimpleView{{}, &non_const_calls, &const_calls}, 4);
@@ -100,7 +100,7 @@ constexpr bool test() {
   {
     static_assert(std::ranges::random_access_range<const NonSimpleView>);
     static_assert(std::ranges::sized_range<const NonSimpleView>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleView>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleView>);
     int non_const_calls = 0;
     int const_calls = 0;
     std::ranges::drop_view dropView(NonSimpleView{{}, &non_const_calls, &const_calls}, 4);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.drop/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/ctad.compile.pass.cpp
index 814646e26384..9611c8f4320a 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.drop/ctad.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.drop/ctad.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 //   drop_view(R&&, range_
diff erence_t<R>) -> drop_view<views::all_t<R>>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.drop/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/ctor.default.pass.cpp
index 60cf6c96524b..e7a94454741d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.drop/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.drop/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // drop_view() requires default_initializable<V> = default;
 
@@ -23,7 +23,7 @@ constexpr bool test() {
   static_assert( std::is_default_constructible_v<std::ranges::drop_view<ForwardView>>);
   static_assert(!std::is_default_constructible_v<std::ranges::drop_view<NoDefaultCtorForwardView>>);
 
-  LIBCPP_STATIC_ASSERT( std::is_nothrow_default_constructible_v<std::ranges::drop_view<ForwardView>>);
+  LIBCUDACXX_STATIC_ASSERT( std::is_nothrow_default_constructible_v<std::ranges::drop_view<ForwardView>>);
   static_assert(!std::is_nothrow_default_constructible_v<ThrowingDefaultCtorForwardView>);
   static_assert(!std::is_nothrow_default_constructible_v<std::ranges::drop_view<ThrowingDefaultCtorForwardView>>);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.drop/ctor.view.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/ctor.view.pass.cpp
index 6ccf91c20af6..92f7bf607fee 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.drop/ctor.view.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.drop/ctor.view.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr drop_view(V base, range_
diff erence_t<V> count);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp
index 6d563ce909c1..981129487aa7 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.drop/dangling.cache.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // If we have a copy-propagating cache, when we copy ZeroOnDestroy, we will get a
 // dangling reference to the copied-from object. This test ensures that we do not

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.drop/end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/end.pass.cpp
index 4334ee7ca5bb..7db2b8ca3943 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.drop/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.drop/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto end()
 //   requires (!simple-view<V>)

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.drop/general.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/general.pass.cpp
index 9fecd62f3e2a..0910eb0ecbb2 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.drop/general.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.drop/general.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Some basic examples of how drop_view might be used in the wild. This is a general
 // collection of sample algorithms and functions that try to mock general usage of

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.drop/size.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.drop/size.pass.cpp
index 10392f00e09e..113a9ef4f82c 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.drop/size.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.drop/size.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto size()
 //   requires sized_range<V>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.empty/borrowing.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.empty/borrowing.compile.pass.cpp
index a4f5deb5900f..d7f7ced4784f 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.empty/borrowing.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.empty/borrowing.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 //   inline constexpr bool enable_borrowed_range<empty_view<T>> = true;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.empty/empty_view.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.empty/empty_view.pass.cpp
index 2df7e84354ca..689e12272e57 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.empty/empty_view.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.empty/empty_view.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 // class empty_view;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.empty/views.empty.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.empty/views.empty.pass.cpp
index 7fc90a174e64..2a2a83dc4dc7 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.empty/views.empty.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.empty/views.empty.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class _Tp>
 // inline constexpr empty_view<_Tp> empty{};

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/adaptor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/adaptor.pass.cpp
index c2a1ffc827d4..941fe1983519 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/adaptor.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/adaptor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::filter
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/base.pass.cpp
index 61f4d2e5b363..0c101386d125 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr View base() const& requires copy_constructible<View>;
 // constexpr View base() &&;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/begin.pass.cpp
index 1e0ee63a3af0..763bd1d938a1 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator begin();
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/constraints.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/constraints.compile.pass.cpp
index c00be1b170ac..2b8bb6d6988f 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/constraints.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/constraints.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Check constraints on the type itself.
 //

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/ctad.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/ctad.pass.cpp
index a07c03eb8f0c..0bd4650e6cef 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/ctad.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/ctad.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class Range, class Pred>
 // filter_view(Range&&, Pred) -> filter_view<views::all_t<Range>, Pred>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/ctor.default.pass.cpp
index 692616675f38..de0776986e42 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // filter_view() requires std::default_initializable<View> &&
 //                        std::default_initializable<Pred> = default;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/ctor.view_pred.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/ctor.view_pred.pass.cpp
index 04318d5fa1a0..31329957c323 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/ctor.view_pred.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/ctor.view_pred.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr filter_view(View, Pred);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/end.pass.cpp
index 41f467b9523a..449815b3e84a 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto end();
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/arrow.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/arrow.pass.cpp
index a1c287132e50..fa6869a15e70 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/arrow.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/arrow.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator_t<V> operator->() const
 //    requires has-arrow<iterator_t<V>> && copyable<iterator_t<V>>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/base.pass.cpp
index 8727040def37..7115d8606abe 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator_t<V> const& base() const& noexcept;
 // constexpr iterator_t<V> base() &&;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/compare.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/compare.pass.cpp
index e3d85bd81be6..b68fc0693f80 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/compare.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/compare.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr bool operator==(iterator const&, iterator const&)
 //  requires equality_comparable<iterator_t<V>>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.default.pass.cpp
index 8b25f6cd8afd..241f3e1b5cfb 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::filter_view<V>::<iterator>() requires default_initializable<iterator_t<V>> = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.parent_iter.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.parent_iter.pass.cpp
index c883714cc1f8..553d232a9090 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.parent_iter.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/ctor.parent_iter.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr std::ranges::filter_view::<iterator>(filter_view&, iterator_t<V>);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/decrement.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/decrement.pass.cpp
index 25339d1c225d..dee7ff8fd8dd 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/decrement.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/decrement.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator& operator--() requires bidirectional_range<V>;
 // constexpr iterator operator--(int) requires bidirectional_range<V>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/deref.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/deref.pass.cpp
index 6e3192fdcb35..bf601b984d82 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/deref.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/deref.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr range_reference_t<V> operator*() const;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/increment.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/increment.pass.cpp
index 42d0abd37594..a5725e525a52 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/increment.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/increment.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator& operator++();
 // constexpr void operator++(int);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_move.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_move.pass.cpp
index 8ed05defe55b..b0d8658a5cc1 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_move.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_move.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr range_rvalue_reference_t<V> iter_move(iterator const& i)
 //  noexcept(noexcept(ranges::iter_move(i.current_)));

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_swap.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_swap.pass.cpp
index 10e6b9554b20..4e4015f582cb 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_swap.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/iter_swap.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr void iter_swap(iterator const& x, iterator const& y)
 //  noexcept(noexcept(ranges::iter_swap(x.current_, y.current_)))

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/types.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/types.compile.pass.cpp
index 831cedb0005f..61831735eeda 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/types.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/iterator/types.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::filter_view::<iterator>::
diff erence_type
 // std::filter_view::<iterator>::value_type

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/pred.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/pred.pass.cpp
index ce86df127423..f785be1f4f3f 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/pred.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/pred.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Older Clangs don't properly deduce decltype(auto) with a concept constraint
 // XFAIL: apple-clang-13.0

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/base.pass.cpp
index c9ce33b1408c..6ca0f5130044 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr sentinel_t<V> base() const;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/compare.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/compare.pass.cpp
index 85ebea00c697..98da91e8d473 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/compare.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/compare.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr bool operator==(iterator const&, sentinel const&);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.default.pass.cpp
index bc4a191a4690..e3a03b957865 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // filter_view<V>::<sentinel>() = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.parent.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.parent.pass.cpp
index 5cf9508cd435..685ae1565b47 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.parent.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.filter/sentinel/ctor.parent.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr explicit sentinel(filter_view&);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/adaptor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/adaptor.pass.cpp
index c28cc8413e01..4cd38606bf00 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/adaptor.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/adaptor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::join
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/base.pass.cpp
index 6b9b48da42c9..c05332e1fe0c 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr V base() const& requires copy_constructible<V>;
 // constexpr V base() &&;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/begin.pass.cpp
index 8482b780f16c..238a1722058e 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto begin();
 // constexpr auto begin() const

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.compile.pass.cpp
index 7a7d31dd7203..ccb8ed6b946e 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 //   explicit join_view(R&&) -> join_view<views::all_t<R>>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.verify.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.verify.cpp
index 1bd90d355bf3..5519ac210f08 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.verify.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/ctad.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 //   explicit join_view(R&&) -> join_view<views::all_t<R>>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/ctor.default.pass.cpp
index a89ade02628a..ef0d23cf00dc 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // join_view() requires default_initializable<V> = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/ctor.view.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/ctor.view.pass.cpp
index c9604eea7d90..b39ff4b8c827 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/ctor.view.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/ctor.view.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr explicit join_view(V base);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/end.pass.cpp
index d36514a81df8..11376081cc65 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto end();
 // constexpr auto end() const;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/general.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/general.pass.cpp
index 030cc6263228..3e03fe6a287d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/general.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/general.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // General tests for join_view. This file does not test anything specifically.
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/arrow.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/arrow.pass.cpp
index d37bd91a7489..de950d3864c6 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/arrow.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/arrow.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr InnerIter operator->() const
 //   requires has-arrow<InnerIter> && copyable<InnerIter>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.default.pass.cpp
index 4934b42d272e..bb2de54aa57e 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // iterator() requires default_initializable<OuterIter> = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.other.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.other.pass.cpp
index 28632086d01c..76a443af59a3 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.other.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.other.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator(iterator<!Const> i)
 //             requires Const &&

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.parent.outer.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.parent.outer.pass.cpp
index ced15797cf1a..a5185266de71 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.parent.outer.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/ctor.parent.outer.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator(Parent& parent, OuterIter outer);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/decrement.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/decrement.pass.cpp
index ed171327b693..7f4466f1f012 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/decrement.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/decrement.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator& operator--();
 //              requires ref-is-glvalue && bidirectional_­range<Base> &&

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/eq.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/eq.pass.cpp
index 204a0568e128..1120db1c80e1 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/eq.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/eq.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr bool operator==(const iterator& x, const iterator& y);
 //          requires ref-is-glvalue && equality_comparable<iterator_t<Base>> &&

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/increment.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/increment.pass.cpp
index 8478db511d8d..73accff419da 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/increment.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/increment.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator& operator++();
 // constexpr void operator++(int);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/iter.move.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/iter.move.pass.cpp
index 01a3105ab645..df5de535cea2 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/iter.move.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/iter.move.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr decltype(auto) iter_move(const iterator& i);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/iter.swap.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/iter.swap.pass.cpp
index d286bd829b93..88e3bbb77fc9 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/iter.swap.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/iter.swap.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr void iter_swap(const iterator& x, const iterator& y);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/member_types.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/member_types.compile.pass.cpp
index 102999d56790..db53872662f3 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/member_types.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/member_types.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Iterator traits and member typedefs in join_view::<iterator>.
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/star.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/star.pass.cpp
index 40cdad36bc04..29a2cfb2f496 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/star.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/iterator/star.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr decltype(auto) operator*() const;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.default.pass.cpp
index b576ff4580ab..5f1cfb0340e0 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // sentinel() = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp
index ffb2e7a6f7b5..5e62f0865a22 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.other.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr sentinel(sentinel<!Const> s);
 //             requires Const && convertible_­to<sentinel_t<V>, sentinel_t<Base>>;
@@ -46,7 +46,7 @@ struct ConstConveritbleView : BufferView<BufferView<int*>*> {
 static_assert(!std::ranges::common_range<ConstConveritbleView>);
 static_assert(std::convertible_to<std::ranges::sentinel_t<ConstConveritbleView>,
                                   std::ranges::sentinel_t<ConstConveritbleView const>>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<ConstConveritbleView>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<ConstConveritbleView>);
 
 constexpr bool test() {
   int buffer[4][4] = {{1, 2, 3, 4}, {5, 6, 7, 8}, {9, 10, 11, 12}, {13, 14, 15, 16}};

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.parent.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.parent.pass.cpp
index efa43315f0df..edf8338b0f97 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.parent.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/ctor.parent.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr explicit sentinel(Parent& parent);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/eq.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/eq.pass.cpp
index c85f52e92adc..6498e0af9728 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/eq.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/sentinel/eq.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<bool OtherConst>
 //   requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h b/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h
index 6cc7d8cc2dc2..32f5c0f24cbe 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h
+++ b/libcxx/test/std/ranges/range.adaptors/range.join.view/types.h
@@ -249,7 +249,7 @@ using SimpleInputCommonOuter = BufferView<common_input_iterator<Inner*>>;
 static_assert(!std::ranges::forward_range<SimpleInputCommonOuter<>>);
 static_assert(!std::ranges::bidirectional_range<SimpleInputCommonOuter<>>);
 static_assert(std::ranges::common_range<SimpleInputCommonOuter<>>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<SimpleInputCommonOuter<>>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<SimpleInputCommonOuter<>>);
 
 template <class Inner = BufferView<int*>>
 using NonSimpleInputCommonOuter = BufferView<common_input_iterator<const Inner*>, common_input_iterator<const Inner*>,
@@ -257,14 +257,14 @@ using NonSimpleInputCommonOuter = BufferView<common_input_iterator<const Inner*>
 static_assert(!std::ranges::forward_range<NonSimpleInputCommonOuter<>>);
 static_assert(!std::ranges::bidirectional_range<NonSimpleInputCommonOuter<>>);
 static_assert(std::ranges::common_range<NonSimpleInputCommonOuter<>>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleInputCommonOuter<>>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleInputCommonOuter<>>);
 
 template <class Inner = BufferView<int*>>
 using SimpleForwardCommonOuter = BufferView<forward_iterator<Inner*>>;
 static_assert(std::ranges::forward_range<SimpleForwardCommonOuter<>>);
 static_assert(!std::ranges::bidirectional_range<SimpleForwardCommonOuter<>>);
 static_assert(std::ranges::common_range<SimpleForwardCommonOuter<>>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<SimpleForwardCommonOuter<>>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<SimpleForwardCommonOuter<>>);
 
 template <class Inner = BufferView<int*>>
 using NonSimpleForwardCommonOuter = BufferView<forward_iterator<const Inner*>, forward_iterator<const Inner*>,
@@ -272,14 +272,14 @@ using NonSimpleForwardCommonOuter = BufferView<forward_iterator<const Inner*>, f
 static_assert(std::ranges::forward_range<NonSimpleForwardCommonOuter<>>);
 static_assert(!std::ranges::bidirectional_range<NonSimpleForwardCommonOuter<>>);
 static_assert(std::ranges::common_range<NonSimpleForwardCommonOuter<>>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleForwardCommonOuter<>>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleForwardCommonOuter<>>);
 
 template <class Inner = BufferView<int*>>
 using SimpleForwardNonCommonOuter = BufferView<forward_iterator<Inner*>, sentinel_wrapper<forward_iterator<Inner*>>>;
 static_assert(std::ranges::forward_range<SimpleForwardNonCommonOuter<>>);
 static_assert(!std::ranges::bidirectional_range<SimpleForwardNonCommonOuter<>>);
 static_assert(!std::ranges::common_range<SimpleForwardNonCommonOuter<>>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<SimpleForwardNonCommonOuter<>>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<SimpleForwardNonCommonOuter<>>);
 
 template <class Inner = BufferView<int*>>
 using NonSimpleForwardNonCommonOuter =
@@ -288,13 +288,13 @@ using NonSimpleForwardNonCommonOuter =
 static_assert(std::ranges::forward_range<NonSimpleForwardNonCommonOuter<>>);
 static_assert(!std::ranges::bidirectional_range<NonSimpleForwardNonCommonOuter<>>);
 static_assert(!std::ranges::common_range<NonSimpleForwardNonCommonOuter<>>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleForwardNonCommonOuter<>>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleForwardNonCommonOuter<>>);
 
 template <class Inner = BufferView<int*>>
 using BidiCommonOuter = BufferView<bidirectional_iterator<Inner*>>;
 static_assert(std::ranges::bidirectional_range<BidiCommonOuter<>>);
 static_assert(std::ranges::common_range<BidiCommonOuter<>>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<BidiCommonOuter<>>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<BidiCommonOuter<>>);
 
 // an iterator where its operator* makes a copy of underlying operator*
 template <class It>
@@ -359,7 +359,7 @@ struct InnerRValue : Outer {
 static_assert(std::ranges::forward_range<InnerRValue<SimpleForwardCommonOuter<>>>);
 static_assert(!std::ranges::bidirectional_range<InnerRValue<SimpleForwardCommonOuter<>>>);
 static_assert(std::ranges::common_range<InnerRValue<SimpleForwardCommonOuter<>>>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<InnerRValue<SimpleForwardCommonOuter<>>>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<InnerRValue<SimpleForwardCommonOuter<>>>);
 static_assert(!std::is_lvalue_reference_v<std::ranges::range_reference_t<InnerRValue<SimpleForwardCommonOuter<>>>>);
 
 struct move_swap_aware_iter {

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/adaptor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/adaptor.pass.cpp
index e08e331d04b5..263279bbf594 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/adaptor.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/adaptor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::lazy_split
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/base.pass.cpp
index b8386ebdab46..3c0dfe4cd8f1 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr View base() const& requires copy_constructible<_View>;
 // constexpr View base() &&;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/begin.pass.cpp
index d438ca880a21..dc02910fdbfc 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto begin();
 // constexpr auto begin() const requires forward_range<View> && forward_range<const View>;
@@ -33,8 +33,8 @@ constexpr bool test() {
 
     static_assert(std::ranges::forward_range<V>);
     static_assert(std::ranges::forward_range<const V>);
-    LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<V>);
-    LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<P>);
+    LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<V>);
+    LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<P>);
 
     {
       std::ranges::lazy_split_view<V, P> v;
@@ -59,8 +59,8 @@ constexpr bool test() {
 
     static_assert(std::ranges::forward_range<V>);
     static_assert(std::ranges::forward_range<const V>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<V>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<P>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<V>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<P>);
 
     {
       std::ranges::lazy_split_view<V, P> v;
@@ -84,8 +84,8 @@ constexpr bool test() {
     using P = V;
     static_assert(std::ranges::forward_range<V>);
     static_assert(!std::ranges::forward_range<const V>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<V>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<P>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<V>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<P>);
 
     std::ranges::lazy_split_view<V, P> v;
     auto it = v.begin();
@@ -103,8 +103,8 @@ constexpr bool test() {
 
     static_assert(std::ranges::forward_range<V>);
     static_assert(std::ranges::forward_range<const V>);
-    LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<V>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<P>);
+    LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<V>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<P>);
 
     {
       std::ranges::lazy_split_view<V, P> v;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp
index bc98d3fb584d..69fe92626491 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/constraints.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<input_range V, forward_range Pattern>
 //   requires view<V> && view<Pattern> &&
@@ -155,7 +155,7 @@ namespace test7 {
   static_assert( std::ranges::input_range<View>);
   static_assert(!std::ranges::forward_range<View>);
   static_assert( std::ranges::forward_range<Pattern>);
-  LIBCPP_STATIC_ASSERT(!std::ranges::__tiny_range<Pattern>);
+  LIBCUDACXX_STATIC_ASSERT(!std::ranges::__tiny_range<Pattern>);
   static_assert( std::ranges::view<View>);
   static_assert( std::ranges::view<Pattern>);
   static_assert( std::indirectly_comparable<
@@ -178,7 +178,7 @@ namespace test8 {
   static_assert( std::ranges::input_range<View>);
   static_assert(!std::ranges::forward_range<View>);
   static_assert( std::ranges::forward_range<Pattern>);
-  LIBCPP_STATIC_ASSERT(!std::ranges::__tiny_range<Pattern>);
+  LIBCUDACXX_STATIC_ASSERT(!std::ranges::__tiny_range<Pattern>);
   static_assert( std::ranges::view<View>);
   static_assert( std::ranges::view<Pattern>);
   static_assert( std::indirectly_comparable<
@@ -201,7 +201,7 @@ namespace test9 {
   static_assert( std::ranges::input_range<View>);
   static_assert(!std::ranges::forward_range<View>);
   static_assert( std::ranges::forward_range<Pattern>);
-  LIBCPP_STATIC_ASSERT(!std::ranges::__tiny_range<Pattern>);
+  LIBCUDACXX_STATIC_ASSERT(!std::ranges::__tiny_range<Pattern>);
   static_assert( std::ranges::view<View>);
   static_assert( std::ranges::view<Pattern>);
   static_assert( std::indirectly_comparable<

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctad.compile.pass.cpp
index 1ae63d803487..d6061d8eaf9c 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctad.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctad.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class R, class P>
 // lazy_split_view(R&&, P&&) -> lazy_split_view<views::all_t<R>, views::all_t<P>>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.copy_move.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.copy_move.pass.cpp
index 8cf19ef458ae..a59a80b1f355 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.copy_move.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.copy_move.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test the implicitly-generated copy and move constructors since `lazy_split_view` has non-trivial members.
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.default.pass.cpp
index 8401f2ed31e9..05522ec0fb61 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 //  lazy_split_view() requires default_initializable<V> && default_initializable<P> = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.range.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.range.pass.cpp
index fa083bf44576..7e693784bd54 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.range.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.range.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <input_range Range>
 //   requires constructible_from<View, views::all_t<Range>> &&

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.view.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.view.pass.cpp
index 88e9190d441d..8375fd413f8a 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.view.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/ctor.view.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr lazy_split_view(View base, Pattern pattern);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/end.pass.cpp
index fb847e367bb1..8977539eb465 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto end() requires forward_range<View> && common_range<View>;
 // constexpr auto end() const;
@@ -60,8 +60,8 @@ constexpr bool test() {
 
     static_assert(std::ranges::forward_range<V>);
     static_assert(std::ranges::common_range<const V>);
-    LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<V>);
-    LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<P>);
+    LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<V>);
+    LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<P>);
 
     {
       std::ranges::lazy_split_view<V, P> v;
@@ -86,8 +86,8 @@ constexpr bool test() {
 
     static_assert(std::ranges::forward_range<V>);
     static_assert(std::ranges::common_range<V>);
-    LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<V>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<P>);
+    LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<V>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<P>);
     static_assert(std::ranges::forward_range<const V>);
     static_assert(std::ranges::common_range<const V>);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp
index 440fca85638a..ee3bdd8dce02 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/general.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class View, class Pattern>
 // class std::ranges::lazy_split_view;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/base.pass.cpp
index 161c754afe78..dea456e71b31 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr const iterator_t<Base>& inner-iterator::base() const& noexcept;
 //

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.default.pass.cpp
index 095ab691d99b..6065644652d4 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr inner-iterator::inner-iterator() = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.outer_iterator.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.outer_iterator.pass.cpp
index 477eaca14d54..94ee97b77800 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.outer_iterator.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/ctor.outer_iterator.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr explicit inner-iterator::inner-iterator(outer-iterator<Const> i);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/deref.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/deref.pass.cpp
index 9af1880258e8..bdce03641457 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/deref.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/deref.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr decltype(auto) inner-iterator::operator*() const;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/equal.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/equal.pass.cpp
index c5d0b6fd5bc2..52df1e9e9b82 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/equal.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/equal.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr bool operator==(const inner-iterator& x, const inner-iterator& y);
 //   requires forward_range<Base>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/increment.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/increment.pass.cpp
index c2644816cb4e..39bfa686301d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/increment.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/increment.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr inner-iterator& inner-iterator::operator++();
 //
@@ -27,7 +27,7 @@ struct EmptyView : std::ranges::view_base {
 };
 static_assert(std::ranges::forward_range<EmptyView>);
 static_assert(std::ranges::view<EmptyView>);
-LIBCPP_STATIC_ASSERT(std::ranges::__tiny_range<EmptyView>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__tiny_range<EmptyView>);
 
 constexpr bool test() {
   // Can call `inner-iterator::operator++`; `View` is a forward range.

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_move.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_move.pass.cpp
index 39f81a4a5e39..10c33ce5251e 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_move.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_move.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr decltype(auto) iter_move(const inner-iterator& i)
 //   noexcept(noexcept(ranges::iter_move(i.i_.<current>)));

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_swap.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_swap.pass.cpp
index 4bcbcafaeab9..1e8ba8346836 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_swap.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/iter_swap.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr void iter_swap(const inner-iterator& x, const inner-iterator& y)
 //   noexcept(noexcept(ranges::iter_swap(x.i_.<current>, y.i_.<current>)))

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/types.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/types.compile.pass.cpp
index c47cbcc6d76a..bd520f84ff34 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/types.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.inner/types.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 //  using iterator_category = If<
 //    derived_from<typename iterator_traits<iterator_t<Base>>::iterator_category, forward_iterator_tag>,

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/begin.pass.cpp
index 54606f35c34d..e1d080ce6995 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::lazy_split_view::outer-iterator::value_type::begin()
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.default.pass.cpp
index cd91e0357128..e96922c892cf 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::lazy_split_view::outer-iterator::value_type::value_type()
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.iter.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.iter.pass.cpp
index aa567889eb60..674d3ad7f664 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.iter.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/ctor.iter.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // explicit outer-iterator::value_type::value_type(outer-iterator i)
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/end.pass.cpp
index 3860aa8ee08f..74df861d9f34 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::lazy_split_view::outer-iterator::value_type::end()
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/view_interface.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/view_interface.pass.cpp
index ed0dd3470203..86e495618195 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/view_interface.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer.value/view_interface.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::lazy_split_view::outer-iterator::value_type;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.copy.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.copy.pass.cpp
index f54000ff6287..438871f5d283 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.copy.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr outer-iterator(outer-iterator<!Const> i)
 //   requires Const && convertible_to<iterator_t<View>, iterator_t<Base>>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.default.pass.cpp
index 06054aa07515..2c763ab5c2bb 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::lazy_split_view::outer-iterator::outer-iterator()
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.pass.cpp
index 83c1964fa5a0..efef14a43726 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // explicit std::ranges::lazy_split_view::outer-iterator::outer-iterator(Parent& parent)
 //   requires (!forward_range<Base>)

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent_base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent_base.pass.cpp
index ed9ffa4b8a59..9a22b9193f4b 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent_base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/ctor.parent_base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr outer-iterator(Parent& parent, iterator_t<Base> current);
 //   requires forward_range<Base>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/deref.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/deref.pass.cpp
index 375607c81cfa..fdb99cb6674d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/deref.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/deref.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr outer-iterator::value-type outer-iterator::operator*() const;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/equal.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/equal.pass.cpp
index 59bc90498c5a..fef2e68cb1bb 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/equal.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/equal.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr bool operator==(const outer-iterator& x, const outer-iterator& y)
 //   requires forward_range<Base>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/increment.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/increment.pass.cpp
index e2c023eea88f..3a0c76ba729b 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/increment.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/increment.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr outer-iterator& outer-iterator::operator++();
 // constexpr decltype(auto) outer-iterator::operator++(int);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/types.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/types.compile.pass.cpp
index 87e5c037c581..2b73e77ba540 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/types.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/range.lazy.split.outer/types.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // using iterator_category = input_iterator_tag; // Only defined if `View` is a forward range.
 // using iterator_concept = conditional_t<forward_range<Base>, forward_iterator_tag, input_iterator_tag>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h
index a606e915f04d..a4e549d7b443 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/types.h
@@ -178,7 +178,7 @@ struct ForwardTinyView : std::ranges::view_base {
 };
 static_assert(std::ranges::forward_range<ForwardTinyView>);
 static_assert(std::ranges::view<ForwardTinyView>);
-LIBCPP_STATIC_ASSERT(std::ranges::__tiny_range<ForwardTinyView>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__tiny_range<ForwardTinyView>);
 
 // Aliases
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/view_interface.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/view_interface.pass.cpp
index 16669bdfee99..6c7d0676de5c 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.lazy.split/view_interface.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.lazy.split/view_interface.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::lazy_split_view;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/adaptor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/adaptor.pass.cpp
index d1a34af36b8e..fadc91d01d0b 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.reverse/adaptor.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/adaptor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::reverse
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/base.pass.cpp
index 1f513a2492bf..bd6c3adf93c5 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.reverse/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr V base() const& requires copy_constructible<V> { return base_; }
 // constexpr V base() && { return std::move(base_); }

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp
index 3baf396dd82c..f0f3e55c8fa9 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr reverse_iterator<iterator_t<V>> begin();
 // constexpr reverse_iterator<iterator_t<V>> begin() requires common_range<V>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/borrowing.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/borrowing.compile.pass.cpp
index c49108111d1c..a40615ab3330 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.reverse/borrowing.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/borrowing.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 //   inline constexpr bool enable_borrowed_range<reverse_view<T>> = enable_borrowed_range<T>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/ctad.compile.pass.cpp
index 5cf1b0f431e5..2603e2545977 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.reverse/ctad.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/ctad.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 //   reverse_view(R&&) -> reverse_view<views::all_t<R>>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/ctor.default.pass.cpp
index bc63476c8dc3..7b21b49e38cf 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.reverse/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // reverse_view() requires default_initializable<V> = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/ctor.view.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/ctor.view.pass.cpp
index b20b63d6cc9c..2b9aefba786b 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.reverse/ctor.view.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/ctor.view.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr explicit reverse_view(V r);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/end.pass.cpp
index 3bd1bab42aa8..1777852edc81 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.reverse/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr reverse_iterator<iterator_t<V>> end();
 // constexpr auto end() const requires common_range<const V>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/range_concept_conformance.compile.pass.cpp
index 304d7e0a234c..dd000088fc8f 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.reverse/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test that reverse_view conforms to range and view concepts.
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.reverse/size.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.reverse/size.pass.cpp
index 5869a5af8650..47eb2da16970 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.reverse/size.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.reverse/size.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto size() requires sized_range<V>;
 // constexpr auto size() const requires sized_range<const V>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/adaptor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/adaptor.pass.cpp
index 89231ec56607..225fd2252963 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/adaptor.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/adaptor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::take
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/base.pass.cpp
index ecbf3edf0c31..5d47abd28a95 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr V base() const& requires copy_constructible<V>;
 // constexpr V base() &&;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/begin.pass.cpp
index 6e858449796a..0fec8a39995a 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto begin() requires (!simple-view<V>);
 // constexpr auto begin() const requires range<const V>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/borrowing.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/borrowing.compile.pass.cpp
index 59438cb8e2a1..453ee6e6ddeb 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/borrowing.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/borrowing.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 //   inline constexpr bool enable_borrowed_range<take_view<T>> = enable_borrowed_range<T>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/ctad.compile.pass.cpp
index 8389fc6ee5ee..7d6daa4da7e3 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/ctad.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/ctad.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 //   take_view(R&&, range_
diff erence_t<R>) -> take_view<views::all_t<R>>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/ctor.default.pass.cpp
index 92370cd538d4..617f2376f3cb 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // take_view() requires default_initializable<V> = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/ctor.view_count.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/ctor.view_count.pass.cpp
index 1887ecf5ba06..d15ee3a4c0b4 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/ctor.view_count.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/ctor.view_count.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr take_view(V base, range_
diff erence_t<V> count);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/end.pass.cpp
index 4401bb823e17..e90a11c9bb26 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto end() requires (!simple-view<V>)
 // constexpr auto end() const requires range<const V>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/range_concept_conformance.compile.pass.cpp
index b4d641db74f3..83ff85b59e83 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Range concept conformance tests for take_view.
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/base.pass.cpp
index d52176a946c2..ba24205c5c8b 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // sentinel() = default;
 // constexpr explicit sentinel(sentinel_t<Base> end);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/ctor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/ctor.pass.cpp
index b5ccafdfb62e..ea501888b462 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/ctor.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/ctor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // sentinel() = default;
 // constexpr explicit sentinel(sentinel_t<Base> end);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/eq.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/eq.pass.cpp
index ecb0a3457a71..babb62f55586 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/eq.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/sentinel/eq.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // sentinel() = default;
 // constexpr explicit sentinel(sentinel_t<Base> end);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.take/size.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.take/size.pass.cpp
index 45dbe136de54..6efb7fe9b947 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.take/size.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.take/size.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto size() requires sized_range<V>
 // constexpr auto size() const requires sized_range<const V>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/adaptor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/adaptor.pass.cpp
index 337a6368edda..a68c1eda7947 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/adaptor.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/adaptor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::transform
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/base.pass.cpp
index 24660bd87e36..ac7256559a63 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr V base() const& requires copy_constructible<V>
 // constexpr V base() &&

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/begin.pass.cpp
index f6321d1cf8f4..de866bb2f5b1 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator<false> begin();
 // constexpr iterator<true> begin() const

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/ctad.compile.pass.cpp
index c6194b2ce243..9d3e5f3f05d0 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/ctad.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/ctad.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R, class F>
 //   transform_view(R&&, F) -> transform_view<views::all_t<R>, F>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/ctor.default.pass.cpp
index 23d4b284d095..596455da4393 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // transform_view() requires std::default_initializable<V> &&
 //                           std::default_initializable<F> = default;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/ctor.view_function.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/ctor.view_function.pass.cpp
index 71604132e72b..dbd897071933 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/ctor.view_function.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/ctor.view_function.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr transform_view(View, F);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/end.pass.cpp
index 527be0e8c035..946960e694ed 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr sentinel<false> end();
 // constexpr iterator<false> end() requires common_range<V>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/general.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/general.pass.cpp
index 0bd792fdc382..b3eba8184684 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/general.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/general.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Some basic examples of how transform_view might be used in the wild. This is a general
 // collection of sample algorithms and functions that try to mock general usage of

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/arithmetic.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/arithmetic.pass.cpp
index 610fedde1b2b..bb93a3aec6ad 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/arithmetic.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/arithmetic.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // transform_view::<iterator>::operator{++,--,+=,-=}
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/base.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/base.pass.cpp
index a06cd587c92a..3a8f9ed97605 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/base.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/base.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // transform_view::<iterator>::base
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/compare.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/compare.pass.cpp
index 9db2c4bbdcca..21a537e7ff11 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/compare.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/compare.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // transform_view::<iterator>::operator{<,>,<=,>=,==,!=,<=>}
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/ctor.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/ctor.pass.cpp
index 035724104f13..940a5df1129e 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/ctor.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/ctor.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // transform_view::<iterator>::transform_view::<iterator>();
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/deref.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/deref.pass.cpp
index 3f449d680ae2..66b1cfd7a75d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/deref.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/deref.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // transform_view::<iterator>::operator*
 
@@ -38,7 +38,7 @@ int main(int, char**) {
     using View = std::ranges::transform_view<MoveOnlyView, PlusOneNoexcept>;
     View transformView(MoveOnlyView{buff}, PlusOneNoexcept{});
     assert(*transformView.begin() == 1);
-    LIBCPP_ASSERT_NOEXCEPT(*std::declval<std::ranges::iterator_t<View>>());
+    LIBCUDACXX_ASSERT_NOEXCEPT(*std::declval<std::ranges::iterator_t<View>>());
     ASSERT_SAME_TYPE(int, decltype(*std::declval<View>().begin()));
   }
   {

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/iter_move.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/iter_move.pass.cpp
index 8ba179ca16c7..fb594d16be5d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/iter_move.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/iter_move.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr decltype(auto) iter_move(const iterator& i)
 //    noexcept(noexcept(invoke(i.parent_->fun_, *i.current_)))
@@ -33,7 +33,7 @@ constexpr bool test() {
   }
 
   {
-    LIBCPP_ASSERT_NOEXCEPT(std::ranges::iter_move(
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::ranges::iter_move(
       std::declval<std::ranges::iterator_t<std::ranges::transform_view<MoveOnlyView, PlusOneNoexcept>>&>()));
     ASSERT_NOT_NOEXCEPT(std::ranges::iter_move(
       std::declval<std::ranges::iterator_t<std::ranges::transform_view<MoveOnlyView, PlusOneMutable>>&>()));

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/plus_minus.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/plus_minus.pass.cpp
index 6a4739ebfad3..c472532ff655 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/plus_minus.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/plus_minus.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // transform_view::<iterator>::operator{+,-}
 
@@ -25,7 +25,7 @@ constexpr bool test() {
   assert((iter1 + 1).base() == globalBuff + 5);
   assert((1 + iter1).base() == globalBuff + 5);
   assert((iter1 - 1).base() == globalBuff + 3);
-  LIBCPP_ASSERT(iter1 - iter2 == 4);
+  LIBCUDACXX_ASSERT(iter1 - iter2 == 4);
   assert((iter1 + 2) - 2 == iter1);
   assert((iter1 - 2) + 2 == iter1);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/requirements.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/requirements.compile.pass.cpp
index 27ebc2ccd1a0..47093ce6b616 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/requirements.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/requirements.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // The requirements for transform_view::<iterator>'s members.
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/sentinel.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/sentinel.pass.cpp
index 469ef1d03caa..9719ef18c247 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/sentinel.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/sentinel.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class transform_view::<sentinel>;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/subscript.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/subscript.pass.cpp
index bfc38ed42da7..70c304ae22b4 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/subscript.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/subscript.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // transform_view::<iterator>::operator[]
 
@@ -25,7 +25,7 @@ constexpr bool test() {
 
   ASSERT_NOT_NOEXCEPT(
     std::declval<std::ranges::iterator_t<std::ranges::transform_view<MoveOnlyView, PlusOneMutable>>>()[0]);
-  LIBCPP_ASSERT_NOEXCEPT(
+  LIBCUDACXX_ASSERT_NOEXCEPT(
     std::declval<std::ranges::iterator_t<std::ranges::transform_view<MoveOnlyView, PlusOneNoexcept>>>()[0]);
 
   ASSERT_SAME_TYPE(

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/types.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/types.pass.cpp
index 0a42b8db59d5..fd99c5f302f6 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/types.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/iterator/types.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // transform_view::<iterator>::
diff erence_type
 // transform_view::<iterator>::value_type

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.transform/size.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.transform/size.pass.cpp
index 1d5433d8c9c9..219e7a215cbc 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.transform/size.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.transform/size.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto size() requires sized_range<V>
 // constexpr auto size() const requires sized_range<const V>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/begin.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/begin.pass.cpp
index eb0d80df1dc7..3b7e9971534f 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto begin() requires (!(simple-view<Views> && ...));
 // constexpr auto begin() const requires (range<const Views> && ...);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/borrowing.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/borrowing.compile.pass.cpp
index b5ec1b18ae76..083783280e67 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/borrowing.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/borrowing.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class... Views>
 // inline constexpr bool enable_borrowed_range<zip_view<Views...>> =

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/cpo.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/cpo.pass.cpp
index 98fdfd4d3e5c..87a392e4e5be 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/cpo.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/cpo.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::zip
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/ctad.compile.pass.cpp
index 42278cdb5672..3ba404db3ce9 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/ctad.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/ctad.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <class... Rs>
 // zip_view(Rs&&...) -> zip_view<views::all_t<Rs>...>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/ctor.default.pass.cpp
index 41870f905c4b..9600ee29d398 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // zip_view() = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/ctor.views.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/ctor.views.pass.cpp
index 8be10cec1271..4daba8f151b1 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/ctor.views.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/ctor.views.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr explicit zip_view(Views...)
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/end.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/end.pass.cpp
index 317a5e1bad20..621c4892c5ea 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto end() requires(!(simple-view<Views> && ...))
 // constexpr auto end() const requires(range<const Views>&&...)

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/general.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/general.pass.cpp
index 5552b87b0183..35ffbd1be11a 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/general.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/general.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Some basic examples of how zip_view might be used in the wild. This is a general
 // collection of sample algorithms and functions that try to mock general usage of

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/arithmetic.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/arithmetic.pass.cpp
index 30939fb7e7e2..28e0d0fa33f2 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/arithmetic.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/arithmetic.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // x += n;
 // x + n;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp
index c31d3063caa8..414a004422a3 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/compare.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr bool operator==(const iterator& x, const iterator& y)
 //   requires (equality_­comparable<iterator_t<maybe-const<Const, Views>>> && ...);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.default.pass.cpp
index 0fe4c9c3bfb3..d07d6b8769a1 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // iterator() = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.other.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.other.pass.cpp
index d53578688bd4..2e88a2074dda 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.other.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/ctor.other.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator(iterator<!Const> i)
 //       requires Const && (convertible_­to<iterator_t<Views>,

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/decrement.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/decrement.pass.cpp
index b86e63b5d0a6..09a533b10139 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/decrement.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/decrement.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator& operator--() requires all-bidirectional<Const, Views...>;
 // constexpr iterator operator--(int) requires all-bidirectional<Const, Views...>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/deref.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/deref.pass.cpp
index cbaa43ca6374..2bd002962073 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/deref.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/deref.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto operator*() const;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/increment.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/increment.pass.cpp
index d96050821d7b..4b0aebdfcc9d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/increment.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/increment.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator& operator++();
 // constexpr void operator++(int);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp
index 6dacd1b07043..974363de9175 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_move.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr auto iter_move(const iterator& i) noexcept(see below);
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp
index 4e7ec3793d07..9692aae578fd 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/iter_swap.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr void iter_swap(const iterator& l, const iterator& r) noexcept(see below)
 //   requires (indirectly_­swappable<iterator_t<maybe-const<Const, Views>>> && ...);

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/member_types.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/member_types.compile.pass.cpp
index 08ae87585d26..bbc5131f0e82 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/member_types.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/member_types.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Iterator traits and member typedefs in zip_view::<iterator>.
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/singular.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/singular.pass.cpp
index 191c5aa8ee06..4b8d23c14d74 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/singular.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/singular.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges, no-exceptions
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges, no-exceptions
 
 // If the invocation of any non-const member function of `iterator` exits via an
 // exception, the iterator acquires a singular value.

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/subscript.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/subscript.pass.cpp
index 2641cf67f811..2d3b94d5692d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/subscript.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/iterator/subscript.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto operator[](
diff erence_type n) const requires
 //        all_random_access<Const, Views...>

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/range.concept.compile.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/range.concept.compile.pass.cpp
index 14b787349799..5bae72ee5ad0 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/range.concept.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/range.concept.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // test if zip_view models input_range, forward_range, bidirectional_range,
 //                         random_access_range, contiguous_range, common_range

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/ctor.default.pass.cpp
index 5f8929ea5e3c..b07dc5518c4d 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // sentinel() = default;
 

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/ctor.other.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/ctor.other.pass.cpp
index 0af756f79e28..979ea5a3ce91 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/ctor.other.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/ctor.other.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr sentinel(sentinel<!Const> s);
 
@@ -47,7 +47,7 @@ static_assert(std::ranges::random_access_range<NonSimpleNonCommonConvertibleView
 static_assert(!std::ranges::sized_range<NonSimpleNonCommonConvertibleView>);
 static_assert(std::convertible_to<std::ranges::sentinel_t<NonSimpleNonCommonConvertibleView>,
                                   std::ranges::sentinel_t<NonSimpleNonCommonConvertibleView const>>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleNonCommonConvertibleView>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleNonCommonConvertibleView>);
 
 constexpr bool test() {
   int buffer1[4] = {1, 2, 3, 4};

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/eq.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/eq.pass.cpp
index 0194c3451973..724ba6dbd29e 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/eq.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/eq.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<bool OtherConst>
 //   requires sentinel_for<sentinel_t<Base>, iterator_t<maybe-const<OtherConst, V>>>
@@ -68,7 +68,7 @@ constexpr bool test() {
     // simple-view: const and non-const have the same iterator/sentinel type
     std::ranges::zip_view v{SimpleNonCommon(buffer1), SimpleNonCommon(buffer2), SimpleNonCommon(buffer3)};
     static_assert(!std::ranges::common_range<decltype(v)>);
-    LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<decltype(v)>);
+    LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<decltype(v)>);
 
     assert(v.begin() != v.end());
     assert(v.begin() + 1 != v.end());
@@ -81,7 +81,7 @@ constexpr bool test() {
     // !simple-view: const and non-const have 
diff erent iterator/sentinel types
     std::ranges::zip_view v{NonSimpleNonCommon(buffer1), SimpleNonCommon(buffer2), SimpleNonCommon(buffer3)};
     static_assert(!std::ranges::common_range<decltype(v)>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<decltype(v)>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<decltype(v)>);
 
     assert(v.begin() != v.end());
     assert(v.begin() + 4 == v.end());
@@ -106,7 +106,7 @@ constexpr bool test() {
     // underlying const/non-const sentinel can be compared with both const/non-const iterator
     std::ranges::zip_view v{ComparableView(buffer1), ComparableView(buffer2)};
     static_assert(!std::ranges::common_range<decltype(v)>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<decltype(v)>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<decltype(v)>);
 
     assert(v.begin() != v.end());
     assert(v.begin() + 4 == v.end());
@@ -131,7 +131,7 @@ constexpr bool test() {
     // underlying const/non-const sentinel cannot be compared with non-const/const iterator
     std::ranges::zip_view v{ComparableView(buffer1), ConstIncompatibleView{}};
     static_assert(!std::ranges::common_range<decltype(v)>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<decltype(v)>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<decltype(v)>);
 
     using Iter = std::ranges::iterator_t<decltype(v)>;
     using ConstIter = std::ranges::iterator_t<const decltype(v)>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp
index 5500bc99f525..8d69f5744155 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/sentinel/minus.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template <bool OtherConst>
 // requires(sized_sentinel_for<sentinel_t<maybe-const<Const, Views>>,
@@ -121,7 +121,7 @@ constexpr bool test() {
     // simple-view
     std::ranges::zip_view v{ForwardSizedNonCommon(buffer1)};
     static_assert(!std::ranges::common_range<decltype(v)>);
-    LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<decltype(v)>);
+    LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<decltype(v)>);
 
     auto it = v.begin();
     auto st = v.end();
@@ -160,7 +160,7 @@ constexpr bool test() {
     // underlying sentinels cannot substract underlying const iterators
     std::ranges::zip_view v(NonSimpleForwardSizedNonCommon{buffer1});
     static_assert(!std::ranges::common_range<decltype(v)>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<decltype(v)>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<decltype(v)>);
 
     using Iter = std::ranges::iterator_t<decltype(v)>;
     using ConstIter = std::ranges::iterator_t<const decltype(v)>;
@@ -192,7 +192,7 @@ constexpr bool test() {
     // const compatible allow non-const to const conversion
     std::ranges::zip_view v(ConstCompatibleForwardSized{buffer1});
     static_assert(!std::ranges::common_range<decltype(v)>);
-    LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<decltype(v)>);
+    LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<decltype(v)>);
 
     using Iter = std::ranges::iterator_t<decltype(v)>;
     using ConstIter = std::ranges::iterator_t<const decltype(v)>;

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/size.pass.cpp b/libcxx/test/std/ranges/range.adaptors/range.zip/size.pass.cpp
index 776e34c79e1f..38275adb8f9c 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/size.pass.cpp
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/size.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto size() requires(sized_range<Views>&&...)
 // constexpr auto size() const requires(sized_range<const Views>&&...)

diff  --git a/libcxx/test/std/ranges/range.adaptors/range.zip/types.h b/libcxx/test/std/ranges/range.adaptors/range.zip/types.h
index 47c88e9787fe..80de2a05d0d2 100644
--- a/libcxx/test/std/ranges/range.adaptors/range.zip/types.h
+++ b/libcxx/test/std/ranges/range.adaptors/range.zip/types.h
@@ -57,8 +57,8 @@ using NonSimpleCommonRandomAccessSized = NonSimpleCommon;
 static_assert(std::ranges::common_range<Common<true>>);
 static_assert(std::ranges::random_access_range<SimpleCommon>);
 static_assert(std::ranges::sized_range<SimpleCommon>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<SimpleCommon>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleCommon>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<SimpleCommon>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleCommon>);
 
 template <bool Simple>
 struct CommonNonRandom : IntBufferView {
@@ -83,8 +83,8 @@ using NonSimpleCommonNonRandom = CommonNonRandom<false>;
 static_assert(std::ranges::common_range<SimpleCommonNonRandom>);
 static_assert(!std::ranges::random_access_range<SimpleCommonNonRandom>);
 static_assert(!std::ranges::sized_range<SimpleCommonNonRandom>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<SimpleCommonNonRandom>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleCommonNonRandom>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<SimpleCommonNonRandom>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleCommonNonRandom>);
 
 template <bool Simple>
 struct NonCommon : IntBufferView {
@@ -107,8 +107,8 @@ using NonSimpleNonCommon = NonCommon<false>;
 static_assert(!std::ranges::common_range<SimpleNonCommon>);
 static_assert(std::ranges::random_access_range<SimpleNonCommon>);
 static_assert(!std::ranges::sized_range<SimpleNonCommon>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<SimpleNonCommon>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleNonCommon>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<SimpleNonCommon>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleNonCommon>);
 
 template <bool Simple>
 struct NonCommonSized : IntBufferView {
@@ -134,8 +134,8 @@ using NonSimpleNonCommonRandomAcessSized = NonSimpleNonCommonSized;
 static_assert(!std::ranges::common_range<SimpleNonCommonSized>);
 static_assert(std::ranges::random_access_range<SimpleNonCommonSized>);
 static_assert(std::ranges::sized_range<SimpleNonCommonSized>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<SimpleNonCommonSized>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleNonCommonSized>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<SimpleNonCommonSized>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleNonCommonSized>);
 
 template <bool Simple>
 struct NonCommonNonRandom : IntBufferView {
@@ -164,8 +164,8 @@ using NonSimpleNonCommonNonRandom = NonCommonNonRandom<false>;
 static_assert(!std::ranges::common_range<SimpleNonCommonNonRandom>);
 static_assert(!std::ranges::random_access_range<SimpleNonCommonNonRandom>);
 static_assert(!std::ranges::sized_range<SimpleNonCommonNonRandom>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<SimpleNonCommonNonRandom>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleNonCommonNonRandom>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<SimpleNonCommonNonRandom>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleNonCommonNonRandom>);
 
 template <class Iter, class Sent = Iter, class NonConstIter = Iter, class NonConstSent = Sent>
 struct BasicView : IntBufferView {
@@ -230,7 +230,7 @@ static_assert(std::ranges::forward_range<ForwardSizedView>);
 static_assert(std::ranges::sized_range<ForwardSizedView>);
 static_assert(std::ranges::common_range<ForwardSizedView>);
 static_assert(!std::ranges::random_access_range<ForwardSizedView>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<ForwardSizedView>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<ForwardSizedView>);
 
 using NonSimpleForwardSizedView = BasicView<forward_sized_iterator<const int*>, forward_sized_iterator<const int*>,
                                             forward_sized_iterator<int*>, forward_sized_iterator<int*>>;
@@ -238,14 +238,14 @@ static_assert(std::ranges::forward_range<NonSimpleForwardSizedView>);
 static_assert(std::ranges::sized_range<NonSimpleForwardSizedView>);
 static_assert(std::ranges::common_range<NonSimpleForwardSizedView>);
 static_assert(!std::ranges::random_access_range<NonSimpleForwardSizedView>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleForwardSizedView>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleForwardSizedView>);
 
 using ForwardSizedNonCommon = BasicView<forward_sized_iterator<>, sized_sentinel<forward_sized_iterator<>>>;
 static_assert(std::ranges::forward_range<ForwardSizedNonCommon>);
 static_assert(std::ranges::sized_range<ForwardSizedNonCommon>);
 static_assert(!std::ranges::common_range<ForwardSizedNonCommon>);
 static_assert(!std::ranges::random_access_range<ForwardSizedNonCommon>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<ForwardSizedNonCommon>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<ForwardSizedNonCommon>);
 
 using NonSimpleForwardSizedNonCommon =
     BasicView<forward_sized_iterator<const int*>, sized_sentinel<forward_sized_iterator<const int*>>,
@@ -254,7 +254,7 @@ static_assert(std::ranges::forward_range<NonSimpleForwardSizedNonCommon>);
 static_assert(std::ranges::sized_range<NonSimpleForwardSizedNonCommon>);
 static_assert(!std::ranges::common_range<NonSimpleForwardSizedNonCommon>);
 static_assert(!std::ranges::random_access_range<NonSimpleForwardSizedNonCommon>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleForwardSizedNonCommon>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleForwardSizedNonCommon>);
 
 struct SizedRandomAccessView : IntBufferView {
   using IntBufferView::IntBufferView;
@@ -275,7 +275,7 @@ static_assert(!std::ranges::contiguous_range<NonSizedRandomAccessView>);
 static_assert(std::ranges::random_access_range<SizedRandomAccessView>);
 static_assert(!std::ranges::common_range<NonSizedRandomAccessView>);
 static_assert(!std::ranges::sized_range<NonSizedRandomAccessView>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<NonSizedRandomAccessView>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<NonSizedRandomAccessView>);
 
 using NonSimpleNonSizedRandomAccessView =
     BasicView<random_access_iterator<const int*>, sentinel_wrapper<random_access_iterator<const int*>>,
@@ -284,7 +284,7 @@ static_assert(!std::ranges::contiguous_range<NonSimpleNonSizedRandomAccessView>)
 static_assert(std::ranges::random_access_range<NonSimpleNonSizedRandomAccessView>);
 static_assert(!std::ranges::common_range<NonSimpleNonSizedRandomAccessView>);
 static_assert(!std::ranges::sized_range<NonSimpleNonSizedRandomAccessView>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleNonSizedRandomAccessView>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleNonSizedRandomAccessView>);
 
 using ContiguousCommonView = BasicView<int*>;
 static_assert(std::ranges::contiguous_range<ContiguousCommonView>);
@@ -328,20 +328,20 @@ using InputCommonView = BasicView<common_input_iterator<>>;
 static_assert(std::ranges::input_range<InputCommonView>);
 static_assert(!std::ranges::forward_range<InputCommonView>);
 static_assert(std::ranges::common_range<InputCommonView>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<InputCommonView>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<InputCommonView>);
 
 using NonSimpleInputCommonView = BasicView<common_input_iterator<const int*>, common_input_iterator<const int*>,
                                            common_input_iterator<int*>, common_input_iterator<int*>>;
 static_assert(std::ranges::input_range<NonSimpleInputCommonView>);
 static_assert(!std::ranges::forward_range<NonSimpleInputCommonView>);
 static_assert(std::ranges::common_range<NonSimpleInputCommonView>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleInputCommonView>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleInputCommonView>);
 
 using InputNonCommonView = BasicView<common_input_iterator<>, sentinel_wrapper<common_input_iterator<>>>;
 static_assert(std::ranges::input_range<InputNonCommonView>);
 static_assert(!std::ranges::forward_range<InputNonCommonView>);
 static_assert(!std::ranges::common_range<InputNonCommonView>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<InputNonCommonView>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<InputNonCommonView>);
 
 using NonSimpleInputNonCommonView =
     BasicView<common_input_iterator<const int*>, sentinel_wrapper<common_input_iterator<const int*>>,
@@ -349,14 +349,14 @@ using NonSimpleInputNonCommonView =
 static_assert(std::ranges::input_range<InputNonCommonView>);
 static_assert(!std::ranges::forward_range<InputNonCommonView>);
 static_assert(!std::ranges::common_range<InputNonCommonView>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleInputNonCommonView>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleInputNonCommonView>);
 
 using BidiCommonView = BasicView<bidirectional_iterator<int*>>;
 static_assert(!std::ranges::sized_range<BidiCommonView>);
 static_assert(std::ranges::bidirectional_range<BidiCommonView>);
 static_assert(!std::ranges::random_access_range<BidiCommonView>);
 static_assert(std::ranges::common_range<BidiCommonView>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<BidiCommonView>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<BidiCommonView>);
 
 using NonSimpleBidiCommonView = BasicView<bidirectional_iterator<const int*>, bidirectional_iterator<const int*>,
                                           bidirectional_iterator<int*>, bidirectional_iterator<int*>>;
@@ -364,7 +364,7 @@ static_assert(!std::ranges::sized_range<NonSimpleBidiCommonView>);
 static_assert(std::ranges::bidirectional_range<NonSimpleBidiCommonView>);
 static_assert(!std::ranges::random_access_range<NonSimpleBidiCommonView>);
 static_assert(std::ranges::common_range<NonSimpleBidiCommonView>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleBidiCommonView>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleBidiCommonView>);
 
 struct SizedBidiCommon : BidiCommonView {
   using BidiCommonView::BidiCommonView;
@@ -374,7 +374,7 @@ static_assert(std::ranges::sized_range<SizedBidiCommon>);
 static_assert(std::ranges::bidirectional_range<SizedBidiCommon>);
 static_assert(!std::ranges::random_access_range<SizedBidiCommon>);
 static_assert(std::ranges::common_range<SizedBidiCommon>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<SizedBidiCommon>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<SizedBidiCommon>);
 
 struct NonSimpleSizedBidiCommon : NonSimpleBidiCommonView {
   using NonSimpleBidiCommonView::NonSimpleBidiCommonView;
@@ -384,14 +384,14 @@ static_assert(std::ranges::sized_range<NonSimpleSizedBidiCommon>);
 static_assert(std::ranges::bidirectional_range<NonSimpleSizedBidiCommon>);
 static_assert(!std::ranges::random_access_range<NonSimpleSizedBidiCommon>);
 static_assert(std::ranges::common_range<NonSimpleSizedBidiCommon>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleSizedBidiCommon>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleSizedBidiCommon>);
 
 using BidiNonCommonView = BasicView<bidirectional_iterator<int*>, sentinel_wrapper<bidirectional_iterator<int*>>>;
 static_assert(!std::ranges::sized_range<BidiNonCommonView>);
 static_assert(std::ranges::bidirectional_range<BidiNonCommonView>);
 static_assert(!std::ranges::random_access_range<BidiNonCommonView>);
 static_assert(!std::ranges::common_range<BidiNonCommonView>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<BidiNonCommonView>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<BidiNonCommonView>);
 
 using NonSimpleBidiNonCommonView =
     BasicView<bidirectional_iterator<const int*>, sentinel_wrapper<bidirectional_iterator<const int*>>,
@@ -400,14 +400,14 @@ static_assert(!std::ranges::sized_range<NonSimpleBidiNonCommonView>);
 static_assert(std::ranges::bidirectional_range<NonSimpleBidiNonCommonView>);
 static_assert(!std::ranges::random_access_range<NonSimpleBidiNonCommonView>);
 static_assert(!std::ranges::common_range<NonSimpleBidiNonCommonView>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleBidiNonCommonView>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleBidiNonCommonView>);
 
 using SizedBidiNonCommonView = BasicView<bidirectional_iterator<int*>, sized_sentinel<bidirectional_iterator<int*>>>;
 static_assert(std::ranges::sized_range<SizedBidiNonCommonView>);
 static_assert(std::ranges::bidirectional_range<SizedBidiNonCommonView>);
 static_assert(!std::ranges::random_access_range<SizedBidiNonCommonView>);
 static_assert(!std::ranges::common_range<SizedBidiNonCommonView>);
-LIBCPP_STATIC_ASSERT(std::ranges::__simple_view<SizedBidiNonCommonView>);
+LIBCUDACXX_STATIC_ASSERT(std::ranges::__simple_view<SizedBidiNonCommonView>);
 
 using NonSimpleSizedBidiNonCommonView =
     BasicView<bidirectional_iterator<const int*>, sized_sentinel<bidirectional_iterator<const int*>>,
@@ -416,7 +416,7 @@ static_assert(std::ranges::sized_range<NonSimpleSizedBidiNonCommonView>);
 static_assert(std::ranges::bidirectional_range<NonSimpleSizedBidiNonCommonView>);
 static_assert(!std::ranges::random_access_range<NonSimpleSizedBidiNonCommonView>);
 static_assert(!std::ranges::common_range<NonSimpleSizedBidiNonCommonView>);
-LIBCPP_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleSizedBidiNonCommonView>);
+LIBCUDACXX_STATIC_ASSERT(!std::ranges::__simple_view<NonSimpleSizedBidiNonCommonView>);
 
 namespace adltest{
 struct iter_move_swap_iterator {

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/begin.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/begin.pass.cpp
index 3e9ee36591e3..4a73127ebb6b 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator begin() const;
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/borrowing.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/borrowing.compile.pass.cpp
index c84632e9eadf..2dd74a4ccf86 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/borrowing.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/borrowing.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class W, class Bound>
 //   inline constexpr bool enable_borrowed_range<iota_view<W, Bound>> = true;

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/ctad.compile.pass.cpp
index 34c32605bcf9..0cf62e6e2429 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/ctad.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/ctad.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class W, class Bound>
 //     requires (!is-integer-like<W> || !is-integer-like<Bound> ||

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.default.pass.cpp
index 617a59bc1ad5..990aa3922a03 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // iota_view() requires default_initializable<W> = default;
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.first.last.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.first.last.pass.cpp
index 087ba6ed70d2..564f63721c81 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.first.last.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.first.last.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iota_view(iterator first, see below last);
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp
index bed35548546c..6d9ba67f09cf 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.bound.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 #include "test_macros.h"
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.pass.cpp
index c4fa9d213880..c3cceb9a203c 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/ctor.value.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr explicit iota_view(W value);
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp
index 5b008e08d2ce..94d5c61fcca5 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 #include "test_macros.h"
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/compare.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/compare.pass.cpp
index bf414b91379d..ed3fd392c86a 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/compare.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/compare.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // iota_view::<iterator>::operator{<,>,<=,>=,==,!=,<=>}
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.default.pass.cpp
index a0b3c2d69537..9ecacd23e020 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // iterator() requires default_initializable<W> = default;
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.value.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.value.pass.cpp
index fc2e628376b3..8bf7b93ef3ac 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.value.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/ctor.value.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr explicit iterator(W value);
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/decrement.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/decrement.pass.cpp
index 8bbe2f64ace1..0d6d93abd90a 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/decrement.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/decrement.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator& operator--() requires decrementable<W>;
 // constexpr iterator operator--(int) requires decrementable<W>;

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/increment.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/increment.pass.cpp
index db16d6469169..c66978120b8c 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/increment.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/increment.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator& operator++();
 // constexpr void operator++(int);

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/member_typedefs.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/member_typedefs.compile.pass.cpp
index 79e88e646288..376f9a8d9a45 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/member_typedefs.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/member_typedefs.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test iterator category and iterator concepts.
 
@@ -70,7 +70,7 @@ void test() {
     static_assert(std::same_as<Iter::value_type, char>);
     static_assert(sizeof(Iter::
diff erence_type) > sizeof(char));
     static_assert(std::is_signed_v<Iter::
diff erence_type>);
-    LIBCPP_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, int>);
+    LIBCUDACXX_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, int>);
   }
   {
     const std::ranges::iota_view<short> io(0);
@@ -80,7 +80,7 @@ void test() {
     static_assert(std::same_as<Iter::value_type, short>);
     static_assert(sizeof(Iter::
diff erence_type) > sizeof(short));
     static_assert(std::is_signed_v<Iter::
diff erence_type>);
-    LIBCPP_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, int>);
+    LIBCUDACXX_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, int>);
   }
   {
     const std::ranges::iota_view<int> io(0);
@@ -92,9 +92,9 @@ void test() {
     static_assert(std::is_signed_v<Iter::
diff erence_type>);
     // If we're compiling for 32 bit or windows, int and long are the same size, so long long is the correct 
diff erence type.
 #if INTPTR_MAX == INT32_MAX || defined(_WIN32)
-    LIBCPP_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, long long>);
+    LIBCUDACXX_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, long long>);
 #else
-    LIBCPP_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, long>);
+    LIBCUDACXX_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, long>);
 #endif
   }
   {
@@ -106,7 +106,7 @@ void test() {
     // Same as below, if there is no type larger than long, we can just use that.
     static_assert(sizeof(Iter::
diff erence_type) >= sizeof(long));
     static_assert(std::is_signed_v<Iter::
diff erence_type>);
-    LIBCPP_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, long long>);
+    LIBCUDACXX_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, long long>);
   }
   {
     const std::ranges::iota_view<long long> io(0);
@@ -118,7 +118,7 @@ void test() {
     // https://eel.is/c++draft/range.iota.view#1.3
     static_assert(sizeof(Iter::
diff erence_type) >= sizeof(long long));
     static_assert(std::is_signed_v<Iter::
diff erence_type>);
-    LIBCPP_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, long long>);
+    LIBCUDACXX_STATIC_ASSERT(std::same_as<Iter::
diff erence_type, long long>);
   }
   {
     const std::ranges::iota_view<Decrementable> io;

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/minus.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/minus.pass.cpp
index 8b2a67d6881d..c035992f5834 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/minus.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/minus.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr iterator operator-(iterator i, 
diff erence_type n)
 //   requires advanceable<W>;
@@ -94,7 +94,7 @@ constexpr bool test() {
       auto iter2 = std::next(io.begin(), 5);
       assert(iter1 - iter2 == 5);
 
-      LIBCPP_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
+      LIBCUDACXX_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
     }
     {
       std::ranges::iota_view<int> io(0);
@@ -102,7 +102,7 @@ constexpr bool test() {
       auto iter2 = std::next(io.begin(), 10);
       assert(iter1 - iter2 == 0);
 
-      LIBCPP_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
+      LIBCUDACXX_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
     }
     {
       std::ranges::iota_view<int> io(0);
@@ -110,7 +110,7 @@ constexpr bool test() {
       auto iter2 = std::next(io.begin(), 10);
       assert(iter1 - iter2 == -5);
 
-      LIBCPP_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
+      LIBCUDACXX_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
     }
 
     // When "_Start" is unsigned integer like and y > x.
@@ -120,7 +120,7 @@ constexpr bool test() {
       auto iter2 = std::next(io.begin(), 10);
       assert(iter1 - iter2 == -5);
 
-      LIBCPP_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
+      LIBCUDACXX_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
     }
 
     // When "_Start" is unsigned integer like and x >= y.
@@ -130,7 +130,7 @@ constexpr bool test() {
       auto iter2 = std::next(io.begin(), 5);
       assert(iter1 - iter2 == 5);
 
-      LIBCPP_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
+      LIBCUDACXX_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
     }
     {
       std::ranges::iota_view<unsigned> io(0);
@@ -138,7 +138,7 @@ constexpr bool test() {
       auto iter2 = std::next(io.begin(), 10);
       assert(iter1 - iter2 == 0);
 
-      LIBCPP_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
+      LIBCUDACXX_STATIC_ASSERT(std::same_as<decltype(iter1 - iter2), IntDiffT>);
     }
 
     // When "_Start" is not integer like.

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/minus_eq.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/minus_eq.pass.cpp
index aaee31f7e945..c2ceee2fcbce 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/minus_eq.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/minus_eq.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator& operator-=(
diff erence_type n)
 //   requires advanceable<W>;

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/plus.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/plus.pass.cpp
index cfc9d1a6f9e8..c26c67f645e7 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/plus.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/plus.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr iterator operator+(iterator i, 
diff erence_type n)
 //   requires advanceable<W>;

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/plus_eq.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/plus_eq.pass.cpp
index 4528f5c76c42..9e345833f850 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/plus_eq.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/plus_eq.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr iterator& operator+=(
diff erence_type n)
 //   requires advanceable<W>;

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp
index 1731aa14f1e1..4b7c2d9437ff 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/star.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr W operator*() const noexcept(is_nothrow_copy_constructible_v<W>);
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/subscript.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/subscript.pass.cpp
index fdb3c2739bfa..5ee6c18ffb19 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/subscript.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/iterator/subscript.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr W operator[](
diff erence_type n) const
 //   requires advanceable<W>;

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/range_concept_conformance.compile.pass.cpp
index 9eaf732cdad2..34981374b51b 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test that iota_view conforms to range and view concepts.
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.default.pass.cpp
index 13e3495eafca..745efe78716c 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // sentinel() = default;
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.value.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.value.pass.cpp
index 8cf805cae1ea..7377870d5e80 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.value.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/ctor.value.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr explicit sentinel(Bound bound);
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/eq.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/eq.pass.cpp
index 242db4e3611a..05df3e94d936 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/eq.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/eq.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr bool operator==(const iterator& x, const sentinel& y);
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/minus.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/minus.pass.cpp
index a363581d77b4..75f15067742c 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/minus.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/sentinel/minus.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // friend constexpr iter_
diff erence_t<W> operator-(const iterator& x, const sentinel& y)
 //   requires sized_sentinel_for<Bound, W>;

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp
index ce98e0c22ca5..129993fde73e 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/size.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr auto size() const requires see below;
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/type.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/type.compile.pass.cpp
index f6a9de1531f5..20f0d32c9be6 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/type.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/type.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 #include <ranges>
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.iota.view/views_iota.pass.cpp b/libcxx/test/std/ranges/range.factories/range.iota.view/views_iota.pass.cpp
index 2e472d0c8fd7..85745627f9fe 100644
--- a/libcxx/test/std/ranges/range.factories/range.iota.view/views_iota.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.iota.view/views_iota.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // views::iota
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/assign.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/assign.pass.cpp
index 349c4fb2d58e..bcb244ba61c1 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/assign.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/assign.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Tests that <value_> is a <copyable-box>.
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/begin.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/begin.pass.cpp
index 210d5b39ed30..df11680dfef6 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/begin.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/begin.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr T* begin() noexcept;
 // constexpr const T* begin() const noexcept;

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/borrowing.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/borrowing.compile.pass.cpp
index 86ada4bda7de..4b16a15b9fa9 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/borrowing.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/borrowing.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // single_view does not specialize enable_borrowed_range
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/cpo.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/cpo.pass.cpp
index 984f541e5598..a02bb0454736 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/cpo.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/cpo.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::views::single
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/ctad.compile.pass.cpp
index d27d66b93688..c699484fd246 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/ctad.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/ctad.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 //   single_view(T) -> single_view<T>;

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/ctor.default.pass.cpp
index a20c71384589..1ef54ec30eb1 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // single_view() requires default_initializable<T> = default;
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/ctor.in_place.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/ctor.in_place.pass.cpp
index d3ed386bd838..65607f3b0904 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/ctor.in_place.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/ctor.in_place.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class... Args>
 //   requires constructible_from<T, Args...>

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/ctor.value.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/ctor.value.pass.cpp
index 532985c1c1d2..4c3a027a5f03 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/ctor.value.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/ctor.value.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr explicit single_view(const T& t);
 // constexpr explicit single_view(T&& t);

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/data.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/data.pass.cpp
index a300e496e8ad..0a6c58cd6432 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/data.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/data.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr T* data() noexcept;
 // constexpr const T* data() const noexcept;

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/end.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/end.pass.cpp
index e11e093f06ab..d79763fc0653 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/end.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr T* end() noexcept;
 // constexpr const T* end() const noexcept;

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/range_concept_conformance.compile.pass.cpp
index 6acb5b51a0ae..4a6d7c5813ca 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // Test that single_view conforms to range and view concepts.
 

diff  --git a/libcxx/test/std/ranges/range.factories/range.single.view/size.pass.cpp b/libcxx/test/std/ranges/range.factories/range.single.view/size.pass.cpp
index b5c0104c6e29..1cf0c259fbfb 100644
--- a/libcxx/test/std/ranges/range.factories/range.single.view/size.pass.cpp
+++ b/libcxx/test/std/ranges/range.factories/range.single.view/size.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // static constexpr size_t size() noexcept;
 

diff  --git a/libcxx/test/std/ranges/range.req/range.range/helper_aliases.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.range/helper_aliases.compile.pass.cpp
index b6c7b5e52b3a..c099243ad9fe 100644
--- a/libcxx/test/std/ranges/range.req/range.range/helper_aliases.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.range/helper_aliases.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<range R>
 // using range_
diff erence_t = iter_
diff erence_t<iterator_t<R>>;

diff  --git a/libcxx/test/std/ranges/range.req/range.range/iterator_t.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.range/iterator_t.compile.pass.cpp
index 80443dd3f2f3..864ffd0ce454 100644
--- a/libcxx/test/std/ranges/range.req/range.range/iterator_t.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.range/iterator_t.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 // using iterator_t = decltype(ranges::begin(declval<T&>()));

diff  --git a/libcxx/test/std/ranges/range.req/range.range/range.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.range/range.compile.pass.cpp
index 9ed82dbe465d..1075a71b0a7b 100644
--- a/libcxx/test/std/ranges/range.req/range.range/range.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.range/range.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 // concept range;

diff  --git a/libcxx/test/std/ranges/range.req/range.range/range_size_t.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.range/range_size_t.compile.pass.cpp
index 8e37add72c4e..a3923f3a2927 100644
--- a/libcxx/test/std/ranges/range.req/range.range/range_size_t.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.range/range_size_t.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<sized_range R>
 // using range_size_t = decltype(ranges::size(declval<R&>()));

diff  --git a/libcxx/test/std/ranges/range.req/range.range/sentinel_t.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.range/sentinel_t.compile.pass.cpp
index 9da4e94828aa..8e29b9056274 100644
--- a/libcxx/test/std/ranges/range.req/range.range/sentinel_t.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.range/sentinel_t.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<range _Rp>
 // using sentinel_t = decltype(ranges::end(declval<_Rp&>()));

diff  --git a/libcxx/test/std/ranges/range.req/range.refinements/bidirectional_range.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.refinements/bidirectional_range.compile.pass.cpp
index 62aba0ad5e38..71f55033be36 100644
--- a/libcxx/test/std/ranges/range.req/range.refinements/bidirectional_range.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.refinements/bidirectional_range.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 // concept bidirectional_range;

diff  --git a/libcxx/test/std/ranges/range.req/range.refinements/contiguous_range.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.refinements/contiguous_range.compile.pass.cpp
index be2427b62e95..feca75ca74be 100644
--- a/libcxx/test/std/ranges/range.req/range.refinements/contiguous_range.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.refinements/contiguous_range.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 // concept contiguous_range;

diff  --git a/libcxx/test/std/ranges/range.req/range.refinements/forward_range.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.refinements/forward_range.compile.pass.cpp
index 04363320a95a..d3ea8dd0cc2e 100644
--- a/libcxx/test/std/ranges/range.req/range.refinements/forward_range.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.refinements/forward_range.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 // concept forward_range;

diff  --git a/libcxx/test/std/ranges/range.req/range.refinements/input_range.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.refinements/input_range.compile.pass.cpp
index 38eb275694fd..953c03bd4ecb 100644
--- a/libcxx/test/std/ranges/range.req/range.refinements/input_range.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.refinements/input_range.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 // concept input_range;

diff  --git a/libcxx/test/std/ranges/range.req/range.refinements/output_range.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.refinements/output_range.compile.pass.cpp
index dcb9b5bdfac6..e2534bd7ecfc 100644
--- a/libcxx/test/std/ranges/range.req/range.refinements/output_range.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.refinements/output_range.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R, class T>
 // concept output_range;

diff  --git a/libcxx/test/std/ranges/range.req/range.refinements/random_access_range.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.refinements/random_access_range.compile.pass.cpp
index 63f6bc2a7b1d..49bb0484e8f8 100644
--- a/libcxx/test/std/ranges/range.req/range.refinements/random_access_range.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.refinements/random_access_range.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 // concept random_access_range;

diff  --git a/libcxx/test/std/ranges/range.req/range.refinements/viewable_range.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.refinements/viewable_range.compile.pass.cpp
index 211186a56ab9..97c648277f4f 100644
--- a/libcxx/test/std/ranges/range.req/range.refinements/viewable_range.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.refinements/viewable_range.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class R>
 // concept viewable_range;

diff  --git a/libcxx/test/std/ranges/range.req/range.sized/sized_range.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.sized/sized_range.compile.pass.cpp
index e24291f3de83..0e7922a705c2 100644
--- a/libcxx/test/std/ranges/range.req/range.sized/sized_range.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.sized/sized_range.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 // concept sized_range;

diff  --git a/libcxx/test/std/ranges/range.req/range.sized/subsumption.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.sized/subsumption.compile.pass.cpp
index 52b19292f04a..4780252b99a7 100644
--- a/libcxx/test/std/ranges/range.req/range.sized/subsumption.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.sized/subsumption.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class T>
 // concept sized_range;

diff  --git a/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp
index 044b92f58da9..cd3c452ee9e7 100644
--- a/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.view/enable_view.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <ranges>
 

diff  --git a/libcxx/test/std/ranges/range.req/range.view/view.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.view/view.compile.pass.cpp
index 1804ed4a2d26..8433d39a24ed 100644
--- a/libcxx/test/std/ranges/range.req/range.view/view.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.view/view.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <ranges>
 

diff  --git a/libcxx/test/std/ranges/range.req/range.view/view.subsumption.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.view/view.subsumption.compile.pass.cpp
index 0151c841ffa9..a15196d73d34 100644
--- a/libcxx/test/std/ranges/range.req/range.view/view.subsumption.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.view/view.subsumption.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <ranges>
 

diff  --git a/libcxx/test/std/ranges/range.req/range.view/view_base.compile.pass.cpp b/libcxx/test/std/ranges/range.req/range.view/view_base.compile.pass.cpp
index 3c884d99e1d6..3fb8862e76d0 100644
--- a/libcxx/test/std/ranges/range.req/range.view/view_base.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.req/range.view/view_base.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <ranges>
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.dangling/borrowed_iterator.compile.pass.cpp b/libcxx/test/std/ranges/range.utility/range.dangling/borrowed_iterator.compile.pass.cpp
index c4decc2f90a3..502816613ac6 100644
--- a/libcxx/test/std/ranges/range.utility/range.dangling/borrowed_iterator.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.dangling/borrowed_iterator.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::borrowed_iterator_t;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.dangling/borrowed_subrange.compile.pass.cpp b/libcxx/test/std/ranges/range.utility/range.dangling/borrowed_subrange.compile.pass.cpp
index 3ae4c1b70ad7..e04aea011063 100644
--- a/libcxx/test/std/ranges/range.utility/range.dangling/borrowed_subrange.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.dangling/borrowed_subrange.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::borrowed_subrange_t;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.dangling/dangling.pass.cpp b/libcxx/test/std/ranges/range.utility/range.dangling/dangling.pass.cpp
index ff41ef0fba2c..7b15fbef001c 100644
--- a/libcxx/test/std/ranges/range.utility/range.dangling/dangling.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.dangling/dangling.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // std::ranges::dangling;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/advance.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/advance.pass.cpp
index e0a635702f1c..65d09289d34d 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/advance.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/advance.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::subrange;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/borrowing.compile.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/borrowing.compile.pass.cpp
index f6df065d9b69..45d8662062d3 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/borrowing.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/borrowing.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class I, class S, subrange_kind K>
 //   inline constexpr bool enable_borrowed_range<subrange<I, S, K>> = true;

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/ctad.compile.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/ctad.compile.pass.cpp
index 9c3054c07c41..97eec70494d2 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/ctad.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/ctad.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::subrange;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end.pass.cpp
index 8bbeae436e52..9a1a68df7522 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::subrange;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end_size.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end_size.pass.cpp
index 04cc0b13dc55..1cab57ec0e19 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end_size.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.begin_end_size.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::subrange;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.default.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.default.pass.cpp
index 4dfbd68e17a4..e992f66db62e 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.default.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.default.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // constexpr subrange() requires default_initializable<I>;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.pair_like_conv.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.pair_like_conv.pass.cpp
index 7f2f09385840..1ac0d42d6d11 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.pair_like_conv.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.pair_like_conv.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::subrange;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.range.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.range.pass.cpp
index f2e9f697e222..d3c63de67d2e 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.range.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.range.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::subrange;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.range_size.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.range_size.pass.cpp
index b43104e0ddd5..de15ab9b3f26 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/ctor.range_size.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/ctor.range_size.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<borrowed_range R>
 //   requires convertible-to-non-slicing<iterator_t<R>, I> &&

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/general.compile.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/general.compile.pass.cpp
index 5e76baafc776..ae265a1c5a7b 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/general.compile.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/general.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::subrange;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/get.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/get.pass.cpp
index b8d0c0e6a1d3..3a122af9ee1b 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/get.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/get.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::subrange;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/lwg3470.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/lwg3470.pass.cpp
index 87dac3da216f..91a99524a540 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/lwg3470.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/lwg3470.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::subrange;
 //   Test the example from LWG 3470,

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/primitives.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/primitives.pass.cpp
index 24f2b3fbc381..7e24f2e785fb 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/primitives.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/primitives.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::subrange;
 

diff  --git a/libcxx/test/std/ranges/range.utility/range.subrange/structured_bindings.pass.cpp b/libcxx/test/std/ranges/range.utility/range.subrange/structured_bindings.pass.cpp
index c90b2b6ace52..bcd44be12517 100644
--- a/libcxx/test/std/ranges/range.utility/range.subrange/structured_bindings.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/range.subrange/structured_bindings.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // class std::ranges::subrange;
 

diff  --git a/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp b/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp
index 31dea78c849a..5b423039b7bb 100644
--- a/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp
+++ b/libcxx/test/std/ranges/range.utility/view.interface/view.interface.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // template<class D>
 //   requires is_class_v<D> && same_as<D, remove_cv_t<D>>

diff  --git a/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp
index 2493f6a643a6..e536ed5108b1 100644
--- a/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.match/exponential.pass.cpp
@@ -33,7 +33,7 @@ int main(int, char**) {
           std::regex(
               "a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaa",
               op));
-      LIBCPP_ASSERT(false);
+      LIBCUDACXX_ASSERT(false);
       assert(b);
     } catch (const std::regex_error &e) {
       assert(e.code() == std::regex_constants::error_complexity);

diff  --git a/libcxx/test/std/re/re.alg/re.alg.replace/exponential.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.replace/exponential.pass.cpp
index 316759fd895d..93477ee51758 100644
--- a/libcxx/test/std/re/re.alg/re.alg.replace/exponential.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.replace/exponential.pass.cpp
@@ -30,7 +30,7 @@ int main(int, char**)
         std::regex re("a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaa");
         const char s[] = "aaaaaaaaaaaaaaaaaaaa";
         std::string r = std::regex_replace(s, re, "123-&", std::regex_constants::format_sed);
-        LIBCPP_ASSERT(false);
+        LIBCUDACXX_ASSERT(false);
         assert(r == "123-aaaaaaaaaaaaaaaaaaaa");
     } catch (const std::regex_error &e) {
       assert(e.code() == std::regex_constants::error_complexity);

diff  --git a/libcxx/test/std/re/re.alg/re.alg.search/exponential.pass.cpp b/libcxx/test/std/re/re.alg/re.alg.search/exponential.pass.cpp
index 64a6a135adda..1e8f5ad44dc8 100644
--- a/libcxx/test/std/re/re.alg/re.alg.search/exponential.pass.cpp
+++ b/libcxx/test/std/re/re.alg/re.alg.search/exponential.pass.cpp
@@ -33,7 +33,7 @@ int main(int, char**) {
           std::regex(
               "a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaa",
               op));
-      LIBCPP_ASSERT(false);
+      LIBCUDACXX_ASSERT(false);
       assert(b);
     } catch (const std::regex_error &e) {
       assert(e.code() == std::regex_constants::error_complexity);

diff  --git a/libcxx/test/std/re/re.badexp/regex_error.pass.cpp b/libcxx/test/std/re/re.badexp/regex_error.pass.cpp
index f1a1237a747a..84c97f48c4fe 100644
--- a/libcxx/test/std/re/re.badexp/regex_error.pass.cpp
+++ b/libcxx/test/std/re/re.badexp/regex_error.pass.cpp
@@ -25,71 +25,71 @@ int main(int, char**)
     {
         std::regex_error e(std::regex_constants::error_collate);
         assert(e.code() == std::regex_constants::error_collate);
-        LIBCPP_ASSERT(e.what() == std::string("The expression contained an invalid collating element name."));
+        LIBCUDACXX_ASSERT(e.what() == std::string("The expression contained an invalid collating element name."));
     }
     {
         std::regex_error e(std::regex_constants::error_ctype);
         assert(e.code() == std::regex_constants::error_ctype);
-        LIBCPP_ASSERT(e.what() == std::string("The expression contained an invalid character class name."));
+        LIBCUDACXX_ASSERT(e.what() == std::string("The expression contained an invalid character class name."));
     }
     {
         std::regex_error e(std::regex_constants::error_escape);
         assert(e.code() == std::regex_constants::error_escape);
-        LIBCPP_ASSERT(e.what() == std::string("The expression contained an invalid escaped character, or a "
+        LIBCUDACXX_ASSERT(e.what() == std::string("The expression contained an invalid escaped character, or a "
                "trailing escape."));
     }
     {
         std::regex_error e(std::regex_constants::error_backref);
         assert(e.code() == std::regex_constants::error_backref);
-        LIBCPP_ASSERT(e.what() == std::string("The expression contained an invalid back reference."));
+        LIBCUDACXX_ASSERT(e.what() == std::string("The expression contained an invalid back reference."));
     }
     {
         std::regex_error e(std::regex_constants::error_brack);
         assert(e.code() == std::regex_constants::error_brack);
-        LIBCPP_ASSERT(e.what() == std::string("The expression contained mismatched [ and ]."));
+        LIBCUDACXX_ASSERT(e.what() == std::string("The expression contained mismatched [ and ]."));
     }
     {
         std::regex_error e(std::regex_constants::error_paren);
         assert(e.code() == std::regex_constants::error_paren);
-        LIBCPP_ASSERT(e.what() == std::string("The expression contained mismatched ( and )."));
+        LIBCUDACXX_ASSERT(e.what() == std::string("The expression contained mismatched ( and )."));
     }
     {
         std::regex_error e(std::regex_constants::error_brace);
         assert(e.code() == std::regex_constants::error_brace);
-        LIBCPP_ASSERT(e.what() == std::string("The expression contained mismatched { and }."));
+        LIBCUDACXX_ASSERT(e.what() == std::string("The expression contained mismatched { and }."));
     }
     {
         std::regex_error e(std::regex_constants::error_badbrace);
         assert(e.code() == std::regex_constants::error_badbrace);
-        LIBCPP_ASSERT(e.what() == std::string("The expression contained an invalid range in a {} expression."));
+        LIBCUDACXX_ASSERT(e.what() == std::string("The expression contained an invalid range in a {} expression."));
     }
     {
         std::regex_error e(std::regex_constants::error_range);
         assert(e.code() == std::regex_constants::error_range);
-        LIBCPP_ASSERT(e.what() == std::string("The expression contained an invalid character range, "
+        LIBCUDACXX_ASSERT(e.what() == std::string("The expression contained an invalid character range, "
                "such as [b-a] in most encodings."));
     }
     {
         std::regex_error e(std::regex_constants::error_space);
         assert(e.code() == std::regex_constants::error_space);
-        LIBCPP_ASSERT(e.what() == std::string("There was insufficient memory to convert the expression into "
+        LIBCUDACXX_ASSERT(e.what() == std::string("There was insufficient memory to convert the expression into "
                "a finite state machine."));
     }
     {
         std::regex_error e(std::regex_constants::error_badrepeat);
         assert(e.code() == std::regex_constants::error_badrepeat);
-        LIBCPP_ASSERT(e.what() == std::string("One of *?+{ was not preceded by a valid regular expression."));
+        LIBCUDACXX_ASSERT(e.what() == std::string("One of *?+{ was not preceded by a valid regular expression."));
     }
     {
         std::regex_error e(std::regex_constants::error_complexity);
         assert(e.code() == std::regex_constants::error_complexity);
-        LIBCPP_ASSERT(e.what() == std::string("The complexity of an attempted match against a regular "
+        LIBCUDACXX_ASSERT(e.what() == std::string("The complexity of an attempted match against a regular "
                "expression exceeded a pre-set level."));
     }
     {
         std::regex_error e(std::regex_constants::error_stack);
         assert(e.code() == std::regex_constants::error_stack);
-        LIBCPP_ASSERT(e.what() == std::string("There was insufficient memory to determine whether the regular "
+        LIBCUDACXX_ASSERT(e.what() == std::string("There was insufficient memory to determine whether the regular "
                "expression could match the specified character sequence."));
     }
 

diff  --git a/libcxx/test/std/re/re.const/re.err/error_type.pass.cpp b/libcxx/test/std/re/re.const/re.err/error_type.pass.cpp
index 75a69517eb5f..def87bb52c19 100644
--- a/libcxx/test/std/re/re.const/re.err/error_type.pass.cpp
+++ b/libcxx/test/std/re/re.const/re.err/error_type.pass.cpp
@@ -36,19 +36,19 @@
 
 int main(int, char**)
 {
-    LIBCPP_ASSERT(std::regex_constants::error_collate != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_ctype != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_escape != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_backref != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_brack != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_paren != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_brace != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_badbrace != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_range != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_space != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_badrepeat != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_complexity != 0);
-    LIBCPP_ASSERT(std::regex_constants::error_stack != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_collate != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_ctype != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_escape != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_backref != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_brack != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_paren != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_brace != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_badbrace != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_range != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_space != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_badrepeat != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_complexity != 0);
+    LIBCUDACXX_ASSERT(std::regex_constants::error_stack != 0);
 
     assert(std::regex_constants::error_collate != std::regex_constants::error_ctype);
     assert(std::regex_constants::error_collate != std::regex_constants::error_escape);

diff  --git a/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp b/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
index 012ad4fe855d..44b70fa66fbd 100644
--- a/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
+++ b/libcxx/test/std/re/re.const/re.synopt/syntax_option_type.pass.cpp
@@ -38,7 +38,7 @@ int main(int, char**)
     assert(std::regex_constants::nosubs != 0);
     assert(std::regex_constants::optimize != 0);
     assert(std::regex_constants::collate != 0);
-#if !defined _LIBCPP_VERSION || defined _LIBCPP_ABI_REGEX_CONSTANTS_NONZERO
+#if !defined _LIBCUDACXX_VERSION || defined _LIBCUDACXX_ABI_REGEX_CONSTANTS_NONZERO
     // https://llvm.org/PR35967
     assert(std::regex_constants::ECMAScript != 0);
 #else

diff  --git a/libcxx/test/std/re/re.grammar/excessive_brace_min_max.pass.cpp b/libcxx/test/std/re/re.grammar/excessive_brace_min_max.pass.cpp
index d8f0502e67c9..ab8d2d04789c 100644
--- a/libcxx/test/std/re/re.grammar/excessive_brace_min_max.pass.cpp
+++ b/libcxx/test/std/re/re.grammar/excessive_brace_min_max.pass.cpp
@@ -26,7 +26,7 @@ int main(int, char**) {
       assert(false);
     } catch (const std::regex_error &e) {
       assert(e.code() == std::regex_constants::error_badbrace);
-      LIBCPP_ASSERT(e.code() == std::regex_constants::error_badbrace);
+      LIBCUDACXX_ASSERT(e.code() == std::regex_constants::error_badbrace);
     }
   }
   for (std::regex_constants::syntax_option_type op :
@@ -37,7 +37,7 @@ int main(int, char**) {
       assert(false);
     } catch (const std::regex_error &e) {
       assert(e.code() == std::regex_constants::error_badbrace);
-      LIBCPP_ASSERT(e.code() == std::regex_constants::error_badbrace);
+      LIBCUDACXX_ASSERT(e.code() == std::regex_constants::error_badbrace);
     }
   }
 
@@ -49,7 +49,7 @@ int main(int, char**) {
       assert(false);
     } catch (const std::regex_error &e) {
       assert(e.code() == std::regex_constants::error_badbrace);
-      LIBCPP_ASSERT(e.code() == std::regex_constants::error_badbrace);
+      LIBCUDACXX_ASSERT(e.code() == std::regex_constants::error_badbrace);
     }
   }
   for (std::regex_constants::syntax_option_type op :
@@ -60,7 +60,7 @@ int main(int, char**) {
       assert(false);
     } catch (const std::regex_error &e) {
       assert(e.code() == std::regex_constants::error_badbrace);
-      LIBCPP_ASSERT(e.code() == std::regex_constants::error_badbrace);
+      LIBCUDACXX_ASSERT(e.code() == std::regex_constants::error_badbrace);
     }
   }
   return 0;

diff  --git a/libcxx/test/std/re/re.results/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/re/re.results/range_concept_conformance.compile.pass.cpp
index f417fec53e78..9f4a7618bd45 100644
--- a/libcxx/test/std/re/re.results/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/re/re.results/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // match_results
 

diff  --git a/libcxx/test/std/re/re.traits/lookup_classname.pass.cpp b/libcxx/test/std/re/re.traits/lookup_classname.pass.cpp
index caa04c775fff..14147ed98a09 100644
--- a/libcxx/test/std/re/re.traits/lookup_classname.pass.cpp
+++ b/libcxx/test/std/re/re.traits/lookup_classname.pass.cpp
@@ -44,7 +44,7 @@ test_w(const char_type* A,
     typedef forward_iterator<const char_type*> F;
     char_class_type result = t.lookup_classname(F(A), F(A + t.length(A)), icase);
     assert((result & expected) == expected);
-    LIBCPP_ASSERT((expected | std::regex_traits<char_type>::__regex_word) == result);
+    LIBCUDACXX_ASSERT((expected | std::regex_traits<char_type>::__regex_word) == result);
 
     const bool matches_underscore = t.isctype('_', result);
     if (result != expected)
@@ -57,16 +57,16 @@ int main(int, char**)
 {
 //  if __regex_word is not distinct from all the classes, bad things happen
 //  See https://llvm.org/PR26476 for an example.
-    LIBCPP_ASSERT((std::ctype_base::space  & std::regex_traits<char>::__regex_word) == 0);
-    LIBCPP_ASSERT((std::ctype_base::print  & std::regex_traits<char>::__regex_word) == 0);
-    LIBCPP_ASSERT((std::ctype_base::cntrl  & std::regex_traits<char>::__regex_word) == 0);
-    LIBCPP_ASSERT((std::ctype_base::upper  & std::regex_traits<char>::__regex_word) == 0);
-    LIBCPP_ASSERT((std::ctype_base::lower  & std::regex_traits<char>::__regex_word) == 0);
-    LIBCPP_ASSERT((std::ctype_base::alpha  & std::regex_traits<char>::__regex_word) == 0);
-    LIBCPP_ASSERT((std::ctype_base::digit  & std::regex_traits<char>::__regex_word) == 0);
-    LIBCPP_ASSERT((std::ctype_base::punct  & std::regex_traits<char>::__regex_word) == 0);
-    LIBCPP_ASSERT((std::ctype_base::xdigit & std::regex_traits<char>::__regex_word) == 0);
-    LIBCPP_ASSERT((std::ctype_base::blank  & std::regex_traits<char>::__regex_word) == 0);
+    LIBCUDACXX_ASSERT((std::ctype_base::space  & std::regex_traits<char>::__regex_word) == 0);
+    LIBCUDACXX_ASSERT((std::ctype_base::print  & std::regex_traits<char>::__regex_word) == 0);
+    LIBCUDACXX_ASSERT((std::ctype_base::cntrl  & std::regex_traits<char>::__regex_word) == 0);
+    LIBCUDACXX_ASSERT((std::ctype_base::upper  & std::regex_traits<char>::__regex_word) == 0);
+    LIBCUDACXX_ASSERT((std::ctype_base::lower  & std::regex_traits<char>::__regex_word) == 0);
+    LIBCUDACXX_ASSERT((std::ctype_base::alpha  & std::regex_traits<char>::__regex_word) == 0);
+    LIBCUDACXX_ASSERT((std::ctype_base::digit  & std::regex_traits<char>::__regex_word) == 0);
+    LIBCUDACXX_ASSERT((std::ctype_base::punct  & std::regex_traits<char>::__regex_word) == 0);
+    LIBCUDACXX_ASSERT((std::ctype_base::xdigit & std::regex_traits<char>::__regex_word) == 0);
+    LIBCUDACXX_ASSERT((std::ctype_base::blank  & std::regex_traits<char>::__regex_word) == 0);
 
     test("d", std::ctype_base::digit);
     test("D", std::ctype_base::digit);

diff  --git a/libcxx/test/std/strings/basic.string/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/strings/basic.string/range_concept_conformance.compile.pass.cpp
index eb4e511ae480..aab61fdd4b20 100644
--- a/libcxx/test/std/strings/basic.string/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // string
 

diff  --git a/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp
index 3dd4bf91d108..910b992f08cb 100644
--- a/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.access/back.pass.cpp
@@ -24,8 +24,8 @@ test(S s)
     const S& cs = s;
     ASSERT_SAME_TYPE(decltype( s.back()), typename S::reference);
     ASSERT_SAME_TYPE(decltype(cs.back()), typename S::const_reference);
-    LIBCPP_ASSERT_NOEXCEPT(    s.back());
-    LIBCPP_ASSERT_NOEXCEPT(   cs.back());
+    LIBCUDACXX_ASSERT_NOEXCEPT(    s.back());
+    LIBCUDACXX_ASSERT_NOEXCEPT(   cs.back());
     assert(&cs.back() == &cs[cs.size()-1]);
     assert(&s.back() == &s[cs.size()-1]);
     s.back() = typename S::value_type('z');

diff  --git a/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp
index 888d9f3b7644..ccb9c8ae0d5f 100644
--- a/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.access/front.pass.cpp
@@ -24,8 +24,8 @@ test(S s)
     const S& cs = s;
     ASSERT_SAME_TYPE(decltype( s.front()), typename S::reference);
     ASSERT_SAME_TYPE(decltype(cs.front()), typename S::const_reference);
-    LIBCPP_ASSERT_NOEXCEPT(    s.front());
-    LIBCPP_ASSERT_NOEXCEPT(   cs.front());
+    LIBCUDACXX_ASSERT_NOEXCEPT(    s.front());
+    LIBCUDACXX_ASSERT_NOEXCEPT(   cs.front());
     assert(&cs.front() == &cs[0]);
     assert(&s.front() == &s[0]);
     s.front() = typename S::value_type('z');

diff  --git a/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp b/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp
index 0a4d91da78d1..aaf8cd3c9b22 100644
--- a/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.access/index.pass.cpp
@@ -24,8 +24,8 @@ TEST_CONSTEXPR_CXX20 bool test() {
     const S& cs = s;
     ASSERT_SAME_TYPE(decltype( s[0]), typename S::reference);
     ASSERT_SAME_TYPE(decltype(cs[0]), typename S::const_reference);
-    LIBCPP_ASSERT_NOEXCEPT(    s[0]);
-    LIBCPP_ASSERT_NOEXCEPT(   cs[0]);
+    LIBCUDACXX_ASSERT_NOEXCEPT(    s[0]);
+    LIBCUDACXX_ASSERT_NOEXCEPT(   cs[0]);
     for (S::size_type i = 0; i < cs.size(); ++i)
     {
         assert(s[i] == static_cast<char>('0' + i));
@@ -42,8 +42,8 @@ TEST_CONSTEXPR_CXX20 bool test() {
     const S& cs = s;
     ASSERT_SAME_TYPE(decltype( s[0]), typename S::reference);
     ASSERT_SAME_TYPE(decltype(cs[0]), typename S::const_reference);
-    LIBCPP_ASSERT_NOEXCEPT(    s[0]);
-    LIBCPP_ASSERT_NOEXCEPT(   cs[0]);
+    LIBCUDACXX_ASSERT_NOEXCEPT(    s[0]);
+    LIBCUDACXX_ASSERT_NOEXCEPT(   cs[0]);
     for (S::size_type i = 0; i < cs.size(); ++i)
     {
         assert(s[i] == static_cast<char>('0' + i));

diff  --git a/libcxx/test/std/strings/basic.string/string.capacity/reserve.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/reserve.pass.cpp
index a5ef26578869..4a4085488fba 100644
--- a/libcxx/test/std/strings/basic.string/string.capacity/reserve.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.capacity/reserve.pass.cpp
@@ -10,7 +10,7 @@
 
 // void reserve(); // Deprecated in C++20.
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <string>
 #include <stdexcept>
@@ -31,7 +31,7 @@ test(typename S::size_type min_cap, typename S::size_type erased_index)
     typename S::size_type old_cap = s.capacity();
     S s0 = s;
     s.reserve();
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == s0);
     assert(s.capacity() <= old_cap);
     assert(s.capacity() >= s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp
index 7df6bb2847a6..85fa3d153b1d 100644
--- a/libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.capacity/reserve_size.pass.cpp
@@ -37,7 +37,7 @@ test(typename S::size_type min_cap, typename S::size_type erased_index, typename
     if (res_arg <= s.max_size())
     {
         s.reserve(res_arg);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == s0);
         assert(s.capacity() >= res_arg);
         assert(s.capacity() >= s.size());
@@ -51,7 +51,7 @@ test(typename S::size_type min_cap, typename S::size_type erased_index, typename
         try
         {
             s.reserve(res_arg);
-            LIBCPP_ASSERT(s.__invariants());
+            LIBCUDACXX_ASSERT(s.__invariants());
             assert(false);
         }
         catch (std::length_error&)

diff  --git a/libcxx/test/std/strings/basic.string/string.capacity/resize_and_overwrite.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/resize_and_overwrite.pass.cpp
index b22a9036e70f..9d86d9ee771e 100644
--- a/libcxx/test/std/strings/basic.string/string.capacity/resize_and_overwrite.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.capacity/resize_and_overwrite.pass.cpp
@@ -27,8 +27,8 @@ constexpr void test_appending(size_t k, size_t N, size_t new_capacity) {
   auto s = S(k, 'a');
   s.resize_and_overwrite(new_capacity, [&](auto* p, auto n) {
     assert(n == new_capacity);
-    LIBCPP_ASSERT(s.size() == new_capacity);
-    LIBCPP_ASSERT(s.begin().base() == p);
+    LIBCUDACXX_ASSERT(s.size() == new_capacity);
+    LIBCUDACXX_ASSERT(s.begin().base() == p);
     assert(std::all_of(p, p + k, [](const auto ch) { return ch == 'a'; }));
     std::fill(p + k, p + n, 'b');
     p[n] = 'c'; // will be overwritten
@@ -45,8 +45,8 @@ constexpr void test_truncating(size_t o, size_t N) {
   auto s = S(o, 'a');
   s.resize_and_overwrite(N, [&](auto* p, auto n) {
     assert(n == N);
-    LIBCPP_ASSERT(s.size() == n);
-    LIBCPP_ASSERT(s.begin().base() == p);
+    LIBCUDACXX_ASSERT(s.size() == n);
+    LIBCUDACXX_ASSERT(s.begin().base() == p);
     assert(std::all_of(p, p + n, [](auto ch) { return ch == 'a'; }));
     p[n - 1] = 'b';
     p[n] = 'c'; // will be overwritten

diff  --git a/libcxx/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp
index 7e898f12034f..a850b40f93c7 100644
--- a/libcxx/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.capacity/resize_size.pass.cpp
@@ -24,7 +24,7 @@ test(S s, typename S::size_type n, S expected)
     if (n <= s.max_size())
     {
         s.resize(n);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp
index 95317aa53ad3..385234ba86f2 100644
--- a/libcxx/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.capacity/resize_size_char.pass.cpp
@@ -24,7 +24,7 @@ test(S s, typename S::size_type n, typename S::value_type c, S expected)
     if (n <= s.max_size())
     {
         s.resize(n, c);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp b/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp
index 1e85b3d3b51f..038f06f90d73 100644
--- a/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.capacity/shrink_to_fit.pass.cpp
@@ -23,7 +23,7 @@ test(S s)
     typename S::size_type old_cap = s.capacity();
     S s0 = s;
     s.shrink_to_fit();
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == s0);
     assert(s.capacity() <= old_cap);
     assert(s.capacity() >= s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp
index 0021684bf34b..bfa9f854eef5 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/T_size_size.pass.cpp
@@ -34,7 +34,7 @@ test(SV sv, std::size_t pos, std::size_t n)
     if (pos <= sv.size())
     {
         S s2(sv, static_cast<Size>(pos), static_cast<Size>(n));
-        LIBCPP_ASSERT(s2.__invariants());
+        LIBCUDACXX_ASSERT(s2.__invariants());
         assert(pos <= sv.size());
         std::size_t rlen = std::min(sv.size() - pos, n);
         assert(s2.size() == rlen);
@@ -67,7 +67,7 @@ test(SV sv, std::size_t pos, std::size_t n, const typename S::allocator_type& a)
     if (pos <= sv.size())
     {
         S s2(sv, static_cast<Size>(pos), static_cast<Size>(n), a);
-        LIBCPP_ASSERT(s2.__invariants());
+        LIBCUDACXX_ASSERT(s2.__invariants());
         assert(pos <= sv.size());
         std::size_t rlen = std::min(sv.size() - pos, n);
         assert(s2.size() == rlen);

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp
index add77f8e5732..3662721ca60b 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/alloc.pass.cpp
@@ -28,7 +28,7 @@ test()
     static_assert((noexcept(S()) == noexcept(typename S::allocator_type())), "" );
 #endif
     S s;
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s.data());
     assert(s.size() == 0);
     assert(s.capacity() >= s.size());
@@ -41,7 +41,7 @@ test()
     static_assert((noexcept(S(typename S::allocator_type())) == std::is_nothrow_copy_constructible<typename S::allocator_type>::value), "" );
 #endif
     S s(typename S::allocator_type(5));
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s.data());
     assert(s.size() == 0);
     assert(s.capacity() >= s.size());
@@ -62,7 +62,7 @@ test2()
     static_assert((noexcept(S()) == noexcept(typename S::allocator_type())), "" );
 #endif
     S s;
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s.data());
     assert(s.size() == 0);
     assert(s.capacity() >= s.size());
@@ -75,7 +75,7 @@ test2()
     static_assert((noexcept(S(typename S::allocator_type())) == std::is_nothrow_copy_constructible<typename S::allocator_type>::value), "" );
 #endif
     S s(typename S::allocator_type{});
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s.data());
     assert(s.size() == 0);
     assert(s.capacity() >= s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp
index ee516df15c9f..61e9f7da10ad 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/char_assignment.pass.cpp
@@ -22,7 +22,7 @@ test(S s1, typename S::value_type s2)
 {
     typedef typename S::traits_type T;
     s1 = s2;
-    LIBCPP_ASSERT(s1.__invariants());
+    LIBCUDACXX_ASSERT(s1.__invariants());
     assert(s1.size() == 1);
     assert(T::eq(s1[0], s2));
     assert(s1.capacity() >= s1.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/copy.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/copy.pass.cpp
index 6ce2b12127e0..9577d5f59d78 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/copy.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/copy.pass.cpp
@@ -22,7 +22,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s1)
 {
     S s2 = s1;
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2 == s1);
     assert(s2.capacity() >= s2.size());
     assert(s2.get_allocator() == s1.get_allocator());

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
index 9d6c162399f2..626151b66b02 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/copy_alloc.pass.cpp
@@ -82,7 +82,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s1, const typename S::allocator_type& a)
 {
     S s2(s1, a);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2 == s1);
     assert(s2.capacity() >= s2.size());
     assert(s2.get_allocator() == a);

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp
index 455655b4910c..8470829efc7a 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/copy_assignment.pass.cpp
@@ -22,7 +22,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s1, const S& s2)
 {
     s1 = s2;
-    LIBCPP_ASSERT(s1.__invariants());
+    LIBCUDACXX_ASSERT(s1.__invariants());
     assert(s1 == s2);
     assert(s1.capacity() >= s1.size());
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/default.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/default.pass.cpp
index beb16c099f02..f43f14dfa029 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/default.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/default.pass.cpp
@@ -18,10 +18,10 @@
 
 #if TEST_STD_VER >= 11
 // Test the noexcept specification, which is a conforming extension
-LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<std::string>::value, "");
-LIBCPP_STATIC_ASSERT(std::is_nothrow_default_constructible<
+LIBCUDACXX_STATIC_ASSERT(std::is_nothrow_default_constructible<std::string>::value, "");
+LIBCUDACXX_STATIC_ASSERT(std::is_nothrow_default_constructible<
                      std::basic_string<char, std::char_traits<char>, test_allocator<char>>>::value, "");
-LIBCPP_STATIC_ASSERT(!std::is_nothrow_default_constructible<
+LIBCUDACXX_STATIC_ASSERT(!std::is_nothrow_default_constructible<
                      std::basic_string<char, std::char_traits<char>, limited_allocator<char, 10>>>::value, "");
 #endif
 

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/dtor.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/dtor.pass.cpp
index 0464bc3890a6..e37cbc28310e 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/dtor.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/dtor.pass.cpp
@@ -37,7 +37,7 @@ std::wstring ws;
 static_assert(std::is_nothrow_destructible<std::string>::value, "");
 static_assert(std::is_nothrow_destructible<
                 std::basic_string<char, std::char_traits<char>, test_allocator<char>>>::value, "");
-LIBCPP_STATIC_ASSERT(!std::is_nothrow_destructible<
+LIBCUDACXX_STATIC_ASSERT(!std::is_nothrow_destructible<
                      std::basic_string<char, std::char_traits<char>, throwing_alloc<char>>>::value, "");
 
 TEST_CONSTEXPR_CXX20 bool test() {

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp
index 273501880c49..6975b1e20652 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/iter_alloc.pass.cpp
@@ -31,7 +31,7 @@ test(It first, It last)
     typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
     typedef typename S::allocator_type A;
     S s2(first, last);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == static_cast<std::size_t>(std::distance(first, last)));
     unsigned i = 0;
     for (It it = first; it != last;) {
@@ -50,7 +50,7 @@ test(It first, It last, const A& a)
     typedef typename std::iterator_traits<It>::value_type charT;
     typedef std::basic_string<charT, std::char_traits<charT>, A> S;
     S s2(first, last, a);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == static_cast<std::size_t>(std::distance(first, last)));
     unsigned i = 0;
     for (It it = first; it != last;) {

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/move.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/move.pass.cpp
index 336ed40ad632..d04a2f24dabb 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/move.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/move.pass.cpp
@@ -25,8 +25,8 @@ test(S s0)
 {
     S s1 = s0;
     S s2 = std::move(s0);
-    LIBCPP_ASSERT(s2.__invariants());
-    LIBCPP_ASSERT(s0.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s0.__invariants());
     assert(s2 == s1);
     assert(s2.capacity() >= s2.size());
     assert(s2.get_allocator() == s1.get_allocator());

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp
index a6cf5fb1ab4e..18e830aff6ab 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/move_alloc.pass.cpp
@@ -25,8 +25,8 @@ test(S s0, const typename S::allocator_type& a)
 {
     S s1 = s0;
     S s2(std::move(s0), a);
-    LIBCPP_ASSERT(s2.__invariants());
-    LIBCPP_ASSERT(s0.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s0.__invariants());
     assert(s2 == s1);
     assert(s2.capacity() >= s2.size());
     assert(s2.get_allocator() == a);

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp
index eff8a025847a..bc9c1a8cda29 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/move_assignment.pass.cpp
@@ -26,8 +26,8 @@ test(S s1, S s2)
 {
     S s0 = s2;
     s1 = std::move(s2);
-    LIBCPP_ASSERT(s1.__invariants());
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s1.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s1 == s0);
     assert(s1.capacity() >= s1.size());
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp
index b466eb14bd83..83001d031a04 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/pointer_alloc.pass.cpp
@@ -29,7 +29,7 @@ test(const charT* s)
     typedef typename S::allocator_type A;
     std::size_t n = T::length(s);
     S s2(s);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     assert(T::compare(s2.data(), s, n) == 0);
     assert(s2.get_allocator() == A());
@@ -44,7 +44,7 @@ test(const charT* s, const A& a)
     typedef typename S::traits_type T;
     std::size_t n = T::length(s);
     S s2(s, a);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     assert(T::compare(s2.data(), s, n) == 0);
     assert(s2.get_allocator() == a);

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp
index 5e8110bdce26..48e24b3959e5 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/pointer_assignment.pass.cpp
@@ -23,7 +23,7 @@ test(S s1, const typename S::value_type* s2)
 {
     typedef typename S::traits_type T;
     s1 = s2;
-    LIBCPP_ASSERT(s1.__invariants());
+    LIBCUDACXX_ASSERT(s1.__invariants());
     assert(s1.size() == T::length(s2));
     assert(T::compare(s1.data(), s2, s1.size()) == 0);
     assert(s1.capacity() >= s1.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp
index aaa787aad8c6..05b9ae151bef 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/pointer_size_alloc.pass.cpp
@@ -27,7 +27,7 @@ test(const charT* s, unsigned n)
     typedef typename S::traits_type T;
     typedef typename S::allocator_type A;
     S s2(s, n);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     assert(T::compare(s2.data(), s, n) == 0);
     assert(s2.get_allocator() == A());
@@ -41,7 +41,7 @@ test(const charT* s, unsigned n, const A& a)
     typedef std::basic_string<charT, std::char_traits<charT>, A> S;
     typedef typename S::traits_type T;
     S s2(s, n, a);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     assert(T::compare(s2.data(), s, n) == 0);
     assert(s2.get_allocator() == a);

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
index c53d6c8cae03..fe33a92dad31 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/size_char_alloc.pass.cpp
@@ -27,7 +27,7 @@ test(unsigned n, charT c)
     typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
     typedef typename S::allocator_type A;
     S s2(n, c);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     for (unsigned i = 0; i < n; ++i)
         assert(s2[i] == c);
@@ -41,7 +41,7 @@ test(unsigned n, charT c, const A& a)
 {
     typedef std::basic_string<charT, std::char_traits<charT>, A> S;
     S s2(n, c, a);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == n);
     for (unsigned i = 0; i < n; ++i)
         assert(s2[i] == c);
@@ -57,7 +57,7 @@ test(Tp n, Tp c)
     typedef std::basic_string<charT, std::char_traits<charT>, test_allocator<charT> > S;
     typedef typename S::allocator_type A;
     S s2(n, c);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == static_cast<std::size_t>(n));
     for (int i = 0; i < n; ++i)
         assert(s2[i] == c);
@@ -72,7 +72,7 @@ test(Tp n, Tp c, const A& a)
     typedef char charT;
     typedef std::basic_string<charT, std::char_traits<charT>, A> S;
     S s2(n, c, a);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == static_cast<std::size_t>(n));
     for (int i = 0; i < n; ++i)
         assert(s2[i] == c);

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view.pass.cpp
index 125bd40c7339..a63e78342f75 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/string_view.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/string_view.pass.cpp
@@ -33,7 +33,7 @@ test(std::basic_string_view<charT> sv)
     typedef typename S::allocator_type A;
   {
     S s2(sv);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == sv.size());
     assert(T::compare(s2.data(), sv.data(), sv.size()) == 0);
     assert(s2.get_allocator() == A());
@@ -42,7 +42,7 @@ test(std::basic_string_view<charT> sv)
   {
     S s2;
     s2 = sv;
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == sv.size());
     assert(T::compare(s2.data(), sv.data(), sv.size()) == 0);
     assert(s2.get_allocator() == A());
@@ -58,7 +58,7 @@ test(std::basic_string_view<charT> sv, const A& a)
     typedef typename S::traits_type T;
   {
     S s2(sv, a);
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == sv.size());
     assert(T::compare(s2.data(), sv.data(), sv.size()) == 0);
     assert(s2.get_allocator() == a);
@@ -67,7 +67,7 @@ test(std::basic_string_view<charT> sv, const A& a)
   {
     S s2(a);
     s2 = sv;
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s2.size() == sv.size());
     assert(T::compare(s2.data(), sv.data(), sv.size()) == 0);
     assert(s2.get_allocator() == a);

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/string_view_assignment.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/string_view_assignment.pass.cpp
index 79e680972b6a..a90d9672dacd 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/string_view_assignment.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/string_view_assignment.pass.cpp
@@ -22,7 +22,7 @@ test(S s1, SV sv)
 {
     typedef typename S::traits_type T;
     s1 = sv;
-    LIBCPP_ASSERT(s1.__invariants());
+    LIBCUDACXX_ASSERT(s1.__invariants());
     assert(s1.size() == sv.size());
     assert(T::compare(s1.data(), sv.data(), s1.size()) == 0);
     assert(s1.capacity() >= s1.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.cons/substr.pass.cpp b/libcxx/test/std/strings/basic.string/string.cons/substr.pass.cpp
index e89f6cd659b0..c9ea46233bbb 100644
--- a/libcxx/test/std/strings/basic.string/string.cons/substr.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.cons/substr.pass.cpp
@@ -37,7 +37,7 @@ test(S str, unsigned pos)
     if (pos <= str.size())
     {
         S s2(str, pos);
-        LIBCPP_ASSERT(s2.__invariants());
+        LIBCUDACXX_ASSERT(s2.__invariants());
         typename S::size_type rlen = str.size() - pos;
         assert(s2.size() == rlen);
         assert(T::compare(s2.data(), str.data() + pos, rlen) == 0);
@@ -69,7 +69,7 @@ test(S str, unsigned pos, unsigned n)
     if (pos <= str.size())
     {
         S s2(str, pos, n);
-        LIBCPP_ASSERT(s2.__invariants());
+        LIBCUDACXX_ASSERT(s2.__invariants());
         typename S::size_type rlen = std::min<typename S::size_type>(str.size() - pos, n);
         assert(s2.size() == rlen);
         assert(T::compare(s2.data(), str.data() + pos, rlen) == 0);
@@ -101,7 +101,7 @@ test(S str, unsigned pos, unsigned n, const typename S::allocator_type& a)
     if (pos <= str.size())
     {
         S s2(str, pos, n, a);
-        LIBCPP_ASSERT(s2.__invariants());
+        LIBCUDACXX_ASSERT(s2.__invariants());
         typename S::size_type rlen = std::min<typename S::size_type>(str.size() - pos, n);
         assert(s2.size() == rlen);
         assert(T::compare(s2.data(), str.data() + pos, rlen) == 0);

diff  --git a/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp b/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp
index 86796c447c1a..02b9c6b36b1b 100644
--- a/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ends_with/ends_with.ptr.pass.cpp
@@ -29,7 +29,7 @@ constexpr bool test() {
 //  S   s5  { s,     5 };
     S  sNot { "def", 3 };
 
-    LIBCPP_ASSERT_NOEXCEPT(s0.ends_with(""));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s0.ends_with(""));
 
     assert ( s0.ends_with(""));
     assert (!s0.ends_with("e"));

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp
index 465a26c7cd55..42633016066f 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/T_size_size.pass.cpp
@@ -26,7 +26,7 @@ test(S s, SV sv, typename S::size_type pos, typename S::size_type n, S expected)
     if (pos <= sv.size())
     {
         s.append(sv, pos, n);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS
@@ -52,7 +52,7 @@ test_npos(S s, SV sv, typename S::size_type pos, S expected)
     if (pos <= sv.size())
     {
         s.append(sv, pos);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp
index 4c65fd1f8982..d4ec3578ab6e 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/iterator.pass.cpp
@@ -23,7 +23,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, It first, It last, S expected)
 {
     s.append(first, last);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -45,7 +45,7 @@ test_exceptions(S s, It first, It last)
 
     // Part of "no effects" is that iterators and pointers
     // into the string must not have been invalidated.
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == original);
     assert(s.begin() == begin);
     assert(s.end() == end);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp
index 294645f76608..0ea10dcbba4c 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer.pass.cpp
@@ -22,7 +22,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, const typename S::value_type* str, S expected)
 {
     s.append(str);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp
index dd15ca2d0cbb..acdcfa3bd898 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/pointer_size.pass.cpp
@@ -23,7 +23,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, const typename S::value_type* str, typename S::size_type n, S expected)
 {
     s.append(str, n);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
index 8a8c8ff6049e..eb2e753fcd6b 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/push_back.pass.cpp
@@ -27,7 +27,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, typename S::value_type c, S expected)
 {
     s.push_back(c);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp
index a366bebe1cc1..b5bbfe6435a0 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/size_char.pass.cpp
@@ -22,7 +22,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, typename S::size_type n, typename S::value_type c, S expected)
 {
     s.append(n, c);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp
index 49ef72fce718..9ee83ed18594 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string.pass.cpp
@@ -22,7 +22,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, S str, S expected)
 {
     s.append(str);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp
index 7dc0a327053e..cd6286418b1d 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_size_size.pass.cpp
@@ -26,7 +26,7 @@ test(S s, S str, typename S::size_type pos, typename S::size_type n, S expected)
     if (pos <= str.size())
     {
         s.append(str, pos, n);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS
@@ -52,7 +52,7 @@ test_npos(S s, S str, typename S::size_type pos, S expected)
     if (pos <= str.size())
     {
         s.append(str, pos);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_view.pass.cpp
index 55f8e5d8584d..6059aadb1e87 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_view.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_append/string_view.pass.cpp
@@ -23,7 +23,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, SV sv, S expected)
 {
     s.append(sv);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp
index 00a085ffba93..04a9983d9c1a 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/T_size_size.pass.cpp
@@ -25,7 +25,7 @@ test(S s, SV sv, typename S::size_type pos, typename S::size_type n, S expected)
     if (pos <= sv.size())
     {
         s.assign(sv, pos, n);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS
@@ -51,7 +51,7 @@ test_npos(S s, SV sv, typename S::size_type pos, S expected)
     if (pos <= sv.size())
     {
         s.assign(sv, pos);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp
index 0a68b2f4b4c8..802acaa9da31 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/iterator.pass.cpp
@@ -23,7 +23,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, It first, It last, S expected)
 {
     s.assign(first, last);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -45,7 +45,7 @@ test_exceptions(S s, It first, It last)
 
     // Part of "no effects" is that iterators and pointers
     // into the string must not have been invalidated.
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == original);
     assert(s.begin() == begin);
     assert(s.end() == end);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp
index b55f577485f5..4498a8a7b7af 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer.pass.cpp
@@ -22,7 +22,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, const typename S::value_type* str, S expected)
 {
     s.assign(str);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp
index 8b4ec9ce1675..2dd9b3430d0a 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/pointer_size.pass.cpp
@@ -23,7 +23,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, const typename S::value_type* str, typename S::size_type n, S expected)
 {
     s.assign(str, n);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp
index ecc1b83ce89f..599efb459255 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/rv_string.pass.cpp
@@ -23,7 +23,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, S str, S expected)
 {
     s.assign(std::move(str));
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp
index 0da607db8545..06f7a6bdbbc0 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/size_char.pass.cpp
@@ -22,7 +22,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, typename S::size_type n, typename S::value_type c, S expected)
 {
     s.assign(n, c);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp
index c0822d403bc6..65a6edcef85c 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string.pass.cpp
@@ -23,7 +23,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, S str, S expected)
 {
     s.assign(str);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -32,7 +32,7 @@ TEST_CONSTEXPR_CXX20 void
 testAlloc(S s, S str, const typename S::allocator_type& a)
 {
     s.assign(str);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == str);
     assert(s.get_allocator() == a);
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp
index de20c6e56641..0e0fcfe820b2 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_size_size.pass.cpp
@@ -26,7 +26,7 @@ test(S s, S str, typename S::size_type pos, typename S::size_type n, S expected)
     if (pos <= str.size())
     {
         s.assign(str, pos, n);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS
@@ -52,7 +52,7 @@ test_npos(S s, S str, typename S::size_type pos, S expected)
     if (pos <= str.size())
     {
         s.assign(str, pos);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_view.pass.cpp
index 07cd7e4700e3..54a07134be5e 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_view.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_assign/string_view.pass.cpp
@@ -24,7 +24,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, SV sv, S expected)
 {
     s.assign(sv);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 
@@ -33,7 +33,7 @@ TEST_CONSTEXPR_CXX20 void
 testAlloc(S s, SV sv, const typename S::allocator_type& a)
 {
     s.assign(sv);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == sv);
     assert(s.get_allocator() == a);
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp
index 08eddaeea4b9..4cd270d7ba5e 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter.pass.cpp
@@ -22,7 +22,7 @@ test(S s, typename S::
diff erence_type pos, S expected)
 {
     typename S::const_iterator p = s.begin() + pos;
     typename S::iterator i = s.erase(p);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s[s.size()] == typename S::value_type());
     assert(s == expected);
     assert(i - s.begin() == pos);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp
index 6aa08304b064..e92e3df8ef0c 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/iter_iter.pass.cpp
@@ -23,7 +23,7 @@ test(S s, typename S::
diff erence_type pos, typename S::
diff erence_type n, S expe
     typename S::const_iterator first = s.cbegin() + pos;
     typename S::const_iterator last = s.cbegin() + pos + n;
     typename S::iterator i = s.erase(first, last);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s[s.size()] == typename S::value_type());
     assert(s == expected);
     assert(i - s.begin() == pos);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp
index 7379ab9194f2..7ec1d3dff37b 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/pop_back.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, S expected)
 {
     s.pop_back();
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s[s.size()] == typename S::value_type());
     assert(s == expected);
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp
index e673e74b27ed..f532eb163c6b 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_erase/size_size.pass.cpp
@@ -27,7 +27,7 @@ test(S s, typename S::size_type pos, typename S::size_type n, S expected)
     if (pos <= old_size)
     {
         s.erase(pos, n);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s[s.size()] == typename S::value_type());
         assert(s == expected);
     }
@@ -57,7 +57,7 @@ test(S s, typename S::size_type pos, S expected)
     if (pos <= old_size)
     {
         s.erase(pos);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s[s.size()] == typename S::value_type());
         assert(s == expected);
     }
@@ -83,7 +83,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, S expected)
 {
     s.erase();
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s[s.size()] == typename S::value_type());
     assert(s == expected);
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp
index c360119e31a4..d808814f785a 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_char.pass.cpp
@@ -24,7 +24,7 @@ test(S& s, typename S::const_iterator p, typename S::value_type c, S expected)
     bool sufficient_cap = s.size() < s.capacity();
     typename S::
diff erence_type pos = p - s.begin();
     typename S::iterator i = s.insert(p, c);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
     assert(i - s.begin() == pos);
     assert(*i == c);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp
index 07c509485547..456efaf4825b 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_iter_iter.pass.cpp
@@ -24,7 +24,7 @@ test(S s, typename S::
diff erence_type pos, It first, It last, S expected)
 {
     typename S::const_iterator p = s.cbegin() + pos;
     typename S::iterator i = s.insert(p, first, last);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(i - s.begin() == pos);
     assert(s == expected);
 }
@@ -49,7 +49,7 @@ test_exceptions(S s, typename S::
diff erence_type pos, It first, It last)
 
     // Part of "no effects" is that iterators and pointers
     // into the string must not have been invalidated.
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == original);
     assert(s.begin() == begin);
     assert(s.end() == end);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp
index d0eec148c0ab..f0130278fac8 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/iter_size_char.pass.cpp
@@ -23,7 +23,7 @@ test(S s, typename S::
diff erence_type pos, typename S::size_type n,
 {
     typename S::const_iterator p = s.cbegin() + pos;
     typename S::iterator i = s.insert(p, n, c);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(i - s.begin() == pos);
     assert(s == expected);
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp
index 36e1261784b9..ed672e3649e5 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_T_size_size.pass.cpp
@@ -31,7 +31,7 @@ test(S s, typename S::size_type pos1, SV sv, typename S::size_type pos2,
     if (pos1 <= old_size && pos2 <= sv.size())
     {
         s.insert(pos1, sv, pos2, n);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS
@@ -61,7 +61,7 @@ test_npos(S s, typename S::size_type pos1, SV sv, typename S::size_type pos2, S
     if (pos1 <= old_size && pos2 <= sv.size())
     {
         s.insert(pos1, sv, pos2);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp
index aeb432f25d22..7a7aef754cc6 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer.pass.cpp
@@ -27,7 +27,7 @@ test(S s, typename S::size_type pos, const typename S::value_type* str, S expect
     if (pos <= old_size)
     {
         s.insert(pos, str);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp
index 1e0cdf5d501e..15e99c11ec48 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_pointer_size.pass.cpp
@@ -28,7 +28,7 @@ test(S s, typename S::size_type pos, const typename S::value_type* str,
     if (pos <= old_size)
     {
         s.insert(pos, str, n);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp
index e7429702ec07..4c9d7b0d1c6e 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_size_char.pass.cpp
@@ -28,7 +28,7 @@ test(S s, typename S::size_type pos, typename S::size_type n,
     if (pos <= old_size)
     {
         s.insert(pos, n, str);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp
index db95d27d7aa4..d96f346322b3 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string.pass.cpp
@@ -27,7 +27,7 @@ test(S s, typename S::size_type pos, S str, S expected)
     if (pos <= old_size)
     {
         s.insert(pos, str);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp
index 857d8c66e976..b588892e4eae 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/size_string_size_size.pass.cpp
@@ -30,7 +30,7 @@ test(S s, typename S::size_type pos1, S str, typename S::size_type pos2,
     if (pos1 <= old_size && pos2 <= str.size())
     {
         s.insert(pos1, str, pos2, n);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS
@@ -59,7 +59,7 @@ test_npos(S s, typename S::size_type pos1, S str, typename S::size_type pos2, S
     if (pos1 <= old_size && pos2 <= str.size())
     {
         s.insert(pos1, str, pos2);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp
index 3094c7635a07..8da18ca83a28 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_insert/string_view.pass.cpp
@@ -27,7 +27,7 @@ test(S s, typename S::size_type pos, SV sv, S expected)
     if (pos <= old_size)
     {
         s.insert(pos, sv);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
     }
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp
index 129bca4ce649..a41e767ff889 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/char.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, typename S::value_type str, S expected)
 {
     s += str;
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp
index 07ba259ba378..0b41964fb83a 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/pointer.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, const typename S::value_type* str, S expected)
 {
     s += str;
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp
index 8ad98d48f03d..111802f452bf 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_op_plus_equal/string.pass.cpp
@@ -22,7 +22,7 @@ TEST_CONSTEXPR_CXX20 void
 test(S s, S str, S expected)
 {
     s += str;
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp
index 5a1282cb0c09..7795fc56908f 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_iter_iter.pass.cpp
@@ -29,7 +29,7 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, It f, It l, S ex
     typename S::const_iterator last = s.begin() + pos1 + n1;
     typename S::size_type xlen = last - first;
     s.replace(first, last, f, l);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
     typename S::size_type rlen = std::distance(f, l);
     assert(s.size() == old_size - xlen + rlen);
@@ -56,7 +56,7 @@ test_exceptions(S s, typename S::size_type pos1, typename S::size_type n1, It f,
 
     // Part of "no effects" is that iterators and pointers
     // into the string must not have been invalidated.
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == original);
     assert(s.begin() == begin);
     assert(s.end() == end);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp
index b60cb343b720..ba3cdaf65b6b 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer.pass.cpp
@@ -29,7 +29,7 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, const typename S
     typename S::const_iterator last = s.begin() + pos1 + n1;
     typename S::size_type xlen = last - first;
     s.replace(first, last, str);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
     typename S::size_type rlen = S::traits_type::length(str);
     assert(s.size() == old_size - xlen + rlen);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp
index 81d7d8ba8db6..f28ab9a50cc1 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_pointer_size.pass.cpp
@@ -28,7 +28,7 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, const typename S
     typename S::const_iterator last = s.begin() + pos1 + n1;
     typename S::size_type xlen = last - first;
     s.replace(first, last, str, n2);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
     typename S::size_type rlen = n2;
     assert(s.size() == old_size - xlen + rlen);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp
index 580ea289e347..7c2da01f081c 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_size_char.pass.cpp
@@ -28,7 +28,7 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, typename S::size
     typename S::const_iterator last = s.begin() + pos1 + n1;
     typename S::size_type xlen = last - first;
     s.replace(first, last, n2, c);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
     typename S::size_type rlen = n2;
     assert(s.size() == old_size - xlen + rlen);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp
index 6c1afe64c713..e6ce416956bf 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string.pass.cpp
@@ -27,7 +27,7 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, S str, S expecte
     typename S::const_iterator last = s.begin() + pos1 + n1;
     typename S::size_type xlen = last - first;
     s.replace(first, last, str);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
     typename S::size_type rlen = str.size();
     assert(s.size() == old_size - xlen + rlen);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string_view.pass.cpp
index 2bbfc1cc4b14..4be9172055db 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string_view.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/iter_iter_string_view.pass.cpp
@@ -27,7 +27,7 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, SV sv, S expecte
     typename S::const_iterator last = s.begin() + pos1 + n1;
     typename S::size_type xlen = last - first;
     s.replace(first, last, sv);
-    LIBCPP_ASSERT(s.__invariants());
+    LIBCUDACXX_ASSERT(s.__invariants());
     assert(s == expected);
     typename S::size_type rlen = sv.size();
     assert(s.size() == old_size - xlen + rlen);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp
index b3c58b9de641..45d231c1865d 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_T_size_size.pass.cpp
@@ -40,7 +40,7 @@ test(S s, typename S::size_type pos1, typename S::size_type n1,
     if (pos1 <= old_size && pos2 <= sv.size())
     {
         s.replace(pos1, n1, sv, pos2, n2);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
         SizeT xlen = std::min<SizeT>(n1, old_size - pos1);
         SizeT rlen = std::min<SizeT>(n2, sv.size() - pos2);
@@ -76,7 +76,7 @@ test_npos(S s, typename S::size_type pos1, typename S::size_type n1,
     if (pos1 <= old_size && pos2 <= sv.size())
     {
         s.replace(pos1, n1, sv, pos2);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
         SizeT xlen = std::min<SizeT>(n1, old_size - pos1);
         SizeT rlen = std::min<SizeT>(S::npos, sv.size() - pos2);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp
index 672a984edf10..6c3ca42d19a0 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer.pass.cpp
@@ -29,7 +29,7 @@ test(S s, typename S::size_type pos, typename S::size_type n1,
     if (pos <= old_size)
     {
         s.replace(pos, n1, str);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos);
         typename S::size_type rlen = S::traits_type::length(str);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp
index 352ce5763433..aa04134fa4fb 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_pointer_size.pass.cpp
@@ -30,7 +30,7 @@ test(S s, typename S::size_type pos, typename S::size_type n1,
     if (pos <= old_size)
     {
         s.replace(pos, n1, str, n2);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos);
         typename S::size_type rlen = n2;

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp
index f9257cc6a444..c93d3098b47f 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_size_char.pass.cpp
@@ -30,7 +30,7 @@ test(S s, typename S::size_type pos, typename S::size_type n1,
     if (pos <= old_size)
     {
         s.replace(pos, n1, n2, c);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos);
         typename S::size_type rlen = n2;

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp
index 0fd6c56ab8f8..8b540493b8b8 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string.pass.cpp
@@ -28,7 +28,7 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, S str, S expecte
     if (pos1 <= old_size)
     {
         s.replace(pos1, n1, str);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos1);
         typename S::size_type rlen = str.size();

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp
index 2c9a488e318e..e9b3e12f8176 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_size_size.pass.cpp
@@ -32,7 +32,7 @@ test(S s, typename S::size_type pos1, typename S::size_type n1,
     if (pos1 <= old_size && pos2 <= str.size())
     {
         s.replace(pos1, n1, str, pos2, n2);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos1);
         typename S::size_type rlen = std::min(n2, str.size() - pos2);
@@ -66,7 +66,7 @@ test_npos(S s, typename S::size_type pos1, typename S::size_type n1,
     if (pos1 <= old_size && pos2 <= str.size())
     {
         s.replace(pos1, n1, str, pos2);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos1);
         typename S::size_type rlen = std::min(S::npos, str.size() - pos2);

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp
index fb22f84fa686..c878d4e043ef 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_replace/size_size_string_view.pass.cpp
@@ -28,7 +28,7 @@ test(S s, typename S::size_type pos1, typename S::size_type n1, SV sv, S expecte
     if (pos1 <= old_size)
     {
         s.replace(pos1, n1, sv);
-        LIBCPP_ASSERT(s.__invariants());
+        LIBCUDACXX_ASSERT(s.__invariants());
         assert(s == expected);
         typename S::size_type xlen = std::min(n1, old_size - pos1);
         typename S::size_type rlen = sv.size();

diff  --git a/libcxx/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp b/libcxx/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp
index c1fb5b6d17fd..05e9b168320c 100644
--- a/libcxx/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.modifiers/string_swap/swap.pass.cpp
@@ -25,8 +25,8 @@ test(S s1, S s2)
     S s1_ = s1;
     S s2_ = s2;
     s1.swap(s2);
-    LIBCPP_ASSERT(s1.__invariants());
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s1.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s1 == s2_);
     assert(s2 == s1_);
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp
index 0425cd5b468c..997df2d5c920 100644
--- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap.pass.cpp
@@ -27,8 +27,8 @@ test(S s1, S s2)
     S s1_ = s1;
     S s2_ = s2;
     swap(s1, s2);
-    LIBCPP_ASSERT(s1.__invariants());
-    LIBCPP_ASSERT(s2.__invariants());
+    LIBCUDACXX_ASSERT(s1.__invariants());
+    LIBCUDACXX_ASSERT(s2.__invariants());
     assert(s1 == s2_);
     assert(s2 == s1_);
 }

diff  --git a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp
index de820028e260..99e5320efb2e 100644
--- a/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.nonmembers/string.special/swap_noexcept.pass.cpp
@@ -59,12 +59,12 @@ int main(int, char**)
         typedef std::string C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     {
         typedef std::basic_string<char, std::char_traits<char>, test_allocator<char>> C;
         static_assert(noexcept(swap(std::declval<C&>(), std::declval<C&>())), "");
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
     {
         typedef std::basic_string<char, std::char_traits<char>, some_alloc<char>> C;
 #if TEST_STD_VER >= 14

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp
index 0863b4b15099..9c4ed9a39fdc 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/pointer.pass.cpp
@@ -29,7 +29,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, int x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.compare(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.compare(str));
     assert(sign(s.compare(str)) == sign(x));
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp
index d5f75d3c74cd..c3ac144d4ae1 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string.pass.cpp
@@ -29,7 +29,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, int x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.compare(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.compare(str));
     assert(sign(s.compare(str)) == sign(x));
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp
index 72c0203a3ca2..c986419cfbed 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_compare/string_view.pass.cpp
@@ -29,7 +29,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, int x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.compare(sv));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.compare(sv));
     assert(sign(s.compare(sv)) == sign(x));
 }
 

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp
index a2c42930175c..ec310ca7c61a 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/char_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(c, pos));
     assert(s.find_first_not_of(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -31,7 +31,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(c));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(c));
     assert(s.find_first_not_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp
index 3fa13ef09e5e..f894c288b788 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos));
     assert(s.find_first_not_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp
index cdd22c95c3ea..456722425d34 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/pointer_size_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos, n));
     assert(s.find_first_not_of(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp
index 65179f6f448a..8880b3db307d 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos));
     assert(s.find_first_not_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -30,7 +30,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(str));
     assert(s.find_first_not_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp
index ce5f765533c7..720d3fedb23c 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.not.of/string_view_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(sv, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(sv, pos));
     assert(s.find_first_not_of(sv, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -30,7 +30,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(sv));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(sv));
     assert(s.find_first_not_of(sv) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp
index c1e81318d392..7a62937f888b 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/char_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(c, pos));
     assert(s.find_first_of(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -31,7 +31,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(c));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(c));
     assert(s.find_first_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp
index aff18ad8fe9f..855666b35c6f 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(str, pos));
     assert(s.find_first_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -31,7 +31,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(str));
     assert(s.find_first_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp
index 816268d357ca..890bc48f44eb 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/pointer_size_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(str, pos, n));
     assert(s.find_first_of(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp
index 3c5511ba8595..65f7c7c3b791 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(str, pos));
     assert(s.find_first_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -30,7 +30,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(str));
     assert(s.find_first_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp
index 50c6f7373f22..4c1b5be9c019 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.first.of/string_view_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(sv, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(sv, pos));
     assert(s.find_first_of(sv, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -30,7 +30,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(sv));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(sv));
     assert(s.find_first_of(sv) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp
index 8cd63887b856..ff8c7762c293 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/char_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(c, pos));
     assert(s.find_last_not_of(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -31,7 +31,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(c));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(c));
     assert(s.find_last_not_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp
index 0f4f75ef47a8..77bb3adbc402 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos));
     assert(s.find_last_not_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -31,7 +31,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(str));
     assert(s.find_last_not_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp
index eb3d825c06db..41d24ae9423e 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/pointer_size_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos, n));
     assert(s.find_last_not_of(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp
index 015f4036c618..07377e105ec2 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos));
     assert(s.find_last_not_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -30,7 +30,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(str));
     assert(s.find_last_not_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
index 07ab842b8625..cbccf816abbf 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.not.of/string_view_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(sv, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(sv, pos));
     assert(s.find_last_not_of(sv, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -30,7 +30,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(sv));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(sv));
     assert(s.find_last_not_of(sv) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp
index ee7283311dff..29bc94ad573c 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/char_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(c, pos));
     assert(s.find_last_of(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -31,7 +31,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(c));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(c));
     assert(s.find_last_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp
index 3a09beb719b5..dcc60817496d 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(str, pos));
     assert(s.find_last_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -31,7 +31,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(str));
     assert(s.find_last_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp
index 5ab9ed57ccd0..34f8ee3c4935 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/pointer_size_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(str, pos, n));
     assert(s.find_last_of(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp
index 848b796125b2..6706123ca5a5 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(str, pos));
     assert(s.find_last_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -30,7 +30,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(str));
     assert(s.find_last_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp
index 24d85bc072e2..6ca496ed8077 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find.last.of/string_view_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(sv, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(sv, pos));
     assert(s.find_last_of(sv, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -30,7 +30,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(sv));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(sv));
     assert(s.find_last_of(sv) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp
index d7a0a9a8f951..358baaf782ab 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/char_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(c, pos));
     assert(s.find(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x + 1 <= s.size());
@@ -31,7 +31,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(c));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(c));
     assert(s.find(c) == x);
     if (x != S::npos)
         assert(0 <= x && x + 1 <= s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp
index ecfb54a8fa6d..e55dbe314e17 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(str, pos));
     assert(s.find(str, pos) == x);
     if (x != S::npos)
     {
@@ -34,7 +34,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(str));
     assert(s.find(str) == x);
     if (x != S::npos)
     {

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp
index 98b09ff6d895..a0aecbc32906 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/pointer_size_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(str, pos, n));
     assert(s.find(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x + n <= s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp
index 5dd223ce4219..3aa645e74184 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(str, pos));
     assert(s.find(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x + str.size() <= s.size());
@@ -30,7 +30,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(str));
     assert(s.find(str) == x);
     if (x != S::npos)
         assert(0 <= x && x + str.size() <= s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp
index a32a1568bc0e..13531baa336c 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_find/string_view_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(sv, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(sv, pos));
     assert(s.find(sv, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x + sv.size() <= s.size());
@@ -30,7 +30,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(sv));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(sv));
     assert(s.find(sv) == x);
     if (x != S::npos)
         assert(0 <= x && x + sv.size() <= s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp
index b83fab0a1661..3dcb6385e04a 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/char_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(c, pos));
     assert(s.rfind(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x + 1 <= s.size());
@@ -31,7 +31,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(c));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(c));
     assert(s.rfind(c) == x);
     if (x != S::npos)
         assert(x + 1 <= s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp
index e44e02ed98a2..9732ac52a715 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(str, pos));
     assert(s.rfind(str, pos) == x);
     if (x != S::npos)
     {
@@ -34,7 +34,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(str));
     assert(s.rfind(str) == x);
     if (x != S::npos)
     {

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp
index 1e40fbc943ae..7a718a1e1993 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/pointer_size_size.pass.cpp
@@ -21,7 +21,7 @@ TEST_CONSTEXPR_CXX20 void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
       typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(str, pos, n));
     assert(s.rfind(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x + n <= s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp
index 8337ebe82e62..d7bdc673f122 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(str, pos));
     assert(s.rfind(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x + str.size() <= s.size());
@@ -30,7 +30,7 @@ template <class S>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, const S& str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(str));
     assert(s.rfind(str) == x);
     if (x != S::npos)
         assert(0 <= x && x + str.size() <= s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp
index bbb5e292d89c..094f8eeca166 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_rfind/string_view_size.pass.cpp
@@ -20,7 +20,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(sv, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(sv, pos));
     assert(s.rfind(sv, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x + sv.size() <= s.size());
@@ -30,7 +30,7 @@ template <class S, class SV>
 TEST_CONSTEXPR_CXX20 void
 test(const S& s, SV sv, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(sv));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(sv));
     assert(s.rfind(sv) == x);
     if (x != S::npos)
         assert(0 <= x && x + sv.size() <= s.size());

diff  --git a/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp b/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
index 4ae469d597a0..aaefe61d1b46 100644
--- a/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.ops/string_substr/substr.pass.cpp
@@ -25,7 +25,7 @@ test(const S& s, typename S::size_type pos, typename S::size_type n)
     if (pos <= s.size())
     {
         S str = s.substr(pos, n);
-        LIBCPP_ASSERT(str.__invariants());
+        LIBCUDACXX_ASSERT(str.__invariants());
         assert(pos <= s.size());
         typename S::size_type rlen = std::min(n, s.size() - pos);
         assert(str.size() == rlen);

diff  --git a/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.ptr.pass.cpp b/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.ptr.pass.cpp
index 50320355dd25..ae18726f90fe 100644
--- a/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.ptr.pass.cpp
+++ b/libcxx/test/std/strings/basic.string/string.starts_with/starts_with.ptr.pass.cpp
@@ -28,7 +28,7 @@ constexpr bool test() {
 //     S  s5 { s, 5 };
     S  sNot {"def", 3 };
 
-    LIBCPP_ASSERT_NOEXCEPT(s0.starts_with(""));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s0.starts_with(""));
 
     assert ( s0.starts_with(""));
     assert (!s0.starts_with("a"));

diff  --git a/libcxx/test/std/strings/string.view/range_concept_conformance.compile.pass.cpp b/libcxx/test/std/strings/string.view/range_concept_conformance.compile.pass.cpp
index 6cf8516c5f16..673219ae8085 100644
--- a/libcxx/test/std/strings/string.view/range_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/strings/string.view/range_concept_conformance.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // string_view
 

diff  --git a/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp
index d5a21bb39425..d4a8d31f6817 100644
--- a/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.access/back.pass.cpp
@@ -22,7 +22,7 @@ bool test ( const CharT *s, size_t len ) {
     typedef std::basic_string_view<CharT> SV;
     SV sv ( s, len );
     ASSERT_SAME_TYPE(decltype(sv.back()), typename SV::const_reference);
-    LIBCPP_ASSERT_NOEXCEPT(   sv.back());
+    LIBCUDACXX_ASSERT_NOEXCEPT(   sv.back());
     assert ( sv.length() == len );
     assert ( sv.back() == s[len-1] );
     return &sv.back() == s + len - 1;

diff  --git a/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp
index 900a69821b57..2b2fbf203308 100644
--- a/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.access/front.pass.cpp
@@ -22,7 +22,7 @@ bool test ( const CharT *s, size_t len ) {
     typedef std::basic_string_view<CharT> SV;
     SV sv ( s, len );
     ASSERT_SAME_TYPE(decltype(sv.front()), typename SV::const_reference);
-    LIBCPP_ASSERT_NOEXCEPT(   sv.front());
+    LIBCUDACXX_ASSERT_NOEXCEPT(   sv.front());
     assert ( sv.length() == len );
     assert ( sv.front() == s[0] );
     return &sv.front() == s;

diff  --git a/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp b/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp
index 493787aaa84d..dd12caf0feff 100644
--- a/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.access/index.pass.cpp
@@ -22,7 +22,7 @@ void test ( const CharT *s, size_t len ) {
     typedef std::basic_string_view<CharT> SV;
     SV sv ( s, len );
     ASSERT_SAME_TYPE(decltype(sv[0]), typename SV::const_reference);
-    LIBCPP_ASSERT_NOEXCEPT(   sv[0]);
+    LIBCUDACXX_ASSERT_NOEXCEPT(   sv[0]);
     assert ( sv.length() == len );
     for ( size_t i = 0; i < len; ++i ) {
         assert ( sv[i] == s[i] );

diff  --git a/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp b/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp
index fcc5b7f0bfad..6f1766fcdf24 100644
--- a/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.capacity/capacity.pass.cpp
@@ -54,7 +54,7 @@ void test1 () {
         typedef typename SV::size_type Size;
         SV sv;
         assert(sv.max_size() <= std::numeric_limits<Size>::max() / sizeof(CharT));
-        LIBCPP_ASSERT(sv.max_size() == std::numeric_limits<Size>::max() / sizeof(CharT));
+        LIBCUDACXX_ASSERT(sv.max_size() == std::numeric_limits<Size>::max() / sizeof(CharT));
     }
 }
 

diff  --git a/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp
index b58a838ce6f0..75f2dab42f98 100644
--- a/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.cons/from_literal.pass.cpp
@@ -31,7 +31,7 @@ template<typename CharT>
 void test ( const CharT *s ) {
     typedef std::basic_string_view<CharT> SV;
 //  I'd love to do this, but it would require traits::length() to be noexcept
-//  LIBCPP_ASSERT_NOEXCEPT(SV(s));
+//  LIBCUDACXX_ASSERT_NOEXCEPT(SV(s));
 
     SV sv1 ( s );
     assert ( sv1.size() == StrLen( s ));

diff  --git a/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp
index 540fa74ceca0..aef776ffbf19 100644
--- a/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.cons/from_ptr_len.pass.cpp
@@ -23,7 +23,7 @@ template<typename CharT>
 void test ( const CharT *s, size_t sz ) {
     {
     typedef std::basic_string_view<CharT> SV;
-    LIBCPP_ASSERT_NOEXCEPT(SV(s, sz));
+    LIBCUDACXX_ASSERT_NOEXCEPT(SV(s, sz));
 
     SV sv1 ( s, sz );
     assert ( sv1.size() == sz );

diff  --git a/libcxx/test/std/strings/string.view/string.view.cons/from_range.pass.cpp b/libcxx/test/std/strings/string.view/string.view.cons/from_range.pass.cpp
index 83e96a41e0e3..167eb81250e7 100644
--- a/libcxx/test/std/strings/string.view/string.view.cons/from_range.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.cons/from_range.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <string_view>
 

diff  --git a/libcxx/test/std/strings/string.view/string.view.deduct/range.pass.cpp b/libcxx/test/std/strings/string.view/string.view.deduct/range.pass.cpp
index 7efe9ef09db8..79c92c525ac1 100644
--- a/libcxx/test/std/strings/string.view/string.view.deduct/range.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.deduct/range.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 // UNSUPPORTED: c++03, c++11, c++14, c++17, c++20
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <string_view>
 

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp
index 15f61ab4c318..3aa2c7647a3e 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_char_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(c, pos));
     assert(s.find(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x + 1 <= s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp
index 10a92713f168..64caa127d2d8 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_char_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(c, pos));
     assert(s.find_first_not_of(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -33,7 +33,7 @@ template <class S>
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(c));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(c));
     assert(s.find_first_not_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp
index 90da2a471e90..aad97490a1f3 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos));
     assert(s.find_first_not_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp
index 69cefa7a5204..3f9e93cc96c4 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_pointer_size_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos, n));
     assert(s.find_first_not_of(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp
index 3067f17ea127..4a3c904d36f4 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_not_of_string_view_size.pass.cpp
@@ -21,7 +21,7 @@ template <class S>
 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_not_of(str, pos));
     assert(s.find_first_not_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp
index ff6af094760d..6fea9db96dc1 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_char_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(c, pos));
     assert(s.find_first_of(c, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp
index 01fef4d3585f..1f2cb1ea05fa 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(str, pos));
     assert(s.find_first_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -33,7 +33,7 @@ template <class S>
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(str));
     assert(s.find_first_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp
index af68f94bddaf..0505fa2a41e7 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_pointer_size_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(str, pos, n));
     assert(s.find_first_of(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp
index 62bfe9fd5f6d..2159c64a2183 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_first_of_string_view_size.pass.cpp
@@ -21,7 +21,7 @@ template <class S>
 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(str, pos));
     assert(s.find_first_of(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x < s.size());
@@ -31,7 +31,7 @@ template <class S>
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_first_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_first_of(str));
     assert(s.find_first_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp
index 1a3b93793751..a7c37759bf3e 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_char_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(c, pos));
     assert(s.find_last_not_of(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -33,7 +33,7 @@ template <class S>
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(c));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(c));
     assert(s.find_last_not_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp
index ba59de8368c4..626040950169 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos));
     assert(s.find_last_not_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp
index 371981143633..727ccdc242ca 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_pointer_size_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos, n));
     assert(s.find_last_not_of(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp
index 5a2a319da53d..73899569c3b9 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_not_of_string_view_size.pass.cpp
@@ -21,7 +21,7 @@ template <class S>
 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(str, pos));
     assert(s.find_last_not_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -31,7 +31,7 @@ template <class S>
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_not_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_not_of(str));
     assert(s.find_last_not_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp
index 6710620aa1dc..11bc1e05db05 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_char_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(c, pos));
     assert(s.find_last_of(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -33,7 +33,7 @@ template <class S>
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(c));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(c));
     assert(s.find_last_of(c) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp
index a9f381ce8bb5..6b4fc7b4ee21 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(str, pos));
     assert(s.find_last_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -33,7 +33,7 @@ template <class S>
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(str));
     assert(s.find_last_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp
index 85849c111956..7ca881767632 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_pointer_size_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(str, pos, n));
     assert(s.find_last_of(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp
index 5c0ee6419b6c..9f1d3eba3184 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_last_of_string_view_size.pass.cpp
@@ -21,7 +21,7 @@ template <class S>
 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(str, pos));
     assert(s.find_last_of(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x < s.size());
@@ -31,7 +31,7 @@ template <class S>
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find_last_of(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find_last_of(str));
     assert(s.find_last_of(str) == x);
     if (x != S::npos)
         assert(x < s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp
index ecd0b15f8c31..fd748ea78ab4 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(str, pos));
     assert(s.find(str, pos) == x);
     if (x != S::npos)
     {
@@ -36,7 +36,7 @@ template <class S>
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(str));
     assert(s.find(str) == x);
     if (x != S::npos)
     {

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp
index 2e68e9ec7ca9..6a56ee2fea5a 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_pointer_size_size.pass.cpp
@@ -23,7 +23,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(str, pos, n));
     assert(s.find(str, pos, n) == x);
     if (x != S::npos)
         assert(pos <= x && x + n <= s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp
index d189578a5c61..4fc863b7e4a5 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/find_string_view_size.pass.cpp
@@ -22,7 +22,7 @@ template <class S>
 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(str, pos));
     assert(s.find(str, pos) == x);
     if (x != S::npos)
         assert(pos <= x && x + str.size() <= s.size());
@@ -32,7 +32,7 @@ template <class S>
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.find(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.find(str));
     assert(s.find(str) == x);
     if (x != S::npos)
         assert(0 <= x && x + str.size() <= s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp
index 96a0be54ebbd..16c7f555cb63 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/rfind_char_size.pass.cpp
@@ -22,7 +22,7 @@ void
 test(const S& s, typename S::value_type c, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(c, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(c, pos));
     assert(s.rfind(c, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x + 1 <= s.size());
@@ -32,7 +32,7 @@ template <class S>
 void
 test(const S& s, typename S::value_type c, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(c));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(c));
     assert(s.rfind(c) == x);
     if (x != S::npos)
         assert(x + 1 <= s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp
index 6dfde175148c..319961b63231 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size.pass.cpp
@@ -22,7 +22,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
      typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(str, pos));
     assert(s.rfind(str, pos) == x);
     if (x != S::npos)
     {
@@ -35,7 +35,7 @@ template <class S>
 void
 test(const S& s, const typename S::value_type* str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(str));
     assert(s.rfind(str) == x);
     if (x != S::npos)
     {

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp
index 509293b956e2..733b26fc9f97 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/rfind_pointer_size_size.pass.cpp
@@ -22,7 +22,7 @@ void
 test(const S& s, const typename S::value_type* str, typename S::size_type pos,
       typename S::size_type n, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str, pos, n));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(str, pos, n));
     assert(s.rfind(str, pos, n) == x);
     if (x != S::npos)
         assert(x <= pos && x + n <= s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp b/libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp
index ad92d76e1a2c..67d097ace142 100644
--- a/libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.find/rfind_string_view_size.pass.cpp
@@ -22,7 +22,7 @@ template <class S>
 void
 test(const S& s, const S& str, typename S::size_type pos, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str, pos));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(str, pos));
     assert(s.rfind(str, pos) == x);
     if (x != S::npos)
         assert(x <= pos && x + str.size() <= s.size());
@@ -32,7 +32,7 @@ template <class S>
 void
 test(const S& s, const S& str, typename S::size_type x)
 {
-    LIBCPP_ASSERT_NOEXCEPT(s.rfind(str));
+    LIBCUDACXX_ASSERT_NOEXCEPT(s.rfind(str));
     assert(s.rfind(str) == x);
     if (x != S::npos)
         assert(0 <= x && x + str.size() <= s.size());

diff  --git a/libcxx/test/std/strings/string.view/string.view.iterators/iterator_concept_conformance.compile.pass.cpp b/libcxx/test/std/strings/string.view/string.view.iterators/iterator_concept_conformance.compile.pass.cpp
index 97a1c7bcfe86..b519fcbe102c 100644
--- a/libcxx/test/std/strings/string.view/string.view.iterators/iterator_concept_conformance.compile.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.iterators/iterator_concept_conformance.compile.pass.cpp
@@ -22,7 +22,7 @@ using reverse_iterator = std::string_view::reverse_iterator;
 using const_reverse_iterator = std::string_view::const_reverse_iterator;
 
 static_assert(std::contiguous_iterator<iterator>);
-LIBCPP_STATIC_ASSERT(std::__is_cpp17_random_access_iterator<iterator>::value);
+LIBCUDACXX_STATIC_ASSERT(std::__is_cpp17_random_access_iterator<iterator>::value);
 static_assert(!std::indirectly_writable<iterator, char>);
 static_assert(std::sentinel_for<iterator, iterator>);
 static_assert(std::sentinel_for<iterator, const_iterator>);
@@ -39,7 +39,7 @@ static_assert(std::indirectly_copyable_storable<iterator, char*>);
 static_assert(!std::indirectly_swappable<iterator, iterator>);
 
 static_assert(std::contiguous_iterator<const_iterator>);
-LIBCPP_STATIC_ASSERT(std::__is_cpp17_random_access_iterator<const_iterator>::value);
+LIBCUDACXX_STATIC_ASSERT(std::__is_cpp17_random_access_iterator<const_iterator>::value);
 static_assert(!std::indirectly_writable<const_iterator, char>);
 static_assert(std::sentinel_for<const_iterator, iterator>);
 static_assert(std::sentinel_for<const_iterator, const_iterator>);

diff  --git a/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp b/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp
index 0fea0ea6f5cb..a95e9c602de8 100644
--- a/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.template/ends_with.ptr.pass.cpp
@@ -28,7 +28,7 @@ int main(int, char**)
     SV  sv2 { s + 3, 2 };
     SV  svNot {"def", 3 };
 
-    LIBCPP_ASSERT_NOEXCEPT(sv0.ends_with(""));
+    LIBCUDACXX_ASSERT_NOEXCEPT(sv0.ends_with(""));
 
     assert ( sv0.ends_with(""));
     assert (!sv0.ends_with("e"));

diff  --git a/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp b/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp
index 464606fda547..28a3d26b941e 100644
--- a/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp
+++ b/libcxx/test/std/strings/string.view/string.view.template/starts_with.ptr.pass.cpp
@@ -28,7 +28,7 @@ int main(int, char**)
     SV  sv2 { s, 2 };
     SV  svNot {"def", 3 };
 
-    LIBCPP_ASSERT_NOEXCEPT(sv0.starts_with(""));
+    LIBCUDACXX_ASSERT_NOEXCEPT(sv0.starts_with(""));
 
     assert ( sv0.starts_with(""));
     assert (!sv0.starts_with("a"));

diff  --git a/libcxx/test/std/strings/strings.erasure/erase.pass.cpp b/libcxx/test/std/strings/strings.erasure/erase.pass.cpp
index aa397ca68536..fc9e35997ed7 100644
--- a/libcxx/test/std/strings/strings.erasure/erase.pass.cpp
+++ b/libcxx/test/std/strings/strings.erasure/erase.pass.cpp
@@ -25,7 +25,7 @@ template <class S, class U>
 void test0(S s, U val, S expected, size_t expected_erased_count) {
   ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase(s, val)));
   assert(expected_erased_count == std::erase(s, val));
-  LIBCPP_ASSERT(s.__invariants());
+  LIBCUDACXX_ASSERT(s.__invariants());
   assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp b/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp
index 1957451bc64a..a4b59599bdbd 100644
--- a/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp
+++ b/libcxx/test/std/strings/strings.erasure/erase_if.pass.cpp
@@ -24,7 +24,7 @@ template <class S, class Pred>
 void test0(S s, Pred p, S expected, size_t expected_erased_count) {
   ASSERT_SAME_TYPE(typename S::size_type, decltype(std::erase_if(s, p)));
   assert(expected_erased_count == std::erase_if(s, p));
-  LIBCPP_ASSERT(s.__invariants());
+  LIBCUDACXX_ASSERT(s.__invariants());
   assert(s == expected);
 }
 

diff  --git a/libcxx/test/std/thread/futures/futures.async/async.pass.cpp b/libcxx/test/std/thread/futures/futures.async/async.pass.cpp
index 4e328db6cce9..5e3dc031d623 100644
--- a/libcxx/test/std/thread/futures/futures.async/async.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.async/async.pass.cpp
@@ -111,7 +111,7 @@ int main(int, char**)
     bool DPID = DefaultPolicyIsDeferred;
 
     std::launch AnyPolicy = std::launch::async | std::launch::deferred;
-    LIBCPP_ASSERT(AnyPolicy == std::launch::any);
+    LIBCUDACXX_ASSERT(AnyPolicy == std::launch::any);
 
     {
         auto checkInt = [](std::future<int>& f) { return f.get() == 3; };

diff  --git a/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp b/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp
index f62212ec2623..094ded9affd5 100644
--- a/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.future_error/what.pass.cpp
@@ -29,21 +29,21 @@ int main(int, char**)
 {
     {
         std::future_error f(std::make_error_code(std::future_errc::broken_promise));
-        LIBCPP_ASSERT(std::strcmp(f.what(), "The associated promise has been destructed prior "
+        LIBCUDACXX_ASSERT(std::strcmp(f.what(), "The associated promise has been destructed prior "
                       "to the associated state becoming ready.") == 0);
     }
     {
         std::future_error f(std::make_error_code(std::future_errc::future_already_retrieved));
-        LIBCPP_ASSERT(std::strcmp(f.what(), "The future has already been retrieved from "
+        LIBCUDACXX_ASSERT(std::strcmp(f.what(), "The future has already been retrieved from "
                       "the promise or packaged_task.") == 0);
     }
     {
         std::future_error f(std::make_error_code(std::future_errc::promise_already_satisfied));
-        LIBCPP_ASSERT(std::strcmp(f.what(), "The state of the promise has already been set.") == 0);
+        LIBCUDACXX_ASSERT(std::strcmp(f.what(), "The state of the promise has already been set.") == 0);
     }
     {
         std::future_error f(std::make_error_code(std::future_errc::no_state));
-        LIBCPP_ASSERT(std::strcmp(f.what(), "Operation not permitted on an object without "
+        LIBCUDACXX_ASSERT(std::strcmp(f.what(), "Operation not permitted on an object without "
                       "an associated state.") == 0);
     }
 

diff  --git a/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp b/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp
index 37ad2ff4a864..523708772b41 100644
--- a/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.overview/launch.pass.cpp
@@ -25,19 +25,19 @@
 int main(int, char**)
 {
 #if TEST_STD_VER < 11
-   LIBCPP_STATIC_ASSERT(static_cast<int>(std::launch::any) ==
+   LIBCUDACXX_STATIC_ASSERT(static_cast<int>(std::launch::any) ==
                  (static_cast<int>(std::launch::async) | static_cast<int>(std::launch::deferred)), "");
 #else
-    LIBCPP_STATIC_ASSERT(std::launch::any == (std::launch::async | std::launch::deferred), "");
+    LIBCUDACXX_STATIC_ASSERT(std::launch::any == (std::launch::async | std::launch::deferred), "");
     static_assert(std::launch(0) == (std::launch::async & std::launch::deferred), "");
-    LIBCPP_STATIC_ASSERT(std::launch::any == (std::launch::async ^ std::launch::deferred), "");
-    LIBCPP_STATIC_ASSERT(std::launch::deferred == ~std::launch::async, "");
+    LIBCUDACXX_STATIC_ASSERT(std::launch::any == (std::launch::async ^ std::launch::deferred), "");
+    LIBCUDACXX_STATIC_ASSERT(std::launch::deferred == ~std::launch::async, "");
     std::launch x = std::launch::async;
     x &= std::launch::deferred;
     assert(x == std::launch(0));
     x = std::launch::async;
     x |= std::launch::deferred;
-    LIBCPP_ASSERT(x == std::launch::any);
+    LIBCUDACXX_ASSERT(x == std::launch::any);
     x ^= std::launch::deferred;
     assert(x == std::launch::async);
 #endif

diff  --git a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
index fc3d5c122274..915d8a2483e0 100644
--- a/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
+++ b/libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/F.pass.cpp
@@ -176,7 +176,7 @@ int main(int, char**)
 #ifndef TEST_HAS_NO_EXCEPTIONS
     // The test below expects `std::thread` to call `new`, which may not be the
     // case for all implementations.
-    LIBCPP_ASSERT(numAllocs > 0); // libc++ should call new.
+    LIBCUDACXX_ASSERT(numAllocs > 0); // libc++ should call new.
     if (numAllocs > 0) {
         try
         {

diff  --git a/libcxx/test/std/time/time.duration/time.duration.special/max.pass.cpp b/libcxx/test/std/time/time.duration/time.duration.special/max.pass.cpp
index dadd47bb7741..2b541604c133 100644
--- a/libcxx/test/std/time/time.duration/time.duration.special/max.pass.cpp
+++ b/libcxx/test/std/time/time.duration/time.duration.special/max.pass.cpp
@@ -22,7 +22,7 @@
 template <class D>
 void test()
 {
-    LIBCPP_ASSERT_NOEXCEPT(std::chrono::duration_values<typename D::rep>::max());
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::chrono::duration_values<typename D::rep>::max());
 #if TEST_STD_VER > 17
     ASSERT_NOEXCEPT(       std::chrono::duration_values<typename D::rep>::max());
 #endif

diff  --git a/libcxx/test/std/time/time.duration/time.duration.special/min.pass.cpp b/libcxx/test/std/time/time.duration/time.duration.special/min.pass.cpp
index 1f4660a1d626..e6701f61f270 100644
--- a/libcxx/test/std/time/time.duration/time.duration.special/min.pass.cpp
+++ b/libcxx/test/std/time/time.duration/time.duration.special/min.pass.cpp
@@ -22,7 +22,7 @@
 template <class D>
 void test()
 {
-    LIBCPP_ASSERT_NOEXCEPT(std::chrono::duration_values<typename D::rep>::min());
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::chrono::duration_values<typename D::rep>::min());
 #if TEST_STD_VER > 17
     ASSERT_NOEXCEPT(       std::chrono::duration_values<typename D::rep>::min());
 #endif

diff  --git a/libcxx/test/std/time/time.duration/time.duration.special/zero.pass.cpp b/libcxx/test/std/time/time.duration/time.duration.special/zero.pass.cpp
index a3f535071d7a..305d8b0f66c4 100644
--- a/libcxx/test/std/time/time.duration/time.duration.special/zero.pass.cpp
+++ b/libcxx/test/std/time/time.duration/time.duration.special/zero.pass.cpp
@@ -21,7 +21,7 @@
 template <class D>
 void test()
 {
-    LIBCPP_ASSERT_NOEXCEPT(std::chrono::duration_values<typename D::rep>::zero());
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::chrono::duration_values<typename D::rep>::zero());
 #if TEST_STD_VER > 17
     ASSERT_NOEXCEPT(       std::chrono::duration_values<typename D::rep>::zero());
 #endif

diff  --git a/libcxx/test/std/time/time.point/time.point.special/max.pass.cpp b/libcxx/test/std/time/time.point/time.point.special/max.pass.cpp
index e7826b1a6101..f7e225b02c64 100644
--- a/libcxx/test/std/time/time.point/time.point.special/max.pass.cpp
+++ b/libcxx/test/std/time/time.point/time.point.special/max.pass.cpp
@@ -22,7 +22,7 @@ int main(int, char**)
     typedef std::chrono::system_clock Clock;
     typedef std::chrono::milliseconds Duration;
     typedef std::chrono::time_point<Clock, Duration> TP;
-    LIBCPP_ASSERT_NOEXCEPT(TP::max());
+    LIBCUDACXX_ASSERT_NOEXCEPT(TP::max());
 #if TEST_STD_VER > 17
     ASSERT_NOEXCEPT(       TP::max());
 #endif

diff  --git a/libcxx/test/std/time/time.point/time.point.special/min.pass.cpp b/libcxx/test/std/time/time.point/time.point.special/min.pass.cpp
index fae3339b03d8..e770292250e6 100644
--- a/libcxx/test/std/time/time.point/time.point.special/min.pass.cpp
+++ b/libcxx/test/std/time/time.point/time.point.special/min.pass.cpp
@@ -22,7 +22,7 @@ int main(int, char**)
     typedef std::chrono::system_clock Clock;
     typedef std::chrono::milliseconds Duration;
     typedef std::chrono::time_point<Clock, Duration> TP;
-    LIBCPP_ASSERT_NOEXCEPT(TP::max());
+    LIBCUDACXX_ASSERT_NOEXCEPT(TP::max());
 #if TEST_STD_VER > 17
     ASSERT_NOEXCEPT(       TP::max());
 #endif

diff  --git a/libcxx/test/std/time/time.traits/time.traits.duration_values/max.pass.cpp b/libcxx/test/std/time/time.traits/time.traits.duration_values/max.pass.cpp
index 8d244c77346b..634f9cc751af 100644
--- a/libcxx/test/std/time/time.traits/time.traits.duration_values/max.pass.cpp
+++ b/libcxx/test/std/time/time.traits/time.traits.duration_values/max.pass.cpp
@@ -34,9 +34,9 @@ int main(int, char**)
            std::numeric_limits<Rep>::max(), "");
 #endif
 
-    LIBCPP_ASSERT_NOEXCEPT(std::chrono::duration_values<int>::max());
-    LIBCPP_ASSERT_NOEXCEPT(std::chrono::duration_values<double>::max());
-    LIBCPP_ASSERT_NOEXCEPT(std::chrono::duration_values<Rep>::max());
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::chrono::duration_values<int>::max());
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::chrono::duration_values<double>::max());
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::chrono::duration_values<Rep>::max());
 #if TEST_STD_VER > 17
     ASSERT_NOEXCEPT(std::chrono::duration_values<int>::max());
     ASSERT_NOEXCEPT(std::chrono::duration_values<double>::max());

diff  --git a/libcxx/test/std/time/time.traits/time.traits.duration_values/min.pass.cpp b/libcxx/test/std/time/time.traits/time.traits.duration_values/min.pass.cpp
index 4ff03c622868..488765d3a221 100644
--- a/libcxx/test/std/time/time.traits/time.traits.duration_values/min.pass.cpp
+++ b/libcxx/test/std/time/time.traits/time.traits.duration_values/min.pass.cpp
@@ -34,9 +34,9 @@ int main(int, char**)
            std::numeric_limits<Rep>::lowest(), "");
 #endif
 
-    LIBCPP_ASSERT_NOEXCEPT(std::chrono::duration_values<int>::min());
-    LIBCPP_ASSERT_NOEXCEPT(std::chrono::duration_values<double>::min());
-    LIBCPP_ASSERT_NOEXCEPT(std::chrono::duration_values<Rep>::min());
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::chrono::duration_values<int>::min());
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::chrono::duration_values<double>::min());
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::chrono::duration_values<Rep>::min());
 #if TEST_STD_VER > 17
     ASSERT_NOEXCEPT(std::chrono::duration_values<int>::min());
     ASSERT_NOEXCEPT(std::chrono::duration_values<double>::min());

diff  --git a/libcxx/test/std/time/time.traits/time.traits.duration_values/zero.pass.cpp b/libcxx/test/std/time/time.traits/time.traits.duration_values/zero.pass.cpp
index d9de07b414e9..bc74039cdea6 100644
--- a/libcxx/test/std/time/time.traits/time.traits.duration_values/zero.pass.cpp
+++ b/libcxx/test/std/time/time.traits/time.traits.duration_values/zero.pass.cpp
@@ -25,8 +25,8 @@ int main(int, char**)
     static_assert(std::chrono::duration_values<Rep>::zero() == 0, "");
 #endif
 
-    LIBCPP_ASSERT_NOEXCEPT(std::chrono::duration_values<int>::zero());
-    LIBCPP_ASSERT_NOEXCEPT(std::chrono::duration_values<Rep>::zero());
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::chrono::duration_values<int>::zero());
+    LIBCUDACXX_ASSERT_NOEXCEPT(std::chrono::duration_values<Rep>::zero());
 #if TEST_STD_VER > 17
     ASSERT_NOEXCEPT(std::chrono::duration_values<int>::zero());
     ASSERT_NOEXCEPT(std::chrono::duration_values<Rep>::zero());

diff  --git a/libcxx/test/std/utilities/any/any.class/any.assign/move.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.assign/move.pass.cpp
index ec0b6c00a72e..642d53ad2e3b 100644
--- a/libcxx/test/std/utilities/any/any.class/any.assign/move.pass.cpp
+++ b/libcxx/test/std/utilities/any/any.class/any.assign/move.pass.cpp
@@ -40,12 +40,12 @@ void test_move_assign() {
 
         assert(LHS::count == 1);
         assert(RHS::count == 2 + a2.has_value());
-        LIBCPP_ASSERT(RHS::count == 2); // libc++ leaves the object empty
+        LIBCUDACXX_ASSERT(RHS::count == 2); // libc++ leaves the object empty
 
         assertContains<RHS>(a, 2);
         if (a2.has_value())
             assertContains<RHS>(a2, 0);
-        LIBCPP_ASSERT(!a2.has_value());
+        LIBCUDACXX_ASSERT(!a2.has_value());
     }
     assert(LHS::count == 0);
     assert(RHS::count == 0);
@@ -63,12 +63,12 @@ void test_move_assign_empty() {
         a = std::move(a2);
 
         assert(LHS::count == 1 + a2.has_value());
-        LIBCPP_ASSERT(LHS::count == 1);
+        LIBCUDACXX_ASSERT(LHS::count == 1);
 
         assertContains<LHS>(a, 1);
         if (a2.has_value())
             assertContains<LHS>(a2, 0);
-        LIBCPP_ASSERT(!a2.has_value());
+        LIBCUDACXX_ASSERT(!a2.has_value());
     }
     assert(LHS::count == 0);
     {

diff  --git a/libcxx/test/std/utilities/any/any.class/any.assign/value.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.assign/value.pass.cpp
index a4a4095daa27..36bd3c5f2767 100644
--- a/libcxx/test/std/utilities/any/any.class/any.assign/value.pass.cpp
+++ b/libcxx/test/std/utilities/any/any.class/any.assign/value.pass.cpp
@@ -66,7 +66,7 @@ void test_assign_value() {
         assert(RHS::copied == 0);
         assert(LHS::count == 0);
         assert(RHS::count == 1 + rhs.has_value());
-        LIBCPP_ASSERT(!rhs.has_value());
+        LIBCUDACXX_ASSERT(!rhs.has_value());
 
         assertContains<RHS>(lhs, 2);
         if (rhs.has_value())

diff  --git a/libcxx/test/std/utilities/any/any.class/any.cons/move.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.cons/move.pass.cpp
index d70b6888015d..411361e25988 100644
--- a/libcxx/test/std/utilities/any/any.class/any.cons/move.pass.cpp
+++ b/libcxx/test/std/utilities/any/any.class/any.cons/move.pass.cpp
@@ -80,7 +80,7 @@ void test_move() {
         assert(Type::copied == 0); // no copies can be performed.
         assert(Type::count == 1 + a.has_value());
         assertContains<Type>(a2, 42);
-        LIBCPP_ASSERT(!a.has_value()); // Moves are always destructive.
+        LIBCUDACXX_ASSERT(!a.has_value()); // Moves are always destructive.
         if (a.has_value())
             assertContains<Type>(a, 0);
     }

diff  --git a/libcxx/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp b/libcxx/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
index 9e075866fc3d..3420d0d80d9c 100644
--- a/libcxx/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
+++ b/libcxx/test/std/utilities/any/any.class/any.modifiers/swap.pass.cpp
@@ -101,7 +101,7 @@ void test_self_swap() {
         assertContains<T>(a, 42);
         assert(T::count == 1);
         assert(T::copied == 0);
-        LIBCPP_ASSERT(T::moved == 0);
+        LIBCUDACXX_ASSERT(T::moved == 0);
     }
     assert(small::count == 0);
     { // large
@@ -112,7 +112,7 @@ void test_self_swap() {
         assertContains<T>(a, 42);
         assert(T::count == 1);
         assert(T::copied == 0);
-        LIBCPP_ASSERT(T::moved == 0);
+        LIBCUDACXX_ASSERT(T::moved == 0);
     }
     assert(large::count == 0);
 }

diff  --git a/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.pass.cpp
index 2e602428df48..7db9e97c41b0 100644
--- a/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 
@@ -24,7 +24,7 @@
 int main(int, char**) {
   [[maybe_unused]] auto store = std::make_format_args(42, nullptr, false, 1.0);
 
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
       std::same_as<decltype(store), std::__format_arg_store<std::format_context, int, nullptr_t, bool, double>>);
 
   return 0;

diff  --git a/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.sh.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.sh.cpp
index d36f189d7bad..55c629f52441 100644
--- a/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.sh.cpp
+++ b/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_format_args.sh.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // UNSUPPORTED: no-wide-characters
 
 // Validate it works regardless of the signedness of `char`.

diff  --git a/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_wformat_args.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_wformat_args.pass.cpp
index 14328a1425d0..f84e2e9d2f8a 100644
--- a/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_wformat_args.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.arguments/format.arg.store/make_wformat_args.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // XFAIL: no-wide-characters
 
 // <format>
@@ -24,7 +24,7 @@
 int main(int, char**) {
   [[maybe_unused]] auto store = std::make_wformat_args(42, nullptr, false, 1.0);
 
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
       std::same_as<decltype(store), std::__format_arg_store<std::wformat_context, int, nullptr_t, bool, double>>);
 
   return 0;

diff  --git a/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp
index 5591c31a7ada..44eabc62a794 100644
--- a/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.arguments/format.arg/ctor.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.arguments/format.arg/operator_bool.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.arg/operator_bool.pass.cpp
index ecda3d1bb0b0..64c6313fcfc1 100644
--- a/libcxx/test/std/utilities/format/format.arguments/format.arg/operator_bool.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.arguments/format.arg/operator_bool.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.arguments/format.args/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.args/ctor.pass.cpp
index 9af52fecf2fb..07a713871eb4 100644
--- a/libcxx/test/std/utilities/format/format.arguments/format.args/ctor.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.arguments/format.args/ctor.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.arguments/format.args/types.compile.pass.cpp b/libcxx/test/std/utilities/format/format.arguments/format.args/types.compile.pass.cpp
index 9ca1d31e6abd..99097d312a73 100644
--- a/libcxx/test/std/utilities/format/format.arguments/format.args/types.compile.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.arguments/format.args/types.compile.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.error/format.error.pass.cpp b/libcxx/test/std/utilities/format/format.error/format.error.pass.cpp
index e3d3c48995bc..5cf47057c26e 100644
--- a/libcxx/test/std/utilities/format/format.error/format.error.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.error/format.error.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // This test requires the dylib support introduced in D92214.
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}

diff  --git a/libcxx/test/std/utilities/format/format.fmt.string/ctor.verify.cpp b/libcxx/test/std/utilities/format/format.fmt.string/ctor.verify.cpp
index 8f5404daaf39..4a6c296e6571 100644
--- a/libcxx/test/std/utilities/format/format.fmt.string/ctor.verify.cpp
+++ b/libcxx/test/std/utilities/format/format.fmt.string/ctor.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // libc++ supports basic_format_string in C++20 as an extension
 // UNSUPPORTED: !stdlib=libc++ && c++20

diff  --git a/libcxx/test/std/utilities/format/format.fmt.string/get.pass.cpp b/libcxx/test/std/utilities/format/format.fmt.string/get.pass.cpp
index bf7e2add0e8f..a1cac01eb3e8 100644
--- a/libcxx/test/std/utilities/format/format.fmt.string/get.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.fmt.string/get.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // libc++ supports basic_format_string in C++20 as an extension
 // UNSUPPORTED: !stdlib=libc++ && c++20

diff  --git a/libcxx/test/std/utilities/format/format.fmt.string/types.compile.pass.cpp b/libcxx/test/std/utilities/format/format.fmt.string/types.compile.pass.cpp
index 3ebd2bfc4fbd..40a5e81252df 100644
--- a/libcxx/test/std/utilities/format/format.fmt.string/types.compile.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.fmt.string/types.compile.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // libc++ supports basic_format_string in C++20 as an extension
 // UNSUPPORTED: !stdlib=libc++ && c++20

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp
index da6b5d16417c..46cf09360773 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/advance_to.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp
index 17d8908b2a23..2e8a7fb84e5c 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/arg.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 
@@ -30,7 +30,7 @@ void test() {
   std::basic_string<CharT> output;
   const std::basic_format_context context =
       test_format_context_create(OutIt{output}, args);
-  LIBCPP_ASSERT(args.__size() == 4);
+  LIBCUDACXX_ASSERT(args.__size() == 4);
   ASSERT_NOEXCEPT(context.arg(0));
   for (size_t i = 0, e = args.__size(); i != e; ++i) {
     assert(context.arg(i));

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp
index bb4fcdc1d90d..715644422613 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/ctor.pass.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8
@@ -18,7 +18,7 @@
 // basic_format_context(Out out,
 //                      basic_format_args<basic_format_context> args,
 //                      std::optional<std::::locale>&& loc = std::nullopt);
-// If compliled with -D_LIBCPP_HAS_NO_LOCALIZATION
+// If compliled with -D_LIBCUDACXX_HAS_NO_LOCALIZATION
 // basic_format_context(Out out,
 //                      basic_format_args<basic_format_context> args);
 
@@ -57,7 +57,7 @@ void test() {
     OutIt out_it{output};
     std::basic_format_context context =
         test_format_context_create(out_it, args);
-    LIBCPP_ASSERT(args.__size() == 4);
+    LIBCUDACXX_ASSERT(args.__size() == 4);
 
     assert(test_basic_format_arg(context.arg(0), true));
     assert(test_basic_format_arg(context.arg(1), CharT('a')));
@@ -83,7 +83,7 @@ void test() {
     std::basic_format_context context =
         test_format_context_create(out_it, args, en_US);
 
-    LIBCPP_ASSERT(args.__size() == 4);
+    LIBCUDACXX_ASSERT(args.__size() == 4);
     assert(test_basic_format_arg(context.arg(0), true));
     assert(test_basic_format_arg(context.arg(1), CharT('a')));
     assert(test_basic_format_arg(context.arg(2), 42));
@@ -104,7 +104,7 @@ void test() {
     std::basic_format_context context =
         test_format_context_create(out_it, args, fr_FR);
 
-    LIBCPP_ASSERT(args.__size() == 4);
+    LIBCUDACXX_ASSERT(args.__size() == 4);
     assert(test_basic_format_arg(context.arg(0), true));
     assert(test_basic_format_arg(context.arg(1), CharT('a')));
     assert(test_basic_format_arg(context.arg(2), 42));

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp
index a8752bfc3043..3c81bf4fa824 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/locale.pass.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // REQUIRES: locale.en_US.UTF-8
 // REQUIRES: locale.fr_FR.UTF-8

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp
index 928f668c9f64..d72da7636d17 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.context/format.context/out.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.bool.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.bool.pass.cpp
index bd48281a11d3..88c3a8d93f9c 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.bool.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.bool.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.c_string.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.c_string.pass.cpp
index 21b906eba065..18f658ab5046 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.c_string.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.c_string.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char.pass.cpp
index 395ce6f4fca4..f016775e4d58 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp
index 15c36bd837b7..03fcce59e256 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.char_array.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT __builtin_memcpy isn't constexpr in GCC
 // UNSUPPORTED: gcc-12
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.const_char_array.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.const_char_array.pass.cpp
index 24db819f230e..0d28189eb730 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.const_char_array.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.const_char_array.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp
index 25e26f9af26d..7b8f1176dfb7 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.floating_point.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp
index 4f3c94eaabfc..dc76b6df95ab 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.handle.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp
index ef3a1fd50027..a5670283fc47 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.pointer.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp
index a241d374708b..648662d8c232 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.signed_integral.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.string.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.string.pass.cpp
index 1c43224e7f5d..632591b0b6ba 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.string.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.string.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.unsigned_integral.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.unsigned_integral.pass.cpp
index c3e426fcba1c..d52929ba8c62 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.unsigned_integral.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/formatter.unsigned_integral.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/types.compile.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/types.compile.pass.cpp
index 9bf871ecccb1..dc558f6beb70 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/types.compile.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.formatter.spec/types.compile.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp
index 6b4afcb6561d..eac34f4d1e9e 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/advance_to.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp
index 63122dc50b76..db58cbe1b10a 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/begin.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp
index 2f45544a4749..215f14ccb5d5 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.pass.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-exceptions
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // This test requires the dylib support introduced in D92214.
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
@@ -39,7 +39,7 @@ void test_exception() {
       context.check_arg_id(0);
       assert(false);
     } catch ([[maybe_unused]] const std::format_error& e) {
-      LIBCPP_ASSERT(strcmp(e.what(), "Using manual argument numbering in automatic "
+      LIBCUDACXX_ASSERT(strcmp(e.what(), "Using manual argument numbering in automatic "
                                      "argument numbering mode") == 0);
       return;
     }

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.verify.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.verify.cpp
index 74342c7d0fdb..9623d7c6229c 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.verify.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/check_arg_id.verify.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // constexpr void check_arg_id(size_t id);
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp
index 2a06751ec547..ba3dfead8498 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/ctor.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp
index e135418dc5b8..81ae1122df2e 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/end.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp
index 581defb49130..a750eb6a1ba4 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/next_arg_id.pass.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-exceptions
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // This test requires the dylib support introduced in D92214.
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
@@ -39,7 +39,7 @@ void test_exception() {
     TEST_IGNORE_NODISCARD context.next_arg_id();
     assert(false);
   } catch ([[maybe_unused]] const std::format_error& e) {
-    LIBCPP_ASSERT(strcmp(e.what(), "Using automatic argument numbering in manual "
+    LIBCUDACXX_ASSERT(strcmp(e.what(), "Using automatic argument numbering in manual "
                                    "argument numbering mode") == 0);
     return;
   }

diff  --git a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp
index eaa18a476aeb..2587fd6c1fbd 100644
--- a/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.formatter/format.parse.ctx/types.compile.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.functions/P2418.pass.cpp b/libcxx/test/std/utilities/format/format.functions/P2418.pass.cpp
index 1ccade8e542c..713f275a65c8 100644
--- a/libcxx/test/std/utilities/format/format.functions/P2418.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/P2418.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // Tests whether a move only type can be formatted. This is required by
 // P2418R2 "Add support for std::generator-like types to std::format"

diff  --git a/libcxx/test/std/utilities/format/format.functions/ascii.pass.cpp b/libcxx/test/std/utilities/format/format.functions/ascii.pass.cpp
index 4b94ebb9ec6b..7a63afaffaea 100644
--- a/libcxx/test/std/utilities/format/format.functions/ascii.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/ascii.pass.cpp
@@ -6,10 +6,10 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // Force unicode to be disabled.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_HAS_NO_UNICODE
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_HAS_NO_UNICODE
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/format/format.functions/format.locale.pass.cpp b/libcxx/test/std/utilities/format/format.functions/format.locale.pass.cpp
index aa8cc48712e0..317b1673f6a9 100644
--- a/libcxx/test/std/utilities/format/format.functions/format.locale.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format.locale.pass.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED:gcc-12
 // TODO FMT Investigate AppleClang ICE

diff  --git a/libcxx/test/std/utilities/format/format.functions/format.locale.verify.cpp b/libcxx/test/std/utilities/format/format.functions/format.locale.verify.cpp
index 5e52e4129819..c20a7c847236 100644
--- a/libcxx/test/std/utilities/format/format.functions/format.locale.verify.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format.locale.verify.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-11 status
 // UNSUPPORTED: gcc-11
 

diff  --git a/libcxx/test/std/utilities/format/format.functions/format.pass.cpp b/libcxx/test/std/utilities/format/format.functions/format.pass.cpp
index 82c170c12be5..8b08583b07b8 100644
--- a/libcxx/test/std/utilities/format/format.functions/format.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 // TODO FMT Investigate AppleClang ICE

diff  --git a/libcxx/test/std/utilities/format/format.functions/format.verify.cpp b/libcxx/test/std/utilities/format/format.functions/format.verify.cpp
index 48476a9e2599..648a4425aa54 100644
--- a/libcxx/test/std/utilities/format/format.functions/format.verify.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format.verify.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-11 status
 // UNSUPPORTED: gcc-11
 

diff  --git a/libcxx/test/std/utilities/format/format.functions/format_tests.h b/libcxx/test/std/utilities/format/format.functions/format_tests.h
index 32f2d6a25fc6..25b89b3797cf 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_tests.h
+++ b/libcxx/test/std/utilities/format/format.functions/format_tests.h
@@ -238,7 +238,7 @@ void format_test_string(const W& world, const U& universe, TestFunction check, E
   check_exception("A format-spec width field shouldn't have a leading zero", SV("hello {:0}"), world);
 
   // *** width ***
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
   // This limit isn't specified in the Standard.
   static_assert(std::__format::__number_max == 2'147'483'647, "Update the assert and the test.");
   check_exception("The numeric value of the format-spec is too large", SV("{:2147483648}"), world);
@@ -259,7 +259,7 @@ void format_test_string(const W& world, const U& universe, TestFunction check, E
   check_exception("Invalid arg-id", SV("hello {0:{01}}"), world, 1);
 
   // *** precision ***
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
   // This limit isn't specified in the Standard.
   static_assert(std::__format::__number_max == 2'147'483'647, "Update the assert and the test.");
   check_exception("The numeric value of the format-spec is too large", SV("{:.2147483648}"), world);

diff  --git a/libcxx/test/std/utilities/format/format.functions/format_to.locale.pass.cpp b/libcxx/test/std/utilities/format/format.functions/format_to.locale.pass.cpp
index 822f40989471..937c09768b01 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_to.locale.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format_to.locale.pass.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 // TODO FMT Investigate AppleClang ICE

diff  --git a/libcxx/test/std/utilities/format/format.functions/format_to.locale.verify.cpp b/libcxx/test/std/utilities/format/format.functions/format_to.locale.verify.cpp
index ce57fdc83f5b..4dd2a9b48296 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_to.locale.verify.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format_to.locale.verify.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-11 status
 // UNSUPPORTED: gcc-11
 

diff  --git a/libcxx/test/std/utilities/format/format.functions/format_to.pass.cpp b/libcxx/test/std/utilities/format/format.functions/format_to.pass.cpp
index 80f47419eb29..e4444bef4a4b 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_to.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format_to.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 // TODO FMT Investigate AppleClang ICE

diff  --git a/libcxx/test/std/utilities/format/format.functions/format_to.verify.cpp b/libcxx/test/std/utilities/format/format.functions/format_to.verify.cpp
index 3bffcce2a761..34e2caaef623 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_to.verify.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format_to.verify.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-11 status
 // UNSUPPORTED: gcc-11
 

diff  --git a/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.pass.cpp b/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.pass.cpp
index 53e7d1ba9a04..ea0e52a06bec 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.pass.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 // TODO FMT Investigate AppleClang ICE

diff  --git a/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.verify.cpp b/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.verify.cpp
index 0302d2496c9e..39849e3ef51e 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.verify.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format_to_n.locale.verify.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-11 status
 // UNSUPPORTED: gcc-11
 

diff  --git a/libcxx/test/std/utilities/format/format.functions/format_to_n.pass.cpp b/libcxx/test/std/utilities/format/format.functions/format_to_n.pass.cpp
index c74b37652866..b7dc40b06039 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_to_n.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format_to_n.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 // TODO FMT Investigate AppleClang ICE

diff  --git a/libcxx/test/std/utilities/format/format.functions/format_to_n.verify.cpp b/libcxx/test/std/utilities/format/format.functions/format_to_n.verify.cpp
index 0150e199f762..c6ceb6ee47c6 100644
--- a/libcxx/test/std/utilities/format/format.functions/format_to_n.verify.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/format_to_n.verify.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-11 status
 // UNSUPPORTED: gcc-11
 

diff  --git a/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp b/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp
index f6602ea2301d..00e3fdf12ecc 100644
--- a/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.pass.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 // TODO FMT Investigate AppleClang ICE

diff  --git a/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.verify.cpp b/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.verify.cpp
index 6aaffa4d8d92..17c65831d97f 100644
--- a/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.verify.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/formatted_size.locale.verify.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-11 status
 // UNSUPPORTED: gcc-11
 

diff  --git a/libcxx/test/std/utilities/format/format.functions/formatted_size.pass.cpp b/libcxx/test/std/utilities/format/format.functions/formatted_size.pass.cpp
index f8c2c08d8064..ae2e307258c5 100644
--- a/libcxx/test/std/utilities/format/format.functions/formatted_size.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/formatted_size.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 // TODO FMT Investigate AppleClang ICE

diff  --git a/libcxx/test/std/utilities/format/format.functions/formatted_size.verify.cpp b/libcxx/test/std/utilities/format/format.functions/formatted_size.verify.cpp
index 1f5451cc3dad..bd6a336d7054 100644
--- a/libcxx/test/std/utilities/format/format.functions/formatted_size.verify.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/formatted_size.verify.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-11 status
 // UNSUPPORTED: gcc-11
 

diff  --git a/libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp b/libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp
index 630c4044f6f6..21c88bfedc65 100644
--- a/libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/locale-specific_form.pass.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12

diff  --git a/libcxx/test/std/utilities/format/format.functions/unicode.pass.cpp b/libcxx/test/std/utilities/format/format.functions/unicode.pass.cpp
index e48b5742ff2f..5d7d53fc7766 100644
--- a/libcxx/test/std/utilities/format/format.functions/unicode.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/unicode.pass.cpp
@@ -6,10 +6,10 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // This version runs the test when the platform has Unicode support.
-// UNSUPPORTED: libcpp-has-no-unicode
+// UNSUPPORTED: LIBCUDACXX-has-no-unicode
 
 // <format>
 
@@ -233,7 +233,7 @@ static void test_P1868() {
       SV("\U0001f468\u200d\U0001F469\u200d\U0001F467\u200d\U0001F466")); // { Family: Man, Woman, Girl, Boy }
 }
 
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
 // Tests the libc++ specific behaviour for malformed UTF-sequences. The
 // Standard doesn't specify how to handle this.
 template <class CharT>
@@ -285,7 +285,7 @@ static void test() {
   test_single_code_point_truncate<CharT>();
   test_P1868<CharT>();
 
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
   test_malformed_code_point<CharT>();
 #endif
 }

diff  --git a/libcxx/test/std/utilities/format/format.functions/vformat.locale.pass.cpp b/libcxx/test/std/utilities/format/format.functions/vformat.locale.pass.cpp
index 069a96b38927..49f9a352e387 100644
--- a/libcxx/test/std/utilities/format/format.functions/vformat.locale.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/vformat.locale.pass.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 // TODO FMT Investigate AppleClang ICE
@@ -40,7 +40,7 @@ auto test_exception = []<class CharT, class... Args>(std::string_view what, std:
     (void)std::vformat(std::locale(), fmt, std::make_format_args<context_t<CharT>>(args...));
     assert(false);
   } catch ([[maybe_unused]] const std::format_error& e) {
-    LIBCPP_ASSERT(e.what() == what);
+    LIBCUDACXX_ASSERT(e.what() == what);
     return;
   }
   assert(false);

diff  --git a/libcxx/test/std/utilities/format/format.functions/vformat.pass.cpp b/libcxx/test/std/utilities/format/format.functions/vformat.pass.cpp
index de0110be7909..d6dcb4544723 100644
--- a/libcxx/test/std/utilities/format/format.functions/vformat.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/vformat.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 // TODO FMT Investigate AppleClang ICE
@@ -39,7 +39,7 @@ auto test_exception = []<class CharT, class... Args>(std::string_view what, std:
     TEST_IGNORE_NODISCARD std::vformat(fmt, std::make_format_args<context_t<CharT>>(args...));
     assert(false);
   } catch ([[maybe_unused]] const std::format_error& e) {
-    LIBCPP_ASSERT(e.what() == what);
+    LIBCUDACXX_ASSERT(e.what() == what);
     return;
   }
   assert(false);

diff  --git a/libcxx/test/std/utilities/format/format.functions/vformat_to.locale.pass.cpp b/libcxx/test/std/utilities/format/format.functions/vformat_to.locale.pass.cpp
index c4a46807c5f0..be2b38c3b3f8 100644
--- a/libcxx/test/std/utilities/format/format.functions/vformat_to.locale.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/vformat_to.locale.pass.cpp
@@ -7,7 +7,7 @@
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
 // UNSUPPORTED: no-localization
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 // TODO FMT Investigate AppleClang ICE
@@ -72,7 +72,7 @@ auto test_exception = []<class CharT, class... Args>(std::string_view what, std:
     std::vformat_to(std::back_inserter(out), std::locale(), fmt, std::make_format_args<context_t<CharT>>(args...));
     assert(false);
   } catch ([[maybe_unused]] const std::format_error& e) {
-    LIBCPP_ASSERT(e.what() == what);
+    LIBCUDACXX_ASSERT(e.what() == what);
     return;
   }
   assert(false);

diff  --git a/libcxx/test/std/utilities/format/format.functions/vformat_to.pass.cpp b/libcxx/test/std/utilities/format/format.functions/vformat_to.pass.cpp
index c4fee6ba82a5..9872204392b5 100644
--- a/libcxx/test/std/utilities/format/format.functions/vformat_to.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.functions/vformat_to.pass.cpp
@@ -6,7 +6,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 // TODO FMT Evaluate gcc-12 status
 // UNSUPPORTED: gcc-12
 // TODO FMT Investigate AppleClang ICE
@@ -67,7 +67,7 @@ auto test_exception = []<class CharT, class... Args>(std::string_view what, std:
     std::vformat_to(std::back_inserter(out), fmt, std::make_format_args<context_t<CharT>>(args...));
     assert(false);
   } catch ([[maybe_unused]] const std::format_error& e) {
-    LIBCPP_ASSERT(e.what() == what);
+    LIBCUDACXX_ASSERT(e.what() == what);
     return;
   }
   assert(false);

diff  --git a/libcxx/test/std/utilities/format/format.syn/format_to_n_result.pass.cpp b/libcxx/test/std/utilities/format/format.syn/format_to_n_result.pass.cpp
index 6b21023ef952..589ce30b8d38 100644
--- a/libcxx/test/std/utilities/format/format.syn/format_to_n_result.pass.cpp
+++ b/libcxx/test/std/utilities/format/format.syn/format_to_n_result.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-format
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format
 
 // <format>
 

diff  --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp
index 6afdb0f544ed..574e5018f791 100644
--- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/divides.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp
index 273054cf198d..ac76aa69fc28 100644
--- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/minus.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp
index 4ce6a0f32543..b86ad9b5fe43 100644
--- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/modulus.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp
index d4f0a3e66ec1..0768b15d94fa 100644
--- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/multiplies.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp
index fd3d5f5f0700..b894d2d29315 100644
--- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/negate.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp b/libcxx/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp
index 06eb172c65e2..6a6f8c571c31 100644
--- a/libcxx/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/arithmetic.operations/plus.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp
index 780cd6e0c58d..58c90671c6ff 100644
--- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.bind/bind_return_type.pass.cpp
@@ -82,10 +82,10 @@ void do_test(Fn* func) {
     // Check that the call operator SFINAE's away when too few arguments
     // are provided but is well-formed otherwise.
     {
-        LIBCPP_STATIC_ASSERT(!CheckCall<Bind>(), "");
+        LIBCUDACXX_STATIC_ASSERT(!CheckCall<Bind>(), "");
         static_assert(CheckCall<Bind, int>(), "");
         static_assert(CheckCall<Bind, int, int>(), "");
-        LIBCPP_STATIC_ASSERT(!CheckCall<BindR>(), "");
+        LIBCUDACXX_STATIC_ASSERT(!CheckCall<BindR>(), "");
         static_assert(CheckCall<BindR, int>(), "");
         static_assert(CheckCall<BindR, int, int>(), "");
     }
@@ -109,7 +109,7 @@ void do_test_r(Fn* func) {
     // Check that the call operator SFINAE's away when too few arguments
     // are provided but is well-formed otherwise.
     {
-        LIBCPP_STATIC_ASSERT(!CheckCall<Bind>(), "");
+        LIBCUDACXX_STATIC_ASSERT(!CheckCall<Bind>(), "");
         static_assert(CheckCall<Bind, int>(), "");
         static_assert(CheckCall<Bind, int, int>(), "");
     }

diff  --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp
index f3ef086de397..f3edec71abe9 100644
--- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isbind/is_bind_expression.pass.cpp
@@ -20,15 +20,15 @@ void
 test(const T&)
 {
     static_assert(std::is_bind_expression<T>::value == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_bind_expression<T&>::value == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_bind_expression<const T>::value == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_bind_expression<const T&>::value == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_bind_expression<T&>::value == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_bind_expression<const T>::value == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_bind_expression<const T&>::value == Expected, "");
 
 #if TEST_STD_VER > 14
     static_assert(std::is_bind_expression_v<T> == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_bind_expression_v<T&> == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_bind_expression_v<const T> == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_bind_expression_v<const T&> == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_bind_expression_v<T&> == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_bind_expression_v<const T> == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_bind_expression_v<const T&> == Expected, "");
 #endif
 }
 

diff  --git a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isplace/is_placeholder.pass.cpp b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isplace/is_placeholder.pass.cpp
index c020ea4f10bb..cf8963b276ef 100644
--- a/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isplace/is_placeholder.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/bind/func.bind/func.bind.isplace/is_placeholder.pass.cpp
@@ -18,15 +18,15 @@ void
 test(const T&)
 {
     static_assert(std::is_placeholder<T>::value == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_placeholder<T&>::value == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_placeholder<const T>::value == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_placeholder<const T&>::value == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_placeholder<T&>::value == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_placeholder<const T>::value == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_placeholder<const T&>::value == Expected, "");
 
 #if TEST_STD_VER > 14
     static_assert(std::is_placeholder_v<T> == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_placeholder_v<T&> == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_placeholder_v<const T> == Expected, "");
-    LIBCPP_STATIC_ASSERT(std::is_placeholder_v<const T&> == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_placeholder_v<T&> == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_placeholder_v<const T> == Expected, "");
+    LIBCUDACXX_STATIC_ASSERT(std::is_placeholder_v<const T&> == Expected, "");
 #endif
 }
 

diff  --git a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp
index 621479b51ac9..b987d5f7c2d2 100644
--- a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_and.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp
index 4a6acddec2ff..f52422881199 100644
--- a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_not.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp
index 442363d107a6..86a763fe9604 100644
--- a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_or.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp
index eff1beadef78..d3598fb0c94b 100644
--- a/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/bitwise.operations/bit_xor.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp
index 0a1020994891..4f48b194119e 100644
--- a/libcxx/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/comparisons/equal_to.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/comparisons/greater.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/greater.pass.cpp
index 660c4d3d4f3e..4ce77fc6c5ee 100644
--- a/libcxx/test/std/utilities/function.objects/comparisons/greater.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/comparisons/greater.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp
index 597761587aed..577236bc5d68 100644
--- a/libcxx/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/comparisons/greater_equal.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/comparisons/less.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/less.pass.cpp
index 976f6e82c87e..1ea616389856 100644
--- a/libcxx/test/std/utilities/function.objects/comparisons/less.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/comparisons/less.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp
index fa38fe451055..f2a6b51a325d 100644
--- a/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/comparisons/less_equal.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp b/libcxx/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp
index 1d4a03c959fa..de87498cac8f 100644
--- a/libcxx/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/comparisons/not_equal_to.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp b/libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp
index 82849a815e7e..e4c0e68b96a1 100644
--- a/libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.invoke/invoke.pass.cpp
@@ -10,8 +10,8 @@
 
 // <functional>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template<class F, class... Args>
 // invoke_result_t<F, Args...> invoke(F&& f, Args&&... args) // C++17

diff  --git a/libcxx/test/std/utilities/function.objects/func.invoke/invoke_constexpr.pass.cpp b/libcxx/test/std/utilities/function.objects/func.invoke/invoke_constexpr.pass.cpp
index bfd8765b7d77..947f0f03ac86 100644
--- a/libcxx/test/std/utilities/function.objects/func.invoke/invoke_constexpr.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.invoke/invoke_constexpr.pass.cpp
@@ -10,8 +10,8 @@
 
 // <functional>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template<class F, class... Args>
 // constexpr  // constexpr in C++20

diff  --git a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
index 08fb15927aea..cef05ddaf9b8 100644
--- a/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.not_fn/not_fn.pass.cpp
@@ -396,7 +396,7 @@ bool call_operator_noexcept_test()
         using T = NoExceptCallable<bool>;
         T value(true);
         auto ret = std::not_fn(value);
-        LIBCPP_STATIC_ASSERT(noexcept(!_VSTD::__invoke(value)), "");
+        LIBCUDACXX_STATIC_ASSERT(noexcept(!_CUDA_VSTD::__invoke(value)), "");
 #if TEST_STD_VER > 14
         static_assert(noexcept(!std::invoke(value)), "");
 #endif

diff  --git a/libcxx/test/std/utilities/function.objects/func.require/binary_function.pass.cpp b/libcxx/test/std/utilities/function.objects/func.require/binary_function.pass.cpp
index 9302bf6c2ddd..10ab38e374d4 100644
--- a/libcxx/test/std/utilities/function.objects/func.require/binary_function.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.require/binary_function.pass.cpp
@@ -10,7 +10,7 @@
 // REQUIRES: c++03 || c++11 || c++14
 // binary_function was removed in C++17
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // binary_function
 

diff  --git a/libcxx/test/std/utilities/function.objects/func.require/unary_function.pass.cpp b/libcxx/test/std/utilities/function.objects/func.require/unary_function.pass.cpp
index 224e9fe6eaa5..85f5d186ac1a 100644
--- a/libcxx/test/std/utilities/function.objects/func.require/unary_function.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.require/unary_function.pass.cpp
@@ -10,7 +10,7 @@
 // REQUIRES: c++03 || c++11 || c++14
 // unary_function was removed in C++17
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // unary_function
 

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/addressof.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/addressof.pass.cpp
index 703b56f5cde8..cb8c200f6a2a 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/addressof.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/addressof.pass.cpp
@@ -11,7 +11,7 @@
 // class function<R(ArgTypes...)>
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 // Make sure we can use std::function with a type that has a hostile overload
 // of operator&().

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.alg/swap.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.alg/swap.pass.cpp
index c35c67a572b5..ff77e91bcbc4 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.alg/swap.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.alg/swap.pass.cpp
@@ -14,7 +14,7 @@
 //   void swap(function<R(ArgTypes...)>&, function<R(ArgTypes...)>&) noexcept;
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cstdlib>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.cap/operator_bool.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.cap/operator_bool.pass.cpp
index 59253c01a6cc..53ad8629e998 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.cap/operator_bool.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.cap/operator_bool.pass.cpp
@@ -13,7 +13,7 @@
 // explicit operator bool() const
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp
index 3af43f2019a6..6625013cf7fd 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F.pass.cpp
@@ -13,7 +13,7 @@
 // function(F);
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp
index 4abf6b8e91df..801b8de47aae 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_assign.pass.cpp
@@ -16,7 +16,7 @@
 //   operator=(F f);
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp
index ce0aba71ac25..a25080685064 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_incomplete.pass.cpp
@@ -15,7 +15,7 @@
 // Allow incomplete argument types in the __is_callable check
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp
index d3f7ee0c6e80..030850a1d9b0 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/F_nullptr.pass.cpp
@@ -16,7 +16,7 @@
 // See https://llvm.org/PR23589
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 //------------------------------------------------------------------------------
 // TESTING std::function<...>::__not_null(Callable)

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp
index 2f3cc6e31bdd..c180cb247d06 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc.pass.cpp
@@ -16,7 +16,7 @@
 // This signature was removed in C++17
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
index 9f35871d51af..b10b777a3870 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_F.pass.cpp
@@ -14,7 +14,7 @@
 // template<class F, class A> function(allocator_arg_t, const A&, F);
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
index 3ef1712ecf34..ea66b61bec96 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_function.pass.cpp
@@ -14,7 +14,7 @@
 // template<class A> function(allocator_arg_t, const A&, const function&);
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp
index 99746c057088..ec2ebcb69f70 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/alloc_nullptr.pass.cpp
@@ -16,7 +16,7 @@
 // This signature was removed in C++17
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp
index 9d6d12373829..e20ed450ee77 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_assign.pass.cpp
@@ -13,7 +13,7 @@
 // function& operator=(const function& f);
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
index 9e0612b9f632..acce39c8eb06 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/copy_move.pass.cpp
@@ -18,7 +18,7 @@
 // function(function&& f); // noexcept in C++20
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <memory>
@@ -116,7 +116,7 @@ int main(int, char**)
         assert(globalMemCounter.checkOutstandingNewEq(1));
         RTTI_ASSERT(f.target<A>());
         RTTI_ASSERT(f.target<int(*)(int)>() == 0);
-		LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
+		LIBCUDACXX_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
 #if TEST_STD_VER > 17
 		ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
 #endif
@@ -140,7 +140,7 @@ int main(int, char**)
         assert(A::count == 1);
         RTTI_ASSERT(f.target<A>() == nullptr);
         RTTI_ASSERT(f.target<Ref>());
-		LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
+		LIBCUDACXX_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
 #if TEST_STD_VER > 17
 		ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
 #endif
@@ -148,7 +148,7 @@ int main(int, char**)
         assert(A::count == 1);
         RTTI_ASSERT(f2.target<A>() == nullptr);
         RTTI_ASSERT(f2.target<Ref>());
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
         RTTI_ASSERT(f.target<Ref>()); // f is unchanged because the target is small
 #endif
     }
@@ -161,14 +161,14 @@ int main(int, char**)
         std::function<int(int)> f(p);
         RTTI_ASSERT(f.target<A>() == nullptr);
         RTTI_ASSERT(f.target<Ptr>());
-		LIBCPP_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
+		LIBCUDACXX_ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
 #if TEST_STD_VER > 17
 		ASSERT_NOEXCEPT(std::function<int(int)>(std::move(f)));
 #endif
         std::function<int(int)> f2(std::move(f));
         RTTI_ASSERT(f2.target<A>() == nullptr);
         RTTI_ASSERT(f2.target<Ptr>());
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
         RTTI_ASSERT(f.target<Ptr>()); // f is unchanged because the target is small
 #endif
     }

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/default.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/default.pass.cpp
index 90c83cd58769..8534c3f00cd6 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/default.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/default.pass.cpp
@@ -13,7 +13,7 @@
 // function();
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t.pass.cpp
index c7e6d19c207e..495dc1df866b 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t.pass.cpp
@@ -13,7 +13,7 @@
 // function(nullptr_t);
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign.pass.cpp
index 51a5a0fe5b22..6a48cb550f07 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.con/nullptr_t_assign.pass.cpp
@@ -13,7 +13,7 @@
 // function& operator=(nullptr_t);
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.pass.cpp
index b1ef0aaa9596..ada098adea34 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.inv/invoke.pass.cpp
@@ -13,7 +13,7 @@
 // R operator()(ArgTypes... args) const
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 // Address Sanitizer doesn't instrument weak symbols on Linux. When a key
 // function is defined for bad_function_call's vtable, its typeinfo and vtable

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp
index a565d9f4f6a5..35f355a51afd 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/assign_F_alloc.pass.cpp
@@ -14,7 +14,7 @@
 //     This call was removed post-C++14
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/swap.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/swap.pass.cpp
index e7f6989b4e07..8fa9eff7024b 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/swap.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.mod/swap.pass.cpp
@@ -13,7 +13,7 @@
 // void swap(function& other);
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_==.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_==.pass.cpp
index d2c1dd11467e..a2932c74e3aa 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_==.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.nullptr/operator_==.pass.cpp
@@ -23,7 +23,7 @@
 //   bool operator!=(nullptr_t, const function<R(ArgTypes...)>&);
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target.pass.cpp
index 9d9c6443482b..bb92885e0adc 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target.pass.cpp
@@ -20,7 +20,7 @@
 //   target() const;
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 // UNSUPPORTED: no-rtti
 

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target_type.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target_type.pass.cpp
index b7eb0cccabc8..b8d357c23eeb 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target_type.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/func.wrap.func.targ/target_type.pass.cpp
@@ -13,7 +13,7 @@
 // const std::type_info& target_type() const;
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 // UNSUPPORTED: no-rtti
 

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type.pass.cpp
index 911edc10e1e1..c2dacf31fb41 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/noncopyable_return_type.pass.cpp
@@ -12,7 +12,7 @@
 // std::function that only 
diff er in constness of the return type, with this
 // error:
 // include/c++/v1/__functional/function.h:254:31: error: definition with same mangled name '??0?$__base@$$A6AXXZ at __function@__1 at std@@QEAA at XZ' as another definition
-//     _LIBCPP_INLINE_VISIBILITY __base() {}
+//     _LIBCUDACXX_INLINE_VISIBILITY __base() {}
 // include/c++/v1/__functional/function.h:254:31: note: previous definition is here
 // XFAIL: msvc
 

diff  --git a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp
index e3fa858306f0..079defe34d41 100644
--- a/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/func.wrap/func.wrap.func/types.pass.cpp
@@ -22,7 +22,7 @@
 //  };
 
 // This test runs in C++03, but we have deprecated using std::function in C++03.
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS -D_LIBCPP_ENABLE_CXX03_FUNCTION
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS -D_LIBCUDACXX_ENABLE_CXX03_FUNCTION
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp b/libcxx/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp
index d0c58b666177..fb0f8e1c172c 100644
--- a/libcxx/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/logical.operations/logical_and.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp b/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp
index 338101596c0a..2d31cf8f3b64 100644
--- a/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/logical.operations/logical_not.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp b/libcxx/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp
index 1388375bea08..0a28e920771a 100644
--- a/libcxx/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/logical.operations/logical_or.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp
index 1f6e153021e8..707ba652af54 100644
--- a/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/binary_negate.depr_in_cxx17.verify.cpp
@@ -12,7 +12,7 @@
 //  deprecated in C++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS
 
 #include <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp
index a3c54fa803e1..d0bf22e3c7ff 100644
--- a/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/binary_negate.pass.cpp
@@ -10,9 +10,9 @@
 
 // binary_negate
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp
index e807a1ec6d4c..20d91a6283e0 100644
--- a/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/not1.depr_in_cxx17.verify.cpp
@@ -12,7 +12,7 @@
 //  deprecated in C++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS
 
 #include <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp
index 623c6cb7e506..aeb35df7719f 100644
--- a/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/not1.pass.cpp
@@ -10,9 +10,9 @@
 
 // not1
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp
index 7e079f5d35f8..189602efe242 100644
--- a/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/not2.depr_in_cxx17.verify.cpp
@@ -12,7 +12,7 @@
 //  deprecated in C++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS
 
 #include <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp
index e097f272b76c..97e30ce433a8 100644
--- a/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/not2.pass.cpp
@@ -10,9 +10,9 @@
 
 // not2
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp b/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp
index 1cf16297c287..182304de0680 100644
--- a/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/unary_negate.depr_in_cxx17.verify.cpp
@@ -12,7 +12,7 @@
 //  deprecated in C++17
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS
 
 #include <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp b/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp
index 589b17e4c90e..163c8c423286 100644
--- a/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/negators/unary_negate.pass.cpp
@@ -10,9 +10,9 @@
 
 // unary_negate
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_NEGATORS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_BINDER_TYPEDEFS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_NEGATORS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/utilities/function.objects/refwrap/binder_typedefs.compile.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/binder_typedefs.compile.pass.cpp
index 23fd0a136161..29a7c0917278 100644
--- a/libcxx/test/std/utilities/function.objects/refwrap/binder_typedefs.compile.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/refwrap/binder_typedefs.compile.pass.cpp
@@ -8,7 +8,7 @@
 
 // REQUIRES: c++03 || c++11 || c++14 || c++17
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp b/libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp
index 512d4e62ba8b..64a8ee99f43a 100644
--- a/libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/refwrap/weak_result.pass.cpp
@@ -14,7 +14,7 @@
 
 // REQUIRES: c++03 || c++11 || c++14 || c++17
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <functional>
 #include <type_traits>

diff  --git a/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
index 6dd14dc77496..354901ff97aa 100644
--- a/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/unord.hash/enum.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp
index b8f85e193dc8..fdcfce9e60a0 100644
--- a/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/unord.hash/floating.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
index 2cfed3e2ba22..fe5e4cd512eb 100644
--- a/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/unord.hash/integral.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 
@@ -44,7 +44,7 @@ test()
         if (small)
         {
             const std::size_t result = h(t);
-            LIBCPP_ASSERT(result == static_cast<size_t>(t));
+            LIBCUDACXX_ASSERT(result == static_cast<size_t>(t));
             ((void)result); // Prevent unused warning
         }
     }

diff  --git a/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp b/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp
index 577a9bf0e15b..1ec018eb6299 100644
--- a/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp
+++ b/libcxx/test/std/utilities/function.objects/unord.hash/pointer.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <functional>
 

diff  --git a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp
index 8ba71238a5f4..4d082f4c695a 100644
--- a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp
+++ b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq.fail.cpp
@@ -28,7 +28,7 @@ int main(int, char**)
 
   // std::make_integer_sequence is implemented using a compiler builtin if available.
   // this builtin has 
diff erent diagnostic messages than the fallback implementation.
-#if TEST_HAS_BUILTIN(__make_integer_seq) && !defined(_LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
+#if TEST_HAS_BUILTIN(__make_integer_seq) && !defined(_LIBCUDACXX_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE)
   MakeSeqT i; // expected-error@*:* {{integer sequences must have non-negative sequence length}}
 #else
   MakeSeqT i; // expected-error-re@*:* {{{{(static_assert|static assertion)}} failed{{.*}}std::make_integer_sequence must have a non-negative sequence length}}

diff  --git a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.compile.fail.cpp b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.compile.fail.cpp
index 23dd15414a15..880f9052db5a 100644
--- a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.compile.fail.cpp
+++ b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.compile.fail.cpp
@@ -16,5 +16,5 @@
 // This test hangs during recursive template instantiation with libstdc++
 // UNSUPPORTED: stdlib=libstdc++
 
-#define _LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE
+#define _LIBCUDACXX_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE
 #include "make_integer_seq.fail.cpp"

diff  --git a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.pass.cpp b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.pass.cpp
index ceeb4dd3eeec..da0b4a107ca9 100644
--- a/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.pass.cpp
+++ b/libcxx/test/std/utilities/intseq/intseq.make/make_integer_seq_fallback.pass.cpp
@@ -13,7 +13,7 @@
 
 // UNSUPPORTED: c++03, c++11
 
-#define _LIBCPP_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE
+#define _LIBCUDACXX_TESTING_FALLBACK_MAKE_INTEGER_SEQUENCE
 #include "make_integer_seq.pass.cpp"
 
 #include "test_macros.h"

diff  --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.dtor.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.dtor.pass.cpp
index a095ca102491..a6d43d1a652e 100644
--- a/libcxx/test/std/utilities/memory/default.allocator/allocator.dtor.pass.cpp
+++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.dtor.pass.cpp
@@ -26,15 +26,15 @@ int main(int, char**)
 {
     test<int>();
     test<void>();
-#ifdef _LIBCPP_VERSION // extension
+#ifdef _LIBCUDACXX_VERSION // extension
     test<int const>();
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
     static_assert(test<int>());
     static_assert(test<void>());
-#ifdef _LIBCPP_VERSION // extension
+#ifdef _LIBCUDACXX_VERSION // extension
     static_assert(test<int const>());
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
     return 0;
 }

diff  --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.constexpr.size.verify.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.constexpr.size.verify.cpp
index a083e2d88b97..e317cdc322e1 100644
--- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.constexpr.size.verify.cpp
+++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.constexpr.size.verify.cpp
@@ -35,6 +35,6 @@ constexpr bool test()
 int main(int, char**)
 {
     static_assert(test<double>()); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
-    LIBCPP_STATIC_ASSERT(test<const double>()); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
+    LIBCUDACXX_STATIC_ASSERT(test<const double>()); // expected-error-re {{{{(static_assert|static assertion)}} expression is not an integral constant expression}}
     return 0;
 }

diff  --git a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
index 6b9b12c82242..7c3d05fc1551 100644
--- a/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
+++ b/libcxx/test/std/utilities/memory/default.allocator/allocator.members/allocate.size.pass.cpp
@@ -44,7 +44,7 @@ void test()
 int main(int, char**)
 {
     test<double>();
-    LIBCPP_ONLY(test<const double>());
+    LIBCUDACXX_ONLY(test<const double>());
 
   return 0;
 }

diff  --git a/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
index 74adc6943594..9d33faf97b47 100644
--- a/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
+++ b/libcxx/test/std/utilities/memory/default.allocator/allocator_types.pass.cpp
@@ -29,7 +29,7 @@
 // ...
 // };
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <type_traits>
@@ -59,7 +59,7 @@ void test() {
 
 int main(int, char**) {
     test<char>();
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
     test<char const>(); // extension
 #endif
     return 0;

diff  --git a/libcxx/test/std/utilities/memory/default.allocator/allocator_types.void.compile.pass.cpp b/libcxx/test/std/utilities/memory/default.allocator/allocator_types.void.compile.pass.cpp
index d7b4a1b1bdf4..a8e934bb85d3 100644
--- a/libcxx/test/std/utilities/memory/default.allocator/allocator_types.void.compile.pass.cpp
+++ b/libcxx/test/std/utilities/memory/default.allocator/allocator_types.void.compile.pass.cpp
@@ -23,7 +23,7 @@
 //     template <class _Up> struct rebind {typedef allocator<_Up> other;};
 // };
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <type_traits>

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/buffer.h b/libcxx/test/std/utilities/memory/specialized.algorithms/buffer.h
index 1114fdc68e72..ac1daf441183 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/buffer.h
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/buffer.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LIBCPP_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_BUFFER_H
-#define LIBCPP_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_BUFFER_H
+#ifndef LIBCUDACXX_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_BUFFER_H
+#define LIBCUDACXX_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_BUFFER_H
 
 template <typename T, int N>
 struct Buffer {
@@ -22,4 +22,4 @@ struct Buffer {
   constexpr int size() const { return N; }
 };
 
-#endif // LIBCPP_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_BUFFER_H
+#endif // LIBCUDACXX_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_BUFFER_H

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/counted.h b/libcxx/test/std/utilities/memory/specialized.algorithms/counted.h
index 1d4cc5229a59..3f8e4ed13ee8 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/counted.h
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/counted.h
@@ -7,8 +7,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LIBCPP_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_COUNTED_H
-#define LIBCPP_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_COUNTED_H
+#ifndef LIBCUDACXX_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_COUNTED_H
+#define LIBCUDACXX_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_COUNTED_H
 
 #include "test_macros.h"
 
@@ -82,4 +82,4 @@ int Counted::total_copies = 0;
 int Counted::total_moves = 0;
 int Counted::throw_on = -1;
 
-#endif // LIBCPP_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_COUNTED_H
+#endif // LIBCUDACXX_TEST_STD_UTILITIES_MEMORY_SPECIALIZED_ALGORITHMS_COUNTED_H

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.construct/ranges_construct_at.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.construct/ranges_construct_at.pass.cpp
index 6dd403689a1c..7209c146a409 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.construct/ranges_construct_at.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.construct/ranges_construct_at.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 //
@@ -28,7 +28,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::construct_at)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::construct_at)>);
 
 struct Foo {
   int x = 0;

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy.pass.cpp
index 573a43c2e8cb..51f5499bae72 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 //
@@ -32,7 +32,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::destroy)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::destroy)>);
 
 struct NotNothrowDtrable {
   ~NotNothrowDtrable() noexcept(false) {}

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_at.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_at.pass.cpp
index db7430414e6b..662eeb8ebf43 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_at.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_at.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 //
@@ -26,7 +26,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::destroy_at)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::destroy_at)>);
 
 struct NotNothrowDtrable {
   ~NotNothrowDtrable() noexcept(false) {}

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_n.pass.cpp
index 5018ac4bc67c..560ce354ad63 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_n.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ranges_destroy_n.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 //
@@ -29,7 +29,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::destroy_n)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::destroy_n)>);
 
 struct NotNothrowDtrable {
   ~NotNothrowDtrable() noexcept(false) {}

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct.pass.cpp
index 0998c833985a..49aa8ba8d1fa 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 
@@ -34,7 +34,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_default_construct)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_default_construct)>);
 
 struct NotDefaultCtrable { NotDefaultCtrable() = delete; };
 static_assert(!std::is_invocable_v<decltype(std::ranges::uninitialized_default_construct),

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct_n.pass.cpp
index d13a1bfaa600..86ad578c6990 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct_n.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.default/ranges_uninitialized_default_construct_n.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 
@@ -29,7 +29,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_default_construct_n)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_default_construct_n)>);
 
 struct NotDefaultCtrable { NotDefaultCtrable() = delete; };
 static_assert(!std::is_invocable_v<decltype(std::ranges::uninitialized_default_construct_n),

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/ranges_uninitialized_value_construct.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/ranges_uninitialized_value_construct.pass.cpp
index 8fd8ebce2007..69749b2d5082 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/ranges_uninitialized_value_construct.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/ranges_uninitialized_value_construct.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 
@@ -34,7 +34,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_value_construct)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_value_construct)>);
 
 struct NotDefaultCtrable {
   NotDefaultCtrable() = delete;

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/ranges_uninitialized_value_construct_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/ranges_uninitialized_value_construct_n.pass.cpp
index 032fc56df076..9162ec9b5ba3 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/ranges_uninitialized_value_construct_n.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.construct.value/ranges_uninitialized_value_construct_n.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 
@@ -29,7 +29,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_value_construct_n)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_value_construct_n)>);
 
 struct NotDefaultCtrable {
   NotDefaultCtrable() = delete;

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy.pass.cpp
index b6bf4fe9306d..b45f6fcaf94a 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 //
@@ -35,7 +35,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_copy)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_copy)>);
 
 static_assert(std::is_invocable_v<decltype(std::ranges::uninitialized_copy), int*, int*, long*, long*>);
 struct NotConvertibleFromInt {};

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy_n.pass.cpp
index f0bd16bfb498..fa0c73b71c27 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy_n.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.copy/ranges_uninitialized_copy_n.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 //
@@ -32,7 +32,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_copy_n)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_copy_n)>);
 
 static_assert(std::is_invocable_v<decltype(std::ranges::uninitialized_copy_n), int*, size_t, long*, long*>);
 struct NotConvertibleFromInt {};

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/ranges_uninitialized_fill_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/ranges_uninitialized_fill_n.pass.cpp
index 15e4291d74ce..c185486587e6 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/ranges_uninitialized_fill_n.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill.n/ranges_uninitialized_fill_n.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 
@@ -31,7 +31,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_fill_n)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_fill_n)>);
 
 struct NotConvertibleFromInt {};
 static_assert(!std::is_invocable_v<decltype(std::ranges::uninitialized_fill_n), NotConvertibleFromInt*, size_t, int>);

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill/ranges_uninitialized_fill.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill/ranges_uninitialized_fill.pass.cpp
index c93c86f7c1f2..dcb03920eec1 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill/ranges_uninitialized_fill.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.fill/ranges_uninitialized_fill.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 
@@ -35,7 +35,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_fill)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_fill)>);
 
 struct NotConvertibleFromInt {};
 static_assert(!std::is_invocable_v<decltype(std::ranges::uninitialized_fill), NotConvertibleFromInt*,

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move.pass.cpp
index 4d635613d599..8e9eaa33bdc4 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 //
@@ -34,7 +34,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_move)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_move)>);
 
 static_assert(std::is_invocable_v<decltype(std::ranges::uninitialized_move), int*, int*, long*, long*>);
 struct NotConvertibleFromInt {};

diff  --git a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move_n.pass.cpp b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move_n.pass.cpp
index a0ac5dc2daff..c23ad1080b95 100644
--- a/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move_n.pass.cpp
+++ b/libcxx/test/std/utilities/memory/specialized.algorithms/uninitialized.move/ranges_uninitialized_move_n.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <memory>
 //
@@ -31,7 +31,7 @@
 // Because this is a variable and not a function, it's guaranteed that ADL won't be used. However,
 // implementations are allowed to use a 
diff erent mechanism to achieve this effect, so this check is
 // libc++-specific.
-LIBCPP_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_move_n)>);
+LIBCUDACXX_STATIC_ASSERT(std::is_class_v<decltype(std::ranges::uninitialized_move_n)>);
 
 static_assert(std::is_invocable_v<decltype(std::ranges::uninitialized_move_n), int*, size_t, long*, long*>);
 struct NotConvertibleFromInt {};

diff  --git a/libcxx/test/std/utilities/memory/storage.iterator/deprecated.verify.cpp b/libcxx/test/std/utilities/memory/storage.iterator/deprecated.verify.cpp
index 3ad3cf81bfb8..0ca9b3e1618a 100644
--- a/libcxx/test/std/utilities/memory/storage.iterator/deprecated.verify.cpp
+++ b/libcxx/test/std/utilities/memory/storage.iterator/deprecated.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
 
 // std::raw_storage_iterator
 

diff  --git a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp
index 8d7c9d5a4309..657d77a2fd28 100644
--- a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp
+++ b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.base.pass.cpp
@@ -7,8 +7,8 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // raw_storage_iterator
 

diff  --git a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp
index 4fbbbb1e54c2..9c2d252b4ebb 100644
--- a/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp
+++ b/libcxx/test/std/utilities/memory/storage.iterator/raw_storage_iterator.pass.cpp
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // raw_storage_iterator
 

diff  --git a/libcxx/test/std/utilities/memory/storage.iterator/types.compile.pass.cpp b/libcxx/test/std/utilities/memory/storage.iterator/types.compile.pass.cpp
index d11ab1a64b80..940e9450f914 100644
--- a/libcxx/test/std/utilities/memory/storage.iterator/types.compile.pass.cpp
+++ b/libcxx/test/std/utilities/memory/storage.iterator/types.compile.pass.cpp
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_RAW_STORAGE_ITERATOR
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // raw_storage_iterator associated types
 

diff  --git a/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp b/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
index 08aab53a8315..3d47aad2c62d 100644
--- a/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
+++ b/libcxx/test/std/utilities/memory/temporary.buffer/overaligned.pass.cpp
@@ -13,7 +13,7 @@
 // we won't pass prior to c++17.
 // UNSUPPORTED: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}}
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <memory>
 

diff  --git a/libcxx/test/std/utilities/memory/temporary.buffer/temporary_buffer.pass.cpp b/libcxx/test/std/utilities/memory/temporary.buffer/temporary_buffer.pass.cpp
index 7a0f89412ce6..070f030c61bc 100644
--- a/libcxx/test/std/utilities/memory/temporary.buffer/temporary_buffer.pass.cpp
+++ b/libcxx/test/std/utilities/memory/temporary.buffer/temporary_buffer.pass.cpp
@@ -8,7 +8,7 @@
 
 // <memory>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // template <class T>
 //   pair<T*, ptr
diff _t>

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
index ed601b52c537..e607b883d3d1 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/auto_ptr_Y.pass.cpp
@@ -13,7 +13,7 @@
 // template<class Y> shared_ptr& operator=(auto_ptr<Y>&& r);
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <type_traits>

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
index 7bf1501d1bcd..631fec8d7e3a 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/shared_ptr.pass.cpp
@@ -12,7 +12,7 @@
 
 // shared_ptr& operator=(const shared_ptr& r);
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <type_traits>

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
index 3063e776178f..0ae5db3c26ad 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.assign/unique_ptr_Y.pass.cpp
@@ -125,7 +125,7 @@ int main(int, char**)
     assert(B::count == 0);
     assert(A::count == 0);
 
-#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
+#ifdef _LIBCUDACXX_VERSION // https://llvm.org/PR53368
     {
       std::unique_ptr<A[]> ptr(new A[8]);
       A* raw_ptr = ptr.get();
@@ -157,7 +157,7 @@ int main(int, char**)
       std::shared_ptr<int> p;
       p = std::move(ptr);
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
 #if TEST_STD_VER > 14
     {
@@ -171,7 +171,7 @@ int main(int, char**)
     assert(A::count == 0);
     assert(B::count == 0);
 
-#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
+#ifdef _LIBCUDACXX_VERSION // https://llvm.org/PR53368
     {
       std::unique_ptr<A[]> ptr(new A[8]);
       A* raw_ptr = ptr.get();
@@ -185,7 +185,7 @@ int main(int, char**)
     }
     assert(A::count == 0);
     assert(B::count == 0);
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
     {
       std::unique_ptr<A[]> ptr(new A[8]);

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
index 6f641cec24bf..a06f686753b6 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/auto_ptr.pass.cpp
@@ -11,7 +11,7 @@
 // template<class Y> explicit shared_ptr(auto_ptr<Y>&& r);
 
 // REQUIRES: c++03 || c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <memory>
 #include <new>

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp
index 9ef8ed7876f6..f3bfa0b142c6 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/shared_ptr_pointer.pass.cpp
@@ -94,7 +94,7 @@ int main(int, char**)
       assert(p2.get() == nullptr);
     }
 
-#if TEST_STD_VER > 17 && defined(_LIBCPP_VERSION)
+#if TEST_STD_VER > 17 && defined(_LIBCUDACXX_VERSION)
     // This won't pass when LWG-2996 is implemented.
     {
       std::shared_ptr<A> pA(new A);

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
index 203659bf4b63..e4586954b756 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.const/unique_ptr.pass.cpp
@@ -168,7 +168,7 @@ int main(int, char**)
     }
 
     assert(A::count == 0);
-#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
+#ifdef _LIBCUDACXX_VERSION // https://llvm.org/PR53368
     {
       std::unique_ptr<A[]> ptr(new A[8]);
       A* raw_ptr = ptr.get();
@@ -197,7 +197,7 @@ int main(int, char**)
       std::unique_ptr<int[]> ptr(new int[8]);
       std::shared_ptr<int> p(std::move(ptr));
     }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
 #if TEST_STD_VER > 14
     {
@@ -210,7 +210,7 @@ int main(int, char**)
     assert(A::count == 0);
     assert(B::count == 0);
 
-#ifdef _LIBCPP_VERSION // https://llvm.org/PR53368
+#ifdef _LIBCUDACXX_VERSION // https://llvm.org/PR53368
     {
       std::unique_ptr<A[]> ptr(new A[8]);
       A* raw_ptr = ptr.get();
@@ -223,7 +223,7 @@ int main(int, char**)
     }
     assert(A::count == 0);
     assert(B::count == 0);
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
     {
       std::unique_ptr<A[]> ptr(new A[8]);

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
index 23a904f8ae11..3f900926675e 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.shared/util.smartptr.shared.create/make_shared.pass.cpp
@@ -49,7 +49,7 @@ struct Foo
     virtual ~Foo() = default;
 };
 
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
 struct Result {};
 static Result theFunction() { return Result(); }
 static int resultDeletorCount;
@@ -65,9 +65,9 @@ void test_pointer_to_function() {
     }
     assert(resultDeletorCount == 2);
 }
-#else // _LIBCPP_VERSION
+#else // _LIBCUDACXX_VERSION
 void test_pointer_to_function() {}
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
 template <typename T>
 void test(const T &t0)

diff  --git a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
index 132065acbc6d..ac99d9197b48 100644
--- a/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
+++ b/libcxx/test/std/utilities/memory/util.smartptr/util.smartptr.weak/util.smartptr.ownerless/owner_less.pass.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <memory>
 

diff  --git a/libcxx/test/std/utilities/meta/meta.rel/is_convertible_fallback.pass.cpp b/libcxx/test/std/utilities/meta/meta.rel/is_convertible_fallback.pass.cpp
index 28495cfebd45..84414619325f 100644
--- a/libcxx/test/std/utilities/meta/meta.rel/is_convertible_fallback.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.rel/is_convertible_fallback.pass.cpp
@@ -8,7 +8,7 @@
 
 // UNSUPPORTED: c++03
 
-// ADDITIONAL_COMPILE_FLAGS: -D _LIBCPP_USE_IS_CONVERTIBLE_FALLBACK
+// ADDITIONAL_COMPILE_FLAGS: -D _LIBCUDACXX_USE_IS_CONVERTIBLE_FALLBACK
 
 // type_traits
 

diff  --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.deprecated.verify.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.deprecated.verify.cpp
index ddbddb8e0576..35938b71adda 100644
--- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.deprecated.verify.cpp
+++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.deprecated.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS
 
 // type_traits
 

diff  --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.pass.cpp
index 78ff8fbd1170..28ed2035228c 100644
--- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of.pass.cpp
@@ -10,8 +10,8 @@
 
 // result_of<Fn(ArgTypes...)>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <type_traits>
 #include <cassert>

diff  --git a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
index c1100916d90a..20496ea1a69c 100644
--- a/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.trans/meta.trans.other/result_of11.pass.cpp
@@ -12,8 +12,8 @@
 //
 // result_of<Fn(ArgTypes...)>
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <type_traits>
 #include <functional>
@@ -66,7 +66,7 @@ void test_result_of_imp()
 }
 
 // Do not warn on deprecated uses of 'volatile' below.
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
 
 int main(int, char**)
 {
@@ -185,4 +185,4 @@ int main(int, char**)
   return 0;
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP

diff  --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.deprecated.verify.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.deprecated.verify.cpp
index b9ace121e72f..e62d1b07dbef 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.deprecated.verify.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.deprecated.verify.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS
 
 // type_traits
 

diff  --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp
index 1c85560ba7b2..ee9f01188199 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_literal_type.pass.cpp
@@ -10,8 +10,8 @@
 
 // is_literal_type
 
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_CXX20_REMOVED_TYPE_TRAITS
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_CXX20_REMOVED_TYPE_TRAITS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 #include <type_traits>
 #include <cstddef>       // for std::nullptr_t

diff  --git a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp
index 5931e7ce7f30..318e6c2ed3b7 100644
--- a/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp
+++ b/libcxx/test/std/utilities/meta/meta.unary/meta.unary.prop/is_swappable_include_order.pass.cpp
@@ -28,7 +28,7 @@ int main(int, char**)
     // Use a builtin type so we don't get ADL lookup.
     typedef double T[17][29];
     {
-        LIBCPP_STATIC_ASSERT(std::__is_swappable<T>::value, "");
+        LIBCUDACXX_STATIC_ASSERT(std::__is_swappable<T>::value, "");
 #if TEST_STD_VER > 14
         static_assert(std::is_swappable_v<T>, "");
 #endif

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp
index c5cfb4ccc42f..004930674a4c 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/copy.pass.cpp
@@ -54,8 +54,8 @@ int main(int, char**)
     {
         using O = optional<int>;
 #if TEST_STD_VER > 17
-        LIBCPP_STATIC_ASSERT(assign_empty(O{42}), "");
-        LIBCPP_STATIC_ASSERT(assign_value(O{42}), "");
+        LIBCUDACXX_STATIC_ASSERT(assign_empty(O{42}), "");
+        LIBCUDACXX_STATIC_ASSERT(assign_value(O{42}), "");
 #endif
         assert(assign_empty(O{42}));
         assert(assign_value(O{42}));
@@ -63,8 +63,8 @@ int main(int, char**)
     {
         using O = optional<TrivialTestTypes::TestType>;
 #if TEST_STD_VER > 17
-        LIBCPP_STATIC_ASSERT(assign_empty(O{42}), "");
-        LIBCPP_STATIC_ASSERT(assign_value(O{42}), "");
+        LIBCUDACXX_STATIC_ASSERT(assign_empty(O{42}), "");
+        LIBCUDACXX_STATIC_ASSERT(assign_value(O{42}), "");
 #endif
         assert(assign_empty(O{42}));
         assert(assign_value(O{42}));

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp
index 1f47d552993e..8bac0587fd22 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.assign/move.pass.cpp
@@ -115,8 +115,8 @@ int main(int, char**)
     {
         using O = optional<int>;
 #if TEST_STD_VER > 17
-        LIBCPP_STATIC_ASSERT(assign_empty(O{42}), "");
-        LIBCPP_STATIC_ASSERT(assign_value(O{42}), "");
+        LIBCUDACXX_STATIC_ASSERT(assign_empty(O{42}), "");
+        LIBCUDACXX_STATIC_ASSERT(assign_value(O{42}), "");
 #endif
         assert(assign_empty(O{42}));
         assert(assign_value(O{42}));
@@ -124,8 +124,8 @@ int main(int, char**)
     {
         using O = optional<TrivialTestTypes::TestType>;
 #if TEST_STD_VER > 17
-        LIBCPP_STATIC_ASSERT(assign_empty(O{42}), "");
-        LIBCPP_STATIC_ASSERT(assign_value(O{42}), "");
+        LIBCUDACXX_STATIC_ASSERT(assign_empty(O{42}), "");
+        LIBCUDACXX_STATIC_ASSERT(assign_value(O{42}), "");
 #endif
         assert(assign_empty(O{42}));
         assert(assign_value(O{42}));

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp
index 265b4bf9682c..36eb30d9e105 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/copy.pass.cpp
@@ -77,7 +77,7 @@ void test_ref(InitArgs&&... args)
 
 void test_reference_extension()
 {
-#if defined(_LIBCPP_VERSION) && 0 // FIXME these extensions are currently disabled.
+#if defined(_LIBCUDACXX_VERSION) && 0 // FIXME these extensions are currently disabled.
     using T = TestTypes::TestType;
     T::reset();
     {

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp
index 61a365edb64e..cf5bc730b865 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/default.pass.cpp
@@ -70,7 +70,7 @@ int main(int, char**)
     test_constexpr<optional<NonConstexprTypes::NoCtors>>();
     test<optional<NonLiteralTypes::NoCtors>>();
     // EXTENSIONS
-#if defined(_LIBCPP_VERSION) && 0 // FIXME these extensions are currently disabled.
+#if defined(_LIBCUDACXX_VERSION) && 0 // FIXME these extensions are currently disabled.
     test_constexpr<optional<int&>>();
     test_constexpr<optional<const int&>>();
     test_constexpr<optional<int&>>();

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp
index e4918f7cac11..50e5277f8c2e 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/move.pass.cpp
@@ -83,7 +83,7 @@ void test_ref(InitArgs&&... args)
 
 void test_reference_extension()
 {
-#if defined(_LIBCPP_VERSION) && 0 // FIXME these extensions are currently disabled.
+#if defined(_LIBCUDACXX_VERSION) && 0 // FIXME these extensions are currently disabled.
     using T = TestTypes::TestType;
     T::reset();
     {

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp
index 5b04e5a35aaf..7204e465e400 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference.pass.cpp
@@ -44,7 +44,7 @@ int main(int, char**)
     {
         optional<X> opt; ((void)opt);
         ASSERT_SAME_TYPE(decltype(*opt), X&);
-        LIBCPP_STATIC_ASSERT(noexcept(*opt));
+        LIBCUDACXX_STATIC_ASSERT(noexcept(*opt));
         // ASSERT_NOT_NOEXCEPT(*opt);
         // FIXME: This assertion fails with GCC because it can see that
         // (A) operator*() is constexpr, and

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
index f323cd1a5e40..5ca0d2a50327 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const.pass.cpp
@@ -37,7 +37,7 @@ int main(int, char**)
     {
         const optional<X> opt; ((void)opt);
         ASSERT_SAME_TYPE(decltype(*opt), X const&);
-        LIBCPP_STATIC_ASSERT(noexcept(*opt));
+        LIBCUDACXX_STATIC_ASSERT(noexcept(*opt));
         // ASSERT_NOT_NOEXCEPT(*opt);
         // FIXME: This assertion fails with GCC because it can see that
         // (A) operator*() is constexpr, and

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp
index 68591c5e2dbc..2c31a9213a65 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_const_rvalue.pass.cpp
@@ -37,7 +37,7 @@ int main(int, char**)
     {
         const optional<X> opt; ((void)opt);
         ASSERT_SAME_TYPE(decltype(*std::move(opt)), X const &&);
-        LIBCPP_STATIC_ASSERT(noexcept(*opt));
+        LIBCUDACXX_STATIC_ASSERT(noexcept(*opt));
         // ASSERT_NOT_NOEXCEPT(*std::move(opt));
         // FIXME: This assertion fails with GCC because it can see that
         // (A) operator*() is constexpr, and

diff  --git a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp
index 67edbb903353..4c6fad5521d2 100644
--- a/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp
+++ b/libcxx/test/std/utilities/optional/optional.object/optional.object.observe/dereference_rvalue.pass.cpp
@@ -44,7 +44,7 @@ int main(int, char**)
     {
         optional<X> opt; ((void)opt);
         ASSERT_SAME_TYPE(decltype(*std::move(opt)), X&&);
-        LIBCPP_STATIC_ASSERT(noexcept(*opt));
+        LIBCUDACXX_STATIC_ASSERT(noexcept(*opt));
         // ASSERT_NOT_NOEXCEPT(*std::move(opt));
         // FIXME: This assertion fails with GCC because it can see that
         // (A) operator*() is constexpr, and

diff  --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp
index 587715a3d89d..14ba8a932113 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/auto_pointer.pass.cpp
@@ -9,7 +9,7 @@
 // libc++ cannot safely provide the auto_ptr constructor without rvalue
 // references.
 // REQUIRES: c++11 || c++14
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS
 
 // <memory>
 

diff  --git a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp
index 59861effb4ef..8a666cc59615 100644
--- a/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp
+++ b/libcxx/test/std/utilities/smartptr/unique.ptr/unique.ptr.class/unique.ptr.ctor/pointer_deleter.pass.cpp
@@ -61,7 +61,7 @@ void test_sfinae() {
     static_assert(std::is_constructible<U, int*, D const&>::value, "");
     static_assert(std::is_constructible<U, int*, D&>::value, "");
     static_assert(std::is_constructible<U, int*, D&&>::value, "");
-    // FIXME: __libcpp_compressed_pair attempts to perform a move even though
+    // FIXME: __LIBCUDACXX_compressed_pair attempts to perform a move even though
     // it should only copy.
     //D d;
     //U u(nullptr, std::move(d));
@@ -145,7 +145,7 @@ void test_sfinae_runtime() {
     static_assert(!std::is_constructible<U, B*, D const&>::value, "");
     static_assert(!std::is_constructible<U, B*, D&>::value, "");
     static_assert(!std::is_constructible<U, B*, D&&>::value, "");
-    // FIXME: __libcpp_compressed_pair attempts to perform a move even though
+    // FIXME: __LIBCUDACXX_compressed_pair attempts to perform a move even though
     // it should only copy.
     //D d;
     //U u(nullptr, std::move(d));

diff  --git a/libcxx/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
index 2e407ad9c342..322bb636a0c1 100644
--- a/libcxx/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
+++ b/libcxx/test/std/utilities/template.bitset/bitset.hash/bitset.pass.cpp
@@ -35,7 +35,7 @@ test()
     H h;
     T bs(static_cast<unsigned long long>(N));
     const std::size_t result = h(bs);
-    LIBCPP_ASSERT(result == N);
+    LIBCUDACXX_ASSERT(result == N);
     ((void)result); // Prevent unused warning
 }
 

diff  --git a/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp b/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp
index 4c0830b4125c..e0ee9e0f06bf 100644
--- a/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp
+++ b/libcxx/test/std/utilities/template.bitset/bitset.members/index_const.pass.cpp
@@ -25,7 +25,7 @@ void test_index_const() {
             assert(v[N/2] == v.test(N/2));
         }
     }
-#if !defined(_LIBCPP_VERSION) || defined(_LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL)
+#if !defined(_LIBCUDACXX_VERSION) || defined(_LIBCUDACXX_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL)
     ASSERT_SAME_TYPE(decltype(cases[0][0]), bool);
 #else
     ASSERT_SAME_TYPE(decltype(cases[0][0]), typename std::bitset<N>::const_reference);
@@ -48,7 +48,7 @@ int main(int, char**) {
   const auto& set = set_;
   auto b = set[0];
   set_[0] = true;
-#if !defined(_LIBCPP_VERSION) || defined(_LIBCPP_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL)
+#if !defined(_LIBCUDACXX_VERSION) || defined(_LIBCUDACXX_ABI_BITSET_VECTOR_BOOL_CONST_SUBSCRIPT_RETURN_BOOL)
   assert(!b);
 #else
   assert(b);

diff  --git a/libcxx/test/std/utilities/template.bitset/bitset_test_cases.h b/libcxx/test/std/utilities/template.bitset/bitset_test_cases.h
index 26c2cd48b815..975d2959f1fd 100644
--- a/libcxx/test/std/utilities/template.bitset/bitset_test_cases.h
+++ b/libcxx/test/std/utilities/template.bitset/bitset_test_cases.h
@@ -5,8 +5,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef LIBCPP_TEST_BITSET_TEST_CASES_H
-#define LIBCPP_TEST_BITSET_TEST_CASES_H
+#ifndef LIBCUDACXX_TEST_BITSET_TEST_CASES_H
+#define LIBCUDACXX_TEST_BITSET_TEST_CASES_H
 
 #include <bitset>
 #include <string>
@@ -174,4 +174,4 @@ inline std::vector<std::bitset<1000> > get_test_cases<1000>() {
     return cases;
 }
 
-#endif // !LIBCPP_TEST_BITSET_TEST_CASES_H
+#endif // !LIBCUDACXX_TEST_BITSET_TEST_CASES_H

diff  --git a/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp
index ef819e2031e3..9ee387480b36 100644
--- a/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.general/ignore.pass.cpp
@@ -48,7 +48,7 @@ int main(int, char**) {
         static_assert(test_ignore_constexpr(), "");
     }
     {
-        LIBCPP_STATIC_ASSERT(std::is_trivial<decltype(std::ignore)>::value, "");
+        LIBCUDACXX_STATIC_ASSERT(std::is_trivial<decltype(std::ignore)>::value, "");
     }
 
   return 0;

diff  --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp
index 6ca3f2045e49..4dc6a5bd9039 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/apply.pass.cpp
@@ -192,7 +192,7 @@ void test_noexcept()
         // test that the functions noexcept-ness is propagated
         using Tup = std::tuple<int, const char*, long>;
         Tup t;
-        LIBCPP_ASSERT_NOEXCEPT(std::apply(nec, t));
+        LIBCUDACXX_ASSERT_NOEXCEPT(std::apply(nec, t));
         ASSERT_NOT_NOEXCEPT(std::apply(tc, t));
     }
     {
@@ -200,7 +200,7 @@ void test_noexcept()
         using Tup = std::tuple<NothrowMoveable, int>;
         Tup t;
         ASSERT_NOT_NOEXCEPT(std::apply(nec, t));
-        LIBCPP_ASSERT_NOEXCEPT(std::apply(nec, std::move(t)));
+        LIBCUDACXX_ASSERT_NOEXCEPT(std::apply(nec, std::move(t)));
     }
 }
 

diff  --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
index 957bb67f4f00..0b610a312526 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.apply/make_from_tuple.pass.cpp
@@ -170,14 +170,14 @@ void test_noexcept() {
         Tuple tup; ((void)tup);
         Tuple const& ctup = tup; ((void)ctup);
         ASSERT_NOT_NOEXCEPT(std::make_from_tuple<TestType>(ctup));
-        LIBCPP_ASSERT_NOEXCEPT(std::make_from_tuple<TestType>(std::move(tup)));
+        LIBCUDACXX_ASSERT_NOEXCEPT(std::make_from_tuple<TestType>(std::move(tup)));
     }
     {
         using Tuple = std::pair<int, NothrowMoveable>;
         Tuple tup; ((void)tup);
         Tuple const& ctup = tup; ((void)ctup);
         ASSERT_NOT_NOEXCEPT(std::make_from_tuple<TestType>(ctup));
-        LIBCPP_ASSERT_NOEXCEPT(std::make_from_tuple<TestType>(std::move(tup)));
+        LIBCUDACXX_ASSERT_NOEXCEPT(std::make_from_tuple<TestType>(std::move(tup)));
     }
     {
         using Tuple = std::tuple<int, int, int>;
@@ -187,7 +187,7 @@ void test_noexcept() {
     {
         using Tuple = std::tuple<long, long, long>;
         Tuple tup; ((void)tup);
-        LIBCPP_ASSERT_NOEXCEPT(std::make_from_tuple<TestType>(tup));
+        LIBCUDACXX_ASSERT_NOEXCEPT(std::make_from_tuple<TestType>(tup));
     }
     {
         using Tuple = std::array<int, 3>;
@@ -197,7 +197,7 @@ void test_noexcept() {
     {
         using Tuple = std::array<long, 3>;
         Tuple tup; ((void)tup);
-        LIBCPP_ASSERT_NOEXCEPT(std::make_from_tuple<TestType>(tup));
+        LIBCUDACXX_ASSERT_NOEXCEPT(std::make_from_tuple<TestType>(tup));
     }
 }
 

diff  --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp
index 373b30aa9588..8fa6321020fa 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.assign/derived_from_tuple_like.pass.cpp
@@ -100,7 +100,7 @@ void do_derived_assign_test() {
   }
   reset();
   {
-#ifdef _LIBCPP_VERSION // assignment from std::array is a libc++ extension
+#ifdef _LIBCUDACXX_VERSION // assignment from std::array is a libc++ extension
     DerivedFromTup<std::array<int, 2>> d;
     std::get<0>(d) = 42;
     std::get<1>(d) = 101;

diff  --git a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp
index 89cdc17f6594..810c43f4185b 100644
--- a/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp
+++ b/libcxx/test/std/utilities/tuple/tuple.tuple/tuple.helper/tuple.include.ranges.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 // <ranges>
 

diff  --git a/libcxx/test/std/utilities/utility/forward/forward.pass.cpp b/libcxx/test/std/utilities/utility/forward/forward.pass.cpp
index 689e3309a2ff..d6eb2a4bed8b 100644
--- a/libcxx/test/std/utilities/utility/forward/forward.pass.cpp
+++ b/libcxx/test/std/utilities/utility/forward/forward.pass.cpp
@@ -76,7 +76,7 @@ int main(int, char**)
     static_assert(test_constexpr_forward(), "");
     }
 #endif
-#if TEST_STD_VER == 11 && defined(_LIBCPP_VERSION)
+#if TEST_STD_VER == 11 && defined(_LIBCUDACXX_VERSION)
     // Test that std::forward is constexpr in C++11. This is an extension
     // provided by both libc++ and libstdc++.
     {

diff  --git a/libcxx/test/std/utilities/utility/forward/move.pass.cpp b/libcxx/test/std/utilities/utility/forward/move.pass.cpp
index e04aa138b572..b4389258c82a 100644
--- a/libcxx/test/std/utilities/utility/forward/move.pass.cpp
+++ b/libcxx/test/std/utilities/utility/forward/move.pass.cpp
@@ -104,7 +104,7 @@ int main(int, char**)
         static_assert(test_constexpr_move(), "");
     }
 #endif
-#if TEST_STD_VER == 11 && defined(_LIBCPP_VERSION)
+#if TEST_STD_VER == 11 && defined(_LIBCUDACXX_VERSION)
     // Test that std::forward is constexpr in C++11. This is an extension
     // provided by both libc++ and libstdc++.
     {

diff  --git a/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp b/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp
index be7c0a8a8be1..5d9b9d3216b3 100644
--- a/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp
+++ b/libcxx/test/std/utilities/utility/pairs/pairs.pair/trivial_copy_move.pass.cpp
@@ -28,14 +28,14 @@ int main(int, char**)
     typedef std::pair<int, short> P;
     {
         static_assert(std::is_copy_constructible<P>::value, "");
-#if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
+#if !defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
         static_assert(std::is_trivially_copy_constructible<P>::value, "");
 #endif
     }
 #if TEST_STD_VER >= 11
     {
         static_assert(std::is_move_constructible<P>::value, "");
-#if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
+#if !defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
         static_assert(std::is_trivially_move_constructible<P>::value, "");
 #endif
     }
@@ -44,7 +44,7 @@ int main(int, char**)
         static_assert(!std::is_copy_constructible<P1>::value, "");
         static_assert(!std::is_trivially_copy_constructible<P1>::value, "");
         static_assert(std::is_move_constructible<P1>::value, "");
-#if !defined(_LIBCPP_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
+#if !defined(_LIBCUDACXX_DEPRECATED_ABI_DISABLE_PAIR_TRIVIAL_COPY_CTOR)
         static_assert(std::is_trivially_move_constructible<P1>::value, "");
 #endif
     }

diff  --git a/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp b/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp
index 770bbecd73cb..7ff9803cdfff 100644
--- a/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp
+++ b/libcxx/test/std/utilities/variant/variant.hash/hash.pass.cpp
@@ -117,7 +117,7 @@ void test_hash_variant_duplicate_elements() {
     const V v2(std::in_place_index<1>);
     assert(h(v1) == h(v1));
     assert(h(v2) == h(v2));
-    LIBCPP_ASSERT(h(v1) != h(v2));
+    LIBCUDACXX_ASSERT(h(v1) != h(v2));
 }
 
 struct A {};

diff  --git a/libcxx/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp b/libcxx/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp
index b61f508b120d..ab6d37456017 100644
--- a/libcxx/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp
+++ b/libcxx/test/std/utilities/variant/variant.variant/variant.swap/swap.pass.cpp
@@ -327,7 +327,7 @@ void test_swap_
diff erent_alternatives() {
     assert(T::swap_called == 0);
     // The libc++ implementation double copies the argument, and not
     // the variant swap is called on.
-    LIBCPP_ASSERT(T::move_called == 1);
+    LIBCUDACXX_ASSERT(T::move_called == 1);
     assert(T::move_called <= 2);
     assert(T::move_assign_called == 0);
     assert(std::get<1>(v1) == 100);
@@ -335,7 +335,7 @@ void test_swap_
diff erent_alternatives() {
     T::reset();
     swap(v1, v2);
     assert(T::swap_called == 0);
-    LIBCPP_ASSERT(T::move_called == 2);
+    LIBCUDACXX_ASSERT(T::move_called == 2);
     assert(T::move_called <= 2);
     assert(T::move_assign_called == 0);
     assert(std::get<0>(v1).value == 42);
@@ -359,7 +359,7 @@ void test_swap_
diff erent_alternatives() {
     assert(T1::move_called == 1); // throws
     assert(T1::move_assign_called == 0);
     // FIXME: libc++ shouldn't move from T2 here.
-    LIBCPP_ASSERT(T2::move_called == 1);
+    LIBCUDACXX_ASSERT(T2::move_called == 1);
     assert(T2::move_called <= 1);
     assert(std::get<0>(v1).value == 42);
     if (T2::move_called != 0)
@@ -380,7 +380,7 @@ void test_swap_
diff erent_alternatives() {
       assert(false);
     } catch (int) {
     }
-    LIBCPP_ASSERT(T1::move_called == 0);
+    LIBCUDACXX_ASSERT(T1::move_called == 0);
     assert(T1::move_called <= 1);
     assert(T2::swap_called == 0);
     assert(T2::move_called == 1); // throws
@@ -392,7 +392,7 @@ void test_swap_
diff erent_alternatives() {
     assert(std::get<1>(v2).value == 100);
   }
 // FIXME: The tests below are just very libc++ specific
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
   {
     using T1 = ThrowsOnSecondMove;
     using T2 = NonThrowingNonNoexceptType;
@@ -426,7 +426,7 @@ void test_swap_
diff erent_alternatives() {
 // testing libc++ extension. If either variant stores a nothrow move
 // constructible type v1.swap(v2) provides the strong exception safety
 // guarantee.
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
   {
 
     using T1 = ThrowingTypeWithNothrowSwap;
@@ -466,7 +466,7 @@ void test_swap_
diff erent_alternatives() {
     assert(std::get<0>(v1).value == 42);
     assert(std::get<1>(v2).value == 100);
   }
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 #endif
 }
 
@@ -490,22 +490,22 @@ void test_swap_sfinae() {
     // but is still swappable via the generic swap algorithm, since the
     // variant is move constructible and move assignable.
     using V = std::variant<int, NotSwappable>;
-    LIBCPP_STATIC_ASSERT(!has_swap_member<V>(), "");
+    LIBCUDACXX_STATIC_ASSERT(!has_swap_member<V>(), "");
     static_assert(std::is_swappable_v<V>, "");
   }
   {
     using V = std::variant<int, NotCopyable>;
-    LIBCPP_STATIC_ASSERT(!has_swap_member<V>(), "");
+    LIBCUDACXX_STATIC_ASSERT(!has_swap_member<V>(), "");
     static_assert(!std::is_swappable_v<V>, "");
   }
   {
     using V = std::variant<int, NotCopyableWithSwap>;
-    LIBCPP_STATIC_ASSERT(!has_swap_member<V>(), "");
+    LIBCUDACXX_STATIC_ASSERT(!has_swap_member<V>(), "");
     static_assert(!std::is_swappable_v<V>, "");
   }
   {
     using V = std::variant<int, NotMoveAssignable>;
-    LIBCPP_STATIC_ASSERT(!has_swap_member<V>(), "");
+    LIBCUDACXX_STATIC_ASSERT(!has_swap_member<V>(), "");
     static_assert(!std::is_swappable_v<V>, "");
   }
 }
@@ -570,7 +570,7 @@ void test_swap_noexcept() {
     // but is still swappable via the generic swap algorithm, since the
     // variant is move constructible and move assignable.
     using V = std::variant<int, NotSwappable>;
-    LIBCPP_STATIC_ASSERT(!has_swap_member<V>(), "");
+    LIBCUDACXX_STATIC_ASSERT(!has_swap_member<V>(), "");
     static_assert(std::is_swappable_v<V>, "");
     static_assert(std::is_nothrow_swappable_v<V>, "");
     V v1, v2;
@@ -578,7 +578,7 @@ void test_swap_noexcept() {
   }
 }
 
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
 // This is why variant should SFINAE member swap. :-)
 template class std::variant<int, NotSwappable>;
 #endif

diff  --git a/libcxx/test/support/any_helpers.h b/libcxx/test/support/any_helpers.h
index 7fc5f93cad27..bc5a6a180d63 100644
--- a/libcxx/test/support/any_helpers.h
+++ b/libcxx/test/support/any_helpers.h
@@ -66,7 +66,7 @@ template <class> constexpr bool has_value_member(long) { return false; }
 // Assert that an 'any' object stores the specified 'Type' and 'value'.
 template <class Type>
 std::enable_if_t<has_value_member<Type>(0)>
-_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST
 assertContains(std::any const& a, int value) {
     assert(a.has_value());
     assert(containsType<Type>(a));
@@ -75,7 +75,7 @@ assertContains(std::any const& a, int value) {
 
 template <class Type, class Value>
 std::enable_if_t<!has_value_member<Type>(0)>
-_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST
 assertContains(std::any const& a, Value value) {
     assert(a.has_value());
     assert(containsType<Type>(a));
@@ -86,7 +86,7 @@ assertContains(std::any const& a, Value value) {
 // Modify the value of a "test type" stored within an any to the specified
 // 'value'.
 template <class Type>
-_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST
 void modifyValue(std::any& a, int value) {
     assert(a.has_value());
     assert(containsType<Type>(a));

diff  --git a/libcxx/test/support/asan_testing.h b/libcxx/test/support/asan_testing.h
index aae93019fe1c..ef42e6e77346 100644
--- a/libcxx/test/support/asan_testing.h
+++ b/libcxx/test/support/asan_testing.h
@@ -18,7 +18,7 @@ extern "C" int __sanitizer_verify_contiguous_container
 template <typename T, typename Alloc>
 TEST_CONSTEXPR bool is_contiguous_container_asan_correct ( const std::vector<T, Alloc> &c )
 {
-    if (std::__libcpp_is_constant_evaluated())
+    if (std::__LIBCUDACXX_is_constant_evaluated())
         return true;
     if (std::is_same<Alloc, std::allocator<T> >::value && c.data() != NULL)
         return __sanitizer_verify_contiguous_container(

diff  --git a/libcxx/test/support/check_assertion.h b/libcxx/test/support/check_assertion.h
index 2d1f7b89c436..7116895db02d 100644
--- a/libcxx/test/support/check_assertion.h
+++ b/libcxx/test/support/check_assertion.h
@@ -24,7 +24,7 @@
 #include "test_macros.h"
 #include "test_allocator.h"
 
-#ifndef _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
 # error "This header may only be used for libc++ tests"
 #endif
 
@@ -236,7 +236,7 @@ struct DeathTest {
   std::string stderr_from_child_;
 };
 
-void std::__libcpp_verbose_abort(char const* format, ...) {
+void std::__LIBCUDACXX_verbose_abort(char const* format, ...) {
   assert(!GlobalMatcher().empty());
 
   // Extract information from the error message. This has to stay synchronized with
@@ -297,6 +297,6 @@ inline bool ExpectDeath(const char* stmt, Func&& func) {
 
 #define EXPECT_DEATH_MATCHES(Matcher, ...) assert((ExpectDeath(#__VA_ARGS__, [&]() { __VA_ARGS__; }, Matcher)))
 
-#define TEST_LIBCPP_ASSERT_FAILURE(expr, message) assert((ExpectDeath(#expr, [&]() { (void)(expr); }, AssertionInfoMatcher(message))))
+#define TEST_LIBCUDACXX_ASSERT_FAILURE(expr, message) assert((ExpectDeath(#expr, [&]() { (void)(expr); }, AssertionInfoMatcher(message))))
 
 #endif // TEST_SUPPORT_CHECK_ASSERTION_H

diff  --git a/libcxx/test/support/container_debug_tests.h b/libcxx/test/support/container_debug_tests.h
index 0a11ac881dda..8c6b7cf3a662 100644
--- a/libcxx/test/support/container_debug_tests.h
+++ b/libcxx/test/support/container_debug_tests.h
@@ -10,11 +10,11 @@
 #define TEST_SUPPORT_CONTAINER_DEBUG_TESTS_H
 
 #include <ciso646>
-#ifndef _LIBCPP_VERSION
+#ifndef _LIBCUDACXX_VERSION
 #error This header may only be used for libc++ tests
 #endif
 
-#ifndef _LIBCPP_ENABLE_DEBUG_MODE
+#ifndef _LIBCUDACXX_ENABLE_DEBUG_MODE
 #error The library must be built with the debug mode enabled in order to use this header
 #endif
 

diff  --git a/libcxx/test/support/container_test_types.h b/libcxx/test/support/container_test_types.h
index 38fcd5107d3a..e8bab74fdc9c 100644
--- a/libcxx/test/support/container_test_types.h
+++ b/libcxx/test/support/container_test_types.h
@@ -417,8 +417,8 @@ bool operator <(CopyInsertable<ID> const& L, CopyInsertable<ID> const& R) {
 }
 
 
-#ifdef _LIBCPP_BEGIN_NAMESPACE_STD
-_LIBCPP_BEGIN_NAMESPACE_STD
+#ifdef _LIBCUDACXX_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 #else
 namespace std {
 #endif
@@ -454,8 +454,8 @@ namespace std {
   template <class _Value, class _Hash, class _Equals, class _Alloc>
   class unordered_multiset;
 
-#ifdef _LIBCPP_END_NAMESPACE_STD
-_LIBCPP_END_NAMESPACE_STD
+#ifdef _LIBCUDACXX_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 #else
 } // end namespace std
 #endif

diff  --git a/libcxx/test/support/count_new.h b/libcxx/test/support/count_new.h
index 18b0c5609d7c..e1bf78f88226 100644
--- a/libcxx/test/support/count_new.h
+++ b/libcxx/test/support/count_new.h
@@ -386,8 +386,8 @@ void operator delete[](void* p) TEST_NOEXCEPT
 }
 
 #ifndef TEST_HAS_NO_ALIGNED_ALLOCATION
-#if defined(_LIBCPP_MSVCRT_LIKE) || \
-  (!defined(_LIBCPP_VERSION) && defined(_WIN32))
+#if defined(_LIBCUDACXX_MSVCRT_LIKE) || \
+  (!defined(_LIBCUDACXX_VERSION) && defined(_WIN32))
 #define USE_ALIGNED_ALLOC
 #endif
 

diff  --git a/libcxx/test/support/deduction_guides_sfinae_checks.h b/libcxx/test/support/deduction_guides_sfinae_checks.h
index 767ff0242e1f..93f7b65bbf5c 100644
--- a/libcxx/test/support/deduction_guides_sfinae_checks.h
+++ b/libcxx/test/support/deduction_guides_sfinae_checks.h
@@ -49,19 +49,19 @@ constexpr void SequenceContainerDeductionGuidesSfinaeAway() {
   // containers because they have constructors of the form `(size_type count,
   // const value_type& value)`. These constructors would be used when passing
   // two integral types and would deduce `value_type` to be an integral type.
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
   using OutputIter = std::insert_iterator<InstantiatedContainer>;
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
 
   // (iter, iter)
   //
   // Cannot deduce from (BAD_iter, BAD_iter)
-  LIBCPP_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter>);
+  LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter>);
 
   // (iter, iter, alloc)
   //
   // Cannot deduce from (BAD_iter, BAD_iter, alloc)
-  LIBCPP_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter, Alloc>);
+  LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter, Alloc>);
   // Cannot deduce from (iter, iter, BAD_alloc)
   static_assert(SFINAEs_away<Container, Iter, Iter, BadAlloc>);
 
@@ -90,28 +90,28 @@ constexpr void AssociativeContainerDeductionGuidesSfinaeAway() {
   // The only requirement in the Standard is that integral types cannot be
   // considered input iterators, beyond that it is unspecified.
   using BadIter = int;
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
   using OutputIter = std::insert_iterator<InstantiatedContainer>;
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
   using AllocAsComp = Alloc;
 
   // (iter, iter)
   //
   // Cannot deduce from (BAD_iter, BAD_iter)
   static_assert(SFINAEs_away<Container, BadIter, BadIter>);
-  LIBCPP_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter>);
+  LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter>);
 
   // (iter, iter, comp)
   //
   // Cannot deduce from (BAD_iter, BAD_iter, comp)
   static_assert(SFINAEs_away<Container, BadIter, BadIter, Comp>);
-  LIBCPP_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter, Comp>);
+  LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter, Comp>);
 
   // (iter, iter, comp, alloc)
   //
   // Cannot deduce from (BAD_iter, BAD_iter, comp, alloc)
   static_assert(SFINAEs_away<Container, BadIter, BadIter, Comp, Alloc>);
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
       SFINAEs_away<Container, OutputIter, OutputIter, Comp, Alloc>);
   // Cannot deduce from (iter, iter, ALLOC_as_comp, alloc)
   static_assert(SFINAEs_away<Container, Iter, Iter, AllocAsComp, Alloc>);
@@ -122,7 +122,7 @@ constexpr void AssociativeContainerDeductionGuidesSfinaeAway() {
   //
   // Cannot deduce from (BAD_iter, BAD_iter, alloc)
   static_assert(SFINAEs_away<Container, BadIter, BadIter, Alloc>);
-  LIBCPP_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter, Alloc>);
+  LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter, Alloc>);
   // Note: (iter, iter, BAD_alloc) is interpreted as (iter, iter, comp)
   // instead and fails upon instantiation. There is no requirement to SFINAE
   // away bad comparators.
@@ -163,9 +163,9 @@ constexpr void UnorderedContainerDeductionGuidesSfinaeAway() {
   // The only requirement in the Standard is that integral types cannot be
   // considered input iterators, beyond that it is unspecified.
   using BadIter = int;
-#ifdef _LIBCPP_VERSION
+#ifdef _LIBCUDACXX_VERSION
   using OutputIter = std::insert_iterator<InstantiatedContainer>;
-#endif // _LIBCPP_VERSION
+#endif // _LIBCUDACXX_VERSION
   using AllocAsHash = Alloc;
   using AllocAsPred = Alloc;
 
@@ -173,19 +173,19 @@ constexpr void UnorderedContainerDeductionGuidesSfinaeAway() {
   //
   // Cannot deduce from (BAD_iter, BAD_iter)
   static_assert(SFINAEs_away<Container, BadIter, BadIter>);
-  LIBCPP_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter>);
+  LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter>);
 
   // (iter, iter, buckets)
   //
   // Cannot deduce from (BAD_iter, BAD_iter, buckets)
   static_assert(SFINAEs_away<Container, BadIter, BadIter, size_t>);
-  LIBCPP_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter, size_t>);
+  LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter, size_t>);
 
   // (iter, iter, buckets, hash)
   //
   // Cannot deduce from (BAD_iter, BAD_iter, buckets, hash)
   static_assert(SFINAEs_away<Container, BadIter, BadIter, size_t, Hash>);
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
       SFINAEs_away<Container, OutputIter, OutputIter, size_t, Hash>);
   // Cannot deduce from (iter, iter, buckets, BAD_hash)
   static_assert(SFINAEs_away<Container, Iter, Iter, size_t, BadHash>);
@@ -196,7 +196,7 @@ constexpr void UnorderedContainerDeductionGuidesSfinaeAway() {
   //
   // Cannot deduce from (BAD_iter, BAD_iter, buckets, hash, pred)
   static_assert(SFINAEs_away<Container, BadIter, BadIter, size_t, Hash, Pred>);
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
       SFINAEs_away<Container, OutputIter, OutputIter, size_t, Hash, Pred>);
   // Cannot deduce from (iter, iter, buckets, BAD_hash, pred)
   static_assert(SFINAEs_away<Container, Iter, Iter, size_t, BadHash, Pred>);
@@ -210,7 +210,7 @@ constexpr void UnorderedContainerDeductionGuidesSfinaeAway() {
   // Cannot deduce from (BAD_iter, BAD_iter, buckets, hash, pred, alloc)
   static_assert(
       SFINAEs_away<Container, BadIter, BadIter, size_t, Hash, Pred, Alloc>);
-  LIBCPP_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter,
+  LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter,
       size_t, Hash, Pred, Alloc>);
   // Cannot deduce from (iter, iter, buckets, BAD_hash, pred, alloc)
   static_assert(
@@ -229,7 +229,7 @@ constexpr void UnorderedContainerDeductionGuidesSfinaeAway() {
   //
   // Cannot deduce from (BAD_iter, BAD_iter, buckets, alloc)
   static_assert(SFINAEs_away<Container, BadIter, BadIter, size_t, Alloc>);
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
       SFINAEs_away<Container, OutputIter, OutputIter, size_t, Alloc>);
   // Note: (iter, iter, buckets, BAD_alloc) is interpreted as (iter, iter,
   // buckets, hash), which is valid because the only requirement for the hash
@@ -239,7 +239,7 @@ constexpr void UnorderedContainerDeductionGuidesSfinaeAway() {
   //
   // Cannot deduce from (BAD_iter, BAD_iter, alloc)
   static_assert(SFINAEs_away<Container, BadIter, BadIter, Alloc>);
-  LIBCPP_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter, Alloc>);
+  LIBCUDACXX_STATIC_ASSERT(SFINAEs_away<Container, OutputIter, OutputIter, Alloc>);
   // Cannot deduce from (iter, iter, BAD_alloc)
   static_assert(SFINAEs_away<Container, Iter, Iter, BadAlloc>);
 
@@ -247,7 +247,7 @@ constexpr void UnorderedContainerDeductionGuidesSfinaeAway() {
   //
   // Cannot deduce from (BAD_iter, BAD_iter, buckets, hash, alloc)
   static_assert(SFINAEs_away<Container, BadIter, BadIter, size_t, Hash, Alloc>);
-  LIBCPP_STATIC_ASSERT(
+  LIBCUDACXX_STATIC_ASSERT(
       SFINAEs_away<Container, OutputIter, OutputIter, size_t, Hash, Alloc>);
   // Cannot deduce from (iter, iter, buckets, BAD_hash, alloc)
   static_assert(SFINAEs_away<Container, Iter, Iter, size_t, BadHash, Alloc>);

diff  --git a/libcxx/test/support/experimental_any_helpers.h b/libcxx/test/support/experimental_any_helpers.h
index 9e1cebb47bf0..b2e075d0ed92 100644
--- a/libcxx/test/support/experimental_any_helpers.h
+++ b/libcxx/test/support/experimental_any_helpers.h
@@ -29,7 +29,7 @@ template <class T>
 // Return 'true' if 'Type' will be considered a small type by 'any'
 template <class Type>
 bool isSmallType() {
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     return std::experimental::__any_imp::_IsSmallObject<Type>::value;
 #else
     return IsSmallObject<Type>::value;
@@ -48,7 +48,7 @@ void assertEmpty(std::experimental::any const& a) {
 
 // Assert that an 'any' object stores the specified 'Type' and 'value'.
 template <class Type>
-_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST
 void assertContains(std::experimental::any const& a, int value = 1) {
     assert(!a.empty());
     RTTI_ASSERT(a.type() == typeid(Type));
@@ -58,7 +58,7 @@ void assertContains(std::experimental::any const& a, int value = 1) {
 // Modify the value of a "test type" stored within an any to the specified
 // 'value'.
 template <class Type>
-_LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
+_LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST
 void modifyValue(std::experimental::any& a, int value) {
     assert(!a.empty());
     RTTI_ASSERT(a.type() == typeid(Type));

diff  --git a/libcxx/test/support/external_threads.cpp b/libcxx/test/support/external_threads.cpp
index 3ffce1a63e56..0d4ea5b9d800 100644
--- a/libcxx/test/support/external_threads.cpp
+++ b/libcxx/test/support/external_threads.cpp
@@ -5,5 +5,5 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#define _LIBCPP_BUILDING_THREAD_LIBRARY_EXTERNAL
+#define _LIBCUDACXX_BUILDING_THREAD_LIBRARY_EXTERNAL
 #include <__threading_support>

diff  --git a/libcxx/test/support/filesystem_include.h b/libcxx/test/support/filesystem_include.h
index f5c1d97be130..077345c02a2a 100644
--- a/libcxx/test/support/filesystem_include.h
+++ b/libcxx/test/support/filesystem_include.h
@@ -4,7 +4,7 @@
 #include <filesystem>
 #include "test_macros.h"
 
-#if defined(_LIBCPP_VERSION) && TEST_STD_VER < 17
+#if defined(_LIBCUDACXX_VERSION) && TEST_STD_VER < 17
 namespace fs = std::__fs::filesystem;
 #else
 namespace fs = std::filesystem;

diff  --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h
index f5cb137a053a..e2ddb1e687e8 100644
--- a/libcxx/test/support/filesystem_test_helper.h
+++ b/libcxx/test/support/filesystem_test_helper.h
@@ -593,7 +593,7 @@ inline bool ErrorIs(const std::error_code& ec, std::errc First, ErrcT... Rest) {
 // available in single-threaded mode.
 template <class Dur> void SleepFor(Dur dur) {
     using namespace std::chrono;
-#if defined(_LIBCPP_HAS_NO_MONOTONIC_CLOCK)
+#if defined(_LIBCUDACXX_HAS_NO_MONOTONIC_CLOCK)
     using Clock = system_clock;
 #else
     using Clock = steady_clock;
@@ -656,7 +656,7 @@ struct ExceptionChecker {
     TEST_CHECK(ErrorIsImp(Err.code(), {expected_err}));
     TEST_CHECK(Err.path1() == expected_path1);
     TEST_CHECK(Err.path2() == expected_path2);
-    LIBCPP_ONLY(check_libcxx_string(Err));
+    LIBCUDACXX_ONLY(check_libcxx_string(Err));
   }
 
   void check_libcxx_string(fs::filesystem_error const& Err) {

diff  --git a/libcxx/test/support/msvc_stdlib_force_include.h b/libcxx/test/support/msvc_stdlib_force_include.h
index 3c61f0b880b1..40156d2ec0aa 100644
--- a/libcxx/test/support/msvc_stdlib_force_include.h
+++ b/libcxx/test/support/msvc_stdlib_force_include.h
@@ -23,7 +23,7 @@
 #include <crtdbg.h>
 #include <stdlib.h>
 
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
     #error This header may not be used when targeting libc++
 #endif
 
@@ -90,20 +90,20 @@ const AssertionDialogAvoider assertion_dialog_avoider{};
     #define TEST_STD_VER 14
 #endif
 
-#define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
+#define _LIBCUDACXX_AVAILABILITY_THROW_BAD_ANY_CAST
 
 #ifdef __clang__
-#define _LIBCPP_SUPPRESS_DEPRECATED_PUSH \
+#define _LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH \
     _Pragma("GCC diagnostic push") \
     _Pragma("GCC diagnostic ignored \"-Wdeprecated\"")
-#define _LIBCPP_SUPPRESS_DEPRECATED_POP \
+#define _LIBCUDACXX_SUPPRESS_DEPRECATED_POP \
     _Pragma("GCC diagnostic pop")
 #else // ^^^ clang / MSVC vvv
-#define _LIBCPP_SUPPRESS_DEPRECATED_PUSH \
+#define _LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH \
     __pragma(warning(push)) \
     __pragma(warning(disable : 4996)) \
     __pragma(warning(disable : 5215))
-#define _LIBCPP_SUPPRESS_DEPRECATED_POP \
+#define _LIBCUDACXX_SUPPRESS_DEPRECATED_POP \
     __pragma(warning(pop))
 #endif // __clang__
 

diff  --git a/libcxx/test/support/nasty_containers.h b/libcxx/test/support/nasty_containers.h
index 0b56a27feefa..37962508c756 100644
--- a/libcxx/test/support/nasty_containers.h
+++ b/libcxx/test/support/nasty_containers.h
@@ -122,7 +122,7 @@ class nasty_vector
     void swap(nasty_vector &nv)
 #if TEST_STD_VER > 14
     noexcept(std::is_nothrow_swappable<nested_container>::value)
-#elif defined(_LIBCPP_VERSION)
+#elif defined(_LIBCUDACXX_VERSION)
     TEST_NOEXCEPT_COND(std::__is_nothrow_swappable<nested_container>::value)
 #endif
     { v_.swap(nv.v_); }
@@ -242,7 +242,7 @@ class nasty_list
     void swap(nasty_list &nl)
 #if TEST_STD_VER > 14
     noexcept(std::is_nothrow_swappable<nested_container>::value)
-#elif defined(_LIBCPP_VERSION)
+#elif defined(_LIBCUDACXX_VERSION)
     TEST_NOEXCEPT_COND(std::__is_nothrow_swappable<nested_container>::value)
 #endif
     { l_.swap(nl.l_); }

diff  --git a/libcxx/test/support/parse_integer.h b/libcxx/test/support/parse_integer.h
index c4fa429e65d5..257c1b9ff6b3 100644
--- a/libcxx/test/support/parse_integer.h
+++ b/libcxx/test/support/parse_integer.h
@@ -6,8 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LIBCPP_TEST_SUPPORT_PARSE_INTEGER_H
-#define LIBCPP_TEST_SUPPORT_PARSE_INTEGER_H
+#ifndef LIBCUDACXX_TEST_SUPPORT_PARSE_INTEGER_H
+#define LIBCUDACXX_TEST_SUPPORT_PARSE_INTEGER_H
 
 #include <string>
 
@@ -69,4 +69,4 @@ T parse_integer(std::basic_string<CharT> const& str) {
     return detail::parse_integer_impl<T>()(str);
 }
 
-#endif // LIBCPP_TEST_SUPPORT_PARSE_INTEGER_H
+#endif // LIBCUDACXX_TEST_SUPPORT_PARSE_INTEGER_H

diff  --git a/libcxx/test/support/platform_support.h b/libcxx/test/support/platform_support.h
index a6fa5661dfbf..4c72543a8c80 100644
--- a/libcxx/test/support/platform_support.h
+++ b/libcxx/test/support/platform_support.h
@@ -86,16 +86,16 @@ std::string get_temp_file_name()
 #endif
 }
 
-_LIBCPP_SUPPRESS_DEPRECATED_PUSH
-#ifdef _LIBCPP_HAS_OPEN_WITH_WCHAR
+_LIBCUDACXX_SUPPRESS_DEPRECATED_PUSH
+#ifdef _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
 inline
 std::wstring get_wide_temp_file_name()
 {
     return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t> >().from_bytes(
         get_temp_file_name());
 }
-#endif // _LIBCPP_HAS_OPEN_WITH_WCHAR
-_LIBCPP_SUPPRESS_DEPRECATED_POP
+#endif // _LIBCUDACXX_HAS_OPEN_WITH_WCHAR
+_LIBCUDACXX_SUPPRESS_DEPRECATED_POP
 
 #if defined(_CS_GNU_LIBC_VERSION)
 inline bool glibc_version_less_than(char const* version) {

diff  --git a/libcxx/test/support/poisoned_hash_helper.h b/libcxx/test/support/poisoned_hash_helper.h
index cbf36e03964c..b64698904090 100644
--- a/libcxx/test/support/poisoned_hash_helper.h
+++ b/libcxx/test/support/poisoned_hash_helper.h
@@ -142,7 +142,7 @@ TEST_CONSTEXPR_CXX20 void test_hash_enabled(InputKey const& key) {
 
 #if TEST_STD_VER > 14
   static_assert(std::is_swappable<Hash>::value, "");
-#elif defined(_LIBCPP_VERSION)
+#elif defined(_LIBCUDACXX_VERSION)
   static_assert(std::__is_swappable<Hash>::value, "");
 #endif
 

diff  --git a/libcxx/test/support/read_write.h b/libcxx/test/support/read_write.h
index 8736d1840eae..a734590110a5 100644
--- a/libcxx/test/support/read_write.h
+++ b/libcxx/test/support/read_write.h
@@ -5,8 +5,8 @@
 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
 //
 //===----------------------------------------------------------------------===//
-#ifndef LIBCPP_TEST_SUPPORT_READ_WRITE_H
-#define LIBCPP_TEST_SUPPORT_READ_WRITE_H
+#ifndef LIBCUDACXX_TEST_SUPPORT_READ_WRITE_H
+#define LIBCUDACXX_TEST_SUPPORT_READ_WRITE_H
 
 struct value_type_indirection {
   using value_type = int;
@@ -33,4 +33,4 @@ struct missing_dereference {
   using value_type = int;
 };
 
-#endif // LIBCPP_TEST_SUPPORT_READ_WRITE_H
+#endif // LIBCUDACXX_TEST_SUPPORT_READ_WRITE_H

diff  --git a/libcxx/test/support/test.support/make_string_header.pass.cpp b/libcxx/test/support/test.support/make_string_header.pass.cpp
index 4cee36155240..5a63e6b3fbd6 100644
--- a/libcxx/test/support/test.support/make_string_header.pass.cpp
+++ b/libcxx/test/support/test.support/make_string_header.pass.cpp
@@ -30,7 +30,7 @@ int main(int, char**) {
     ==  L" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
              "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
 #endif
-#ifndef _LIBCPP_HAS_NO_CHAR8_T
+#ifndef _LIBCUDACXX_HAS_NO_CHAR8_T
   assert(MAKE_STRING(char8_t,
          " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN"
              "OPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~")

diff  --git a/libcxx/test/support/test.support/test_check_assertion.pass.cpp b/libcxx/test/support/test.support/test_check_assertion.pass.cpp
index cd09445456dd..471d650aaa42 100644
--- a/libcxx/test/support/test.support/test_check_assertion.pass.cpp
+++ b/libcxx/test/support/test.support/test_check_assertion.pass.cpp
@@ -9,7 +9,7 @@
 // REQUIRES: has-unix-headers
 // UNSUPPORTED: c++03
 // XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx{{10.9|10.10|10.11|10.12|10.13|10.14|10.15|11.0|12.0}}
-// ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_ENABLE_ASSERTIONS=1
+// ADDITIONAL_COMPILE_FLAGS: -D_LIBCUDACXX_ENABLE_ASSERTIONS=1
 
 #include <cassert>
 #include <cstdio>
@@ -39,13 +39,13 @@ inline bool TestDeathTest(const char* stmt, Func&& func, DeathTest::ResultKind E
 
 #define TEST_DEATH_TEST_MATCHES(RK, Matcher, ...) assert((TestDeathTest(#__VA_ARGS__, [&]() { __VA_ARGS__; }, RK, Matcher)))
 
-void my_libcpp_assert() {
-  _LIBCPP_ASSERT(false, "other");
+void my_LIBCUDACXX_assert() {
+  _LIBCUDACXX_ASSERT(false, "other");
 }
 
 void test_no_match_found() {
   AssertionInfoMatcher ExpectMatch("my message");
-  TEST_DEATH_TEST_MATCHES(DeathTest::RK_MatchFailure, ExpectMatch, my_libcpp_assert());
+  TEST_DEATH_TEST_MATCHES(DeathTest::RK_MatchFailure, ExpectMatch, my_LIBCUDACXX_assert());
 }
 
 void test_did_not_die() {

diff  --git a/libcxx/test/support/test.support/test_proxy.pass.cpp b/libcxx/test/support/test.support/test_proxy.pass.cpp
index 8eef9fd6fcde..77f696e39d02 100644
--- a/libcxx/test/support/test.support/test_proxy.pass.cpp
+++ b/libcxx/test/support/test.support/test_proxy.pass.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 // UNSUPPORTED: c++03, c++11, c++14, c++17
-// UNSUPPORTED: libcpp-has-no-incomplete-ranges
+// UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges
 
 #include "MoveOnly.h"
 #include "test_iterators.h"

diff  --git a/libcxx/test/support/test_format_context.h b/libcxx/test/support/test_format_context.h
index 992709bbd5e7..4427607a1073 100644
--- a/libcxx/test/support/test_format_context.h
+++ b/libcxx/test/support/test_format_context.h
@@ -30,11 +30,11 @@
 
 #include <format>
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 #include <locale>
 #endif
 
-#if defined(_LIBCPP_VERSION)
+#if defined(_LIBCUDACXX_VERSION)
 
 /** Creates a std::basic_format_context as-if the formatting function takes no locale. */
 template <class OutIt, class CharT>
@@ -44,7 +44,7 @@ std::basic_format_context<OutIt, CharT> test_format_context_create(
   return std::__format_context_create(std::move(out_it), args);
 }
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#ifndef _LIBCUDACXX_HAS_NO_LOCALIZATION
 /** Creates a std::basic_format_context as-if the formatting function takes locale. */
 template <class OutIt, class CharT>
 std::basic_format_context<OutIt, CharT> test_format_context_create(

diff  --git a/libcxx/test/support/test_iterators.h b/libcxx/test/support/test_iterators.h
index f7eee4ca3abf..9ea9d53724a6 100644
--- a/libcxx/test/support/test_iterators.h
+++ b/libcxx/test/support/test_iterators.h
@@ -1230,7 +1230,7 @@ struct ProxySentinel {
   }
 };
 
-#if !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 template <std::ranges::input_range Base>
   requires std::ranges::view<Base>
 struct ProxyRange {
@@ -1254,7 +1254,7 @@ struct ProxyRange {
 template <std::ranges::input_range R>
   requires std::ranges::viewable_range<R&&>
 ProxyRange(R&&) -> ProxyRange<std::views::all_t<R&&>>;
-#endif // !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)
 
 #endif // TEST_STD_VER > 17
 

diff  --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h
index 89fa90fa8cee..94bf93ee0bb3 100644
--- a/libcxx/test/support/test_macros.h
+++ b/libcxx/test/support/test_macros.h
@@ -10,7 +10,7 @@
 #ifndef SUPPORT_TEST_MACROS_HPP
 #define SUPPORT_TEST_MACROS_HPP
 
-// Attempt to get STL specific macros like _LIBCPP_VERSION using the most
+// Attempt to get STL specific macros like _LIBCUDACXX_VERSION using the most
 // minimal header possible. If we're testing libc++, we should use `<__config>`.
 // If <__config> isn't available, fall back to <ciso646>.
 #ifdef __has_include
@@ -100,7 +100,7 @@
 # define TEST_STD_VER 20
 #else
 # define TEST_STD_VER 99    // greater than current standard
-// This is deliberately 
diff erent than _LIBCPP_STD_VER to discourage matching them up.
+// This is deliberately 
diff erent than _LIBCUDACXX_STD_VER to discourage matching them up.
 #endif
 #endif
 
@@ -189,13 +189,13 @@
 #define TEST_HAS_SANITIZERS
 #endif
 
-#if defined(_LIBCPP_NORETURN)
-#define TEST_NORETURN _LIBCPP_NORETURN
+#if defined(_LIBCUDACXX_NORETURN)
+#define TEST_NORETURN _LIBCUDACXX_NORETURN
 #else
 #define TEST_NORETURN [[noreturn]]
 #endif
 
-#if defined(_LIBCPP_HAS_NO_ALIGNED_ALLOCATION) || \
+#if defined(_LIBCUDACXX_HAS_NO_ALIGNED_ALLOCATION) || \
   (!(TEST_STD_VER > 14 || \
     (defined(__cpp_aligned_new) && __cpp_aligned_new >= 201606L)))
 #define TEST_HAS_NO_ALIGNED_ALLOCATION
@@ -203,8 +203,8 @@
 
 #if TEST_STD_VER > 17
 #define TEST_CONSTINIT constinit
-#elif defined(_LIBCPP_CONSTINIT)
-#define TEST_CONSTINIT _LIBCPP_CONSTINIT
+#elif defined(_LIBCUDACXX_CONSTINIT)
+#define TEST_CONSTINIT _LIBCUDACXX_CONSTINIT
 #else
 #define TEST_CONSTINIT
 #endif
@@ -226,18 +226,18 @@
 #endif
 
 /* Macros for testing libc++ specific behavior and extensions */
-#if defined(_LIBCPP_VERSION)
-#define LIBCPP_ASSERT(...) assert(__VA_ARGS__)
-#define LIBCPP_STATIC_ASSERT(...) static_assert(__VA_ARGS__)
-#define LIBCPP_ASSERT_NOEXCEPT(...) ASSERT_NOEXCEPT(__VA_ARGS__)
-#define LIBCPP_ASSERT_NOT_NOEXCEPT(...) ASSERT_NOT_NOEXCEPT(__VA_ARGS__)
-#define LIBCPP_ONLY(...) __VA_ARGS__
+#if defined(_LIBCUDACXX_VERSION)
+#define LIBCUDACXX_ASSERT(...) assert(__VA_ARGS__)
+#define LIBCUDACXX_STATIC_ASSERT(...) static_assert(__VA_ARGS__)
+#define LIBCUDACXX_ASSERT_NOEXCEPT(...) ASSERT_NOEXCEPT(__VA_ARGS__)
+#define LIBCUDACXX_ASSERT_NOT_NOEXCEPT(...) ASSERT_NOT_NOEXCEPT(__VA_ARGS__)
+#define LIBCUDACXX_ONLY(...) __VA_ARGS__
 #else
-#define LIBCPP_ASSERT(...) static_assert(true, "")
-#define LIBCPP_STATIC_ASSERT(...) static_assert(true, "")
-#define LIBCPP_ASSERT_NOEXCEPT(...) static_assert(true, "")
-#define LIBCPP_ASSERT_NOT_NOEXCEPT(...) static_assert(true, "")
-#define LIBCPP_ONLY(...) static_assert(true, "")
+#define LIBCUDACXX_ASSERT(...) static_assert(true, "")
+#define LIBCUDACXX_STATIC_ASSERT(...) static_assert(true, "")
+#define LIBCUDACXX_ASSERT_NOEXCEPT(...) static_assert(true, "")
+#define LIBCUDACXX_ASSERT_NOT_NOEXCEPT(...) static_assert(true, "")
+#define LIBCUDACXX_ONLY(...) static_assert(true, "")
 #endif
 
 #define TEST_IGNORE_NODISCARD (void)
@@ -349,21 +349,21 @@ inline void DoNotOptimize(Tp const& value) {
 #endif
 
 // Support for carving out parts of the test suite, like removing wide characters, etc.
-#if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
+#if defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)
 #   define TEST_HAS_NO_WIDE_CHARACTERS
 #endif
 
-#if defined(_LIBCPP_HAS_NO_UNICODE)
+#if defined(_LIBCUDACXX_HAS_NO_UNICODE)
 #   define TEST_HAS_NO_UNICODE
 #elif defined(_MSVC_EXECUTION_CHARACTER_SET) && _MSVC_EXECUTION_CHARACTER_SET != 65001
 #   define TEST_HAS_NO_UNICODE
 #endif
 
-#if defined(_LIBCPP_HAS_NO_INT128) || defined(_MSVC_STL_VERSION)
+#if defined(_LIBCUDACXX_HAS_NO_INT128) || defined(_MSVC_STL_VERSION)
 #   define TEST_HAS_NO_INT128
 #endif
 
-#if defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
 #  define TEST_HAS_NO_LOCALIZATION
 #endif
 
@@ -371,15 +371,15 @@ inline void DoNotOptimize(Tp const& value) {
 #  define TEST_HAS_NO_CHAR8_T
 #endif
 
-#if defined(_LIBCPP_HAS_NO_THREADS)
+#if defined(_LIBCUDACXX_HAS_NO_THREADS)
 #  define TEST_HAS_NO_THREADS
 #endif
 
-#if defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
+#if defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)
 #  define TEST_HAS_NO_FILESYSTEM_LIBRARY
 #endif
 
-#if defined(_LIBCPP_HAS_NO_FGETPOS_FSETPOS)
+#if defined(_LIBCUDACXX_HAS_NO_FGETPOS_FSETPOS)
 #  define TEST_HAS_NO_FGETPOS_FSETPOS
 #endif
 

diff  --git a/libcxx/test/support/variant_test_helpers.h b/libcxx/test/support/variant_test_helpers.h
index 92faf7988bc6..8c30519ad5b4 100644
--- a/libcxx/test/support/variant_test_helpers.h
+++ b/libcxx/test/support/variant_test_helpers.h
@@ -22,7 +22,7 @@
 
 // FIXME: Currently the variant<T&> tests are disabled using this macro.
 #define TEST_VARIANT_HAS_NO_REFERENCES
-#ifdef _LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT
+#ifdef _LIBCUDACXX_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT
 # define TEST_VARIANT_ALLOWS_NARROWING_CONVERSIONS
 #endif
 

diff  --git a/libcxx/utils/ci/oss-fuzz.sh b/libcxx/utils/ci/oss-fuzz.sh
index 12149de87ce5..a534bebfd767 100755
--- a/libcxx/utils/ci/oss-fuzz.sh
+++ b/libcxx/utils/ci/oss-fuzz.sh
@@ -23,8 +23,8 @@ for test in libcxx/test/libcxx/fuzzing/*.pass.cpp; do
     exe="${exe%.pass.cpp}"
     ${CXX} ${CXXFLAGS} \
         -std=c++14 \
-        -DLIBCPP_OSS_FUZZ \
-        -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS \
+        -DLIBCUDACXX_OSS_FUZZ \
+        -D_LIBCUDACXX_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS \
         -nostdinc++ -cxx-isystem ${INSTALL}/include/c++/v1 \
         -lpthread -ldl \
         -o "${OUT}/${exe}" \

diff  --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index 2cdbf8b9abe7..bb2dec54e941 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -102,7 +102,7 @@ function generate-cmake-libcxx-win() {
     # builtins helpers for int128 division. See
     # https://reviews.llvm.org/D91139#2429595 for a comment about longterm
     # intent for handling the issue. In the meantime, define
-    # -D_LIBCPP_HAS_NO_INT128 (both when building the library itself and
+    # -D_LIBCUDACXX_HAS_NO_INT128 (both when building the library itself and
     # when building tests) to allow enabling filesystem for running tests,
     # even if it uses a non-permanent ABI.
     generate-cmake-base \
@@ -110,7 +110,7 @@ function generate-cmake-libcxx-win() {
           -DCMAKE_C_COMPILER=clang-cl \
           -DCMAKE_CXX_COMPILER=clang-cl \
           -DLIBCXX_ENABLE_FILESYSTEM=YES \
-          -DLIBCXX_EXTRA_SITE_DEFINES="_LIBCPP_HAS_NO_INT128" \
+          -DLIBCXX_EXTRA_SITE_DEFINES="_LIBCUDACXX_HAS_NO_INT128" \
           "${@}"
 }
 

diff  --git a/libcxx/utils/gdb/libcxx/printers.py b/libcxx/utils/gdb/libcxx/printers.py
index d98b6269f1f9..aa268ce6c396 100644
--- a/libcxx/utils/gdb/libcxx/printers.py
+++ b/libcxx/utils/gdb/libcxx/printers.py
@@ -27,7 +27,7 @@
 
 _long_int_type = gdb.lookup_type("unsigned long long")
 
-_libcpp_big_endian = False
+_LIBCUDACXX_big_endian = False
 
 def addr_as_long(addr):
     return int(addr.cast(_long_int_type))
@@ -971,7 +971,7 @@ def _register_libcxx_printers(event):
     # already generated as part of a larger data structure, and there is
     # no python api to get the endianness. Mixed-endianness debugging
     # rare enough that this workaround should be adequate.
-    _libcpp_big_endian = "big endian" in gdb.execute("show endian",
+    _LIBCUDACXX_big_endian = "big endian" in gdb.execute("show endian",
                                                      to_string=True)
 
     if not getattr(progspace, _libcxx_printer_name, False):

diff  --git a/libcxx/utils/generate_extended_grapheme_cluster_table.py b/libcxx/utils/generate_extended_grapheme_cluster_table.py
index 5c5096047843..1be540a123f9 100755
--- a/libcxx/utils/generate_extended_grapheme_cluster_table.py
+++ b/libcxx/utils/generate_extended_grapheme_cluster_table.py
@@ -114,7 +114,7 @@ def compactPropertyRanges(input: list[PropertyRange]) -> list[PropertyRange]:
 inline constexpr uint32_t __entries[{size}] = {{{entries}}};
 
 /// Returns the extended grapheme cluster bondary property of a code point.
-[[nodiscard]] _LIBCPP_HIDE_FROM_ABI constexpr __property __get_property(const char32_t __code_point) noexcept {{
+[[nodiscard]] _LIBCUDACXX_HIDE_FROM_ABI constexpr __property __get_property(const char32_t __code_point) noexcept {{
   // TODO FMT use std::ranges::upper_bound.
 
   // The algorithm searches for the upper bound of the range and, when found,
@@ -207,8 +207,8 @@ def compactPropertyRanges(input: list[PropertyRange]) -> list[PropertyRange]:
 // use or other dealings in these Data Files or Software without prior
 // written authorization of the copyright holder.
 
-#ifndef _LIBCPP___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
-#define _LIBCPP___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
+#ifndef _LIBCUDACXX___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
+#define _LIBCUDACXX___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
 
 #include <__algorithm/upper_bound.h>
 #include <__config>
@@ -216,13 +216,13 @@ def compactPropertyRanges(input: list[PropertyRange]) -> list[PropertyRange]:
 #include <cstddef>
 #include <cstdint>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
-_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCUDACXX_BEGIN_NAMESPACE_STD
 
-#if _LIBCPP_STD_VER > 17
+#if _LIBCUDACXX_STD_VER > 17
 
 namespace __extended_grapheme_custer_property_boundary {{
 
@@ -230,11 +230,11 @@ def compactPropertyRanges(input: list[PropertyRange]) -> list[PropertyRange]:
 
 }} // __extended_grapheme_custer_property_boundary
 
-#endif //_LIBCPP_STD_VER > 17
+#endif //_LIBCUDACXX_STD_VER > 17
 
-_LIBCPP_END_NAMESPACE_STD
+_LIBCUDACXX_END_NAMESPACE_STD
 
-#endif // _LIBCPP___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
+#endif // _LIBCUDACXX___FORMAT_EXTENDED_GRAPHEME_CLUSTER_TABLE_H
 """
 
 

diff  --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index b6078c002f44..14903a51ee8d 100755
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -49,7 +49,7 @@ def add_version_header(tc):
 #                    * macros defined by the compiler itself, or
 #                    * macros generated by CMake.
 #                   In some cases we add
-#                   `&& !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM_...)`
+#                   `&& !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM_...)`
 #                   in order to make libc++ pass the tests on OSX; see D94983.
 # libcxx_guard      An optional string field. When this field is provided,
 #                   `test_suite_guard` must also be provided. This field is used
@@ -138,14 +138,14 @@ def add_version_header(tc):
     "name": "__cpp_lib_atomic_wait",
     "values": { "c++20": 201907 },
     "headers": ["atomic"],
-    "test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)",
-    "libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)",
+    "test_suite_guard": "!defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)",
+    "libcxx_guard": "!defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_atomic_wait)",
   }, {
     "name": "__cpp_lib_barrier",
     "values": { "c++20": 201907 },
     "headers": ["barrier"],
-    "test_suite_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)",
-    "libcxx_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)",
+    "test_suite_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)",
+    "libcxx_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_barrier)",
   }, {
     "name": "__cpp_lib_bind_back",
     "values": { "c++2b": 202202 },
@@ -189,7 +189,7 @@ def add_version_header(tc):
     "values": { "c++20": 201907 },
     "headers": ["atomic", "filesystem", "istream", "limits", "locale", "ostream", "string", "string_view"],
     "test_suite_guard": "defined(__cpp_char8_t)",
-    "libcxx_guard": "!defined(_LIBCPP_HAS_NO_CHAR8_T)",
+    "libcxx_guard": "!defined(_LIBCUDACXX_HAS_NO_CHAR8_T)",
   }, {
     "name": "__cpp_lib_chrono",
     "values": { "c++17": 201611 },
@@ -279,7 +279,7 @@ def add_version_header(tc):
     "values": { "c++20": 201806 },
     "headers": ["new"],
     "test_suite_guard": "TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L",
-    "libcxx_guard": "_LIBCPP_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L",
+    "libcxx_guard": "_LIBCUDACXX_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L",
   }, {
     "name": "__cpp_lib_enable_shared_from_this",
     "values": { "c++17": 201603 },
@@ -305,8 +305,8 @@ def add_version_header(tc):
     "name": "__cpp_lib_filesystem",
     "values": { "c++17": 201703 },
     "headers": ["filesystem"],
-    "test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)",
-    "libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)"
+    "test_suite_guard": "!defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)",
+    "libcxx_guard": "!defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_filesystem)"
   }, {
     "name": "__cpp_lib_format",
     # P2508, P2286, and P2419 were accepted in the same plenary and modify this
@@ -316,8 +316,8 @@ def add_version_header(tc):
     #"values": { "c++20": 202106, "c++23": 202207" },
     "values": { "c++20": 202106 },
     "headers": ["format"],
-    "test_suite_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
-    "libcxx_guard": "!defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT)",
+    "test_suite_guard": "!defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT)",
+    "libcxx_guard": "!defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_FORMAT)",
   }, {
     "name": "__cpp_lib_gcd_lcm",
     "values": { "c++17": 201606 },
@@ -423,15 +423,15 @@ def add_version_header(tc):
     "name": "__cpp_lib_jthread",
     "values": { "c++20": 201911 },
     "headers": ["stop_token", "thread"],
-    "test_suite_guard": "!defined(_LIBCPP_HAS_NO_THREADS)",
-    "libcxx_guard": "!defined(_LIBCPP_HAS_NO_THREADS)",
+    "test_suite_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS)",
+    "libcxx_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS)",
     "unimplemented": True,
   }, {
     "name": "__cpp_lib_latch",
     "values": { "c++20": 201907 },
     "headers": ["latch"],
-    "test_suite_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)",
-    "libcxx_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)",
+    "test_suite_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)",
+    "libcxx_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_latch)",
   }, {
     "name": "__cpp_lib_launder",
     "values": { "c++17": 201606 },
@@ -522,8 +522,8 @@ def add_version_header(tc):
     "name": "__cpp_lib_ranges",
     "values": { "c++20": 201811 },
     "headers": ["algorithm", "functional", "iterator", "memory", "ranges"],
-    "test_suite_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)",
-    "libcxx_guard": "!defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)",
+    "test_suite_guard": "!defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)",
+    "libcxx_guard": "!defined(_LIBCUDACXX_HAS_NO_INCOMPLETE_RANGES)",
   }, {
     "name": "__cpp_lib_ranges_chunk",
     "values": { "c++2b": 202202 },
@@ -597,14 +597,14 @@ def add_version_header(tc):
     "name": "__cpp_lib_semaphore",
     "values": { "c++20": 201907 },
     "headers": ["semaphore"],
-    "test_suite_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)",
-    "libcxx_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)",
+    "test_suite_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)",
+    "libcxx_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_semaphore)",
   }, {
     "name": "__cpp_lib_shared_mutex",
     "values": { "c++17": 201505 },
     "headers": ["shared_mutex"],
-    "test_suite_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)",
-    "libcxx_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)",
+    "test_suite_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)",
+    "libcxx_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_mutex)",
   }, {
     "name": "__cpp_lib_shared_ptr_arrays",
     "values": { "c++17": 201611, "c++20": 201707 },
@@ -617,8 +617,8 @@ def add_version_header(tc):
     "name": "__cpp_lib_shared_timed_mutex",
     "values": { "c++14": 201402 },
     "headers": ["shared_mutex"],
-    "test_suite_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)",
-    "libcxx_guard": "!defined(_LIBCPP_HAS_NO_THREADS) && !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)",
+    "test_suite_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)",
+    "libcxx_guard": "!defined(_LIBCUDACXX_HAS_NO_THREADS) && !defined(_LIBCUDACXX_AVAILABILITY_DISABLE_FTM___cpp_lib_shared_timed_mutex)",
   }, {
     "name": "__cpp_lib_shift",
     "values": { "c++20": 201806 },
@@ -767,7 +767,7 @@ def add_version_header(tc):
 lit_markup = {
   "barrier": ["UNSUPPORTED: no-threads"],
   "filesystem": ["UNSUPPORTED: no-filesystem"],
-  "format": ["UNSUPPORTED: libcpp-has-no-incomplete-format"],
+  "format": ["UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format"],
   "iomanip": ["UNSUPPORTED: no-localization"],
   "ios": ["UNSUPPORTED: no-localization"],
   "iostream": ["UNSUPPORTED: no-localization"],
@@ -776,7 +776,7 @@ def add_version_header(tc):
   "locale": ["UNSUPPORTED: no-localization"],
   "mutex": ["UNSUPPORTED: no-threads"],
   "ostream": ["UNSUPPORTED: no-localization"],
-  "ranges": ["UNSUPPORTED: libcpp-has-no-incomplete-ranges"],
+  "ranges": ["UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges"],
   "regex": ["UNSUPPORTED: no-localization"],
   "semaphore": ["UNSUPPORTED: no-threads"],
   "shared_mutex": ["UNSUPPORTED: no-threads"],
@@ -863,7 +863,7 @@ def produce_macros_definition_for_std(std):
   return result.strip()
 
 def produce_macros_definitions():
-  macro_definition_template = """#if _LIBCPP_STD_VER > {previous_std_number}
+  macro_definition_template = """#if _LIBCUDACXX_STD_VER > {previous_std_number}
 {macro_definition}
 #endif"""
 
@@ -926,8 +926,8 @@ def produce_version_header():
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef _LIBCPP_VERSIONH
-#define _LIBCPP_VERSIONH
+#ifndef _LIBCUDACXX_VERSIONH
+#define _LIBCUDACXX_VERSIONH
 
 /*
   version synopsis
@@ -939,7 +939,7 @@ def produce_version_header():
 #include <__assert> // all public C++ headers provide the assertion handler
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#if !defined(_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
 #endif
 
@@ -949,7 +949,7 @@ def produce_version_header():
 
 // clang-format on
 
-#endif // _LIBCPP_VERSIONH
+#endif // _LIBCUDACXX_VERSIONH
 """
 
   version_str = template.format(
@@ -987,14 +987,14 @@ def produce_version_header():
 """,
 
   "unimplemented": """
-# if !defined(_LIBCPP_VERSION)
+# if !defined(_LIBCUDACXX_VERSION)
 #   ifndef {name}
 #     error "{name} should be defined in {std}"
 #   endif
 #   if {name} != {value}
 #     error "{name} should have the value {value} in {std}"
 #   endif
-# else // _LIBCPP_VERSION
+# else // _LIBCUDACXX_VERSION
 #   ifdef {name}
 #     error "{name} should not be defined because it is unimplemented in libc++!"
 #   endif

diff  --git a/libcxx/utils/generate_header_inclusion_tests.py b/libcxx/utils/generate_header_inclusion_tests.py
index b6ff3e4b332f..47eaddb2a857 100755
--- a/libcxx/utils/generate_header_inclusion_tests.py
+++ b/libcxx/utils/generate_header_inclusion_tests.py
@@ -94,7 +94,7 @@ def get_libcxx_paths():
 lit_markup = {
   "barrier": ["UNSUPPORTED: no-threads"],
   "filesystem": ["UNSUPPORTED: no-filesystem"],
-  "format": ["UNSUPPORTED: libcpp-has-no-incomplete-format"],
+  "format": ["UNSUPPORTED: LIBCUDACXX-has-no-incomplete-format"],
   "iomanip": ["UNSUPPORTED: no-localization"],
   "ios": ["UNSUPPORTED: no-localization"],
   "iostream": ["UNSUPPORTED: no-localization"],
@@ -103,7 +103,7 @@ def get_libcxx_paths():
   "locale": ["UNSUPPORTED: no-localization"],
   "mutex": ["UNSUPPORTED: no-threads"],
   "ostream": ["UNSUPPORTED: no-localization"],
-  "ranges": ["UNSUPPORTED: libcpp-has-no-incomplete-ranges"],
+  "ranges": ["UNSUPPORTED: LIBCUDACXX-has-no-incomplete-ranges"],
   "regex": ["UNSUPPORTED: no-localization"],
   "semaphore": ["UNSUPPORTED: no-threads"],
   "shared_mutex": ["UNSUPPORTED: no-threads"],
@@ -131,12 +131,12 @@ def get_unsupported_line(includee):
     }[v]
 
 
-def get_libcpp_header_symbol(header_name):
-    return '_LIBCPP_' + header_name.upper().replace('.', '_')
+def get_LIBCUDACXX_header_symbol(header_name):
+    return '_LIBCUDACXX_' + header_name.upper().replace('.', '_')
 
 
 def get_includer_symbol_test(includer):
-    symbol = get_libcpp_header_symbol(includer)
+    symbol = get_LIBCUDACXX_header_symbol(includer)
     return """
 #if !defined({symbol})
  #   error "{message}"
@@ -149,7 +149,7 @@ def get_includer_symbol_test(includer):
 
 def get_ifdef(includer, includee):
     version = max(new_in_version.get(h, "03") for h in [includer, includee])
-    symbol = get_libcpp_header_symbol(includee)
+    symbol = get_LIBCUDACXX_header_symbol(includee)
     return """
 #if {includee_test}!defined({symbol})
  #   error "{message}"

diff  --git a/libcxx/utils/generate_header_tests.py b/libcxx/utils/generate_header_tests.py
index 897e0228d067..d8fecbca78ac 100755
--- a/libcxx/utils/generate_header_tests.py
+++ b/libcxx/utils/generate_header_tests.py
@@ -8,39 +8,39 @@
 import re
 
 header_restrictions = {
-    "barrier": "!defined(_LIBCPP_HAS_NO_THREADS)",
-    "future": "!defined(_LIBCPP_HAS_NO_THREADS)",
-    "latch": "!defined(_LIBCPP_HAS_NO_THREADS)",
-    "mutex": "!defined(_LIBCPP_HAS_NO_THREADS)",
-    "semaphore": "!defined(_LIBCPP_HAS_NO_THREADS)",
-    "shared_mutex": "!defined(_LIBCPP_HAS_NO_THREADS)",
-    "stdatomic.h": "__cplusplus > 202002L && !defined(_LIBCPP_HAS_NO_THREADS)",
-    "thread": "!defined(_LIBCPP_HAS_NO_THREADS)",
-
-    "filesystem": "!defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)",
-
-    "clocale": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "codecvt": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "fstream": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "iomanip": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "ios": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "iostream": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "istream": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "locale.h": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "locale": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "ostream": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "regex": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "sstream": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "streambuf": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-    "strstream": "!defined(_LIBCPP_HAS_NO_LOCALIZATION)",
-
-    "wctype.h": "!defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)",
-    "cwctype": "!defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)",
-    "cwchar": "!defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)",
-    "wchar.h": "!defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)",
+    "barrier": "!defined(_LIBCUDACXX_HAS_NO_THREADS)",
+    "future": "!defined(_LIBCUDACXX_HAS_NO_THREADS)",
+    "latch": "!defined(_LIBCUDACXX_HAS_NO_THREADS)",
+    "mutex": "!defined(_LIBCUDACXX_HAS_NO_THREADS)",
+    "semaphore": "!defined(_LIBCUDACXX_HAS_NO_THREADS)",
+    "shared_mutex": "!defined(_LIBCUDACXX_HAS_NO_THREADS)",
+    "stdatomic.h": "__cplusplus > 202002L && !defined(_LIBCUDACXX_HAS_NO_THREADS)",
+    "thread": "!defined(_LIBCUDACXX_HAS_NO_THREADS)",
+
+    "filesystem": "!defined(_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY)",
+
+    "clocale": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "codecvt": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "fstream": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "iomanip": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "ios": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "iostream": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "istream": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "locale.h": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "locale": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "ostream": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "regex": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "sstream": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "streambuf": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+    "strstream": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)",
+
+    "wctype.h": "!defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)",
+    "cwctype": "!defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)",
+    "cwchar": "!defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)",
+    "wchar.h": "!defined(_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS)",
 
     "experimental/algorithm": "__cplusplus >= 201103L",
-    "experimental/coroutine": "__cplusplus >= 201103L && !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_COROUTINES)",
+    "experimental/coroutine": "__cplusplus >= 201103L && !defined(_LIBCUDACXX_HAS_NO_EXPERIMENTAL_COROUTINES)",
     "experimental/deque": "__cplusplus >= 201103L",
     "experimental/forward_list": "__cplusplus >= 201103L",
     "experimental/functional": "__cplusplus >= 201103L",
@@ -49,7 +49,7 @@
     "experimental/map": "__cplusplus >= 201103L",
     "experimental/memory_resource": "__cplusplus >= 201103L",
     "experimental/propagate_const": "__cplusplus >= 201103L",
-    "experimental/regex": "!defined(_LIBCPP_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L",
+    "experimental/regex": "!defined(_LIBCUDACXX_HAS_NO_LOCALIZATION) && __cplusplus >= 201103L",
     "experimental/set": "__cplusplus >= 201103L",
     "experimental/simd": "__cplusplus >= 201103L",
     "experimental/span": "__cplusplus >= 201103L",

diff  --git a/libcxx/utils/libcxx/test/dsl.py b/libcxx/utils/libcxx/test/dsl.py
index e77ea8fa6004..b4f973c2c7fe 100644
--- a/libcxx/utils/libcxx/test/dsl.py
+++ b/libcxx/utils/libcxx/test/dsl.py
@@ -247,7 +247,7 @@ def hasAnyLocale(config, locales):
   """
   program = """
     #include <stddef.h>
-    #if defined(_LIBCPP_HAS_NO_LOCALIZATION)
+    #if defined(_LIBCUDACXX_HAS_NO_LOCALIZATION)
       int main(int, char**) { return 1; }
     #else
       #include <locale.h>

diff  --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index dea8b38e7cbe..ff991c0ac39d 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -43,7 +43,7 @@ def _hasSuitableClangTidy(cfg):
   Feature(name='-fsized-deallocation',          when=lambda cfg: hasCompileFlag(cfg, '-fsized-deallocation')),
   Feature(name='-faligned-allocation',          when=lambda cfg: hasCompileFlag(cfg, '-faligned-allocation')),
   Feature(name='fdelayed-template-parsing',     when=lambda cfg: hasCompileFlag(cfg, '-fdelayed-template-parsing')),
-  Feature(name='libcpp-no-coroutines',          when=lambda cfg: featureTestMacros(cfg).get('__cpp_impl_coroutine', 0) < 201902),
+  Feature(name='LIBCUDACXX-no-coroutines',          when=lambda cfg: featureTestMacros(cfg).get('__cpp_impl_coroutine', 0) < 201902),
   Feature(name='has-fobjc-arc',                 when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc') and
                                                                  sys.platform.lower().strip() == 'darwin'), # TODO: this doesn't handle cross-compiling to Apple platforms.
   Feature(name='objective-c++',                 when=lambda cfg: hasCompileFlag(cfg, '-xobjective-c++ -fobjc-arc')),
@@ -82,7 +82,7 @@ def _hasSuitableClangTidy(cfg):
   # Check for a Windows UCRT bug (fixed in UCRT/Windows 10.0.20348.0):
   # https://developercommunity.visualstudio.com/t/utf-8-locales-break-ctype-functions-for-wchar-type/1653678
   Feature(name='win32-broken-utf8-wchar-ctype',
-          when=lambda cfg: not '_LIBCPP_HAS_NO_LOCALIZATION' in compilerMacros(cfg) and '_WIN32' in compilerMacros(cfg) and not programSucceeds(cfg, """
+          when=lambda cfg: not '_LIBCUDACXX_HAS_NO_LOCALIZATION' in compilerMacros(cfg) and '_WIN32' in compilerMacros(cfg) and not programSucceeds(cfg, """
             #include <locale.h>
             #include <wctype.h>
             int main(int, char**) {
@@ -94,7 +94,7 @@ def _hasSuitableClangTidy(cfg):
   # Check for a Windows UCRT bug (fixed in UCRT/Windows 10.0.19041.0).
   # https://developercommunity.visualstudio.com/t/printf-formatting-with-g-outputs-too/1660837
   Feature(name='win32-broken-printf-g-precision',
-          when=lambda cfg: not '_LIBCPP_HAS_NO_LOCALIZATION' in compilerMacros(cfg) and '_WIN32' in compilerMacros(cfg) and not programSucceeds(cfg, """
+          when=lambda cfg: not '_LIBCUDACXX_HAS_NO_LOCALIZATION' in compilerMacros(cfg) and '_WIN32' in compilerMacros(cfg) and not programSucceeds(cfg, """
             #include <stdio.h>
             #include <string.h>
             int main(int, char**) {
@@ -107,7 +107,7 @@ def _hasSuitableClangTidy(cfg):
   # Check for Glibc < 2.27, where the ru_RU.UTF-8 locale had
   # mon_decimal_point == ".", which our tests don't handle.
   Feature(name='glibc-old-ru_RU-decimal-point',
-          when=lambda cfg: not '_LIBCPP_HAS_NO_LOCALIZATION' in compilerMacros(cfg) and not programSucceeds(cfg, """
+          when=lambda cfg: not '_LIBCUDACXX_HAS_NO_LOCALIZATION' in compilerMacros(cfg) and not programSucceeds(cfg, """
             #include <locale.h>
             #include <string.h>
             int main(int, char**) {
@@ -155,7 +155,7 @@ def _hasSuitableClangTidy(cfg):
   # - Enable -Wplacement-new with GCC.
   # - Enable -Wclass-memaccess with GCC.
   Feature(name='gcc',                                                                                                              when=_isGCC,
-          actions=[AddCompileFlag('-D_LIBCPP_DISABLE_DEPRECATION_WARNINGS'),
+          actions=[AddCompileFlag('-D_LIBCUDACXX_DISABLE_DEPRECATION_WARNINGS'),
                    AddCompileFlag('-Wno-placement-new'),
                    AddCompileFlag('-Wno-class-memaccess')]),
   Feature(name=lambda cfg: 'gcc-{__GNUC__}'.format(**compilerMacros(cfg)),                                                         when=_isGCC),
@@ -170,26 +170,26 @@ def _hasSuitableClangTidy(cfg):
 # Deduce and add the test features that that are implied by the #defines in
 # the <__config_site> header.
 #
-# For each macro of the form `_LIBCPP_XXX_YYY_ZZZ` defined below that
+# For each macro of the form `_LIBCUDACXX_XXX_YYY_ZZZ` defined below that
 # is defined after including <__config_site>, add a Lit feature called
-# `libcpp-xxx-yyy-zzz`. When a macro is defined to a specific value
-# (e.g. `_LIBCPP_ABI_VERSION=2`), the feature is `libcpp-xxx-yyy-zzz=<value>`.
+# `LIBCUDACXX-xxx-yyy-zzz`. When a macro is defined to a specific value
+# (e.g. `_LIBCUDACXX_ABI_VERSION=2`), the feature is `LIBCUDACXX-xxx-yyy-zzz=<value>`.
 #
-# Note that features that are more strongly tied to libc++ are named libcpp-foo,
-# while features that are more general in nature are not prefixed with 'libcpp-'.
+# Note that features that are more strongly tied to libc++ are named LIBCUDACXX-foo,
+# while features that are more general in nature are not prefixed with 'LIBCUDACXX-'.
 macros = {
-  '_LIBCPP_HAS_NO_MONOTONIC_CLOCK': 'no-monotonic-clock',
-  '_LIBCPP_HAS_NO_THREADS': 'no-threads',
-  '_LIBCPP_HAS_THREAD_API_EXTERNAL': 'libcpp-has-thread-api-external',
-  '_LIBCPP_HAS_THREAD_API_PTHREAD': 'libcpp-has-thread-api-pthread',
-  '_LIBCPP_NO_VCRUNTIME': 'libcpp-no-vcruntime',
-  '_LIBCPP_ABI_VERSION': 'libcpp-abi-version',
-  '_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY': 'no-filesystem',
-  '_LIBCPP_HAS_NO_RANDOM_DEVICE': 'no-random-device',
-  '_LIBCPP_HAS_NO_LOCALIZATION': 'no-localization',
-  '_LIBCPP_HAS_NO_WIDE_CHARACTERS': 'no-wide-characters',
-  '_LIBCPP_HAS_NO_UNICODE': 'libcpp-has-no-unicode',
-  '_LIBCPP_ENABLE_DEBUG_MODE': 'libcpp-has-debug-mode',
+  '_LIBCUDACXX_HAS_NO_MONOTONIC_CLOCK': 'no-monotonic-clock',
+  '_LIBCUDACXX_HAS_NO_THREADS': 'no-threads',
+  '_LIBCUDACXX_HAS_THREAD_API_EXTERNAL': 'LIBCUDACXX-has-thread-api-external',
+  '_LIBCUDACXX_HAS_THREAD_API_PTHREAD': 'LIBCUDACXX-has-thread-api-pthread',
+  '_LIBCUDACXX_NO_VCRUNTIME': 'LIBCUDACXX-no-vcruntime',
+  '_LIBCUDACXX_ABI_VERSION': 'LIBCUDACXX-abi-version',
+  '_LIBCUDACXX_HAS_NO_FILESYSTEM_LIBRARY': 'no-filesystem',
+  '_LIBCUDACXX_HAS_NO_RANDOM_DEVICE': 'no-random-device',
+  '_LIBCUDACXX_HAS_NO_LOCALIZATION': 'no-localization',
+  '_LIBCUDACXX_HAS_NO_WIDE_CHARACTERS': 'no-wide-characters',
+  '_LIBCUDACXX_HAS_NO_UNICODE': 'LIBCUDACXX-has-no-unicode',
+  '_LIBCUDACXX_ENABLE_DEBUG_MODE': 'LIBCUDACXX-has-debug-mode',
 }
 for macro, feature in macros.items():
   DEFAULT_FEATURES.append(

diff  --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 3f223ac17f3b..37b3563a04a2 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -131,7 +131,7 @@ def getStdFlag(cfg, std):
             help="Whether to enable warnings when compiling the test suite.",
             actions=lambda warnings: [] if not warnings else
               [AddOptionalWarningFlag(w) for w in _warningFlags] +
-              [AddCompileFlag('-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER')]
+              [AddCompileFlag('-D_LIBCUDACXX_HAS_NO_PRAGMA_SYSTEM_HEADER')]
             ),
 
   Parameter(name='use_sanitizer', choices=['', 'Address', 'Undefined', 'Memory', 'MemoryWithOrigins', 'Thread', 'DataFlow', 'Leaks'], type=str, default='',
@@ -168,10 +168,10 @@ def getStdFlag(cfg, std):
               # as those features are added after processing parameters.
               AddFeature('c++experimental'),
               PrependLinkFlag(lambda cfg: '-llibc++experimental' if _isMSVC(cfg) else '-lc++experimental'),
-              AddCompileFlag('-D_LIBCPP_ENABLE_EXPERIMENTAL'),
+              AddCompileFlag('-D_LIBCUDACXX_ENABLE_EXPERIMENTAL'),
             ] if experimental else [
-              AddFeature('libcpp-has-no-incomplete-format'),
-              AddFeature('libcpp-has-no-incomplete-ranges')
+              AddFeature('LIBCUDACXX-has-no-incomplete-format'),
+              AddFeature('LIBCUDACXX-has-no-incomplete-ranges')
             ]),
 
   Parameter(name='long_tests', choices=[True, False], type=bool, default=True,
@@ -184,8 +184,8 @@ def getStdFlag(cfg, std):
             help="Whether to enable assertions when compiling the test suite. This is only meaningful when "
                  "running the tests against libc++.",
             actions=lambda assertions: [
-              AddCompileFlag('-D_LIBCPP_ENABLE_ASSERTIONS=1'),
-              AddFeature('libcpp-has-assertions')
+              AddCompileFlag('-D_LIBCUDACXX_ENABLE_ASSERTIONS=1'),
+              AddFeature('LIBCUDACXX-has-assertions')
             ] if assertions else []),
 
   Parameter(name='additional_features', type=list, default=[],
@@ -200,7 +200,7 @@ def getStdFlag(cfg, std):
                  "points at which we bulk-remove transitive includes.",
             actions=lambda enabled: [] if enabled else [
               AddFeature('transitive-includes-disabled'),
-              AddCompileFlag('-D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES')
+              AddCompileFlag('-D_LIBCUDACXX_REMOVE_TRANSITIVE_INCLUDES')
             ]),
 ]
 
@@ -235,6 +235,6 @@ def getStdFlag(cfg, std):
     ] if useSystem else [
       # If we're testing upstream libc++, disable availability markup,
       # which is not relevant for non-shipped flavors of libc++.
-      AddCompileFlag('-D_LIBCPP_DISABLE_AVAILABILITY')
+      AddCompileFlag('-D_LIBCUDACXX_DISABLE_AVAILABILITY')
     ])
 ]

diff  --git a/libcxxabi/CMakeLists.txt b/libcxxabi/CMakeLists.txt
index b8326d08d23a..96845a576530 100644
--- a/libcxxabi/CMakeLists.txt
+++ b/libcxxabi/CMakeLists.txt
@@ -269,9 +269,9 @@ endif()
 # library.
 add_definitions(-D_LIBCXXABI_BUILDING_LIBRARY)
 
-# libcxxabi needs to, for various reasons, include the libcpp headers as if
+# libcxxabi needs to, for various reasons, include the LIBCUDACXX headers as if
 # it is being built as part of libcxx.
-add_definitions(-D_LIBCPP_BUILDING_LIBRARY)
+add_definitions(-D_LIBCUDACXX_BUILDING_LIBRARY)
 
 add_compile_flags_if_supported(-Werror=return-type)
 
@@ -417,19 +417,19 @@ if (LIBCXXABI_HAS_UNDEFINED_SYMBOLS)
 endif()
 
 if (LIBCXXABI_HAS_PTHREAD_API)
-  add_definitions(-D_LIBCPP_HAS_THREAD_API_PTHREAD)
+  add_definitions(-D_LIBCUDACXX_HAS_THREAD_API_PTHREAD)
 endif()
 
 if (LIBCXXABI_HAS_WIN32_THREAD_API)
-  add_definitions(-D_LIBCPP_HAS_THREAD_API_WIN32)
+  add_definitions(-D_LIBCUDACXX_HAS_THREAD_API_WIN32)
 endif()
 
 if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)
-  add_definitions(-D_LIBCPP_HAS_THREAD_API_EXTERNAL)
+  add_definitions(-D_LIBCUDACXX_HAS_THREAD_API_EXTERNAL)
 endif()
 
 if (LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY)
-  add_definitions(-D_LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL)
+  add_definitions(-D_LIBCUDACXX_HAS_THREAD_LIBRARY_EXTERNAL)
 endif()
 
 if (MSVC)

diff  --git a/libcxxabi/include/cxxabi.h b/libcxxabi/include/cxxabi.h
index 85cb4b36b811..4bcc7d20f84f 100644
--- a/libcxxabi/include/cxxabi.h
+++ b/libcxxabi/include/cxxabi.h
@@ -19,7 +19,7 @@
 
 #include <__cxxabi_config.h>
 
-#define _LIBCPPABI_VERSION 15000
+#define _LIBCUDACXXABI_VERSION 15000
 #define _LIBCXXABI_NORETURN  __attribute__((noreturn))
 #define _LIBCXXABI_ALWAYS_COLD __attribute__((cold))
 

diff  --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt
index 248acc6567ab..eeb501c7d6a2 100644
--- a/libcxxabi/src/CMakeLists.txt
+++ b/libcxxabi/src/CMakeLists.txt
@@ -257,13 +257,13 @@ if(LIBCXXABI_HERMETIC_STATIC_LIBRARY)
   if (LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS)
     target_add_compile_flags_if_supported(cxxabi_static_objects PRIVATE -fvisibility-global-new-delete-hidden)
   endif()
-  # _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS can be defined in libcxx's
+  # _LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS can be defined in libcxx's
   # __config_site too. Define it in the same way here, to avoid redefinition
   # conflicts.
   target_compile_definitions(cxxabi_static_objects
     PRIVATE
       _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS
-      _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS=)
+      _LIBCUDACXX_DISABLE_VISIBILITY_ANNOTATIONS=)
 endif()
 
 if (LIBCXXABI_ENABLE_STATIC)

diff  --git a/libcxxabi/src/cxa_default_handlers.cpp b/libcxxabi/src/cxa_default_handlers.cpp
index 7bcfca069fb7..0ada0bf11b5b 100644
--- a/libcxxabi/src/cxa_default_handlers.cpp
+++ b/libcxxabi/src/cxa_default_handlers.cpp
@@ -119,7 +119,7 @@ set_unexpected(unexpected_handler func) noexcept
 {
     if (func == 0)
         func = default_unexpected_handler;
-    return __libcpp_atomic_exchange(&__cxa_unexpected_handler, func,
+    return __LIBCUDACXX_atomic_exchange(&__cxa_unexpected_handler, func,
                                     _AO_Acq_Rel);
 }
 
@@ -128,14 +128,14 @@ set_terminate(terminate_handler func) noexcept
 {
     if (func == 0)
         func = default_terminate_handler;
-    return __libcpp_atomic_exchange(&__cxa_terminate_handler, func,
+    return __LIBCUDACXX_atomic_exchange(&__cxa_terminate_handler, func,
                                     _AO_Acq_Rel);
 }
 
 new_handler
 set_new_handler(new_handler handler) noexcept
 {
-    return __libcpp_atomic_exchange(&__cxa_new_handler, handler, _AO_Acq_Rel);
+    return __LIBCUDACXX_atomic_exchange(&__cxa_new_handler, handler, _AO_Acq_Rel);
 }
 
 }

diff  --git a/libcxxabi/src/cxa_exception.cpp b/libcxxabi/src/cxa_exception.cpp
index 9cb2bf888811..f97edc4e6007 100644
--- a/libcxxabi/src/cxa_exception.cpp
+++ b/libcxxabi/src/cxa_exception.cpp
@@ -651,7 +651,7 @@ __cxa_increment_exception_refcount(void *thrown_object) throw() {
     if (thrown_object != NULL )
     {
         __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
-        std::__libcpp_atomic_add(&exception_header->referenceCount, size_t(1));
+        std::__LIBCUDACXX_atomic_add(&exception_header->referenceCount, size_t(1));
     }
 }
 
@@ -668,7 +668,7 @@ void __cxa_decrement_exception_refcount(void *thrown_object) throw() {
     if (thrown_object != NULL )
     {
         __cxa_exception* exception_header = cxa_exception_from_thrown_object(thrown_object);
-        if (std::__libcpp_atomic_add(&exception_header->referenceCount, size_t(-1)) == 0)
+        if (std::__LIBCUDACXX_atomic_add(&exception_header->referenceCount, size_t(-1)) == 0)
         {
             if (NULL != exception_header->exceptionDestructor)
                 exception_header->exceptionDestructor(thrown_object);

diff  --git a/libcxxabi/src/cxa_exception_storage.cpp b/libcxxabi/src/cxa_exception_storage.cpp
index 3a3233a1b927..15d9ae4b5211 100644
--- a/libcxxabi/src/cxa_exception_storage.cpp
+++ b/libcxxabi/src/cxa_exception_storage.cpp
@@ -55,17 +55,17 @@ extern "C" {
 
 namespace __cxxabiv1 {
 namespace {
-    std::__libcpp_tls_key key_;
-    std::__libcpp_exec_once_flag flag_ = _LIBCPP_EXEC_ONCE_INITIALIZER;
+    std::__LIBCUDACXX_tls_key key_;
+    std::__LIBCUDACXX_exec_once_flag flag_ = _LIBCUDACXX_EXEC_ONCE_INITIALIZER;
 
-    void _LIBCPP_TLS_DESTRUCTOR_CC destruct_(void *p) {
+    void _LIBCUDACXX_TLS_DESTRUCTOR_CC destruct_(void *p) {
         __free_with_fallback(p);
-        if (0 != std::__libcpp_tls_set(key_, NULL))
+        if (0 != std::__LIBCUDACXX_tls_set(key_, NULL))
             abort_message("cannot zero out thread value for __cxa_get_globals()");
     }
 
     void construct_() {
-        if (0 != std::__libcpp_tls_create(&key_, destruct_))
+        if (0 != std::__LIBCUDACXX_tls_create(&key_, destruct_))
             abort_message("cannot create thread specific key for __cxa_get_globals()");
     }
 } // namespace
@@ -81,8 +81,8 @@ extern "C" {
                 __calloc_with_fallback(1, sizeof(__cxa_eh_globals)));
             if (NULL == retVal)
                 abort_message("cannot allocate __cxa_eh_globals");
-            if (0 != std::__libcpp_tls_set(key_, retVal))
-               abort_message("std::__libcpp_tls_set failure in __cxa_get_globals()");
+            if (0 != std::__LIBCUDACXX_tls_set(key_, retVal))
+               abort_message("std::__LIBCUDACXX_tls_set failure in __cxa_get_globals()");
         }
         return retVal;
     }
@@ -93,9 +93,9 @@ extern "C" {
     // libc++abi.
     __cxa_eh_globals *__cxa_get_globals_fast() {
         // First time through, create the key.
-        if (0 != std::__libcpp_execute_once(&flag_, construct_))
+        if (0 != std::__LIBCUDACXX_execute_once(&flag_, construct_))
             abort_message("execute once failure in __cxa_get_globals_fast()");
-        return static_cast<__cxa_eh_globals*>(std::__libcpp_tls_get(key_));
+        return static_cast<__cxa_eh_globals*>(std::__LIBCUDACXX_tls_get(key_));
     }
 } // extern "C"
 } // namespace __cxxabiv1

diff  --git a/libcxxabi/src/cxa_guard.cpp b/libcxxabi/src/cxa_guard.cpp
index fc1fa9051195..afbf7c5564d3 100644
--- a/libcxxabi/src/cxa_guard.cpp
+++ b/libcxxabi/src/cxa_guard.cpp
@@ -19,8 +19,8 @@
     which will turn around and try to call __cxa_guard_acquire reentrantly.
     For this reason, the headers of this file are as restricted as possible.
     Previous implementations of this code for __APPLE__ have used
-    std::__libcpp_mutex_lock and the abort_message utility without problem. This
-    implementation also uses std::__libcpp_condvar_wait which has tested
+    std::__LIBCUDACXX_mutex_lock and the abort_message utility without problem. This
+    implementation also uses std::__LIBCUDACXX_condvar_wait which has tested
     to not be a problem.
 */
 

diff  --git a/libcxxabi/src/cxa_guard_impl.h b/libcxxabi/src/cxa_guard_impl.h
index 72940cc7e869..fe15c98098e5 100644
--- a/libcxxabi/src/cxa_guard_impl.h
+++ b/libcxxabi/src/cxa_guard_impl.h
@@ -128,17 +128,17 @@ struct LazyValue {
 template <class IntType>
 class AtomicInt {
 public:
-  using MemoryOrder = std::__libcpp_atomic_order;
+  using MemoryOrder = std::__LIBCUDACXX_atomic_order;
 
   explicit AtomicInt(IntType* b) : b_(b) {}
   AtomicInt(AtomicInt const&) = delete;
   AtomicInt& operator=(AtomicInt const&) = delete;
 
-  IntType load(MemoryOrder ord) { return std::__libcpp_atomic_load(b_, ord); }
-  void store(IntType val, MemoryOrder ord) { std::__libcpp_atomic_store(b_, val, ord); }
-  IntType exchange(IntType new_val, MemoryOrder ord) { return std::__libcpp_atomic_exchange(b_, new_val, ord); }
+  IntType load(MemoryOrder ord) { return std::__LIBCUDACXX_atomic_load(b_, ord); }
+  void store(IntType val, MemoryOrder ord) { std::__LIBCUDACXX_atomic_store(b_, val, ord); }
+  IntType exchange(IntType new_val, MemoryOrder ord) { return std::__LIBCUDACXX_atomic_exchange(b_, new_val, ord); }
   bool compare_exchange(IntType* expected, IntType desired, MemoryOrder ord_success, MemoryOrder ord_failure) {
-    return std::__libcpp_atomic_compare_exchange(b_, expected, desired, ord_success, ord_failure);
+    return std::__LIBCUDACXX_atomic_compare_exchange(b_, expected, desired, ord_success, ord_failure);
   }
 
 private:
@@ -149,12 +149,12 @@ class AtomicInt {
 //                       PlatformGetThreadID
 //===----------------------------------------------------------------------===//
 
-#if defined(__APPLE__) && defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+#if defined(__APPLE__) && defined(_LIBCUDACXX_HAS_THREAD_API_PTHREAD)
 uint32_t PlatformThreadID() {
   static_assert(sizeof(mach_port_t) == sizeof(uint32_t), "");
-  return static_cast<uint32_t>(pthread_mach_thread_np(std::__libcpp_thread_get_current_id()));
+  return static_cast<uint32_t>(pthread_mach_thread_np(std::__LIBCUDACXX_thread_get_current_id()));
 }
-#elif defined(SYS_gettid) && defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
+#elif defined(SYS_gettid) && defined(_LIBCUDACXX_HAS_THREAD_API_PTHREAD)
 uint32_t PlatformThreadID() {
   static_assert(sizeof(pid_t) == sizeof(uint32_t), "");
   return static_cast<uint32_t>(syscall(SYS_gettid));
@@ -270,37 +270,37 @@ struct InitByteNoThreads {
 //                     Global Mutex Implementation
 //===----------------------------------------------------------------------===//
 
-struct LibcppMutex;
-struct LibcppCondVar;
+struct LIBCUDACXXMutex;
+struct LIBCUDACXXCondVar;
 
 #ifndef _LIBCXXABI_HAS_NO_THREADS
-struct LibcppMutex {
-  LibcppMutex() = default;
-  LibcppMutex(LibcppMutex const&) = delete;
-  LibcppMutex& operator=(LibcppMutex const&) = delete;
+struct LIBCUDACXXMutex {
+  LIBCUDACXXMutex() = default;
+  LIBCUDACXXMutex(LIBCUDACXXMutex const&) = delete;
+  LIBCUDACXXMutex& operator=(LIBCUDACXXMutex const&) = delete;
 
-  bool lock() { return std::__libcpp_mutex_lock(&mutex); }
-  bool unlock() { return std::__libcpp_mutex_unlock(&mutex); }
+  bool lock() { return std::__LIBCUDACXX_mutex_lock(&mutex); }
+  bool unlock() { return std::__LIBCUDACXX_mutex_unlock(&mutex); }
 
 private:
-  friend struct LibcppCondVar;
-  std::__libcpp_mutex_t mutex = _LIBCPP_MUTEX_INITIALIZER;
+  friend struct LIBCUDACXXCondVar;
+  std::__LIBCUDACXX_mutex_t mutex = _LIBCUDACXX_MUTEX_INITIALIZER;
 };
 
-struct LibcppCondVar {
-  LibcppCondVar() = default;
-  LibcppCondVar(LibcppCondVar const&) = delete;
-  LibcppCondVar& operator=(LibcppCondVar const&) = delete;
+struct LIBCUDACXXCondVar {
+  LIBCUDACXXCondVar() = default;
+  LIBCUDACXXCondVar(LIBCUDACXXCondVar const&) = delete;
+  LIBCUDACXXCondVar& operator=(LIBCUDACXXCondVar const&) = delete;
 
-  bool wait(LibcppMutex& mut) { return std::__libcpp_condvar_wait(&cond, &mut.mutex); }
-  bool broadcast() { return std::__libcpp_condvar_broadcast(&cond); }
+  bool wait(LIBCUDACXXMutex& mut) { return std::__LIBCUDACXX_condvar_wait(&cond, &mut.mutex); }
+  bool broadcast() { return std::__LIBCUDACXX_condvar_broadcast(&cond); }
 
 private:
-  std::__libcpp_condvar_t cond = _LIBCPP_CONDVAR_INITIALIZER;
+  std::__LIBCUDACXX_condvar_t cond = _LIBCUDACXX_CONDVAR_INITIALIZER;
 };
 #else
-struct LibcppMutex {};
-struct LibcppCondVar {};
+struct LIBCUDACXXMutex {};
+struct LIBCUDACXXCondVar {};
 #endif // !defined(_LIBCXXABI_HAS_NO_THREADS)
 
 /// InitByteGlobalMutex - Uses a global mutex and condition variable (common to
@@ -619,7 +619,7 @@ struct GlobalStatic {
   static T instance;
 };
 template <class T>
-_LIBCPP_CONSTINIT T GlobalStatic<T>::instance = {};
+_LIBCUDACXX_CONSTINIT T GlobalStatic<T>::instance = {};
 
 enum class Implementation { NoThreads, GlobalMutex, Futex };
 
@@ -633,8 +633,8 @@ struct SelectImplementation<Implementation::NoThreads> {
 
 template <>
 struct SelectImplementation<Implementation::GlobalMutex> {
-  using type = GlobalMutexGuard<LibcppMutex, LibcppCondVar, GlobalStatic<LibcppMutex>::instance,
-                                GlobalStatic<LibcppCondVar>::instance, PlatformThreadID>;
+  using type = GlobalMutexGuard<LIBCUDACXXMutex, LIBCUDACXXCondVar, GlobalStatic<LIBCUDACXXMutex>::instance,
+                                GlobalStatic<LIBCUDACXXCondVar>::instance, PlatformThreadID>;
 };
 
 template <>

diff  --git a/libcxxabi/src/cxa_handlers.cpp b/libcxxabi/src/cxa_handlers.cpp
index 344250dde0c7..ce488f9d4778 100644
--- a/libcxxabi/src/cxa_handlers.cpp
+++ b/libcxxabi/src/cxa_handlers.cpp
@@ -25,7 +25,7 @@ namespace std
 unexpected_handler
 get_unexpected() noexcept
 {
-    return __libcpp_atomic_load(&__cxa_unexpected_handler, _AO_Acquire);
+    return __LIBCUDACXX_atomic_load(&__cxa_unexpected_handler, _AO_Acquire);
 }
 
 void
@@ -46,7 +46,7 @@ unexpected()
 terminate_handler
 get_terminate() noexcept
 {
-    return __libcpp_atomic_load(&__cxa_terminate_handler, _AO_Acquire);
+    return __LIBCUDACXX_atomic_load(&__cxa_terminate_handler, _AO_Acquire);
 }
 
 void
@@ -95,7 +95,7 @@ terminate() noexcept
 new_handler
 get_new_handler() noexcept
 {
-    return __libcpp_atomic_load(&__cxa_new_handler, _AO_Acquire);
+    return __LIBCUDACXX_atomic_load(&__cxa_new_handler, _AO_Acquire);
 }
 
 }  // std

diff  --git a/libcxxabi/src/cxa_thread_atexit.cpp b/libcxxabi/src/cxa_thread_atexit.cpp
index 665f9e55694a..502f77efc23b 100644
--- a/libcxxabi/src/cxa_thread_atexit.cpp
+++ b/libcxxabi/src/cxa_thread_atexit.cpp
@@ -71,7 +71,7 @@ namespace {
   // True if the destructors are currently scheduled to run on this thread
   __thread bool dtors_alive = false;
   // Used to trigger destructors on thread exit; value is ignored
-  std::__libcpp_tls_key dtors_key;
+  std::__LIBCUDACXX_tls_key dtors_key;
 
   void run_dtors(void*) {
     while (auto head = dtors) {
@@ -85,16 +85,16 @@ namespace {
 
   struct DtorsManager {
     DtorsManager() {
-      // There is intentionally no matching std::__libcpp_tls_delete call, as
+      // There is intentionally no matching std::__LIBCUDACXX_tls_delete call, as
       // __cxa_thread_atexit() may be called arbitrarily late (for example, from
       // global destructors or atexit() handlers).
-      if (std::__libcpp_tls_create(&dtors_key, run_dtors) != 0) {
-        abort_message("std::__libcpp_tls_create() failed in __cxa_thread_atexit()");
+      if (std::__LIBCUDACXX_tls_create(&dtors_key, run_dtors) != 0) {
+        abort_message("std::__LIBCUDACXX_tls_create() failed in __cxa_thread_atexit()");
       }
     }
 
     ~DtorsManager() {
-      // std::__libcpp_tls_key destructors do not run on threads that call exit()
+      // std::__LIBCUDACXX_tls_key destructors do not run on threads that call exit()
       // (including when the main thread returns from main()), so we explicitly
       // call the destructor here.  This runs at exit time (potentially earlier
       // if libc++abi is dlclose()'d).  Any thread_locals initialized after this
@@ -115,12 +115,12 @@ extern "C" {
     if (__cxa_thread_atexit_impl) {
       return __cxa_thread_atexit_impl(dtor, obj, dso_symbol);
     } else {
-      // Initialize the dtors std::__libcpp_tls_key (uses __cxa_guard_*() for
+      // Initialize the dtors std::__LIBCUDACXX_tls_key (uses __cxa_guard_*() for
       // one-time initialization and __cxa_atexit() for destruction)
       static DtorsManager manager;
 
       if (!dtors_alive) {
-        if (std::__libcpp_tls_set(dtors_key, &dtors_key) != 0) {
+        if (std::__LIBCUDACXX_tls_set(dtors_key, &dtors_key) != 0) {
           return -1;
         }
         dtors_alive = true;

diff  --git a/libcxxabi/src/fallback_malloc.cpp b/libcxxabi/src/fallback_malloc.cpp
index 1d6c3808b217..be8b314a2cba 100644
--- a/libcxxabi/src/fallback_malloc.cpp
+++ b/libcxxabi/src/fallback_malloc.cpp
@@ -17,7 +17,7 @@
 
 #include <stdlib.h> // for malloc, calloc, free
 #include <string.h> // for memset
-#include <new> // for std::__libcpp_aligned_{alloc,free}
+#include <new> // for std::__LIBCUDACXX_aligned_{alloc,free}
 
 //  A small, simple heap manager based (loosely) on
 //  the startup heap manager from FreeBSD, optimized for space.
@@ -33,18 +33,18 @@ namespace {
 
 // When POSIX threads are not available, make the mutex operations a nop
 #ifndef _LIBCXXABI_HAS_NO_THREADS
-static _LIBCPP_CONSTINIT std::__libcpp_mutex_t heap_mutex = _LIBCPP_MUTEX_INITIALIZER;
+static _LIBCUDACXX_CONSTINIT std::__LIBCUDACXX_mutex_t heap_mutex = _LIBCUDACXX_MUTEX_INITIALIZER;
 #else
-static _LIBCPP_CONSTINIT void* heap_mutex = 0;
+static _LIBCUDACXX_CONSTINIT void* heap_mutex = 0;
 #endif
 
 class mutexor {
 public:
 #ifndef _LIBCXXABI_HAS_NO_THREADS
-  mutexor(std::__libcpp_mutex_t* m) : mtx_(m) {
-    std::__libcpp_mutex_lock(mtx_);
+  mutexor(std::__LIBCUDACXX_mutex_t* m) : mtx_(m) {
+    std::__LIBCUDACXX_mutex_lock(mtx_);
   }
-  ~mutexor() { std::__libcpp_mutex_unlock(mtx_); }
+  ~mutexor() { std::__LIBCUDACXX_mutex_unlock(mtx_); }
 #else
   mutexor(void*) {}
   ~mutexor() {}
@@ -53,7 +53,7 @@ class mutexor {
   mutexor(const mutexor& rhs);
   mutexor& operator=(const mutexor& rhs);
 #ifndef _LIBCXXABI_HAS_NO_THREADS
-  std::__libcpp_mutex_t* mtx_;
+  std::__LIBCUDACXX_mutex_t* mtx_;
 #endif
 };
 
@@ -204,15 +204,15 @@ struct __attribute__((aligned)) __aligned_type {};
 
 void* __aligned_malloc_with_fallback(size_t size) {
 #if defined(_WIN32)
-  if (void* dest = std::__libcpp_aligned_alloc(alignof(__aligned_type), size))
+  if (void* dest = std::__LIBCUDACXX_aligned_alloc(alignof(__aligned_type), size))
     return dest;
-#elif defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
+#elif defined(_LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
   if (void* dest = ::malloc(size))
     return dest;
 #else
   if (size == 0)
     size = 1;
-  if (void* dest = std::__libcpp_aligned_alloc(__alignof(__aligned_type), size))
+  if (void* dest = std::__LIBCUDACXX_aligned_alloc(__alignof(__aligned_type), size))
     return dest;
 #endif
   return fallback_malloc(size);
@@ -233,10 +233,10 @@ void __aligned_free_with_fallback(void* ptr) {
   if (is_fallback_ptr(ptr))
     fallback_free(ptr);
   else {
-#if defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
+#if defined(_LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
     ::free(ptr);
 #else
-    std::__libcpp_aligned_free(ptr);
+    std::__LIBCUDACXX_aligned_free(ptr);
 #endif
   }
 }

diff  --git a/libcxxabi/src/stdlib_new_delete.cpp b/libcxxabi/src/stdlib_new_delete.cpp
index 4a664e15a50f..3ae6b3f6520d 100644
--- a/libcxxabi/src/stdlib_new_delete.cpp
+++ b/libcxxabi/src/stdlib_new_delete.cpp
@@ -131,7 +131,7 @@ operator delete[] (void* ptr, size_t) noexcept
     ::operator delete[](ptr);
 }
 
-#if !defined(_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
+#if !defined(_LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION)
 
 _LIBCXXABI_WEAK
 void *
@@ -149,7 +149,7 @@ operator new(std::size_t size, std::align_val_t alignment) _THROW_BAD_ALLOC
     // If allocation fails and there is no new_handler, we throw bad_alloc
     // (or return nullptr if exceptions are disabled).
     void* p;
-    while ((p = std::__libcpp_aligned_alloc(static_cast<std::size_t>(alignment), size)) == nullptr)
+    while ((p = std::__LIBCUDACXX_aligned_alloc(static_cast<std::size_t>(alignment), size)) == nullptr)
     {
         std::new_handler nh = std::get_new_handler();
         if (nh)
@@ -214,7 +214,7 @@ _LIBCXXABI_WEAK
 void
 operator delete(void* ptr, std::align_val_t) noexcept
 {
-    std::__libcpp_aligned_free(ptr);
+    std::__LIBCUDACXX_aligned_free(ptr);
 }
 
 _LIBCXXABI_WEAK
@@ -252,4 +252,4 @@ operator delete[] (void* ptr, size_t, std::align_val_t alignment) noexcept
     ::operator delete[](ptr, alignment);
 }
 
-#endif // !_LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION
+#endif // !_LIBCUDACXX_HAS_NO_LIBRARY_ALIGNED_ALLOCATION

diff  --git a/libcxxabi/src/stdlib_stdexcept.cpp b/libcxxabi/src/stdlib_stdexcept.cpp
index 92f7a6e076c0..c07ad033012c 100644
--- a/libcxxabi/src/stdlib_stdexcept.cpp
+++ b/libcxxabi/src/stdlib_stdexcept.cpp
@@ -14,7 +14,7 @@
 #include <cstddef>
 #include "include/refstring.h" // from libc++
 
-static_assert(sizeof(std::__libcpp_refstring) == sizeof(const char *), "");
+static_assert(sizeof(std::__LIBCUDACXX_refstring) == sizeof(const char *), "");
 
 namespace std  // purposefully not using versioning namespace
 {

diff  --git a/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in b/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in
index e94f15cf2257..dbeceb43eb5d 100644
--- a/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in
+++ b/libcxxabi/test/configs/apple-libc++abi-backdeployment.cfg.in
@@ -45,7 +45,7 @@ config.substitutions.append(('%{flags}',
     '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
 ))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
+    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
     '-I %{libcxx}/test/support -I %{libcxx}/src'
 ))
 config.substitutions.append(('%{link_flags}',

diff  --git a/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in b/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in
index 20298bc8c1ec..2920ce521947 100644
--- a/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in
+++ b/libcxxabi/test/configs/apple-libc++abi-shared.cfg.in
@@ -6,7 +6,7 @@ config.substitutions.append(('%{flags}',
     '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
 ))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
+    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
     '-I %{libcxx}/test/support -I %{libcxx}/src'
 ))
 config.substitutions.append(('%{link_flags}',

diff  --git a/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in b/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in
index 3d1175a74699..8d043a428c89 100644
--- a/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in
+++ b/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in
@@ -6,7 +6,7 @@ config.substitutions.append(('%{flags}',''))
 config.substitutions.append(('%{compile_flags}',
     '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} ' +
     '-D__LIBC_NO_CPP_MATH_OVERLOADS__ ' +
-    '-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
+    '-D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
     '-I %{libcxx}/test/support -pthread -I %{libcxx}/src'
 ))
 config.substitutions.append(('%{link_flags}',

diff  --git a/libcxxabi/test/configs/llvm-libc++abi-merged.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-merged.cfg.in
index e61c6afe2901..e135529ebef8 100644
--- a/libcxxabi/test/configs/llvm-libc++abi-merged.cfg.in
+++ b/libcxxabi/test/configs/llvm-libc++abi-merged.cfg.in
@@ -6,7 +6,7 @@ config.substitutions.append(('%{flags}',
     '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
 ))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
+    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS ' +
     '-I %{libcxx}/test/support -I %{libcxx}/src'
 ))
 config.substitutions.append(('%{link_flags}',

diff  --git a/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in
index b0e07d5f2a4a..698032f2b516 100644
--- a/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in
+++ b/libcxxabi/test/configs/llvm-libc++abi-mingw.cfg.in
@@ -5,7 +5,7 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
 
 config.substitutions.append(('%{flags}', ''))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS'
+    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS'
 ))
 config.substitutions.append(('%{link_flags}',
     '-nostdlib++ -L %{lib} -lc++ -lc++abi'

diff  --git a/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in
index 58d1e87be49e..2241a30b4da7 100644
--- a/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in
+++ b/libcxxabi/test/configs/llvm-libc++abi-shared-clangcl.cfg.in
@@ -5,7 +5,7 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
 
 config.substitutions.append(('%{flags}', '--driver-mode=g++'))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX'
+    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX'
 ))
 config.substitutions.append(('%{link_flags}',
     '-nostdlib -L %{lib} -lc++ -lc++abi -lmsvcrt -lmsvcprt -loldnames'

diff  --git a/libcxxabi/test/configs/llvm-libc++abi-shared-gcc.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-shared-gcc.cfg.in
index 325fcd5e9e9e..a171dd29cfbd 100644
--- a/libcxxabi/test/configs/llvm-libc++abi-shared-gcc.cfg.in
+++ b/libcxxabi/test/configs/llvm-libc++abi-shared-gcc.cfg.in
@@ -6,7 +6,7 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
 
 config.substitutions.append(('%{flags}', ''))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS'
+    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS'
 ))
 config.substitutions.append(('%{link_flags}',
     '-L %{lib} -Wl,-rpath,%{lib} -nodefaultlibs -lc++ -lc++abi -lm -lgcc_s -lgcc -lpthread -lc -lgcc_s -lgcc -latomic'

diff  --git a/libcxxabi/test/configs/llvm-libc++abi-shared.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-shared.cfg.in
index f742574e6fbb..e4cd90aa9fff 100644
--- a/libcxxabi/test/configs/llvm-libc++abi-shared.cfg.in
+++ b/libcxxabi/test/configs/llvm-libc++abi-shared.cfg.in
@@ -7,7 +7,7 @@ config.substitutions.append(('%{flags}',
     '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
 ))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS'
+    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS'
 ))
 config.substitutions.append(('%{link_flags}',
     '-nostdlib++ -L %{lib} -Wl,-rpath,%{lib} -lc++ -lc++abi -pthread'

diff  --git a/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in
index 8820c5b7d751..9cbe4000c087 100644
--- a/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in
+++ b/libcxxabi/test/configs/llvm-libc++abi-static-clangcl.cfg.in
@@ -5,7 +5,7 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
 
 config.substitutions.append(('%{flags}', '--driver-mode=g++'))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support  -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX'
+    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support  -I %{libcxx}/src -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX'
 ))
 config.substitutions.append(('%{link_flags}',
     '-nostdlib -L %{lib} -llibc++ -llibc++abi -lmsvcrt -lmsvcprt -loldnames'

diff  --git a/libcxxabi/test/configs/llvm-libc++abi-static.cfg.in b/libcxxabi/test/configs/llvm-libc++abi-static.cfg.in
index c3e7c0ac80ba..0a6971cded56 100644
--- a/libcxxabi/test/configs/llvm-libc++abi-static.cfg.in
+++ b/libcxxabi/test/configs/llvm-libc++abi-static.cfg.in
@@ -7,7 +7,7 @@ config.substitutions.append(('%{flags}',
     '-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else ''
 ))
 config.substitutions.append(('%{compile_flags}',
-    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS'
+    '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src -D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS'
 ))
 config.substitutions.append(('%{link_flags}',
     '-nostdlib++ -L %{lib} -lc++ -lc++abi -pthread'

diff  --git a/libcxxabi/test/guard_test_basic.pass.cpp b/libcxxabi/test/guard_test_basic.pass.cpp
index 6b15dd042a38..254ce26e742e 100644
--- a/libcxxabi/test/guard_test_basic.pass.cpp
+++ b/libcxxabi/test/guard_test_basic.pass.cpp
@@ -130,8 +130,8 @@ int main(int, char**) {
 #else
     static_assert(CurrentImplementation == Implementation::GlobalMutex, "");
     static_assert(std::is_same<SelectedImplementation,
-                               GlobalMutexGuard<LibcppMutex, LibcppCondVar, GlobalStatic<LibcppMutex>::instance,
-                                                GlobalStatic<LibcppCondVar>::instance>>::value,
+                               GlobalMutexGuard<LIBCUDACXXMutex, LIBCUDACXXCondVar, GlobalStatic<LIBCUDACXXMutex>::instance,
+                                                GlobalStatic<LIBCUDACXXCondVar>::instance>>::value,
                   "");
 #endif
   }

diff  --git a/libcxxabi/test/guard_threaded_test.pass.cpp b/libcxxabi/test/guard_threaded_test.pass.cpp
index 78dafba7f7ec..111fd4ff61c3 100644
--- a/libcxxabi/test/guard_threaded_test.pass.cpp
+++ b/libcxxabi/test/guard_threaded_test.pass.cpp
@@ -88,7 +88,7 @@ constexpr InitResult ABORTED = InitResult::ABORTED;
 template <class Impl, class GuardType, class Init>
 InitResult check_guard(GuardType *g, Init init) {
   uint8_t *first_byte = reinterpret_cast<uint8_t*>(g);
-  if (std::__libcpp_atomic_load(first_byte, std::_AO_Acquire) == 0) {
+  if (std::__LIBCUDACXX_atomic_load(first_byte, std::_AO_Acquire) == 0) {
     Impl impl(g);
     if (impl.cxa_guard_acquire() == INIT_IS_PENDING) {
 #ifndef TEST_HAS_NO_EXCEPTIONS

diff  --git a/libcxxabi/test/libcxxabi/test/config.py b/libcxxabi/test/libcxxabi/test/config.py
index 4adc566c9edb..84cbbf8179e6 100644
--- a/libcxxabi/test/libcxxabi/test/config.py
+++ b/libcxxabi/test/libcxxabi/test/config.py
@@ -44,7 +44,7 @@ def configure_features(self):
 
     def configure_compile_flags(self):
         self.cxx.compile_flags += [
-            '-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS',
+            '-D_LIBCUDACXX_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS',
         ]
         if self.get_lit_bool('enable_exceptions', True):
             self.cxx.compile_flags += ['-funwind-tables']

diff  --git a/libcxxabi/test/test_exception_storage.pass.cpp b/libcxxabi/test/test_exception_storage.pass.cpp
index f1cfe6e934f6..6a6b0ba93aad 100644
--- a/libcxxabi/test/test_exception_storage.pass.cpp
+++ b/libcxxabi/test/test_exception_storage.pass.cpp
@@ -40,16 +40,16 @@ void *thread_code (void *parm) {
 #ifndef TEST_HAS_NO_THREADS
 #define NUMTHREADS  10
 size_t                 thread_globals [ NUMTHREADS ] = { 0 };
-std::__libcpp_thread_t   threads        [ NUMTHREADS ];
+std::__LIBCUDACXX_thread_t   threads        [ NUMTHREADS ];
 #endif
 
 int main() {
 #ifndef TEST_HAS_NO_THREADS
 //  Make the threads, let them run, and wait for them to finish
     for ( int i = 0; i < NUMTHREADS; ++i )
-        std::__libcpp_thread_create ( threads + i, thread_code, (void *) (thread_globals + i));
+        std::__LIBCUDACXX_thread_create ( threads + i, thread_code, (void *) (thread_globals + i));
     for ( int i = 0; i < NUMTHREADS; ++i )
-        std::__libcpp_thread_join ( &threads [ i ] );
+        std::__LIBCUDACXX_thread_join ( &threads [ i ] );
 
     int retVal = 0;
     for ( int i = 0; i < NUMTHREADS; ++i ) {


        


More information about the llvm-branch-commits mailing list